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
list |
---|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5437
|
Can't load png dataset with 4 channel (RGBA)
|
Hi! Can you please share the directory structure of your image folder and the `load_dataset` call? We decode images with Pillow, and Pillow supports RGBA PNGs, so this shouldn't be a problem.
|
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
| 336 | 32 |
Can't load png dataset with 4 channel (RGBA)
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
Hi! Can you please share the directory structure of your image folder and the `load_dataset` call? We decode images with Pillow, and Pillow supports RGBA PNGs, so this shouldn't be a problem.
|
[
-1.2024563550949097,
-0.8879140615463257,
-0.731063723564148,
1.308282494544983,
-0.1311367005109787,
-1.2804652452468872,
0.056296370923519135,
-1.0684115886688232,
1.6747586727142334,
-0.9046953916549683,
0.33359411358833313,
-1.5676180124282837,
0.08582255244255066,
-0.5300987362861633,
-0.7548546195030212,
-0.8910403251647949,
-0.3032117187976837,
-0.8840507864952087,
1.111971139907837,
2.583301544189453,
1.1592612266540527,
-1.342357873916626,
2.829213857650757,
0.6735779643058777,
-0.2573413848876953,
-1.0573406219482422,
0.5602432489395142,
-0.06487175822257996,
-1.266821265220642,
-0.4180883765220642,
-0.9966663122177124,
0.07753049582242966,
-0.4932347238063812,
-0.5302587151527405,
0.01834150403738022,
0.30101412534713745,
-0.1839665323495865,
-0.3375608026981354,
-0.45412904024124146,
-0.7403647899627686,
0.504615306854248,
-0.35560357570648193,
0.8787984848022461,
-0.3583430349826813,
1.8012983798980713,
-0.47193852066993713,
0.3583303689956665,
0.6494195461273193,
1.3626781702041626,
0.18946224451065063,
-0.09574136883020401,
0.33730921149253845,
0.4015328288078308,
-0.04019282013177872,
0.3456425368785858,
1.2155380249023438,
0.5948761105537415,
0.6085025668144226,
0.6900160908699036,
-2.2716612815856934,
1.3353915214538574,
-1.0298932790756226,
0.22065860033035278,
1.3017451763153076,
-0.9957610368728638,
0.3778590261936188,
-1.7803362607955933,
-0.10904979705810547,
0.4637686312198639,
-2.315272569656372,
0.1918182522058487,
-1.2600226402282715,
-0.556784987449646,
0.9281703233718872,
0.3164944648742676,
-1.278801679611206,
0.12391401827335358,
-0.44550982117652893,
0.9703577756881714,
0.4982946217060089,
1.1148922443389893,
-1.7504116296768188,
0.002161501906812191,
-0.26979899406433105,
0.038622476160526276,
-1.389396071434021,
-1.5653760433197021,
0.6231964826583862,
0.6499876379966736,
0.651121973991394,
-0.036444853991270065,
0.9331352114677429,
-1.0331751108169556,
0.8411873579025269,
-0.9563490152359009,
-1.6060794591903687,
-1.3305063247680664,
-2.287693500518799,
-2.237797737121582,
0.788663923740387,
-0.5520049929618835,
-0.5309997200965881,
2.035590648651123,
-1.1611008644104004,
-1.704458236694336,
1.2507712841033936,
0.22800830006599426,
-0.028619468212127686,
2.438382387161255,
0.2427968978881836,
-0.7699372172355652,
0.5434657335281372,
-0.7433896064758301,
0.8149397373199463,
-0.39314430952072144,
1.442492961883545,
0.5758317112922668,
-0.9905588626861572,
1.6455860137939453,
-0.4339878261089325,
0.5030227303504944,
-0.6357086896896362,
-0.6081534028053284,
-0.9469695091247559,
0.40951091051101685,
1.8971683979034424,
-0.2517697513103485,
1.5624840259552002,
-0.37705060839653015,
-1.5775245428085327,
-1.4896061420440674,
0.9075482487678528,
0.6846957802772522,
-0.816943883895874,
0.10887811332941055,
-0.4171160161495209,
0.050305530428886414,
0.10585647076368332,
1.133076548576355,
1.2364139556884766,
0.7497448325157166,
-0.30430975556373596,
-0.9590523838996887,
0.19043652713298798,
-0.14434368908405304,
-0.6485637426376343,
-1.8896559476852417,
-0.3633234202861786,
0.13862496614456177,
0.6207520365715027,
-1.2777209281921387,
1.7112754583358765,
0.8975743651390076,
2.029862880706787,
1.0195399522781372,
-0.3212866485118866,
1.4451631307601929,
0.013190453872084618,
1.8307150602340698,
-0.4563298225402832,
0.7423826456069946,
-0.26140153408050537,
-1.1538974046707153,
0.8071009516716003,
-0.40102195739746094,
-1.9664901494979858,
-0.7469068765640259,
-0.8580588698387146,
-0.26225489377975464,
-0.7978305816650391,
0.9924412369728088,
-0.3280271887779236,
-1.4681715965270996,
0.24779284000396729,
-0.6106183528900146,
0.16911426186561584,
-1.2742866277694702,
0.3530857264995575,
0.7805507183074951,
-0.6314986348152161,
-0.01243799552321434,
-0.2184135466814041,
-1.3752574920654297,
-0.49146485328674316,
0.24464941024780273,
1.9077357053756714,
-0.7805752158164978,
0.9540711641311646,
1.091251015663147,
-0.6027547717094421,
-0.0775931179523468,
0.3341121971607208,
-0.322640597820282,
0.859673798084259,
-1.030248999595642,
-0.31255683302879333,
1.1368478536605835,
-0.19318965077400208,
-0.5893160700798035,
1.4537509679794312,
0.7091590166091919,
-0.969207227230072,
-0.20721940696239471,
-0.21934771537780762,
-0.8735949397087097,
-0.024912361055612564,
-1.7095633745193481,
-0.17502553761005402,
0.3600526452064514,
-1.4789131879806519,
-0.350423127412796,
-0.16823254525661469,
1.3250305652618408,
-0.2161092460155487,
1.287629246711731,
-0.4326082468032837,
-0.280394047498703,
-0.4292924106121063,
-0.4330880343914032,
0.19254016876220703,
-0.18873250484466553,
-0.6942134499549866,
0.2996973693370819,
-0.8000385165214539,
0.3011780381202698,
1.5081887245178223,
0.44843989610671997,
0.1137988343834877,
0.5436834096908569,
1.0566166639328003,
0.33430927991867065,
-0.0659564658999443,
-0.8613190054893494,
-1.622458815574646,
2.0556821823120117,
-1.544648289680481,
2.0178048610687256,
0.7450307011604309,
-0.06459985673427582,
-1.7617697715759277,
-1.8306993246078491,
1.375100016593933,
1.231881856918335,
2.318819761276245,
0.5551722049713135,
0.33951616287231445,
-0.7286068797111511,
-0.7195668816566467,
0.3842064142227173,
-1.036217212677002,
-0.7525730729103088,
0.18067564070224762,
2.276984691619873,
1.6499302387237549,
-0.4948691725730896,
-0.12699924409389496,
-1.0196799039840698,
1.3856505155563354,
-0.09748446941375732,
0.2654999792575836,
1.9721059799194336,
-0.3666921555995941,
-1.1902554035186768,
1.2496849298477173,
-2.3016059398651123,
0.1674731969833374,
1.9744739532470703,
0.3249196410179138,
0.0055781276896595955,
-1.3699294328689575,
-0.6498717069625854,
-0.2560300827026367,
-0.49066880345344543,
-1.290690302848816,
0.6416525840759277,
-0.3227905035018921,
-0.873060405254364,
-1.399325966835022,
0.07433977723121643,
-1.1879760026931763,
-1.7338985204696655,
0.399299681186676,
1.8522007465362549,
2.196406602859497,
-0.7519367933273315,
1.4963996410369873,
-0.16311971843242645,
0.2454875409603119,
1.0971816778182983,
1.1146578788757324,
3.1022067070007324,
1.7985095977783203,
-1.236361026763916,
0.666419506072998,
-0.15552541613578796,
-0.5601087212562561,
1.1700595617294312,
-1.009525179862976,
1.3130626678466797,
-0.1132565438747406,
-1.1718755960464478,
-1.2391977310180664,
0.947202205657959,
0.421295702457428,
0.062237098813056946,
-0.472174733877182,
1.1859139204025269,
0.11991143226623535,
1.1908648014068604,
0.5294517874717712,
-0.32096734642982483,
0.6246163249015808,
-0.44299209117889404,
-0.6696593761444092,
1.528891682624817,
0.17737674713134766,
-1.5083125829696655,
-2.3346004486083984,
-0.2730357050895691,
-0.7827149033546448,
0.02303752861917019,
-0.6569781303405762,
-1.0094674825668335,
1.6312975883483887,
0.4474126696586609,
-1.2230992317199707,
-0.2297469675540924,
-0.34160351753234863,
-0.598516047000885,
2.6526877880096436,
-1.3877211809158325,
-0.20872046053409576,
-0.9615640044212341,
-0.6214625239372253,
1.6263282299041748,
-1.242822289466858,
-0.10000862181186676,
-0.8755447268486023,
-0.5823294520378113,
-1.380517840385437,
-0.550954282283783,
-0.09360073506832123,
-0.8693262934684753,
0.6814303398132324,
0.22011663019657135,
-1.0935832262039185,
-0.3164611756801605,
-0.86766117811203,
0.8544684052467346,
-0.1495671272277832,
0.29328835010528564,
1.8624635934829712,
0.33126628398895264,
-0.37614455819129944,
0.70145183801651,
1.1434581279754639,
0.612602710723877,
-0.5637810230255127,
0.14077456295490265,
-0.7284336686134338,
0.35341677069664,
-1.2231916189193726,
0.3216313123703003,
-3.0093486309051514,
0.6946530342102051,
-0.04526311904191971,
-0.11602398753166199,
-0.012354129925370216,
-1.4138286113739014,
1.1319279670715332,
2.580158233642578,
-1.1971989870071411,
0.6220054030418396,
0.3160424530506134,
1.1458144187927246,
-1.5721759796142578,
0.3060047924518585,
-0.38839593529701233,
2.1340079307556152,
0.23086141049861908,
1.1832507848739624,
-0.5482280254364014,
-2.2557015419006348,
0.6543787717819214,
-1.1998401880264282,
-1.115011215209961,
0.7326003909111023,
-0.8524875640869141,
0.16640545427799225,
-1.3558276891708374,
-0.20363448560237885,
-0.9867881536483765,
-1.222063660621643,
0.6572754383087158,
0.16170497238636017,
0.4640951454639435,
-0.5363898277282715,
0.35058873891830444,
-2.126699209213257,
-1.3975648880004883,
-0.19815286993980408,
-0.9126891493797302,
0.5471265316009521,
-0.23424255847930908,
0.7154480814933777,
-0.12778759002685547,
0.13410957157611847,
0.36933448910713196,
1.3755024671554565,
3.459144353866577,
0.20191749930381775,
0.4411998391151428,
-0.12153255194425583,
-0.9489465951919556,
1.51459538936615,
0.9899834394454956,
-0.042763955891132355,
-0.6479673385620117,
-0.9877265095710754,
1.2984164953231812,
2.0021791458129883,
0.8757427334785461,
0.04729222506284714,
-0.7870901823043823,
-0.6503212451934814,
0.04628162086009979,
0.21196332573890686,
0.42020830512046814,
0.9638864398002625,
0.01852068118751049,
0.178175151348114,
1.5000685453414917,
1.1937686204910278,
-0.5554258823394775,
0.40976840257644653,
-0.8778088688850403,
-0.4303435683250427,
0.41858190298080444,
0.31409212946891785,
-0.07475251704454422,
0.41530653834342957,
-0.9466655254364014,
-0.24372932314872742,
-0.22073344886302948,
-0.9350742101669312,
-0.7035359740257263,
-0.39050957560539246,
-0.38174065947532654,
1.5558750629425049,
0.048005640506744385,
-0.42306938767433167,
-0.027583016082644463,
-0.7849608063697815,
-0.13867677748203278,
-1.0330411195755005,
0.24371525645256042,
-0.07624528557062149,
-0.10142120718955994,
-0.16885149478912354,
1.7620209455490112,
-0.8294481039047241,
-2.0817558765411377,
0.24422496557235718,
0.2826583683490753,
-0.3995141386985779,
0.17201930284500122,
1.6342190504074097,
0.49882057309150696,
1.46039617061615,
1.3292601108551025,
0.9607031941413879,
-0.6042399406433105,
-1.3328596353530884,
0.7552750706672668,
0.8401126861572266,
-1.4075297117233276,
0.8768767714500427,
-0.022458989173173904,
-0.4633309841156006,
0.7200910449028015,
1.3489750623703003,
0.4647829830646515,
-1.9525139331817627,
0.8135237693786621,
-0.8761583566665649,
0.7972702980041504,
0.7077721357345581,
0.7325932383537292,
0.1994074285030365,
0.9599316120147705,
-1.2378231287002563,
-1.1601966619491577,
-0.8174006938934326,
-0.721717357635498,
1.9121571779251099,
-0.22830459475517273,
0.5568743944168091,
-0.17983974516391754,
-1.2541515827178955,
-0.07726649940013885,
0.6142057776451111,
0.3331282436847687,
-0.28355538845062256,
0.8962370157241821,
-0.7346035838127136,
-1.3108232021331787,
-1.4354965686798096,
-0.3720966875553131,
-1.0040706396102905,
-0.9001879096031189,
1.027593731880188,
0.756777822971344,
0.33710816502571106,
1.937717318534851,
0.5824757218360901,
0.22331014275550842,
-2.650588035583496,
0.8642401099205017,
0.2715010643005371,
0.005919489078223705,
0.8849102258682251,
0.2658044099807739,
1.0991772413253784,
-0.058432601392269135,
0.4863555133342743,
-2.2864255905151367,
2.249779462814331,
-0.33227986097335815,
0.8015427589416504,
0.03946363925933838,
-0.09576113522052765,
1.062180757522583,
0.5603926181793213,
0.6500586271286011,
-1.2354079484939575,
0.7663851976394653,
-0.6299824714660645,
1.2262263298034668,
0.9406665563583374,
-0.8784723877906799,
0.02766813151538372,
1.228763461112976,
0.422434002161026,
-0.5136513710021973,
-0.8402196168899536,
-0.937687337398529,
0.8589755892753601,
1.6581943035125732,
-0.09795856475830078,
0.011603038758039474,
0.7480965256690979,
0.6288467049598694,
-1.2869421243667603,
0.009198779240250587,
-0.6891764998435974,
-0.7098040580749512,
1.709746241569519,
2.112375497817993,
-0.0865265280008316,
-0.17182093858718872,
-0.6169681549072266,
-1.2444658279418945,
0.8823117613792419,
0.02108345367014408,
0.13203316926956177,
0.6107039451599121,
-0.6622012853622437,
1.137433648109436,
0.9160995483398438,
0.8662019371986389,
0.1519811898469925,
0.26053503155708313,
0.3434469401836395,
-0.16131699085235596,
-1.058900237083435,
-0.3578864634037018,
-1.1538093090057373,
-2.6040241718292236,
0.3550826907157898,
-0.34659165143966675,
-1.4275819063186646,
0.08926433324813843,
-1.0030180215835571,
0.746616542339325,
-0.5418487191200256,
-0.9772507548332214,
-1.44808828830719,
0.21865010261535645,
-0.1537448763847351,
0.8118345141410828,
-1.6163091659545898,
-0.12506037950515747,
1.2899134159088135,
0.9821961522102356,
-0.6161134839057922,
1.1079747676849365,
0.2814483642578125,
0.9664193391799927,
0.8635673522949219,
-0.5104180574417114,
0.5261444449424744,
0.19279320538043976,
-1.3501518964767456,
0.4499259889125824,
1.241510272026062,
0.17339149117469788,
1.3705226182937622,
-0.4750770032405853,
0.0555407777428627,
0.43190547823905945,
-0.5634366869926453,
-0.450868159532547,
-0.5268309712409973,
0.8593001961708069,
0.04355575144290924,
-0.8260749578475952,
0.05283728986978531,
-0.12407942116260529,
-0.2824327349662781,
0.3835907280445099,
-1.5854456424713135,
-0.29882967472076416,
-0.47054579854011536,
-0.4754202365875244,
-1.356526494026184,
-0.13911281526088715,
1.4027315378189087,
-0.8944882154464722,
-0.13669903576374054,
0.4752601087093353,
0.3770250678062439,
0.5754418969154358,
0.7040798664093018,
-0.6345795392990112,
-0.3567740023136139,
-0.3035108149051666,
-0.33135589957237244,
0.3302507996559143,
1.2295535802841187,
-0.13064052164554596,
-0.9121972918510437,
0.7395109534263611,
-0.25355708599090576,
-0.0094230892136693,
1.8575327396392822,
0.053837694227695465,
-0.8161595463752747,
0.28250986337661743,
-0.7521708607673645,
1.939587950706482,
1.5935051441192627,
1.3213096857070923,
-0.07183220982551575,
-0.8582941293716431,
0.5758334398269653,
-0.16750891506671906,
-0.3268626630306244,
0.9022035002708435,
0.47322651743888855,
-0.17786478996276855,
-1.33756685256958,
0.6582566499710083,
1.2205896377563477,
-0.808197557926178,
-0.6990328431129456,
-0.050442665815353394,
-0.7997103333473206,
1.1721131801605225,
0.755769670009613,
0.4514571726322174,
0.34306061267852783,
1.7193008661270142,
0.7089864611625671,
-0.5559659004211426,
0.3963592052459717,
0.4943024218082428,
-0.18550768494606018,
-2.1521291732788086,
-1.0114315748214722,
0.2610635459423065,
-0.34613844752311707,
-1.5442721843719482,
1.3352044820785522,
-1.118125557899475,
-0.9332996606826782,
0.5958293676376343,
0.06525836884975433,
1.398566484451294,
0.31348860263824463,
1.6588003635406494,
2.0455658435821533,
0.9026756882667542,
0.29703038930892944,
1.3465828895568848,
-0.14366261661052704,
-0.4191933572292328,
1.8193483352661133,
-0.42421138286590576,
0.4553755819797516,
1.0257238149642944,
-0.41342106461524963,
-1.0534533262252808,
-0.7952222228050232,
-1.1173433065414429,
-0.6405691504478455,
1.1639950275421143,
0.17264708876609802,
-1.2784065008163452,
0.1869790256023407,
1.6028449535369873,
0.07818661630153656,
-0.18329942226409912,
0.5639888048171997,
0.46303224563598633,
-0.6699663400650024,
-0.08751064538955688,
-0.9934501051902771,
0.47575119137763977,
-0.2529807686805725,
-0.33455169200897217,
0.210682675242424,
0.5393569469451904,
1.1633188724517822,
-0.14633430540561676,
0.08316998928785324,
1.1657400131225586,
-1.4669122695922852,
1.3022514581680298,
-0.7174765467643738,
0.29535582661628723,
-2.3724875450134277,
1.3937759399414062,
-0.7541353702545166,
1.999169111251831,
-2.7310357093811035,
0.4162059426307678,
-0.6625033020973206,
-0.5756656527519226,
0.24100226163864136,
-0.33686038851737976,
0.13800983130931854,
-0.2363175004720688,
-1.0052953958511353,
-0.0907597541809082,
-0.79341059923172,
0.48547494411468506,
1.1245496273040771,
1.2618199586868286,
-0.9822919964790344,
-0.2595171630382538,
-1.6867314577102661,
-0.16502484679222107,
-0.6545453667640686,
0.20119082927703857,
-2.109868049621582,
-0.19406160712242126,
-2.0377514362335205,
-2.315002918243408,
-1.3705974817276,
-0.8920873403549194,
1.154289960861206,
0.03736438602209091,
-0.823175311088562,
1.1786296367645264,
-0.37443846464157104,
-1.8012181520462036,
1.1235630512237549,
-2.070063352584839
] |
https://github.com/huggingface/datasets/issues/5437
|
Can't load png dataset with 4 channel (RGBA)
|
> Hi! Can you please share the directory structure of your image folder and the `load_dataset` call? We decode images with Pillow, and Pillow supports RGBA PNGs, so this shouldn't be a problem.
>
>
I have only 1 folder that I use in the load_dataset function with the name "IMGDATA" and all my 9000 images are located in this folder.
`
from datasets import load_dataset
dataset = load_dataset("IMGDATA")
`
At the same time, using another data set with images consisting of 3 RGB channels, everything works
|
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
| 336 | 87 |
Can't load png dataset with 4 channel (RGBA)
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
> Hi! Can you please share the directory structure of your image folder and the `load_dataset` call? We decode images with Pillow, and Pillow supports RGBA PNGs, so this shouldn't be a problem.
>
>
I have only 1 folder that I use in the load_dataset function with the name "IMGDATA" and all my 9000 images are located in this folder.
`
from datasets import load_dataset
dataset = load_dataset("IMGDATA")
`
At the same time, using another data set with images consisting of 3 RGB channels, everything works
|
[
-1.2067346572875977,
-0.9212180972099304,
-0.7487188577651978,
1.3068636655807495,
-0.1434229612350464,
-1.227055311203003,
0.09639327228069305,
-1.14827561378479,
1.6667509078979492,
-0.925459086894989,
0.293778657913208,
-1.6264351606369019,
0.03779805451631546,
-0.5211206674575806,
-0.7731901407241821,
-0.9594361186027527,
-0.35599714517593384,
-0.8478173613548279,
1.0703833103179932,
2.4952964782714844,
1.2259321212768555,
-1.3259928226470947,
2.801866292953491,
0.6449873447418213,
-0.1929674595594406,
-1.0819000005722046,
0.5712798237800598,
-0.02199498936533928,
-1.2071915864944458,
-0.4254447817802429,
-0.9493770599365234,
0.024443544447422028,
-0.5621105432510376,
-0.5686753392219543,
-0.025402585044503212,
0.3073763847351074,
-0.25503456592559814,
-0.3616429269313812,
-0.4825912117958069,
-0.8151678442955017,
0.542422354221344,
-0.3388090133666992,
0.908832848072052,
-0.41060101985931396,
1.8393135070800781,
-0.5013168454170227,
0.42271244525909424,
0.7089099287986755,
1.3299431800842285,
0.2581949532032013,
-0.07401202619075775,
0.29323890805244446,
0.3826254904270172,
0.01035703718662262,
0.374562531709671,
1.2035521268844604,
0.6145491600036621,
0.5952913165092468,
0.7036473751068115,
-2.2363076210021973,
1.277091383934021,
-0.9911251664161682,
0.2806941866874695,
1.2967983484268188,
-0.9375613927841187,
0.3606055974960327,
-1.8012876510620117,
-0.11628296971321106,
0.5128079652786255,
-2.253990650177002,
0.19157081842422485,
-1.2849174737930298,
-0.4988541603088379,
0.931133508682251,
0.2750585377216339,
-1.2469500303268433,
0.2109551727771759,
-0.4117065668106079,
1.0100008249282837,
0.5726984143257141,
1.1484142541885376,
-1.7647981643676758,
-0.009392240084707737,
-0.25595471262931824,
0.1042463481426239,
-1.3413143157958984,
-1.5765137672424316,
0.5794315338134766,
0.6217197775840759,
0.6007653474807739,
-0.06406436115503311,
0.9767184257507324,
-1.010347604751587,
0.8135584592819214,
-1.0139923095703125,
-1.5943796634674072,
-1.3374029397964478,
-2.2646267414093018,
-2.3071694374084473,
0.7697497606277466,
-0.5352669954299927,
-0.520702064037323,
2.030508041381836,
-1.1129136085510254,
-1.7419642210006714,
1.2184326648712158,
0.24074013531208038,
-0.0005395244807004929,
2.4142539501190186,
0.23888324201107025,
-0.7642094492912292,
0.5333922505378723,
-0.7626910209655762,
0.7920727729797363,
-0.3773757219314575,
1.4317272901535034,
0.5763092041015625,
-0.9679408073425293,
1.6732736825942993,
-0.5172257423400879,
0.5357232093811035,
-0.6454588174819946,
-0.63507479429245,
-0.91895592212677,
0.3540596663951874,
1.8785274028778076,
-0.2673441171646118,
1.6253008842468262,
-0.3727681636810303,
-1.6432570219039917,
-1.5242034196853638,
0.910232424736023,
0.5899432301521301,
-0.7986015677452087,
0.09121878445148468,
-0.38371238112449646,
0.07860143482685089,
0.059405941516160965,
1.12009859085083,
1.161924123764038,
0.7886045575141907,
-0.34278595447540283,
-0.934353232383728,
0.157010018825531,
-0.08857360482215881,
-0.642070472240448,
-1.8341377973556519,
-0.3617422580718994,
0.1312362104654312,
0.5862325429916382,
-1.2607944011688232,
1.7322616577148438,
0.9206111431121826,
2.0215160846710205,
1.0152374505996704,
-0.340359628200531,
1.4876703023910522,
0.07539312541484833,
1.846236228942871,
-0.4425407946109772,
0.6972081661224365,
-0.2438291311264038,
-1.1502597332000732,
0.7935617566108704,
-0.36015841364860535,
-1.956113338470459,
-0.7951034307479858,
-0.8222814798355103,
-0.21580485999584198,
-0.7975363731384277,
0.9750130772590637,
-0.2746957540512085,
-1.481128454208374,
0.28876298666000366,
-0.5935385227203369,
0.16220363974571228,
-1.266120195388794,
0.3889544904232025,
0.75307697057724,
-0.6294074058532715,
0.0029712002724409103,
-0.19980575144290924,
-1.352705955505371,
-0.4367188811302185,
0.2115303874015808,
1.9474810361862183,
-0.799316942691803,
0.9285244345664978,
1.0544278621673584,
-0.6057714819908142,
-0.018693886697292328,
0.31938308477401733,
-0.2773439288139343,
0.8416776061058044,
-0.975567102432251,
-0.3159778118133545,
1.2165180444717407,
-0.22751113772392273,
-0.5517505407333374,
1.44806706905365,
0.7302578091621399,
-0.952796220779419,
-0.14576052129268646,
-0.20371434092521667,
-0.8862878084182739,
-0.07705794274806976,
-1.608681559562683,
-0.11928604543209076,
0.3698122799396515,
-1.446446418762207,
-0.4034186601638794,
-0.17730829119682312,
1.2605531215667725,
-0.23278716206550598,
1.3462718725204468,
-0.487109512090683,
-0.25454312562942505,
-0.4256395399570465,
-0.43501782417297363,
0.19148853421211243,
-0.24138860404491425,
-0.7414957284927368,
0.2071097493171692,
-0.770107090473175,
0.26843342185020447,
1.4541714191436768,
0.45751747488975525,
0.03336497023701668,
0.46514570713043213,
1.138448715209961,
0.3053099811077118,
-0.06770240515470505,
-0.8158085942268372,
-1.5729689598083496,
2.0640602111816406,
-1.4838370084762573,
1.9666002988815308,
0.7175202369689941,
-0.07065074145793915,
-1.753749966621399,
-1.7947163581848145,
1.3614397048950195,
1.194298267364502,
2.3637986183166504,
0.5166722536087036,
0.33825671672821045,
-0.7925514578819275,
-0.77070152759552,
0.35340404510498047,
-1.0402793884277344,
-0.7573336958885193,
0.13005037605762482,
2.2857682704925537,
1.6652858257293701,
-0.5361438393592834,
-0.14654120802879333,
-1.014464259147644,
1.423526644706726,
-0.1737050712108612,
0.2547246515750885,
1.949789047241211,
-0.39208686351776123,
-1.1721266508102417,
1.242929458618164,
-2.339937210083008,
0.14549124240875244,
2.0070488452911377,
0.32484614849090576,
0.0440463051199913,
-1.3767505884170532,
-0.6729647517204285,
-0.3111734986305237,
-0.4775261878967285,
-1.2990937232971191,
0.560565173625946,
-0.3101804554462433,
-0.8345742225646973,
-1.3826240301132202,
0.09050577878952026,
-1.1224433183670044,
-1.702085018157959,
0.35290154814720154,
1.8705017566680908,
2.126999855041504,
-0.7696993350982666,
1.4843121767044067,
-0.23439423739910126,
0.22936613857746124,
1.1724193096160889,
1.196876049041748,
3.1190593242645264,
1.7831826210021973,
-1.2733980417251587,
0.6467829346656799,
-0.16705289483070374,
-0.5803728699684143,
1.2034127712249756,
-1.0219199657440186,
1.2847856283187866,
-0.16062761843204498,
-1.171431064605713,
-1.2111570835113525,
0.9569210410118103,
0.42039620876312256,
0.10618133842945099,
-0.48512235283851624,
1.1955269575119019,
0.10794539749622345,
1.2796152830123901,
0.566132664680481,
-0.3780955374240875,
0.6182659268379211,
-0.39579519629478455,
-0.6744364500045776,
1.505847692489624,
0.18202811479568481,
-1.4863386154174805,
-2.312091112136841,
-0.2332274168729782,
-0.7980859875679016,
-0.00012816675007343292,
-0.6214253306388855,
-1.0329971313476562,
1.622555136680603,
0.4426490068435669,
-1.2428146600723267,
-0.2647342383861542,
-0.34937867522239685,
-0.5801634192466736,
2.647521734237671,
-1.3846828937530518,
-0.18628528714179993,
-0.9729330539703369,
-0.6391289830207825,
1.6455858945846558,
-1.2288535833358765,
-0.07962340116500854,
-0.8936530947685242,
-0.6281448006629944,
-1.4545313119888306,
-0.5883671641349792,
-0.05707361921668053,
-0.8788391351699829,
0.6854835152626038,
0.2584952116012573,
-1.0946779251098633,
-0.31199172139167786,
-0.909681499004364,
0.8522827625274658,
-0.1407025009393692,
0.3137156665325165,
1.861809492111206,
0.36515870690345764,
-0.40839090943336487,
0.6973047852516174,
1.154771089553833,
0.6135793328285217,
-0.616605818271637,
0.10545659065246582,
-0.7947909832000732,
0.3537028133869171,
-1.2753193378448486,
0.2642458379268646,
-2.9757657051086426,
0.7116129994392395,
-0.06148086488246918,
-0.13024622201919556,
0.0009550601243972778,
-1.4255322217941284,
1.1401543617248535,
2.6001534461975098,
-1.1973280906677246,
0.5325337648391724,
0.35059836506843567,
1.1828868389129639,
-1.622314453125,
0.3159777522087097,
-0.4194161891937256,
2.14039945602417,
0.26738402247428894,
1.2138208150863647,
-0.4964632987976074,
-2.284146308898926,
0.6281197667121887,
-1.2454991340637207,
-1.1524518728256226,
0.8247589468955994,
-0.8739739656448364,
0.1371147483587265,
-1.3796851634979248,
-0.21776756644248962,
-0.9637698531150818,
-1.1892387866973877,
0.7155241966247559,
0.1708229035139084,
0.4799172878265381,
-0.5266681909561157,
0.35806891322135925,
-2.1616950035095215,
-1.3459059000015259,
-0.21563458442687988,
-0.942471444606781,
0.521608829498291,
-0.26778170466423035,
0.7242095470428467,
-0.15219490230083466,
0.10754135251045227,
0.4274946451187134,
1.3892817497253418,
3.4049346446990967,
0.2471105009317398,
0.36607030034065247,
-0.12985962629318237,
-0.9586877226829529,
1.5225294828414917,
0.9233613610267639,
-0.09831061959266663,
-0.5596688389778137,
-0.9503957629203796,
1.2455352544784546,
1.9751412868499756,
0.8894659876823425,
0.01387215405702591,
-0.785079836845398,
-0.6419491171836853,
0.01979166828095913,
0.1972101479768753,
0.44330528378486633,
0.9551538228988647,
0.022600911557674408,
0.18060415983200073,
1.4783713817596436,
1.2036343812942505,
-0.4671266973018646,
0.3986395597457886,
-0.9169283509254456,
-0.48428407311439514,
0.514575719833374,
0.2679711580276489,
-0.05678996071219444,
0.4459545910358429,
-0.9704304337501526,
-0.23311571776866913,
-0.28974422812461853,
-0.9053199887275696,
-0.678537905216217,
-0.4578067362308502,
-0.36509576439857483,
1.5493601560592651,
0.0975705087184906,
-0.4714290499687195,
0.010302014648914337,
-0.7771700620651245,
-0.13596059381961823,
-1.0652984380722046,
0.2550620138645172,
-0.057496070861816406,
-0.12803207337856293,
-0.13233362138271332,
1.7308231592178345,
-0.8357417583465576,
-2.0344648361206055,
0.2704235315322876,
0.28183647990226746,
-0.3700849711894989,
0.14404655992984772,
1.626258373260498,
0.4900183379650116,
1.4832301139831543,
1.3470492362976074,
0.9892057776451111,
-0.6315522193908691,
-1.3117241859436035,
0.767371416091919,
0.8629381656646729,
-1.366428256034851,
0.866278886795044,
0.024645615369081497,
-0.5242423415184021,
0.690951406955719,
1.270277976989746,
0.4410271942615509,
-1.9261057376861572,
0.8062192797660828,
-0.8558696508407593,
0.7506304383277893,
0.6489665508270264,
0.7473304271697998,
0.19471770524978638,
0.9486629366874695,
-1.235270380973816,
-1.180937647819519,
-0.770155668258667,
-0.7093436121940613,
1.8803316354751587,
-0.239571675658226,
0.5560010671615601,
-0.22612270712852478,
-1.2505089044570923,
-0.05914069339632988,
0.6652694940567017,
0.31855130195617676,
-0.3298999071121216,
0.8974629640579224,
-0.6978973150253296,
-1.2573840618133545,
-1.433958888053894,
-0.32428258657455444,
-1.0220860242843628,
-0.9408169984817505,
1.0389292240142822,
0.8114451169967651,
0.3119736909866333,
1.9183937311172485,
0.615674614906311,
0.26101118326187134,
-2.6381959915161133,
0.8991357684135437,
0.2128830850124359,
-0.07282565534114838,
0.8425595760345459,
0.2715381383895874,
1.0898724794387817,
-0.026296181604266167,
0.51460862159729,
-2.366349935531616,
2.2560667991638184,
-0.30504509806632996,
0.7703670859336853,
0.03056439757347107,
-0.16447420418262482,
1.1147903203964233,
0.6203043460845947,
0.5806272029876709,
-1.2138385772705078,
0.7423443794250488,
-0.6307628750801086,
1.1700010299682617,
0.9270094633102417,
-0.9070834517478943,
0.04429211467504501,
1.3007408380508423,
0.4579482078552246,
-0.48576536774635315,
-0.9050845503807068,
-0.8904898166656494,
0.8782603144645691,
1.6227964162826538,
-0.056865394115448,
-0.012552452273666859,
0.7830271124839783,
0.6800827383995056,
-1.3087118864059448,
0.07052642107009888,
-0.7113161087036133,
-0.7286394238471985,
1.733073353767395,
2.076176166534424,
-0.06605229526758194,
-0.18393400311470032,
-0.6454713344573975,
-1.2360304594039917,
0.904263973236084,
0.040243495255708694,
0.14504259824752808,
0.5953719019889832,
-0.7157231569290161,
1.144518494606018,
0.9244306087493896,
0.8344700336456299,
0.1958584487438202,
0.27792760729789734,
0.3447587788105011,
-0.21417675912380219,
-1.0407408475875854,
-0.24868646264076233,
-1.1547671556472778,
-2.555447578430176,
0.41112110018730164,
-0.30044397711753845,
-1.4384024143218994,
0.11015366017818451,
-0.9901350140571594,
0.8320105075836182,
-0.5991594195365906,
-0.9990158081054688,
-1.5213358402252197,
0.24161462485790253,
-0.07593128085136414,
0.821617841720581,
-1.5840089321136475,
-0.09788306057453156,
1.2813202142715454,
0.9610018730163574,
-0.5736584067344666,
1.087198257446289,
0.3105311095714569,
0.9568111300468445,
0.8709192872047424,
-0.521991491317749,
0.5736459493637085,
0.1272602528333664,
-1.3789540529251099,
0.41021084785461426,
1.2036771774291992,
0.173898383975029,
1.449708104133606,
-0.4798165559768677,
0.07343795895576477,
0.41459301114082336,
-0.5624806880950928,
-0.5100662112236023,
-0.5140994191169739,
0.7747483849525452,
0.0811883807182312,
-0.8959501385688782,
0.0346946120262146,
-0.11471392214298248,
-0.28033646941185,
0.3640025556087494,
-1.5490286350250244,
-0.3113863468170166,
-0.46637144684791565,
-0.48025816679000854,
-1.3158327341079712,
-0.09277397394180298,
1.477031946182251,
-0.8811659216880798,
-0.11265508830547333,
0.5000133514404297,
0.34475386142730713,
0.5816634893417358,
0.6765477061271667,
-0.6526204943656921,
-0.31299468874931335,
-0.35656073689460754,
-0.3041953146457672,
0.2468595951795578,
1.2376788854599,
-0.17015103995800018,
-0.9380091428756714,
0.7277180552482605,
-0.29680758714675903,
-0.00017470773309469223,
1.8582959175109863,
0.09704852104187012,
-0.776184618473053,
0.3113398551940918,
-0.7779821753501892,
1.9152404069900513,
1.697046160697937,
1.344191551208496,
-0.0480756014585495,
-0.9042385220527649,
0.5321057438850403,
-0.2413366138935089,
-0.3290403187274933,
0.9018976092338562,
0.49539852142333984,
-0.13106690347194672,
-1.3602756261825562,
0.6823021769523621,
1.2005374431610107,
-0.8262537121772766,
-0.7040219306945801,
0.025864217430353165,
-0.7741488218307495,
1.1356382369995117,
0.7408174276351929,
0.45708394050598145,
0.31105104088783264,
1.7006179094314575,
0.7355239987373352,
-0.5187736749649048,
0.4421524107456207,
0.49314504861831665,
-0.18419283628463745,
-2.1333374977111816,
-1.0428701639175415,
0.3144594728946686,
-0.3966769874095917,
-1.5437835454940796,
1.3891011476516724,
-1.0855597257614136,
-0.9689656496047974,
0.5913032293319702,
0.0674470067024231,
1.3505594730377197,
0.3614092767238617,
1.641823172569275,
2.075744152069092,
0.8657076954841614,
0.33542966842651367,
1.3033638000488281,
-0.10572239756584167,
-0.424446702003479,
1.8217103481292725,
-0.39372920989990234,
0.48405104875564575,
1.0175068378448486,
-0.4046916365623474,
-1.0959960222244263,
-0.8319867253303528,
-1.1643319129943848,
-0.6745188236236572,
1.133150339126587,
0.18383800983428955,
-1.1911969184875488,
0.2104787826538086,
1.66324782371521,
0.022380538284778595,
-0.26816853880882263,
0.5917943716049194,
0.4524576663970947,
-0.635184109210968,
-0.030081726610660553,
-1.0354636907577515,
0.46896666288375854,
-0.20109325647354126,
-0.35695338249206543,
0.2189645618200302,
0.5217006206512451,
1.220367193222046,
-0.1247570663690567,
0.1061764508485794,
1.2241543531417847,
-1.4074591398239136,
1.326066017150879,
-0.7582258582115173,
0.32644832134246826,
-2.3618085384368896,
1.3554738759994507,
-0.7447435855865479,
1.9473249912261963,
-2.6864066123962402,
0.420978307723999,
-0.6682580709457397,
-0.5296613574028015,
0.2769702970981598,
-0.4386754631996155,
0.1533525288105011,
-0.1897127330303192,
-1.0340933799743652,
-0.024011459201574326,
-0.7732996940612793,
0.5539966821670532,
1.0485719442367554,
1.2846477031707764,
-1.0527398586273193,
-0.32813817262649536,
-1.658342719078064,
-0.14474962651729584,
-0.6663639545440674,
0.25265392661094666,
-2.044299602508545,
-0.1689673513174057,
-2.01403546333313,
-2.353271484375,
-1.3629363775253296,
-0.8626251816749573,
1.0980150699615479,
0.05957860127091408,
-0.8775115013122559,
1.2337895631790161,
-0.40444666147232056,
-1.838894009590149,
1.1847100257873535,
-2.119076728820801
] |
https://github.com/huggingface/datasets/issues/5437
|
Can't load png dataset with 4 channel (RGBA)
|
Okay, I figured out what was wrong. When uploading my dataset via Google Drive, the images broke and Pillow couldn't open them. As a result, I solved the problem by downloading the ZIP archive
|
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
| 336 | 34 |
Can't load png dataset with 4 channel (RGBA)
I try to create dataset which contains about 9000 png images 64x64 in size, and they are all 4-channel (RGBA). When trying to use load_dataset() then a dataset is created from only 2 images. What exactly interferes I can not understand.
Okay, I figured out what was wrong. When uploading my dataset via Google Drive, the images broke and Pillow couldn't open them. As a result, I solved the problem by downloading the ZIP archive
|
[
-1.2401864528656006,
-0.8688899278640747,
-0.7866469621658325,
1.272190809249878,
-0.11216176301240921,
-1.2915141582489014,
0.022955317050218582,
-1.0840204954147339,
1.6528018712997437,
-0.8982943296432495,
0.29795533418655396,
-1.6130913496017456,
0.11101537942886353,
-0.5163525938987732,
-0.7229630351066589,
-0.8729957342147827,
-0.30606094002723694,
-0.8943800926208496,
1.0727649927139282,
2.581355571746826,
1.0927785634994507,
-1.3472915887832642,
2.808894157409668,
0.632777214050293,
-0.28095555305480957,
-1.1302937269210815,
0.603846549987793,
-0.08141081035137177,
-1.2621502876281738,
-0.4028473198413849,
-1.037437081336975,
0.09291008859872818,
-0.5612215399742126,
-0.5398613214492798,
0.03495078161358833,
0.2770431935787201,
-0.14787238836288452,
-0.3409033715724945,
-0.4869508743286133,
-0.7542679905891418,
0.5482206344604492,
-0.369625985622406,
0.9066208600997925,
-0.32847681641578674,
1.7883942127227783,
-0.4665270149707794,
0.398775577545166,
0.6187167763710022,
1.39219069480896,
0.15770509839057922,
-0.10109925270080566,
0.350229412317276,
0.40323203802108765,
0.007795455865561962,
0.32265031337738037,
1.1643990278244019,
0.6107741594314575,
0.5629266500473022,
0.7175188064575195,
-2.218183994293213,
1.3346003293991089,
-1.0350146293640137,
0.22596468031406403,
1.3140674829483032,
-0.9944649934768677,
0.37391331791877747,
-1.8053219318389893,
-0.11867120116949081,
0.4091969132423401,
-2.3296058177948,
0.17422887682914734,
-1.257534146308899,
-0.5225261449813843,
0.9511186480522156,
0.3223462402820587,
-1.3122836351394653,
0.11121660470962524,
-0.5231338739395142,
0.9408586025238037,
0.528131365776062,
1.1283360719680786,
-1.7491000890731812,
-0.005864116828888655,
-0.2569291889667511,
0.07728729397058487,
-1.3786875009536743,
-1.5346306562423706,
0.6615378856658936,
0.6693218350410461,
0.577839732170105,
-0.04651148244738579,
0.9499914646148682,
-1.0440101623535156,
0.8179008960723877,
-0.9091907739639282,
-1.6257363557815552,
-1.3164892196655273,
-2.330197811126709,
-2.259967803955078,
0.7845543622970581,
-0.5103070139884949,
-0.5428404211997986,
2.083162546157837,
-1.2031018733978271,
-1.7052487134933472,
1.2581108808517456,
0.1627783477306366,
0.03134628385305405,
2.421013832092285,
0.21624384820461273,
-0.788430392742157,
0.5327960848808289,
-0.7250823974609375,
0.8598836660385132,
-0.37109383940696716,
1.4624323844909668,
0.6221293807029724,
-0.9383746981620789,
1.701064944267273,
-0.3690577745437622,
0.48087650537490845,
-0.6222234964370728,
-0.5901634693145752,
-0.974014937877655,
0.40754273533821106,
1.934653639793396,
-0.2737588584423065,
1.57973313331604,
-0.3550499677658081,
-1.5421353578567505,
-1.4376425743103027,
0.8909642100334167,
0.7040499448776245,
-0.8574219942092896,
0.0997929722070694,
-0.38202914595603943,
0.06151774525642395,
0.16097454726696014,
1.1444745063781738,
1.2109276056289673,
0.7202308177947998,
-0.2987939417362213,
-1.030938744544983,
0.23641039431095123,
-0.15665510296821594,
-0.6904218792915344,
-1.8852850198745728,
-0.41640225052833557,
0.1358730047941208,
0.6948602199554443,
-1.2742040157318115,
1.7179715633392334,
0.94999098777771,
2.0299582481384277,
1.0208808183670044,
-0.36299169063568115,
1.4080013036727905,
0.004329554736614227,
1.8273038864135742,
-0.4323727488517761,
0.7538095116615295,
-0.2568325996398926,
-1.1959391832351685,
0.8042001724243164,
-0.3286084234714508,
-1.9450128078460693,
-0.7626088857650757,
-0.9217045903205872,
-0.2391609251499176,
-0.8002833127975464,
1.0058950185775757,
-0.4096132218837738,
-1.4081988334655762,
0.280244380235672,
-0.6022085547447205,
0.13755223155021667,
-1.3267192840576172,
0.31048643589019775,
0.7487264275550842,
-0.6571094393730164,
-0.00483583053573966,
-0.21820197999477386,
-1.3984850645065308,
-0.49583595991134644,
0.22834493219852448,
1.8886311054229736,
-0.7806726694107056,
1.0043563842773438,
1.0215243101119995,
-0.6257078051567078,
-0.08478876203298569,
0.33709946274757385,
-0.30948296189308167,
0.8990788459777832,
-1.0072484016418457,
-0.3816624581813812,
1.1434638500213623,
-0.21059143543243408,
-0.5908555388450623,
1.4518951177597046,
0.7016361951828003,
-0.9431613087654114,
-0.25153496861457825,
-0.24607671797275543,
-0.8898345232009888,
-0.015799440443515778,
-1.703125,
-0.17816056311130524,
0.36991000175476074,
-1.550389051437378,
-0.3284028470516205,
-0.1334323137998581,
1.2895450592041016,
-0.18785402178764343,
1.3231512308120728,
-0.42235249280929565,
-0.3131495416164398,
-0.4336845278739929,
-0.46263235807418823,
0.18865616619586945,
-0.10230018943548203,
-0.7143598794937134,
0.2837032079696655,
-0.8841872215270996,
0.323137491941452,
1.461035966873169,
0.41601186990737915,
0.09542352706193924,
0.55951327085495,
1.0578433275222778,
0.323799729347229,
-0.06268776953220367,
-0.8918759226799011,
-1.6233381032943726,
2.0997684001922607,
-1.559778094291687,
1.9633852243423462,
0.7437847256660461,
-0.10299182683229446,
-1.7470831871032715,
-1.7653931379318237,
1.4031598567962646,
1.2370555400848389,
2.302605152130127,
0.6118006110191345,
0.3959976136684418,
-0.721024751663208,
-0.7113534808158875,
0.40911343693733215,
-1.0570707321166992,
-0.8074795603752136,
0.12100517004728317,
2.2596194744110107,
1.6922796964645386,
-0.46075281500816345,
-0.12590640783309937,
-1.0503937005996704,
1.36943781375885,
-0.08001139014959335,
0.2526274025440216,
1.9528907537460327,
-0.3982681930065155,
-1.2228972911834717,
1.258621335029602,
-2.34391450881958,
0.1731209009885788,
1.9751276969909668,
0.3294249176979065,
0.01674734801054001,
-1.363579273223877,
-0.6467462778091431,
-0.21253955364227295,
-0.4399053156375885,
-1.2903918027877808,
0.6425445079803467,
-0.34082579612731934,
-0.909654974937439,
-1.4468690156936646,
0.03242889419198036,
-1.2397114038467407,
-1.7586156129837036,
0.4275977909564972,
1.830881118774414,
2.197903633117676,
-0.7063233852386475,
1.4849363565444946,
-0.1720322221517563,
0.2687207758426666,
1.0927448272705078,
1.1008778810501099,
3.067234754562378,
1.8369678258895874,
-1.214910626411438,
0.6623856425285339,
-0.1337919682264328,
-0.5529003143310547,
1.156318187713623,
-0.9981876611709595,
1.2652515172958374,
-0.14629048109054565,
-1.1554116010665894,
-1.2239391803741455,
0.9191514253616333,
0.39160972833633423,
0.06938940286636353,
-0.498592734336853,
1.2403196096420288,
0.09654561430215836,
1.1977990865707397,
0.5097602605819702,
-0.33880749344825745,
0.6233124136924744,
-0.4176962077617645,
-0.6600767374038696,
1.580620288848877,
0.13550978899002075,
-1.548988938331604,
-2.3197312355041504,
-0.32698556780815125,
-0.7521838545799255,
0.049831144511699677,
-0.6285592913627625,
-0.9891676902770996,
1.5869945287704468,
0.41546332836151123,
-1.2154865264892578,
-0.2455986887216568,
-0.3945576846599579,
-0.6203677654266357,
2.6289966106414795,
-1.3733114004135132,
-0.23772649466991425,
-0.9668678045272827,
-0.6080012917518616,
1.607917070388794,
-1.2578474283218384,
-0.12494195252656937,
-0.884168803691864,
-0.5807651281356812,
-1.4272234439849854,
-0.5669806599617004,
-0.09032732993364334,
-0.9114729166030884,
0.6217467188835144,
0.2095799595117569,
-1.005867600440979,
-0.2878073453903198,
-0.8351696729660034,
0.8327716588973999,
-0.12468130886554718,
0.2517010271549225,
1.816663384437561,
0.3188115656375885,
-0.33072614669799805,
0.6705724596977234,
1.1656731367111206,
0.6387977004051208,
-0.5327706336975098,
0.1199231967329979,
-0.7257943153381348,
0.36984193325042725,
-1.25355863571167,
0.36987459659576416,
-2.9671266078948975,
0.7005895972251892,
-0.08938819169998169,
-0.06999778002500534,
-0.027956444770097733,
-1.4035874605178833,
1.1146663427352905,
2.5845232009887695,
-1.2708171606063843,
0.5822741389274597,
0.31161293387413025,
1.1575084924697876,
-1.5400476455688477,
0.291778028011322,
-0.37715205550193787,
2.1276729106903076,
0.25141581892967224,
1.2064034938812256,
-0.4950428605079651,
-2.209228515625,
0.6351720690727234,
-1.1746854782104492,
-1.1364039182662964,
0.7185992002487183,
-0.8295687437057495,
0.15238355100154877,
-1.3184895515441895,
-0.17393268644809723,
-0.9905412793159485,
-1.1896052360534668,
0.6877263784408569,
0.20578868687152863,
0.47215840220451355,
-0.5400235652923584,
0.3524223864078522,
-2.1630959510803223,
-1.4154369831085205,
-0.16598035395145416,
-0.9787520170211792,
0.5030673146247864,
-0.25994905829429626,
0.6919398307800293,
-0.1429552584886551,
0.12707635760307312,
0.3425730764865875,
1.3899080753326416,
3.4924275875091553,
0.19672223925590515,
0.4277305603027344,
-0.10370087623596191,
-1.0279693603515625,
1.5379407405853271,
1.0031328201293945,
-0.010320765897631645,
-0.5876625180244446,
-0.9884495139122009,
1.3070647716522217,
1.9755668640136719,
0.8676227331161499,
0.0771479681134224,
-0.7341154217720032,
-0.5946048498153687,
0.04194943606853485,
0.21734213829040527,
0.48438170552253723,
0.988226592540741,
0.029401399195194244,
0.1841023713350296,
1.487807035446167,
1.133344054222107,
-0.5359177589416504,
0.43139412999153137,
-0.8534739017486572,
-0.44226935505867004,
0.44610968232154846,
0.33151933550834656,
-0.0604870580136776,
0.42702800035476685,
-0.9803045392036438,
-0.2437818944454193,
-0.23265908658504486,
-0.9690219163894653,
-0.6917616724967957,
-0.3491501212120056,
-0.3703486919403076,
1.5899120569229126,
0.07575498521327972,
-0.41776904463768005,
-0.028791777789592743,
-0.7840462923049927,
-0.12601366639137268,
-1.015133023262024,
0.22236929833889008,
-0.06357061862945557,
-0.09069333970546722,
-0.1482745260000229,
1.7733434438705444,
-0.8276169896125793,
-2.0773398876190186,
0.24121414124965668,
0.26280343532562256,
-0.3629618287086487,
0.18967433273792267,
1.6285535097122192,
0.48986712098121643,
1.4648778438568115,
1.3504692316055298,
0.9453824162483215,
-0.6523950099945068,
-1.328562617301941,
0.7720769643783569,
0.8272707462310791,
-1.4066802263259888,
0.8633854985237122,
-0.012585523538291454,
-0.4669700264930725,
0.7329579591751099,
1.3719805479049683,
0.4814656376838684,
-1.9272295236587524,
0.8102903962135315,
-0.9174235463142395,
0.7653822898864746,
0.7181388735771179,
0.7564451098442078,
0.20157913863658905,
0.9538964033126831,
-1.2285226583480835,
-1.139793038368225,
-0.8486437201499939,
-0.6816417574882507,
1.9459280967712402,
-0.2193319946527481,
0.5647069215774536,
-0.17815305292606354,
-1.2229094505310059,
-0.11980720609426498,
0.6267634630203247,
0.31464114785194397,
-0.2861224412918091,
0.8676901459693909,
-0.726778507232666,
-1.3058927059173584,
-1.4587534666061401,
-0.39509639143943787,
-0.9792914390563965,
-0.8998235464096069,
1.0543162822723389,
0.7061739563941956,
0.2790757417678833,
1.9836671352386475,
0.5757290124893188,
0.19518883526325226,
-2.662510633468628,
0.9050306081771851,
0.29147547483444214,
0.053453557193279266,
0.9042208194732666,
0.27323055267333984,
1.1278893947601318,
-0.07003332674503326,
0.5222682952880859,
-2.2246103286743164,
2.201223850250244,
-0.36535775661468506,
0.8397150039672852,
0.021297555416822433,
-0.07268518209457397,
1.054396629333496,
0.5495581030845642,
0.719350278377533,
-1.258621096611023,
0.7535458207130432,
-0.6620004177093506,
1.227129340171814,
0.9672488570213318,
-0.8546392321586609,
0.056934356689453125,
1.2511969804763794,
0.4867110252380371,
-0.5111091732978821,
-0.8554771542549133,
-0.911648690700531,
0.8450535535812378,
1.6927469968795776,
-0.13621306419372559,
0.03564266487956047,
0.7129095196723938,
0.6599423885345459,
-1.3459234237670898,
-0.02862762287259102,
-0.690700113773346,
-0.7092727422714233,
1.7033687829971313,
2.1057674884796143,
-0.1126885861158371,
-0.19786636531352997,
-0.6541892290115356,
-1.2805027961730957,
0.8499223589897156,
0.005108964629471302,
0.13818548619747162,
0.6506646275520325,
-0.6840223670005798,
1.1131508350372314,
0.8851431608200073,
0.8629018664360046,
0.16246429085731506,
0.21917188167572021,
0.31263670325279236,
-0.10511588305234909,
-1.0268250703811646,
-0.3031882643699646,
-1.1368314027786255,
-2.6299376487731934,
0.41717854142189026,
-0.3720490634441376,
-1.4484754800796509,
0.0819406732916832,
-1.00497567653656,
0.7949252128601074,
-0.5318397879600525,
-0.9400151968002319,
-1.437745213508606,
0.21646925806999207,
-0.15813522040843964,
0.818979024887085,
-1.6086479425430298,
-0.09366993606090546,
1.312138557434082,
0.9809088706970215,
-0.664761483669281,
1.1099114418029785,
0.2892504930496216,
0.9710213541984558,
0.770317018032074,
-0.4918219745159149,
0.546680212020874,
0.17725345492362976,
-1.3030213117599487,
0.46792545914649963,
1.1954891681671143,
0.19133135676383972,
1.351378321647644,
-0.45030638575553894,
0.03559928387403488,
0.4603167474269867,
-0.5379742980003357,
-0.44193950295448303,
-0.5355778932571411,
0.8479818105697632,
0.03474713861942291,
-0.8221228122711182,
0.037979550659656525,
-0.16678547859191895,
-0.28422269225120544,
0.3888430893421173,
-1.584468960762024,
-0.37644150853157043,
-0.4821912944316864,
-0.4696875810623169,
-1.313051700592041,
-0.14888714253902435,
1.4097764492034912,
-0.9099719524383545,
-0.1791197508573532,
0.4921654760837555,
0.439362108707428,
0.5843660831451416,
0.7046859264373779,
-0.6429915428161621,
-0.37859484553337097,
-0.281383216381073,
-0.3298993408679962,
0.31292638182640076,
1.2571091651916504,
-0.15353700518608093,
-0.975136935710907,
0.7476341724395752,
-0.24021248519420624,
-0.00005080271512269974,
1.877479076385498,
0.06126046180725098,
-0.821851372718811,
0.24079231917858124,
-0.7170273661613464,
1.880645513534546,
1.5705819129943848,
1.2841259241104126,
-0.09766346216201782,
-0.7879866361618042,
0.5783514380455017,
-0.16476558148860931,
-0.2718072533607483,
0.8848544359207153,
0.46557241678237915,
-0.1466224193572998,
-1.3655791282653809,
0.642673671245575,
1.2337814569473267,
-0.8395482301712036,
-0.7410364151000977,
-0.062014710158109665,
-0.8086392283439636,
1.160512924194336,
0.7366552948951721,
0.5034804344177246,
0.27734023332595825,
1.729536771774292,
0.722600519657135,
-0.5571051239967346,
0.39961403608322144,
0.49439194798469543,
-0.1930186152458191,
-2.153661012649536,
-0.9961573481559753,
0.2322419434785843,
-0.35954099893569946,
-1.5521446466445923,
1.3091018199920654,
-1.1111361980438232,
-0.8855739831924438,
0.5747050046920776,
0.11327303200960159,
1.3736944198608398,
0.3231811821460724,
1.6935157775878906,
1.990410566329956,
0.8890224695205688,
0.3051140308380127,
1.3212934732437134,
-0.10477229207754135,
-0.38687118887901306,
1.7635529041290283,
-0.3896869122982025,
0.47765153646469116,
1.0950078964233398,
-0.3732522130012512,
-1.027133822441101,
-0.7727334499359131,
-1.1221940517425537,
-0.5869594812393188,
1.0968092679977417,
0.20213152468204498,
-1.311153531074524,
0.14938953518867493,
1.5772912502288818,
0.12715423107147217,
-0.16666585206985474,
0.5567065477371216,
0.4787820279598236,
-0.6543571352958679,
-0.05637785419821739,
-0.9836491942405701,
0.4890897870063782,
-0.2757432460784912,
-0.37180227041244507,
0.25422903895378113,
0.5105391144752502,
1.1774183511734009,
-0.1257329285144806,
0.11660032719373703,
1.2359617948532104,
-1.4552059173583984,
1.2866299152374268,
-0.6845732927322388,
0.2848328649997711,
-2.301845073699951,
1.3366448879241943,
-0.7352625727653503,
2.0161712169647217,
-2.746521472930908,
0.38138580322265625,
-0.6884527802467346,
-0.5512098073959351,
0.2615034878253937,
-0.37491291761398315,
0.13618648052215576,
-0.260220468044281,
-0.9933562874794006,
-0.07048139721155167,
-0.7545990943908691,
0.5096684098243713,
1.1562408208847046,
1.2801471948623657,
-0.9199570417404175,
-0.2645485997200012,
-1.7300976514816284,
-0.17220255732536316,
-0.6363344788551331,
0.24582789838314056,
-2.104363203048706,
-0.1824359893798828,
-2.061923027038574,
-2.3572065830230713,
-1.3537812232971191,
-0.8548893332481384,
1.1810576915740967,
0.06502630561590195,
-0.808568000793457,
1.1406530141830444,
-0.34592145681381226,
-1.7777179479599,
1.121293067932129,
-2.1215667724609375
] |
https://github.com/huggingface/datasets/issues/5435
|
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
|
Thanks for reporting, @HaoyuYang59.
Please note that these are different "dataset" objects: our docs refer to Hugging Face `datasets.Dataset` and not to TensorFlow `tf.data.Dataset`.
Our `datasets.Dataset.shuffle` method does not have a `reshuffle_each_iteration` argument. Therefore, I would say the statement in our docs is True because they refer to `datasets.Dataset.shuffle`, `datasets.Dataset.skip` and `datasets.Dataset.take`.
I think this issue is restricted to TensorFlow dataset, and this would be addressed by them in the issue you opened in their repo: https://github.com/tensorflow/tensorflow/issues/59279
|
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
| 337 | 77 |
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
Thanks for reporting, @HaoyuYang59.
Please note that these are different "dataset" objects: our docs refer to Hugging Face `datasets.Dataset` and not to TensorFlow `tf.data.Dataset`.
Our `datasets.Dataset.shuffle` method does not have a `reshuffle_each_iteration` argument. Therefore, I would say the statement in our docs is True because they refer to `datasets.Dataset.shuffle`, `datasets.Dataset.skip` and `datasets.Dataset.take`.
I think this issue is restricted to TensorFlow dataset, and this would be addressed by them in the issue you opened in their repo: https://github.com/tensorflow/tensorflow/issues/59279
|
[
-1.1909445524215698,
-0.9180267453193665,
-0.6570744514465332,
1.3565850257873535,
-0.13932180404663086,
-1.3442559242248535,
0.1825108677148819,
-1.1079790592193604,
1.7494699954986572,
-0.7056476473808289,
0.19381839036941528,
-1.7175660133361816,
-0.045251257717609406,
-0.5596218109130859,
-0.7105062007904053,
-0.8823126554489136,
-0.4752587378025055,
-0.8313550353050232,
0.9548628330230713,
2.444882869720459,
1.2560529708862305,
-1.270516276359558,
2.6725752353668213,
0.6896598935127258,
-0.1731504648923874,
-0.9593309164047241,
0.5622150301933289,
0.041791580617427826,
-1.3728703260421753,
-0.3963627815246582,
-0.9384432435035706,
-0.04686389118432999,
-0.5125113725662231,
-0.5688557028770447,
0.09017373621463776,
0.34732145071029663,
-0.2890680730342865,
-0.37052005529403687,
-0.6037082076072693,
-0.7186899185180664,
0.40031301975250244,
-0.3335789144039154,
1.009560465812683,
-0.3640810251235962,
1.8614764213562012,
-0.5918472409248352,
0.500206470489502,
0.7250826954841614,
1.2578158378601074,
0.1676599234342575,
0.030915407463908195,
0.32368576526641846,
0.4254905879497528,
0.09442631900310516,
0.47792649269104004,
1.1433889865875244,
0.6506094336509705,
0.5148128271102905,
0.6828566193580627,
-2.2573487758636475,
1.2463364601135254,
-0.8958026766777039,
0.29865673184394836,
1.3671053647994995,
-0.920824408531189,
0.41629377007484436,
-1.733763337135315,
-0.05874362587928772,
0.6506786346435547,
-2.314688205718994,
0.16009944677352905,
-1.3965771198272705,
-0.563115119934082,
1.0246952772140503,
0.31348758935928345,
-1.1313824653625488,
0.17190079391002655,
-0.5106561779975891,
1.0063209533691406,
0.5409730076789856,
1.1824920177459717,
-1.7213748693466187,
-0.015668218955397606,
-0.2960509955883026,
0.1270483136177063,
-1.29933500289917,
-1.57698392868042,
0.6250556707382202,
0.8005769848823547,
0.6637362837791443,
-0.14704842865467072,
1.0057106018066406,
-0.9882588386535645,
0.7560581564903259,
-0.9374697208404541,
-1.8274158239364624,
-1.3977524042129517,
-2.2801871299743652,
-2.321746826171875,
0.7487276792526245,
-0.47315043210983276,
-0.4761824607849121,
2.057271957397461,
-1.0509518384933472,
-1.7959707975387573,
1.0397502183914185,
0.1936710625886917,
-0.030927831307053566,
2.3724420070648193,
0.1849115937948227,
-0.7137677669525146,
0.4169475734233856,
-0.6889017820358276,
0.6935771107673645,
-0.28981122374534607,
1.310699224472046,
0.4147511124610901,
-1.0419656038284302,
1.5475784540176392,
-0.4450515806674957,
0.5549550652503967,
-0.7429566383361816,
-0.5362478494644165,
-0.7414442896842957,
0.24801765382289886,
1.9069240093231201,
-0.34508419036865234,
1.6282647848129272,
-0.32522040605545044,
-1.6305737495422363,
-1.6143815517425537,
0.8020665049552917,
0.44491150975227356,
-0.7507994174957275,
-0.0051963478326797485,
-0.40472277998924255,
0.09035538882017136,
-0.04630529135465622,
1.206157922744751,
1.2246730327606201,
0.7516135573387146,
-0.3270888924598694,
-0.7902198433876038,
0.2281300276517868,
-0.05874352902173996,
-0.7609268426895142,
-1.7388479709625244,
-0.3246959447860718,
0.16325898468494415,
0.560879647731781,
-1.1747606992721558,
1.7189204692840576,
0.8110865354537964,
1.9676028490066528,
1.0220352411270142,
-0.3629263639450073,
1.4287292957305908,
0.10714917629957199,
1.8281606435775757,
-0.4868856966495514,
0.646518349647522,
-0.312581866979599,
-1.1215498447418213,
0.8304535150527954,
-0.33616626262664795,
-2.0126142501831055,
-0.6719062328338623,
-0.827236533164978,
-0.16131474077701569,
-0.7804011702537537,
0.883685827255249,
-0.19408003985881805,
-1.3710888624191284,
0.22168923914432526,
-0.717448353767395,
0.10193496197462082,
-1.2350316047668457,
0.28111180663108826,
0.8015804290771484,
-0.6796703934669495,
0.04062173515558243,
-0.28745460510253906,
-1.3540512323379517,
-0.4589788019657135,
0.3380458950996399,
1.8773396015167236,
-0.7378113865852356,
0.9218114018440247,
1.0485700368881226,
-0.7378438115119934,
0.04423099011182785,
0.29004889726638794,
-0.30305683612823486,
0.8559436202049255,
-1.0825670957565308,
-0.3130667209625244,
1.1949189901351929,
-0.20940904319286346,
-0.6410560607910156,
1.5054954290390015,
0.6682342886924744,
-1.0164437294006348,
-0.1937643438577652,
-0.16997040808200836,
-0.8407068252563477,
-0.013100150972604752,
-1.6090854406356812,
-0.11897197365760803,
0.331210196018219,
-1.5148210525512695,
-0.5563150644302368,
-0.25485658645629883,
1.3438522815704346,
-0.06016775965690613,
1.3592889308929443,
-0.26511943340301514,
-0.2891068160533905,
-0.4306006133556366,
-0.40519022941589355,
0.10942872613668442,
-0.24938619136810303,
-0.6402249932289124,
0.22689056396484375,
-0.840395450592041,
0.2989502251148224,
1.412941575050354,
0.27903005480766296,
0.007033752277493477,
0.593292236328125,
1.050672173500061,
0.34777241945266724,
-0.17192156612873077,
-0.8760685920715332,
-1.619210124015808,
2.003664016723633,
-1.3705083131790161,
1.8938403129577637,
0.677146852016449,
-0.0871320515871048,
-1.888437032699585,
-1.9157958030700684,
1.3329906463623047,
1.090247631072998,
2.3817543983459473,
0.5367558002471924,
0.4365846514701843,
-0.74958735704422,
-0.6705573797225952,
0.28730508685112,
-0.915441632270813,
-0.7993959188461304,
0.17880737781524658,
2.3410418033599854,
1.7831748723983765,
-0.597313404083252,
-0.1778191477060318,
-1.0258922576904297,
1.3178412914276123,
-0.1846078634262085,
0.13609479367733002,
2.0284953117370605,
-0.3212953209877014,
-0.9933574795722961,
1.3623398542404175,
-2.3147852420806885,
0.12584494054317474,
1.9929347038269043,
0.20418532192707062,
0.05922907590866089,
-1.3455431461334229,
-0.6652882695198059,
-0.3222193717956543,
-0.47005268931388855,
-1.2200219631195068,
0.5172170996665955,
-0.29292914271354675,
-0.8430814146995544,
-1.4740830659866333,
0.10240253806114197,
-1.0575517416000366,
-1.7019009590148926,
0.20541423559188843,
1.911703109741211,
1.9340107440948486,
-0.7967481017112732,
1.4145090579986572,
-0.2700413763523102,
0.13372161984443665,
1.2725672721862793,
1.2281711101531982,
3.1830058097839355,
2.033390998840332,
-1.2208082675933838,
0.7834463715553284,
-0.1415242850780487,
-0.43675950169563293,
1.1926209926605225,
-1.2130333185195923,
1.2444511651992798,
-0.32408735156059265,
-1.3629100322723389,
-1.2619755268096924,
1.0450692176818848,
0.553748607635498,
0.06295499950647354,
-0.5826209783554077,
1.3065824508666992,
-0.0010191621258854866,
1.3529648780822754,
0.5396087765693665,
-0.4360501170158386,
0.6643586158752441,
-0.424450546503067,
-0.5405820608139038,
1.5598797798156738,
0.251690536737442,
-1.4322818517684937,
-2.3015317916870117,
-0.2751692533493042,
-0.9126219749450684,
-0.014944247901439667,
-0.5985745787620544,
-0.9353091716766357,
1.6513878107070923,
0.4923062026500702,
-1.2598350048065186,
-0.30116963386535645,
-0.28756582736968994,
-0.5533641576766968,
2.74125337600708,
-1.3359897136688232,
-0.17724280059337616,
-1.0364181995391846,
-0.536250650882721,
1.717604637145996,
-1.2261911630630493,
-0.2444021999835968,
-1.0349299907684326,
-0.6438561677932739,
-1.3019359111785889,
-0.5474388003349304,
0.03299470245838165,
-0.9036151170730591,
0.8721999526023865,
0.06356465816497803,
-1.141088604927063,
-0.22215071320533752,
-0.9618444442749023,
0.9941936731338501,
-0.1570727825164795,
0.1738632768392563,
1.9605642557144165,
0.405410498380661,
-0.4408729374408722,
0.6099340319633484,
1.1160746812820435,
0.6027709245681763,
-0.7297173738479614,
0.17315788567066193,
-0.7525274753570557,
0.3670446574687958,
-1.4151586294174194,
0.21208348870277405,
-2.872623920440674,
0.5946660041809082,
-0.011783221736550331,
-0.010749551467597485,
0.03717704862356186,
-1.2808544635772705,
0.9928191900253296,
2.614314317703247,
-1.286407709121704,
0.46159106492996216,
0.35348746180534363,
1.1403905153274536,
-1.5217013359069824,
0.32442864775657654,
-0.4712887108325958,
2.062128782272339,
0.16018500924110413,
1.1827938556671143,
-0.38742944598197937,
-2.162341594696045,
0.6254804134368896,
-1.1971027851104736,
-1.1339868307113647,
0.8367886543273926,
-0.8946132063865662,
0.12044773250818253,
-1.3884005546569824,
-0.16869473457336426,
-0.7752931714057922,
-1.2838996648788452,
0.7502735257148743,
0.09689878672361374,
0.4606754779815674,
-0.5851923227310181,
0.3712349534034729,
-2.13480806350708,
-1.2949635982513428,
-0.2584758400917053,
-0.9902050495147705,
0.44377604126930237,
-0.2576543986797333,
0.7003069519996643,
-0.1752358078956604,
0.05234123021364212,
0.3445642292499542,
1.3195407390594482,
3.3892769813537598,
0.18826162815093994,
0.2186809629201889,
-0.11322393268346786,
-1.0165377855300903,
1.436525583267212,
0.9507696032524109,
-0.1724933236837387,
-0.5078871250152588,
-1.0432333946228027,
1.193125605583191,
1.9765444993972778,
1.0928480625152588,
0.11572467535734177,
-0.8906055688858032,
-0.7370571494102478,
0.14049728214740753,
0.2843462824821472,
0.528819739818573,
0.8947469592094421,
0.09385528415441513,
0.1579105705022812,
1.4251396656036377,
1.1906296014785767,
-0.23373691737651825,
0.4726259112358093,
-0.8744915723800659,
-0.5104187726974487,
0.47384804487228394,
0.3652726709842682,
0.07820869237184525,
0.345347136259079,
-1.0907033681869507,
-0.22382184863090515,
-0.375480055809021,
-0.9516803622245789,
-0.6830366253852844,
-0.415195494890213,
-0.29931628704071045,
1.5679810047149658,
0.05225419998168945,
-0.44921553134918213,
0.007336113601922989,
-0.7352023720741272,
-0.13214553892612457,
-1.0030606985092163,
0.43733638525009155,
-0.14441989362239838,
-0.047755591571331024,
-0.08626413345336914,
1.6833916902542114,
-0.951191782951355,
-2.065582513809204,
0.2791415750980377,
0.2336624562740326,
-0.4116418957710266,
0.21956992149353027,
1.6078070402145386,
0.5778796076774597,
1.4164479970932007,
1.3149096965789795,
1.0518473386764526,
-0.6083190441131592,
-1.336246132850647,
0.659254789352417,
0.9694528579711914,
-1.379381537437439,
0.8076488971710205,
-0.00539307901635766,
-0.6027448773384094,
0.6486620903015137,
1.2895234823226929,
0.36707791686058044,
-1.9416836500167847,
0.7818765640258789,
-0.8873727321624756,
0.7836663126945496,
0.7242090106010437,
0.8790242671966553,
0.1931711882352829,
0.8111262321472168,
-1.3286702632904053,
-1.154500961303711,
-0.71686190366745,
-0.6157302260398865,
1.9384835958480835,
-0.18619868159294128,
0.6005942225456238,
-0.2538551390171051,
-1.363856315612793,
-0.055502474308013916,
0.7424006462097168,
0.40234842896461487,
-0.5015576481819153,
0.8372745513916016,
-0.5940365791320801,
-1.0143349170684814,
-1.3285956382751465,
-0.41450485587120056,
-1.0851140022277832,
-0.8961138725280762,
1.003218650817871,
0.797585129737854,
0.3548440635204315,
1.8246084451675415,
0.5414791703224182,
0.3372880220413208,
-2.7002832889556885,
0.9336946606636047,
0.17172805964946747,
-0.08186051994562149,
0.8757428526878357,
0.294857919216156,
1.0275428295135498,
-0.05318194627761841,
0.5556408166885376,
-2.345008134841919,
2.245131492614746,
-0.22687016427516937,
0.6547767519950867,
0.02826090343296528,
-0.17303325235843658,
1.0324991941452026,
0.6219485402107239,
0.58571457862854,
-1.0368726253509521,
0.7599759101867676,
-0.5879142880439758,
1.1417326927185059,
0.9087907075881958,
-0.8848039507865906,
-0.02448049560189247,
1.3665865659713745,
0.541730523109436,
-0.4604630470275879,
-0.9480642676353455,
-1.0126382112503052,
0.9236246943473816,
1.7057440280914307,
-0.05763205140829086,
-0.010075601749122143,
0.9117758870124817,
0.6728163957595825,
-1.2805880308151245,
0.1545925736427307,
-0.7430344820022583,
-0.5977571606636047,
1.6523257493972778,
2.052513360977173,
-0.002102833241224289,
-0.19054633378982544,
-0.7578848600387573,
-1.1660716533660889,
0.7378867864608765,
0.01698300614953041,
0.06671673059463501,
0.7710774540901184,
-0.6494751572608948,
1.1090518236160278,
0.8156572580337524,
0.9744165539741516,
0.17852573096752167,
0.3239225447177887,
0.3653116822242737,
-0.35534030199050903,
-1.2448363304138184,
-0.2700749337673187,
-1.0167598724365234,
-2.4201135635375977,
0.45623907446861267,
-0.26847440004348755,
-1.4780104160308838,
0.0630168691277504,
-1.0794670581817627,
0.8961451053619385,
-0.6420184969902039,
-1.0982362031936646,
-1.5258166790008545,
0.2540331184864044,
-0.1311286836862564,
0.981652557849884,
-1.5149511098861694,
-0.0976390540599823,
1.230056881904602,
0.894976019859314,
-0.6668775677680969,
0.9784249663352966,
0.2626463770866394,
1.0292770862579346,
0.8494514226913452,
-0.3099724352359772,
0.49149253964424133,
0.11970081180334091,
-1.3489928245544434,
0.43111714720726013,
1.1051139831542969,
0.2294803261756897,
1.400424838066101,
-0.6053990125656128,
0.0026468606665730476,
0.4626973271369934,
-0.5125637054443359,
-0.38739198446273804,
-0.5308905839920044,
0.678466796875,
0.10558068752288818,
-0.899158239364624,
-0.04705439507961273,
-0.0827396959066391,
-0.1999235302209854,
0.19290465116500854,
-1.5261563062667847,
-0.15321369469165802,
-0.35474517941474915,
-0.5380966663360596,
-1.1791154146194458,
-0.010911086574196815,
1.4274754524230957,
-0.8739005923271179,
-0.1875557005405426,
0.572029709815979,
0.28416770696640015,
0.5747988820075989,
0.5976470708847046,
-0.6540317535400391,
-0.1975458413362503,
-0.26489147543907166,
-0.31375065445899963,
0.2402028888463974,
1.3924511671066284,
-0.14201419055461884,
-0.9988146424293518,
0.774829626083374,
-0.3889535665512085,
0.09751100838184357,
1.9628928899765015,
0.08835435658693314,
-0.7951562404632568,
0.24690832197666168,
-0.7185124158859253,
1.8315051794052124,
1.715955138206482,
1.4018983840942383,
-0.06359540671110153,
-0.9448999762535095,
0.4583863615989685,
-0.274872362613678,
-0.41142240166664124,
0.8971132040023804,
0.43815648555755615,
-0.20393754541873932,
-1.3555618524551392,
0.6718227863311768,
1.2638236284255981,
-0.9110762476921082,
-0.7848339080810547,
0.1602291613817215,
-0.8303247094154358,
1.0992132425308228,
0.7463189363479614,
0.41079649329185486,
0.21299444139003754,
1.5665435791015625,
0.7041685581207275,
-0.40640848875045776,
0.4467148780822754,
0.5153762102127075,
-0.14822731912136078,
-2.03020977973938,
-1.0913208723068237,
0.3134288489818573,
-0.5004390478134155,
-1.607251524925232,
1.3685628175735474,
-1.2473275661468506,
-0.9425456523895264,
0.4249154329299927,
0.14798875153064728,
1.4669007062911987,
0.3599337339401245,
1.6628313064575195,
2.1063976287841797,
0.9395102262496948,
0.3474234640598297,
1.3399227857589722,
-0.02826670929789543,
-0.37927913665771484,
1.7631020545959473,
-0.45443305373191833,
0.5749927163124084,
1.0459039211273193,
-0.379975289106369,
-1.0462929010391235,
-0.7538819909095764,
-1.2474077939987183,
-0.6029049754142761,
1.1690729856491089,
0.05709870159626007,
-1.0888757705688477,
0.2359650880098343,
1.5184526443481445,
0.10986047238111496,
-0.26860636472702026,
0.7105594277381897,
0.3835245966911316,
-0.796578586101532,
-0.054216280579566956,
-0.8660051822662354,
0.5167461037635803,
-0.20652882754802704,
-0.38602498173713684,
0.2814154326915741,
0.5006300806999207,
1.3239362239837646,
0.04363541305065155,
0.1617274284362793,
1.2798596620559692,
-1.3371177911758423,
1.5048638582229614,
-0.6379938125610352,
0.21560591459274292,
-2.452699661254883,
1.4191378355026245,
-0.7282929420471191,
1.8117088079452515,
-2.7014379501342773,
0.44130653142929077,
-0.5240710973739624,
-0.41615837812423706,
0.2862488031387329,
-0.36701837182044983,
0.09629727154970169,
-0.17691493034362793,
-1.1698765754699707,
-0.0562773197889328,
-0.7539107203483582,
0.5790339112281799,
1.0967053174972534,
1.4479817152023315,
-1.153788447380066,
-0.3351592719554901,
-1.829822063446045,
-0.1828499287366867,
-0.7604997754096985,
0.4040544033050537,
-1.872033953666687,
-0.14349475502967834,
-1.8980339765548706,
-2.573784589767456,
-1.3331773281097412,
-0.7879759073257446,
1.0695395469665527,
0.07559729367494583,
-0.9739192724227905,
1.1990715265274048,
-0.4524533450603485,
-1.8390294313430786,
1.079174518585205,
-2.2664668560028076
] |
https://github.com/huggingface/datasets/issues/5435
|
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
|
Also note that you are referring to an outdated documentation page: datasets 1.10.2 version
Current datasets version is 2.8.0 and the corresponding documentation page is: https://huggingface.co/docs/datasets/stream#split-dataset
|
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
| 337 | 26 |
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
Also note that you are referring to an outdated documentation page: datasets 1.10.2 version
Current datasets version is 2.8.0 and the corresponding documentation page is: https://huggingface.co/docs/datasets/stream#split-dataset
|
[
-1.1905205249786377,
-0.9313532114028931,
-0.6946508884429932,
1.361343264579773,
-0.11745374649763107,
-1.321941614151001,
0.13184931874275208,
-1.0772746801376343,
1.7131266593933105,
-0.6895366311073303,
0.1830805540084839,
-1.7229007482528687,
-0.07875096797943115,
-0.5333200693130493,
-0.6898625493049622,
-0.8756119608879089,
-0.4544347822666168,
-0.8675976991653442,
0.9557850360870361,
2.4647414684295654,
1.2740246057510376,
-1.291819453239441,
2.687809467315674,
0.6883327960968018,
-0.19228792190551758,
-0.9645372629165649,
0.5685961842536926,
0.026538271456956863,
-1.3748219013214111,
-0.4190332591533661,
-0.919941782951355,
-0.015176907181739807,
-0.5020381212234497,
-0.509645402431488,
0.10008049756288528,
0.3312412202358246,
-0.2683172821998596,
-0.34212926030158997,
-0.5978736281394958,
-0.7300588488578796,
0.39952874183654785,
-0.3173087537288666,
0.9835591912269592,
-0.34657567739486694,
1.8294233083724976,
-0.5692699551582336,
0.486446350812912,
0.7374781370162964,
1.2453840970993042,
0.14710500836372375,
0.04222160950303078,
0.3410646319389343,
0.4144650399684906,
0.08585940301418304,
0.49983394145965576,
1.1772249937057495,
0.6595289707183838,
0.4944342374801636,
0.6582902669906616,
-2.258432149887085,
1.260810375213623,
-0.8900037407875061,
0.29388681054115295,
1.3696037530899048,
-0.9252649545669556,
0.4122583866119385,
-1.7410629987716675,
-0.05990605801343918,
0.662851870059967,
-2.3255808353424072,
0.14977610111236572,
-1.3833385705947876,
-0.563377320766449,
1.0299302339553833,
0.29298707842826843,
-1.1438122987747192,
0.16547897458076477,
-0.5300907492637634,
0.9981911778450012,
0.5455889701843262,
1.1925688982009888,
-1.7233117818832397,
-0.031067976728081703,
-0.27429676055908203,
0.0904005616903305,
-1.3155035972595215,
-1.5753642320632935,
0.6088930368423462,
0.8047992587089539,
0.6532471776008606,
-0.143623948097229,
0.9906759858131409,
-0.9671159386634827,
0.7648946642875671,
-0.9087501168251038,
-1.834720492362976,
-1.418279767036438,
-2.3190574645996094,
-2.298501491546631,
0.7567642331123352,
-0.4877322316169739,
-0.4744409918785095,
2.078674554824829,
-1.053040623664856,
-1.795601487159729,
1.0420974493026733,
0.20842674374580383,
-0.007298251613974571,
2.386258602142334,
0.20053896307945251,
-0.7360323071479797,
0.42713549733161926,
-0.681006908416748,
0.7201862335205078,
-0.30952879786491394,
1.2935553789138794,
0.4323103725910187,
-1.034744381904602,
1.5552860498428345,
-0.4621693193912506,
0.5279955863952637,
-0.7256580591201782,
-0.5719524621963501,
-0.7534108757972717,
0.22861617803573608,
1.8961349725723267,
-0.3449769914150238,
1.6310663223266602,
-0.3231687545776367,
-1.6068791151046753,
-1.6118539571762085,
0.7610298991203308,
0.45152565836906433,
-0.7650343775749207,
-0.007153227459639311,
-0.41546472907066345,
0.08813374489545822,
-0.02714345045387745,
1.1836646795272827,
1.2138334512710571,
0.7043724656105042,
-0.3384920060634613,
-0.8290722370147705,
0.24831470847129822,
-0.056514155119657516,
-0.7477057576179504,
-1.7400981187820435,
-0.32304808497428894,
0.17656585574150085,
0.5636191368103027,
-1.2201433181762695,
1.7078558206558228,
0.8368164896965027,
1.9866440296173096,
1.0219733715057373,
-0.3589087724685669,
1.4370132684707642,
0.12011440843343735,
1.8001787662506104,
-0.4955500364303589,
0.64146888256073,
-0.3174278140068054,
-1.1054192781448364,
0.8408944010734558,
-0.3571731746196747,
-1.9989874362945557,
-0.684055745601654,
-0.8350023627281189,
-0.15539991855621338,
-0.7797853350639343,
0.9028931260108948,
-0.20551088452339172,
-1.3410474061965942,
0.22479850053787231,
-0.7225989699363708,
0.10734689235687256,
-1.258406162261963,
0.25496864318847656,
0.8039713501930237,
-0.6685282588005066,
0.009135406464338303,
-0.3068835139274597,
-1.350395917892456,
-0.45796480774879456,
0.3479669690132141,
1.8759682178497314,
-0.7103692889213562,
0.9422473311424255,
1.0366612672805786,
-0.7305963039398193,
0.06900569796562195,
0.2676765024662018,
-0.3039763271808624,
0.8818440437316895,
-1.0546602010726929,
-0.3185137212276459,
1.1804438829421997,
-0.19653645157814026,
-0.6611630916595459,
1.5142987966537476,
0.6709964871406555,
-1.0156054496765137,
-0.2481946349143982,
-0.16788974404335022,
-0.8591039776802063,
-0.027719862759113312,
-1.6152492761611938,
-0.12274202704429626,
0.30056729912757874,
-1.5318679809570312,
-0.5215948224067688,
-0.2378787398338318,
1.3665423393249512,
-0.05696941912174225,
1.3630671501159668,
-0.26396703720092773,
-0.2507295310497284,
-0.43429136276245117,
-0.42268452048301697,
0.11391693353652954,
-0.24641498923301697,
-0.642457902431488,
0.2576998472213745,
-0.8727141618728638,
0.26768845319747925,
1.4167321920394897,
0.32290613651275635,
0.0018010186031460762,
0.5917930603027344,
1.033731460571289,
0.354986310005188,
-0.18177878856658936,
-0.8629258871078491,
-1.6229594945907593,
2.0283167362213135,
-1.3567887544631958,
1.8796308040618896,
0.7211751937866211,
-0.09007518738508224,
-1.8920978307724,
-1.9240397214889526,
1.3045270442962646,
1.0805944204330444,
2.3736319541931152,
0.5372369885444641,
0.4748489558696747,
-0.7487667798995972,
-0.7025971412658691,
0.2928173840045929,
-0.9040651917457581,
-0.8096950650215149,
0.1535569727420807,
2.353954315185547,
1.7756277322769165,
-0.5616621971130371,
-0.16058218479156494,
-1.014177680015564,
1.3149752616882324,
-0.18288955092430115,
0.12913644313812256,
2.0340442657470703,
-0.301420122385025,
-0.9850204586982727,
1.3577427864074707,
-2.3291380405426025,
0.16314202547073364,
2.0062131881713867,
0.2279767096042633,
0.061328575015068054,
-1.3791425228118896,
-0.6805815696716309,
-0.3254353702068329,
-0.4777790307998657,
-1.1906318664550781,
0.5558285117149353,
-0.29384514689445496,
-0.8698713183403015,
-1.4800102710723877,
0.06365936994552612,
-1.0765255689620972,
-1.737324833869934,
0.2353229820728302,
1.9163602590560913,
1.9428831338882446,
-0.8123858571052551,
1.4078586101531982,
-0.26692068576812744,
0.10261360555887222,
1.2695332765579224,
1.2357922792434692,
3.184443712234497,
2.032923698425293,
-1.2406121492385864,
0.7770889401435852,
-0.11892333626747131,
-0.4467998147010803,
1.1847695112228394,
-1.2067396640777588,
1.2262463569641113,
-0.31999728083610535,
-1.3746652603149414,
-1.2401515245437622,
1.0699009895324707,
0.539470374584198,
0.05200747400522232,
-0.6124180555343628,
1.316104769706726,
-0.027851222082972527,
1.349003553390503,
0.5421464443206787,
-0.44914621114730835,
0.6373288035392761,
-0.43887463212013245,
-0.5479822158813477,
1.5573400259017944,
0.22222396731376648,
-1.4581332206726074,
-2.3104846477508545,
-0.25915324687957764,
-0.8856080174446106,
-0.035357870161533356,
-0.6302850842475891,
-0.9362630844116211,
1.6279549598693848,
0.4980900287628174,
-1.286807656288147,
-0.32806897163391113,
-0.2990720868110657,
-0.5503852367401123,
2.6933176517486572,
-1.3696154356002808,
-0.15838667750358582,
-1.054560661315918,
-0.5041208863258362,
1.689188003540039,
-1.2406315803527832,
-0.2293175756931305,
-1.0115604400634766,
-0.667137861251831,
-1.3024529218673706,
-0.5326275825500488,
0.009951269254088402,
-0.9013874530792236,
0.8486825227737427,
0.04509042203426361,
-1.0962920188903809,
-0.18934595584869385,
-0.9469565749168396,
1.0023304224014282,
-0.13529306650161743,
0.16746720671653748,
1.9376168251037598,
0.3942038118839264,
-0.43625468015670776,
0.6060540676116943,
1.1202424764633179,
0.6197768449783325,
-0.7418863773345947,
0.13734745979309082,
-0.7455861568450928,
0.39604440331459045,
-1.4272522926330566,
0.20955237746238708,
-2.886789083480835,
0.5900565981864929,
-0.0265725739300251,
0.006376881152391434,
0.026689913123846054,
-1.2515958547592163,
1.0184167623519897,
2.579057455062866,
-1.2748790979385376,
0.46093323826789856,
0.35909149050712585,
1.1273704767227173,
-1.54811429977417,
0.3446408808231354,
-0.49354061484336853,
2.0624496936798096,
0.13894593715667725,
1.1947439908981323,
-0.38238832354545593,
-2.114473819732666,
0.6235738396644592,
-1.188794732093811,
-1.0880870819091797,
0.823197066783905,
-0.8910070657730103,
0.14934319257736206,
-1.3979538679122925,
-0.1572200357913971,
-0.7620124816894531,
-1.272446870803833,
0.7497814297676086,
0.11242078244686127,
0.4499067962169647,
-0.5723288655281067,
0.3668420910835266,
-2.1495556831359863,
-1.312687635421753,
-0.23293644189834595,
-0.9910996556282043,
0.48584824800491333,
-0.2900139093399048,
0.6924587488174438,
-0.15260252356529236,
0.062809057533741,
0.32191166281700134,
1.289926290512085,
3.393045425415039,
0.18778544664382935,
0.22295287251472473,
-0.10200732946395874,
-1.0311492681503296,
1.4381015300750732,
0.9597362279891968,
-0.16113132238388062,
-0.517849862575531,
-1.0564663410186768,
1.244375228881836,
1.9818857908248901,
1.082454800605774,
0.14306703209877014,
-0.8965487480163574,
-0.7527434825897217,
0.13836759328842163,
0.2822328209877014,
0.5461095571517944,
0.9267080426216125,
0.07186536490917206,
0.18956220149993896,
1.4610166549682617,
1.2106331586837769,
-0.19883808493614197,
0.5028442740440369,
-0.9009393453598022,
-0.5009176731109619,
0.445252925157547,
0.35455188155174255,
0.06598915159702301,
0.379397451877594,
-1.1205235719680786,
-0.2378329336643219,
-0.3464728891849518,
-0.9374802708625793,
-0.6978347897529602,
-0.3936488628387451,
-0.3217774033546448,
1.566778302192688,
0.06405530124902725,
-0.4528294801712036,
0.01828286424279213,
-0.7300696969032288,
-0.14663353562355042,
-1.031965732574463,
0.44904688000679016,
-0.13340094685554504,
-0.01609145663678646,
-0.11268492043018341,
1.6859591007232666,
-0.9654006958007812,
-2.0834391117095947,
0.2718712389469147,
0.25925371050834656,
-0.40110909938812256,
0.1950232982635498,
1.6277012825012207,
0.5730650424957275,
1.400641918182373,
1.291941523551941,
1.0300111770629883,
-0.5986719131469727,
-1.3155596256256104,
0.6517938375473022,
0.9761419892311096,
-1.3720757961273193,
0.8212841749191284,
-0.05523022264242172,
-0.6132171750068665,
0.6494541764259338,
1.2925370931625366,
0.3639412224292755,
-1.9257383346557617,
0.8148872256278992,
-0.8502376079559326,
0.7883217334747314,
0.7146747708320618,
0.896653413772583,
0.19134360551834106,
0.7968323230743408,
-1.3787647485733032,
-1.1400337219238281,
-0.7035203576087952,
-0.6014345288276672,
1.9331153631210327,
-0.1807921826839447,
0.5965561866760254,
-0.2549908757209778,
-1.3654268980026245,
-0.07741332799196243,
0.7440525889396667,
0.3805609941482544,
-0.47974893450737,
0.8455380797386169,
-0.569345235824585,
-1.0302870273590088,
-1.3385204076766968,
-0.3888258934020996,
-1.0672550201416016,
-0.8707537651062012,
1.0039623975753784,
0.8128671646118164,
0.361054927110672,
1.8553686141967773,
0.49387234449386597,
0.3307611048221588,
-2.713128089904785,
0.929778516292572,
0.18034595251083374,
-0.07613851875066757,
0.8972839713096619,
0.27090421319007874,
1.0520555973052979,
-0.014157315716147423,
0.5509013533592224,
-2.304563283920288,
2.221569299697876,
-0.2360798418521881,
0.6705787181854248,
0.03702552244067192,
-0.14697587490081787,
1.0463597774505615,
0.6263744831085205,
0.6356770396232605,
-1.0463874340057373,
0.776766300201416,
-0.588679313659668,
1.1296911239624023,
0.9230168461799622,
-0.8950021266937256,
-0.026237772777676582,
1.383064866065979,
0.5219714045524597,
-0.4643048048019409,
-0.9491451978683472,
-0.9747358560562134,
0.9382684230804443,
1.7117879390716553,
-0.028722034767270088,
0.016884274780750275,
0.9028171896934509,
0.6590930819511414,
-1.2944728136062622,
0.14945080876350403,
-0.7211055755615234,
-0.5935834646224976,
1.6507365703582764,
2.0594613552093506,
-0.006624145433306694,
-0.19652515649795532,
-0.7548134326934814,
-1.1757755279541016,
0.7367785573005676,
-0.002125789877027273,
0.06714438647031784,
0.8081673383712769,
-0.6479463577270508,
1.1087862253189087,
0.7719407677650452,
0.9885535836219788,
0.117904432117939,
0.3201678991317749,
0.3437422811985016,
-0.3420388400554657,
-1.2510615587234497,
-0.27624690532684326,
-1.0167226791381836,
-2.4149889945983887,
0.44546785950660706,
-0.26869314908981323,
-1.456484317779541,
0.039350543171167374,
-1.094127893447876,
0.9013673663139343,
-0.6591241359710693,
-1.0988194942474365,
-1.5296568870544434,
0.24861830472946167,
-0.16539710760116577,
0.9643861651420593,
-1.5247873067855835,
-0.1155591830611229,
1.2290234565734863,
0.9124510288238525,
-0.6225390434265137,
1.004469394683838,
0.2595546245574951,
1.0061299800872803,
0.8245444893836975,
-0.28872498869895935,
0.4860696792602539,
0.14707058668136597,
-1.3346006870269775,
0.42977964878082275,
1.122005820274353,
0.2704801857471466,
1.4003357887268066,
-0.6169943809509277,
0.025786709040403366,
0.48386600613594055,
-0.49898427724838257,
-0.36626705527305603,
-0.526695191860199,
0.68682461977005,
0.10464934259653091,
-0.9279994368553162,
-0.06947789341211319,
-0.11302667111158371,
-0.19677993655204773,
0.18818295001983643,
-1.5153731107711792,
-0.16689112782478333,
-0.34864962100982666,
-0.5109816193580627,
-1.2271533012390137,
0.010042177513241768,
1.4184844493865967,
-0.9008252620697021,
-0.18695852160453796,
0.5512654781341553,
0.3071954846382141,
0.5913744568824768,
0.6237034797668457,
-0.6326348781585693,
-0.20499688386917114,
-0.2658529281616211,
-0.27260497212409973,
0.23709285259246826,
1.3381391763687134,
-0.13058969378471375,
-1.0179201364517212,
0.7704144716262817,
-0.403389573097229,
0.11349663883447647,
1.992080569267273,
0.06562768667936325,
-0.7700333595275879,
0.2791002094745636,
-0.7017684578895569,
1.8266969919204712,
1.7001255750656128,
1.4152668714523315,
-0.04092894494533539,
-0.927568793296814,
0.45019155740737915,
-0.245780348777771,
-0.4063381850719452,
0.9007381796836853,
0.4447808265686035,
-0.19627314805984497,
-1.3842562437057495,
0.6300829648971558,
1.2373725175857544,
-0.941140353679657,
-0.7560898661613464,
0.14857447147369385,
-0.8456453680992126,
1.1058180332183838,
0.7331039309501648,
0.4124876856803894,
0.20327964425086975,
1.5330853462219238,
0.6938445568084717,
-0.45081111788749695,
0.4328005015850067,
0.5171304941177368,
-0.16552937030792236,
-2.029003858566284,
-1.0660840272903442,
0.3146999776363373,
-0.4773407280445099,
-1.5920766592025757,
1.348449468612671,
-1.2299325466156006,
-0.9288375377655029,
0.42603799700737,
0.14073780179023743,
1.4504587650299072,
0.32822296023368835,
1.6860721111297607,
2.1123046875,
0.9486903548240662,
0.3247978091239929,
1.3378331661224365,
-0.05034136399626732,
-0.33864104747772217,
1.7585842609405518,
-0.44289469718933105,
0.5858283638954163,
1.0216636657714844,
-0.4076370298862457,
-1.0482151508331299,
-0.7380053400993347,
-1.2407536506652832,
-0.5916364192962646,
1.1693305969238281,
0.07087442278862,
-1.0765043497085571,
0.21945294737815857,
1.5131239891052246,
0.10898080468177795,
-0.23567798733711243,
0.7086302042007446,
0.40342703461647034,
-0.7756291031837463,
-0.08007784187793732,
-0.8862655162811279,
0.5287254452705383,
-0.2001463770866394,
-0.3822145462036133,
0.2517840266227722,
0.482635498046875,
1.3214061260223389,
0.04779931157827377,
0.15826788544654846,
1.3100999593734741,
-1.3257473707199097,
1.5214416980743408,
-0.6378330588340759,
0.2245679795742035,
-2.4417707920074463,
1.42606520652771,
-0.7246193885803223,
1.8088001012802124,
-2.6847927570343018,
0.42654600739479065,
-0.5534636974334717,
-0.4207724332809448,
0.28558143973350525,
-0.3701145052909851,
0.1076309010386467,
-0.192406564950943,
-1.1126768589019775,
-0.07118633389472961,
-0.7509201169013977,
0.5746222734451294,
1.105584740638733,
1.4467504024505615,
-1.1589139699935913,
-0.3203161656856537,
-1.8426833152770996,
-0.19916102290153503,
-0.7981398701667786,
0.41684967279434204,
-1.8882503509521484,
-0.14110273122787476,
-1.9033050537109375,
-2.5639548301696777,
-1.361446738243103,
-0.7950928211212158,
1.0588502883911133,
0.088730089366436,
-0.9993615746498108,
1.1868531703948975,
-0.4301052391529083,
-1.8128138780593872,
1.0604881048202515,
-2.2752768993377686
] |
https://github.com/huggingface/datasets/issues/5435
|
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
|
Hi @albertvillanova thanks for your reply and your explaination here.
Sorry for the confusion as I'm not actually a user of your repo and I just happen to find the thread by Google (and didn't read carefully).
Great to know that and you made everything very clear now.
Thanks for your time and sorry for the consusion.
Wishing you a wonderful time.
Regards
|
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
| 337 | 63 |
Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples could come from other shards. In this case it only uses the shuffle buffer. Therefore it is advised to shuffle the dataset before splitting using take or skip. See more details in the [Shuffling the dataset: shuffle](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#iterable-dataset-shuffling) section.`
>> \# You can also create splits from a shuffled dataset
>> train_dataset = shuffled_dataset.skip(1000)
>> eval_dataset = shuffled_dataset.take(1000)
Where the shuffled dataset comes from:
`shuffled_dataset = dataset.shuffle(buffer_size=10_000, seed=42)`
At least in Tensorflow 2.9/2.10/2.11, [docs](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle) states the `reshuffle_each_iteration` argument is `True` by default. This means the dataset would be shuffled after each epoch, and as a result **the validation data would leak into training test**.
### Steps to reproduce the bug
N/A
### Expected behavior
The `reshuffle_each_iteration` argument should be set to `False`.
### Environment info
Tensorflow 2.9/2.10/2.11
Hi @albertvillanova thanks for your reply and your explaination here.
Sorry for the confusion as I'm not actually a user of your repo and I just happen to find the thread by Google (and didn't read carefully).
Great to know that and you made everything very clear now.
Thanks for your time and sorry for the consusion.
Wishing you a wonderful time.
Regards
|
[
-1.239044189453125,
-0.9613012671470642,
-0.6822177171707153,
1.3689988851547241,
-0.1253994107246399,
-1.336166262626648,
0.13282009959220886,
-1.119757890701294,
1.6800132989883423,
-0.725843071937561,
0.20270109176635742,
-1.6984111070632935,
-0.028832409530878067,
-0.5352584719657898,
-0.710246741771698,
-0.8726413249969482,
-0.44423267245292664,
-0.8537946343421936,
0.9720770120620728,
2.45672607421875,
1.2818706035614014,
-1.296464443206787,
2.7056057453155518,
0.7003814578056335,
-0.173379585146904,
-0.997096836566925,
0.5517935752868652,
0.019032061100006104,
-1.3619221448898315,
-0.43145138025283813,
-0.9572601318359375,
-0.03320731222629547,
-0.500402569770813,
-0.5322834253311157,
0.08178519457578659,
0.35952574014663696,
-0.24363920092582703,
-0.37527361512184143,
-0.6025728583335876,
-0.7237380146980286,
0.4202527403831482,
-0.3191913366317749,
0.9897974729537964,
-0.32750171422958374,
1.8504770994186401,
-0.5776556730270386,
0.4973292350769043,
0.7119304537773132,
1.275259256362915,
0.15434759855270386,
0.016055651009082794,
0.33486780524253845,
0.4338113069534302,
0.04619638994336128,
0.4873233735561371,
1.1730631589889526,
0.6628035306930542,
0.5188241004943848,
0.6882068514823914,
-2.2416205406188965,
1.2668743133544922,
-0.9189637303352356,
0.2929651737213135,
1.3658506870269775,
-0.9537887573242188,
0.44433367252349854,
-1.7355139255523682,
-0.05583067610859871,
0.648690402507782,
-2.313009023666382,
0.1450316607952118,
-1.367641568183899,
-0.5624563694000244,
1.0138781070709229,
0.2796555757522583,
-1.1774901151657104,
0.1748526692390442,
-0.5386635065078735,
1.0270432233810425,
0.5303633809089661,
1.1491411924362183,
-1.7150148153305054,
-0.03176278620958328,
-0.2855750620365143,
0.1136314645409584,
-1.3129510879516602,
-1.596496343612671,
0.61326003074646,
0.8147480487823486,
0.6221430897712708,
-0.10507503151893616,
1.0161235332489014,
-1.0032955408096313,
0.7986109256744385,
-0.9285767078399658,
-1.7874614000320435,
-1.3980655670166016,
-2.30916166305542,
-2.299037456512451,
0.7670355439186096,
-0.48267775774002075,
-0.495476633310318,
2.0735225677490234,
-1.0676143169403076,
-1.807892918586731,
1.0412571430206299,
0.18565736711025238,
0.0017461543902754784,
2.4194090366363525,
0.17947101593017578,
-0.7464938759803772,
0.4460606575012207,
-0.6644655466079712,
0.7160034775733948,
-0.36174529790878296,
1.3032574653625488,
0.41314470767974854,
-0.9970661401748657,
1.56764554977417,
-0.454508513212204,
0.532904863357544,
-0.734885573387146,
-0.5581709742546082,
-0.7579624652862549,
0.2806541919708252,
1.9414101839065552,
-0.3497672975063324,
1.6075050830841064,
-0.3392978608608246,
-1.6119384765625,
-1.6222293376922607,
0.7840749025344849,
0.4246181547641754,
-0.7908664345741272,
0.017819669097661972,
-0.3937457799911499,
0.08478518575429916,
-0.010522518306970596,
1.1556051969528198,
1.2520604133605957,
0.7237319350242615,
-0.31815552711486816,
-0.818496584892273,
0.24906261265277863,
-0.06822304427623749,
-0.7298964262008667,
-1.7379809617996216,
-0.3118339776992798,
0.1553546041250229,
0.5895547866821289,
-1.190934419631958,
1.711964726448059,
0.8477925658226013,
1.9697706699371338,
1.0467594861984253,
-0.3284156620502472,
1.4618200063705444,
0.10924933850765228,
1.8169406652450562,
-0.49706441164016724,
0.6530361175537109,
-0.3245146572589874,
-1.0996817350387573,
0.8062707781791687,
-0.3606933057308197,
-1.9768736362457275,
-0.6520999073982239,
-0.8210001587867737,
-0.13687394559383392,
-0.783209502696991,
0.897808313369751,
-0.21308524906635284,
-1.3679026365280151,
0.23223066329956055,
-0.7212928533554077,
0.12699700891971588,
-1.2388098239898682,
0.2768847942352295,
0.8031809329986572,
-0.6732792258262634,
0.05148850008845329,
-0.29889652132987976,
-1.3431950807571411,
-0.4635813236236572,
0.3530575931072235,
1.875014305114746,
-0.7383434176445007,
0.8960853815078735,
1.02994704246521,
-0.7022880911827087,
0.06184709072113037,
0.3059661090373993,
-0.2874355912208557,
0.8785094618797302,
-1.0802841186523438,
-0.3242112696170807,
1.1918590068817139,
-0.21057818830013275,
-0.63817298412323,
1.4977068901062012,
0.6845074892044067,
-0.9939914345741272,
-0.2310459166765213,
-0.14797528088092804,
-0.8665688037872314,
-0.02635784074664116,
-1.6303223371505737,
-0.11417374014854431,
0.30658236145973206,
-1.5647627115249634,
-0.5307791233062744,
-0.24588893353939056,
1.3428049087524414,
-0.06260687857866287,
1.4183167219161987,
-0.29972025752067566,
-0.2645983099937439,
-0.3878779411315918,
-0.4003043472766876,
0.13603200018405914,
-0.27121660113334656,
-0.6049388647079468,
0.20676715672016144,
-0.8587440252304077,
0.2825016379356384,
1.4418185949325562,
0.29694226384162903,
0.013422657735645771,
0.5845295786857605,
1.0637751817703247,
0.33307909965515137,
-0.17170976102352142,
-0.8503457307815552,
-1.6055368185043335,
2.036836862564087,
-1.3844925165176392,
1.9136296510696411,
0.7264954447746277,
-0.09973075240850449,
-1.9027587175369263,
-1.9058592319488525,
1.3293960094451904,
1.1180654764175415,
2.3518826961517334,
0.5358372330665588,
0.4540981650352478,
-0.7931809425354004,
-0.6684236526489258,
0.30027157068252563,
-0.9204575419425964,
-0.8269093036651611,
0.1488446146249771,
2.341665744781494,
1.787063479423523,
-0.5774675607681274,
-0.20987042784690857,
-1.0108320713043213,
1.3308802843093872,
-0.17129993438720703,
0.1461506187915802,
1.9897629022598267,
-0.29208460450172424,
-1.00213623046875,
1.3633486032485962,
-2.3236632347106934,
0.13535219430923462,
2.010650634765625,
0.2438463419675827,
0.05753849446773529,
-1.3634876012802124,
-0.6465358138084412,
-0.3117210566997528,
-0.4492962956428528,
-1.2137924432754517,
0.5159023404121399,
-0.31677648425102234,
-0.8293676972389221,
-1.4959744215011597,
0.06866010278463364,
-1.079893946647644,
-1.6955504417419434,
0.20839464664459229,
1.897638201713562,
1.917130708694458,
-0.8047013282775879,
1.4476803541183472,
-0.2361956685781479,
0.1217023953795433,
1.2774525880813599,
1.2165594100952148,
3.1871461868286133,
2.026108980178833,
-1.2159295082092285,
0.7371594309806824,
-0.15135841071605682,
-0.42657577991485596,
1.1692266464233398,
-1.2132031917572021,
1.2740981578826904,
-0.28662607073783875,
-1.3727563619613647,
-1.2162705659866333,
1.0418981313705444,
0.5033950209617615,
0.05521658807992935,
-0.5875806212425232,
1.316197395324707,
0.012716206721961498,
1.3383288383483887,
0.5271744728088379,
-0.4586673676967621,
0.6629961133003235,
-0.44550877809524536,
-0.5417500138282776,
1.5648295879364014,
0.22723546624183655,
-1.4225770235061646,
-2.2942776679992676,
-0.2280864417552948,
-0.8729110360145569,
-0.018666528165340424,
-0.6168413758277893,
-0.9577130079269409,
1.6317111253738403,
0.4873740077018738,
-1.2708407640457153,
-0.3326040506362915,
-0.3083086311817169,
-0.5619409680366516,
2.702089309692383,
-1.3713123798370361,
-0.1930231899023056,
-1.0453170537948608,
-0.48022446036338806,
1.6881400346755981,
-1.2466784715652466,
-0.22905106842517853,
-1.0050327777862549,
-0.6421155333518982,
-1.2879449129104614,
-0.5332661867141724,
-0.0014730766415596008,
-0.899779736995697,
0.8271069526672363,
0.10020174086093903,
-1.129381537437439,
-0.20722107589244843,
-0.9196702837944031,
0.9539583325386047,
-0.11892879754304886,
0.20222026109695435,
1.9602324962615967,
0.3567941188812256,
-0.4506395161151886,
0.6599565744400024,
1.1034455299377441,
0.6039704084396362,
-0.7285355925559998,
0.1444343626499176,
-0.7078236937522888,
0.3921333849430084,
-1.4014711380004883,
0.23573651909828186,
-2.875025749206543,
0.59804767370224,
-0.015381589531898499,
-0.007660473696887493,
0.02671409770846367,
-1.3057258129119873,
0.9930217862129211,
2.6137025356292725,
-1.2501047849655151,
0.47705942392349243,
0.32969972491264343,
1.1805477142333984,
-1.5333514213562012,
0.36558598279953003,
-0.4689594507217407,
2.0453689098358154,
0.14789457619190216,
1.1662275791168213,
-0.40003177523612976,
-2.1596741676330566,
0.6041643619537354,
-1.1785050630569458,
-1.1482808589935303,
0.7970633506774902,
-0.9020930528640747,
0.09697986394166946,
-1.3808374404907227,
-0.17308375239372253,
-0.7808050513267517,
-1.2557895183563232,
0.75895756483078,
0.11943451315164566,
0.4284791946411133,
-0.5780386924743652,
0.3340483605861664,
-2.1323206424713135,
-1.3173285722732544,
-0.22988831996917725,
-0.976411759853363,
0.45609813928604126,
-0.32843127846717834,
0.6802436113357544,
-0.16322758793830872,
0.06236172467470169,
0.30986881256103516,
1.3040143251419067,
3.3759241104125977,
0.19788150489330292,
0.25217103958129883,
-0.13920626044273376,
-1.0161082744598389,
1.4574581384658813,
0.9228017926216125,
-0.19007638096809387,
-0.5445510745048523,
-1.0536084175109863,
1.252640962600708,
1.9316790103912354,
1.03031587600708,
0.1537071168422699,
-0.8503033518791199,
-0.714971661567688,
0.10428999364376068,
0.27239036560058594,
0.5255033373832703,
0.9624782204627991,
0.07229509204626083,
0.16788849234580994,
1.4457318782806396,
1.2344920635223389,
-0.2534230351448059,
0.4793597459793091,
-0.8981989026069641,
-0.48962295055389404,
0.47318655252456665,
0.35777026414871216,
0.04555743187665939,
0.33600613474845886,
-1.0567162036895752,
-0.22913280129432678,
-0.3607637882232666,
-0.9685118794441223,
-0.6964128017425537,
-0.3827897608280182,
-0.2959463596343994,
1.5967768430709839,
0.10046914964914322,
-0.4781418740749359,
0.003712349571287632,
-0.729922354221344,
-0.14074581861495972,
-1.0161749124526978,
0.41692420840263367,
-0.10969100147485733,
-0.05170610919594765,
-0.06010926142334938,
1.6941889524459839,
-0.9515828490257263,
-2.0942153930664062,
0.2726101279258728,
0.21502719819545746,
-0.3809085190296173,
0.19938300549983978,
1.6249645948410034,
0.5529574751853943,
1.420923113822937,
1.3366347551345825,
1.0341600179672241,
-0.6166965365409851,
-1.3094626665115356,
0.6600297689437866,
0.9424266815185547,
-1.3791719675064087,
0.8108528852462769,
0.005220311693847179,
-0.5912758708000183,
0.6463481783866882,
1.2776410579681396,
0.35824212431907654,
-1.946012020111084,
0.7910064458847046,
-0.8849015235900879,
0.7818999886512756,
0.7292773127555847,
0.8660483360290527,
0.2253854125738144,
0.8203842639923096,
-1.3027782440185547,
-1.1542389392852783,
-0.7110093235969543,
-0.6253476142883301,
1.952688455581665,
-0.20462380349636078,
0.6011947989463806,
-0.21611322462558746,
-1.375988483428955,
-0.08370092511177063,
0.754615843296051,
0.37578076124191284,
-0.47344231605529785,
0.8450581431388855,
-0.6416095495223999,
-1.0285240411758423,
-1.3290985822677612,
-0.4307602345943451,
-1.050724983215332,
-0.8775997161865234,
1.0114423036575317,
0.8174928426742554,
0.311955064535141,
1.876082420349121,
0.5319042801856995,
0.31365153193473816,
-2.714724540710449,
0.9126229286193848,
0.17463277280330658,
-0.06930483132600784,
0.8915486335754395,
0.276976615190506,
1.0125246047973633,
-0.007147935219109058,
0.5060978531837463,
-2.334371328353882,
2.260411024093628,
-0.255484938621521,
0.6975162625312805,
0.022067822515964508,
-0.1718803346157074,
1.0640394687652588,
0.6229095458984375,
0.6353051066398621,
-1.0135406255722046,
0.7561534643173218,
-0.5762474536895752,
1.1682710647583008,
0.9135141372680664,
-0.8895819187164307,
0.0010961061343550682,
1.3491684198379517,
0.5111761093139648,
-0.502920925617218,
-0.9542281031608582,
-1.0072909593582153,
0.9283944964408875,
1.734338641166687,
-0.026296786963939667,
0.02529093250632286,
0.8620326519012451,
0.6584281921386719,
-1.2661359310150146,
0.17193357646465302,
-0.7397888898849487,
-0.6218886375427246,
1.6496806144714355,
2.040269374847412,
-0.020342007279396057,
-0.1895185261964798,
-0.7193114161491394,
-1.2149786949157715,
0.7447299957275391,
0.0062969522550702095,
0.097199946641922,
0.768921971321106,
-0.6480622291564941,
1.1072360277175903,
0.8077509999275208,
0.9653007388114929,
0.13016343116760254,
0.322693794965744,
0.381412535905838,
-0.3660983741283417,
-1.2416859865188599,
-0.24200858175754547,
-1.0315555334091187,
-2.441138744354248,
0.4252142310142517,
-0.22427210211753845,
-1.4645705223083496,
0.06230910122394562,
-1.0392823219299316,
0.8917791247367859,
-0.6532222628593445,
-1.119864821434021,
-1.5377742052078247,
0.2216719686985016,
-0.16817006468772888,
0.9283603429794312,
-1.5303205251693726,
-0.09042515605688095,
1.2132611274719238,
0.9068317413330078,
-0.6229179501533508,
0.9811511039733887,
0.2501506209373474,
1.0457557439804077,
0.8576295971870422,
-0.2991039752960205,
0.4787854254245758,
0.10319080948829651,
-1.3544586896896362,
0.44461625814437866,
1.1306980848312378,
0.22300837934017181,
1.406445860862732,
-0.592729926109314,
0.011675099842250347,
0.4614725410938263,
-0.5097150802612305,
-0.3899582624435425,
-0.5257635116577148,
0.6814326643943787,
0.08905500173568726,
-0.8784171342849731,
-0.04868561029434204,
-0.11951170116662979,
-0.2145378589630127,
0.16484315693378448,
-1.5547376871109009,
-0.13512419164180756,
-0.36310291290283203,
-0.5409531593322754,
-1.235359787940979,
0.013778920285403728,
1.417934536933899,
-0.880490779876709,
-0.20593415200710297,
0.5326967835426331,
0.33875253796577454,
0.5872416496276855,
0.5967462658882141,
-0.6288924217224121,
-0.21108214557170868,
-0.2560260593891144,
-0.29689812660217285,
0.2612348794937134,
1.3303053379058838,
-0.14167992770671844,
-0.9890642762184143,
0.747764527797699,
-0.401601105928421,
0.09273383021354675,
1.9492534399032593,
0.08339307457208633,
-0.7499560713768005,
0.24751822650432587,
-0.6894327402114868,
1.8397382497787476,
1.7129251956939697,
1.3779550790786743,
-0.07512921094894409,
-0.931490957736969,
0.482560396194458,
-0.25583869218826294,
-0.39048367738723755,
0.8878106474876404,
0.4476340115070343,
-0.21161149442195892,
-1.3666930198669434,
0.6681972146034241,
1.209399700164795,
-0.9039441347122192,
-0.7496339678764343,
0.09723438322544098,
-0.8285052180290222,
1.0834654569625854,
0.7323105335235596,
0.41014349460601807,
0.21374914050102234,
1.5868345499038696,
0.7047838568687439,
-0.41610050201416016,
0.44765645265579224,
0.5170262455940247,
-0.14277441799640656,
-2.063262462615967,
-1.0861265659332275,
0.2920535206794739,
-0.4833321273326874,
-1.6065690517425537,
1.346010684967041,
-1.2388982772827148,
-0.9393413662910461,
0.4175724685192108,
0.15064002573490143,
1.4657953977584839,
0.3418017327785492,
1.6426515579223633,
2.1038246154785156,
0.9210365414619446,
0.34606465697288513,
1.331978678703308,
-0.042986102402210236,
-0.36032238602638245,
1.807189702987671,
-0.43658435344696045,
0.5746363997459412,
1.0495628118515015,
-0.4107780158519745,
-1.0397173166275024,
-0.7390814423561096,
-1.2452861070632935,
-0.6034780144691467,
1.1537353992462158,
0.04818606749176979,
-1.0609933137893677,
0.24153007566928864,
1.5169506072998047,
0.11601681262254715,
-0.26875582337379456,
0.6805310249328613,
0.40297865867614746,
-0.7558147311210632,
-0.05481996759772301,
-0.8643264770507812,
0.5275450944900513,
-0.2009706199169159,
-0.4208720326423645,
0.31951284408569336,
0.4544996917247772,
1.3251280784606934,
0.03727534040808678,
0.1571546196937561,
1.2950420379638672,
-1.3635225296020508,
1.5091534852981567,
-0.6354323029518127,
0.2181684374809265,
-2.4376187324523926,
1.4431992769241333,
-0.7462242245674133,
1.8158072233200073,
-2.690763235092163,
0.4362456500530243,
-0.5814294815063477,
-0.432538241147995,
0.34603720903396606,
-0.367858350276947,
0.09847326576709747,
-0.2033100426197052,
-1.129757046699524,
-0.06558644026517868,
-0.7185752391815186,
0.5769715309143066,
1.0879777669906616,
1.3918890953063965,
-1.1427041292190552,
-0.2751986086368561,
-1.8318493366241455,
-0.1568167805671692,
-0.7872280478477478,
0.3906773328781128,
-1.930016279220581,
-0.1458820104598999,
-1.9136146306991577,
-2.5303635597229004,
-1.331220030784607,
-0.8042835593223572,
1.079577922821045,
0.0851634070277214,
-0.9812142252922058,
1.2051175832748413,
-0.4474286437034607,
-1.826807975769043,
1.0558030605316162,
-2.2705459594726562
] |
https://github.com/huggingface/datasets/issues/5433
|
Support latest Docker image in CI benchmarks
|
Sorry, it was us:[^1] https://github.com/iterative/cml/pull/1317 & https://github.com/iterative/cml/issues/1319#issuecomment-1385599559; should be fixed with [v0.18.17](https://github.com/iterative/cml/releases/tag/v0.18.17).
[^1]: More or less, see https://github.com/yargs/yargs/issues/873.
|
Once we find out the root cause of:
- #5431
we should revert the temporary pin on the Docker image version introduced by:
- #5432
| 339 | 18 |
Support latest Docker image in CI benchmarks
Once we find out the root cause of:
- #5431
we should revert the temporary pin on the Docker image version introduced by:
- #5432
Sorry, it was us:[^1] https://github.com/iterative/cml/pull/1317 & https://github.com/iterative/cml/issues/1319#issuecomment-1385599559; should be fixed with [v0.18.17](https://github.com/iterative/cml/releases/tag/v0.18.17).
[^1]: More or less, see https://github.com/yargs/yargs/issues/873.
|
[
-1.1741132736206055,
-0.9020137786865234,
-0.9337199926376343,
1.5220918655395508,
-0.0625097006559372,
-1.2240580320358276,
0.11463204026222229,
-0.9091006517410278,
1.6163134574890137,
-0.6164934635162354,
0.2926141619682312,
-1.615256428718567,
-0.07128304243087769,
-0.5232698321342468,
-0.7965061664581299,
-0.7499036192893982,
-0.30300161242485046,
-0.7322326898574829,
0.9244527816772461,
2.541769504547119,
1.2211884260177612,
-1.2922439575195312,
2.85345458984375,
0.7174828052520752,
-0.22376053035259247,
-1.039444088935852,
0.6636702418327332,
0.02610732614994049,
-1.2595152854919434,
-0.476200133562088,
-0.9496430158615112,
0.09528045356273651,
-0.38947635889053345,
-0.4552575349807739,
0.11303657293319702,
0.3432841897010803,
-0.15626055002212524,
-0.3049651086330414,
-0.5068039894104004,
-0.7676151990890503,
0.4777487814426422,
-0.33420097827911377,
0.9083855748176575,
-0.26117178797721863,
1.760086178779602,
-0.6212926506996155,
0.2826656103134155,
0.6436746716499329,
1.350325107574463,
0.1397373080253601,
-0.05916493758559227,
0.2925768196582794,
0.3871387839317322,
0.09209947288036346,
0.49041348695755005,
1.205802321434021,
0.659533679485321,
0.5054522752761841,
0.6853113770484924,
-2.1655566692352295,
1.3208271265029907,
-0.9015050530433655,
0.25755828619003296,
1.3207604885101318,
-0.9530273079872131,
0.28702694177627563,
-1.7478643655776978,
-0.06978075951337814,
0.545900285243988,
-2.481537342071533,
0.29452207684516907,
-1.2469613552093506,
-0.5765239000320435,
0.9211900234222412,
0.14330841600894928,
-1.2398250102996826,
0.10398009419441223,
-0.5570741891860962,
1.0016177892684937,
0.5516642332077026,
1.1475108861923218,
-1.5441962480545044,
-0.03894712030887604,
-0.06330323219299316,
0.06250923871994019,
-1.2443500757217407,
-1.5014954805374146,
0.52712082862854,
0.7457371950149536,
0.758770227432251,
-0.11022728681564331,
0.9903414249420166,
-0.8624705076217651,
0.9071703553199768,
-0.8047205209732056,
-1.5944570302963257,
-1.3979536294937134,
-2.2855887413024902,
-2.184825897216797,
0.868468701839447,
-0.5473085045814514,
-0.4501519203186035,
1.9410929679870605,
-0.9992391467094421,
-1.8407354354858398,
1.0668138265609741,
0.31274402141571045,
0.14773719012737274,
2.4373250007629395,
0.2528507709503174,
-0.7495152354240417,
0.41487249732017517,
-0.7302457094192505,
0.8419037461280823,
-0.3849955201148987,
1.3475416898727417,
0.5616284608840942,
-0.9972711801528931,
1.7532061338424683,
-0.4836970269680023,
0.47778084874153137,
-0.6618451476097107,
-0.45422840118408203,
-0.8392823338508606,
0.3722429573535919,
1.905531406402588,
-0.4771825969219208,
1.6645914316177368,
-0.37083420157432556,
-1.553935170173645,
-1.4633114337921143,
0.7603685259819031,
0.5249432921409607,
-0.8954659700393677,
0.04184361919760704,
-0.5250357985496521,
0.08147208392620087,
-0.05633578076958656,
1.0946587324142456,
1.289297103881836,
0.6826658844947815,
-0.16226543486118317,
-0.9744391441345215,
0.3288112282752991,
-0.041038088500499725,
-0.6690403819084167,
-1.759721040725708,
-0.37277117371559143,
0.35685673356056213,
0.6484328508377075,
-1.3624228239059448,
1.6985417604446411,
0.7592209577560425,
2.0335607528686523,
0.8556832075119019,
-0.4691772758960724,
1.509401559829712,
-0.050204772502183914,
1.8616372346878052,
-0.5959408283233643,
0.606757640838623,
-0.33505868911743164,
-1.108798861503601,
0.8190001249313354,
-0.3911435306072235,
-1.928452730178833,
-0.7145339250564575,
-0.9201940298080444,
-0.05049285292625427,
-0.766759991645813,
0.9720956087112427,
-0.3845725953578949,
-1.253217101097107,
0.11981463432312012,
-0.8331440687179565,
0.15766248106956482,
-1.3290053606033325,
0.09758646786212921,
0.849473774433136,
-0.6679403185844421,
-0.0056091295555233955,
-0.21958772838115692,
-1.3132132291793823,
-0.5353805422782898,
0.3792591989040375,
2.021944999694824,
-0.6098199486732483,
0.8743563294410706,
0.9930676221847534,
-0.8037682771682739,
0.11397241055965424,
0.31565266847610474,
-0.3756564259529114,
0.8775089383125305,
-1.0708441734313965,
-0.4530108869075775,
1.0943201780319214,
-0.10776501893997192,
-0.6971362233161926,
1.4659225940704346,
0.9278393387794495,
-0.952824056148529,
-0.3777514398097992,
-0.0669851303100586,
-0.6030175089836121,
0.008531926199793816,
-1.4931190013885498,
-0.14592815935611725,
0.1863613873720169,
-1.3811079263687134,
-0.5073645114898682,
-0.2524172067642212,
1.382447361946106,
-0.262717604637146,
1.458537220954895,
-0.13741372525691986,
-0.3071938455104828,
-0.4203273355960846,
-0.5066621899604797,
0.08960942924022675,
-0.24623049795627594,
-0.6879193782806396,
0.34273242950439453,
-0.8193053603172302,
0.30979689955711365,
1.4882036447525024,
0.42507922649383545,
0.09628650546073914,
0.6379481554031372,
1.0526505708694458,
0.4252513647079468,
-0.16010813415050507,
-1.0082011222839355,
-1.5766923427581787,
2.056441068649292,
-1.3928147554397583,
1.9066582918167114,
0.8270297646522522,
-0.16281461715698242,
-1.7885987758636475,
-1.9220778942108154,
1.3561288118362427,
1.2383403778076172,
2.440833568572998,
0.6348764896392822,
0.4419098198413849,
-0.7331988215446472,
-0.6938495635986328,
0.2294931560754776,
-1.0462719202041626,
-0.856949508190155,
0.16627557575702667,
2.417194366455078,
1.8054003715515137,
-0.5464664101600647,
-0.2575455605983734,
-1.0582540035247803,
1.0981724262237549,
-0.09361445903778076,
0.1718360185623169,
1.9082130193710327,
-0.23047597706317902,
-1.077069878578186,
1.1516000032424927,
-2.3778741359710693,
0.2856675982475281,
2.0003931522369385,
0.4044540822505951,
0.03028000518679619,
-1.5290555953979492,
-0.6285153031349182,
-0.2676681578159332,
-0.4362936317920685,
-1.164425015449524,
0.6555944085121155,
-0.2033478021621704,
-1.066105842590332,
-1.408591866493225,
0.060091760009527206,
-1.0701936483383179,
-1.7700480222702026,
0.5014225244522095,
1.861548900604248,
2.018925189971924,
-0.8472742438316345,
1.4049749374389648,
-0.21912051737308502,
0.03371921926736832,
1.2584534883499146,
1.2890183925628662,
3.109773874282837,
1.9380543231964111,
-1.1320013999938965,
0.7481810450553894,
-0.2019612044095993,
-0.5187234282493591,
1.2032121419906616,
-1.1141711473464966,
1.065019130706787,
-0.20028799772262573,
-1.3151881694793701,
-1.1715389490127563,
1.0066614151000977,
0.4945801794528961,
-0.048113614320755005,
-0.5209994316101074,
1.2592881917953491,
0.11876998841762543,
1.300266146659851,
0.6495485901832581,
-0.3347821831703186,
0.5914315581321716,
-0.28713080286979675,
-0.42749032378196716,
1.6005780696868896,
0.10308252274990082,
-1.5846706628799438,
-2.3503243923187256,
-0.133860781788826,
-0.9701322913169861,
-0.13081888854503632,
-0.6341703534126282,
-1.1138677597045898,
1.6812363862991333,
0.4156915247440338,
-1.2751661539077759,
-0.33528584241867065,
-0.38384807109832764,
-0.6170969009399414,
2.646735668182373,
-1.4936201572418213,
-0.21259504556655884,
-1.0020948648452759,
-0.3898327350616455,
1.7252744436264038,
-1.2230918407440186,
-0.1673077642917633,
-1.0121004581451416,
-0.6923509240150452,
-1.3343453407287598,
-0.47992992401123047,
-0.11989550292491913,
-0.8440144658088684,
0.6252015829086304,
-0.03735711798071861,
-1.0510305166244507,
-0.2710839807987213,
-0.8594141602516174,
0.797019898891449,
-0.07033233344554901,
0.18803831934928894,
1.9031635522842407,
0.48886558413505554,
-0.3650032579898834,
0.7587759494781494,
1.19189453125,
0.571584939956665,
-0.7042544484138489,
0.27049797773361206,
-0.7546547651290894,
0.18974202871322632,
-1.4376283884048462,
0.19470936059951782,
-2.8939733505249023,
0.7237535119056702,
-0.143816277384758,
-0.08370433747768402,
-0.10874758660793304,
-1.2458298206329346,
1.3436073064804077,
2.547837495803833,
-1.1999104022979736,
0.44101035594940186,
0.34785330295562744,
1.1163077354431152,
-1.5242345333099365,
0.11220060288906097,
-0.39947643876075745,
2.041363000869751,
0.1811448633670807,
1.2447441816329956,
-0.5412753820419312,
-2.063166856765747,
0.7214992046356201,
-1.1948647499084473,
-0.9421453475952148,
0.8140962719917297,
-0.8376365900039673,
0.14737042784690857,
-1.437583565711975,
-0.03582475334405899,
-0.9131167531013489,
-1.4189823865890503,
0.7101276516914368,
0.026793021708726883,
0.47960567474365234,
-0.5880542397499084,
0.4329836368560791,
-2.0887556076049805,
-1.3698976039886475,
-0.19158805906772614,
-1.1252069473266602,
0.5247183442115784,
-0.36445197463035583,
0.5238493084907532,
-0.1304088830947876,
0.024732857942581177,
0.32802775502204895,
1.422480583190918,
3.4776437282562256,
0.25820523500442505,
0.4241526424884796,
-0.04603584483265877,
-0.9408202767372131,
1.5092434883117676,
1.0106149911880493,
-0.08899407088756561,
-0.5421699285507202,
-0.8604916334152222,
1.3996440172195435,
1.9877690076828003,
1.118233561515808,
0.15898124873638153,
-0.9904568791389465,
-0.8709801435470581,
0.08674149215221405,
0.20356552302837372,
0.4626768231391907,
1.0038893222808838,
0.06018051877617836,
0.06174139305949211,
1.339353322982788,
1.2661845684051514,
-0.3894425332546234,
0.5538879632949829,
-0.9352425932884216,
-0.31476491689682007,
0.4694238603115082,
0.2852555811405182,
0.05725054815411568,
0.5930486917495728,
-1.1541342735290527,
-0.32012447714805603,
-0.18735364079475403,
-0.8915108442306519,
-0.7448729276657104,
-0.35504651069641113,
-0.26915279030799866,
1.5987980365753174,
-0.03597539663314819,
-0.44905075430870056,
0.08066333830356598,
-0.8107010126113892,
-0.07390692830085754,
-1.0311174392700195,
0.20727868378162384,
-0.07225875556468964,
-0.028796831145882607,
-0.09951111674308777,
1.6887072324752808,
-0.8921616673469543,
-2.2235584259033203,
0.30422812700271606,
0.23854713141918182,
-0.4490944445133209,
0.23624388873577118,
1.6830495595932007,
0.43787792325019836,
1.3711655139923096,
1.33720862865448,
1.0007303953170776,
-0.6412642598152161,
-1.1427613496780396,
0.700364351272583,
0.9795024991035461,
-1.394011378288269,
0.833846390247345,
-0.3342171311378479,
-0.46568527817726135,
0.6663331985473633,
1.226754069328308,
0.3098652958869934,
-2.019566774368286,
0.7903730273246765,
-0.82041996717453,
0.7817013263702393,
0.6244686841964722,
0.8294585943222046,
0.2624121904373169,
0.7788887023925781,
-1.304051399230957,
-1.0934503078460693,
-0.7255681753158569,
-0.5524404644966125,
1.7579193115234375,
-0.11997427046298981,
0.500600278377533,
-0.1084696352481842,
-1.272119164466858,
-0.24070698022842407,
0.7132977843284607,
0.3141119182109833,
-0.472986102104187,
0.9991923570632935,
-0.7344215512275696,
-1.0569432973861694,
-1.2542386054992676,
-0.6774447560310364,
-0.8308355212211609,
-0.9992671608924866,
1.0220896005630493,
0.8100417256355286,
0.4187166392803192,
1.9289066791534424,
0.5275222659111023,
0.22498629987239838,
-2.6667070388793945,
0.9250380396842957,
0.3670783042907715,
0.038000766187906265,
0.9813055992126465,
0.2523036599159241,
1.1289522647857666,
-0.10649886727333069,
0.5808328986167908,
-2.324751853942871,
2.2322421073913574,
-0.19271433353424072,
0.6330757141113281,
0.14539697766304016,
-0.13446184992790222,
1.161026120185852,
0.46510934829711914,
0.6237489581108093,
-1.2438030242919922,
0.803249716758728,
-0.6743777990341187,
1.2132467031478882,
0.8826932311058044,
-0.8808549046516418,
0.09317022562026978,
1.3052918910980225,
0.5179905891418457,
-0.3244384527206421,
-0.9119386076927185,
-0.7985935211181641,
1.011191725730896,
1.6741445064544678,
0.07444758713245392,
0.0772566944360733,
0.9156410694122314,
0.5043430924415588,
-1.328640103340149,
-0.08485856652259827,
-0.7598301768302917,
-0.5419892072677612,
1.6898282766342163,
2.0308444499969482,
-0.07213540375232697,
-0.2741761803627014,
-0.735475480556488,
-1.264164924621582,
0.5787553191184998,
-0.04134077951312065,
0.1371191442012787,
0.7555631995201111,
-0.6483953595161438,
1.1944822072982788,
0.6893981099128723,
0.9223119616508484,
-0.057399772107601166,
0.33016836643218994,
0.33372920751571655,
-0.4058842957019806,
-1.2691868543624878,
-0.5583470463752747,
-1.2172062397003174,
-2.576021671295166,
0.4180513322353363,
-0.34882014989852905,
-1.3672982454299927,
0.078839972615242,
-1.2477061748504639,
0.8047938346862793,
-0.70488440990448,
-0.9682201743125916,
-1.3346635103225708,
0.23339740931987762,
-0.3404669761657715,
0.8466907739639282,
-1.594827651977539,
-0.17014768719673157,
1.2791101932525635,
0.9481819868087769,
-0.641077995300293,
1.0215134620666504,
0.21789537370204926,
1.1165653467178345,
0.8574162721633911,
-0.3263639509677887,
0.4851686656475067,
0.2110133022069931,
-1.4120646715164185,
0.4428740441799164,
1.1857980489730835,
0.22575895488262177,
1.5129247903823853,
-0.5231403112411499,
0.12156350910663605,
0.6038601398468018,
-0.5605982542037964,
-0.6291731595993042,
-0.5815826654434204,
0.6221649646759033,
0.1266842484474182,
-1.235467791557312,
-0.03243102878332138,
-0.15403330326080322,
-0.16283178329467773,
0.2082703411579132,
-1.5698907375335693,
-0.35326701402664185,
-0.2568202018737793,
-0.5334789156913757,
-1.313232660293579,
0.22052235901355743,
1.189310073852539,
-0.9461624026298523,
-0.2247675359249115,
0.37886640429496765,
0.382988840341568,
0.5223513841629028,
0.6248080134391785,
-0.771184504032135,
-0.43996480107307434,
-0.28162330389022827,
-0.3354104161262512,
0.4050762355327606,
1.1015048027038574,
-0.16578315198421478,
-1.0600507259368896,
0.6890836954116821,
-0.4508875012397766,
0.06814630329608917,
1.9863622188568115,
-0.115008145570755,
-0.8341357707977295,
0.31129106879234314,
-0.6067736744880676,
1.9250614643096924,
1.4999467134475708,
1.3509807586669922,
-0.19214923679828644,
-0.6992684006690979,
0.652664303779602,
-0.1644226610660553,
-0.25072163343429565,
0.7169221639633179,
0.45335912704467773,
-0.16323763132095337,
-1.4843798875808716,
0.3980480432510376,
1.3769917488098145,
-1.0907342433929443,
-0.750139057636261,
0.056217972189188004,
-0.8219338059425354,
1.1720690727233887,
0.6998433470726013,
0.25091925263404846,
0.24138595163822174,
1.5734020471572876,
0.6983318328857422,
-0.5318675637245178,
0.3886663615703583,
0.5036278963088989,
-0.10754929482936859,
-2.127741813659668,
-0.9211808443069458,
0.31929928064346313,
-0.2577992379665375,
-1.5197370052337646,
1.2220481634140015,
-1.2021186351776123,
-0.9259245991706848,
0.5493208169937134,
0.2617392838001251,
1.379908800125122,
0.2308727651834488,
1.7238812446594238,
1.9814571142196655,
0.8433637619018555,
0.15633247792720795,
1.27279794216156,
-0.06513094156980515,
-0.4273817241191864,
1.7889066934585571,
-0.44126096367836,
0.6143602132797241,
0.937292218208313,
-0.43310603499412537,
-1.1000665426254272,
-0.8220126032829285,
-1.2709993124008179,
-0.5731562376022339,
1.3514761924743652,
0.18444664776325226,
-1.1357150077819824,
0.1805741935968399,
1.4689046144485474,
0.1157195121049881,
-0.22792945802211761,
0.5909512639045715,
0.5398724675178528,
-0.6104827523231506,
0.010179739445447922,
-0.7757395505905151,
0.5624699592590332,
0.019551528617739677,
-0.2972763478755951,
0.2638393044471741,
0.44099363684654236,
1.223136305809021,
-0.009125305339694023,
0.05426851287484169,
1.2509136199951172,
-1.3244469165802002,
1.6162524223327637,
-0.605607807636261,
0.3092799186706543,
-2.3921422958374023,
1.3788684606552124,
-0.8492878675460815,
1.891710877418518,
-2.548356533050537,
0.36502012610435486,
-0.6370246410369873,
-0.37103959918022156,
0.3085986375808716,
-0.44841691851615906,
0.0991935133934021,
-0.24520206451416016,
-0.914641797542572,
-0.16296839714050293,
-0.9169937968254089,
0.4993371069431305,
1.2639083862304688,
1.3007681369781494,
-1.043988585472107,
-0.2658217251300812,
-1.8442615270614624,
-0.12931756675243378,
-0.7469891905784607,
0.34666502475738525,
-2.001725912094116,
-0.19433294236660004,
-2.029630422592163,
-2.221083164215088,
-1.4392951726913452,
-0.8186483383178711,
0.9775240421295166,
0.16404756903648376,
-0.8997179269790649,
1.0689663887023926,
-0.41791489720344543,
-1.7156065702438354,
1.0124918222427368,
-2.2112903594970703
] |
https://github.com/huggingface/datasets/issues/5433
|
Support latest Docker image in CI benchmarks
|
Hi @0x2b3bfa0, thanks a lot for the investigation, the context about the the root cause and for fixing it!!
We are reviewing your PR to unpin the container image.
|
Once we find out the root cause of:
- #5431
we should revert the temporary pin on the Docker image version introduced by:
- #5432
| 339 | 29 |
Support latest Docker image in CI benchmarks
Once we find out the root cause of:
- #5431
we should revert the temporary pin on the Docker image version introduced by:
- #5432
Hi @0x2b3bfa0, thanks a lot for the investigation, the context about the the root cause and for fixing it!!
We are reviewing your PR to unpin the container image.
|
[
-1.17626953125,
-0.9430264830589294,
-0.9038001894950867,
1.3165526390075684,
-0.3127286434173584,
-1.38706374168396,
0.17333859205245972,
-1.0670613050460815,
1.619828462600708,
-0.9278891086578369,
0.4337567985057831,
-1.6069083213806152,
0.12599827349185944,
-0.54421067237854,
-0.8060382008552551,
-0.8419880867004395,
-0.42163872718811035,
-0.5996941924095154,
1.0958245992660522,
2.530109405517578,
1.1108344793319702,
-1.3973097801208496,
2.78657865524292,
0.6801385879516602,
-0.2612033784389496,
-0.941043496131897,
0.5822715163230896,
-0.14341536164283752,
-1.3439173698425293,
-0.5790009498596191,
-1.033453345298767,
0.01076942216604948,
-0.4014967381954193,
-0.40781643986701965,
0.015892092138528824,
0.2544128894805908,
-0.11257199943065643,
-0.5725900530815125,
-0.44288715720176697,
-0.7791081666946411,
0.26340624690055847,
-0.3059188723564148,
0.9718608856201172,
-0.4707673490047455,
1.8353087902069092,
-0.4906824827194214,
0.2796441316604614,
0.7734667658805847,
1.3759685754776,
0.2665899693965912,
-0.027526088058948517,
0.13191437721252441,
0.3539856970310211,
-0.18793146312236786,
0.4645974338054657,
0.9251074194908142,
0.5245447754859924,
0.7007988095283508,
0.7499703168869019,
-2.1643154621124268,
1.3639553785324097,
-1.140370488166809,
0.29906439781188965,
1.6863617897033691,
-1.1642614603042603,
0.4682301878929138,
-1.727764368057251,
-0.06430165469646454,
0.4677850902080536,
-2.3401520252227783,
0.37911930680274963,
-1.0719513893127441,
-0.5570577383041382,
0.8241856694221497,
0.1945256143808365,
-1.2432018518447876,
0.1552668660879135,
-0.3436162769794464,
0.9959056973457336,
0.6185120940208435,
1.1870425939559937,
-1.7418408393859863,
0.10847350209951401,
-0.2982954978942871,
0.13072849810123444,
-1.4174258708953857,
-1.525465488433838,
0.6008481979370117,
0.5894179940223694,
0.398355096578598,
-0.046188514679670334,
1.1428338289260864,
-0.8771075010299683,
0.961193859577179,
-0.8842135071754456,
-1.5337685346603394,
-1.2766656875610352,
-2.2181029319763184,
-2.3384764194488525,
0.7003586292266846,
-0.5082823634147644,
-0.5643295645713806,
2.063028335571289,
-1.188398003578186,
-1.6589159965515137,
1.1843448877334595,
0.1854477822780609,
0.048898737877607346,
2.5157461166381836,
0.18767793476581573,
-0.5189056396484375,
0.35424673557281494,
-0.9057148694992065,
0.9905092716217041,
-0.7407346963882446,
1.1621332168579102,
0.3995134234428406,
-0.9906282424926758,
1.7582943439483643,
-0.5200450420379639,
0.6369575262069702,
-0.5722938179969788,
-0.42819470167160034,
-0.888893723487854,
0.39908966422080994,
1.84712815284729,
-0.3517352342605591,
1.4504749774932861,
-0.6587339043617249,
-1.4810489416122437,
-1.479835867881775,
0.9365118145942688,
0.5072779655456543,
-0.8544216752052307,
0.3660988509654999,
-0.15350623428821564,
0.09100870788097382,
-0.14905814826488495,
1.0247547626495361,
1.4103997945785522,
0.7367379069328308,
-0.17673291265964508,
-0.9749320149421692,
0.1689465194940567,
-0.07917723059654236,
-0.8281015753746033,
-1.6376373767852783,
-0.38165000081062317,
-0.09729316085577011,
0.7249023914337158,
-1.0577796697616577,
1.7682334184646606,
0.8983744978904724,
1.924855351448059,
0.898801326751709,
-0.4421822726726532,
1.5838431119918823,
0.1436571329832077,
1.794156789779663,
-0.5699511766433716,
0.6399508714675903,
-0.3741556406021118,
-1.1627238988876343,
0.876751720905304,
-0.33116504549980164,
-1.9319733381271362,
-0.6057553887367249,
-0.6917104721069336,
-0.23402860760688782,
-0.6909816265106201,
1.0608196258544922,
-0.39475077390670776,
-1.390028476715088,
0.29217687249183655,
-0.5539811849594116,
0.20420950651168823,
-1.3617910146713257,
0.5038962960243225,
0.7753334641456604,
-0.5786912441253662,
-0.1229814738035202,
-0.23639141023159027,
-1.3144664764404297,
-0.5926991701126099,
0.17880430817604065,
1.830639123916626,
-0.6558990478515625,
0.9124101996421814,
0.8320176005363464,
-0.6499232053756714,
-0.21527782082557678,
0.2964909076690674,
-0.27184951305389404,
0.7761044502258301,
-1.0258375406265259,
-0.6559354662895203,
1.1331865787506104,
-0.32659995555877686,
-0.5680369734764099,
1.4889411926269531,
0.739513635635376,
-0.9993430972099304,
-0.12629178166389465,
-0.19375400245189667,
-0.8451864719390869,
-0.0587361641228199,
-1.5230982303619385,
-0.10162879526615143,
0.16057059168815613,
-1.398984432220459,
-0.4576219916343689,
-0.19221656024456024,
1.2352434396743774,
-0.20620304346084595,
1.3940458297729492,
-0.4206026792526245,
-0.22929829359054565,
-0.5638018250465393,
-0.36954599618911743,
0.24681784212589264,
-0.21192173659801483,
-0.5447856187820435,
0.24129530787467957,
-0.7518634796142578,
0.41697874665260315,
1.5634607076644897,
0.3040272891521454,
0.07883262634277344,
0.46133527159690857,
0.9627653956413269,
0.19259920716285706,
0.0008486434817314148,
-0.9673990607261658,
-1.3342678546905518,
2.0018601417541504,
-1.5385737419128418,
1.980769395828247,
0.8112148642539978,
-0.0385453999042511,
-1.7218689918518066,
-1.861552357673645,
1.4707945585250854,
1.2285627126693726,
2.027334451675415,
0.5236925482749939,
0.434623658657074,
-0.791326105594635,
-0.6234724521636963,
0.27517393231391907,
-0.9996342062950134,
-0.8440614938735962,
0.05186989903450012,
2.2604379653930664,
1.6200637817382812,
-0.3653004467487335,
-0.11465414613485336,
-1.1594994068145752,
1.2487990856170654,
-0.0035998797975480556,
0.19451315701007843,
1.7509099245071411,
-0.4306960999965668,
-1.1611274480819702,
1.158530592918396,
-2.3596956729888916,
0.03385187312960625,
2.0512783527374268,
0.2865101993083954,
0.0804315134882927,
-1.1786322593688965,
-0.7937884330749512,
-0.051126424223184586,
-0.4532921016216278,
-1.2930669784545898,
0.548783540725708,
-0.36336714029312134,
-0.685416042804718,
-1.410448431968689,
0.13994471728801727,
-1.080304503440857,
-1.5663632154464722,
0.385259211063385,
1.8790295124053955,
1.873363971710205,
-0.7993848919868469,
1.534458041191101,
-0.25071007013320923,
0.14633694291114807,
1.2489120960235596,
1.2113077640533447,
3.116170883178711,
1.9861805438995361,
-1.2870593070983887,
0.5668502449989319,
-0.0008743805810809135,
-0.47083553671836853,
1.1813253164291382,
-1.014007806777954,
1.3482463359832764,
-0.04668224975466728,
-1.1579840183258057,
-1.285552740097046,
0.7848272919654846,
0.43458837270736694,
0.14446868002414703,
-0.33408206701278687,
1.2544437646865845,
0.20828714966773987,
1.2492165565490723,
0.6508788466453552,
-0.4594002068042755,
0.643078625202179,
-0.40391314029693604,
-0.38853350281715393,
1.8030669689178467,
0.15504461526870728,
-1.390651822090149,
-2.311518430709839,
-0.2228982299566269,
-0.8014505505561829,
0.09866640716791153,
-0.6951337456703186,
-0.9829502701759338,
1.814716100692749,
0.4650575816631317,
-1.1399471759796143,
-0.41834336519241333,
-0.5029118657112122,
-0.7232120633125305,
2.5779547691345215,
-1.570457935333252,
-0.22675026953220367,
-0.952894926071167,
-0.5394116640090942,
1.4871411323547363,
-1.4209504127502441,
-0.18225188553333282,
-1.0401511192321777,
-0.4774983823299408,
-1.2755329608917236,
-0.37051722407341003,
-0.13575665652751923,
-0.808433473110199,
0.7885838747024536,
0.19096164405345917,
-1.1482224464416504,
-0.45140448212623596,
-0.8673674464225769,
0.66115802526474,
-0.1355360746383667,
0.34144702553749084,
1.895055890083313,
0.4529082477092743,
-0.4515524208545685,
0.793652355670929,
1.2519466876983643,
0.5903610587120056,
-0.5697588920593262,
0.13875533640384674,
-0.7631558775901794,
0.3241303861141205,
-1.1925777196884155,
0.2386595904827118,
-2.842373847961426,
0.5979810357093811,
-0.16370472311973572,
-0.15763260424137115,
-0.09890279173851013,
-1.2703851461410522,
1.0740718841552734,
2.5790891647338867,
-1.0821219682693481,
0.510315477848053,
0.21095749735832214,
1.3155677318572998,
-1.6934877634048462,
0.2585580050945282,
-0.43714115023612976,
2.1232569217681885,
0.1949714571237564,
1.1029958724975586,
-0.5620432496070862,
-2.327594757080078,
0.5156899094581604,
-1.1706911325454712,
-1.179296612739563,
0.9028826355934143,
-0.7683870196342468,
-0.09040399640798569,
-1.3608343601226807,
-0.26678013801574707,
-0.8482490181922913,
-1.2901748418807983,
0.8075339794158936,
0.17853876948356628,
0.5467566847801208,
-0.761072039604187,
0.2475406676530838,
-2.2442967891693115,
-1.311425805091858,
-0.20976507663726807,
-0.9114425778388977,
0.4822121858596802,
-0.5329791307449341,
0.6680904030799866,
-0.20293040573596954,
0.17052237689495087,
0.24858279526233673,
1.4475542306900024,
3.4396519660949707,
0.2305908352136612,
0.50687175989151,
-0.39305418729782104,
-0.8134546875953674,
1.4706194400787354,
0.9767700433731079,
0.05152231454849243,
-0.6396645903587341,
-0.9831386804580688,
1.370334267616272,
1.7916383743286133,
0.8564841151237488,
0.13667568564414978,
-0.6394343972206116,
-0.5175824761390686,
-0.23496665060520172,
0.20279157161712646,
0.36743780970573425,
1.060850739479065,
0.07771206647157669,
0.18393133580684662,
1.3747376203536987,
1.282047152519226,
-0.4264863133430481,
0.4666788876056671,
-0.7610461711883545,
-0.40124404430389404,
0.6150070428848267,
0.41428142786026,
-0.030986402183771133,
0.36575648188591003,
-0.7093134522438049,
-0.32709744572639465,
-0.29662132263183594,
-0.8784818053245544,
-0.6373840570449829,
-0.2931952178478241,
-0.3365399241447449,
1.689639925956726,
0.004859330132603645,
-0.5709022283554077,
-0.17194770276546478,
-0.7265938520431519,
0.12184488028287888,
-1.0371474027633667,
0.16254667937755585,
-0.12728917598724365,
-0.07980148494243622,
-0.06698796898126602,
1.767284870147705,
-0.9560286998748779,
-2.226963758468628,
0.24862779676914215,
0.2183249294757843,
-0.27969393134117126,
0.17077387869358063,
1.659654974937439,
0.2573396563529968,
1.5522687435150146,
1.4507856369018555,
0.9792949557304382,
-0.6705977916717529,
-1.2532038688659668,
0.7442883849143982,
0.909329354763031,
-1.4547171592712402,
0.7111666202545166,
0.039617251604795456,
-0.5614684224128723,
0.874471127986908,
0.9934254288673401,
0.441095232963562,
-2.1485469341278076,
0.767475962638855,
-1.1277830600738525,
0.9346014261245728,
0.7878474593162537,
0.8178138136863708,
0.23802515864372253,
1.018156886100769,
-1.050012230873108,
-1.2659858465194702,
-0.5538893938064575,
-0.6485888361930847,
1.9587897062301636,
-0.43660715222358704,
0.5941779017448425,
-0.1599513441324234,
-1.0984890460968018,
-0.1507987231016159,
0.6181008815765381,
0.29954561591148376,
-0.2921828031539917,
0.6783620715141296,
-0.8113104701042175,
-1.1869148015975952,
-1.426139235496521,
-0.6005864143371582,
-1.0147844552993774,
-0.9447939991950989,
1.2170209884643555,
0.950377881526947,
0.241628035902977,
2.033651351928711,
0.4751832187175751,
0.10230883210897446,
-2.617344379425049,
0.6981543302536011,
0.2765690088272095,
0.003488317131996155,
1.0624231100082397,
0.44294899702072144,
1.1312243938446045,
0.017742030322551727,
0.42312079668045044,
-2.3793327808380127,
2.3807992935180664,
-0.33653524518013,
0.8553385734558105,
-0.08096791058778763,
-0.025718476623296738,
1.2231858968734741,
0.5382387638092041,
0.5007258057594299,
-1.1387393474578857,
0.6991989016532898,
-0.575711727142334,
1.3286958932876587,
1.0068743228912354,
-0.8017168045043945,
0.014816450886428356,
1.3759431838989258,
0.432574987411499,
-0.5304893255233765,
-0.8800262808799744,
-1.0030955076217651,
0.8733586072921753,
1.8402104377746582,
0.0964244082570076,
0.24918584525585175,
0.6562848091125488,
0.7892593741416931,
-1.2236990928649902,
0.02691662311553955,
-0.8065047264099121,
-0.9313173294067383,
1.5737327337265015,
1.8487610816955566,
-0.04905116930603981,
-0.06665157526731491,
-0.5985777974128723,
-1.3432796001434326,
0.6980447173118591,
-0.024580325931310654,
0.28740450739860535,
0.6409984827041626,
-0.6933447122573853,
1.0742340087890625,
0.8695250749588013,
0.7902296781539917,
0.14505165815353394,
0.20385879278182983,
0.4573257565498352,
-0.34168845415115356,
-1.0002779960632324,
-0.03865116462111473,
-1.1883176565170288,
-2.5643560886383057,
0.4566393494606018,
-0.319739431142807,
-1.493580937385559,
-0.016082797199487686,
-1.0685797929763794,
0.8271212577819824,
-0.5058714151382446,
-1.2640433311462402,
-1.5600485801696777,
0.0051129525527358055,
-0.06033891439437866,
0.7762846350669861,
-1.6332552433013916,
-0.05353941395878792,
1.250266432762146,
0.9958111643791199,
-0.6073608994483948,
1.0271060466766357,
0.20274613797664642,
0.9899114370346069,
0.8402200937271118,
-0.2962290048599243,
0.30955496430397034,
0.10028992593288422,
-1.4833747148513794,
0.44297710061073303,
1.169571042060852,
0.1255105584859848,
1.5946762561798096,
-0.6267764568328857,
0.0716782957315445,
0.408914178609848,
-0.16731154918670654,
-0.7214692234992981,
-0.6332598924636841,
0.5757750868797302,
-0.01532093994319439,
-0.8499864339828491,
0.12453091889619827,
-0.21637697517871857,
-0.2777315378189087,
0.14741399884223938,
-1.346909523010254,
-0.25577253103256226,
-0.6794201135635376,
-0.5195854306221008,
-1.3881889581680298,
-0.018314562737941742,
1.4641485214233398,
-0.595672070980072,
-0.14636577665805817,
0.48307374119758606,
0.6610895991325378,
0.4547887444496155,
0.7288908958435059,
-0.5087587237358093,
-0.4234582781791687,
-0.228392094373703,
-0.49924927949905396,
0.4238317608833313,
1.2824680805206299,
-0.3496457636356354,
-0.9714647531509399,
0.5445511937141418,
-0.42909643054008484,
-0.057603999972343445,
1.9245131015777588,
0.06296108663082123,
-0.7674105763435364,
0.4838610887527466,
-0.7976419925689697,
1.9450418949127197,
1.6894066333770752,
1.3726071119308472,
-0.14873738586902618,
-1.0002177953720093,
0.761866569519043,
-0.20732901990413666,
-0.3524377644062042,
0.9003856182098389,
0.255492627620697,
-0.30474865436553955,
-1.5087462663650513,
0.5650458335876465,
1.1718881130218506,
-0.8577020168304443,
-0.8221563696861267,
0.004734506830573082,
-0.6494068503379822,
1.0327097177505493,
0.6345707178115845,
0.4079621732234955,
0.23243960738182068,
1.6972098350524902,
0.8486215472221375,
-0.649545431137085,
0.6150922179222107,
0.5768670439720154,
-0.12587611377239227,
-2.1072473526000977,
-1.073338270187378,
0.26700296998023987,
-0.478657603263855,
-1.5035030841827393,
1.4402258396148682,
-1.111937165260315,
-1.1089121103286743,
0.5871416330337524,
0.1320517361164093,
1.4870270490646362,
0.3900298774242401,
1.491862416267395,
2.038404941558838,
0.8867250680923462,
0.3354779779911041,
1.342332124710083,
-0.24704387784004211,
-0.177570641040802,
1.9948856830596924,
-0.5062177777290344,
0.39581525325775146,
1.093172311782837,
-0.43652254343032837,
-1.0673696994781494,
-0.804844081401825,
-1.1570838689804077,
-0.839409589767456,
1.24616539478302,
0.022164374589920044,
-0.9404539465904236,
0.24230848252773285,
1.4562798738479614,
0.00873956922441721,
-0.2680448889732361,
0.5314553380012512,
0.6493535041809082,
-0.8375062942504883,
-0.025835223495960236,
-0.903018593788147,
0.4899524748325348,
-0.15974900126457214,
-0.4607759118080139,
0.5090526342391968,
0.5508125424385071,
1.3319591283798218,
-0.10086245089769363,
0.11607985943555832,
1.3626893758773804,
-1.488087773323059,
1.3451502323150635,
-0.7067803740501404,
0.0937981978058815,
-2.321413040161133,
1.5286208391189575,
-0.6198567152023315,
1.9908016920089722,
-2.70053768157959,
0.3521028161048889,
-0.7228361368179321,
-0.3302628695964813,
0.4279135763645172,
-0.4056057333946228,
0.17043019831180573,
-0.27977293729782104,
-0.9227602481842041,
-0.011304485611617565,
-0.6554414629936218,
0.4377255439758301,
1.0970429182052612,
1.2170051336288452,
-1.0166923999786377,
-0.2946203649044037,
-1.6213620901107788,
-0.053599532693624496,
-0.6063924431800842,
0.37645769119262695,
-2.182014226913452,
-0.28018918633461,
-2.053399085998535,
-2.2161834239959717,
-1.2910070419311523,
-0.7490718364715576,
1.2611274719238281,
0.33485880494117737,
-0.8824993968009949,
1.0591363906860352,
-0.3756503760814667,
-1.7744183540344238,
0.9868738651275635,
-2.054574728012085
] |
https://github.com/huggingface/datasets/issues/5430
|
Support Apache Beam >= 2.44.0
|
Some of the shard files now have 0 number of rows.
We have opened an issue in the Apache Beam repo:
- https://github.com/apache/beam/issues/25041
|
Once we find out the root cause of:
- #5426
we should revert the temporary pin on apache-beam introduced by:
- #5429
| 340 | 23 |
Support Apache Beam >= 2.44.0
Once we find out the root cause of:
- #5426
we should revert the temporary pin on apache-beam introduced by:
- #5429
Some of the shard files now have 0 number of rows.
We have opened an issue in the Apache Beam repo:
- https://github.com/apache/beam/issues/25041
|
[
-1.2750862836837769,
-0.9439370036125183,
-0.8172897696495056,
1.540722370147705,
-0.22284150123596191,
-1.2459444999694824,
0.0407663993537426,
-0.8248154520988464,
1.5018937587738037,
-0.7695805430412292,
0.36583229899406433,
-1.6501755714416504,
0.011896209791302681,
-0.48872965574264526,
-0.7301815748214722,
-0.7347919344902039,
-0.4053381681442261,
-0.4801347553730011,
1.1673054695129395,
2.4822499752044678,
1.2610163688659668,
-1.4204163551330566,
2.794349431991577,
0.8809512853622437,
-0.31678056716918945,
-1.1057469844818115,
0.6359559297561646,
0.09189511835575104,
-1.4582934379577637,
-0.5826443433761597,
-1.04979407787323,
0.03079092875123024,
-0.3865772783756256,
-0.38973933458328247,
-0.04990838095545769,
0.3788866698741913,
-0.09191408008337021,
-0.4220409691333771,
-0.41873425245285034,
-0.7988792657852173,
0.4061751961708069,
-0.28872308135032654,
0.7689294815063477,
-0.4263833463191986,
1.8166202306747437,
-0.5937559008598328,
0.37864091992378235,
0.7279980778694153,
1.2973544597625732,
0.25537747144699097,
-0.0882095992565155,
0.3245415687561035,
0.47510629892349243,
-0.06355736404657364,
0.5627319812774658,
1.1702418327331543,
0.47361817955970764,
0.44071927666664124,
0.7801491022109985,
-2.185971736907959,
1.4277287721633911,
-0.9863412380218506,
0.27988579869270325,
1.471232533454895,
-1.1491793394088745,
0.3307756185531616,
-1.637966513633728,
-0.11509080231189728,
0.4417242109775543,
-2.322263479232788,
0.3358754813671112,
-1.2531769275665283,
-0.4955981373786926,
0.9509826302528381,
0.34632477164268494,
-1.3206220865249634,
-0.07446379959583282,
-0.473894864320755,
0.9323702454566956,
0.5460845232009888,
1.2153178453445435,
-1.4225387573242188,
0.04210280999541283,
-0.35200953483581543,
0.07091397047042847,
-1.282637596130371,
-1.4192919731140137,
0.5127086639404297,
0.5485336184501648,
0.5266149044036865,
-0.1185627356171608,
0.9424541592597961,
-0.9715549349784851,
0.9344958066940308,
-0.6952210068702698,
-1.6270482540130615,
-1.4808108806610107,
-2.365629196166992,
-2.2186167240142822,
0.8605158925056458,
-0.5219615697860718,
-0.427437961101532,
1.8611335754394531,
-1.1420073509216309,
-1.8133831024169922,
1.0351511240005493,
0.2554122805595398,
0.12666453421115875,
2.4213857650756836,
0.26669883728027344,
-0.6458290219306946,
0.306880384683609,
-0.9706184267997742,
0.8705896139144897,
-0.6330655813217163,
1.322515845298767,
0.4058037996292114,
-1.0794367790222168,
1.6636757850646973,
-0.4306945204734802,
0.5607976317405701,
-0.7673165202140808,
-0.3592588007450104,
-0.7695478200912476,
0.22042803466320038,
1.9491846561431885,
-0.37098124623298645,
1.415076732635498,
-0.44049912691116333,
-1.495470404624939,
-1.4152990579605103,
0.8859384655952454,
0.5101538300514221,
-0.8307967185974121,
0.27517491579055786,
-0.27941739559173584,
0.036806777119636536,
-0.0686420351266861,
0.925701379776001,
1.2942968606948853,
0.8370356559753418,
-0.23129801452159882,
-0.8287903666496277,
0.1166742667555809,
0.04401419311761856,
-0.795548677444458,
-1.7809513807296753,
-0.23846712708473206,
0.058698125183582306,
0.7429910898208618,
-1.1931482553482056,
1.7422124147415161,
1.022729516029358,
2.1173737049102783,
0.8832201361656189,
-0.45731088519096375,
1.5953739881515503,
0.07546234130859375,
1.9617072343826294,
-0.47857335209846497,
0.511902928352356,
-0.4997076392173767,
-1.2093758583068848,
0.8028668761253357,
-0.31185370683670044,
-2.0528347492218018,
-0.7036764025688171,
-0.7631801962852478,
-0.3138946294784546,
-0.7653889060020447,
1.0802463293075562,
-0.30103743076324463,
-1.2949118614196777,
0.09198523312807083,
-0.6959277987480164,
0.18281178176403046,
-1.328996181488037,
0.351820170879364,
0.8231804966926575,
-0.6362541913986206,
-0.023416152223944664,
-0.3037698566913605,
-1.1757572889328003,
-0.6814630627632141,
0.29053378105163574,
1.8072905540466309,
-0.6049518585205078,
1.0403316020965576,
0.8492687344551086,
-0.6358295679092407,
-0.05045737698674202,
0.43984559178352356,
-0.36090272665023804,
0.8422288298606873,
-0.9322130084037781,
-0.4806864261627197,
1.2718346118927002,
-0.30654871463775635,
-0.7140822410583496,
1.5565935373306274,
0.9654123783111572,
-0.8381391763687134,
-0.14246147871017456,
-0.1584305316209793,
-0.7113797068595886,
0.02500224858522415,
-1.4882069826126099,
-0.0621584877371788,
0.2121364325284958,
-1.5339958667755127,
-0.380942702293396,
-0.20873868465423584,
1.3472851514816284,
-0.06117785722017288,
1.420623779296875,
-0.26075223088264465,
-0.22505228221416473,
-0.43203672766685486,
-0.3441073000431061,
0.23573707044124603,
-0.28344616293907166,
-0.45471489429473877,
0.36663317680358887,
-0.7606074810028076,
0.2605014145374298,
1.5574307441711426,
0.352445125579834,
0.000012157019227743149,
0.5418742895126343,
1.014146089553833,
0.2889905869960785,
-0.11132347583770752,
-0.9832334518432617,
-1.520935297012329,
1.992051601409912,
-1.4435815811157227,
1.9025976657867432,
0.9155585169792175,
-0.0984826311469078,
-1.827754020690918,
-2.0085291862487793,
1.220213770866394,
1.0514440536499023,
2.3133859634399414,
0.5298411250114441,
0.5538620948791504,
-0.8269308805465698,
-0.697270393371582,
0.2852318584918976,
-1.0405724048614502,
-0.8776355385780334,
0.008479857817292213,
2.345533609390259,
1.7832236289978027,
-0.3718103766441345,
-0.13027380406856537,
-1.1910163164138794,
1.2745449542999268,
0.0021792412735521793,
0.12652866542339325,
1.7772266864776611,
-0.19952474534511566,
-0.9906662702560425,
1.0071600675582886,
-2.220980644226074,
0.1595984697341919,
2.0205705165863037,
0.22758790850639343,
0.08729346841573715,
-1.3308392763137817,
-0.7500588893890381,
0.005852746311575174,
-0.5017346739768982,
-1.1125061511993408,
0.5900452136993408,
-0.30407166481018066,
-0.8218732476234436,
-1.4177312850952148,
0.04173790290951729,
-1.0156177282333374,
-1.7152634859085083,
0.3331923186779022,
1.8470875024795532,
2.0612823963165283,
-0.8337286114692688,
1.4789243936538696,
-0.12272178381681442,
0.04913478344678879,
1.3140002489089966,
1.2071627378463745,
3.1078572273254395,
2.167598247528076,
-1.270422339439392,
0.6830887794494629,
-0.11610713601112366,
-0.346086323261261,
1.1644644737243652,
-1.2349307537078857,
1.2045536041259766,
-0.1648261994123459,
-1.26017427444458,
-1.2503973245620728,
0.9361502528190613,
0.41546234488487244,
0.16741183400154114,
-0.3930247128009796,
1.086736798286438,
0.18238593637943268,
1.332367181777954,
0.6986551284790039,
-0.33423560857772827,
0.5283491015434265,
-0.3737116754055023,
-0.38514381647109985,
1.7440578937530518,
0.14469552040100098,
-1.4596872329711914,
-2.308701992034912,
-0.13587580621242523,
-0.9315383434295654,
-0.0014269175007939339,
-0.6749625205993652,
-1.0756213665008545,
1.5696189403533936,
0.4834499955177307,
-1.1948007345199585,
-0.434050053358078,
-0.4459342360496521,
-0.7169476747512817,
2.6576192378997803,
-1.3644866943359375,
-0.3642216622829437,
-0.9627019762992859,
-0.4247409999370575,
1.6383823156356812,
-1.1465107202529907,
-0.14787565171718597,
-0.9539748430252075,
-0.5665785074234009,
-1.3382357358932495,
-0.45945462584495544,
-0.028102688491344452,
-0.7892090678215027,
0.8523489832878113,
-0.027033301070332527,
-1.15465247631073,
-0.44806575775146484,
-0.9424569010734558,
0.8085076212882996,
-0.0012637907639145851,
0.3897632956504822,
1.8538050651550293,
0.4279828667640686,
-0.472807914018631,
0.6969029307365417,
1.1922683715820312,
0.5830715298652649,
-0.6424034833908081,
0.29523175954818726,
-0.6728039979934692,
0.3846530616283417,
-1.3145145177841187,
0.25718173384666443,
-2.901662826538086,
0.5315447449684143,
-0.2559111416339874,
-0.1925756335258484,
-0.2456328421831131,
-1.2820321321487427,
1.3007200956344604,
2.359370231628418,
-1.107431411743164,
0.47564852237701416,
0.276926726102829,
1.25504732131958,
-1.7008589506149292,
0.32581257820129395,
-0.592260479927063,
2.146113872528076,
0.15854515135288239,
1.119883418083191,
-0.44704189896583557,
-2.3247764110565186,
0.5110782384872437,
-1.2141515016555786,
-0.9902027249336243,
0.85222989320755,
-0.870781660079956,
-0.08315448462963104,
-1.4146900177001953,
-0.11474846303462982,
-0.9279900789260864,
-1.2969225645065308,
0.7107473015785217,
0.31148651242256165,
0.5982075333595276,
-0.751702606678009,
0.19894564151763916,
-2.2799830436706543,
-1.264187216758728,
-0.16635598242282867,
-0.8882783651351929,
0.4296585023403168,
-0.4460461437702179,
0.6333659887313843,
-0.13843348622322083,
0.10736311227083206,
0.28052136301994324,
1.3979851007461548,
3.2890756130218506,
0.18355326354503632,
0.3486599624156952,
-0.2207588255405426,
-0.8212650418281555,
1.468770146369934,
1.0897561311721802,
-0.12939265370368958,
-0.6375883221626282,
-0.9462802410125732,
1.3303585052490234,
1.8853332996368408,
1.0144294500350952,
0.17882759869098663,
-0.8446101546287537,
-0.711816668510437,
-0.13860049843788147,
0.18412798643112183,
0.4400080740451813,
0.9846357703208923,
0.011166263371706009,
0.02991313487291336,
1.4093126058578491,
1.3411105871200562,
-0.3658820390701294,
0.5089600086212158,
-0.8064696788787842,
-0.22395320236682892,
0.5204026103019714,
0.4260116517543793,
-0.0200947355479002,
0.36003008484840393,
-1.1305474042892456,
-0.3473474383354187,
-0.23998327553272247,
-0.9555923938751221,
-0.7056705951690674,
-0.23404642939567566,
-0.4402405619621277,
1.5090134143829346,
-0.04377518221735954,
-0.5194782018661499,
-0.0937119722366333,
-0.7192258834838867,
-0.03683535382151604,
-1.10188627243042,
0.28872889280319214,
-0.24897578358650208,
0.20584391057491302,
-0.14482659101486206,
1.8159288167953491,
-1.0335352420806885,
-2.3719706535339355,
0.37913286685943604,
0.26952046155929565,
-0.45992469787597656,
0.17270532250404358,
1.7414171695709229,
0.41612428426742554,
1.3722801208496094,
1.4353421926498413,
0.9432438015937805,
-0.65632164478302,
-1.1947563886642456,
0.7400431632995605,
1.0008234977722168,
-1.3996742963790894,
0.764288067817688,
-0.07441321015357971,
-0.5377790927886963,
0.7878864407539368,
1.0182915925979614,
0.3310074806213379,
-2.112569808959961,
0.7627211809158325,
-0.991793155670166,
0.9224858283996582,
0.7052645683288574,
0.8469405770301819,
0.3475535213947296,
0.8363093733787537,
-1.2539290189743042,
-1.1256470680236816,
-0.7287834286689758,
-0.7337868213653564,
2.0129997730255127,
-0.24330966174602509,
0.5187203288078308,
-0.09340772032737732,
-1.1044893264770508,
-0.10563032329082489,
0.6208009123802185,
0.14913664758205414,
-0.34221428632736206,
0.8011875152587891,
-0.6630454659461975,
-1.274815559387207,
-1.3644613027572632,
-0.6505752801895142,
-0.9464977979660034,
-0.9071016311645508,
1.0882529020309448,
0.8240486979484558,
0.21269676089286804,
2.010256767272949,
0.4561281204223633,
0.22874851524829865,
-2.6791629791259766,
0.7739058136940002,
0.21544410288333893,
0.1214892789721489,
0.9721918106079102,
0.28343382477760315,
1.1185029745101929,
0.0350746214389801,
0.40562132000923157,
-2.4289968013763428,
2.3253493309020996,
-0.32355326414108276,
0.6651359796524048,
-0.13565051555633545,
0.047435373067855835,
1.145995020866394,
0.5810935497283936,
0.663541316986084,
-1.0941563844680786,
0.8342281579971313,
-0.474771648645401,
1.1894570589065552,
0.7497854828834534,
-0.9020522832870483,
0.07666376233100891,
1.2764294147491455,
0.5682652592658997,
-0.4289526343345642,
-0.8206456303596497,
-0.8101775050163269,
0.8763532042503357,
1.8659659624099731,
0.17146633565425873,
0.28676241636276245,
0.707371711730957,
0.6009261608123779,
-1.21677827835083,
-0.10932695865631104,
-0.6462502479553223,
-0.7180161476135254,
1.6856403350830078,
2.0777668952941895,
0.031264156103134155,
-0.1873188614845276,
-0.7152401804924011,
-1.333721399307251,
0.6378411650657654,
-0.16812899708747864,
0.1844516098499298,
0.7337890267372131,
-0.6849977970123291,
1.091963291168213,
0.6925094127655029,
0.9811456799507141,
0.17771002650260925,
0.13065241277217865,
0.33950158953666687,
-0.3120791018009186,
-1.2487077713012695,
-0.3279363811016083,
-1.2448252439498901,
-2.483710527420044,
0.5648539662361145,
-0.34163668751716614,
-1.480133295059204,
0.18502788245677948,
-1.2263857126235962,
0.9637138843536377,
-0.49226170778274536,
-1.1035038232803345,
-1.321641206741333,
-0.03170328959822655,
-0.30482468008995056,
0.7600142955780029,
-1.615317940711975,
-0.03716694936156273,
1.3420342206954956,
0.9495654106140137,
-0.6124927401542664,
1.140949010848999,
0.3799728751182556,
1.1054027080535889,
0.8575902581214905,
-0.37100932002067566,
0.4133785367012024,
0.19477935135364532,
-1.4294978380203247,
0.42521899938583374,
1.303277850151062,
0.04639806970953941,
1.557206392288208,
-0.7737984657287598,
-0.025204429402947426,
0.4991762638092041,
-0.3509334623813629,
-0.7297923564910889,
-0.4974682033061981,
0.6116786003112793,
-0.005955800414085388,
-1.2005354166030884,
0.03503638133406639,
-0.16209089756011963,
-0.15746183693408966,
0.04310474544763565,
-1.393772840499878,
-0.3043414056301117,
-0.4095284938812256,
-0.5381543040275574,
-1.306124210357666,
0.08675844222307205,
1.3472801446914673,
-0.693316638469696,
-0.05616919323801994,
0.6763161420822144,
0.3028557300567627,
0.5291720032691956,
0.7802304625511169,
-0.6260300278663635,
-0.4901355504989624,
-0.1242193803191185,
-0.4671332538127899,
0.5615705847740173,
1.3552467823028564,
-0.13866612315177917,
-0.8425398468971252,
0.47856929898262024,
-0.29514801502227783,
0.12506869435310364,
2.13716459274292,
0.11957193166017532,
-0.7775688171386719,
0.4328790009021759,
-0.7368704080581665,
2.0001814365386963,
1.5119071006774902,
1.4467343091964722,
-0.0842752531170845,
-0.9010649919509888,
0.5594885945320129,
-0.21648196876049042,
-0.469007670879364,
0.7564120292663574,
0.40142133831977844,
-0.25001442432403564,
-1.4172908067703247,
0.412900447845459,
1.1353380680084229,
-1.0281881093978882,
-0.7649929523468018,
0.06522763520479202,
-0.7004153728485107,
1.0953129529953003,
0.785908579826355,
0.2737305164337158,
0.22579573094844818,
1.4794549942016602,
0.8257676362991333,
-0.622400164604187,
0.44590917229652405,
0.459306925535202,
0.04098086059093475,
-2.0740137100219727,
-0.9460952877998352,
0.38926637172698975,
-0.3737991154193878,
-1.478999137878418,
1.2520493268966675,
-1.176544427871704,
-1.0533126592636108,
0.6281591653823853,
0.07475727796554565,
1.4354581832885742,
0.36634570360183716,
1.5882742404937744,
2.015536308288574,
0.9258033633232117,
0.2055668830871582,
1.3024406433105469,
-0.12570129334926605,
-0.47039952874183655,
1.8553937673568726,
-0.49294450879096985,
0.566714346408844,
1.1093192100524902,
-0.3817528784275055,
-1.1203159093856812,
-0.701803982257843,
-1.1841366291046143,
-0.7806732058525085,
1.2102855443954468,
0.15713024139404297,
-0.9925416111946106,
0.16603755950927734,
1.4688934087753296,
0.015845635905861855,
-0.18329650163650513,
0.507106602191925,
0.4922829866409302,
-0.8068777918815613,
-0.008282437920570374,
-1.0006636381149292,
0.5606034398078918,
-0.23469987511634827,
-0.580171525478363,
0.29914817214012146,
0.5327186584472656,
1.212607502937317,
-0.077275849878788,
0.07181291282176971,
1.3411202430725098,
-1.4378522634506226,
1.4831215143203735,
-0.7984554767608643,
0.13687248528003693,
-2.233870029449463,
1.5116158723831177,
-0.8914614915847778,
1.8056714534759521,
-2.7546873092651367,
0.37694352865219116,
-0.5413041710853577,
-0.4569639563560486,
0.30732041597366333,
-0.32956641912460327,
0.1637759506702423,
-0.2448378950357437,
-0.9147307872772217,
-0.12227046489715576,
-0.6885945200920105,
0.3189566135406494,
1.1866426467895508,
1.3255560398101807,
-1.0227874517440796,
-0.3376648724079132,
-1.685441017150879,
-0.18322162330150604,
-0.6443076729774475,
0.367505818605423,
-1.9447979927062988,
-0.2104114145040512,
-1.9740713834762573,
-2.2365732192993164,
-1.2627761363983154,
-0.9383722543716431,
1.2357611656188965,
0.3525739312171936,
-1.0360548496246338,
0.9235818982124329,
-0.39387327432632446,
-1.5949288606643677,
0.9457119107246399,
-2.246098041534424
] |
https://github.com/huggingface/datasets/issues/5428
|
Load/Save FAISS index using fsspec
|
Hi! Sure, feel free to submit a PR. Maybe if we want to be consistent with the existing API, it would be cleaner to directly add support for `fsspec` paths in `Dataset.load_faiss_index`/`Dataset.save_faiss_index` in the same manner as it was done in `Dataset.load_from_disk`/`Dataset.save_to_disk`.
|
### Feature request
From what I understand `faiss` already support this [link](https://github.com/facebookresearch/faiss/wiki/Index-IO,-cloning-and-hyper-parameter-tuning#generic-io-support)
I would like to use a stream as input to `Dataset.load_faiss_index` and `Dataset.save_faiss_index`.
### Motivation
In my case, I'm saving faiss index in cloud storage and use `fsspec` to load them. It would be ideal if I could send the stream directly instead of copying the file locally (or mounting the bucket) and then load the index.
### Your contribution
I can submit the PR
| 341 | 42 |
Load/Save FAISS index using fsspec
### Feature request
From what I understand `faiss` already support this [link](https://github.com/facebookresearch/faiss/wiki/Index-IO,-cloning-and-hyper-parameter-tuning#generic-io-support)
I would like to use a stream as input to `Dataset.load_faiss_index` and `Dataset.save_faiss_index`.
### Motivation
In my case, I'm saving faiss index in cloud storage and use `fsspec` to load them. It would be ideal if I could send the stream directly instead of copying the file locally (or mounting the bucket) and then load the index.
### Your contribution
I can submit the PR
Hi! Sure, feel free to submit a PR. Maybe if we want to be consistent with the existing API, it would be cleaner to directly add support for `fsspec` paths in `Dataset.load_faiss_index`/`Dataset.save_faiss_index` in the same manner as it was done in `Dataset.load_from_disk`/`Dataset.save_to_disk`.
|
[
-1.1222985982894897,
-0.8920488357543945,
-0.7614911198616028,
1.5106948614120483,
-0.12036654353141785,
-1.264846682548523,
0.21462397277355194,
-0.9880435466766357,
1.6212654113769531,
-0.9347405433654785,
0.3081521689891815,
-1.6232985258102417,
0.09116572141647339,
-0.6534204483032227,
-0.790542483329773,
-0.8552838563919067,
-0.419661283493042,
-0.6785492300987244,
1.0052958726882935,
2.452084541320801,
1.2279078960418701,
-1.3265893459320068,
2.7248644828796387,
0.6182934045791626,
-0.2618981897830963,
-1.014487624168396,
0.4067520797252655,
0.08315016329288483,
-1.1947470903396606,
-0.4357001483440399,
-0.9201067090034485,
-0.15661276876926422,
-0.6104298830032349,
-0.524512529373169,
0.0679878294467926,
0.391008198261261,
-0.3604837656021118,
-0.4625842869281769,
-0.4472070634365082,
-0.9490340352058411,
0.47701364755630493,
-0.4120859205722809,
1.0706911087036133,
-0.3394770920276642,
1.7997397184371948,
-0.605525016784668,
0.5281816124916077,
0.660778284072876,
1.4101895093917847,
0.10592173039913177,
-0.010541345924139023,
0.29970672726631165,
0.4659212827682495,
0.054226163774728775,
0.48325273394584656,
1.1105748414993286,
0.6061645746231079,
0.5448141694068909,
0.7119877338409424,
-2.1133673191070557,
1.375396966934204,
-0.9934160113334656,
0.19768975675106049,
1.2975914478302002,
-0.9877435564994812,
0.43284276127815247,
-1.7043100595474243,
-0.15252968668937683,
0.5176796317100525,
-2.2394330501556396,
0.1603206843137741,
-1.3153603076934814,
-0.5232124924659729,
1.0043407678604126,
0.36410802602767944,
-1.2357124090194702,
0.21874016523361206,
-0.38348090648651123,
0.9638209939002991,
0.4200000464916229,
1.0763373374938965,
-1.7488024234771729,
0.01562662236392498,
-0.1821349561214447,
0.08696337044239044,
-1.3337510824203491,
-1.433092713356018,
0.4852699041366577,
0.6891385316848755,
0.6896942257881165,
-0.17368631064891815,
1.084044337272644,
-0.9759655594825745,
0.8413087129592896,
-1.0794475078582764,
-1.7233997583389282,
-1.2385246753692627,
-2.374768018722534,
-2.511939764022827,
0.830206573009491,
-0.47772130370140076,
-0.5146804451942444,
2.0983238220214844,
-0.9620585441589355,
-1.8832634687423706,
1.106956958770752,
0.14559561014175415,
-0.01143593154847622,
2.293423652648926,
0.1821250170469284,
-0.7015883326530457,
0.5740048885345459,
-0.6914013624191284,
0.8298371434211731,
-0.5309645533561707,
1.3458210229873657,
0.5325065851211548,
-1.0901240110397339,
1.5215613842010498,
-0.38151660561561584,
0.576061487197876,
-0.760270893573761,
-0.44782954454421997,
-0.7538018226623535,
0.39523598551750183,
1.9089006185531616,
-0.21463756263256073,
1.5535862445831299,
-0.3095022737979889,
-1.5951744318008423,
-1.6055099964141846,
0.9134309887886047,
0.38358214497566223,
-0.7426636815071106,
0.208689346909523,
-0.23341453075408936,
0.09811553359031677,
0.08955807983875275,
1.105724811553955,
1.3027615547180176,
0.6849097013473511,
-0.3721947968006134,
-0.9295732378959656,
0.3266350030899048,
-0.11709195375442505,
-0.7227444648742676,
-1.7539530992507935,
-0.32211220264434814,
0.19844576716423035,
0.5901363492012024,
-1.140601634979248,
1.8096212148666382,
0.820131242275238,
1.994330644607544,
1.0455402135849,
-0.26610323786735535,
1.510575771331787,
-0.029764756560325623,
1.9550508260726929,
-0.44371604919433594,
0.6110440492630005,
-0.413152277469635,
-1.0651543140411377,
0.7629300951957703,
-0.4536133408546448,
-2.0070950984954834,
-0.6685010194778442,
-0.869078516960144,
-0.18625430762767792,
-0.7786445021629333,
0.9173962473869324,
-0.1770661175251007,
-1.441827416419983,
0.2780298888683319,
-0.6973127126693726,
0.19111190736293793,
-1.2253695726394653,
0.31830960512161255,
0.7451366186141968,
-0.6863309741020203,
0.034035131335258484,
-0.35073113441467285,
-1.3232284784317017,
-0.5654233694076538,
0.3972340226173401,
1.8618559837341309,
-0.6774992942810059,
0.926281750202179,
0.9771356582641602,
-0.7301153540611267,
-0.02385784685611725,
0.35556262731552124,
-0.37554213404655457,
0.690993070602417,
-1.1123549938201904,
-0.4148140847682953,
1.2306760549545288,
-0.3064552843570709,
-0.6666349768638611,
1.4215954542160034,
0.8311440944671631,
-1.0276424884796143,
-0.11581374704837799,
-0.1820356249809265,
-0.7878006100654602,
0.0826340913772583,
-1.558549165725708,
-0.1007281094789505,
0.3500173091888428,
-1.4467041492462158,
-0.384716659784317,
-0.22777065634727478,
1.2038507461547852,
-0.14772778749465942,
1.4346284866333008,
-0.29111596941947937,
-0.2924031913280487,
-0.4133475422859192,
-0.5496054887771606,
0.13615719974040985,
-0.2779252231121063,
-0.6579175591468811,
0.16837966442108154,
-0.6265442967414856,
0.48264768719673157,
1.3434243202209473,
0.2131359875202179,
0.0828511118888855,
0.48245230317115784,
1.131508231163025,
0.2891060411930084,
-0.13762183487415314,
-0.8798745274543762,
-1.4863051176071167,
1.963834285736084,
-1.3204104900360107,
1.8923121690750122,
0.6351697444915771,
-0.0194789357483387,
-1.775173544883728,
-1.8532170057296753,
1.3131914138793945,
1.2131844758987427,
2.317265033721924,
0.5497609376907349,
0.3427593410015106,
-0.7735363841056824,
-0.6530568599700928,
0.2652553915977478,
-1.039786458015442,
-0.6965636014938354,
0.10548646748065948,
2.398240804672241,
1.6853502988815308,
-0.46393123269081116,
-0.25550881028175354,
-1.087561845779419,
1.4443247318267822,
-0.28626710176467896,
0.16607500612735748,
2.093402624130249,
-0.3791646957397461,
-0.9794155359268188,
1.2520289421081543,
-2.39564847946167,
0.25813016295433044,
2.02420973777771,
0.2341317981481552,
0.02524804323911667,
-1.4244862794876099,
-0.709753692150116,
-0.29101938009262085,
-0.35573017597198486,
-1.2073378562927246,
0.46401625871658325,
-0.31142184138298035,
-0.7415710687637329,
-1.383025050163269,
0.22814145684242249,
-1.0763684511184692,
-1.735163927078247,
0.2963116466999054,
1.8398046493530273,
1.9974277019500732,
-0.686619758605957,
1.4880057573318481,
-0.22291351854801178,
0.16118016839027405,
1.3516521453857422,
1.1890517473220825,
3.1548306941986084,
2.0207901000976562,
-1.1379632949829102,
0.7005020380020142,
-0.16540515422821045,
-0.4902138411998749,
1.2467008829116821,
-1.0973011255264282,
1.2514151334762573,
-0.1559537798166275,
-1.279062271118164,
-1.3295186758041382,
0.8908513784408569,
0.4744761884212494,
0.07408510148525238,
-0.5497205257415771,
1.2834832668304443,
0.16906079649925232,
1.3002451658248901,
0.5338501334190369,
-0.3426823616027832,
0.6759629249572754,
-0.3712227940559387,
-0.4395733177661896,
1.6235414743423462,
0.3195415735244751,
-1.436239242553711,
-2.283560037612915,
-0.17488087713718414,
-0.8078883290290833,
-0.10257124900817871,
-0.6750208139419556,
-0.9574010968208313,
1.710632562637329,
0.4980286955833435,
-1.2515205144882202,
-0.23718391358852386,
-0.29075130820274353,
-0.6496760845184326,
2.7759883403778076,
-1.4088599681854248,
-0.25524166226387024,
-1.0293526649475098,
-0.6137964725494385,
1.7364301681518555,
-1.2761266231536865,
-0.15855029225349426,
-1.0010170936584473,
-0.5518388152122498,
-1.3423781394958496,
-0.40436872839927673,
-0.01165272668004036,
-0.8776999711990356,
0.701167106628418,
0.12266628444194794,
-1.252849817276001,
-0.28148767352104187,
-0.9368002414703369,
0.8102107048034668,
-0.14111045002937317,
0.30620357394218445,
1.8050986528396606,
0.45757144689559937,
-0.38337084650993347,
0.7421461939811707,
1.1429709196090698,
0.5729362964630127,
-0.6871863007545471,
0.21420101821422577,
-0.765225350856781,
0.34484753012657166,
-1.2904893159866333,
0.35415977239608765,
-2.850947856903076,
0.6188212633132935,
-0.14544370770454407,
-0.14766104519367218,
-0.008677367120981216,
-1.3196147680282593,
1.0984776020050049,
2.6742360591888428,
-1.2721757888793945,
0.5067662596702576,
0.31597769260406494,
1.3119086027145386,
-1.5575575828552246,
0.3318433165550232,
-0.36673519015312195,
2.1151654720306396,
0.14916357398033142,
1.1764559745788574,
-0.4580775201320648,
-2.288736581802368,
0.5700409412384033,
-1.190299391746521,
-1.1103178262710571,
0.7494674921035767,
-0.7605541944503784,
0.05284680053591728,
-1.3229914903640747,
-0.17808616161346436,
-0.7284885048866272,
-1.2897688150405884,
0.7537115216255188,
0.16726970672607422,
0.5436887741088867,
-0.6258293986320496,
0.2851051688194275,
-2.1496315002441406,
-1.4223814010620117,
-0.20638509094715118,
-0.8774654269218445,
0.3990115225315094,
-0.3741891086101532,
0.6267361044883728,
-0.25973638892173767,
-0.016107015311717987,
0.16805827617645264,
1.5205395221710205,
3.421884059906006,
0.19701093435287476,
0.4053892195224762,
-0.17363344132900238,
-0.8518899083137512,
1.3903443813323975,
0.8587075471878052,
-0.14878614246845245,
-0.5078093409538269,
-0.9798209071159363,
1.250321626663208,
1.989025354385376,
0.9955159425735474,
0.12566640973091125,
-0.8212308287620544,
-0.7683283686637878,
-0.051911622285842896,
0.1138092577457428,
0.458061546087265,
0.9807056784629822,
0.08929142355918884,
0.012098686769604683,
1.3530579805374146,
1.2220226526260376,
-0.35688096284866333,
0.39229616522789,
-0.9023899435997009,
-0.345512330532074,
0.4876523017883301,
0.3040403127670288,
-0.0015363553538918495,
0.3098854720592499,
-0.9205111265182495,
-0.2367243468761444,
-0.33936572074890137,
-0.9635078310966492,
-0.8272727131843567,
-0.45442652702331543,
-0.41595757007598877,
1.7179718017578125,
0.07977817952632904,
-0.46481671929359436,
-0.026120588183403015,
-0.7198148965835571,
-0.033510662615299225,
-0.923227071762085,
0.18074460327625275,
-0.10921710729598999,
-0.1389860063791275,
-0.03786228224635124,
1.8527555465698242,
-1.1007373332977295,
-2.099259376525879,
0.32423269748687744,
0.20285870134830475,
-0.35378560423851013,
0.20860622823238373,
1.5618973970413208,
0.4953274130821228,
1.4980331659317017,
1.401937484741211,
1.075822114944458,
-0.6771641373634338,
-1.3972679376602173,
0.7269704341888428,
0.9215580821037292,
-1.4183541536331177,
0.8052636981010437,
0.0705016702413559,
-0.4547456204891205,
0.6151047945022583,
1.2163928747177124,
0.3472500443458557,
-1.9975539445877075,
0.6876877546310425,
-0.9362897872924805,
0.7431853413581848,
0.8129016757011414,
0.6499999761581421,
0.2547385096549988,
0.8550839424133301,
-1.2307634353637695,
-1.15984308719635,
-0.7049951553344727,
-0.6729548573493958,
1.8767755031585693,
-0.2572019696235657,
0.60541832447052,
-0.137899711728096,
-1.3936697244644165,
-0.07195146381855011,
0.8690819144248962,
0.3881290853023529,
-0.4531528353691101,
0.8150011301040649,
-0.7032878994941711,
-0.9296313524246216,
-1.4879403114318848,
-0.563595175743103,
-1.0824246406555176,
-0.9507115483283997,
1.00845468044281,
0.8396594524383545,
0.19607631862163544,
1.880918025970459,
0.6290850639343262,
0.2691181004047394,
-2.6548209190368652,
0.8302707076072693,
0.2592628598213196,
-0.017474038526415825,
0.8771159052848816,
0.3112660050392151,
1.1234867572784424,
-0.11078000068664551,
0.6015039086341858,
-2.364863395690918,
2.288086414337158,
-0.27799755334854126,
0.5788190960884094,
0.04954379051923752,
-0.10737697780132294,
1.0864218473434448,
0.4491223394870758,
0.5429290533065796,
-1.2005568742752075,
0.707980751991272,
-0.6995213031768799,
1.251787543296814,
0.8414288759231567,
-0.8508617281913757,
0.07051511108875275,
1.4273524284362793,
0.47309714555740356,
-0.5259697437286377,
-0.9440262317657471,
-1.0146033763885498,
0.9727925062179565,
1.5971715450286865,
-0.04137212783098221,
-0.05138935521245003,
0.8743396997451782,
0.6891127228736877,
-1.369445562362671,
0.03737194091081619,
-0.6802628040313721,
-0.7261841297149658,
1.7031008005142212,
2.005980968475342,
-0.15773838758468628,
-0.19185742735862732,
-0.8602442741394043,
-1.091468095779419,
0.7326924204826355,
0.22328923642635345,
-0.06294353306293488,
0.605259120464325,
-0.6646258234977722,
1.1863948106765747,
0.7987964153289795,
0.8034862279891968,
0.18013803660869598,
0.32938292622566223,
0.4400566816329956,
-0.3757098913192749,
-1.2235398292541504,
-0.20495225489139557,
-1.1103768348693848,
-2.553987741470337,
0.4297754764556885,
-0.23098282516002655,
-1.5181634426116943,
0.10816371440887451,
-1.0790772438049316,
0.9096477627754211,
-0.5596408843994141,
-1.1670565605163574,
-1.5445058345794678,
0.20776262879371643,
-0.20007789134979248,
0.909246563911438,
-1.60319983959198,
-0.03923062980175018,
1.149641513824463,
0.8360138535499573,
-0.6465764045715332,
1.030441164970398,
0.22683754563331604,
1.0747703313827515,
0.9546669721603394,
-0.4228966236114502,
0.4683336913585663,
0.12653368711471558,
-1.337014079093933,
0.5428569316864014,
1.1614471673965454,
0.18731608986854553,
1.2998323440551758,
-0.649867832660675,
0.0170708280056715,
0.3747605085372925,
-0.5437353849411011,
-0.5620880126953125,
-0.650861918926239,
0.7417804598808289,
0.06571128964424133,
-0.901279866695404,
0.11891190707683563,
-0.05986788868904114,
-0.28741687536239624,
0.17890852689743042,
-1.5365691184997559,
-0.11814801394939423,
-0.32775747776031494,
-0.5890955328941345,
-1.288859248161316,
0.03473363444209099,
1.2947564125061035,
-0.7453209757804871,
-0.12825369834899902,
0.5495820641517639,
0.3578328788280487,
0.4590489864349365,
0.5024954676628113,
-0.6789745688438416,
-0.30385932326316833,
-0.30865877866744995,
-0.2579643130302429,
0.3184735178947449,
1.2447268962860107,
-0.017532125115394592,
-0.9699735641479492,
0.7871544361114502,
-0.3684460520744324,
0.12563084065914154,
1.9696890115737915,
0.134225994348526,
-0.848914623260498,
0.26699692010879517,
-0.7501757144927979,
1.9111417531967163,
1.7297052145004272,
1.300574779510498,
-0.052227236330509186,
-1.0174144506454468,
0.5597712993621826,
-0.24116723239421844,
-0.3298042118549347,
0.9339793920516968,
0.39813217520713806,
-0.22424152493476868,
-1.3253728151321411,
0.5756006240844727,
1.2067233324050903,
-0.7277752757072449,
-0.9178274869918823,
0.05843152478337288,
-0.841312050819397,
1.0232129096984863,
0.6207757592201233,
0.42765238881111145,
0.18671098351478577,
1.6672481298446655,
0.6687938570976257,
-0.44079989194869995,
0.686636209487915,
0.5409772992134094,
-0.15528744459152222,
-1.9163055419921875,
-1.2382127046585083,
0.2680421471595764,
-0.4564196765422821,
-1.6289690732955933,
1.395431637763977,
-1.1487151384353638,
-0.912118673324585,
0.550879180431366,
0.2034119814634323,
1.4941149950027466,
0.23479928076267242,
1.5185775756835938,
2.091614007949829,
0.86952143907547,
0.46586206555366516,
1.2712608575820923,
-0.1777724325656891,
-0.4885973036289215,
1.8993879556655884,
-0.4405771493911743,
0.49695950746536255,
1.0690968036651611,
-0.37066206336021423,
-1.006048321723938,
-0.8317531943321228,
-1.091602087020874,
-0.6293305158615112,
1.0957565307617188,
0.1599976122379303,
-1.0813592672348022,
0.27262821793556213,
1.6289324760437012,
0.1475433111190796,
-0.32447800040245056,
0.6022196412086487,
0.3411332666873932,
-0.7861862778663635,
0.04536205530166626,
-0.9744859933853149,
0.5763654112815857,
-0.143668532371521,
-0.3352201581001282,
0.40914973616600037,
0.3923148810863495,
1.1947476863861084,
0.00875929743051529,
0.1676333248615265,
1.1784629821777344,
-1.4362964630126953,
1.4950861930847168,
-0.6446995139122009,
0.33519119024276733,
-2.2983648777008057,
1.470310926437378,
-0.8251725435256958,
1.8511686325073242,
-2.6510491371154785,
0.24812929332256317,
-0.6591583490371704,
-0.5236698389053345,
0.3811136484146118,
-0.4068819284439087,
0.15480341017246246,
-0.11066834628582001,
-1.1416062116622925,
-0.044157516211271286,
-0.7607405781745911,
0.5915108919143677,
1.166357159614563,
1.3677698373794556,
-1.119668960571289,
-0.28094059228897095,
-1.7858285903930664,
-0.0878443568944931,
-0.584121823310852,
0.4594172239303589,
-1.9563308954238892,
-0.13520900905132294,
-1.9735820293426514,
-2.2776222229003906,
-1.3619012832641602,
-0.8307918310165405,
0.9497668743133545,
0.06828874349594116,
-0.905825674533844,
1.1672078371047974,
-0.29017841815948486,
-1.8268492221832275,
1.1875838041305542,
-2.167689085006714
] |
https://github.com/huggingface/datasets/issues/5427
|
Unable to download dataset id_clickbait
|
Thanks for reporting, @ilos-vigil.
We have transferred this issue to the corresponding dataset on the Hugging Face Hub: https://huggingface.co/datasets/id_clickbait/discussions/1
|
### Describe the bug
I tried to download dataset `id_clickbait`, but receive this error message.
```
FileNotFoundError: Couldn't find file at https://md-datasets-cache-zipfiles-prod.s3.eu-west-1.amazonaws.com/k42j7x2kpn-1.zip
```
When i open the link using browser, i got this XML data.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>md-datasets-cache-zipfiles-prod</BucketName><RequestId>NVRM6VEEQD69SD00</RequestId><HostId>W/SPDxLGvlCGi0OD6d7mSDvfOAUqLAfvs9nTX50BkJrjMny+X9Jnqp/Li2lG9eTUuT4MUkAA2jjTfCrCiUmu7A==</HostId></Error>
```
### Steps to reproduce the bug
Code snippet:
```
from datasets import load_dataset
load_dataset('id_clickbait', 'annotated')
load_dataset('id_clickbait', 'raw')
```
Link to Kaggle notebook: https://www.kaggle.com/code/ilosvigil/bug-check-on-id-clickbait-dataset
### Expected behavior
Successfully download and load `id_newspaper` dataset.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
| 342 | 19 |
Unable to download dataset id_clickbait
### Describe the bug
I tried to download dataset `id_clickbait`, but receive this error message.
```
FileNotFoundError: Couldn't find file at https://md-datasets-cache-zipfiles-prod.s3.eu-west-1.amazonaws.com/k42j7x2kpn-1.zip
```
When i open the link using browser, i got this XML data.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>md-datasets-cache-zipfiles-prod</BucketName><RequestId>NVRM6VEEQD69SD00</RequestId><HostId>W/SPDxLGvlCGi0OD6d7mSDvfOAUqLAfvs9nTX50BkJrjMny+X9Jnqp/Li2lG9eTUuT4MUkAA2jjTfCrCiUmu7A==</HostId></Error>
```
### Steps to reproduce the bug
Code snippet:
```
from datasets import load_dataset
load_dataset('id_clickbait', 'annotated')
load_dataset('id_clickbait', 'raw')
```
Link to Kaggle notebook: https://www.kaggle.com/code/ilosvigil/bug-check-on-id-clickbait-dataset
### Expected behavior
Successfully download and load `id_newspaper` dataset.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
Thanks for reporting, @ilos-vigil.
We have transferred this issue to the corresponding dataset on the Hugging Face Hub: https://huggingface.co/datasets/id_clickbait/discussions/1
|
[
-1.1930586099624634,
-0.8530861139297485,
-0.6839118003845215,
1.3900913000106812,
-0.12742212414741516,
-1.2396419048309326,
0.1807224154472351,
-1.1172120571136475,
1.6125329732894897,
-0.6963998079299927,
0.2914436459541321,
-1.6744513511657715,
-0.07168597728013992,
-0.5758096575737,
-0.7109668254852295,
-0.8617343902587891,
-0.3124232888221741,
-0.8041707873344421,
1.0979444980621338,
2.488210678100586,
1.1642558574676514,
-1.3736821413040161,
2.7488455772399902,
0.6343121528625488,
-0.2775803804397583,
-0.9488170146942139,
0.512356162071228,
-0.0012758467346429825,
-1.355783224105835,
-0.3962564468383789,
-0.874893844127655,
-0.09212002158164978,
-0.6324406862258911,
-0.5302335619926453,
0.07412977516651154,
0.4228768050670624,
-0.24452871084213257,
-0.44950181245803833,
-0.5080604553222656,
-0.7651205062866211,
0.49923399090766907,
-0.36960339546203613,
0.8345004320144653,
-0.32196375727653503,
1.7453575134277344,
-0.6203364729881287,
0.5015255212783813,
0.6194209456443787,
1.3354696035385132,
0.2345910370349884,
-0.014858919195830822,
0.3382661044597626,
0.3544248044490814,
-0.028087325394153595,
0.5103732347488403,
1.1367679834365845,
0.6733658909797668,
0.47371581196784973,
0.6938918232917786,
-2.228844404220581,
1.2967674732208252,
-0.8627071380615234,
0.25319796800613403,
1.3533073663711548,
-0.9340837001800537,
0.3515546917915344,
-1.8606547117233276,
-0.05022706091403961,
0.48048046231269836,
-2.2536635398864746,
0.2815214991569519,
-1.3308333158493042,
-0.5035046935081482,
0.9311041831970215,
0.34687817096710205,
-1.2107815742492676,
0.08033277839422226,
-0.4122045338153839,
1.0004892349243164,
0.4246489703655243,
1.1997227668762207,
-1.6485284566879272,
-0.0008982401341199875,
-0.27085617184638977,
0.18809734284877777,
-1.1733520030975342,
-1.577101707458496,
0.5613855123519897,
0.6325128078460693,
0.5697462558746338,
-0.16990214586257935,
0.8845908045768738,
-1.0092158317565918,
0.7137598991394043,
-0.9735155701637268,
-1.8038012981414795,
-1.396532654762268,
-2.2692723274230957,
-2.298924207687378,
0.7293184995651245,
-0.48627957701683044,
-0.40938109159469604,
2.056659698486328,
-1.0114588737487793,
-1.8080129623413086,
1.0719103813171387,
0.31772199273109436,
-0.03148597851395607,
2.314307689666748,
0.2606211304664612,
-0.7637515664100647,
0.5247155427932739,
-0.8215616941452026,
0.7057591080665588,
-0.4256124794483185,
1.3496923446655273,
0.4001150131225586,
-0.9889590740203857,
1.5762513875961304,
-0.4178135395050049,
0.625819981098175,
-0.7736834287643433,
-0.4598189890384674,
-0.7865527868270874,
0.22483254969120026,
1.9771867990493774,
-0.24599523842334747,
1.5960814952850342,
-0.333707720041275,
-1.5357381105422974,
-1.4654868841171265,
0.8681154847145081,
0.5490669012069702,
-0.7987498044967651,
0.18561139702796936,
-0.4334633946418762,
0.1712687611579895,
0.016659710556268692,
1.0568020343780518,
1.2625327110290527,
0.8003398776054382,
-0.26420390605926514,
-0.9039903879165649,
0.15707117319107056,
-0.015589884482324123,
-0.732296884059906,
-1.8072292804718018,
-0.23459163308143616,
0.1135878786444664,
0.6690737009048462,
-1.2852020263671875,
1.7302409410476685,
0.8521967530250549,
1.9807283878326416,
1.0237665176391602,
-0.4191688597202301,
1.5467785596847534,
0.12012588232755661,
1.852307677268982,
-0.4564549922943115,
0.6705046892166138,
-0.37182149291038513,
-1.1044237613677979,
0.7749403119087219,
-0.3131225109100342,
-2.0152084827423096,
-0.5935744047164917,
-0.8547731637954712,
-0.18018847703933716,
-0.7996898889541626,
0.9713470935821533,
-0.2481311708688736,
-1.4016164541244507,
0.2423921525478363,
-0.7546287178993225,
0.18426060676574707,
-1.335896611213684,
0.29871320724487305,
0.803087592124939,
-0.6269854307174683,
0.08097190409898758,
-0.3821840286254883,
-1.2587112188339233,
-0.5154809951782227,
0.31992319226264954,
1.8473901748657227,
-0.7631697654724121,
0.9409248232841492,
1.0424697399139404,
-0.7201188206672668,
-0.034127071499824524,
0.39491620659828186,
-0.262704074382782,
0.8099979162216187,
-1.0748153924942017,
-0.35342976450920105,
1.1580147743225098,
-0.15959258377552032,
-0.4912799000740051,
1.4698247909545898,
0.7479493021965027,
-1.0429664850234985,
-0.1951366513967514,
-0.1220502108335495,
-0.8177871704101562,
-0.02858695387840271,
-1.6630885601043701,
-0.09722155332565308,
0.30496349930763245,
-1.5677149295806885,
-0.5492421984672546,
-0.19444061815738678,
1.2961421012878418,
-0.10599341243505478,
1.3867350816726685,
-0.23777681589126587,
-0.09786854684352875,
-0.40133392810821533,
-0.41296297311782837,
0.09535351395606995,
-0.2629747986793518,
-0.6663159132003784,
0.30092477798461914,
-0.743305504322052,
0.24561375379562378,
1.5049904584884644,
0.26274415850639343,
0.012163626961410046,
0.5600008368492126,
1.0738757848739624,
0.38359689712524414,
-0.06052308529615402,
-0.8392865657806396,
-1.5944956541061401,
1.9869686365127563,
-1.5077455043792725,
1.9561518430709839,
0.8115977644920349,
-0.08329824358224869,
-1.815279245376587,
-1.9243383407592773,
1.4056735038757324,
1.1024800539016724,
2.50205397605896,
0.6093661785125732,
0.4685507118701935,
-0.8197633028030396,
-0.5978986024856567,
0.3176942467689514,
-0.8787524700164795,
-0.7997187972068787,
0.12284430116415024,
2.366240978240967,
1.6692661046981812,
-0.5319917798042297,
-0.2647762894630432,
-0.9761507511138916,
1.389155626296997,
-0.16457559168338776,
0.2535240352153778,
1.9343278408050537,
-0.24813349545001984,
-1.0873380899429321,
1.2722431421279907,
-2.3365752696990967,
0.2195442169904709,
2.0374977588653564,
0.2535935938358307,
0.0831628143787384,
-1.3718681335449219,
-0.6607933044433594,
-0.23793119192123413,
-0.44356676936149597,
-1.2732130289077759,
0.45423808693885803,
-0.15185759961605072,
-0.7293174266815186,
-1.5372005701065063,
0.13170912861824036,
-1.1039268970489502,
-1.6993626356124878,
0.29758307337760925,
1.933146357536316,
2.0173935890197754,
-0.7835257649421692,
1.456023931503296,
-0.32142066955566406,
0.1932998150587082,
1.2192662954330444,
1.140358805656433,
3.124176025390625,
1.9399288892745972,
-1.3372939825057983,
0.7749798893928528,
-0.1743011474609375,
-0.47826120257377625,
1.1629512310028076,
-1.119031548500061,
1.1629700660705566,
-0.24306978285312653,
-1.191744089126587,
-1.2375290393829346,
0.8560628890991211,
0.4616224467754364,
-0.0135559793561697,
-0.46914270520210266,
1.2351644039154053,
0.08319441229104996,
1.367983341217041,
0.5879797339439392,
-0.33273664116859436,
0.6118308305740356,
-0.3232387900352478,
-0.5110306739807129,
1.5813095569610596,
0.1947089582681656,
-1.442789077758789,
-2.421809673309326,
-0.1880352795124054,
-0.8867735266685486,
0.009320623241364956,
-0.6473513245582581,
-1.0216012001037598,
1.5859148502349854,
0.4549303650856018,
-1.0921937227249146,
-0.22518818080425262,
-0.36120134592056274,
-0.6153272986412048,
2.6149914264678955,
-1.4758917093276978,
-0.19286061823368073,
-0.9826972484588623,
-0.5763059258460999,
1.5877710580825806,
-1.1564621925354004,
-0.23840075731277466,
-1.0248178243637085,
-0.5333013534545898,
-1.3347384929656982,
-0.5026988983154297,
-0.04169073700904846,
-0.8573912978172302,
0.8679119348526001,
0.19200778007507324,
-1.2588868141174316,
-0.2584310472011566,
-0.9299237132072449,
0.8698049187660217,
-0.11231529712677002,
0.24066397547721863,
1.8356581926345825,
0.4209543466567993,
-0.3482462465763092,
0.7771041989326477,
1.1543478965759277,
0.5681002736091614,
-0.6470147967338562,
0.1761508285999298,
-0.6203755140304565,
0.30455106496810913,
-1.3606107234954834,
0.20665594935417175,
-2.8521087169647217,
0.6642550230026245,
-0.06752875447273254,
-0.03343459591269493,
-0.06896865367889404,
-1.3550196886062622,
1.102960467338562,
2.5382590293884277,
-1.1467639207839966,
0.5422437787055969,
0.34927865862846375,
1.2184877395629883,
-1.5687357187271118,
0.2336428463459015,
-0.4458198547363281,
2.0849502086639404,
0.20554734766483307,
1.1927496194839478,
-0.40727803111076355,
-2.3644683361053467,
0.5228771567344666,
-1.2127389907836914,
-1.175502896308899,
0.7804275751113892,
-0.7997394800186157,
0.024007145315408707,
-1.4360520839691162,
-0.17073436081409454,
-0.8966090679168701,
-1.2573628425598145,
0.7542704939842224,
0.09937132894992828,
0.5141909122467041,
-0.7136226892471313,
0.37901571393013,
-2.219954490661621,
-1.3724111318588257,
-0.23988176882266998,
-0.9363691210746765,
0.3840312361717224,
-0.3284730911254883,
0.7478786110877991,
-0.15080024302005768,
0.00715689267963171,
0.36196228861808777,
1.4015235900878906,
3.3371782302856445,
0.13275054097175598,
0.3260355591773987,
-0.2564115822315216,
-1.0141698122024536,
1.4890568256378174,
0.9267730712890625,
-0.1425066590309143,
-0.5731608271598816,
-1.0552111864089966,
1.2159792184829712,
1.9327012300491333,
1.0431932210922241,
0.03035861626267433,
-0.9009701609611511,
-0.7247074246406555,
0.0456278994679451,
0.1919277161359787,
0.4862718880176544,
0.9620101451873779,
0.10265425592660904,
0.12191066890954971,
1.3887537717819214,
1.1700025796890259,
-0.365037202835083,
0.4648202061653137,
-0.8503908514976501,
-0.4373958706855774,
0.5557727217674255,
0.35009151697158813,
0.008702426217496395,
0.3390098512172699,
-1.050256371498108,
-0.2076590210199356,
-0.3404000401496887,
-0.8804956078529358,
-0.7090073823928833,
-0.4626692533493042,
-0.32476019859313965,
1.6234787702560425,
0.019971877336502075,
-0.48767906427383423,
-0.03740932047367096,
-0.7273555397987366,
-0.08152995258569717,
-1.0613398551940918,
0.2740366458892822,
-0.11807266622781754,
-0.033510368317365646,
0.013217381201684475,
1.7070159912109375,
-0.9645093679428101,
-2.109282970428467,
0.2809406816959381,
0.30662801861763,
-0.3911205530166626,
0.10827673226594925,
1.7685199975967407,
0.5959399938583374,
1.3442575931549072,
1.3739553689956665,
1.040154218673706,
-0.7148939371109009,
-1.3062537908554077,
0.6357253193855286,
0.9476770162582397,
-1.3169399499893188,
0.7970752120018005,
-0.016822967678308487,
-0.5921977162361145,
0.5423899292945862,
1.3064498901367188,
0.4455491304397583,
-1.9959230422973633,
0.8066605925559998,
-0.9271476864814758,
0.787907063961029,
0.7393874526023865,
0.8240599036216736,
0.18480081856250763,
0.8423939347267151,
-1.2613908052444458,
-1.0566673278808594,
-0.7171090841293335,
-0.6489793658256531,
1.856480598449707,
-0.20670653879642487,
0.45650890469551086,
-0.18624596297740936,
-1.2733278274536133,
-0.07505428045988083,
0.7302482724189758,
0.3910072147846222,
-0.43425893783569336,
0.7174027562141418,
-0.6090030074119568,
-1.125797986984253,
-1.2625335454940796,
-0.447344571352005,
-1.0015324354171753,
-0.9514161348342896,
1.0533045530319214,
0.8508758544921875,
0.3971472680568695,
1.8739023208618164,
0.6624479293823242,
0.15925332903862,
-2.7139387130737305,
0.8984830975532532,
0.3398050367832184,
-0.07473168522119522,
0.9453264474868774,
0.3864911198616028,
1.1233289241790771,
0.024616029113531113,
0.589484691619873,
-2.4293131828308105,
2.2769994735717773,
-0.252714604139328,
0.6638221740722656,
-0.07118973135948181,
-0.09547862410545349,
1.1080667972564697,
0.536773145198822,
0.5400856733322144,
-1.0410548448562622,
0.7949707508087158,
-0.6228788495063782,
1.1455883979797363,
0.9544252157211304,
-0.8899396657943726,
0.057208843529224396,
1.307985544204712,
0.3856236934661865,
-0.5455225110054016,
-0.9195558428764343,
-0.9128977060317993,
0.9179108142852783,
1.7813256978988647,
-0.061776723712682724,
0.02160460129380226,
0.8538407683372498,
0.6784448027610779,
-1.3966186046600342,
0.04651866480708122,
-0.6896611452102661,
-0.7545623779296875,
1.7506229877471924,
2.0486695766448975,
-0.04239417612552643,
-0.16008062660694122,
-0.7741383910179138,
-1.2698291540145874,
0.7935985922813416,
0.08262903988361359,
0.09891307353973389,
0.7024194598197937,
-0.6565337777137756,
1.1354589462280273,
0.7851845026016235,
0.970051646232605,
0.14679519832134247,
0.2289484441280365,
0.33552470803260803,
-0.2471124827861786,
-1.132220983505249,
-0.25529947876930237,
-1.1194190979003906,
-2.4689717292785645,
0.4673011898994446,
-0.2332666665315628,
-1.367294192314148,
0.06793372333049774,
-1.0228948593139648,
0.8539237976074219,
-0.5654510259628296,
-1.111850619316101,
-1.4498027563095093,
0.16219109296798706,
-0.12555716931819916,
0.8244056701660156,
-1.5694904327392578,
-0.13947226107120514,
1.2351782321929932,
0.9340654611587524,
-0.677801787853241,
0.9993596076965332,
0.27540284395217896,
0.979962944984436,
0.8959312438964844,
-0.3703857958316803,
0.4767368733882904,
0.12876403331756592,
-1.3132885694503784,
0.4464486837387085,
1.2609835863113403,
0.25367864966392517,
1.4481370449066162,
-0.5876724720001221,
0.014167827554047108,
0.3803528845310211,
-0.40728580951690674,
-0.4573148488998413,
-0.6563994288444519,
0.6526834964752197,
0.021504420787096024,
-0.9636959433555603,
0.0030475426465272903,
-0.04633697122335434,
-0.09331383556127548,
0.20817619562149048,
-1.5241177082061768,
-0.15666206181049347,
-0.3658123314380646,
-0.6026131510734558,
-1.292229413986206,
-0.06561258435249329,
1.3604302406311035,
-0.7926068305969238,
-0.1472434550523758,
0.5163091421127319,
0.2841818034648895,
0.5102623105049133,
0.5697234272956848,
-0.7148510217666626,
-0.356261283159256,
-0.21958324313163757,
-0.4465738534927368,
0.27703240513801575,
1.3067363500595093,
-0.14086313545703888,
-1.0937505960464478,
0.6367903351783752,
-0.40354257822036743,
0.09559962898492813,
1.8989111185073853,
0.0375899076461792,
-0.8230401873588562,
0.32806673645973206,
-0.6923961043357849,
1.9478710889816284,
1.7280263900756836,
1.3740921020507812,
-0.12058888375759125,
-0.9668893218040466,
0.6140071749687195,
-0.3415665030479431,
-0.3821503520011902,
0.91844642162323,
0.4796734154224396,
-0.21785105764865875,
-1.4161534309387207,
0.6491241455078125,
1.3297815322875977,
-0.8597973585128784,
-0.8096557259559631,
0.07754208892583847,
-0.7958627939224243,
1.1971800327301025,
0.6905446648597717,
0.39578965306282043,
0.25615060329437256,
1.6016218662261963,
0.7147939205169678,
-0.5468557476997375,
0.6058278679847717,
0.4650686979293823,
-0.16313856840133667,
-2.0200977325439453,
-1.1726224422454834,
0.45222190022468567,
-0.33301666378974915,
-1.619321346282959,
1.4767911434173584,
-1.2709048986434937,
-0.9596801400184631,
0.5658564567565918,
0.14065562188625336,
1.3903812170028687,
0.3272010385990143,
1.6286869049072266,
2.0725908279418945,
0.9383328557014465,
0.4058116376399994,
1.2056682109832764,
-0.24818594753742218,
-0.4624834358692169,
1.7170950174331665,
-0.43678018450737,
0.5362606644630432,
1.1205462217330933,
-0.40246716141700745,
-1.1260801553726196,
-0.8442977070808411,
-1.247921347618103,
-0.7301884293556213,
1.1718744039535522,
0.11735742539167404,
-1.2446430921554565,
0.31450819969177246,
1.6730425357818604,
0.06985319405794144,
-0.26087623834609985,
0.7651057839393616,
0.41114094853401184,
-0.786145806312561,
-0.07004543393850327,
-1.037899374961853,
0.5128679275512695,
-0.27124154567718506,
-0.3476702570915222,
0.24734342098236084,
0.518926203250885,
1.2579408884048462,
0.08678735047578812,
0.11826645582914352,
1.282431721687317,
-1.3333028554916382,
1.4187229871749878,
-0.7042362093925476,
0.2602103054523468,
-2.3643500804901123,
1.4301652908325195,
-0.8038102388381958,
1.9511765241622925,
-2.6130876541137695,
0.4500896632671356,
-0.5531702637672424,
-0.40408098697662354,
0.22249816358089447,
-0.2649020254611969,
0.15313614904880524,
-0.16312015056610107,
-1.118465542793274,
-0.16296817362308502,
-0.8058900833129883,
0.5156499147415161,
1.1349228620529175,
1.3649224042892456,
-1.0700273513793945,
-0.2280372977256775,
-1.7218512296676636,
-0.1673215925693512,
-0.592881441116333,
0.2418365180492401,
-1.8945120573043823,
-0.1694829910993576,
-2.024353504180908,
-2.403681516647339,
-1.3529314994812012,
-0.8092666268348694,
1.1140129566192627,
0.12398945540189743,
-0.8833608627319336,
1.1202672719955444,
-0.3453429341316223,
-1.8191477060317993,
1.0996140241622925,
-2.1730501651763916
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
Hi!
`Dataset.sort` calls `df.sort_values` internally, and `df.sort_values` brings all the "sort" columns in memory, so sorting on multiple keys could be very expensive. This makes me think that maybe we can replace `df.sort_values` with `pyarrow.compute.sort_indices` - the latter can also sort on multiple keys and currently loads the data into memory; however, there is a plan to eventually implement "memory-map" friendly kernels for the Arrow compute ops (using the Acero execution engine).
So to address this issue, you should replace `df.sort_values` with `pyarrow.compute.sort_indices` in `Dataset.sort` and adjust the signature of this function (deprecate the `kind` parameter, etc.).
PS: Feel free to ping us if you need some additional help/pointers
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 109 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
Hi!
`Dataset.sort` calls `df.sort_values` internally, and `df.sort_values` brings all the "sort" columns in memory, so sorting on multiple keys could be very expensive. This makes me think that maybe we can replace `df.sort_values` with `pyarrow.compute.sort_indices` - the latter can also sort on multiple keys and currently loads the data into memory; however, there is a plan to eventually implement "memory-map" friendly kernels for the Arrow compute ops (using the Acero execution engine).
So to address this issue, you should replace `df.sort_values` with `pyarrow.compute.sort_indices` in `Dataset.sort` and adjust the signature of this function (deprecate the `kind` parameter, etc.).
PS: Feel free to ping us if you need some additional help/pointers
|
[
-1.2507238388061523,
-0.9375834465026855,
-0.6712387204170227,
1.4547932147979736,
-0.14533424377441406,
-1.3173452615737915,
0.20516350865364075,
-1.07721745967865,
1.7774194478988647,
-0.8531342148780823,
0.33074915409088135,
-1.6261314153671265,
0.08578143268823624,
-0.6216345429420471,
-0.8279362916946411,
-0.8958352208137512,
-0.4106583893299103,
-0.8175151348114014,
0.9721699357032776,
2.529446601867676,
1.230391025543213,
-1.3926786184310913,
2.679671049118042,
0.6939613223075867,
-0.13882002234458923,
-0.9604293704032898,
0.5579766631126404,
0.008752823807299137,
-1.3702878952026367,
-0.4562307298183441,
-0.9798457026481628,
-0.0944526344537735,
-0.6104192137718201,
-0.520500123500824,
0.03597291558980942,
0.42561283707618713,
-0.24745234847068787,
-0.4130506217479706,
-0.557659924030304,
-0.7665232419967651,
0.4195166826248169,
-0.40234506130218506,
0.9950045943260193,
-0.37249693274497986,
1.8776140213012695,
-0.5399981737136841,
0.5078900456428528,
0.6953365802764893,
1.3409292697906494,
0.2096223533153534,
-0.11886052787303925,
0.2555636465549469,
0.384369820356369,
0.02009505406022072,
0.4956214129924774,
1.1082465648651123,
0.6634950637817383,
0.4687677025794983,
0.7028689384460449,
-2.211028575897217,
1.337498664855957,
-1.0243802070617676,
0.35561084747314453,
1.3243693113327026,
-1.0199016332626343,
0.3765887916088104,
-1.810111165046692,
-0.09892718493938446,
0.5368055701255798,
-2.2901968955993652,
0.1474282145500183,
-1.2546364068984985,
-0.5292831063270569,
1.0235012769699097,
0.3463573753833771,
-1.2822859287261963,
0.08613859862089157,
-0.455670028924942,
0.9684199094772339,
0.46669435501098633,
1.167479395866394,
-1.6719008684158325,
-0.10182320326566696,
-0.31725794076919556,
0.1777769923210144,
-1.2875138521194458,
-1.5512274503707886,
0.5565586090087891,
0.6751430034637451,
0.475456565618515,
-0.09788703173398972,
0.9932134747505188,
-1.0589267015457153,
0.8121024370193481,
-0.917953372001648,
-1.7577183246612549,
-1.4187228679656982,
-2.2322545051574707,
-2.346592426300049,
0.7819704413414001,
-0.4671418070793152,
-0.4961318373680115,
2.029963493347168,
-1.0096631050109863,
-1.7754641771316528,
1.1287734508514404,
0.3202073872089386,
-0.10112335532903671,
2.4126923084259033,
0.1245851069688797,
-0.7026795148849487,
0.43493545055389404,
-0.7422037124633789,
0.7747340202331543,
-0.5231922268867493,
1.338572382926941,
0.39143285155296326,
-1.0312749147415161,
1.510678768157959,
-0.436473548412323,
0.5710979104042053,
-0.6854559183120728,
-0.4358592629432678,
-0.7467795610427856,
0.3290870487689972,
1.9010202884674072,
-0.38060322403907776,
1.548858404159546,
-0.2830420732498169,
-1.5632269382476807,
-1.6357307434082031,
0.8617522716522217,
0.5078247785568237,
-0.7607299089431763,
0.05640492960810661,
-0.44188398122787476,
0.14526060223579407,
-0.0268113873898983,
1.0232042074203491,
1.3054368495941162,
0.762090802192688,
-0.28981107473373413,
-0.7872651815414429,
0.26240280270576477,
-0.15593795478343964,
-0.7023292183876038,
-1.7800642251968384,
-0.31800827383995056,
0.13251781463623047,
0.6691904664039612,
-1.166053295135498,
1.73679780960083,
0.8600196242332458,
1.9255975484848022,
1.0070759057998657,
-0.35424280166625977,
1.5325583219528198,
0.014311517588794231,
1.8328074216842651,
-0.5349458456039429,
0.6739881634712219,
-0.4001976549625397,
-1.0704278945922852,
0.8640725016593933,
-0.328230619430542,
-2.0166237354278564,
-0.661666989326477,
-0.8137897253036499,
-0.16788043081760406,
-0.7467547059059143,
0.9305863380432129,
-0.20167501270771027,
-1.383487343788147,
0.217802956700325,
-0.7084473371505737,
0.09605627506971359,
-1.1978873014450073,
0.35237783193588257,
0.7691836357116699,
-0.5988687872886658,
0.10089981555938721,
-0.2861889898777008,
-1.3476313352584839,
-0.40884456038475037,
0.30056846141815186,
1.7783950567245483,
-0.7579091191291809,
0.8758689761161804,
1.0281591415405273,
-0.7707315683364868,
0.00432602409273386,
0.42621955275535583,
-0.35341882705688477,
0.8890575170516968,
-1.0677469968795776,
-0.41118937730789185,
1.1647371053695679,
-0.19282332062721252,
-0.5475196838378906,
1.4284918308258057,
0.695980429649353,
-0.9902203679084778,
-0.14654679596424103,
-0.1514890342950821,
-0.8261933326721191,
0.06037348881363869,
-1.6376004219055176,
-0.12292861938476562,
0.3902965486049652,
-1.5526862144470215,
-0.49367624521255493,
-0.2657783329486847,
1.26521635055542,
-0.12720537185668945,
1.4755911827087402,
-0.32649117708206177,
-0.1416359841823578,
-0.36971941590309143,
-0.3462889492511749,
0.08576124161481857,
-0.2192779928445816,
-0.5289219617843628,
0.31611698865890503,
-0.7412684559822083,
0.35691529512405396,
1.4606348276138306,
0.2922297418117523,
0.03433017060160637,
0.6191812753677368,
1.0367891788482666,
0.41993239521980286,
-0.1249702051281929,
-0.8463773727416992,
-1.6082631349563599,
2.043060541152954,
-1.456298589706421,
1.9645874500274658,
0.7987778186798096,
0.05690235272049904,
-1.8249284029006958,
-1.9272290468215942,
1.3819949626922607,
1.100042700767517,
2.3669118881225586,
0.6064217686653137,
0.38584524393081665,
-0.8054848313331604,
-0.5738879442214966,
0.3987138271331787,
-1.0020086765289307,
-0.7534319162368774,
0.17202475666999817,
2.353506088256836,
1.7753126621246338,
-0.46740972995758057,
-0.15335579216480255,
-1.082412600517273,
1.4892933368682861,
-0.1259956657886505,
0.1870613992214203,
1.9752060174942017,
-0.2896186113357544,
-0.9832656383514404,
1.2808643579483032,
-2.2882578372955322,
0.14572732150554657,
1.922938346862793,
0.1665990650653839,
0.007548418827354908,
-1.4081730842590332,
-0.5808248519897461,
-0.2626834511756897,
-0.3499263525009155,
-1.2404733896255493,
0.4986473023891449,
-0.23586861789226532,
-0.7919464707374573,
-1.4579675197601318,
0.1431179791688919,
-1.1402448415756226,
-1.6183630228042603,
0.2046833336353302,
1.9190261363983154,
1.9588217735290527,
-0.7219105362892151,
1.6027038097381592,
-0.2924208343029022,
0.10505689680576324,
1.2170699834823608,
1.1638927459716797,
3.182342529296875,
1.9243088960647583,
-1.3291046619415283,
0.6556774377822876,
-0.08525388687849045,
-0.44108402729034424,
1.1296567916870117,
-1.2044663429260254,
1.295328140258789,
-0.1287965029478073,
-1.1913045644760132,
-1.1560125350952148,
1.027742862701416,
0.48412755131721497,
0.0770195722579956,
-0.5074954032897949,
1.2232881784439087,
0.04757734388113022,
1.3534138202667236,
0.5406938195228577,
-0.31117668747901917,
0.65458083152771,
-0.4030216336250305,
-0.5746298432350159,
1.5881915092468262,
0.2728181779384613,
-1.2930010557174683,
-2.3178083896636963,
-0.2219046801328659,
-0.8588274121284485,
0.04609980806708336,
-0.5576794147491455,
-0.9534997940063477,
1.6182135343551636,
0.4349462389945984,
-1.2714117765426636,
-0.30966049432754517,
-0.2955242693424225,
-0.6453378200531006,
2.613213539123535,
-1.342028021812439,
-0.1948285847902298,
-0.9654037356376648,
-0.5836331844329834,
1.5259343385696411,
-1.2758445739746094,
-0.2758505046367645,
-1.0483354330062866,
-0.5528052449226379,
-1.2434251308441162,
-0.6521148085594177,
-0.029640022665262222,
-0.9209969639778137,
0.788680374622345,
0.16294875741004944,
-1.2115496397018433,
-0.3669264018535614,
-0.882806122303009,
0.8682442903518677,
-0.035039886832237244,
0.1891244500875473,
1.8566731214523315,
0.3806154131889343,
-0.40414008498191833,
0.7156133651733398,
1.09196138381958,
0.6123608350753784,
-0.6360272765159607,
0.26073986291885376,
-0.7215494513511658,
0.28172367811203003,
-1.1905105113983154,
0.3051917850971222,
-2.847975969314575,
0.6296913623809814,
-0.07766473293304443,
-0.11999443173408508,
-0.04933818057179451,
-1.3360038995742798,
1.0686386823654175,
2.6413700580596924,
-1.1288515329360962,
0.5074004530906677,
0.28816840052604675,
1.2161036729812622,
-1.5593647956848145,
0.3212592601776123,
-0.45732417702674866,
2.148113489151001,
0.17838245630264282,
1.139356255531311,
-0.5234934687614441,
-2.249418020248413,
0.6281096339225769,
-1.2914713621139526,
-1.2045385837554932,
0.8006917834281921,
-0.8799368143081665,
0.031419623643159866,
-1.3585981130599976,
-0.16064593195915222,
-0.7801583409309387,
-1.256635308265686,
0.667332112789154,
0.046732816845178604,
0.5008718371391296,
-0.6158206462860107,
0.3442184329032898,
-2.1424105167388916,
-1.3117179870605469,
-0.2253442257642746,
-0.9712932109832764,
0.48548343777656555,
-0.31755468249320984,
0.6840618848800659,
-0.156711608171463,
0.0030426327139139175,
0.34639066457748413,
1.3821296691894531,
3.37923264503479,
0.1509239673614502,
0.37661752104759216,
-0.18948619067668915,
-0.9304440021514893,
1.419215202331543,
0.9297576546669006,
-0.15507909655570984,
-0.6029621958732605,
-1.0672544240951538,
1.3080503940582275,
2.0252389907836914,
1.0857691764831543,
0.023184437304735184,
-0.7556707859039307,
-0.7443434000015259,
0.012901206500828266,
0.14783917367458344,
0.47118672728538513,
0.9246940612792969,
0.0948776975274086,
0.13088589906692505,
1.4748976230621338,
1.2967292070388794,
-0.45919856429100037,
0.45852765440940857,
-0.8020349144935608,
-0.4875136613845825,
0.4584091603755951,
0.35023829340934753,
-0.05906176567077637,
0.27541986107826233,
-0.97560715675354,
-0.24363292753696442,
-0.40834277868270874,
-0.9670976996421814,
-0.6685402989387512,
-0.44108232855796814,
-0.31222453713417053,
1.733996033668518,
0.1228560358285904,
-0.4595640301704407,
-0.010577643290162086,
-0.7794251441955566,
-0.034850284457206726,
-1.030731201171875,
0.2796580195426941,
-0.13636720180511475,
-0.09598281234502792,
-0.08313574641942978,
1.8184162378311157,
-0.8854840993881226,
-2.065006732940674,
0.24206767976284027,
0.12564221024513245,
-0.3363378345966339,
0.17892611026763916,
1.6017801761627197,
0.5458717346191406,
1.4823262691497803,
1.4323755502700806,
0.9365684390068054,
-0.7057285904884338,
-1.337538480758667,
0.6678211688995361,
0.9716947674751282,
-1.3139193058013916,
0.8118055462837219,
0.007448294200003147,
-0.5694940090179443,
0.6634482145309448,
1.2599214315414429,
0.431627482175827,
-2.0560600757598877,
0.8339644074440002,
-0.9017213582992554,
0.7087054252624512,
0.6925107836723328,
0.7617574334144592,
0.22424796223640442,
0.7893324494361877,
-1.2488046884536743,
-1.1441057920455933,
-0.7677547931671143,
-0.6533095240592957,
1.9968855381011963,
-0.21359339356422424,
0.5929528474807739,
-0.13940611481666565,
-1.4479929208755493,
-0.13487084209918976,
0.6602626442909241,
0.3982562720775604,
-0.5058404803276062,
0.7538082003593445,
-0.6422187089920044,
-1.1009045839309692,
-1.3804714679718018,
-0.5123052597045898,
-1.0981425046920776,
-0.8936832547187805,
1.0351649522781372,
0.8322774171829224,
0.30053064227104187,
1.8859275579452515,
0.6063340902328491,
0.23577181994915009,
-2.6601319313049316,
0.9284209609031677,
0.3866879343986511,
-0.04683198034763336,
0.8777967095375061,
0.3613744080066681,
1.0349397659301758,
-0.10768050700426102,
0.5015910267829895,
-2.3765668869018555,
2.3605566024780273,
-0.23268356919288635,
0.7533503174781799,
0.07213158905506134,
-0.13080212473869324,
1.1520559787750244,
0.5323106646537781,
0.5730470418930054,
-1.028220295906067,
0.6547878980636597,
-0.6467604637145996,
1.2665513753890991,
0.8635649085044861,
-0.7781878709793091,
-0.12444955855607986,
1.3240946531295776,
0.4428842067718506,
-0.4650777578353882,
-0.9480313658714294,
-1.0918705463409424,
0.9548498392105103,
1.826899528503418,
-0.06457114219665527,
0.04660063609480858,
0.8593506813049316,
0.6325721144676208,
-1.2754358053207397,
0.029675044119358063,
-0.8492639660835266,
-0.8117731213569641,
1.6296377182006836,
1.9945285320281982,
-0.13959261775016785,
-0.2100370079278946,
-0.8547532558441162,
-1.3440942764282227,
0.713174045085907,
0.026273678988218307,
0.13129769265651703,
0.6659123301506042,
-0.5462745428085327,
1.1309624910354614,
0.9405376315116882,
0.9805726408958435,
0.19680240750312805,
0.21989810466766357,
0.3395324647426605,
-0.3480863571166992,
-1.1522454023361206,
-0.25470682978630066,
-1.0417653322219849,
-2.603097915649414,
0.5098658204078674,
-0.2281235158443451,
-1.5274003744125366,
-0.05514243617653847,
-0.9285644292831421,
0.9106166958808899,
-0.538647472858429,
-1.0809725522994995,
-1.5170384645462036,
0.24488820135593414,
-0.17490756511688232,
0.9483691453933716,
-1.6013615131378174,
-0.03670474886894226,
1.2352489233016968,
0.9088978171348572,
-0.5936354994773865,
1.0274901390075684,
0.2468729168176651,
0.9977654814720154,
0.8603455424308777,
-0.354280561208725,
0.4340643882751465,
0.12452183663845062,
-1.3089489936828613,
0.450598806142807,
1.1377227306365967,
0.1450834721326828,
1.3634370565414429,
-0.5795137286186218,
-0.014971340075135231,
0.3573787808418274,
-0.45697221159935,
-0.4334169328212738,
-0.555723249912262,
0.6892397403717041,
-0.01132151111960411,
-0.899744987487793,
0.09604944288730621,
-0.10978977382183075,
-0.2218025177717209,
0.12931109964847565,
-1.5002208948135376,
-0.14156639575958252,
-0.3216492235660553,
-0.6567444205284119,
-1.2315336465835571,
-0.05158711597323418,
1.366523265838623,
-0.7696471214294434,
-0.2678503096103668,
0.4711662530899048,
0.41890430450439453,
0.5240107178688049,
0.6598501801490784,
-0.6521978974342346,
-0.35678601264953613,
-0.20715543627738953,
-0.45551198720932007,
0.3131050169467926,
1.3714734315872192,
-0.10448995977640152,
-0.9519262909889221,
0.7778354287147522,
-0.33765172958374023,
0.04207231476902962,
1.933607578277588,
0.11712890863418579,
-0.8286663889884949,
0.25174689292907715,
-0.6178979873657227,
1.8287508487701416,
1.7660586833953857,
1.3692817687988281,
-0.06039619818329811,
-0.9718993902206421,
0.6166468262672424,
-0.29837849736213684,
-0.43941113352775574,
0.9127291440963745,
0.41447731852531433,
-0.1908443123102188,
-1.3828094005584717,
0.5789519548416138,
1.2477946281433105,
-0.8282253742218018,
-0.8441603779792786,
0.057433854788541794,
-0.7802345156669617,
1.1598652601242065,
0.7490803003311157,
0.39298126101493835,
0.2165771722793579,
1.5860364437103271,
0.7798112630844116,
-0.45797398686408997,
0.5446454286575317,
0.48959147930145264,
-0.19686800241470337,
-2.1432228088378906,
-1.0905160903930664,
0.3266275227069855,
-0.5302221775054932,
-1.6304019689559937,
1.378241777420044,
-1.122632622718811,
-0.8727260231971741,
0.4581262469291687,
0.09511397033929825,
1.4775489568710327,
0.36571717262268066,
1.5671906471252441,
2.0641162395477295,
0.8846901059150696,
0.3479517996311188,
1.3063873052597046,
-0.14905881881713867,
-0.4447758197784424,
1.8446252346038818,
-0.4882258474826813,
0.5000485777854919,
1.1262754201889038,
-0.36946335434913635,
-0.9624741077423096,
-0.7676772475242615,
-1.1851557493209839,
-0.6877850890159607,
1.1731735467910767,
0.05264665558934212,
-1.0830973386764526,
0.2312767207622528,
1.5872396230697632,
0.12261325120925903,
-0.2980025112628937,
0.6083840727806091,
0.41236940026283264,
-0.726668655872345,
-0.10941293090581894,
-0.8472864627838135,
0.5277895331382751,
-0.2720518708229065,
-0.41983678936958313,
0.39311426877975464,
0.45754554867744446,
1.2758203744888306,
0.021409984678030014,
0.10772755742073059,
1.060228943824768,
-1.354246973991394,
1.4634519815444946,
-0.6685702800750732,
0.22914275527000427,
-2.347050189971924,
1.4183378219604492,
-0.673735499382019,
1.905834436416626,
-2.674457550048828,
0.42357730865478516,
-0.5483271479606628,
-0.4249824285507202,
0.2845734655857086,
-0.3301323354244232,
0.1561025083065033,
-0.19595053791999817,
-1.2028919458389282,
-0.11766968667507172,
-0.6699455976486206,
0.5614649653434753,
1.0764120817184448,
1.3067598342895508,
-1.1025969982147217,
-0.30565133690834045,
-1.7215543985366821,
-0.11836332827806473,
-0.6501101851463318,
0.34007272124290466,
-2.0090725421905518,
-0.1644963175058365,
-1.908115029335022,
-2.3652119636535645,
-1.379186987876892,
-0.7891979217529297,
1.1846410036087036,
0.09333077818155289,
-0.8780457973480225,
1.1666287183761597,
-0.31921693682670593,
-1.9078738689422607,
1.112896203994751,
-2.192467451095581
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
@mariosasko If I understand the code right, using `pyarrow.compute.sort_indices` would also require changes to the `select` method if it is meant to sort multiple keys. That's because `select` only accepts 1D input for `indices`, not an iterable or similar which would be required for multiple keys unless you want some looping over selects. Doesn't seem that straight-forward but I might be missing something here...
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 64 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
@mariosasko If I understand the code right, using `pyarrow.compute.sort_indices` would also require changes to the `select` method if it is meant to sort multiple keys. That's because `select` only accepts 1D input for `indices`, not an iterable or similar which would be required for multiple keys unless you want some looping over selects. Doesn't seem that straight-forward but I might be missing something here...
|
[
-1.2212759256362915,
-0.9480838775634766,
-0.7015002369880676,
1.4788826704025269,
-0.10449813306331635,
-1.2614364624023438,
0.1443437933921814,
-1.0273969173431396,
1.7198460102081299,
-0.8230888247489929,
0.33712315559387207,
-1.6211422681808472,
0.12400048971176147,
-0.6231672167778015,
-0.7897970676422119,
-0.8967243432998657,
-0.4175655245780945,
-0.8320342302322388,
1.0372087955474854,
2.54410719871521,
1.188043475151062,
-1.4543894529342651,
2.6413345336914062,
0.6318277716636658,
-0.16248708963394165,
-0.9855530261993408,
0.5121973752975464,
0.012148679234087467,
-1.3464704751968384,
-0.45108067989349365,
-0.9571150541305542,
-0.06522515416145325,
-0.6310639381408691,
-0.5407201647758484,
0.07242157310247421,
0.39116132259368896,
-0.23533262312412262,
-0.4351102411746979,
-0.5205304622650146,
-0.7503244876861572,
0.41657793521881104,
-0.38929006457328796,
0.9863322377204895,
-0.33006173372268677,
1.9225833415985107,
-0.5360679626464844,
0.48667630553245544,
0.6204225420951843,
1.3682228326797485,
0.2101251780986786,
-0.07797654718160629,
0.30604979395866394,
0.3670785129070282,
-0.005008270498365164,
0.4852696657180786,
1.0571200847625732,
0.6589589715003967,
0.47767969965934753,
0.6648422479629517,
-2.2130966186523438,
1.3941317796707153,
-1.03184175491333,
0.31663092970848083,
1.3457809686660767,
-1.0169435739517212,
0.41421371698379517,
-1.7980464696884155,
-0.10255204141139984,
0.5291042327880859,
-2.282684326171875,
0.11615167558193207,
-1.2215542793273926,
-0.48893803358078003,
1.0718516111373901,
0.344209760427475,
-1.2879507541656494,
0.14115452766418457,
-0.46413055062294006,
0.9546628594398499,
0.4479548931121826,
1.187348484992981,
-1.666965126991272,
-0.050597552210092545,
-0.3495820462703705,
0.20090936124324799,
-1.3050751686096191,
-1.5308729410171509,
0.5568209290504456,
0.6763833165168762,
0.48696452379226685,
-0.053772956132888794,
0.9470739960670471,
-1.038611650466919,
0.764564573764801,
-0.9050486087799072,
-1.7697550058364868,
-1.369600772857666,
-2.2651796340942383,
-2.425119638442993,
0.8130166530609131,
-0.46393948793411255,
-0.5431172251701355,
2.024974822998047,
-1.024466872215271,
-1.782397985458374,
1.170267939567566,
0.34005847573280334,
-0.10409048199653625,
2.4474830627441406,
0.13393427431583405,
-0.7111875414848328,
0.4376555383205414,
-0.7580567598342896,
0.8318160176277161,
-0.5025925040245056,
1.353143334388733,
0.47019654512405396,
-1.027154564857483,
1.5209521055221558,
-0.39247605204582214,
0.5302702784538269,
-0.6919465661048889,
-0.4495406448841095,
-0.7620021104812622,
0.35866135358810425,
1.9105437994003296,
-0.361222505569458,
1.580008864402771,
-0.31843701004981995,
-1.5782911777496338,
-1.6219229698181152,
0.847112774848938,
0.47731220722198486,
-0.8002200126647949,
0.11763650178909302,
-0.3735639452934265,
0.15174266695976257,
0.00968202669173479,
1.027090072631836,
1.3392157554626465,
0.6887468695640564,
-0.28685224056243896,
-0.9014154672622681,
0.27793458104133606,
-0.17958375811576843,
-0.6528419256210327,
-1.7838448286056519,
-0.347181111574173,
0.11102896928787231,
0.666430652141571,
-1.1979258060455322,
1.699544072151184,
0.854727029800415,
1.9377059936523438,
1.0119576454162598,
-0.3783229887485504,
1.5444570779800415,
0.019025303423404694,
1.8539594411849976,
-0.5163617134094238,
0.6891114711761475,
-0.4061433672904968,
-1.1155692338943481,
0.8100712299346924,
-0.3728453814983368,
-1.9877337217330933,
-0.6949986815452576,
-0.8368136286735535,
-0.20894286036491394,
-0.7666622996330261,
0.9134372472763062,
-0.19935297966003418,
-1.387471318244934,
0.30161193013191223,
-0.7458895444869995,
0.11469466984272003,
-1.2396293878555298,
0.33483579754829407,
0.8123113512992859,
-0.6244089007377625,
0.09335889667272568,
-0.3121783137321472,
-1.3410123586654663,
-0.44658130407333374,
0.3127041161060333,
1.7996691465377808,
-0.7458266019821167,
0.8930874466896057,
1.0025360584259033,
-0.7335540652275085,
-0.000035470351576805115,
0.4133250415325165,
-0.31688645482063293,
0.8897718787193298,
-1.0632193088531494,
-0.399272084236145,
1.1414215564727783,
-0.21157917380332947,
-0.5474988222122192,
1.3837623596191406,
0.71623694896698,
-0.9768536686897278,
-0.15050601959228516,
-0.16163796186447144,
-0.7766026258468628,
0.05836267024278641,
-1.6438778638839722,
-0.14498154819011688,
0.31379440426826477,
-1.562328577041626,
-0.4800390303134918,
-0.2636508345603943,
1.2524003982543945,
-0.15996597707271576,
1.4585241079330444,
-0.347176730632782,
-0.16040672361850739,
-0.4128090739250183,
-0.37221264839172363,
0.11831669509410858,
-0.21431183815002441,
-0.5352179408073425,
0.3652268052101135,
-0.77357417345047,
0.4083443582057953,
1.3924585580825806,
0.31646212935447693,
0.10037700086832047,
0.5726252198219299,
1.015859603881836,
0.4424079358577728,
-0.08171360194683075,
-0.846308708190918,
-1.5972012281417847,
2.0687434673309326,
-1.4614968299865723,
1.9715579748153687,
0.8370802998542786,
0.04665347933769226,
-1.768555760383606,
-1.8721104860305786,
1.4119420051574707,
1.154679298400879,
2.3835511207580566,
0.6619724035263062,
0.4045248329639435,
-0.8210959434509277,
-0.5524790287017822,
0.39620739221572876,
-0.9704446792602539,
-0.8091523051261902,
0.17465296387672424,
2.355264902114868,
1.715353012084961,
-0.4546605050563812,
-0.15849262475967407,
-1.0442171096801758,
1.4911472797393799,
-0.14464610815048218,
0.16569846868515015,
1.9946379661560059,
-0.26009243726730347,
-1.0427078008651733,
1.2451931238174438,
-2.3504598140716553,
0.16793426871299744,
1.934293508529663,
0.221801295876503,
0.02257489040493965,
-1.4403200149536133,
-0.6338914632797241,
-0.23240770399570465,
-0.34143927693367004,
-1.228990912437439,
0.49371176958084106,
-0.19297786056995392,
-0.8162616491317749,
-1.5023903846740723,
0.15610183775424957,
-1.1448323726654053,
-1.621964693069458,
0.21187736093997955,
1.867490291595459,
1.9939956665039062,
-0.7411792874336243,
1.5674493312835693,
-0.2368948608636856,
0.12730368971824646,
1.2008875608444214,
1.114622712135315,
3.1527676582336426,
1.922707200050354,
-1.2885538339614868,
0.6502063274383545,
-0.08749482035636902,
-0.49423709511756897,
1.1724512577056885,
-1.206874966621399,
1.2997372150421143,
-0.13997818529605865,
-1.227144479751587,
-1.1971287727355957,
1.0072036981582642,
0.4750731885433197,
0.013981732539832592,
-0.538416862487793,
1.2437933683395386,
0.07746472954750061,
1.3374576568603516,
0.49031078815460205,
-0.29129987955093384,
0.6265631318092346,
-0.43752118945121765,
-0.57354336977005,
1.6032767295837402,
0.23081102967262268,
-1.3385536670684814,
-2.2771854400634766,
-0.25261178612709045,
-0.8484464287757874,
0.032185785472393036,
-0.5632418394088745,
-0.9624529480934143,
1.579438328742981,
0.43964582681655884,
-1.23042893409729,
-0.2756485641002655,
-0.33748167753219604,
-0.674095869064331,
2.60701322555542,
-1.3540164232254028,
-0.22874276340007782,
-0.9353311061859131,
-0.5643864274024963,
1.4963470697402954,
-1.2740287780761719,
-0.22335273027420044,
-1.0617806911468506,
-0.5679179430007935,
-1.2266067266464233,
-0.6153802275657654,
-0.09986282885074615,
-0.8720507621765137,
0.7342121005058289,
0.17291589081287384,
-1.1770178079605103,
-0.3554748594760895,
-0.9159154295921326,
0.7977604269981384,
-0.021887842565774918,
0.23945306241512299,
1.8533490896224976,
0.40658605098724365,
-0.4076460897922516,
0.7087404727935791,
1.0949393510818481,
0.5939463376998901,
-0.6143382787704468,
0.27829551696777344,
-0.6947050094604492,
0.2641209661960602,
-1.1715569496154785,
0.3581889867782593,
-2.820183515548706,
0.6374225616455078,
-0.04889216274023056,
-0.10569059103727341,
-0.046931833028793335,
-1.2961044311523438,
1.1191730499267578,
2.64583158493042,
-1.1309443712234497,
0.5020173192024231,
0.30013057589530945,
1.1918503046035767,
-1.588671088218689,
0.3374529480934143,
-0.414485365152359,
2.1897497177124023,
0.19451762735843658,
1.1103235483169556,
-0.5231128931045532,
-2.307305097579956,
0.5823808908462524,
-1.2927438020706177,
-1.1868892908096313,
0.7799990177154541,
-0.8900439143180847,
-0.0005837036296725273,
-1.3342766761779785,
-0.15039809048175812,
-0.7482476830482483,
-1.288405418395996,
0.6960300207138062,
0.03051489219069481,
0.5480139255523682,
-0.5838969945907593,
0.3633016347885132,
-2.1755263805389404,
-1.3573423624038696,
-0.24052512645721436,
-0.9925878047943115,
0.42866507172584534,
-0.3383575975894928,
0.7083435654640198,
-0.17746637761592865,
0.02651773765683174,
0.3376958966255188,
1.3545126914978027,
3.368246555328369,
0.2064346820116043,
0.4337753355503082,
-0.18319487571716309,
-0.9153549671173096,
1.42347252368927,
0.9254802465438843,
-0.19107899069786072,
-0.5788232088088989,
-1.0495786666870117,
1.3184080123901367,
2.0464673042297363,
1.0636097192764282,
0.03506803140044212,
-0.7361227869987488,
-0.7540977597236633,
0.054032593965530396,
0.1647445261478424,
0.47913119196891785,
0.9095352292060852,
0.09741348773241043,
0.15449194610118866,
1.446432113647461,
1.2832621335983276,
-0.4705405533313751,
0.4527469277381897,
-0.791743278503418,
-0.4946340322494507,
0.4535600543022156,
0.33446893095970154,
-0.04074418172240257,
0.3017056882381439,
-0.9464713335037231,
-0.2094055563211441,
-0.3797556757926941,
-0.994115948677063,
-0.7086371779441833,
-0.4250072240829468,
-0.29179972410202026,
1.7542933225631714,
0.13251997530460358,
-0.44950926303863525,
0.006109762936830521,
-0.7942667007446289,
-0.052997443825006485,
-1.0151852369308472,
0.21544283628463745,
-0.0795639380812645,
-0.08704676479101181,
-0.02258918434381485,
1.848629117012024,
-0.9383121728897095,
-2.1132395267486572,
0.19014839828014374,
0.1524275243282318,
-0.36940115690231323,
0.14563827216625214,
1.6446514129638672,
0.4818049371242523,
1.495962142944336,
1.4037336111068726,
1.0043363571166992,
-0.722136914730072,
-1.3379653692245483,
0.6750130653381348,
0.9708213210105896,
-1.3320738077163696,
0.8236996531486511,
0.011655156500637531,
-0.5126539468765259,
0.6238299608230591,
1.2650874853134155,
0.42158132791519165,
-2.0205564498901367,
0.8052669763565063,
-0.9090308547019958,
0.7508612275123596,
0.6548260450363159,
0.7448813319206238,
0.1934177577495575,
0.7573876976966858,
-1.308390736579895,
-1.1125038862228394,
-0.7331177592277527,
-0.6380943059921265,
1.976444959640503,
-0.21179738640785217,
0.528278648853302,
-0.12038947641849518,
-1.482163429260254,
-0.11314123868942261,
0.6852829456329346,
0.4114742875099182,
-0.4807527959346771,
0.782522976398468,
-0.684553861618042,
-1.1468995809555054,
-1.460841178894043,
-0.5244213342666626,
-1.0559831857681274,
-0.888934850692749,
1.086590051651001,
0.7964240312576294,
0.23494316637516022,
1.8799810409545898,
0.595649003982544,
0.21969352662563324,
-2.6841962337493896,
0.9542926549911499,
0.3593415319919586,
-0.046718236058950424,
0.8860179781913757,
0.3249274790287018,
1.0314223766326904,
-0.10837549716234207,
0.5107541680335999,
-2.3481950759887695,
2.355250358581543,
-0.23620833456516266,
0.7770602107048035,
0.08205238729715347,
-0.12766814231872559,
1.0970457792282104,
0.5547235012054443,
0.6416549682617188,
-1.0974233150482178,
0.6496304869651794,
-0.6275584697723389,
1.2605960369110107,
0.8817316889762878,
-0.7601171135902405,
-0.12774766981601715,
1.2645570039749146,
0.4092428684234619,
-0.5006617903709412,
-0.9474959969520569,
-1.0468019247055054,
0.9498015642166138,
1.8343818187713623,
-0.08290766179561615,
0.03740979731082916,
0.8669811487197876,
0.6143447756767273,
-1.3211811780929565,
0.04980098456144333,
-0.8393930792808533,
-0.8778370022773743,
1.6387338638305664,
2.0188748836517334,
-0.11242416501045227,
-0.27621030807495117,
-0.8138902187347412,
-1.3358625173568726,
0.7665913105010986,
0.05786755681037903,
0.13717807829380035,
0.6921228170394897,
-0.5719937682151794,
1.1643673181533813,
0.9324501752853394,
0.9487234354019165,
0.15986604988574982,
0.15540972352027893,
0.3147425949573517,
-0.32927337288856506,
-1.1199922561645508,
-0.24634993076324463,
-1.0464725494384766,
-2.5755515098571777,
0.4834030270576477,
-0.22883158922195435,
-1.4871922731399536,
-0.05609898269176483,
-0.9247646927833557,
0.873939037322998,
-0.5304657220840454,
-1.0617775917053223,
-1.4999816417694092,
0.2233964502811432,
-0.22815272212028503,
0.9455886483192444,
-1.6156158447265625,
-0.05678713321685791,
1.2338786125183105,
0.9302597641944885,
-0.5995563268661499,
1.0498993396759033,
0.24440529942512512,
0.9777130484580994,
0.9109533429145813,
-0.33576878905296326,
0.4351373612880707,
0.16781026124954224,
-1.301409363746643,
0.44591978192329407,
1.1167442798614502,
0.16600000858306885,
1.37885582447052,
-0.6082757115364075,
-0.016094284132122993,
0.34519869089126587,
-0.434867799282074,
-0.4102044701576233,
-0.5955384373664856,
0.7178110480308533,
0.001641315408051014,
-0.8889375329017639,
0.14206302165985107,
-0.08538391441106796,
-0.1587340086698532,
0.12365585565567017,
-1.5155197381973267,
-0.15588811039924622,
-0.3642653226852417,
-0.6484643220901489,
-1.235453724861145,
-0.07629832625389099,
1.377134919166565,
-0.7555183172225952,
-0.22220073640346527,
0.4553129971027374,
0.46578457951545715,
0.5070300102233887,
0.653308093547821,
-0.6134033203125,
-0.3692501485347748,
-0.1703711450099945,
-0.4226132035255432,
0.3487396240234375,
1.3050134181976318,
-0.12359819561243057,
-0.9767351746559143,
0.8019028306007385,
-0.32335105538368225,
0.026735879480838776,
1.929287314414978,
0.11086805164813995,
-0.8468887805938721,
0.24891582131385803,
-0.6337854862213135,
1.872365951538086,
1.7675364017486572,
1.369970440864563,
-0.08339953422546387,
-1.0121585130691528,
0.6706182956695557,
-0.29324281215667725,
-0.43221279978752136,
0.9538847208023071,
0.4339148998260498,
-0.19578136503696442,
-1.369947075843811,
0.544532060623169,
1.2389216423034668,
-0.8116092085838318,
-0.8780970573425293,
0.05541156232357025,
-0.8178797960281372,
1.1311347484588623,
0.7413645386695862,
0.45367541909217834,
0.14616897702217102,
1.637815237045288,
0.7732859253883362,
-0.4999427795410156,
0.5445826053619385,
0.4613364040851593,
-0.2391759306192398,
-2.0926895141601562,
-1.1077739000320435,
0.2778782248497009,
-0.4992053806781769,
-1.6041017770767212,
1.3874918222427368,
-1.1740492582321167,
-0.8508732318878174,
0.4788352847099304,
0.059260979294776917,
1.4801239967346191,
0.3025391697883606,
1.618787169456482,
2.0867061614990234,
0.9032735228538513,
0.3286203145980835,
1.2804573774337769,
-0.16032128036022186,
-0.42606329917907715,
1.7985286712646484,
-0.453352153301239,
0.4875977635383606,
1.1526507139205933,
-0.37671005725860596,
-0.945629358291626,
-0.7914829254150391,
-1.1723744869232178,
-0.6946280002593994,
1.1467609405517578,
0.0820707380771637,
-1.1182397603988647,
0.2723224461078644,
1.6137135028839111,
0.10325323790311813,
-0.2718861699104309,
0.5673127770423889,
0.47891905903816223,
-0.7478902339935303,
-0.06706051528453827,
-0.9055275321006775,
0.4830207824707031,
-0.2787207365036011,
-0.41563698649406433,
0.4042835831642151,
0.41470974683761597,
1.23934805393219,
0.051329970359802246,
0.13927596807479858,
1.1294807195663452,
-1.3709660768508911,
1.4583933353424072,
-0.6168182492256165,
0.24665629863739014,
-2.3036446571350098,
1.3671821355819702,
-0.6936730742454529,
1.9117974042892456,
-2.6364028453826904,
0.42827704548835754,
-0.5991311073303223,
-0.44927525520324707,
0.3445383310317993,
-0.34112614393234253,
0.1827535629272461,
-0.2135564237833023,
-1.165774941444397,
-0.16742536425590515,
-0.6870825290679932,
0.5308356285095215,
1.0738904476165771,
1.257211685180664,
-1.0195674896240234,
-0.2850010395050049,
-1.7381236553192139,
-0.14000268280506134,
-0.5986049771308899,
0.35186031460762024,
-1.9781749248504639,
-0.22767451405525208,
-1.9510490894317627,
-2.3361587524414062,
-1.3952778577804565,
-0.7731042504310608,
1.1835356950759888,
0.10718400776386261,
-0.8760777115821838,
1.1564178466796875,
-0.3245810866355896,
-1.8743726015090942,
1.130414366722107,
-2.121807813644409
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
@MichlF No, it doesn't require modifying select because sorting on multiple keys also returns a 1D array.
It's easier to understand with an example:
```python
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> table = pa.table({
... "name": ["John", "Eve", "Peter", "John"],
... "surname": ["Johnson", "Smith", "Smith", "Doe"],
... "age": [20, 40, 30, 50],
... })
>>> indices = pc.sort_indices(table, sort_keys=[("name", "ascending"), ("surname", "ascending")])
>>> print(indices)
[
1,
3,
0,
2
]
```
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 76 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
@MichlF No, it doesn't require modifying select because sorting on multiple keys also returns a 1D array.
It's easier to understand with an example:
```python
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> table = pa.table({
... "name": ["John", "Eve", "Peter", "John"],
... "surname": ["Johnson", "Smith", "Smith", "Doe"],
... "age": [20, 40, 30, 50],
... })
>>> indices = pc.sort_indices(table, sort_keys=[("name", "ascending"), ("surname", "ascending")])
>>> print(indices)
[
1,
3,
0,
2
]
```
|
[
-1.21726655960083,
-0.9191803932189941,
-0.7278240919113159,
1.4414478540420532,
-0.18655966222286224,
-1.2138382196426392,
0.1759604960680008,
-1.0843857526779175,
1.6804003715515137,
-0.7789862155914307,
0.3355465829372406,
-1.6246124505996704,
0.01778346672654152,
-0.588951587677002,
-0.7655717134475708,
-0.9409381747245789,
-0.4325566589832306,
-0.7996663451194763,
0.9966161251068115,
2.543762683868408,
1.2320951223373413,
-1.4079933166503906,
2.6649868488311768,
0.7312134504318237,
-0.12634506821632385,
-0.9562612771987915,
0.5951873064041138,
0.01694776862859726,
-1.33919095993042,
-0.47180110216140747,
-0.9981651902198792,
-0.12642213702201843,
-0.591512143611908,
-0.5013474225997925,
0.004320312291383743,
0.40412360429763794,
-0.28909873962402344,
-0.3868359327316284,
-0.5797660946846008,
-0.7879489660263062,
0.39843255281448364,
-0.45005688071250916,
1.0286527872085571,
-0.3828418254852295,
1.7936397790908813,
-0.5457268357276917,
0.5657223463058472,
0.6459788084030151,
1.269662618637085,
0.31986135244369507,
0.0027094054967164993,
0.2880907356739044,
0.3792552947998047,
-0.024760141968727112,
0.5195104479789734,
1.0910394191741943,
0.6456336975097656,
0.47772106528282166,
0.7556743621826172,
-2.1986005306243896,
1.2844148874282837,
-1.0477207899093628,
0.2956258952617645,
1.32373046875,
-0.859039306640625,
0.3948901891708374,
-1.7965855598449707,
-0.1013079434633255,
0.6010321974754333,
-2.2976579666137695,
0.20550107955932617,
-1.3273099660873413,
-0.5734594464302063,
0.9669076204299927,
0.40975257754325867,
-1.268397569656372,
0.07049745321273804,
-0.43134915828704834,
0.894041121006012,
0.4367416203022003,
1.1444118022918701,
-1.6914247274398804,
-0.07025211304426193,
-0.34108269214630127,
0.18372122943401337,
-1.231074333190918,
-1.5169949531555176,
0.6274498105049133,
0.6233529448509216,
0.5147101283073425,
-0.026244383305311203,
0.9511847496032715,
-1.1046373844146729,
0.745956301689148,
-0.9562395811080933,
-1.755600929260254,
-1.384082555770874,
-2.227391481399536,
-2.3453238010406494,
0.7784176468849182,
-0.526036262512207,
-0.5262951254844666,
2.029956102371216,
-0.9698056578636169,
-1.6958611011505127,
1.1683964729309082,
0.367608904838562,
-0.03451425954699516,
2.5538649559020996,
0.11537335067987442,
-0.6675687432289124,
0.505794882774353,
-0.7921475768089294,
0.8237107396125793,
-0.44549521803855896,
1.3551750183105469,
0.36187225580215454,
-0.9599019885063171,
1.5954625606536865,
-0.4195447862148285,
0.5687620043754578,
-0.6232099533081055,
-0.46890154480934143,
-0.6996898651123047,
0.3031492829322815,
1.9003785848617554,
-0.31265613436698914,
1.5393239259719849,
-0.23645339906215668,
-1.5828927755355835,
-1.6843876838684082,
0.8978196978569031,
0.4650407135486603,
-0.833873450756073,
0.060406725853681564,
-0.3985225558280945,
0.1594131588935852,
-0.04150863364338875,
1.1126595735549927,
1.3910534381866455,
0.7812938094139099,
-0.2597092092037201,
-0.890851616859436,
0.1698373407125473,
-0.1787015050649643,
-0.8172109723091125,
-1.7007207870483398,
-0.3584412932395935,
0.0756882056593895,
0.6551441550254822,
-1.2098225355148315,
1.7147103548049927,
0.8810174465179443,
1.913869023323059,
0.9970846176147461,
-0.41445550322532654,
1.539466142654419,
0.08765298128128052,
1.7629040479660034,
-0.6156863570213318,
0.6377356052398682,
-0.4703204333782196,
-1.0681231021881104,
0.8803998231887817,
-0.3375742435455322,
-1.9635744094848633,
-0.7148285508155823,
-0.7736102938652039,
-0.22715570032596588,
-0.7779281139373779,
0.9433878660202026,
-0.21194450557231903,
-1.3489514589309692,
0.3040962517261505,
-0.8034532070159912,
-0.013175666332244873,
-1.2419859170913696,
0.37023675441741943,
0.7251589298248291,
-0.6062536239624023,
0.1147276759147644,
-0.24407339096069336,
-1.3557552099227905,
-0.4577762484550476,
0.19915597140789032,
1.872697353363037,
-0.7058917284011841,
0.8535453081130981,
1.0460388660430908,
-0.7850403189659119,
-0.030811723321676254,
0.43324345350265503,
-0.3575848937034607,
0.8240938782691956,
-1.0726770162582397,
-0.4561018943786621,
1.1805537939071655,
-0.18715855479240417,
-0.5430675745010376,
1.3843470811843872,
0.6490970849990845,
-0.9892767071723938,
-0.20588038861751556,
-0.0680379569530487,
-0.7177461385726929,
0.11947385221719742,
-1.6248483657836914,
-0.10138819366693497,
0.40521764755249023,
-1.5832072496414185,
-0.5500981211662292,
-0.24245943129062653,
1.211742639541626,
-0.14792563021183014,
1.413002610206604,
-0.34437206387519836,
-0.15431803464889526,
-0.3417353630065918,
-0.3751916289329529,
0.05799242481589317,
-0.2582624554634094,
-0.4956270158290863,
0.30468565225601196,
-0.8154518604278564,
0.34932613372802734,
1.4824907779693604,
0.3109928071498871,
0.0427573025226593,
0.5089783072471619,
1.011247158050537,
0.49313753843307495,
-0.09962714463472366,
-0.8925828337669373,
-1.5071732997894287,
2.0450901985168457,
-1.5098439455032349,
2.008296251296997,
0.8084405660629272,
-0.011263920925557613,
-1.7773081064224243,
-1.9959346055984497,
1.320664882659912,
1.1133137941360474,
2.3665809631347656,
0.6187454462051392,
0.40661048889160156,
-0.7746451497077942,
-0.5825254917144775,
0.36510947346687317,
-1.001081109046936,
-0.7844202518463135,
0.2202545553445816,
2.3594658374786377,
1.7031489610671997,
-0.5259193778038025,
-0.10934114456176758,
-1.018953800201416,
1.465701937675476,
-0.184041827917099,
0.19497810304164886,
1.976989507675171,
-0.28373876214027405,
-1.0820294618606567,
1.2892322540283203,
-2.272580623626709,
0.09932871907949448,
1.9325810670852661,
0.22370336949825287,
0.02972523868083954,
-1.3306199312210083,
-0.6853837966918945,
-0.339652419090271,
-0.3853059411048889,
-1.2092623710632324,
0.5151705741882324,
-0.17391309142112732,
-0.842391848564148,
-1.475475549697876,
0.12415889650583267,
-1.157865285873413,
-1.6270599365234375,
0.15025594830513,
1.8993730545043945,
2.022080421447754,
-0.7868596911430359,
1.55733060836792,
-0.2854257822036743,
0.01849803328514099,
1.128244161605835,
1.2036670446395874,
3.132035970687866,
1.9052857160568237,
-1.2465394735336304,
0.6407724618911743,
-0.1449006199836731,
-0.4556564390659332,
1.1872243881225586,
-1.2251300811767578,
1.269877552986145,
-0.06593211740255356,
-1.186386227607727,
-1.1370534896850586,
0.9676975607872009,
0.40883004665374756,
0.0016604205593466759,
-0.4700058400630951,
1.177010416984558,
0.08471523225307465,
1.3719114065170288,
0.5674096941947937,
-0.23039712011814117,
0.650222659111023,
-0.408040314912796,
-0.5052223205566406,
1.6146209239959717,
0.23202627897262573,
-1.4164625406265259,
-2.289530038833618,
-0.23100054264068604,
-0.9197855591773987,
0.11565404385328293,
-0.5583417415618896,
-1.052498698234558,
1.7131611108779907,
0.3585514724254608,
-1.1893996000289917,
-0.2665451467037201,
-0.3422712981700897,
-0.6057732701301575,
2.7050814628601074,
-1.303374171257019,
-0.22670786082744598,
-0.9409118890762329,
-0.6447221040725708,
1.5335743427276611,
-1.2729058265686035,
-0.17387241125106812,
-1.0372824668884277,
-0.44853895902633667,
-1.2442630529403687,
-0.5813279747962952,
0.003781842067837715,
-0.9757101535797119,
0.7594826221466064,
0.2391556352376938,
-1.2054024934768677,
-0.3641737103462219,
-0.9347079992294312,
0.8060822486877441,
0.0027185771614313126,
0.2258603870868683,
1.9171358346939087,
0.35389187932014465,
-0.345317542552948,
0.722618818283081,
1.1227504014968872,
0.5966770648956299,
-0.6244641542434692,
0.19778871536254883,
-0.6698151230812073,
0.37444615364074707,
-1.2025471925735474,
0.2588326632976532,
-2.7880852222442627,
0.6526873111724854,
-0.08838174492120743,
-0.11610835790634155,
0.010688942857086658,
-1.2527357339859009,
1.1697458028793335,
2.6582136154174805,
-1.1101021766662598,
0.5237988233566284,
0.27252197265625,
1.208315134048462,
-1.5782710313796997,
0.33835306763648987,
-0.4254243075847626,
2.202613353729248,
0.18622130155563354,
1.0737178325653076,
-0.5061336159706116,
-2.3718338012695312,
0.6669377088546753,
-1.2908788919448853,
-1.1926065683364868,
0.6909021139144897,
-0.9533807635307312,
0.04298538342118263,
-1.4335136413574219,
-0.12410706281661987,
-0.783858597278595,
-1.1683413982391357,
0.6234684586524963,
0.037361402064561844,
0.4996541738510132,
-0.5751367807388306,
0.37785592675209045,
-2.2232697010040283,
-1.3790557384490967,
-0.2855718731880188,
-0.9442452192306519,
0.5256615281105042,
-0.32357513904571533,
0.7601875066757202,
-0.23103998601436615,
-0.03966033086180687,
0.3821466565132141,
1.4101954698562622,
3.410151481628418,
0.15907010436058044,
0.37529465556144714,
-0.2233234941959381,
-0.986738383769989,
1.440794825553894,
0.9101808071136475,
-0.1344413012266159,
-0.5826895236968994,
-1.0711899995803833,
1.332166314125061,
2.0503950119018555,
1.062431812286377,
0.02182815596461296,
-0.7993737459182739,
-0.6902906894683838,
-0.01542374026030302,
0.20286433398723602,
0.3993782699108124,
0.963898241519928,
0.084542416036129,
0.0957024022936821,
1.5018881559371948,
1.283429503440857,
-0.3753291368484497,
0.3652273714542389,
-0.8024401068687439,
-0.4832935631275177,
0.5821037292480469,
0.262067049741745,
-0.03138009458780289,
0.3508836627006531,
-0.9592080116271973,
-0.2697041928768158,
-0.36993008852005005,
-0.9280673861503601,
-0.6548383235931396,
-0.41434773802757263,
-0.26395562291145325,
1.7343156337738037,
0.1009872630238533,
-0.46515634655952454,
0.052184537053108215,
-0.7833216786384583,
-0.032107915729284286,
-1.094829797744751,
0.1664404720067978,
-0.10987654328346252,
-0.10663561522960663,
-0.09105449914932251,
1.846350908279419,
-0.8813232183456421,
-2.0495903491973877,
0.1616857647895813,
0.2222340852022171,
-0.3150881230831146,
0.2566016912460327,
1.630341649055481,
0.5530825853347778,
1.5534422397613525,
1.3290518522262573,
0.9206695556640625,
-0.7086567282676697,
-1.3208061456680298,
0.632879912853241,
1.0144085884094238,
-1.2657694816589355,
0.8539654612541199,
-0.011498551815748215,
-0.5295464992523193,
0.5179926156997681,
1.1811734437942505,
0.44208475947380066,
-1.9668322801589966,
0.8520998358726501,
-0.915351927280426,
0.7991175651550293,
0.6229623556137085,
0.7390977144241333,
0.21472321450710297,
0.7518167495727539,
-1.2540791034698486,
-1.0916215181350708,
-0.7535213232040405,
-0.618826687335968,
1.9321213960647583,
-0.2196795642375946,
0.5848631262779236,
-0.26242759823799133,
-1.3722971677780151,
-0.06305836886167526,
0.6032797694206238,
0.41602978110313416,
-0.4859749376773834,
0.7725162506103516,
-0.6417006254196167,
-1.1802489757537842,
-1.4117740392684937,
-0.4571143388748169,
-1.0784870386123657,
-0.911095142364502,
1.1031651496887207,
0.7440195083618164,
0.2911074459552765,
1.9189807176589966,
0.6324487328529358,
0.23896662890911102,
-2.6563124656677246,
0.9562882781028748,
0.34194618463516235,
-0.10755079239606857,
0.8814253807067871,
0.4089208245277405,
1.0703842639923096,
-0.1864147186279297,
0.513515293598175,
-2.3843722343444824,
2.3325507640838623,
-0.23159028589725494,
0.7886357307434082,
0.12258598953485489,
-0.061866749078035355,
1.0180425643920898,
0.6086843609809875,
0.5370991826057434,
-1.028433918952942,
0.5297995209693909,
-0.6008647680282593,
1.2890357971191406,
0.8994026184082031,
-0.711592435836792,
-0.018918123096227646,
1.27617609500885,
0.4742099642753601,
-0.4852280020713806,
-0.9697134494781494,
-0.8812013268470764,
0.928648829460144,
1.8095500469207764,
-0.11127834767103195,
0.025830280035734177,
0.8281684517860413,
0.5790072083473206,
-1.3384120464324951,
-0.056773144751787186,
-0.7907764315605164,
-0.8033785820007324,
1.6486785411834717,
2.073547601699829,
-0.11975796520709991,
-0.21875165402889252,
-0.7444784045219421,
-1.4180045127868652,
0.7981963157653809,
-0.026505351066589355,
0.24284425377845764,
0.6592875123023987,
-0.5251074433326721,
1.078528881072998,
0.8749896287918091,
1.0334162712097168,
0.26015427708625793,
0.25387099385261536,
0.4281041622161865,
-0.4039430022239685,
-1.105852723121643,
-0.22746427357196808,
-1.0463401079177856,
-2.631415843963623,
0.48655763268470764,
-0.2775941789150238,
-1.4894216060638428,
-0.10246486216783524,
-0.9334598183631897,
0.9864689111709595,
-0.5151307582855225,
-0.9717341661453247,
-1.4490493535995483,
0.20996743440628052,
-0.11231344193220139,
1.0587158203125,
-1.6106128692626953,
-0.18411888182163239,
1.2128663063049316,
0.9681399464607239,
-0.6713592410087585,
0.9920414686203003,
0.27677834033966064,
1.0865542888641357,
0.833061158657074,
-0.36552610993385315,
0.5035529732704163,
0.042768627405166626,
-1.2950056791305542,
0.381865531206131,
1.1587426662445068,
0.1935337632894516,
1.3420510292053223,
-0.5668649673461914,
0.00016203895211219788,
0.3482506275177002,
-0.45233339071273804,
-0.4487694203853607,
-0.5157672166824341,
0.6308062672615051,
-0.003503079991787672,
-0.9975798726081848,
-0.054203759878873825,
-0.06251225620508194,
-0.19741161167621613,
0.11927104741334915,
-1.4218937158584595,
-0.1162194162607193,
-0.4231165051460266,
-0.5969797372817993,
-1.2133992910385132,
-0.1418077051639557,
1.3375786542892456,
-0.7925234436988831,
-0.16214704513549805,
0.40674230456352234,
0.3406635820865631,
0.5388626456260681,
0.6233953237533569,
-0.7101788520812988,
-0.40163755416870117,
-0.2056218534708023,
-0.47196003794670105,
0.3069068491458893,
1.378379464149475,
-0.10250239074230194,
-0.9758269190788269,
0.7072218060493469,
-0.25780192017555237,
0.05798468366265297,
1.9256335496902466,
0.07043915241956711,
-0.7699889540672302,
0.1960209459066391,
-0.5560852885246277,
1.8643778562545776,
1.736934781074524,
1.3119041919708252,
-0.15465028584003448,
-0.9060460925102234,
0.6730092167854309,
-0.34015631675720215,
-0.48768529295921326,
0.7481280565261841,
0.3669922947883606,
-0.22361363470554352,
-1.4861359596252441,
0.6280249953269958,
1.2413924932479858,
-0.8646188974380493,
-0.8300170302391052,
0.09108889102935791,
-0.811596155166626,
1.135287880897522,
0.720375120639801,
0.4183783531188965,
0.28713834285736084,
1.6599864959716797,
0.8380960822105408,
-0.5367792248725891,
0.5238001346588135,
0.5419542789459229,
-0.1825224757194519,
-2.1123836040496826,
-1.18205726146698,
0.2207808792591095,
-0.5432863235473633,
-1.554154634475708,
1.4364228248596191,
-1.1525384187698364,
-0.9279056787490845,
0.5108615756034851,
0.116115503013134,
1.405404806137085,
0.3871809244155884,
1.571831464767456,
2.0630223751068115,
0.8673414587974548,
0.37993231415748596,
1.267250657081604,
-0.1330372840166092,
-0.4439558684825897,
1.830019474029541,
-0.4272203743457794,
0.5505668520927429,
1.1533539295196533,
-0.31795069575309753,
-0.9587423801422119,
-0.7986841797828674,
-1.2508394718170166,
-0.7686474323272705,
1.185363531112671,
0.03539501130580902,
-1.0944448709487915,
0.2655782997608185,
1.6504617929458618,
0.05528468266129494,
-0.39293935894966125,
0.576487123966217,
0.45111703872680664,
-0.770319938659668,
-0.09038213640451431,
-0.8995216488838196,
0.5307318568229675,
-0.24990952014923096,
-0.4059573709964752,
0.356825053691864,
0.44775503873825073,
1.3853857517242432,
0.005185131914913654,
0.1517307013273239,
1.0408822298049927,
-1.3538457155227661,
1.4900462627410889,
-0.6841113567352295,
0.20689575374126434,
-2.2824249267578125,
1.3787932395935059,
-0.7140527367591858,
1.9390854835510254,
-2.65627384185791,
0.46656298637390137,
-0.4773057699203491,
-0.43923673033714294,
0.22550475597381592,
-0.3434501886367798,
0.1969643533229828,
-0.17231914401054382,
-1.1432795524597168,
-0.07733030617237091,
-0.6122362017631531,
0.558219313621521,
1.0312854051589966,
1.3563697338104248,
-1.0478347539901733,
-0.3313291668891907,
-1.7512881755828857,
-0.07710859924554825,
-0.6959791779518127,
0.22092321515083313,
-1.9834004640579224,
-0.3093818724155426,
-1.847957968711853,
-2.3315846920013428,
-1.4028548002243042,
-0.8053068518638611,
1.2041906118392944,
0.06594448536634445,
-0.9043077230453491,
1.2626831531524658,
-0.3096095323562622,
-1.9508370161056519,
1.155315637588501,
-2.1646721363067627
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
Thanks for clarifying.
I can prepare a PR to address this issue. This would be my first PR here so I have a few maybe silly questions but:
- What is the preferred input type of `sort_keys` for the sort method? A sequence with name, order tuples like pyarrow's `sort_indices` requires?
- What about backwards compatability: is it supposed to also accept the old way of calling sort() or should both `column` and `kind` be deprecated?
- If `sort_keys` is provided in the same format as for pyarrow's `sort_indices` - i.e. along with order for each column -, `reverse` doesn't make much sense either and should be deprecated as well I assume.
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 112 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
Thanks for clarifying.
I can prepare a PR to address this issue. This would be my first PR here so I have a few maybe silly questions but:
- What is the preferred input type of `sort_keys` for the sort method? A sequence with name, order tuples like pyarrow's `sort_indices` requires?
- What about backwards compatability: is it supposed to also accept the old way of calling sort() or should both `column` and `kind` be deprecated?
- If `sort_keys` is provided in the same format as for pyarrow's `sort_indices` - i.e. along with order for each column -, `reverse` doesn't make much sense either and should be deprecated as well I assume.
|
[
-1.2062435150146484,
-0.955108106136322,
-0.6964579224586487,
1.4512603282928467,
-0.13979633152484894,
-1.2945438623428345,
0.1756330132484436,
-1.0331217050552368,
1.7455586194992065,
-0.8622071146965027,
0.36619484424591064,
-1.6305056810379028,
0.10075096786022186,
-0.6490331292152405,
-0.7795653939247131,
-0.8561688661575317,
-0.4291973114013672,
-0.8261004686355591,
1.0083367824554443,
2.5119781494140625,
1.1842100620269775,
-1.4655064344406128,
2.6624436378479004,
0.6787568926811218,
-0.15817603468894958,
-0.9662575125694275,
0.5070993304252625,
-0.006868671625852585,
-1.3361109495162964,
-0.44796785712242126,
-0.9672466516494751,
-0.02749570645391941,
-0.6260505318641663,
-0.5247694253921509,
0.005745895206928253,
0.42498502135276794,
-0.25855499505996704,
-0.4536181390285492,
-0.5098683834075928,
-0.7655636668205261,
0.43305251002311707,
-0.40030157566070557,
0.9697476029396057,
-0.3572157323360443,
1.8879221677780151,
-0.5241565108299255,
0.47354909777641296,
0.652566134929657,
1.3636894226074219,
0.20732998847961426,
-0.07423564791679382,
0.2900858521461487,
0.360639363527298,
-0.017261430621147156,
0.5295640826225281,
1.110163927078247,
0.6947314739227295,
0.494892418384552,
0.7070932388305664,
-2.1974756717681885,
1.3403527736663818,
-1.0146578550338745,
0.35556814074516296,
1.318372368812561,
-0.987243115901947,
0.4396534562110901,
-1.7769228219985962,
-0.08441738784313202,
0.5103228092193604,
-2.217258930206299,
0.16821956634521484,
-1.2368475198745728,
-0.4954577088356018,
1.042720079421997,
0.3176662027835846,
-1.2716120481491089,
0.11175946146249771,
-0.45164790749549866,
1.0055686235427856,
0.42484140396118164,
1.1772199869155884,
-1.6375079154968262,
-0.02951541356742382,
-0.34664854407310486,
0.18338671326637268,
-1.2949641942977905,
-1.5288807153701782,
0.5335341095924377,
0.7010030746459961,
0.522325336933136,
-0.08543360978364944,
0.9505707621574402,
-1.0345429182052612,
0.7909254431724548,
-0.9209902882575989,
-1.735923171043396,
-1.3837839365005493,
-2.2066593170166016,
-2.3609113693237305,
0.7927451729774475,
-0.44295817613601685,
-0.5244223475456238,
2.027923107147217,
-0.9986499547958374,
-1.8008650541305542,
1.179832100868225,
0.3034280836582184,
-0.09537432342767715,
2.416368246078491,
0.14892759919166565,
-0.7354794144630432,
0.49094340205192566,
-0.736112117767334,
0.8424674272537231,
-0.49344226717948914,
1.3301920890808105,
0.4238395392894745,
-1.0147814750671387,
1.547768473625183,
-0.4129623472690582,
0.5530315637588501,
-0.6939366459846497,
-0.4635868966579437,
-0.7458728551864624,
0.33468350768089294,
1.8972485065460205,
-0.3558823764324188,
1.5234547853469849,
-0.30924317240715027,
-1.5551095008850098,
-1.635852575302124,
0.8799151182174683,
0.4752023220062256,
-0.8054353594779968,
0.11144343763589859,
-0.4094555974006653,
0.14483176171779633,
-0.007702924776822329,
1.0229346752166748,
1.3080949783325195,
0.7231637239456177,
-0.25895440578460693,
-0.8694126009941101,
0.2337869554758072,
-0.12496574968099594,
-0.6747132539749146,
-1.7562057971954346,
-0.30642759799957275,
0.12331603467464447,
0.6341366767883301,
-1.1703367233276367,
1.748244285583496,
0.854351282119751,
1.9363293647766113,
1.0342966318130493,
-0.3526751399040222,
1.578331708908081,
0.04798030108213425,
1.8488686084747314,
-0.48996806144714355,
0.6358304023742676,
-0.39664894342422485,
-1.105254054069519,
0.8387380242347717,
-0.34792613983154297,
-2.038266897201538,
-0.6589533090591431,
-0.8075898289680481,
-0.20553670823574066,
-0.7850873470306396,
0.9050321578979492,
-0.19549815356731415,
-1.4146361351013184,
0.27660155296325684,
-0.7256926894187927,
0.13922260701656342,
-1.1861141920089722,
0.37131866812705994,
0.7683424353599548,
-0.6334545016288757,
0.11349665373563766,
-0.30694589018821716,
-1.3482846021652222,
-0.43747183680534363,
0.3242695927619934,
1.7706393003463745,
-0.7602600455284119,
0.8186946511268616,
1.0179492235183716,
-0.748288094997406,
-0.02279454655945301,
0.43833017349243164,
-0.34014031291007996,
0.8786046504974365,
-1.0654374361038208,
-0.40678417682647705,
1.1450365781784058,
-0.2027866095304489,
-0.5375936627388,
1.4013794660568237,
0.711739182472229,
-0.9800293445587158,
-0.18780474364757538,
-0.17200133204460144,
-0.8303050994873047,
0.004546540789306164,
-1.6383018493652344,
-0.12581244111061096,
0.3471572995185852,
-1.5461461544036865,
-0.4872754216194153,
-0.257874071598053,
1.195303201675415,
-0.14624835550785065,
1.4549739360809326,
-0.3749193847179413,
-0.1486717164516449,
-0.38130471110343933,
-0.3845776617527008,
0.12668554484844208,
-0.18615321815013885,
-0.5506214499473572,
0.27696722745895386,
-0.7659569978713989,
0.37207934260368347,
1.4266688823699951,
0.3343602418899536,
0.047506146132946014,
0.5614895820617676,
1.0389643907546997,
0.4307001531124115,
-0.07273762673139572,
-0.8139981031417847,
-1.5429891347885132,
2.042506217956543,
-1.4759732484817505,
1.9718748331069946,
0.80833899974823,
0.07883141189813614,
-1.819968342781067,
-1.9184974431991577,
1.4099498987197876,
1.141831874847412,
2.3874013423919678,
0.6226031184196472,
0.4242164194583893,
-0.8095760345458984,
-0.5978308320045471,
0.3943540155887604,
-1.0000228881835938,
-0.8069900274276733,
0.15714053809642792,
2.3449931144714355,
1.7466152906417847,
-0.45882201194763184,
-0.18862701952457428,
-1.0591647624969482,
1.5295008420944214,
-0.13524948060512543,
0.15480384230613708,
1.9988656044006348,
-0.288980633020401,
-1.0036686658859253,
1.3007817268371582,
-2.3459112644195557,
0.15955454111099243,
1.928138017654419,
0.19526226818561554,
0.03554270416498184,
-1.4113893508911133,
-0.5932895541191101,
-0.19030548632144928,
-0.35289815068244934,
-1.2261091470718384,
0.48892444372177124,
-0.22231678664684296,
-0.760177493095398,
-1.4719918966293335,
0.17444542050361633,
-1.146586537361145,
-1.615749716758728,
0.23747624456882477,
1.9177111387252808,
2.010376453399658,
-0.7795736193656921,
1.5874148607254028,
-0.2653219401836395,
0.19319763779640198,
1.2469723224639893,
1.1455554962158203,
3.164578914642334,
1.9264042377471924,
-1.323349952697754,
0.6237854957580566,
-0.13417142629623413,
-0.48393771052360535,
1.1295770406723022,
-1.216362714767456,
1.2981525659561157,
-0.14683420956134796,
-1.2105076313018799,
-1.1608115434646606,
0.9956462383270264,
0.5068756341934204,
0.07354620844125748,
-0.49823564291000366,
1.2021870613098145,
0.08188421279191971,
1.325930118560791,
0.5155579447746277,
-0.3171173632144928,
0.6141112446784973,
-0.36621955037117004,
-0.5495116710662842,
1.577502965927124,
0.22039470076560974,
-1.3031328916549683,
-2.2607269287109375,
-0.21351630985736847,
-0.8502898812294006,
0.053341299295425415,
-0.5737088322639465,
-0.9560050964355469,
1.6148958206176758,
0.425167053937912,
-1.2814868688583374,
-0.2875618636608124,
-0.2850586175918579,
-0.6115784645080566,
2.6024668216705322,
-1.381016492843628,
-0.24756912887096405,
-0.9457836747169495,
-0.5499386787414551,
1.5217028856277466,
-1.2636444568634033,
-0.2768493890762329,
-1.000234842300415,
-0.548247218132019,
-1.2484681606292725,
-0.60945725440979,
-0.06626881659030914,
-0.9041402339935303,
0.7499894499778748,
0.178094744682312,
-1.1821869611740112,
-0.35173699259757996,
-0.9286730289459229,
0.8066215515136719,
-0.07492142170667648,
0.24255867302417755,
1.840588092803955,
0.39174044132232666,
-0.38272738456726074,
0.7309606075286865,
1.096102237701416,
0.5707082152366638,
-0.6061581373214722,
0.2559312582015991,
-0.7081713080406189,
0.3124261796474457,
-1.1848074197769165,
0.353509783744812,
-2.8651390075683594,
0.6607789397239685,
-0.029700428247451782,
-0.08943860977888107,
-0.06852831691503525,
-1.3384073972702026,
1.0928754806518555,
2.628218412399292,
-1.1162978410720825,
0.5072124004364014,
0.2955285608768463,
1.2397639751434326,
-1.593376636505127,
0.310590922832489,
-0.420328825712204,
2.1610076427459717,
0.15738128125667572,
1.1536917686462402,
-0.4775184392929077,
-2.3549697399139404,
0.5669578909873962,
-1.2734094858169556,
-1.1703877449035645,
0.7761648297309875,
-0.8263638019561768,
-0.020401163026690483,
-1.3569992780685425,
-0.19918256998062134,
-0.7891066074371338,
-1.2232731580734253,
0.6756733059883118,
0.07192803919315338,
0.5273916125297546,
-0.6457204222679138,
0.3327404260635376,
-2.199389696121216,
-1.360252857208252,
-0.23265686631202698,
-0.9486988186836243,
0.4505247473716736,
-0.3628177046775818,
0.6932805180549622,
-0.1771945059299469,
0.018452731892466545,
0.2982274889945984,
1.3910133838653564,
3.3720104694366455,
0.2200581282377243,
0.44598716497421265,
-0.20614030957221985,
-0.9133075475692749,
1.433108925819397,
0.8940873146057129,
-0.18943512439727783,
-0.5838370323181152,
-1.0665457248687744,
1.3083946704864502,
1.9944086074829102,
1.0210126638412476,
0.03306859731674194,
-0.7637745141983032,
-0.7537875771522522,
-0.009449212811887264,
0.169745534658432,
0.486432820558548,
0.9453051090240479,
0.12242835760116577,
0.15507198870182037,
1.4309017658233643,
1.25442636013031,
-0.49307361245155334,
0.4604637622833252,
-0.7870244979858398,
-0.5022174119949341,
0.46777623891830444,
0.3381187319755554,
-0.04718528687953949,
0.25224068760871887,
-0.9742022752761841,
-0.22993725538253784,
-0.3999127745628357,
-0.9811753034591675,
-0.734190821647644,
-0.4113905429840088,
-0.2845138609409332,
1.689889669418335,
0.1518765687942505,
-0.5296763777732849,
-0.01765037141740322,
-0.7812251448631287,
-0.07801107317209244,
-1.0087414979934692,
0.25622794032096863,
-0.12076213955879211,
-0.10081429779529572,
-0.06519915908575058,
1.823183536529541,
-0.9012746214866638,
-2.0746848583221436,
0.21498200297355652,
0.15267466008663177,
-0.31860557198524475,
0.16930939257144928,
1.6352065801620483,
0.4798557460308075,
1.467046856880188,
1.4409576654434204,
0.9727104306221008,
-0.7236166000366211,
-1.322418212890625,
0.6898829936981201,
0.9650605320930481,
-1.3520604372024536,
0.7497541308403015,
0.04630070924758911,
-0.5692089796066284,
0.6445426344871521,
1.2449148893356323,
0.40849417448043823,
-2.0660314559936523,
0.8146241903305054,
-0.9303382039070129,
0.7368350028991699,
0.7142096161842346,
0.7620996832847595,
0.25349777936935425,
0.8123286962509155,
-1.2810337543487549,
-1.1419459581375122,
-0.7233632206916809,
-0.6793347001075745,
1.9406145811080933,
-0.24581022560596466,
0.5852590799331665,
-0.09217068552970886,
-1.4876794815063477,
-0.11266789585351944,
0.6740931868553162,
0.38286978006362915,
-0.5041041374206543,
0.7471199631690979,
-0.6770410537719727,
-1.1111022233963013,
-1.4135247468948364,
-0.5360852479934692,
-1.065504550933838,
-0.9054170250892639,
1.0535997152328491,
0.8530194759368896,
0.24637408554553986,
1.8985531330108643,
0.6443212628364563,
0.2261825054883957,
-2.6789369583129883,
0.9050669074058533,
0.35998430848121643,
-0.08794034272432327,
0.8771401047706604,
0.3529011309146881,
0.9977060556411743,
-0.09330511838197708,
0.5013330578804016,
-2.3717072010040283,
2.3622829914093018,
-0.22318929433822632,
0.7605420351028442,
-0.0025782654993236065,
-0.13465818762779236,
1.1563581228256226,
0.5221990346908569,
0.6019997596740723,
-1.0667383670806885,
0.660098671913147,
-0.6319279670715332,
1.271655797958374,
0.8737531900405884,
-0.783073902130127,
-0.12132669240236282,
1.3087650537490845,
0.39932671189308167,
-0.4947987198829651,
-0.9278537631034851,
-1.0522234439849854,
0.9379138946533203,
1.8340489864349365,
-0.07128022611141205,
0.043372608721256256,
0.8631387948989868,
0.6511340141296387,
-1.3485219478607178,
0.0180662889033556,
-0.7749360799789429,
-0.8009073734283447,
1.6689772605895996,
1.990125060081482,
-0.13189327716827393,
-0.24234221875667572,
-0.8232903480529785,
-1.3798415660858154,
0.7560058236122131,
0.06470391899347305,
0.10502968728542328,
0.6505246758460999,
-0.6273165345191956,
1.1488949060440063,
0.9373367428779602,
0.9411036372184753,
0.1541084200143814,
0.18606089055538177,
0.3242778480052948,
-0.35154587030410767,
-1.1600799560546875,
-0.2533973753452301,
-1.082574486732483,
-2.530090808868408,
0.44123098254203796,
-0.21997781097888947,
-1.4951591491699219,
-0.02647167444229126,
-0.948451042175293,
0.8949922919273376,
-0.5373610258102417,
-1.0863263607025146,
-1.5155175924301147,
0.2551790475845337,
-0.1221999004483223,
0.9478588104248047,
-1.6018602848052979,
-0.04060129076242447,
1.2079297304153442,
0.9574785232543945,
-0.6220228672027588,
1.015660047531128,
0.2698580324649811,
0.9974018335342407,
0.8863963484764099,
-0.35124120116233826,
0.43055838346481323,
0.14768476784229279,
-1.2824946641921997,
0.4498385488986969,
1.1345417499542236,
0.12527763843536377,
1.3877003192901611,
-0.631810188293457,
-0.007617213763296604,
0.3602105975151062,
-0.4654224216938019,
-0.3995421826839447,
-0.6016461849212646,
0.6790657639503479,
-0.015243329107761383,
-0.8894840478897095,
0.09536686539649963,
-0.04901685565710068,
-0.2182806432247162,
0.1571289300918579,
-1.5342755317687988,
-0.14478474855422974,
-0.35695838928222656,
-0.6470835208892822,
-1.272185206413269,
-0.015287025831639767,
1.3947166204452515,
-0.7513595223426819,
-0.23192065954208374,
0.48204290866851807,
0.4135623276233673,
0.5273337960243225,
0.6656400561332703,
-0.6225032806396484,
-0.35013940930366516,
-0.19543997943401337,
-0.4132956862449646,
0.32238879799842834,
1.3410357236862183,
-0.12732426822185516,
-0.9725505113601685,
0.811157763004303,
-0.35815268754959106,
0.032426655292510986,
1.9120312929153442,
0.11953802406787872,
-0.8363221883773804,
0.27461665868759155,
-0.6767265200614929,
1.8733359575271606,
1.8102701902389526,
1.3558197021484375,
-0.05225720256567001,
-0.9901589751243591,
0.6759354472160339,
-0.31371796131134033,
-0.4307183027267456,
0.9357751607894897,
0.4219059348106384,
-0.22356727719306946,
-1.388037085533142,
0.6117933392524719,
1.2422237396240234,
-0.8235913515090942,
-0.8777933716773987,
0.04303758591413498,
-0.7731062769889832,
1.167962908744812,
0.741176187992096,
0.4363216161727905,
0.1936928778886795,
1.6136956214904785,
0.7934409379959106,
-0.45693618059158325,
0.5847246050834656,
0.5329551100730896,
-0.19338102638721466,
-2.139742374420166,
-1.1017754077911377,
0.2678784430027008,
-0.49010345339775085,
-1.639021396636963,
1.3988280296325684,
-1.1620537042617798,
-0.8838428258895874,
0.4966994524002075,
0.05887420475482941,
1.4808701276779175,
0.3434266149997711,
1.5457522869110107,
2.0779645442962646,
0.8903424739837646,
0.35634198784828186,
1.2649186849594116,
-0.22648176550865173,
-0.4228707551956177,
1.8308374881744385,
-0.5088714361190796,
0.5204547047615051,
1.1345723867416382,
-0.37161314487457275,
-0.9351198077201843,
-0.7966915369033813,
-1.1925804615020752,
-0.6984919309616089,
1.1429966688156128,
0.07141268998384476,
-1.0626232624053955,
0.27703115344047546,
1.617027997970581,
0.07477330416440964,
-0.284544438123703,
0.5760834813117981,
0.4428425431251526,
-0.7480968832969666,
-0.09333977103233337,
-0.8851235508918762,
0.5355401039123535,
-0.31202051043510437,
-0.4169728457927704,
0.4038875997066498,
0.42984244227409363,
1.225361943244934,
0.013479255139827728,
0.11852045357227325,
1.0919773578643799,
-1.4066226482391357,
1.4235270023345947,
-0.6479006409645081,
0.2597596049308777,
-2.354017734527588,
1.4248818159103394,
-0.712283730506897,
1.9687418937683105,
-2.660830497741699,
0.42056968808174133,
-0.6103150248527527,
-0.4700556695461273,
0.3177049160003662,
-0.30440279841423035,
0.15355053544044495,
-0.19669024646282196,
-1.1463109254837036,
-0.12624192237854004,
-0.6452432870864868,
0.5159921050071716,
1.0961153507232666,
1.2869991064071655,
-1.0413256883621216,
-0.2800900340080261,
-1.6928998231887817,
-0.14449581503868103,
-0.6163862347602844,
0.3311116695404053,
-2.0403192043304443,
-0.22625920176506042,
-1.931871771812439,
-2.3515098094940186,
-1.369744062423706,
-0.7827960848808289,
1.1503000259399414,
0.115097276866436,
-0.8717297911643982,
1.216071605682373,
-0.3254164755344391,
-1.891900897026062,
1.1324812173843384,
-2.1173741817474365
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
I think we can have the following signature:
```python
def sort(
self,
column_names: Union[str, Sequence[str]],
reverse: Union[bool, Sequence[bool]] = False,
kind="deprecated",
null_placement: str = "last",
keep_in_memory: bool = False,
load_from_cache_file: bool = True,
indices_cache_file_name: Optional[str] = None,
writer_batch_size: Optional[int] = 1000,
new_fingerprint: Optional[str] = None,
) -> "Dataset":
```
So we should:
* rename`column` to `column_names`. `column` is a positional argument, so it's OK to rename it (not marked as positional-only with "/", but still should be fine)
* deprecate `kind`
* keep `reverse` instead of introducing `sort_keys`, but we should allow passing a list of booleans that defines the sort order of each column from `column_names` to it (`reverse = False` would be equal to `[False] * len(column_names)` and `reverse = True` to `[True] * len(column_names)`)
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 127 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
I think we can have the following signature:
```python
def sort(
self,
column_names: Union[str, Sequence[str]],
reverse: Union[bool, Sequence[bool]] = False,
kind="deprecated",
null_placement: str = "last",
keep_in_memory: bool = False,
load_from_cache_file: bool = True,
indices_cache_file_name: Optional[str] = None,
writer_batch_size: Optional[int] = 1000,
new_fingerprint: Optional[str] = None,
) -> "Dataset":
```
So we should:
* rename`column` to `column_names`. `column` is a positional argument, so it's OK to rename it (not marked as positional-only with "/", but still should be fine)
* deprecate `kind`
* keep `reverse` instead of introducing `sort_keys`, but we should allow passing a list of booleans that defines the sort order of each column from `column_names` to it (`reverse = False` would be equal to `[False] * len(column_names)` and `reverse = True` to `[True] * len(column_names)`)
|
[
-1.1986860036849976,
-0.9022864103317261,
-0.7445774674415588,
1.5108447074890137,
-0.14732931554317474,
-1.2305964231491089,
0.1892164647579193,
-1.0421628952026367,
1.6967023611068726,
-0.8177416920661926,
0.3498031795024872,
-1.6219446659088135,
0.08035118877887726,
-0.6614535450935364,
-0.7962945103645325,
-0.8959055542945862,
-0.4264885485172272,
-0.8079925775527954,
1.0262424945831299,
2.5045366287231445,
1.2512471675872803,
-1.463467001914978,
2.6963698863983154,
0.7068081498146057,
-0.14815261960029602,
-0.9886199235916138,
0.527671754360199,
-0.042173098772764206,
-1.3363487720489502,
-0.47150206565856934,
-0.9886035323143005,
-0.12097769975662231,
-0.6090317964553833,
-0.4899788498878479,
0.006100984290242195,
0.45263418555259705,
-0.26672425866127014,
-0.418034166097641,
-0.5514363050460815,
-0.7679296135902405,
0.43362972140312195,
-0.42795324325561523,
0.9523336291313171,
-0.32423678040504456,
1.8531804084777832,
-0.579627513885498,
0.45911917090415955,
0.6997458338737488,
1.309010624885559,
0.21906134486198425,
-0.007797318045049906,
0.28017911314964294,
0.367444783449173,
-0.03684987500309944,
0.5357965230941772,
1.1231942176818848,
0.6764308214187622,
0.5176025032997131,
0.7477851510047913,
-2.1973462104797363,
1.283966064453125,
-1.051693320274353,
0.3705988824367523,
1.3519479036331177,
-0.945061206817627,
0.3903399407863617,
-1.8073160648345947,
-0.07470791041851044,
0.5770738124847412,
-2.236298084259033,
0.28397151827812195,
-1.2366493940353394,
-0.5399202108383179,
1.0018757581710815,
0.36573293805122375,
-1.3061039447784424,
0.12152208387851715,
-0.4362221658229828,
0.9936566948890686,
0.41059598326683044,
1.1172337532043457,
-1.6979349851608276,
-0.02392747439444065,
-0.33565616607666016,
0.15983103215694427,
-1.2770929336547852,
-1.527702808380127,
0.5787822604179382,
0.6291095018386841,
0.5759965181350708,
-0.08782604336738586,
1.0044163465499878,
-1.0581893920898438,
0.7860009074211121,
-0.9785261154174805,
-1.7329248189926147,
-1.4100619554519653,
-2.2353198528289795,
-2.312516212463379,
0.7649694681167603,
-0.46877431869506836,
-0.5298116207122803,
2.0459892749786377,
-0.9580331444740295,
-1.70066237449646,
1.1913963556289673,
0.3483007550239563,
-0.03453755006194115,
2.431105852127075,
0.1710600107908249,
-0.7053481340408325,
0.45621946454048157,
-0.7900634407997131,
0.8419853448867798,
-0.4277176260948181,
1.3190864324569702,
0.3928227722644806,
-1.0407676696777344,
1.5571058988571167,
-0.43788278102874756,
0.560874879360199,
-0.6946054697036743,
-0.4724230170249939,
-0.7367029786109924,
0.2919118106365204,
1.8929667472839355,
-0.2899785041809082,
1.5026214122772217,
-0.27672919631004333,
-1.5541213750839233,
-1.60402250289917,
0.9017956852912903,
0.4565926790237427,
-0.8147914409637451,
0.09757232666015625,
-0.4172123968601227,
0.1306069940328598,
-0.08127208054065704,
1.0692529678344727,
1.313244342803955,
0.7302469611167908,
-0.283540815114975,
-0.829565703868866,
0.18967334926128387,
-0.15407519042491913,
-0.7683922648429871,
-1.7384377717971802,
-0.3247947692871094,
0.11383490264415741,
0.6302714347839355,
-1.1755183935165405,
1.7785123586654663,
0.850322961807251,
1.924963355064392,
1.0018833875656128,
-0.4219505488872528,
1.525308609008789,
0.052413005381822586,
1.8430637121200562,
-0.5827583074569702,
0.6288449764251709,
-0.4118301570415497,
-1.1145808696746826,
0.9158897399902344,
-0.3186797797679901,
-2.017388105392456,
-0.6601799726486206,
-0.7367324233055115,
-0.23885324597358704,
-0.7558035254478455,
0.9142656922340393,
-0.27345868945121765,
-1.4225424528121948,
0.25739943981170654,
-0.7619185447692871,
0.12591935694217682,
-1.1906776428222656,
0.3234282433986664,
0.7464454174041748,
-0.6234971880912781,
0.06985752284526825,
-0.2781178057193756,
-1.2989411354064941,
-0.46369799971580505,
0.3283056616783142,
1.776845932006836,
-0.7224035859107971,
0.8431867957115173,
1.0400806665420532,
-0.6942161917686462,
-0.05082319676876068,
0.3743704557418823,
-0.3083300292491913,
0.8628527522087097,
-1.0709654092788696,
-0.4911459982395172,
1.1753515005111694,
-0.1660555601119995,
-0.584712028503418,
1.4075034856796265,
0.7081711888313293,
-0.9704131484031677,
-0.18905749917030334,
-0.12732015550136566,
-0.8327978253364563,
0.11182884871959686,
-1.6326245069503784,
-0.09817871451377869,
0.45900532603263855,
-1.5440195798873901,
-0.4639863073825836,
-0.19839517772197723,
1.2617197036743164,
-0.2056332230567932,
1.4419689178466797,
-0.3402364253997803,
-0.14765514433383942,
-0.3454315662384033,
-0.34283316135406494,
0.11615858972072601,
-0.2415280044078827,
-0.5586586594581604,
0.2560622990131378,
-0.7458829879760742,
0.3642350733280182,
1.438665509223938,
0.27244290709495544,
0.10350412130355835,
0.4965359568595886,
1.0845640897750854,
0.42083102464675903,
-0.032286547124385834,
-0.9113693833351135,
-1.5271694660186768,
2.0321762561798096,
-1.4965261220932007,
2.0594325065612793,
0.8473827838897705,
0.07808835804462433,
-1.814279556274414,
-1.8595572710037231,
1.379211664199829,
1.144126534461975,
2.358247995376587,
0.5893707871437073,
0.3941441774368286,
-0.8238542675971985,
-0.5668324828147888,
0.33825254440307617,
-1.0290213823318481,
-0.7653633952140808,
0.2118791788816452,
2.404881238937378,
1.7850680351257324,
-0.434245765209198,
-0.17212948203086853,
-1.0245490074157715,
1.4848804473876953,
-0.1818947046995163,
0.2042693942785263,
1.9941980838775635,
-0.24706779420375824,
-1.0530486106872559,
1.2824907302856445,
-2.3650729656219482,
0.13938480615615845,
1.9693001508712769,
0.25654852390289307,
0.07805266976356506,
-1.3919321298599243,
-0.6120303869247437,
-0.23771317303180695,
-0.4289036989212036,
-1.2475162744522095,
0.5163260698318481,
-0.2321871966123581,
-0.7379999756813049,
-1.3976364135742188,
0.16288773715496063,
-1.1322821378707886,
-1.6150513887405396,
0.1733929067850113,
1.9186267852783203,
2.0246498584747314,
-0.7708324193954468,
1.6000561714172363,
-0.32014042139053345,
0.11734947562217712,
1.1733105182647705,
1.2248073816299438,
3.1355481147766113,
1.8878967761993408,
-1.3284281492233276,
0.6147210001945496,
-0.15123505890369415,
-0.49449437856674194,
1.132359266281128,
-1.1672358512878418,
1.2843455076217651,
-0.1050749272108078,
-1.214597225189209,
-1.1846213340759277,
0.9990159869194031,
0.4899056851863861,
0.05868170037865639,
-0.5432354807853699,
1.2169010639190674,
0.0500994548201561,
1.3200020790100098,
0.5906092524528503,
-0.30541518330574036,
0.567164421081543,
-0.38306939601898193,
-0.5487562417984009,
1.6144628524780273,
0.1957913488149643,
-1.332736849784851,
-2.278503656387329,
-0.1919984519481659,
-0.861084520816803,
0.11831602454185486,
-0.6104303598403931,
-1.013730525970459,
1.668528437614441,
0.350450336933136,
-1.2461252212524414,
-0.25501447916030884,
-0.2930980622768402,
-0.6266961097717285,
2.6670901775360107,
-1.365048885345459,
-0.2280980497598648,
-0.9980065822601318,
-0.5726268887519836,
1.5683567523956299,
-1.264784336090088,
-0.24219204485416412,
-1.0677216053009033,
-0.5327817797660828,
-1.1768312454223633,
-0.58088618516922,
-0.010963814333081245,
-0.9039401412010193,
0.7942334413528442,
0.1678222268819809,
-1.2468223571777344,
-0.3726484477519989,
-0.8920753598213196,
0.8555088043212891,
-0.10572394728660583,
0.24252694845199585,
1.8900132179260254,
0.4019653797149658,
-0.39296954870224,
0.7323407530784607,
1.1390244960784912,
0.6316075325012207,
-0.610031008720398,
0.24064889550209045,
-0.6496994495391846,
0.2889224588871002,
-1.2201542854309082,
0.2866624593734741,
-2.8359382152557373,
0.6591975092887878,
-0.017593704164028168,
-0.06400056183338165,
-0.0328935906291008,
-1.296624779701233,
1.1029736995697021,
2.62345027923584,
-1.113492727279663,
0.48009297251701355,
0.3265325129032135,
1.216418743133545,
-1.6181977987289429,
0.3069003224372864,
-0.410002201795578,
2.1708993911743164,
0.18240870535373688,
1.1455750465393066,
-0.4960913062095642,
-2.401179790496826,
0.5695548057556152,
-1.3217476606369019,
-1.1297155618667603,
0.81279456615448,
-0.8352299928665161,
0.04829655587673187,
-1.3988853693008423,
-0.21841824054718018,
-0.8301929235458374,
-1.218634843826294,
0.6654337644577026,
0.0824027955532074,
0.46081653237342834,
-0.5977102518081665,
0.31587904691696167,
-2.1536171436309814,
-1.3571661710739136,
-0.22054725885391235,
-0.9393564462661743,
0.48376283049583435,
-0.3565225601196289,
0.6919012069702148,
-0.15170685946941376,
-0.03684038668870926,
0.33075690269470215,
1.4297269582748413,
3.386113405227661,
0.20023109018802643,
0.42109671235084534,
-0.2344796359539032,
-0.9122596979141235,
1.413156509399414,
0.9074898362159729,
-0.10156232118606567,
-0.6371257901191711,
-1.0655913352966309,
1.297842025756836,
2.0260965824127197,
1.034915566444397,
0.010351231321692467,
-0.7870496511459351,
-0.7407500743865967,
-0.01721932366490364,
0.18397021293640137,
0.46847644448280334,
0.9230471849441528,
0.10166780650615692,
0.07215356826782227,
1.4089374542236328,
1.2194210290908813,
-0.4301886260509491,
0.38236644864082336,
-0.8166477084159851,
-0.4630068242549896,
0.4843199849128723,
0.3031292259693146,
-0.026701586320996284,
0.33855876326560974,
-0.9801576137542725,
-0.28129103779792786,
-0.38271015882492065,
-0.9112074375152588,
-0.6753875613212585,
-0.43542319536209106,
-0.3061676025390625,
1.6990594863891602,
0.12212133407592773,
-0.5026676654815674,
0.0588979609310627,
-0.752047061920166,
-0.10008147358894348,
-1.1015293598175049,
0.23164385557174683,
-0.12069854140281677,
-0.10548891127109528,
-0.09205655753612518,
1.7938889265060425,
-0.9233878254890442,
-2.1116602420806885,
0.19034717977046967,
0.19267964363098145,
-0.32205355167388916,
0.21159076690673828,
1.6575454473495483,
0.5100749135017395,
1.4541078805923462,
1.3830116987228394,
0.9331791400909424,
-0.6959802508354187,
-1.349408507347107,
0.683496356010437,
1.0395381450653076,
-1.3739349842071533,
0.8719573616981506,
-0.03676354140043259,
-0.5272791981697083,
0.6255444288253784,
1.2893890142440796,
0.42468029260635376,
-2.063420534133911,
0.7804418802261353,
-0.9833711981773376,
0.7936238050460815,
0.714503288269043,
0.6923180222511292,
0.2504724860191345,
0.7940369248390198,
-1.2639063596725464,
-1.136763572692871,
-0.7003143429756165,
-0.6885815858840942,
1.9697587490081787,
-0.2741510272026062,
0.5664238929748535,
-0.1816595047712326,
-1.4360406398773193,
-0.08003179728984833,
0.6706869602203369,
0.37867844104766846,
-0.5153555274009705,
0.7542213201522827,
-0.6897982358932495,
-1.1211202144622803,
-1.36188805103302,
-0.5179173946380615,
-1.0310615301132202,
-0.9293652772903442,
1.088955283164978,
0.8118952512741089,
0.30571576952934265,
1.8828554153442383,
0.6976283192634583,
0.21750883758068085,
-2.5997745990753174,
0.8910638093948364,
0.3347683846950531,
-0.08621323108673096,
0.8571834564208984,
0.4105839729309082,
1.0398186445236206,
-0.04110077768564224,
0.5411965250968933,
-2.464930534362793,
2.377418041229248,
-0.21168914437294006,
0.717349112033844,
0.02997210994362831,
-0.1690332442522049,
1.1177066564559937,
0.5459518432617188,
0.49648553133010864,
-1.0023784637451172,
0.5996285080909729,
-0.571190357208252,
1.2727683782577515,
0.8448022603988647,
-0.7583569288253784,
-0.09483085572719574,
1.3161835670471191,
0.39604437351226807,
-0.5199447274208069,
-0.9257652163505554,
-0.9776251912117004,
0.9404087662696838,
1.7821344137191772,
-0.060302965342998505,
0.03585411608219147,
0.8569531440734863,
0.6399157643318176,
-1.279448390007019,
0.04096303507685661,
-0.7415307760238647,
-0.8628141283988953,
1.6236921548843384,
2.0460751056671143,
-0.17053848505020142,
-0.1795078068971634,
-0.7877418398857117,
-1.358046054840088,
0.8000324368476868,
-0.035239532589912415,
0.14788487553596497,
0.6012272238731384,
-0.5762331485748291,
1.0405772924423218,
0.8940357565879822,
0.9714227914810181,
0.21068385243415833,
0.2564847767353058,
0.3824916481971741,
-0.40085533261299133,
-1.1659077405929565,
-0.2677937150001526,
-1.0881876945495605,
-2.596644163131714,
0.43507251143455505,
-0.20615750551223755,
-1.4573438167572021,
-0.0235602930188179,
-0.9876165986061096,
0.8772261142730713,
-0.5580308437347412,
-1.047162413597107,
-1.498565435409546,
0.2558872103691101,
-0.10926532745361328,
0.9938628077507019,
-1.5953112840652466,
-0.10426956415176392,
1.1632230281829834,
0.8661428689956665,
-0.6748905181884766,
0.9802098870277405,
0.17404185235500336,
1.0641827583312988,
0.88243168592453,
-0.33717912435531616,
0.4830528497695923,
0.10410870611667633,
-1.3285596370697021,
0.4445098042488098,
1.1336992979049683,
0.11596459150314331,
1.4501451253890991,
-0.506712019443512,
-0.04564584046602249,
0.3688053488731384,
-0.4959210157394409,
-0.4430330693721771,
-0.5687081217765808,
0.6785181164741516,
0.049187835305929184,
-0.9538523554801941,
0.04818795248866081,
-0.062214870005846024,
-0.23679013550281525,
0.1329457014799118,
-1.474756121635437,
-0.1405072659254074,
-0.4061146676540375,
-0.6390615105628967,
-1.2734980583190918,
-0.08237679302692413,
1.361554741859436,
-0.6576996445655823,
-0.2268783152103424,
0.4384637176990509,
0.4286423325538635,
0.508169949054718,
0.6758898496627808,
-0.6688979864120483,
-0.3531714379787445,
-0.1970578134059906,
-0.4206208884716034,
0.36671343445777893,
1.3940916061401367,
-0.11445868015289307,
-0.9117160439491272,
0.7303970456123352,
-0.3473762273788452,
0.07266728579998016,
1.9684834480285645,
0.09296749532222748,
-0.8257479071617126,
0.29206645488739014,
-0.650453507900238,
1.8858860731124878,
1.7451756000518799,
1.290753960609436,
-0.1632334440946579,
-0.964037299156189,
0.6964573264122009,
-0.3678278625011444,
-0.4531172811985016,
0.8601748943328857,
0.35805267095565796,
-0.2465086430311203,
-1.458813190460205,
0.6447391510009766,
1.2803385257720947,
-0.807680606842041,
-0.8996515870094299,
0.08053997159004211,
-0.756725013256073,
1.1004610061645508,
0.6960911154747009,
0.39769697189331055,
0.27099648118019104,
1.5918350219726562,
0.8275966644287109,
-0.48818421363830566,
0.5436373949050903,
0.5091429948806763,
-0.17134061455726624,
-2.1219701766967773,
-1.1740010976791382,
0.25734567642211914,
-0.515179455280304,
-1.621180772781372,
1.3890968561172485,
-1.1771306991577148,
-0.9414123296737671,
0.5256763100624084,
0.05063331127166748,
1.401698112487793,
0.369801789522171,
1.5249054431915283,
2.0402960777282715,
0.8360031843185425,
0.3427049219608307,
1.2743556499481201,
-0.15777994692325592,
-0.48971569538116455,
1.8585081100463867,
-0.46261945366859436,
0.49721091985702515,
1.098249912261963,
-0.3270423710346222,
-1.065629482269287,
-0.772219717502594,
-1.228615164756775,
-0.7178894877433777,
1.20558762550354,
0.018780123442411423,
-1.0450034141540527,
0.2970866560935974,
1.6118310689926147,
0.0481412373483181,
-0.30520427227020264,
0.631168782711029,
0.4341460168361664,
-0.8055907487869263,
-0.0806623250246048,
-0.8816025853157043,
0.5115758180618286,
-0.2108297497034073,
-0.37192660570144653,
0.40249040722846985,
0.515394389629364,
1.311417818069458,
0.018155235797166824,
0.11960318684577942,
1.0104217529296875,
-1.4034756422042847,
1.412333369255066,
-0.6293867826461792,
0.2670178711414337,
-2.3470072746276855,
1.37520170211792,
-0.6786137223243713,
1.935014247894287,
-2.642594337463379,
0.4745713770389557,
-0.5478287935256958,
-0.49314016103744507,
0.30929800868034363,
-0.29306137561798096,
0.20068643987178802,
-0.1652587503194809,
-1.1449799537658691,
-0.07388347387313843,
-0.6763392686843872,
0.546505868434906,
1.1119807958602905,
1.3231569528579712,
-1.0464577674865723,
-0.2715405821800232,
-1.7044035196304321,
-0.13151583075523376,
-0.7050189971923828,
0.21519601345062256,
-1.9954876899719238,
-0.22795069217681885,
-1.896462082862854,
-2.303375005722046,
-1.3503540754318237,
-0.8210243582725525,
1.1674655675888062,
0.1705424189567566,
-0.8867802023887634,
1.2448899745941162,
-0.3335687220096588,
-1.857153296470642,
1.0603854656219482,
-2.099700689315796
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
I am pretty much done with the PR. Just one clarification: `Sequence` in `arrow_dataset.py` is a custom dataclass from `features.py` instead of the `type.hinting` class `Sequence` from Python. Do you suggest using that custom `Sequence` class somehow ? Otherwise signature currently reads instead:
```Python
def sort(
self,
column_names: Union[str, List[str]],
reverse: Union[bool, List[bool]] = False,
kind = "deprecated",
null_placement: str = "last",
keep_in_memory: bool = False,
load_from_cache_file: bool = True,
indices_cache_file_name: Optional[str] = None,
writer_batch_size: Optional[int] = 1000,
new_fingerprint: Optional[str] = None,
)
```
Also, to maintain backwards compatibility, I added conditionals for `null_placement`, because pyarrow's `null_placement` only accepts `at_start` and `at_end`, and not `last` and `first`.
If that is all good, I think I can open the PR.
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 119 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
I am pretty much done with the PR. Just one clarification: `Sequence` in `arrow_dataset.py` is a custom dataclass from `features.py` instead of the `type.hinting` class `Sequence` from Python. Do you suggest using that custom `Sequence` class somehow ? Otherwise signature currently reads instead:
```Python
def sort(
self,
column_names: Union[str, List[str]],
reverse: Union[bool, List[bool]] = False,
kind = "deprecated",
null_placement: str = "last",
keep_in_memory: bool = False,
load_from_cache_file: bool = True,
indices_cache_file_name: Optional[str] = None,
writer_batch_size: Optional[int] = 1000,
new_fingerprint: Optional[str] = None,
)
```
Also, to maintain backwards compatibility, I added conditionals for `null_placement`, because pyarrow's `null_placement` only accepts `at_start` and `at_end`, and not `last` and `first`.
If that is all good, I think I can open the PR.
|
[
-1.206371784210205,
-0.9001083374023438,
-0.7287048697471619,
1.5281463861465454,
-0.15486183762550354,
-1.2318964004516602,
0.1660555899143219,
-1.061037540435791,
1.6927155256271362,
-0.8267017006874084,
0.31720396876335144,
-1.615334391593933,
0.09671789407730103,
-0.6464735269546509,
-0.8071914911270142,
-0.9425913095474243,
-0.4161263406276703,
-0.8056835532188416,
1.0352611541748047,
2.479494571685791,
1.235856294631958,
-1.44416344165802,
2.660623550415039,
0.7526205778121948,
-0.16827218234539032,
-0.9988558888435364,
0.5326645970344543,
-0.01295035146176815,
-1.331214189529419,
-0.45356881618499756,
-0.9862121343612671,
-0.13744617998600006,
-0.6029661297798157,
-0.504406213760376,
0.0061957947909832,
0.43610239028930664,
-0.28809016942977905,
-0.4216775894165039,
-0.5500675439834595,
-0.7748640179634094,
0.4053443968296051,
-0.41446927189826965,
0.940847635269165,
-0.3043597638607025,
1.8587275743484497,
-0.5818511247634888,
0.4483393728733063,
0.7209620475769043,
1.3282737731933594,
0.1820969134569168,
-0.029868774116039276,
0.2598440945148468,
0.36518314480781555,
-0.0409240759909153,
0.5142322778701782,
1.1168962717056274,
0.6767688989639282,
0.5069341659545898,
0.7372010946273804,
-2.196664333343506,
1.294821858406067,
-1.0448390245437622,
0.3596981465816498,
1.327776551246643,
-0.9859709143638611,
0.3855855464935303,
-1.7847589254379272,
-0.06706945598125458,
0.5945978164672852,
-2.2240257263183594,
0.2634162902832031,
-1.2644449472427368,
-0.5356773734092712,
0.9976471066474915,
0.36635372042655945,
-1.266615867614746,
0.14601795375347137,
-0.43716001510620117,
1.0370656251907349,
0.459896445274353,
1.1196976900100708,
-1.696250081062317,
-0.027173498645424843,
-0.34354621171951294,
0.1724974364042282,
-1.300796627998352,
-1.5142180919647217,
0.5481662750244141,
0.6533459424972534,
0.5535425543785095,
-0.08691500127315521,
1.0215022563934326,
-1.0511560440063477,
0.7692099809646606,
-0.9802259802818298,
-1.7389596700668335,
-1.384702444076538,
-2.2291417121887207,
-2.3173229694366455,
0.7438491582870483,
-0.46725720167160034,
-0.5324999690055847,
2.064577102661133,
-0.9773860573768616,
-1.7433419227600098,
1.165705680847168,
0.31906893849372864,
-0.027792012318968773,
2.428863525390625,
0.1544327437877655,
-0.6913124918937683,
0.4190147817134857,
-0.7642690539360046,
0.8237460255622864,
-0.4427243173122406,
1.3286758661270142,
0.4002416431903839,
-1.058157205581665,
1.5424680709838867,
-0.40743523836135864,
0.5620906949043274,
-0.7227660417556763,
-0.4544512927532196,
-0.7136569023132324,
0.3001314401626587,
1.8934881687164307,
-0.3356408178806305,
1.5480495691299438,
-0.2735047936439514,
-1.550700068473816,
-1.6120765209197998,
0.8873798847198486,
0.4809546172618866,
-0.7920362949371338,
0.10643400251865387,
-0.3997962474822998,
0.1006280928850174,
-0.08031706511974335,
1.0740506649017334,
1.3102086782455444,
0.6978009343147278,
-0.2849613428115845,
-0.808271586894989,
0.19027791917324066,
-0.15095794200897217,
-0.7456746101379395,
-1.767555832862854,
-0.32098454236984253,
0.10328736901283264,
0.6504244804382324,
-1.1646815538406372,
1.7423561811447144,
0.838902473449707,
1.9268858432769775,
0.9986876845359802,
-0.4288601875305176,
1.5213364362716675,
0.03484063968062401,
1.8212182521820068,
-0.5656417608261108,
0.6642673015594482,
-0.37835365533828735,
-1.1225515604019165,
0.9097259044647217,
-0.311520516872406,
-2.0143845081329346,
-0.6515176296234131,
-0.706307053565979,
-0.19045834243297577,
-0.7662152051925659,
0.920540452003479,
-0.25613144040107727,
-1.4356908798217773,
0.24261897802352905,
-0.7537866830825806,
0.11733120679855347,
-1.1723828315734863,
0.31992003321647644,
0.7141027450561523,
-0.5826542973518372,
0.07900182902812958,
-0.2901482880115509,
-1.3004441261291504,
-0.4953855872154236,
0.3355834484100342,
1.7729246616363525,
-0.7165456414222717,
0.8350678086280823,
1.0490601062774658,
-0.7068283557891846,
-0.031143896281719208,
0.3611890375614166,
-0.2861253321170807,
0.8685179352760315,
-1.0829778909683228,
-0.47372564673423767,
1.1817172765731812,
-0.16582871973514557,
-0.5998896360397339,
1.422281265258789,
0.7323967814445496,
-0.9704858064651489,
-0.1724524050951004,
-0.15658313035964966,
-0.808103084564209,
0.08596210181713104,
-1.6305530071258545,
-0.07853810489177704,
0.4386131167411804,
-1.5564641952514648,
-0.4403647184371948,
-0.21463501453399658,
1.2732614278793335,
-0.21731725335121155,
1.43462073802948,
-0.348401814699173,
-0.16675502061843872,
-0.34223517775535583,
-0.34394317865371704,
0.12860870361328125,
-0.22438876330852509,
-0.5451430082321167,
0.28551581501960754,
-0.7509152293205261,
0.3837747275829315,
1.4065370559692383,
0.2773839235305786,
0.11879390478134155,
0.49102655053138733,
1.0504634380340576,
0.4267220199108124,
-0.05772523581981659,
-0.9137340188026428,
-1.539671778678894,
2.0058417320251465,
-1.4712128639221191,
2.0758888721466064,
0.8501830101013184,
0.073737233877182,
-1.8150558471679688,
-1.8691039085388184,
1.404189944267273,
1.1556669473648071,
2.3737125396728516,
0.5978825688362122,
0.3741779625415802,
-0.8408681154251099,
-0.5773696899414062,
0.34066516160964966,
-1.0224381685256958,
-0.7486655712127686,
0.21480408310890198,
2.3927366733551025,
1.7753044366836548,
-0.40224239230155945,
-0.18685908615589142,
-1.0212392807006836,
1.482936978340149,
-0.16360598802566528,
0.19383883476257324,
1.9977575540542603,
-0.2289675772190094,
-1.0561668872833252,
1.2511677742004395,
-2.369513988494873,
0.12218636274337769,
1.9536844491958618,
0.21354630589485168,
0.0873483419418335,
-1.3986960649490356,
-0.6352457404136658,
-0.25258442759513855,
-0.4271320402622223,
-1.2562931776046753,
0.49864819645881653,
-0.23956315219402313,
-0.7288193106651306,
-1.4181805849075317,
0.18274034559726715,
-1.1284546852111816,
-1.6279834508895874,
0.16130337119102478,
1.9173879623413086,
1.9752492904663086,
-0.7573496103286743,
1.6029129028320312,
-0.3330030143260956,
0.10848565399646759,
1.1917616128921509,
1.2312184572219849,
3.1199941635131836,
1.8859517574310303,
-1.3210194110870361,
0.6317483186721802,
-0.13404221832752228,
-0.47988200187683105,
1.1156911849975586,
-1.1964964866638184,
1.2906818389892578,
-0.12213610112667084,
-1.2196546792984009,
-1.2125964164733887,
1.0207823514938354,
0.4799400866031647,
0.0831974595785141,
-0.5641379356384277,
1.2301368713378906,
0.06219036504626274,
1.3296676874160767,
0.5782738924026489,
-0.28916922211647034,
0.5865510702133179,
-0.4016689658164978,
-0.5566658973693848,
1.6188504695892334,
0.19382622838020325,
-1.2982538938522339,
-2.2819156646728516,
-0.23667576909065247,
-0.8283052444458008,
0.07101109623908997,
-0.5931000709533691,
-0.9970476627349854,
1.677064061164856,
0.3526681065559387,
-1.264669418334961,
-0.25863924622535706,
-0.3348102271556854,
-0.6103991270065308,
2.659360408782959,
-1.362686276435852,
-0.22653326392173767,
-0.9883738160133362,
-0.5670811533927917,
1.5475938320159912,
-1.2387382984161377,
-0.22809268534183502,
-1.0528032779693604,
-0.5368905067443848,
-1.1968899965286255,
-0.6003400683403015,
-0.007713807746767998,
-0.898506760597229,
0.7815945148468018,
0.18345609307289124,
-1.2532421350479126,
-0.3916885256767273,
-0.8675097227096558,
0.8643059730529785,
-0.07811775803565979,
0.22090552747249603,
1.9086908102035522,
0.3967418670654297,
-0.3775530159473419,
0.7287054061889648,
1.0926223993301392,
0.6276581883430481,
-0.6306990385055542,
0.2908443212509155,
-0.6649718880653381,
0.2723085880279541,
-1.2220561504364014,
0.3099689483642578,
-2.871521472930908,
0.6717023253440857,
0.008530385792255402,
-0.06317099928855896,
-0.02354779839515686,
-1.3007487058639526,
1.090760350227356,
2.6889021396636963,
-1.1267865896224976,
0.4537431597709656,
0.31839093565940857,
1.2025909423828125,
-1.6041415929794312,
0.31303542852401733,
-0.40003523230552673,
2.1570353507995605,
0.19491161406040192,
1.187103271484375,
-0.46988922357559204,
-2.4151177406311035,
0.5787779688835144,
-1.3121250867843628,
-1.1343868970870972,
0.8264552354812622,
-0.8092470765113831,
0.06300055980682373,
-1.3915212154388428,
-0.19132238626480103,
-0.8153567314147949,
-1.2249311208724976,
0.692960798740387,
0.08954602479934692,
0.49848881363868713,
-0.6183957457542419,
0.3204181492328644,
-2.136789560317993,
-1.3347023725509644,
-0.24043269455432892,
-0.9310495257377625,
0.46807557344436646,
-0.3260951042175293,
0.688003659248352,
-0.16071389615535736,
-0.012122713960707188,
0.3071008026599884,
1.4383405447006226,
3.407724618911743,
0.20127041637897491,
0.38675186038017273,
-0.20817604660987854,
-0.8895828127861023,
1.400984287261963,
0.89246666431427,
-0.11601047217845917,
-0.6121155619621277,
-1.0384544134140015,
1.2632007598876953,
2.021592378616333,
1.040695309638977,
0.01724567636847496,
-0.8027482032775879,
-0.7377625703811646,
0.01050972007215023,
0.18108238279819489,
0.47117552161216736,
0.8981122374534607,
0.09813609719276428,
0.05743914470076561,
1.4436014890670776,
1.2370108366012573,
-0.4618232250213623,
0.3831118941307068,
-0.8463340997695923,
-0.4791749119758606,
0.45090726017951965,
0.33358630537986755,
-0.028033407405018806,
0.3263208568096161,
-0.9944696426391602,
-0.25147098302841187,
-0.4057580828666687,
-0.9144696593284607,
-0.6765236854553223,
-0.42780572175979614,
-0.3354703187942505,
1.6912528276443481,
0.14488504827022552,
-0.49182742834091187,
0.03331756219267845,
-0.7125314474105835,
-0.08457815647125244,
-1.084416389465332,
0.24132347106933594,
-0.10650958120822906,
-0.08760678768157959,
-0.05233955383300781,
1.802977442741394,
-0.9284765720367432,
-2.0666065216064453,
0.22002485394477844,
0.15684007108211517,
-0.32410958409309387,
0.2327895313501358,
1.6607636213302612,
0.5092304944992065,
1.4711462259292603,
1.3773455619812012,
0.9680529236793518,
-0.7326987385749817,
-1.3504579067230225,
0.6793731451034546,
1.0607661008834839,
-1.3651736974716187,
0.8507512807846069,
-0.01779736578464508,
-0.5309357643127441,
0.6085180640220642,
1.2949339151382446,
0.4447466731071472,
-2.1049859523773193,
0.7661100029945374,
-0.9651427865028381,
0.7621047496795654,
0.7004874348640442,
0.6766424179077148,
0.22134920954704285,
0.7908494472503662,
-1.2737020254135132,
-1.1265869140625,
-0.6888988018035889,
-0.6871092915534973,
1.9311603307724,
-0.2685888707637787,
0.5710498690605164,
-0.18613247573375702,
-1.4610681533813477,
-0.08155514299869537,
0.6666951179504395,
0.3918394446372986,
-0.5322353839874268,
0.777010977268219,
-0.6767172813415527,
-1.1224347352981567,
-1.3597168922424316,
-0.5308868885040283,
-1.0371652841567993,
-0.929364025592804,
1.080369472503662,
0.8245499134063721,
0.268743097782135,
1.8757990598678589,
0.6558878421783447,
0.2293998897075653,
-2.605455160140991,
0.895595371723175,
0.33595260977745056,
-0.08357097208499908,
0.8630356788635254,
0.3885607421398163,
0.9793452024459839,
-0.026922557502985,
0.5443493127822876,
-2.446377754211426,
2.368882179260254,
-0.21481990814208984,
0.6972180008888245,
0.04963887482881546,
-0.18528124690055847,
1.116546392440796,
0.5287745594978333,
0.529032826423645,
-0.9966796636581421,
0.6074642539024353,
-0.6030482053756714,
1.2886061668395996,
0.8443086743354797,
-0.7501972913742065,
-0.13092385232448578,
1.306907296180725,
0.4013220965862274,
-0.5277928709983826,
-0.9003610014915466,
-1.0194847583770752,
0.9288663268089294,
1.7742302417755127,
-0.050227321684360504,
0.027452461421489716,
0.843363881111145,
0.6541146636009216,
-1.2957247495651245,
0.042758043855428696,
-0.7760143876075745,
-0.8538615107536316,
1.613676905632019,
2.0276362895965576,
-0.1994248330593109,
-0.17654868960380554,
-0.8029467463493347,
-1.303016185760498,
0.8225676417350769,
-0.05949180945754051,
0.12242713570594788,
0.6051352024078369,
-0.5735617280006409,
1.05459725856781,
0.8877480030059814,
0.9787113070487976,
0.2211068868637085,
0.2685914635658264,
0.3681877851486206,
-0.40532320737838745,
-1.1592575311660767,
-0.23042388260364532,
-1.0518890619277954,
-2.5517892837524414,
0.46847549080848694,
-0.178760826587677,
-1.4529552459716797,
-0.029200615361332893,
-0.9916591644287109,
0.8708479404449463,
-0.5442127585411072,
-1.0439194440841675,
-1.4869135618209839,
0.2552153468132019,
-0.1380425989627838,
0.9666656255722046,
-1.5872812271118164,
-0.04912558197975159,
1.2060282230377197,
0.8803479671478271,
-0.6975885629653931,
0.9978629946708679,
0.1552543193101883,
1.0870550870895386,
0.9170806407928467,
-0.3246837556362152,
0.46837109327316284,
0.10759668052196503,
-1.311607003211975,
0.459003746509552,
1.1268004179000854,
0.140602707862854,
1.4534900188446045,
-0.5374338030815125,
-0.059960559010505676,
0.36051347851753235,
-0.49818575382232666,
-0.4513700604438782,
-0.5795577168464661,
0.6784009337425232,
0.04702884703874588,
-0.926947832107544,
0.08693040907382965,
-0.04521946236491203,
-0.2314293384552002,
0.11445394158363342,
-1.4890683889389038,
-0.12544411420822144,
-0.3906984329223633,
-0.6190542578697205,
-1.2699298858642578,
-0.040630754083395004,
1.379159688949585,
-0.6441124081611633,
-0.23512348532676697,
0.4293442368507385,
0.4252646267414093,
0.4920179545879364,
0.6734173893928528,
-0.6411113142967224,
-0.3860633075237274,
-0.19806329905986786,
-0.42576098442077637,
0.3782482445240021,
1.379967212677002,
-0.1337934136390686,
-0.9180024862289429,
0.7641296982765198,
-0.3640623688697815,
0.04000851884484291,
1.9730719327926636,
0.1121307909488678,
-0.8332297205924988,
0.2842041254043579,
-0.6297076344490051,
1.90277898311615,
1.7781964540481567,
1.3121204376220703,
-0.14486342668533325,
-0.9972004890441895,
0.6944225430488586,
-0.3643495738506317,
-0.4577636420726776,
0.9014348387718201,
0.38060423731803894,
-0.23782064020633698,
-1.4434528350830078,
0.6176267862319946,
1.2758498191833496,
-0.8181179165840149,
-0.8848167657852173,
0.09678573906421661,
-0.7441178560256958,
1.0784176588058472,
0.6988939046859741,
0.3769835829734802,
0.2620798647403717,
1.5949375629425049,
0.8143239617347717,
-0.48603877425193787,
0.5572726726531982,
0.47031259536743164,
-0.18020683526992798,
-2.113377809524536,
-1.1656752824783325,
0.28855860233306885,
-0.5291204452514648,
-1.6445775032043457,
1.40070378780365,
-1.1742998361587524,
-0.9155853986740112,
0.5099210143089294,
0.03613382950425148,
1.4180129766464233,
0.33864691853523254,
1.52870774269104,
2.0561587810516357,
0.853963315486908,
0.35027769207954407,
1.2826939821243286,
-0.15655392408370972,
-0.5203700661659241,
1.840161681175232,
-0.4921252131462097,
0.4763231873512268,
1.1118097305297852,
-0.30095434188842773,
-1.0418661832809448,
-0.8115769624710083,
-1.2214643955230713,
-0.7105515599250793,
1.2265684604644775,
0.037710823118686676,
-1.0707792043685913,
0.28696954250335693,
1.5973049402236938,
0.07604646682739258,
-0.3076379895210266,
0.6474506855010986,
0.41018593311309814,
-0.8285883069038391,
-0.07968471944332123,
-0.8747599124908447,
0.5224999785423279,
-0.2188299000263214,
-0.37153035402297974,
0.40724435448646545,
0.4793996214866638,
1.281293272972107,
0.022144731134176254,
0.1213090568780899,
1.0296257734298706,
-1.4045487642288208,
1.4503573179244995,
-0.623634397983551,
0.2958359718322754,
-2.3805830478668213,
1.3637839555740356,
-0.6852966547012329,
1.935247778892517,
-2.6658804416656494,
0.4686509966850281,
-0.5680400133132935,
-0.49190372228622437,
0.3216482996940613,
-0.2931438982486725,
0.20895721018314362,
-0.17061783373355865,
-1.1419647932052612,
-0.07583199441432953,
-0.694080114364624,
0.5561428666114807,
1.098253846168518,
1.3216534852981567,
-1.0611491203308105,
-0.2616053819656372,
-1.7174245119094849,
-0.16804371774196625,
-0.7032397389411926,
0.2760157585144043,
-1.998252511024475,
-0.21540288627147675,
-1.9094370603561401,
-2.3282413482666016,
-1.34657883644104,
-0.8119007349014282,
1.1370407342910767,
0.16177988052368164,
-0.8953872323036194,
1.2153072357177734,
-0.33758315443992615,
-1.8856565952301025,
1.0984560251235962,
-2.1127333641052246
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
I meant `typing.Sequence` (`datasets.Sequence` is a feature type).
Regarding `null_placement`, I think we can support both `at_start` and `at_end`, and `last` and `first` (for backward compatibility; convert internally to `at_end` and `at_start` respectively).
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 33 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
I meant `typing.Sequence` (`datasets.Sequence` is a feature type).
Regarding `null_placement`, I think we can support both `at_start` and `at_end`, and `last` and `first` (for backward compatibility; convert internally to `at_end` and `at_start` respectively).
|
[
-1.2010776996612549,
-0.9742602109909058,
-0.7009586691856384,
1.479052186012268,
-0.0717446357011795,
-1.3149577379226685,
0.18090492486953735,
-1.047257900238037,
1.756934642791748,
-0.8613452911376953,
0.36277204751968384,
-1.6430747509002686,
0.0807223990559578,
-0.6359919309616089,
-0.8348337411880493,
-0.928053081035614,
-0.4209706485271454,
-0.8062363266944885,
1.0074009895324707,
2.512873411178589,
1.2352722883224487,
-1.426798939704895,
2.597404718399048,
0.6533185243606567,
-0.15382064878940582,
-0.9662923812866211,
0.4804917871952057,
-0.01615682616829872,
-1.3332432508468628,
-0.4220733344554901,
-0.9483725428581238,
-0.09641849249601364,
-0.6316205859184265,
-0.5943428874015808,
0.026315778493881226,
0.42984285950660706,
-0.28214749693870544,
-0.46689462661743164,
-0.4860113263130188,
-0.793146014213562,
0.4317328631877899,
-0.3989962339401245,
0.9962673783302307,
-0.35269102454185486,
1.8787634372711182,
-0.5796303153038025,
0.5220114588737488,
0.6312497854232788,
1.3888237476348877,
0.1858646422624588,
-0.08443935215473175,
0.280744343996048,
0.3563203811645508,
0.016343802213668823,
0.48840436339378357,
1.1340813636779785,
0.6496756076812744,
0.5116190910339355,
0.7090015411376953,
-2.222599983215332,
1.3357325792312622,
-1.0481529235839844,
0.3390905261039734,
1.3195689916610718,
-1.0397683382034302,
0.3413989543914795,
-1.7680432796478271,
-0.13625743985176086,
0.5287981629371643,
-2.271416425704956,
0.13168533146381378,
-1.2776576280593872,
-0.4770139455795288,
1.046548843383789,
0.38303518295288086,
-1.3032090663909912,
0.10334570705890656,
-0.4204668402671814,
0.9307644963264465,
0.5053848028182983,
1.154783844947815,
-1.6973015069961548,
-0.034379150718450546,
-0.3787349462509155,
0.20338599383831024,
-1.3319227695465088,
-1.5243470668792725,
0.4953289031982422,
0.6944424510002136,
0.5323048233985901,
-0.07094050198793411,
0.9753313064575195,
-1.0188947916030884,
0.7303532361984253,
-0.9414423704147339,
-1.7596040964126587,
-1.3961292505264282,
-2.186039447784424,
-2.4290428161621094,
0.7661613821983337,
-0.4498274028301239,
-0.5551302433013916,
1.991620659828186,
-0.9821443557739258,
-1.8270931243896484,
1.1387981176376343,
0.3334628641605377,
-0.0764673501253128,
2.4243524074554443,
0.14684335887432098,
-0.6987468600273132,
0.45439043641090393,
-0.7497662305831909,
0.7668578624725342,
-0.5039730072021484,
1.3504619598388672,
0.4927251935005188,
-1.0658395290374756,
1.539363980293274,
-0.38538864254951477,
0.5805041193962097,
-0.7060372233390808,
-0.40968015789985657,
-0.7552903890609741,
0.328230619430542,
1.890549898147583,
-0.344632625579834,
1.5566132068634033,
-0.313498318195343,
-1.591820240020752,
-1.6094107627868652,
0.8932479023933411,
0.4264712631702423,
-0.7709174156188965,
0.10303404182195663,
-0.3967877924442291,
0.10245764255523682,
-0.008529230952262878,
1.037858009338379,
1.2938398122787476,
0.6963436603546143,
-0.2506166100502014,
-0.8444117903709412,
0.2952154576778412,
-0.119869165122509,
-0.6818836331367493,
-1.7424137592315674,
-0.3572700321674347,
0.11876478046178818,
0.6105238795280457,
-1.0888296365737915,
1.7273914813995361,
0.8021701574325562,
1.9153345823287964,
0.977990448474884,
-0.34092357754707336,
1.5419182777404785,
0.00015428848564624786,
1.8895623683929443,
-0.4797765612602234,
0.6638345122337341,
-0.3703259825706482,
-1.0925793647766113,
0.8730353713035583,
-0.396970272064209,
-2.013141393661499,
-0.652374267578125,
-0.8145629167556763,
-0.14307713508605957,
-0.7525277137756348,
0.9455000758171082,
-0.16668379306793213,
-1.4368482828140259,
0.24040094017982483,
-0.7532516121864319,
0.10364893078804016,
-1.2278151512145996,
0.33931782841682434,
0.8058885335922241,
-0.598859429359436,
0.0930296778678894,
-0.3140729069709778,
-1.325646996498108,
-0.45162245631217957,
0.34883415699005127,
1.8447890281677246,
-0.721902072429657,
0.8529459238052368,
1.013447642326355,
-0.7631423473358154,
-0.0147831030189991,
0.3914046883583069,
-0.3159915804862976,
0.8775279521942139,
-1.0309985876083374,
-0.3331643044948578,
1.1971408128738403,
-0.19081269204616547,
-0.6060948371887207,
1.4362555742263794,
0.7165461778640747,
-0.9908819198608398,
-0.08847617357969284,
-0.15397034585475922,
-0.7640408873558044,
0.04757172241806984,
-1.6390622854232788,
-0.07685986906290054,
0.3878243565559387,
-1.5538206100463867,
-0.4827863276004791,
-0.2520899176597595,
1.244388461112976,
-0.16743195056915283,
1.4313126802444458,
-0.3579563498497009,
-0.14665627479553223,
-0.41415277123451233,
-0.35361653566360474,
0.12183033674955368,
-0.23652595281600952,
-0.5593081116676331,
0.32546690106391907,
-0.7381972670555115,
0.4493716061115265,
1.3965367078781128,
0.3016871213912964,
0.11105197668075562,
0.5358911752700806,
1.0320137739181519,
0.4089045226573944,
-0.12184306979179382,
-0.8323654532432556,
-1.6175117492675781,
2.0730276107788086,
-1.4285132884979248,
1.9564486742019653,
0.7788406014442444,
0.03420243039727211,
-1.7861546277999878,
-1.8719300031661987,
1.4203509092330933,
1.1668015718460083,
2.3812315464019775,
0.6356412172317505,
0.38089728355407715,
-0.8343678712844849,
-0.5397796034812927,
0.36777710914611816,
-1.0306894779205322,
-0.7754989862442017,
0.17394089698791504,
2.3145875930786133,
1.743384838104248,
-0.4555661678314209,
-0.204826220870018,
-1.1052809953689575,
1.4869909286499023,
-0.1911659985780716,
0.17110265791416168,
1.9758483171463013,
-0.2899627983570099,
-1.0066144466400146,
1.2989004850387573,
-2.2815005779266357,
0.1479281783103943,
1.9544600248336792,
0.1820700317621231,
0.055005934089422226,
-1.4235126972198486,
-0.6136769652366638,
-0.25528621673583984,
-0.3635961711406708,
-1.2553091049194336,
0.46451273560523987,
-0.20560744404792786,
-0.7576556205749512,
-1.4664393663406372,
0.19681328535079956,
-1.0990324020385742,
-1.6488926410675049,
0.1733418107032776,
1.846211552619934,
1.9415955543518066,
-0.6862282156944275,
1.5720767974853516,
-0.2246447652578354,
0.14214350283145905,
1.2454255819320679,
1.1632882356643677,
3.1515450477600098,
1.9111769199371338,
-1.3006997108459473,
0.6919919848442078,
-0.09602974355220795,
-0.5176642537117004,
1.209466814994812,
-1.19268798828125,
1.3252989053726196,
-0.16086120903491974,
-1.2340399026870728,
-1.2108814716339111,
1.0051389932632446,
0.5002487301826477,
0.06817974150180817,
-0.5478820204734802,
1.2492605447769165,
0.05811156705021858,
1.3112972974777222,
0.5067028999328613,
-0.3232962191104889,
0.6574612855911255,
-0.4221424460411072,
-0.5968019962310791,
1.5984554290771484,
0.2949014902114868,
-1.2942392826080322,
-2.303795337677002,
-0.20208926498889923,
-0.8720643520355225,
0.03608240187168121,
-0.5545387864112854,
-0.9325544834136963,
1.6472634077072144,
0.4390203058719635,
-1.2518196105957031,
-0.2599469721317291,
-0.3011939823627472,
-0.6691814064979553,
2.666738986968994,
-1.3340975046157837,
-0.21088208258152008,
-0.9600369334220886,
-0.5905185341835022,
1.566625952720642,
-1.283392310142517,
-0.23052173852920532,
-1.0385231971740723,
-0.5589383840560913,
-1.2309470176696777,
-0.6725445985794067,
-0.08585178852081299,
-0.8940022587776184,
0.7496916055679321,
0.1283665895462036,
-1.2217347621917725,
-0.3679005801677704,
-0.9335823059082031,
0.8149788975715637,
-0.052242211997509,
0.26312118768692017,
1.8749622106552124,
0.4053772985935211,
-0.3840187191963196,
0.6948214173316956,
1.0433871746063232,
0.5762737989425659,
-0.6321799159049988,
0.27536407113075256,
-0.6784875988960266,
0.22891828417778015,
-1.1845124959945679,
0.3424478769302368,
-2.8206958770751953,
0.6298556923866272,
-0.052822403609752655,
-0.08696052432060242,
-0.060001272708177567,
-1.3237844705581665,
1.1181062459945679,
2.6644835472106934,
-1.1703813076019287,
0.46669843792915344,
0.26345041394233704,
1.2048563957214355,
-1.572730541229248,
0.29713019728660583,
-0.39126577973365784,
2.1859848499298096,
0.21076597273349762,
1.1295441389083862,
-0.4494628310203552,
-2.2861080169677734,
0.6111567616462708,
-1.272479772567749,
-1.1900699138641357,
0.7958507537841797,
-0.864753782749176,
-0.006630105897784233,
-1.319355845451355,
-0.1510917693376541,
-0.7135406732559204,
-1.1828410625457764,
0.7202579975128174,
0.014323999173939228,
0.5535368323326111,
-0.5918250679969788,
0.36684444546699524,
-2.113476514816284,
-1.3325600624084473,
-0.2766954004764557,
-0.9521996378898621,
0.4162219166755676,
-0.3042462170124054,
0.6384834051132202,
-0.19011621177196503,
0.010445001535117626,
0.32746702432632446,
1.3832876682281494,
3.370312213897705,
0.21271581947803497,
0.4207584857940674,
-0.16914168000221252,
-0.899540364742279,
1.4341217279434204,
0.9058868288993835,
-0.17966905236244202,
-0.5717889666557312,
-0.9933709502220154,
1.3249709606170654,
2.0063114166259766,
1.0720769166946411,
0.033092696219682693,
-0.7534978985786438,
-0.7670851349830627,
-0.00782809965312481,
0.11661552637815475,
0.45166194438934326,
0.8892422914505005,
0.13657644391059875,
0.12939779460430145,
1.4487510919570923,
1.257906198501587,
-0.45770543813705444,
0.45231783390045166,
-0.8001799583435059,
-0.4452829360961914,
0.4770468473434448,
0.33031877875328064,
-0.023763885721564293,
0.31726136803627014,
-0.9479447603225708,
-0.19873550534248352,
-0.41456887125968933,
-0.9536754488945007,
-0.7183316946029663,
-0.4838429391384125,
-0.3021651804447174,
1.788649559020996,
0.10268060117959976,
-0.47679901123046875,
0.0036785798147320747,
-0.7621386051177979,
-0.028200984001159668,
-1.0254135131835938,
0.24399451911449432,
-0.0933302715420723,
-0.1045490950345993,
-0.02936394140124321,
1.7960238456726074,
-0.9513632655143738,
-2.118030071258545,
0.26635003089904785,
0.1760016828775406,
-0.4234520494937897,
0.18618199229240417,
1.6198655366897583,
0.49461138248443604,
1.5000014305114746,
1.4382489919662476,
1.0185441970825195,
-0.7317185997962952,
-1.3424288034439087,
0.666648805141449,
0.9836845397949219,
-1.3490095138549805,
0.8194018006324768,
0.0834139809012413,
-0.512632429599762,
0.6178367137908936,
1.2146782875061035,
0.4141576588153839,
-2.0446674823760986,
0.7574769258499146,
-0.8870542645454407,
0.7547436356544495,
0.6462380290031433,
0.716163694858551,
0.2378557175397873,
0.7882961630821228,
-1.261560320854187,
-1.150417447090149,
-0.7163588404655457,
-0.6406034827232361,
1.9614453315734863,
-0.20721076428890228,
0.5690707564353943,
-0.12361568212509155,
-1.4952969551086426,
-0.1182943657040596,
0.6652206182479858,
0.43414512276649475,
-0.5233991146087646,
0.7991020083427429,
-0.6560429334640503,
-1.138824224472046,
-1.4061627388000488,
-0.5568879246711731,
-1.0807926654815674,
-0.9005404114723206,
1.0741002559661865,
0.7856090068817139,
0.24358080327510834,
1.8608969449996948,
0.6257945895195007,
0.24144969880580902,
-2.6532773971557617,
0.9043407440185547,
0.3427020013332367,
0.0005270987749099731,
0.8289180994033813,
0.34455811977386475,
0.984217643737793,
-0.1259228140115738,
0.49127334356307983,
-2.3817203044891357,
2.352414846420288,
-0.1924753487110138,
0.681654691696167,
0.09429560601711273,
-0.15806423127651215,
1.0814646482467651,
0.5174118280410767,
0.5746603012084961,
-1.1198790073394775,
0.6531854867935181,
-0.6373147368431091,
1.2844147682189941,
0.8658431768417358,
-0.8121015429496765,
-0.13286733627319336,
1.3346967697143555,
0.4174419939517975,
-0.48626890778541565,
-0.9344649910926819,
-1.080896019935608,
0.9815911650657654,
1.7449040412902832,
-0.04555230960249901,
0.004452474415302277,
0.892599880695343,
0.6654269099235535,
-1.3270678520202637,
0.049309536814689636,
-0.8078567385673523,
-0.8040482401847839,
1.6487195491790771,
2.0149948596954346,
-0.15260472893714905,
-0.23908469080924988,
-0.8665911555290222,
-1.3234540224075317,
0.7682950496673584,
0.0762709528207779,
0.05555681511759758,
0.6736939549446106,
-0.5550360083580017,
1.1413816213607788,
0.9511854648590088,
0.9162123203277588,
0.21966131031513214,
0.20705750584602356,
0.33893322944641113,
-0.33595848083496094,
-1.1669024229049683,
-0.25089481472969055,
-1.074182152748108,
-2.5534098148345947,
0.48000574111938477,
-0.246341735124588,
-1.4824838638305664,
-0.015273584052920341,
-0.9844486117362976,
0.8892921805381775,
-0.5397080779075623,
-1.0631710290908813,
-1.5116466283798218,
0.2529856860637665,
-0.15263475477695465,
0.9236559271812439,
-1.5971301794052124,
-0.03373155742883682,
1.2188589572906494,
0.9001712799072266,
-0.6419436931610107,
1.0199967622756958,
0.2178248018026352,
1.0153919458389282,
0.9344396591186523,
-0.3629423677921295,
0.47691088914871216,
0.16768525540828705,
-1.326418161392212,
0.4651290774345398,
1.1235779523849487,
0.15191765129566193,
1.3837769031524658,
-0.6219895482063293,
0.01835373044013977,
0.31943151354789734,
-0.4805014133453369,
-0.44214585423469543,
-0.6434492468833923,
0.7320467233657837,
-0.013568011112511158,
-0.9356495141983032,
0.15139417350292206,
-0.06371800601482391,
-0.168814554810524,
0.15658654272556305,
-1.5548744201660156,
-0.11358063668012619,
-0.3052777051925659,
-0.672040581703186,
-1.237250566482544,
-0.08489202708005905,
1.3869560956954956,
-0.7352800965309143,
-0.1970333606004715,
0.447061151266098,
0.4239659905433655,
0.515497624874115,
0.6575378179550171,
-0.6268290877342224,
-0.33613091707229614,
-0.2259700745344162,
-0.42039477825164795,
0.364751398563385,
1.3359602689743042,
-0.12529072165489197,
-0.9395594596862793,
0.801422655582428,
-0.37831830978393555,
0.029284324496984482,
1.9450773000717163,
0.12179376929998398,
-0.8586093783378601,
0.25627297163009644,
-0.6261277794837952,
1.880381464958191,
1.8236387968063354,
1.3215411901474,
-0.04986337572336197,
-1.015852689743042,
0.6328047513961792,
-0.3041614294052124,
-0.45787978172302246,
0.9310640692710876,
0.3848162889480591,
-0.22937455773353577,
-1.30293607711792,
0.572136402130127,
1.270374059677124,
-0.8021935820579529,
-0.9686873555183411,
0.07206615805625916,
-0.8001139163970947,
1.123104453086853,
0.7604683041572571,
0.4266608953475952,
0.1900629997253418,
1.631906509399414,
0.7839115858078003,
-0.4382809102535248,
0.5749180316925049,
0.4721548855304718,
-0.18454508483409882,
-2.065394163131714,
-1.1105198860168457,
0.2917953431606293,
-0.525080680847168,
-1.6100056171417236,
1.3468194007873535,
-1.1936627626419067,
-0.8343362212181091,
0.4940614700317383,
0.08916673809289932,
1.548111915588379,
0.3273763954639435,
1.544711947441101,
2.0708045959472656,
0.893486499786377,
0.34413257241249084,
1.2828415632247925,
-0.1570911854505539,
-0.4466882646083832,
1.810145616531372,
-0.45066794753074646,
0.47325563430786133,
1.1082725524902344,
-0.34860655665397644,
-0.9718220829963684,
-0.820802628993988,
-1.2120091915130615,
-0.723770022392273,
1.1695282459259033,
0.09452705085277557,
-1.1485353708267212,
0.26282593607902527,
1.6269690990447998,
0.05922182276844978,
-0.2648492157459259,
0.605582594871521,
0.41646674275398254,
-0.7492131590843201,
-0.050887707620859146,
-0.9269722104072571,
0.5131914615631104,
-0.25197833776474,
-0.40009284019470215,
0.4124811291694641,
0.420784056186676,
1.2182835340499878,
0.06015925481915474,
0.1821621209383011,
1.093377709388733,
-1.3437824249267578,
1.4659948348999023,
-0.6504968404769897,
0.23888322710990906,
-2.3523998260498047,
1.4058806896209717,
-0.7096589803695679,
1.9130593538284302,
-2.67288875579834,
0.38794609904289246,
-0.576585590839386,
-0.4779103100299835,
0.3519987165927887,
-0.3709331452846527,
0.14681795239448547,
-0.17489281296730042,
-1.2216016054153442,
-0.13391248881816864,
-0.7030830383300781,
0.5581499934196472,
1.0694361925125122,
1.3083796501159668,
-1.0480058193206787,
-0.3466489315032959,
-1.7558484077453613,
-0.1000799685716629,
-0.5887877941131592,
0.38248303532600403,
-1.968410849571228,
-0.19545362889766693,
-1.925952672958374,
-2.3907084465026855,
-1.3598673343658447,
-0.7620832324028015,
1.1789929866790771,
0.12481340020895004,
-0.8436592221260071,
1.1674349308013916,
-0.3119979798793793,
-1.8988938331604004,
1.1088969707489014,
-2.1616621017456055
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
> I meant typing.Sequence (datasets.Sequence is a feature type).
Sorry, I actually meant `typing.Sequence` and not `type.hinting`. However, the issue is still that `dataset.Sequence` is imported in `arrow_dataset.py` so I cannot import and use `typing.Sequence` for the `sort`'s signature without overwriting the `dataset.Sequence` import. The latter is used in the `align_labels_with_mapping` method so it's a necessary import for `arrow_dataset.py`.
To import `typing.Sequence` as something else than `Sequence` to avoid overwriting may only be confusing and doesn't seem good practice!? The other solution is to keep `List` type hinting as in the signature I posted in my previous post but this excludes other Sequence types and may cause problems further down the line.
Please advise,
Thanks for all the clarifications!
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 119 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
> I meant typing.Sequence (datasets.Sequence is a feature type).
Sorry, I actually meant `typing.Sequence` and not `type.hinting`. However, the issue is still that `dataset.Sequence` is imported in `arrow_dataset.py` so I cannot import and use `typing.Sequence` for the `sort`'s signature without overwriting the `dataset.Sequence` import. The latter is used in the `align_labels_with_mapping` method so it's a necessary import for `arrow_dataset.py`.
To import `typing.Sequence` as something else than `Sequence` to avoid overwriting may only be confusing and doesn't seem good practice!? The other solution is to keep `List` type hinting as in the signature I posted in my previous post but this excludes other Sequence types and may cause problems further down the line.
Please advise,
Thanks for all the clarifications!
|
[
-1.2026468515396118,
-0.9789732694625854,
-0.6965401768684387,
1.44068443775177,
-0.13039067387580872,
-1.3307585716247559,
0.14831256866455078,
-1.1041706800460815,
1.7870264053344727,
-0.8782883286476135,
0.30281975865364075,
-1.668694019317627,
0.08402121812105179,
-0.5972263216972351,
-0.8411857485771179,
-0.8976282477378845,
-0.4437961280345917,
-0.8225453495979309,
0.987089216709137,
2.4782426357269287,
1.236969232559204,
-1.435252070426941,
2.624269485473633,
0.6622377038002014,
-0.1447618454694748,
-0.9853200912475586,
0.5013583302497864,
-0.042067304253578186,
-1.3873732089996338,
-0.36918777227401733,
-0.9561280608177185,
-0.0452188178896904,
-0.6538030505180359,
-0.6047455072402954,
0.04451689496636391,
0.40273240208625793,
-0.26831233501434326,
-0.4833492338657379,
-0.5004117488861084,
-0.784785270690918,
0.4129634201526642,
-0.3857664465904236,
0.9901388883590698,
-0.3123137652873993,
1.8313425779342651,
-0.5560464859008789,
0.48784056305885315,
0.710632860660553,
1.3879725933074951,
0.19489538669586182,
-0.02678820863366127,
0.26786360144615173,
0.36999717354774475,
0.01849716529250145,
0.47902214527130127,
1.1395444869995117,
0.6443517208099365,
0.4929308295249939,
0.7210260033607483,
-2.259227752685547,
1.308595061302185,
-0.9743137955665588,
0.3411785066127777,
1.290366291999817,
-1.0500539541244507,
0.3355777859687805,
-1.8243343830108643,
-0.057757358998060226,
0.5729963183403015,
-2.2429022789001465,
0.16397488117218018,
-1.2932312488555908,
-0.4581833779811859,
1.033442497253418,
0.32416385412216187,
-1.2694255113601685,
0.16974766552448273,
-0.43248921632766724,
0.9425502419471741,
0.5317261219024658,
1.1577407121658325,
-1.719952940940857,
-0.06436943262815475,
-0.3506716191768646,
0.21925772726535797,
-1.301355004310608,
-1.5660603046417236,
0.5249095559120178,
0.7190258502960205,
0.5236042737960815,
-0.11490848660469055,
0.9828060865402222,
-1.0057483911514282,
0.7482273578643799,
-0.9179865121841431,
-1.811837077140808,
-1.3832958936691284,
-2.184060573577881,
-2.368957996368408,
0.7384184002876282,
-0.43995529413223267,
-0.5245745182037354,
2.0400240421295166,
-1.0147367715835571,
-1.8281912803649902,
1.161799430847168,
0.2542463541030884,
-0.0250543225556612,
2.3847298622131348,
0.12136193364858627,
-0.7255480885505676,
0.43214109539985657,
-0.7183425426483154,
0.7701309323310852,
-0.4678505063056946,
1.3093342781066895,
0.4686681032180786,
-1.0167224407196045,
1.588123083114624,
-0.36530375480651855,
0.5360350012779236,
-0.7286500334739685,
-0.3935711979866028,
-0.7411279082298279,
0.3085346519947052,
1.9109041690826416,
-0.3838726282119751,
1.579117774963379,
-0.33846810460090637,
-1.5928823947906494,
-1.6381841897964478,
0.8696456551551819,
0.5120735168457031,
-0.739097535610199,
0.06892954558134079,
-0.39036130905151367,
0.1302163451910019,
-0.05705314874649048,
1.0346821546554565,
1.2967445850372314,
0.741664707660675,
-0.233786478638649,
-0.8518273234367371,
0.2555823028087616,
-0.11915439367294312,
-0.6864503026008606,
-1.7850422859191895,
-0.33891889452934265,
0.1477023959159851,
0.6509270071983337,
-1.0912988185882568,
1.7248557806015015,
0.8521299958229065,
1.921077013015747,
0.9606598615646362,
-0.3655753433704376,
1.5350594520568848,
0.028096575289964676,
1.8653117418289185,
-0.47439053654670715,
0.6834942102432251,
-0.3644556403160095,
-1.1147370338439941,
0.895152747631073,
-0.3161368668079376,
-1.988495111465454,
-0.6118071675300598,
-0.8181763887405396,
-0.1912505030632019,
-0.7133546471595764,
0.8867221474647522,
-0.17647182941436768,
-1.4290153980255127,
0.2509499788284302,
-0.6910059452056885,
0.08492003381252289,
-1.2023602724075317,
0.34061017632484436,
0.7665966153144836,
-0.6192589998245239,
0.10979724675416946,
-0.3241956830024719,
-1.3586877584457397,
-0.4782993197441101,
0.33101361989974976,
1.815270185470581,
-0.7714071273803711,
0.8366227746009827,
1.0216000080108643,
-0.7521599531173706,
0.02129288762807846,
0.41357484459877014,
-0.2948176860809326,
0.8728457093238831,
-1.0637435913085938,
-0.32279258966445923,
1.1299957036972046,
-0.14837148785591125,
-0.5841310620307922,
1.4303615093231201,
0.7213127613067627,
-0.9994271993637085,
-0.12991774082183838,
-0.16746774315834045,
-0.7936829924583435,
0.06679069995880127,
-1.6443216800689697,
-0.09824878722429276,
0.3816351294517517,
-1.5511544942855835,
-0.4959414005279541,
-0.23919320106506348,
1.290852665901184,
-0.13903427124023438,
1.4529333114624023,
-0.3452840745449066,
-0.16065660119056702,
-0.39487844705581665,
-0.32473182678222656,
0.10192734003067017,
-0.20751170814037323,
-0.5452242493629456,
0.29845377802848816,
-0.789073646068573,
0.43354302644729614,
1.410691738128662,
0.2615898549556732,
0.07583063840866089,
0.5442282557487488,
1.0682334899902344,
0.42967215180397034,
-0.08073368668556213,
-0.8457626104354858,
-1.5916999578475952,
2.045685291290283,
-1.4639889001846313,
1.9756842851638794,
0.7633987665176392,
0.05012751370668411,
-1.8300080299377441,
-1.8883285522460938,
1.423940896987915,
1.1215496063232422,
2.3909685611724854,
0.623001217842102,
0.4099244773387909,
-0.8159610629081726,
-0.548107922077179,
0.405261754989624,
-0.9889442324638367,
-0.779728353023529,
0.15944668650627136,
2.2869040966033936,
1.707708716392517,
-0.46256303787231445,
-0.21523912250995636,
-1.0792546272277832,
1.4473350048065186,
-0.13971832394599915,
0.2447720617055893,
1.9983433485031128,
-0.2936256229877472,
-1.048077940940857,
1.285853624343872,
-2.3084378242492676,
0.14732396602630615,
1.9587419033050537,
0.11107789725065231,
0.0847441703081131,
-1.3948686122894287,
-0.6124994158744812,
-0.21371561288833618,
-0.36762621998786926,
-1.2456417083740234,
0.4741542935371399,
-0.25054457783699036,
-0.7773442268371582,
-1.4742846488952637,
0.19752156734466553,
-1.119122862815857,
-1.6541463136672974,
0.15096065402030945,
1.94243323802948,
1.9433056116104126,
-0.7391347885131836,
1.575271487236023,
-0.252156525850296,
0.1418844759464264,
1.258721947669983,
1.1775885820388794,
3.0959994792938232,
1.9406006336212158,
-1.3151955604553223,
0.6963704824447632,
-0.11142129451036453,
-0.4625576138496399,
1.1923794746398926,
-1.1819947957992554,
1.2741923332214355,
-0.1800917536020279,
-1.2274731397628784,
-1.1724491119384766,
1.0161155462265015,
0.47296661138534546,
0.0659465566277504,
-0.5158704519271851,
1.26429283618927,
0.04398399218916893,
1.298618197441101,
0.4934062957763672,
-0.3315001130104065,
0.6774861812591553,
-0.4080343246459961,
-0.5782925486564636,
1.5427825450897217,
0.2851572036743164,
-1.2649927139282227,
-2.314908742904663,
-0.2112250179052353,
-0.8927986025810242,
0.05061005800962448,
-0.547329306602478,
-0.9222862720489502,
1.6434111595153809,
0.40289753675460815,
-1.2551947832107544,
-0.2632048726081848,
-0.30455130338668823,
-0.6188802719116211,
2.5883491039276123,
-1.3129850625991821,
-0.2429322749376297,
-0.9870030283927917,
-0.5437241196632385,
1.6071012020111084,
-1.2697056531906128,
-0.22679226100444794,
-1.083464503288269,
-0.5218871831893921,
-1.2675515413284302,
-0.675338625907898,
-0.03974848613142967,
-0.8443087935447693,
0.7717595100402832,
0.17600880563259125,
-1.211936593055725,
-0.35390228033065796,
-0.9024917483329773,
0.8249013423919678,
-0.07961342483758926,
0.22814884781837463,
1.9273419380187988,
0.41087907552719116,
-0.4004230797290802,
0.6781523823738098,
1.0347293615341187,
0.5858502388000488,
-0.6085227727890015,
0.2756463885307312,
-0.6863343119621277,
0.2632843554019928,
-1.235532522201538,
0.3206923007965088,
-2.8149917125701904,
0.6659929156303406,
-0.040701523423194885,
-0.0562860481441021,
-0.06453270465135574,
-1.3432893753051758,
1.0307599306106567,
2.6710147857666016,
-1.172951102256775,
0.4537266194820404,
0.29721835255622864,
1.262770652770996,
-1.553810477256775,
0.2950563430786133,
-0.420878529548645,
2.170776605606079,
0.1930282711982727,
1.144039511680603,
-0.43504777550697327,
-2.296527624130249,
0.5937451124191284,
-1.2605725526809692,
-1.2157829999923706,
0.810854971408844,
-0.844760000705719,
0.022713690996170044,
-1.3835785388946533,
-0.1607232689857483,
-0.7617189288139343,
-1.2152025699615479,
0.7583555579185486,
0.04446002095937729,
0.568952739238739,
-0.6455498933792114,
0.36785823106765747,
-2.1202569007873535,
-1.3041212558746338,
-0.28605806827545166,
-0.9422393441200256,
0.443807989358902,
-0.28719520568847656,
0.6716113686561584,
-0.19933530688285828,
0.04387449100613594,
0.31629854440689087,
1.3741559982299805,
3.422934055328369,
0.21139059960842133,
0.3638748526573181,
-0.2044944018125534,
-0.9033218026161194,
1.4512099027633667,
0.9365375638008118,
-0.18889550864696503,
-0.566447913646698,
-1.0415611267089844,
1.268613576889038,
2.030540943145752,
1.015465259552002,
0.043829984962940216,
-0.7533116936683655,
-0.7638242244720459,
0.03163494914770126,
0.1255723536014557,
0.4765590727329254,
0.9350501894950867,
0.1450405865907669,
0.08271729201078415,
1.4834965467453003,
1.2640796899795532,
-0.45590147376060486,
0.4470458924770355,
-0.832000195980072,
-0.49780452251434326,
0.4667624533176422,
0.3687608540058136,
0.026025988161563873,
0.2864733636379242,
-1.0031440258026123,
-0.1883438378572464,
-0.4358903467655182,
-0.9731606245040894,
-0.7050772309303284,
-0.45149168372154236,
-0.282539427280426,
1.7422720193862915,
0.11422813683748245,
-0.47916796803474426,
-0.004588518291711807,
-0.7414262294769287,
-0.012747950851917267,
-1.0215885639190674,
0.2984682619571686,
-0.1132306382060051,
-0.11868204921483994,
-0.0169385876506567,
1.7666001319885254,
-0.9363505840301514,
-2.02935528755188,
0.2659716308116913,
0.18144385516643524,
-0.3977281153202057,
0.24181707203388214,
1.623030424118042,
0.5270383358001709,
1.4690468311309814,
1.4770056009292603,
0.9792813062667847,
-0.6921588182449341,
-1.3064547777175903,
0.6240642070770264,
0.9528305530548096,
-1.3818750381469727,
0.8037477731704712,
0.08789648115634918,
-0.5691738128662109,
0.6103306412696838,
1.2677702903747559,
0.42165637016296387,
-2.0775084495544434,
0.7956717014312744,
-0.8963239789009094,
0.7380414605140686,
0.6633503437042236,
0.7771843671798706,
0.16702888906002045,
0.777658224105835,
-1.2102309465408325,
-1.1671222448349,
-0.7220816016197205,
-0.7017400860786438,
1.938775897026062,
-0.22075635194778442,
0.5426702499389648,
-0.16377417743206024,
-1.4971964359283447,
-0.16089390218257904,
0.6640026569366455,
0.3992365300655365,
-0.48863115906715393,
0.7624912858009338,
-0.665197491645813,
-1.1315463781356812,
-1.3609782457351685,
-0.5695021152496338,
-1.1014717817306519,
-0.9320464730262756,
1.0347096920013428,
0.8269254565238953,
0.2607024312019348,
1.8806753158569336,
0.6294869780540466,
0.25218895077705383,
-2.6728196144104004,
0.875896692276001,
0.38307562470436096,
-0.029606230556964874,
0.8608508110046387,
0.3144059479236603,
0.9636449217796326,
-0.12548016011714935,
0.5282647609710693,
-2.376596212387085,
2.359656810760498,
-0.24586747586727142,
0.7357780337333679,
0.07492189854383469,
-0.1771349459886551,
1.073019027709961,
0.49093133211135864,
0.5982310175895691,
-1.0631961822509766,
0.6740570664405823,
-0.6879278421401978,
1.2165663242340088,
0.8613778948783875,
-0.8080990314483643,
-0.14005856215953827,
1.297012209892273,
0.41705599427223206,
-0.5048694610595703,
-0.902660071849823,
-1.121719241142273,
0.9413145780563354,
1.794562816619873,
-0.07698000967502594,
0.031803809106349945,
0.8676846623420715,
0.6666572093963623,
-1.310283899307251,
0.035254381597042084,
-0.8497037291526794,
-0.766804039478302,
1.6200724840164185,
1.9493882656097412,
-0.14478616416454315,
-0.2409682273864746,
-0.8070868253707886,
-1.2939865589141846,
0.7833834886550903,
0.051035892218351364,
0.03626052662730217,
0.676961362361908,
-0.5597721934318542,
1.1555571556091309,
0.9001434445381165,
0.9590595364570618,
0.17924730479717255,
0.24630378186702728,
0.3156531751155853,
-0.33676549792289734,
-1.134658694267273,
-0.2344270497560501,
-1.0368711948394775,
-2.542088031768799,
0.49640172719955444,
-0.1622934639453888,
-1.5046586990356445,
-0.03844274953007698,
-0.9547816514968872,
0.9029199481010437,
-0.5139992833137512,
-1.0998013019561768,
-1.4701464176177979,
0.22443410754203796,
-0.147297203540802,
0.9016228318214417,
-1.5842853784561157,
-0.020902976393699646,
1.2551461458206177,
0.9347426295280457,
-0.6704062819480896,
1.0284417867660522,
0.26094022393226624,
1.0338214635849,
0.9092252850532532,
-0.34009838104248047,
0.4351249635219574,
0.09081579744815826,
-1.3086326122283936,
0.4211440086364746,
1.082460880279541,
0.1594848781824112,
1.4111390113830566,
-0.6038336753845215,
-0.021949028596282005,
0.34312567114830017,
-0.4706752300262451,
-0.3944893777370453,
-0.6298115253448486,
0.7677977085113525,
-0.034938763827085495,
-0.8680068850517273,
0.1329832375049591,
-0.05203159153461456,
-0.14841066300868988,
0.16710664331912994,
-1.5279229879379272,
-0.11556943506002426,
-0.3391284644603729,
-0.6333304643630981,
-1.2178579568862915,
-0.02839898318052292,
1.4057279825210571,
-0.7408322095870972,
-0.26514938473701477,
0.443882018327713,
0.4183000326156616,
0.5123857259750366,
0.6317573189735413,
-0.5747650861740112,
-0.373142272233963,
-0.21510756015777588,
-0.43913111090660095,
0.3454519808292389,
1.3477600812911987,
-0.14331015944480896,
-0.9833343029022217,
0.8334379196166992,
-0.3949046730995178,
0.01938844844698906,
1.9306002855300903,
0.10492032766342163,
-0.8432914018630981,
0.2272876650094986,
-0.63351970911026,
1.8660115003585815,
1.836768388748169,
1.3403233289718628,
-0.06492549180984497,
-1.0071346759796143,
0.6220634579658508,
-0.3354228436946869,
-0.4192110002040863,
0.959405243396759,
0.43930476903915405,
-0.16941389441490173,
-1.317448616027832,
0.5710708498954773,
1.2419830560684204,
-0.8041695952415466,
-0.8445058465003967,
0.029505975544452667,
-0.7376036047935486,
1.1186960935592651,
0.8101105690002441,
0.4101872444152832,
0.17583811283111572,
1.612688660621643,
0.7576661705970764,
-0.4338931143283844,
0.5813928842544556,
0.4708886742591858,
-0.17829908430576324,
-2.0933449268341064,
-1.0768213272094727,
0.29151153564453125,
-0.476752907037735,
-1.6665292978286743,
1.379238486289978,
-1.2190802097320557,
-0.8699089288711548,
0.4510903060436249,
0.09680381417274475,
1.4972916841506958,
0.33157896995544434,
1.5664094686508179,
2.103278398513794,
0.9082133173942566,
0.3555608093738556,
1.2512744665145874,
-0.12355103343725204,
-0.4411897659301758,
1.818257212638855,
-0.5159739851951599,
0.45966267585754395,
1.087783932685852,
-0.3248516619205475,
-0.9778845310211182,
-0.7894032597541809,
-1.200438380241394,
-0.6798526644706726,
1.1618813276290894,
0.005783781409263611,
-1.1912213563919067,
0.31914281845092773,
1.5633876323699951,
0.060748711228370667,
-0.24396154284477234,
0.6343858242034912,
0.4085090458393097,
-0.7385010719299316,
-0.07940828055143356,
-0.8197291493415833,
0.4887882471084595,
-0.2528291642665863,
-0.42728951573371887,
0.4507092237472534,
0.37992197275161743,
1.2909590005874634,
0.03486734628677368,
0.1523522436618805,
1.1422789096832275,
-1.3697248697280884,
1.4760020971298218,
-0.6834428906440735,
0.25252196192741394,
-2.3924367427825928,
1.4071991443634033,
-0.7395771741867065,
1.9121066331863403,
-2.6983869075775146,
0.39927375316619873,
-0.5318875312805176,
-0.454360693693161,
0.32417017221450806,
-0.3050784468650818,
0.12046652287244797,
-0.18333815038204193,
-1.215564489364624,
-0.11696913093328476,
-0.6915732026100159,
0.5920811295509338,
1.0261032581329346,
1.2946697473526,
-1.0740642547607422,
-0.28338193893432617,
-1.7710875272750854,
-0.13312438130378723,
-0.6435254812240601,
0.37733349204063416,
-1.9962055683135986,
-0.17009523510932922,
-1.953835368156433,
-2.396963119506836,
-1.3811166286468506,
-0.7885026931762695,
1.1274715662002563,
0.13163958489894867,
-0.8146986961364746,
1.1404136419296265,
-0.2885949909687042,
-1.9383065700531006,
1.137953281402588,
-2.1639935970306396
] |
https://github.com/huggingface/datasets/issues/5425
|
Sort on multiple keys with datasets.Dataset.sort()
|
You can avoid the name collision by renaming `typing.Sequence` to `Sequence_` when importing:
```python
from typing import Sequence as Sequence_
```
|
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
| 343 | 21 |
Sort on multiple keys with datasets.Dataset.sort()
### Feature request
From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1
`sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function.
The suggested solution:
> ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets.
The suggested workaround:
> convert your dataset to pandas and use `df.sort_values()`
### Motivation
Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted.
Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library.
Alternatives:
- the possibility to specify multiple keys to sort by with decreasing priority (suggested solution),
- the ability to provide a key function for sorting, so that one can manually specify the sorting criteria.
### Your contribution
I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`.
Would love to get thoughts on this, if anyone has anything to add.
You can avoid the name collision by renaming `typing.Sequence` to `Sequence_` when importing:
```python
from typing import Sequence as Sequence_
```
|
[
-1.2064616680145264,
-0.9316847920417786,
-0.7140529751777649,
1.5059329271316528,
-0.11384304612874985,
-1.3094804286956787,
0.12475172430276871,
-1.0355916023254395,
1.7230068445205688,
-0.8554967045783997,
0.34709468483924866,
-1.6594160795211792,
0.10467644780874252,
-0.6298775672912598,
-0.8285998702049255,
-0.9444295167922974,
-0.42680707573890686,
-0.7711735963821411,
0.9817085266113281,
2.5098276138305664,
1.1975007057189941,
-1.456570029258728,
2.6285648345947266,
0.6802406907081604,
-0.14598901569843292,
-0.9794416427612305,
0.5017757415771484,
0.027539025992155075,
-1.337825894355774,
-0.4377918839454651,
-0.9448829889297485,
-0.11012455821037292,
-0.6294689774513245,
-0.5708412528038025,
0.03810720890760422,
0.3945463001728058,
-0.2647054195404053,
-0.4138522744178772,
-0.4741345942020416,
-0.8017445802688599,
0.4070792496204376,
-0.40129542350769043,
0.9631493091583252,
-0.372074693441391,
1.8515422344207764,
-0.5874304175376892,
0.4935925304889679,
0.6428513526916504,
1.3642710447311401,
0.20380979776382446,
-0.06876429915428162,
0.31006669998168945,
0.33683791756629944,
0.014946342445909977,
0.47832536697387695,
1.0904797315597534,
0.6470153331756592,
0.4835118353366852,
0.6745301485061646,
-2.214958667755127,
1.306479811668396,
-1.0390115976333618,
0.33815839886665344,
1.3431966304779053,
-1.0608642101287842,
0.37543848156929016,
-1.7763386964797974,
-0.1303279548883438,
0.5616289973258972,
-2.285163640975952,
0.12870551645755768,
-1.2323988676071167,
-0.4842257797718048,
1.0593552589416504,
0.3454384505748749,
-1.3180665969848633,
0.11154739558696747,
-0.4609645903110504,
0.9480472207069397,
0.5134394764900208,
1.1569383144378662,
-1.69025456905365,
-0.02436380833387375,
-0.345797598361969,
0.19155192375183105,
-1.349927306175232,
-1.5093914270401,
0.5179204344749451,
0.6778357625007629,
0.5314794182777405,
-0.047981295734643936,
0.9302963614463806,
-1.0191346406936646,
0.7904865741729736,
-0.9230915307998657,
-1.7400552034378052,
-1.3772797584533691,
-2.239140033721924,
-2.416455030441284,
0.7973610758781433,
-0.45111748576164246,
-0.5536953210830688,
1.9518835544586182,
-1.0048553943634033,
-1.8116323947906494,
1.1845263242721558,
0.33339840173721313,
-0.0738920345902443,
2.440509557723999,
0.10362595319747925,
-0.7052608132362366,
0.43996870517730713,
-0.7493178844451904,
0.8107044100761414,
-0.5646255016326904,
1.3294237852096558,
0.4943241775035858,
-1.0484942197799683,
1.582105278968811,
-0.4408462643623352,
0.5429385900497437,
-0.7287558317184448,
-0.4323350191116333,
-0.7882355451583862,
0.35099732875823975,
1.9225550889968872,
-0.3576340973377228,
1.5959317684173584,
-0.2766241133213043,
-1.5688199996948242,
-1.604821801185608,
0.8737753629684448,
0.4485940933227539,
-0.800631046295166,
0.11353275179862976,
-0.37637093663215637,
0.11696361750364304,
-0.016732217743992805,
0.9855597615242004,
1.281848669052124,
0.6512752175331116,
-0.24125443398952484,
-0.8472764492034912,
0.28971174359321594,
-0.13660725951194763,
-0.6717191338539124,
-1.7647576332092285,
-0.34299805760383606,
0.11266811192035675,
0.6407310962677002,
-1.151591420173645,
1.7432156801223755,
0.8021146059036255,
1.923597812652588,
0.9833812713623047,
-0.3697575032711029,
1.5612871646881104,
-0.02030205726623535,
1.8814460039138794,
-0.4919092357158661,
0.7048966288566589,
-0.3877143859863281,
-1.1195778846740723,
0.8351004123687744,
-0.3684808611869812,
-2.0239288806915283,
-0.6526373028755188,
-0.8040859699249268,
-0.16805845499038696,
-0.756316602230072,
0.9347939491271973,
-0.19918933510780334,
-1.3997825384140015,
0.272132009267807,
-0.7475569844245911,
0.12110214680433273,
-1.2602075338363647,
0.34985825419425964,
0.8139453530311584,
-0.5747480392456055,
0.07363895326852798,
-0.31487560272216797,
-1.3529112339019775,
-0.46503421664237976,
0.3168318271636963,
1.8264820575714111,
-0.7380833029747009,
0.8421187400817871,
0.9703765511512756,
-0.7563508152961731,
-0.0042867520824074745,
0.4308333396911621,
-0.3112773597240448,
0.9052363634109497,
-1.0525418519973755,
-0.3678910434246063,
1.18342125415802,
-0.19058993458747864,
-0.5897687077522278,
1.4261819124221802,
0.7722853422164917,
-0.9843636751174927,
-0.13016292452812195,
-0.16888560354709625,
-0.7775803208351135,
0.043679654598236084,
-1.6728378534317017,
-0.05937900021672249,
0.3417775332927704,
-1.5378198623657227,
-0.454227477312088,
-0.2313312590122223,
1.2472654581069946,
-0.18907788395881653,
1.4671188592910767,
-0.38379526138305664,
-0.16851970553398132,
-0.4040287435054779,
-0.38269367814064026,
0.12903863191604614,
-0.24531438946723938,
-0.5432919263839722,
0.3404894173145294,
-0.725382924079895,
0.41863465309143066,
1.4049859046936035,
0.3034279942512512,
0.12643234431743622,
0.6008157730102539,
1.0576651096343994,
0.39516401290893555,
-0.13450774550437927,
-0.8303005695343018,
-1.6129258871078491,
2.062783718109131,
-1.4177836179733276,
1.984938383102417,
0.7943719029426575,
0.03435622900724411,
-1.7914183139801025,
-1.8774915933609009,
1.4220983982086182,
1.1713473796844482,
2.355557441711426,
0.6481582522392273,
0.40846988558769226,
-0.8463577032089233,
-0.5851871967315674,
0.34560626745224,
-0.9933123588562012,
-0.8029893636703491,
0.16405658423900604,
2.3299643993377686,
1.7531095743179321,
-0.4526451826095581,
-0.17605917155742645,
-1.0982972383499146,
1.5103484392166138,
-0.15940657258033752,
0.20409229397773743,
1.990419626235962,
-0.2933029532432556,
-1.0598795413970947,
1.2627856731414795,
-2.32983660697937,
0.1405382752418518,
1.9379202127456665,
0.20252397656440735,
0.05506126955151558,
-1.395538330078125,
-0.6311554908752441,
-0.23651114106178284,
-0.343248188495636,
-1.2212235927581787,
0.45947426557540894,
-0.2117488533258438,
-0.7617170214653015,
-1.4320157766342163,
0.1476639360189438,
-1.1011717319488525,
-1.6346997022628784,
0.20938844978809357,
1.828974962234497,
1.9513466358184814,
-0.7049412131309509,
1.5914732217788696,
-0.20175112783908844,
0.14470171928405762,
1.24286949634552,
1.182255744934082,
3.1263480186462402,
1.9204187393188477,
-1.3114715814590454,
0.6778255701065063,
-0.07504741102457047,
-0.5028945207595825,
1.2039868831634521,
-1.2067056894302368,
1.3096623420715332,
-0.16037850081920624,
-1.2466363906860352,
-1.1859257221221924,
0.9992545247077942,
0.4654793441295624,
0.08050718158483505,
-0.5557717084884644,
1.2570459842681885,
0.038282494992017746,
1.3481905460357666,
0.5200290679931641,
-0.3117028474807739,
0.595412015914917,
-0.4206259846687317,
-0.6169179677963257,
1.6026781797409058,
0.2541760504245758,
-1.3241312503814697,
-2.3278536796569824,
-0.2046765387058258,
-0.8713821172714233,
-0.0078018042258918285,
-0.5625541806221008,
-0.956279993057251,
1.6244741678237915,
0.4298255145549774,
-1.2420037984848022,
-0.28439927101135254,
-0.3077983260154724,
-0.6518486142158508,
2.651014566421509,
-1.3669925928115845,
-0.2624511122703552,
-0.9823530316352844,
-0.5701653361320496,
1.5380643606185913,
-1.2755296230316162,
-0.21189099550247192,
-1.0431287288665771,
-0.5790349841117859,
-1.2356641292572021,
-0.6381801962852478,
-0.09782053530216217,
-0.9059901833534241,
0.7355438470840454,
0.14352744817733765,
-1.2022888660430908,
-0.35358569025993347,
-0.9153530597686768,
0.8040717244148254,
-0.040973350405693054,
0.26108208298683167,
1.8461925983428955,
0.42673736810684204,
-0.391435831785202,
0.7210777401924133,
1.085072636604309,
0.6084957122802734,
-0.6359832286834717,
0.2765800952911377,
-0.6710126399993896,
0.25920742750167847,
-1.2109698057174683,
0.323742538690567,
-2.8111283779144287,
0.6606547236442566,
-0.038347870111465454,
-0.1041351705789566,
-0.07581368088722229,
-1.3361446857452393,
1.0973976850509644,
2.6595921516418457,
-1.1596707105636597,
0.4772947132587433,
0.29856523871421814,
1.2181938886642456,
-1.602582335472107,
0.30085837841033936,
-0.41817277669906616,
2.199738025665283,
0.19815993309020996,
1.1302129030227661,
-0.4625590443611145,
-2.2737038135528564,
0.6184096932411194,
-1.279004693031311,
-1.1723895072937012,
0.791652262210846,
-0.8774240612983704,
0.027802441269159317,
-1.3502156734466553,
-0.09955624490976334,
-0.7162127494812012,
-1.2571635246276855,
0.7203586101531982,
0.03523172810673714,
0.5504831671714783,
-0.5583332180976868,
0.35418617725372314,
-2.1612045764923096,
-1.3382823467254639,
-0.26769742369651794,
-0.9733887910842896,
0.4326794445514679,
-0.31998613476753235,
0.7001208066940308,
-0.1619427651166916,
0.040018416941165924,
0.3113921582698822,
1.379775047302246,
3.3701536655426025,
0.22103428840637207,
0.4254077970981598,
-0.1575525999069214,
-0.8936987519264221,
1.416205644607544,
0.9178621172904968,
-0.1765436828136444,
-0.5826047658920288,
-0.9876833558082581,
1.3457762002944946,
1.9937098026275635,
1.0832653045654297,
0.06272143125534058,
-0.7612283825874329,
-0.742285966873169,
0.00672310683876276,
0.14850357174873352,
0.4580301344394684,
0.9100490808486938,
0.09676089137792587,
0.12931077182292938,
1.470847487449646,
1.3266288042068481,
-0.46588367223739624,
0.4587322175502777,
-0.7961698770523071,
-0.4451611042022705,
0.48931246995925903,
0.34251564741134644,
-0.008500468917191029,
0.32950159907341003,
-0.9558597803115845,
-0.2049187421798706,
-0.38674792647361755,
-0.9677581191062927,
-0.7211886048316956,
-0.49081870913505554,
-0.3111835718154907,
1.7774879932403564,
0.09873084723949432,
-0.470232754945755,
-0.002283755224198103,
-0.7674157023429871,
-0.053229786455631256,
-1.0329533815383911,
0.24863529205322266,
-0.06208154186606407,
-0.11027374863624573,
-0.04435071721673012,
1.8266170024871826,
-0.979379415512085,
-2.125142812728882,
0.2423313558101654,
0.19001097977161407,
-0.37961122393608093,
0.16017894446849823,
1.6099200248718262,
0.4435789883136749,
1.4889476299285889,
1.4549930095672607,
0.9825810790061951,
-0.7485874891281128,
-1.3056728839874268,
0.6613507866859436,
1.0176109075546265,
-1.3343815803527832,
0.8105878233909607,
0.05614883825182915,
-0.5331602692604065,
0.6013874411582947,
1.2283915281295776,
0.4106007218360901,
-2.0029642581939697,
0.7726108431816101,
-0.8929006457328796,
0.7445863485336304,
0.6410781741142273,
0.7244464755058289,
0.21884623169898987,
0.780443012714386,
-1.302229404449463,
-1.1293821334838867,
-0.7527206540107727,
-0.6324977278709412,
1.9411498308181763,
-0.2040334790945053,
0.5474559664726257,
-0.12748560309410095,
-1.4887399673461914,
-0.09781990945339203,
0.6770210266113281,
0.4065389633178711,
-0.4817010462284088,
0.8260653614997864,
-0.6618110537528992,
-1.1312211751937866,
-1.405796766281128,
-0.5343348979949951,
-1.0451774597167969,
-0.8962712287902832,
1.0911821126937866,
0.8309440016746521,
0.2093358039855957,
1.879181146621704,
0.6259315013885498,
0.22440946102142334,
-2.6612133979797363,
0.9096109867095947,
0.31321147084236145,
-0.008347866125404835,
0.8577202558517456,
0.30498602986335754,
0.9923999905586243,
-0.13009114563465118,
0.48284608125686646,
-2.385849952697754,
2.3540079593658447,
-0.22050049901008606,
0.7223753929138184,
0.09262948483228683,
-0.1111963614821434,
1.0934803485870361,
0.5209839940071106,
0.5570148825645447,
-1.0660666227340698,
0.6423459649085999,
-0.6391300559043884,
1.277354121208191,
0.8683508634567261,
-0.7943885326385498,
-0.13526055216789246,
1.273621678352356,
0.4112846851348877,
-0.48474887013435364,
-0.9621179103851318,
-1.0194131135940552,
0.9850319027900696,
1.803501009941101,
-0.04419276863336563,
0.03342771157622337,
0.8829581141471863,
0.6489812731742859,
-1.3097376823425293,
0.04921502247452736,
-0.817598283290863,
-0.8052141666412354,
1.631725788116455,
1.9768953323364258,
-0.10896918177604675,
-0.22655890882015228,
-0.8434513807296753,
-1.320649266242981,
0.7844106554985046,
0.060057852417230606,
0.08659001439809799,
0.6830565929412842,
-0.5551218390464783,
1.139381766319275,
0.9495346546173096,
0.9340362548828125,
0.18926987051963806,
0.1784600168466568,
0.3212618827819824,
-0.3184683322906494,
-1.1495349407196045,
-0.25062790513038635,
-1.0598289966583252,
-2.5935723781585693,
0.48788559436798096,
-0.2389012724161148,
-1.4864015579223633,
-0.02954649180173874,
-0.9666881561279297,
0.9053792357444763,
-0.5365831255912781,
-1.070245385169983,
-1.4916200637817383,
0.22736816108226776,
-0.19273796677589417,
0.9296116232872009,
-1.5775374174118042,
-0.027561526745557785,
1.2420125007629395,
0.9005391597747803,
-0.6299338340759277,
1.0289658308029175,
0.2422168254852295,
1.0380150079727173,
0.9054610729217529,
-0.3407311737537384,
0.452894002199173,
0.16040819883346558,
-1.3381229639053345,
0.4648607075214386,
1.1043227910995483,
0.1811993569135666,
1.3902039527893066,
-0.6159793734550476,
-0.0029266485944390297,
0.32082220911979675,
-0.4524216651916504,
-0.46061012148857117,
-0.6520782113075256,
0.7609997987747192,
0.0022850148379802704,
-0.9303444027900696,
0.12163519114255905,
-0.07097548991441727,
-0.20468012988567352,
0.13977600634098053,
-1.5121148824691772,
-0.11061910539865494,
-0.3344765603542328,
-0.6490578651428223,
-1.225305199623108,
-0.060458142310380936,
1.3656787872314453,
-0.7630116939544678,
-0.19215308129787445,
0.45756322145462036,
0.4353537857532501,
0.5244579911231995,
0.6582561135292053,
-0.5735189318656921,
-0.3664911687374115,
-0.21121060848236084,
-0.40470027923583984,
0.3612680435180664,
1.298158884048462,
-0.14559099078178406,
-0.9635046124458313,
0.8377859592437744,
-0.3674372434616089,
0.018811337649822235,
1.9431089162826538,
0.1268957555294037,
-0.8450822830200195,
0.2639982998371124,
-0.6040146350860596,
1.8749314546585083,
1.7923212051391602,
1.333776593208313,
-0.06847376376390457,
-1.0130723714828491,
0.6329540610313416,
-0.26929694414138794,
-0.42995187640190125,
0.923922598361969,
0.41821885108947754,
-0.19898414611816406,
-1.3488060235977173,
0.5399720668792725,
1.2416568994522095,
-0.7740470767021179,
-0.8703619837760925,
0.057576898485422134,
-0.7954278588294983,
1.1121643781661987,
0.785388708114624,
0.4205942749977112,
0.22025847434997559,
1.6332011222839355,
0.7821537256240845,
-0.4663774371147156,
0.5618845820426941,
0.4710491895675659,
-0.19615438580513,
-2.0682413578033447,
-1.0749621391296387,
0.3332656919956207,
-0.516296923160553,
-1.6267133951187134,
1.3437765836715698,
-1.2082620859146118,
-0.7951080799102783,
0.47789517045021057,
0.09942734241485596,
1.5098068714141846,
0.30729353427886963,
1.5564136505126953,
2.0656111240386963,
0.8918517827987671,
0.3059743642807007,
1.269550085067749,
-0.129652202129364,
-0.41105031967163086,
1.7993007898330688,
-0.45221009850502014,
0.4947110712528229,
1.1137847900390625,
-0.3552330434322357,
-0.9731380939483643,
-0.7776761651039124,
-1.1993786096572876,
-0.7072349190711975,
1.1762202978134155,
0.07805965840816498,
-1.1268842220306396,
0.22487540543079376,
1.5997791290283203,
0.059299904853105545,
-0.23581311106681824,
0.5750367641448975,
0.41055744886398315,
-0.7342629432678223,
-0.04358555004000664,
-0.8810834884643555,
0.47602200508117676,
-0.23296722769737244,
-0.4052043855190277,
0.41483286023139954,
0.44642317295074463,
1.2333717346191406,
0.05973396822810173,
0.16053934395313263,
1.1166417598724365,
-1.358314871788025,
1.4546136856079102,
-0.673309326171875,
0.2390931248664856,
-2.360121965408325,
1.38866126537323,
-0.7124128341674805,
1.8721988201141357,
-2.6579785346984863,
0.4210088849067688,
-0.5812151432037354,
-0.45140188932418823,
0.36083465814590454,
-0.3377416431903839,
0.16321708261966705,
-0.1945962756872177,
-1.1916770935058594,
-0.13382668793201447,
-0.7030838131904602,
0.5546997785568237,
1.0688087940216064,
1.2744343280792236,
-1.047460913658142,
-0.3309752941131592,
-1.7436319589614868,
-0.11996401101350784,
-0.6132959723472595,
0.35732150077819824,
-2.010399341583252,
-0.1922617256641388,
-1.931786298751831,
-2.3583309650421143,
-1.4185311794281006,
-0.760943591594696,
1.1923218965530396,
0.0971451848745346,
-0.8769285678863525,
1.1380010843276978,
-0.32202234864234924,
-1.879624843597412,
1.1110738515853882,
-2.1832501888275146
] |
https://github.com/huggingface/datasets/issues/5424
|
When applying `ReadInstruction` to custom load it's not DatasetDict but list of Dataset?
|
Hi! You can get a `DatasetDict` if you pass a dictionary with read instructions as follows:
```python
instructions = [
ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest')
]
dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split={inst.split_name: inst for inst in instructions})
```
|
### Describe the bug
I am loading datasets from custom `tsv` files stored locally and applying split instructions for each split. Although the ReadInstruction is being applied correctly and I was expecting it to be `DatasetDict` but instead it is a list of `Dataset`.
### Steps to reproduce the bug
Steps to reproduce the behaviour:
1. Import
`from datasets import load_dataset, ReadInstruction`
2. Instruction to load the dataset
```
instructions = [
ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest')
]
```
3. Load
`dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split=instructions)`
### Expected behavior
**Current behaviour**

:
**Expected behaviour**

### Environment info
``datasets==2.8.0
``
`Python==3.8.5
`
`Platform - Ubuntu 20.04.4 LTS`
| 344 | 51 |
When applying `ReadInstruction` to custom load it's not DatasetDict but list of Dataset?
### Describe the bug
I am loading datasets from custom `tsv` files stored locally and applying split instructions for each split. Although the ReadInstruction is being applied correctly and I was expecting it to be `DatasetDict` but instead it is a list of `Dataset`.
### Steps to reproduce the bug
Steps to reproduce the behaviour:
1. Import
`from datasets import load_dataset, ReadInstruction`
2. Instruction to load the dataset
```
instructions = [
ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest')
]
```
3. Load
`dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split=instructions)`
### Expected behavior
**Current behaviour**

:
**Expected behaviour**

### Environment info
``datasets==2.8.0
``
`Python==3.8.5
`
`Platform - Ubuntu 20.04.4 LTS`
Hi! You can get a `DatasetDict` if you pass a dictionary with read instructions as follows:
```python
instructions = [
ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'),
ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest')
]
dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split={inst.split_name: inst for inst in instructions})
```
|
[
-1.2014646530151367,
-0.9519798755645752,
-0.664831817150116,
1.4391368627548218,
-0.1864701360464096,
-1.1531896591186523,
0.17084240913391113,
-1.0244344472885132,
1.580081820487976,
-0.7707537412643433,
0.31056874990463257,
-1.6319173574447632,
-0.008924031630158424,
-0.6302415132522583,
-0.7011873722076416,
-0.8283858299255371,
-0.3760770559310913,
-0.7632891535758972,
1.0520669221878052,
2.493389368057251,
1.214739441871643,
-1.3420840501785278,
2.6978840827941895,
0.7365994453430176,
-0.16486352682113647,
-0.9367257356643677,
0.4733232259750366,
0.013136600144207478,
-1.240067720413208,
-0.44186195731163025,
-0.9828126430511475,
-0.1282014101743698,
-0.6026047468185425,
-0.5409581065177917,
0.002612495794892311,
0.48101845383644104,
-0.28152579069137573,
-0.4001340866088867,
-0.536895215511322,
-0.7503181099891663,
0.46574047207832336,
-0.5121826529502869,
0.9161480665206909,
-0.3325039744377136,
1.838163137435913,
-0.583868145942688,
0.43776369094848633,
0.6876652836799622,
1.289979338645935,
0.2005520462989807,
0.02561499923467636,
0.37889596819877625,
0.3623179495334625,
-0.07750700414180756,
0.5211981534957886,
1.2316035032272339,
0.7063214182853699,
0.5185823440551758,
0.8237407803535461,
-2.2325005531311035,
1.2533804178237915,
-1.0264090299606323,
0.3216848075389862,
1.3784784078598022,
-0.9313167333602905,
0.5181254744529724,
-1.8793156147003174,
-0.053920499980449677,
0.45905059576034546,
-2.2920405864715576,
0.39214324951171875,
-1.2790981531143188,
-0.5682364702224731,
1.0063649415969849,
0.3377014398574829,
-1.1825132369995117,
0.13441506028175354,
-0.4550423324108124,
1.02377188205719,
0.35514259338378906,
1.0775607824325562,
-1.7504624128341675,
-0.07606558501720428,
-0.3228726387023926,
0.15300901234149933,
-1.3105918169021606,
-1.5725606679916382,
0.5749838948249817,
0.6288132071495056,
0.6164642572402954,
-0.16276991367340088,
1.1023387908935547,
-1.0692139863967896,
0.7604728937149048,
-1.0856539011001587,
-1.6945953369140625,
-1.3824330568313599,
-2.24650239944458,
-2.273200035095215,
0.7362685203552246,
-0.4092266857624054,
-0.5828622579574585,
2.021375894546509,
-0.9306329488754272,
-1.6412767171859741,
1.0918755531311035,
0.270978718996048,
-0.05950324982404709,
2.4326961040496826,
0.2147039771080017,
-0.7576638460159302,
0.5718534588813782,
-0.8035033941268921,
0.7738085389137268,
-0.4082714021205902,
1.3962692022323608,
0.40588608384132385,
-0.994870126247406,
1.6736083030700684,
-0.37135106325149536,
0.5937132835388184,
-0.7219935655593872,
-0.5702290534973145,
-0.7565277814865112,
0.20626237988471985,
1.9972134828567505,
-0.27850478887557983,
1.5121058225631714,
-0.3387029767036438,
-1.568142056465149,
-1.5482795238494873,
0.9656193852424622,
0.41649046540260315,
-0.8066729307174683,
0.09199396520853043,
-0.3443986773490906,
0.23040138185024261,
-0.12425801903009415,
1.0827003717422485,
1.2950948476791382,
0.6326231956481934,
-0.29930469393730164,
-0.8765736222267151,
0.11905734986066818,
-0.1250690072774887,
-0.707808256149292,
-1.7365610599517822,
-0.34572285413742065,
0.137149840593338,
0.5603644847869873,
-1.2893141508102417,
1.7718034982681274,
0.9133545756340027,
1.8668553829193115,
1.0278189182281494,
-0.4238632619380951,
1.4656187295913696,
0.1417657434940338,
1.8669577836990356,
-0.5792608857154846,
0.6224573850631714,
-0.4117671847343445,
-1.2209877967834473,
0.8505379557609558,
-0.30216988921165466,
-1.9947876930236816,
-0.6667515635490417,
-0.8244777321815491,
-0.20460033416748047,
-0.8065879940986633,
0.9078049063682556,
-0.30054622888565063,
-1.4591903686523438,
0.2532002031803131,
-0.7083170413970947,
0.18712837994098663,
-1.3033677339553833,
0.37639304995536804,
0.721070408821106,
-0.6479604840278625,
0.1387680023908615,
-0.2938896715641022,
-1.2633806467056274,
-0.5315399169921875,
0.3435510993003845,
1.9026883840560913,
-0.7015469670295715,
0.8163267970085144,
0.978256106376648,
-0.7615817189216614,
-0.05155132710933685,
0.4137749671936035,
-0.3129870891571045,
0.8120244741439819,
-1.0693252086639404,
-0.5446348190307617,
1.2324092388153076,
-0.1785932183265686,
-0.5598394870758057,
1.406625509262085,
0.7670225501060486,
-0.9775492548942566,
-0.2456246167421341,
-0.14180907607078552,
-0.8614292740821838,
0.09674748033285141,
-1.5574278831481934,
-0.11267008632421494,
0.4680786728858948,
-1.5881633758544922,
-0.48852577805519104,
-0.24225716292858124,
1.2506580352783203,
-0.23324765264987946,
1.3627694845199585,
-0.2779870927333832,
-0.20771415531635284,
-0.3074791431427002,
-0.42332613468170166,
0.13505345582962036,
-0.1527765989303589,
-0.6378924250602722,
0.14961768686771393,
-0.7856934666633606,
0.3320311903953552,
1.5233807563781738,
0.30414846539497375,
-0.0540916807949543,
0.525260329246521,
1.0869051218032837,
0.39139559864997864,
-0.05193467438220978,
-0.8836066722869873,
-1.4714906215667725,
1.9032559394836426,
-1.5445224046707153,
1.9555548429489136,
0.743194043636322,
-0.04731471836566925,
-1.7576320171356201,
-1.8558272123336792,
1.313186764717102,
1.1810550689697266,
2.4190549850463867,
0.6025872826576233,
0.4797723591327667,
-0.8042641878128052,
-0.6442886590957642,
0.2719094157218933,
-1.0127143859863281,
-0.7947595119476318,
0.26368647813796997,
2.3976502418518066,
1.742960810661316,
-0.48337820172309875,
-0.21877723932266235,
-1.0188367366790771,
1.403843879699707,
-0.19712743163108826,
0.21964867413043976,
1.9427275657653809,
-0.2592190206050873,
-1.062733769416809,
1.3203445672988892,
-2.347905397415161,
0.17213019728660583,
1.950855016708374,
0.3060607314109802,
0.07530252635478973,
-1.288997769355774,
-0.6582812666893005,
-0.2135474979877472,
-0.4277106821537018,
-1.279739260673523,
0.38436785340309143,
-0.2405833601951599,
-0.6944664716720581,
-1.4776369333267212,
0.14050635695457458,
-1.1574697494506836,
-1.6049654483795166,
0.2442472130060196,
1.9526697397232056,
2.0175817012786865,
-0.7873502373695374,
1.5095092058181763,
-0.2984238564968109,
0.23871180415153503,
1.2229396104812622,
1.283040165901184,
3.0557291507720947,
1.9090839624404907,
-1.1675653457641602,
0.6441734433174133,
-0.20526690781116486,
-0.4320548474788666,
1.174397587776184,
-1.1225334405899048,
1.2417718172073364,
-0.16336147487163544,
-1.181336760520935,
-1.1956475973129272,
0.8793256878852844,
0.4534449875354767,
0.03953687101602554,
-0.45380282402038574,
1.157633662223816,
0.08692989498376846,
1.370740532875061,
0.6215620636940002,
-0.30454596877098083,
0.6199824810028076,
-0.35567301511764526,
-0.4519195556640625,
1.5934312343597412,
0.18360811471939087,
-1.4360020160675049,
-2.28116512298584,
-0.2240913212299347,
-0.8512551784515381,
0.06716644018888474,
-0.6384629607200623,
-1.034512996673584,
1.6607435941696167,
0.35637930035591125,
-1.1588441133499146,
-0.256698340177536,
-0.25855234265327454,
-0.6135501265525818,
2.7293057441711426,
-1.3840985298156738,
-0.30984431505203247,
-1.003455400466919,
-0.6733020544052124,
1.6743735074996948,
-1.1313608884811401,
-0.2503136098384857,
-0.98770672082901,
-0.4463508427143097,
-1.3299442529678345,
-0.4832996129989624,
0.013067818246781826,
-0.9734417796134949,
0.8422884345054626,
0.18439002335071564,
-1.2136263847351074,
-0.38071998953819275,
-0.9652130007743835,
0.9052565097808838,
-0.17952488362789154,
0.15947890281677246,
1.8545066118240356,
0.3739997446537018,
-0.3977477252483368,
0.7500134110450745,
1.2042324542999268,
0.6101219058036804,
-0.5877575874328613,
0.18225479125976562,
-0.6759582757949829,
0.29971444606781006,
-1.3099334239959717,
0.2513120770454407,
-2.8317501544952393,
0.618480384349823,
-0.06165050342679024,
-0.05123365670442581,
-0.0001846635714173317,
-1.3612208366394043,
1.089889645576477,
2.535123348236084,
-1.1780322790145874,
0.5016099214553833,
0.3260175883769989,
1.2038954496383667,
-1.6513361930847168,
0.25966623425483704,
-0.4343526065349579,
2.019231081008911,
0.15393248200416565,
1.195285439491272,
-0.5057675838470459,
-2.416466236114502,
0.5132448673248291,
-1.232245922088623,
-1.2113415002822876,
0.6998995542526245,
-0.8551818132400513,
0.10842601954936981,
-1.3951512575149536,
-0.27096086740493774,
-0.9523597955703735,
-1.216744303703308,
0.698889434337616,
0.11886879056692123,
0.4082746207714081,
-0.5791733264923096,
0.4006552994251251,
-2.211280584335327,
-1.3799041509628296,
-0.23726315796375275,
-0.8734404444694519,
0.5219175219535828,
-0.33552441000938416,
0.7434635162353516,
-0.2066938579082489,
-0.03669538348913193,
0.28616979718208313,
1.5235729217529297,
3.375452756881714,
0.20352551341056824,
0.34683164954185486,
-0.21799670159816742,
-0.9559534192085266,
1.5406641960144043,
0.928266704082489,
0.01427766028791666,
-0.549713671207428,
-1.0832160711288452,
1.2520079612731934,
1.922369122505188,
1.047029972076416,
-0.030546046793460846,
-0.8213282823562622,
-0.6550198793411255,
-0.09629394114017487,
0.18186147511005402,
0.405722439289093,
1.046059250831604,
0.12913404405117035,
0.07725918292999268,
1.3458362817764282,
1.1966817378997803,
-0.43521589040756226,
0.29433366656303406,
-0.8199734091758728,
-0.39441388845443726,
0.5543685555458069,
0.23344005644321442,
-0.051778022199869156,
0.3280881643295288,
-1.0768595933914185,
-0.23831607401371002,
-0.3724253475666046,
-0.9333914518356323,
-0.7407450675964355,
-0.4054431915283203,
-0.3033912181854248,
1.6749333143234253,
0.1052660420536995,
-0.5038679838180542,
-0.022563330829143524,
-0.7800948619842529,
-0.05893200635910034,
-1.1254290342330933,
0.23324447870254517,
-0.10626310110092163,
-0.1348963975906372,
-0.16910773515701294,
1.7750930786132812,
-0.8802741169929504,
-2.0590813159942627,
0.1461518257856369,
0.2887777090072632,
-0.2890011966228485,
0.18607987463474274,
1.7068740129470825,
0.48063936829566956,
1.4578497409820557,
1.3566616773605347,
1.0407664775848389,
-0.6371023058891296,
-1.3169080018997192,
0.6344335079193115,
1.0034266710281372,
-1.3039263486862183,
0.8043568134307861,
0.0300963893532753,
-0.5299069285392761,
0.6002047657966614,
1.3160525560379028,
0.47771894931793213,
-1.9727598428726196,
0.7784953713417053,
-1.023464322090149,
0.8217948079109192,
0.7335410714149475,
0.721778392791748,
0.26630884408950806,
0.897117018699646,
-1.2469654083251953,
-1.116538166999817,
-0.6514771580696106,
-0.6168304085731506,
1.9306650161743164,
-0.24431632459163666,
0.6088696718215942,
-0.18950070440769196,
-1.2721197605133057,
0.011112005449831486,
0.7505326271057129,
0.3986557424068451,
-0.5257457494735718,
0.7521893382072449,
-0.6953118443489075,
-1.1205825805664062,
-1.3142669200897217,
-0.45427653193473816,
-1.0492552518844604,
-0.9123932123184204,
0.98797607421875,
0.7390888929367065,
0.30534428358078003,
1.9180337190628052,
0.7529600858688354,
0.2464570850133896,
-2.6290206909179688,
0.8470057845115662,
0.29150766134262085,
-0.0940166711807251,
0.922671377658844,
0.3684685230255127,
1.0341465473175049,
-0.022447608411312103,
0.5415586233139038,
-2.425750494003296,
2.3319804668426514,
-0.20821817219257355,
0.6867489814758301,
0.013011225499212742,
-0.08280424028635025,
1.1343989372253418,
0.5450044870376587,
0.4769998788833618,
-1.0221058130264282,
0.6047961711883545,
-0.5870472192764282,
1.2566709518432617,
0.8990855813026428,
-0.8452701568603516,
0.04522385448217392,
1.285918116569519,
0.45427262783050537,
-0.5504988431930542,
-0.9895718097686768,
-0.8835390210151672,
0.9336785674095154,
1.7055089473724365,
-0.02376256138086319,
-0.012575102970004082,
0.8982600569725037,
0.6542425751686096,
-1.335152506828308,
0.05122991278767586,
-0.6210994720458984,
-0.7226501107215881,
1.6860233545303345,
2.0241541862487793,
-0.18806231021881104,
-0.2541136145591736,
-0.6413084268569946,
-1.2851334810256958,
0.8067777752876282,
0.024284083396196365,
0.1473359614610672,
0.7315520644187927,
-0.6378628015518188,
1.0253734588623047,
0.7761687636375427,
0.9024267196655273,
0.27662408351898193,
0.28381597995758057,
0.457459956407547,
-0.4537658095359802,
-1.1549561023712158,
-0.1555512696504593,
-1.10985267162323,
-2.617713689804077,
0.4746417999267578,
-0.18694166839122772,
-1.3719086647033691,
0.06139453873038292,
-1.0583239793777466,
0.9771429300308228,
-0.5480480790138245,
-1.1894659996032715,
-1.5116076469421387,
0.230656236410141,
-0.03599737957119942,
0.946864664554596,
-1.6097468137741089,
-0.13063523173332214,
1.1446627378463745,
0.9317536950111389,
-0.6691015958786011,
0.9458550810813904,
0.20830780267715454,
1.1374306678771973,
0.7980514168739319,
-0.34594374895095825,
0.4994298815727234,
-0.018988505005836487,
-1.343151330947876,
0.5104736089706421,
1.2583203315734863,
0.14522245526313782,
1.4038029909133911,
-0.5344707369804382,
-0.039701078087091446,
0.41150906682014465,
-0.5184020400047302,
-0.48370230197906494,
-0.5394547581672668,
0.5703423619270325,
0.014094135724008083,
-0.9442140460014343,
-0.08835781365633011,
-0.06560980528593063,
-0.23738278448581696,
0.1501750349998474,
-1.491683006286621,
-0.11940552294254303,
-0.45279979705810547,
-0.62864750623703,
-1.2509757280349731,
-0.10605662316083908,
1.3249303102493286,
-0.7519342303276062,
-0.22860080003738403,
0.5761170983314514,
0.29485073685646057,
0.5741817355155945,
0.5488717555999756,
-0.7443187236785889,
-0.3144299387931824,
-0.15192754566669464,
-0.3757866621017456,
0.32411989569664,
1.3952711820602417,
-0.16867534816265106,
-0.9991181492805481,
0.6775301098823547,
-0.29054656624794006,
0.12414806336164474,
1.8930944204330444,
0.031034819781780243,
-0.8175912499427795,
0.2477036863565445,
-0.7286593914031982,
1.9454221725463867,
1.6843111515045166,
1.333341360092163,
-0.2471281737089157,
-0.7978711128234863,
0.6592004895210266,
-0.38009288907051086,
-0.45626991987228394,
0.7828732132911682,
0.33641916513442993,
-0.22681476175785065,
-1.4607305526733398,
0.7033067941665649,
1.3009264469146729,
-0.7475922107696533,
-0.8484581112861633,
0.19058330357074738,
-0.7578009963035583,
1.1517548561096191,
0.595422089099884,
0.37813255190849304,
0.29463112354278564,
1.6820271015167236,
0.7793108820915222,
-0.4815615117549896,
0.5763422846794128,
0.5840156674385071,
-0.15061445534229279,
-2.1026675701141357,
-1.2062541246414185,
0.280831515789032,
-0.5430898070335388,
-1.626171588897705,
1.4521161317825317,
-1.0837482213974,
-0.9999683499336243,
0.5610002279281616,
0.18117795884609222,
1.4252500534057617,
0.41806337237358093,
1.5194188356399536,
2.00492000579834,
0.7816455960273743,
0.44160282611846924,
1.2214837074279785,
-0.1981835961341858,
-0.4465327858924866,
1.8640636205673218,
-0.47795370221138,
0.508781373500824,
1.1073620319366455,
-0.2242840826511383,
-1.117225170135498,
-0.7466082572937012,
-1.2993327379226685,
-0.7210676074028015,
1.1661444902420044,
0.0547461099922657,
-1.0997438430786133,
0.23299871385097504,
1.6224905252456665,
0.0536593534052372,
-0.3734813928604126,
0.6745465993881226,
0.3518645167350769,
-0.8145900964736938,
-0.04803616553544998,
-0.9407269358634949,
0.5265674591064453,
-0.19607456028461456,
-0.36460399627685547,
0.27378931641578674,
0.5775991082191467,
1.332597017288208,
0.04013271629810333,
0.14884035289287567,
1.1618175506591797,
-1.407708764076233,
1.5199865102767944,
-0.7779706716537476,
0.2912743389606476,
-2.366615056991577,
1.4067069292068481,
-0.7720057964324951,
1.9380879402160645,
-2.6302685737609863,
0.4317008852958679,
-0.5159149765968323,
-0.5003576874732971,
0.2553136646747589,
-0.3527464270591736,
0.1323978453874588,
-0.12454112619161606,
-1.1132769584655762,
-0.028681933879852295,
-0.6175169348716736,
0.5999333262443542,
1.1494444608688354,
1.4361716508865356,
-1.1564048528671265,
-0.2461148202419281,
-1.7724199295043945,
-0.12765483558177948,
-0.6691790223121643,
0.303427517414093,
-1.970988154411316,
-0.26727426052093506,
-1.92143976688385,
-2.312032461166382,
-1.2915021181106567,
-0.8059964776039124,
1.1410239934921265,
0.12132403999567032,
-0.9562416672706604,
1.3065128326416016,
-0.366633802652359,
-1.7645046710968018,
1.198883295059204,
-2.127153158187866
] |
https://github.com/huggingface/datasets/issues/5422
|
Datasets load error for saved github issues
|
I can confirm that the error exists!
I'm trying to read 3 parquet files locally:
```python
from datasets import load_dataset, Features, Value, ClassLabel
review_dataset = load_dataset(
"parquet",
data_files={
"train": os.path.join(sentiment_analysis_data_path, "train.parquet"),
"validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"),
"test": os.path.join(sentiment_analysis_data_path, "test.parquet"),
},
)
```
But you can fix it, by specifying `features` for `load_dataset()` function like this:
```python
from datasets import load_dataset, Features, Value, ClassLabel
features = Features(
{
"label": ClassLabel(
num_classes=3,
names=["negative", "neutral", "positive"],
),
"text": Value(dtype="string"),
}
)
review_dataset = load_dataset(
"parquet",
data_files={
"train": os.path.join(sentiment_analysis_data_path, "train.parquet"),
"validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"),
"test": os.path.join(sentiment_analysis_data_path, "test.parquet"),
},
features=features,
)
print(review_dataset)
```
|
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
| 345 | 95 |
Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
I can confirm that the error exists!
I'm trying to read 3 parquet files locally:
```python
from datasets import load_dataset, Features, Value, ClassLabel
review_dataset = load_dataset(
"parquet",
data_files={
"train": os.path.join(sentiment_analysis_data_path, "train.parquet"),
"validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"),
"test": os.path.join(sentiment_analysis_data_path, "test.parquet"),
},
)
```
But you can fix it, by specifying `features` for `load_dataset()` function like this:
```python
from datasets import load_dataset, Features, Value, ClassLabel
features = Features(
{
"label": ClassLabel(
num_classes=3,
names=["negative", "neutral", "positive"],
),
"text": Value(dtype="string"),
}
)
review_dataset = load_dataset(
"parquet",
data_files={
"train": os.path.join(sentiment_analysis_data_path, "train.parquet"),
"validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"),
"test": os.path.join(sentiment_analysis_data_path, "test.parquet"),
},
features=features,
)
print(review_dataset)
```
|
[
-1.1963127851486206,
-0.9330918788909912,
-0.7827396392822266,
1.4344896078109741,
-0.1406930536031723,
-1.2193514108657837,
0.08512034267187119,
-1.1205116510391235,
1.6201714277267456,
-0.678076446056366,
0.23913109302520752,
-1.6713672876358032,
0.04052264243364334,
-0.5257079005241394,
-0.727277398109436,
-0.9132007956504822,
-0.4457392990589142,
-0.7832931876182556,
1.039745569229126,
2.553744077682495,
1.2455302476882935,
-1.3454058170318604,
2.7519757747650146,
0.7733988761901855,
-0.20083430409431458,
-0.9936761856079102,
0.5939254760742188,
0.08613280206918716,
-1.3476773500442505,
-0.39533689618110657,
-0.9301313757896423,
-0.12255214899778366,
-0.5196858644485474,
-0.5056213736534119,
0.056812629103660583,
0.37340641021728516,
-0.3209276795387268,
-0.4142794609069824,
-0.6137562394142151,
-0.7004385590553284,
0.4339582920074463,
-0.34088200330734253,
0.9217231273651123,
-0.29713279008865356,
1.7964930534362793,
-0.6220569610595703,
0.3851083815097809,
0.729198157787323,
1.2878361940383911,
0.24229711294174194,
0.057973265647888184,
0.3297666609287262,
0.4207382798194885,
-0.03582301363348961,
0.42502766847610474,
1.2176133394241333,
0.6391205191612244,
0.450739324092865,
0.757041871547699,
-2.173771619796753,
1.295736312866211,
-0.9564512372016907,
0.255735844373703,
1.3685253858566284,
-0.9302455186843872,
0.36197030544281006,
-1.7935283184051514,
-0.07607708871364594,
0.6241359710693359,
-2.245116949081421,
0.21123266220092773,
-1.3188856840133667,
-0.5523850321769714,
0.9297446608543396,
0.30967214703559875,
-1.1874884366989136,
0.21643240749835968,
-0.5421547889709473,
1.0504262447357178,
0.454480916261673,
1.19706130027771,
-1.7150973081588745,
-0.06484316289424896,
-0.28525006771087646,
0.11113414913415909,
-1.3187494277954102,
-1.551162838935852,
0.588192880153656,
0.6144393682479858,
0.6694850921630859,
-0.04125126451253891,
0.966902494430542,
-1.0298343896865845,
0.8381138443946838,
-0.9850296974182129,
-1.7487008571624756,
-1.4154644012451172,
-2.307955741882324,
-2.281989812850952,
0.7721827626228333,
-0.45548495650291443,
-0.4979220926761627,
2.044119358062744,
-1.0438038110733032,
-1.7463428974151611,
1.1161223649978638,
0.26736563444137573,
-0.03158705681562424,
2.423990249633789,
0.2970874309539795,
-0.7164976596832275,
0.44160374999046326,
-0.7417882680892944,
0.7658222913742065,
-0.3041578531265259,
1.3748550415039062,
0.41163623332977295,
-0.9854326844215393,
1.5576221942901611,
-0.40985721349716187,
0.5786521434783936,
-0.6954913139343262,
-0.5300037860870361,
-0.7964998483657837,
0.28700166940689087,
1.915679693222046,
-0.339327871799469,
1.6485669612884521,
-0.3408086895942688,
-1.6109870672225952,
-1.6204626560211182,
0.8159289360046387,
0.5080567598342896,
-0.8270281553268433,
0.07725593447685242,
-0.31959110498428345,
0.0554586797952652,
0.020173782482743263,
1.0991014242172241,
1.2852405309677124,
0.7148051261901855,
-0.3366878628730774,
-0.8891682028770447,
0.13425812125205994,
-0.0929669663310051,
-0.7834908366203308,
-1.7592542171478271,
-0.3171573579311371,
0.13886283338069916,
0.6648567914962769,
-1.3215248584747314,
1.6324161291122437,
0.8923439383506775,
1.937158226966858,
1.094266653060913,
-0.4076118767261505,
1.4866077899932861,
0.10346145927906036,
1.844605565071106,
-0.5928158760070801,
0.6599614024162292,
-0.37942323088645935,
-1.1018627882003784,
0.848377525806427,
-0.3102072775363922,
-2.0419955253601074,
-0.7289724946022034,
-0.7332409024238586,
-0.22017236053943634,
-0.7558048367500305,
0.9306036233901978,
-0.3167366683483124,
-1.4350656270980835,
0.2651248872280121,
-0.7258081436157227,
0.06321162730455399,
-1.2662270069122314,
0.25594303011894226,
0.7491654753684998,
-0.6105225086212158,
0.08293342590332031,
-0.21794427931308746,
-1.3143889904022217,
-0.4495285153388977,
0.2742244005203247,
1.9121406078338623,
-0.7619855999946594,
0.9761967658996582,
1.029388427734375,
-0.7000743746757507,
0.06098397076129913,
0.36040881276130676,
-0.3124944567680359,
0.832477867603302,
-1.1273571252822876,
-0.4143946170806885,
1.128124475479126,
-0.10615990310907364,
-0.5337290167808533,
1.449006199836731,
0.7387826442718506,
-1.0162169933319092,
-0.2722429037094116,
-0.07340437173843384,
-0.8397454023361206,
0.013042189180850983,
-1.6186368465423584,
-0.14750953018665314,
0.3195720613002777,
-1.5265581607818604,
-0.5188238620758057,
-0.23587557673454285,
1.2722288370132446,
-0.15679770708084106,
1.426255464553833,
-0.2976452112197876,
-0.20925605297088623,
-0.3629318177700043,
-0.4272013008594513,
0.12982112169265747,
-0.2955821752548218,
-0.5787747502326965,
0.2465803623199463,
-0.8128191828727722,
0.2891960144042969,
1.4270297288894653,
0.36643922328948975,
0.08220522105693817,
0.4916340112686157,
1.0717747211456299,
0.40715184807777405,
-0.08579559624195099,
-0.8550070524215698,
-1.5305615663528442,
2.0767934322357178,
-1.4803295135498047,
1.9874805212020874,
0.7874659895896912,
-0.06270987540483475,
-1.837090015411377,
-1.9160221815109253,
1.3332297801971436,
1.1375610828399658,
2.365048885345459,
0.536858081817627,
0.3778708279132843,
-0.7557786107063293,
-0.6516799926757812,
0.30063921213150024,
-1.022310733795166,
-0.7101193070411682,
0.19282743334770203,
2.41162109375,
1.7292031049728394,
-0.5000223517417908,
-0.21761947870254517,
-0.9781011343002319,
1.2888450622558594,
-0.14562338590621948,
0.17186801135540009,
1.9694486856460571,
-0.2123529613018036,
-1.0738861560821533,
1.2410682439804077,
-2.31320858001709,
0.14458169043064117,
2.0039145946502686,
0.2713751792907715,
0.056938767433166504,
-1.440623164176941,
-0.706920862197876,
-0.33053964376449585,
-0.4419773519039154,
-1.2544816732406616,
0.5561875104904175,
-0.3193601667881012,
-0.8716607093811035,
-1.5388579368591309,
0.04570101201534271,
-1.1587820053100586,
-1.6809145212173462,
0.2760401666164398,
1.8663477897644043,
2.0036044120788574,
-0.7078672051429749,
1.5244148969650269,
-0.30079197883605957,
0.04774286597967148,
1.1742888689041138,
1.2000761032104492,
3.0962295532226562,
1.938481330871582,
-1.2274078130722046,
0.7331267595291138,
-0.07230769097805023,
-0.4143533706665039,
1.134238600730896,
-1.1557343006134033,
1.2847211360931396,
-0.19102057814598083,
-1.2634555101394653,
-1.216794729232788,
0.973508358001709,
0.4321473240852356,
0.020546095445752144,
-0.5253702402114868,
1.286665916442871,
0.05392900109291077,
1.2890185117721558,
0.507666289806366,
-0.3173224627971649,
0.6042106747627258,
-0.39194345474243164,
-0.5215069651603699,
1.5957621335983276,
0.2052343189716339,
-1.469826102256775,
-2.3757636547088623,
-0.24454395473003387,
-0.7881750464439392,
0.013736948370933533,
-0.6333320140838623,
-1.0771079063415527,
1.7019076347351074,
0.4244462847709656,
-1.269282341003418,
-0.27322813868522644,
-0.3460020422935486,
-0.5907617211341858,
2.6833982467651367,
-1.453320860862732,
-0.15855789184570312,
-0.9716829657554626,
-0.6088515520095825,
1.6095260381698608,
-1.154006838798523,
-0.1739647090435028,
-1.0810348987579346,
-0.6062009334564209,
-1.326407790184021,
-0.5326869487762451,
-0.01344145368784666,
-0.9324941039085388,
0.8292308449745178,
0.1626618206501007,
-1.1210941076278687,
-0.23822923004627228,
-0.9171645641326904,
0.9046302437782288,
-0.0838211178779602,
0.23791545629501343,
1.9768925905227661,
0.43833425641059875,
-0.44886937737464905,
0.7102206349372864,
1.166123390197754,
0.6438978314399719,
-0.7097073197364807,
0.1131429374217987,
-0.6844974756240845,
0.310308039188385,
-1.3895772695541382,
0.22427064180374146,
-2.811593770980835,
0.640626847743988,
-0.04645863175392151,
-0.040787190198898315,
0.07167043536901474,
-1.2166941165924072,
1.1459711790084839,
2.621478319168091,
-1.1727783679962158,
0.5020530223846436,
0.3111254572868347,
1.2175666093826294,
-1.5507006645202637,
0.3621058762073517,
-0.39761078357696533,
2.0387344360351562,
0.2084735631942749,
1.1543138027191162,
-0.4992736577987671,
-2.207833766937256,
0.6288199424743652,
-1.2517876625061035,
-1.1475540399551392,
0.7885823845863342,
-0.904139518737793,
0.1614477038383484,
-1.4632511138916016,
-0.21872097253799438,
-0.9255772233009338,
-1.2445237636566162,
0.6861385703086853,
0.1768537312746048,
0.47469884157180786,
-0.5877225399017334,
0.34416988492012024,
-2.228614330291748,
-1.4119014739990234,
-0.21444277465343475,
-0.96769779920578,
0.48499494791030884,
-0.35161304473876953,
0.7279738187789917,
-0.16283485293388367,
0.011251399293541908,
0.33372485637664795,
1.3284690380096436,
3.3884716033935547,
0.16477859020233154,
0.2662009000778198,
-0.16338518261909485,
-0.9789815545082092,
1.3782726526260376,
0.9500302076339722,
-0.1518038660287857,
-0.6200442910194397,
-1.0090172290802002,
1.195512056350708,
1.9968571662902832,
1.0841997861862183,
0.028796086087822914,
-0.8424066305160522,
-0.7619249820709229,
0.10847461968660355,
0.2030474692583084,
0.5025843977928162,
0.9644692540168762,
-0.015782369300723076,
0.10423669964075089,
1.5587739944458008,
1.1590287685394287,
-0.38505035638809204,
0.3543919026851654,
-0.8596413731575012,
-0.5059113502502441,
0.5035489797592163,
0.32873427867889404,
0.04433334618806839,
0.3928411602973938,
-1.0785441398620605,
-0.2415911853313446,
-0.3991551697254181,
-0.9554749131202698,
-0.6814478039741516,
-0.40840059518814087,
-0.3611240088939667,
1.6480767726898193,
0.08925497531890869,
-0.4392836391925812,
-0.052923232316970825,
-0.7513001561164856,
-0.13525046408176422,
-1.0671086311340332,
0.3492223024368286,
-0.1277753859758377,
-0.06633542478084564,
-0.044250890612602234,
1.8521422147750854,
-0.9597856998443604,
-2.0492308139801025,
0.24221014976501465,
0.19811856746673584,
-0.36822932958602905,
0.2508501410484314,
1.6301287412643433,
0.5860109329223633,
1.3771642446517944,
1.302361249923706,
0.8865513205528259,
-0.6728057265281677,
-1.3171508312225342,
0.5690463781356812,
0.9960952997207642,
-1.372933268547058,
0.8567798733711243,
-0.07907261699438095,
-0.5154211521148682,
0.640878438949585,
1.4022198915481567,
0.4087699055671692,
-1.977128505706787,
0.8217830657958984,
-0.8632746934890747,
0.7984637022018433,
0.7374486923217773,
0.7030637264251709,
0.1878148913383484,
0.8007134795188904,
-1.259303092956543,
-1.1727243661880493,
-0.7780727744102478,
-0.5701571106910706,
1.9143239259719849,
-0.17315073311328888,
0.5446757674217224,
-0.23889106512069702,
-1.2521140575408936,
-0.07159698754549026,
0.6783280968666077,
0.36219125986099243,
-0.4313208758831024,
0.8215733766555786,
-0.5616418719291687,
-1.1378437280654907,
-1.3038685321807861,
-0.47228682041168213,
-0.979748547077179,
-0.8929241299629211,
1.0335257053375244,
0.7858556509017944,
0.3435481786727905,
1.9235994815826416,
0.5727387070655823,
0.2423691749572754,
-2.6645636558532715,
0.8837393522262573,
0.29447701573371887,
-0.06510625779628754,
0.9561201333999634,
0.313191294670105,
1.0323139429092407,
-0.031632546335458755,
0.53092360496521,
-2.3716607093811035,
2.251124382019043,
-0.25484782457351685,
0.7168163061141968,
-0.005324467550963163,
-0.13502256572246552,
1.0963242053985596,
0.5611977577209473,
0.5584143400192261,
-1.0355812311172485,
0.6607334613800049,
-0.5494239926338196,
1.1584876775741577,
0.9638675451278687,
-0.7577407360076904,
0.04937499761581421,
1.3126542568206787,
0.49994760751724243,
-0.4922258257865906,
-0.9124547839164734,
-0.91436767578125,
0.9233717322349548,
1.7613495588302612,
-0.0550389364361763,
0.08757604658603668,
0.8897939920425415,
0.6280189156532288,
-1.3257595300674438,
0.10383956134319305,
-0.7288170456886292,
-0.713225245475769,
1.6534467935562134,
2.1597795486450195,
-0.09494846314191818,
-0.14231085777282715,
-0.6824080944061279,
-1.2291934490203857,
0.7972569465637207,
-0.0587044283747673,
0.24605220556259155,
0.653500497341156,
-0.6148926615715027,
1.1478290557861328,
0.7476022839546204,
1.0192625522613525,
0.1546243280172348,
0.41736724972724915,
0.3834437131881714,
-0.32378968596458435,
-1.1689823865890503,
-0.24498464167118073,
-1.0376895666122437,
-2.3736586570739746,
0.4551844596862793,
-0.20278142392635345,
-1.453934669494629,
0.055274687707424164,
-0.9943131804466248,
0.9191437363624573,
-0.5588482618331909,
-1.0155448913574219,
-1.5314055681228638,
0.22471871972084045,
-0.1283978670835495,
0.9759502410888672,
-1.5882025957107544,
-0.10182731598615646,
1.2415944337844849,
0.9398208260536194,
-0.6083660125732422,
1.012424111366272,
0.2371664196252823,
1.029041051864624,
0.8147421479225159,
-0.34809601306915283,
0.45118290185928345,
0.0776696652173996,
-1.3278305530548096,
0.45458748936653137,
1.18282949924469,
0.20360544323921204,
1.4675583839416504,
-0.5418087244033813,
-0.02210920862853527,
0.4358956813812256,
-0.5140392184257507,
-0.3912445604801178,
-0.49616292119026184,
0.6358861327171326,
0.10977264493703842,
-0.9017727971076965,
-0.04056484252214432,
-0.1292565017938614,
-0.21217043697834015,
0.21088941395282745,
-1.4881870746612549,
-0.14363154768943787,
-0.4425589144229889,
-0.5472970008850098,
-1.2637165784835815,
-0.021498484537005424,
1.3221937417984009,
-0.8001359105110168,
-0.17093586921691895,
0.4508455991744995,
0.4283106327056885,
0.5136473178863525,
0.6861628890037537,
-0.6553228497505188,
-0.35319390892982483,
-0.28387731313705444,
-0.36220937967300415,
0.2438277304172516,
1.2804688215255737,
-0.14939764142036438,
-0.9969673156738281,
0.6889585852622986,
-0.44027864933013916,
0.057434432208538055,
1.9573408365249634,
0.012958724051713943,
-0.7606021761894226,
0.28119564056396484,
-0.6688703298568726,
1.9124127626419067,
1.6977169513702393,
1.3717703819274902,
-0.14949573576450348,
-0.9031482934951782,
0.5449773073196411,
-0.2502555549144745,
-0.3834144175052643,
0.8751092553138733,
0.4637976586818695,
-0.20859390497207642,
-1.421396255493164,
0.5550941824913025,
1.2497544288635254,
-0.9683694839477539,
-0.7395042777061462,
0.11081990599632263,
-0.8282804489135742,
1.0293627977371216,
0.6836090087890625,
0.36992424726486206,
0.26908785104751587,
1.5689661502838135,
0.7004731893539429,
-0.5451866388320923,
0.5445104241371155,
0.4575534760951996,
-0.15511612594127655,
-2.078141689300537,
-1.0812846422195435,
0.37620633840560913,
-0.3842617869377136,
-1.6272484064102173,
1.3790494203567505,
-1.1759835481643677,
-0.954089343547821,
0.4749571979045868,
0.08909045904874802,
1.3248413801193237,
0.28313085436820984,
1.6675875186920166,
2.1380198001861572,
0.8889577388763428,
0.3230372369289398,
1.3227306604385376,
-0.10241440683603287,
-0.5226578712463379,
1.8781344890594482,
-0.4217684268951416,
0.5474209785461426,
1.0195096731185913,
-0.3126237988471985,
-1.0368800163269043,
-0.7591808438301086,
-1.214235544204712,
-0.6739137768745422,
1.1261687278747559,
0.09440070390701294,
-1.150238037109375,
0.2361059933900833,
1.5154801607131958,
0.12830732762813568,
-0.3078575134277344,
0.6945213079452515,
0.4524722993373871,
-0.7757728695869446,
-0.1291758120059967,
-0.8998554944992065,
0.5224765539169312,
-0.16649894416332245,
-0.35037538409233093,
0.2016814947128296,
0.4161810278892517,
1.3036112785339355,
-0.02996094338595867,
0.09607852250337601,
1.2594811916351318,
-1.4226895570755005,
1.4968372583389282,
-0.622732400894165,
0.2200821191072464,
-2.389016628265381,
1.4134540557861328,
-0.7768620252609253,
1.8140926361083984,
-2.648446798324585,
0.47881725430488586,
-0.5651214122772217,
-0.41089415550231934,
0.271945983171463,
-0.33400672674179077,
0.20586185157299042,
-0.13079440593719482,
-1.0820029973983765,
-0.04281718283891678,
-0.7370831370353699,
0.554538905620575,
1.1070448160171509,
1.3613307476043701,
-1.0747179985046387,
-0.2659805417060852,
-1.7707560062408447,
-0.1914740949869156,
-0.7019520401954651,
0.305427610874176,
-2.000716209411621,
-0.17692998051643372,
-1.9009283781051636,
-2.4330852031707764,
-1.4334346055984497,
-0.8771142959594727,
1.0758130550384521,
0.16871370375156403,
-0.9732785820960999,
1.1904462575912476,
-0.38936835527420044,
-1.8588924407958984,
1.0843660831451416,
-2.1832525730133057
] |
https://github.com/huggingface/datasets/issues/5422
|
Datasets load error for saved github issues
|
@Extremesarova I think this is a different issue, but understand using features could be a work-around.
It seems the field `closed_at` is `null` in many cases.
I've not found a way to specify only a single feature without (succesfully) specifiying the full and quite detailed set of expected features. Using this features set gives an error the column names don't match.
`features = Features({'closed_at': Value(dtype='timestamp[s]', id=None)})`
|
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
| 345 | 66 |
Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
@Extremesarova I think this is a different issue, but understand using features could be a work-around.
It seems the field `closed_at` is `null` in many cases.
I've not found a way to specify only a single feature without (succesfully) specifiying the full and quite detailed set of expected features. Using this features set gives an error the column names don't match.
`features = Features({'closed_at': Value(dtype='timestamp[s]', id=None)})`
|
[
-1.1963127851486206,
-0.9330918788909912,
-0.7827396392822266,
1.4344896078109741,
-0.1406930536031723,
-1.2193514108657837,
0.08512034267187119,
-1.1205116510391235,
1.6201714277267456,
-0.678076446056366,
0.23913109302520752,
-1.6713672876358032,
0.04052264243364334,
-0.5257079005241394,
-0.727277398109436,
-0.9132007956504822,
-0.4457392990589142,
-0.7832931876182556,
1.039745569229126,
2.553744077682495,
1.2455302476882935,
-1.3454058170318604,
2.7519757747650146,
0.7733988761901855,
-0.20083430409431458,
-0.9936761856079102,
0.5939254760742188,
0.08613280206918716,
-1.3476773500442505,
-0.39533689618110657,
-0.9301313757896423,
-0.12255214899778366,
-0.5196858644485474,
-0.5056213736534119,
0.056812629103660583,
0.37340641021728516,
-0.3209276795387268,
-0.4142794609069824,
-0.6137562394142151,
-0.7004385590553284,
0.4339582920074463,
-0.34088200330734253,
0.9217231273651123,
-0.29713279008865356,
1.7964930534362793,
-0.6220569610595703,
0.3851083815097809,
0.729198157787323,
1.2878361940383911,
0.24229711294174194,
0.057973265647888184,
0.3297666609287262,
0.4207382798194885,
-0.03582301363348961,
0.42502766847610474,
1.2176133394241333,
0.6391205191612244,
0.450739324092865,
0.757041871547699,
-2.173771619796753,
1.295736312866211,
-0.9564512372016907,
0.255735844373703,
1.3685253858566284,
-0.9302455186843872,
0.36197030544281006,
-1.7935283184051514,
-0.07607708871364594,
0.6241359710693359,
-2.245116949081421,
0.21123266220092773,
-1.3188856840133667,
-0.5523850321769714,
0.9297446608543396,
0.30967214703559875,
-1.1874884366989136,
0.21643240749835968,
-0.5421547889709473,
1.0504262447357178,
0.454480916261673,
1.19706130027771,
-1.7150973081588745,
-0.06484316289424896,
-0.28525006771087646,
0.11113414913415909,
-1.3187494277954102,
-1.551162838935852,
0.588192880153656,
0.6144393682479858,
0.6694850921630859,
-0.04125126451253891,
0.966902494430542,
-1.0298343896865845,
0.8381138443946838,
-0.9850296974182129,
-1.7487008571624756,
-1.4154644012451172,
-2.307955741882324,
-2.281989812850952,
0.7721827626228333,
-0.45548495650291443,
-0.4979220926761627,
2.044119358062744,
-1.0438038110733032,
-1.7463428974151611,
1.1161223649978638,
0.26736563444137573,
-0.03158705681562424,
2.423990249633789,
0.2970874309539795,
-0.7164976596832275,
0.44160374999046326,
-0.7417882680892944,
0.7658222913742065,
-0.3041578531265259,
1.3748550415039062,
0.41163623332977295,
-0.9854326844215393,
1.5576221942901611,
-0.40985721349716187,
0.5786521434783936,
-0.6954913139343262,
-0.5300037860870361,
-0.7964998483657837,
0.28700166940689087,
1.915679693222046,
-0.339327871799469,
1.6485669612884521,
-0.3408086895942688,
-1.6109870672225952,
-1.6204626560211182,
0.8159289360046387,
0.5080567598342896,
-0.8270281553268433,
0.07725593447685242,
-0.31959110498428345,
0.0554586797952652,
0.020173782482743263,
1.0991014242172241,
1.2852405309677124,
0.7148051261901855,
-0.3366878628730774,
-0.8891682028770447,
0.13425812125205994,
-0.0929669663310051,
-0.7834908366203308,
-1.7592542171478271,
-0.3171573579311371,
0.13886283338069916,
0.6648567914962769,
-1.3215248584747314,
1.6324161291122437,
0.8923439383506775,
1.937158226966858,
1.094266653060913,
-0.4076118767261505,
1.4866077899932861,
0.10346145927906036,
1.844605565071106,
-0.5928158760070801,
0.6599614024162292,
-0.37942323088645935,
-1.1018627882003784,
0.848377525806427,
-0.3102072775363922,
-2.0419955253601074,
-0.7289724946022034,
-0.7332409024238586,
-0.22017236053943634,
-0.7558048367500305,
0.9306036233901978,
-0.3167366683483124,
-1.4350656270980835,
0.2651248872280121,
-0.7258081436157227,
0.06321162730455399,
-1.2662270069122314,
0.25594303011894226,
0.7491654753684998,
-0.6105225086212158,
0.08293342590332031,
-0.21794427931308746,
-1.3143889904022217,
-0.4495285153388977,
0.2742244005203247,
1.9121406078338623,
-0.7619855999946594,
0.9761967658996582,
1.029388427734375,
-0.7000743746757507,
0.06098397076129913,
0.36040881276130676,
-0.3124944567680359,
0.832477867603302,
-1.1273571252822876,
-0.4143946170806885,
1.128124475479126,
-0.10615990310907364,
-0.5337290167808533,
1.449006199836731,
0.7387826442718506,
-1.0162169933319092,
-0.2722429037094116,
-0.07340437173843384,
-0.8397454023361206,
0.013042189180850983,
-1.6186368465423584,
-0.14750953018665314,
0.3195720613002777,
-1.5265581607818604,
-0.5188238620758057,
-0.23587557673454285,
1.2722288370132446,
-0.15679770708084106,
1.426255464553833,
-0.2976452112197876,
-0.20925605297088623,
-0.3629318177700043,
-0.4272013008594513,
0.12982112169265747,
-0.2955821752548218,
-0.5787747502326965,
0.2465803623199463,
-0.8128191828727722,
0.2891960144042969,
1.4270297288894653,
0.36643922328948975,
0.08220522105693817,
0.4916340112686157,
1.0717747211456299,
0.40715184807777405,
-0.08579559624195099,
-0.8550070524215698,
-1.5305615663528442,
2.0767934322357178,
-1.4803295135498047,
1.9874805212020874,
0.7874659895896912,
-0.06270987540483475,
-1.837090015411377,
-1.9160221815109253,
1.3332297801971436,
1.1375610828399658,
2.365048885345459,
0.536858081817627,
0.3778708279132843,
-0.7557786107063293,
-0.6516799926757812,
0.30063921213150024,
-1.022310733795166,
-0.7101193070411682,
0.19282743334770203,
2.41162109375,
1.7292031049728394,
-0.5000223517417908,
-0.21761947870254517,
-0.9781011343002319,
1.2888450622558594,
-0.14562338590621948,
0.17186801135540009,
1.9694486856460571,
-0.2123529613018036,
-1.0738861560821533,
1.2410682439804077,
-2.31320858001709,
0.14458169043064117,
2.0039145946502686,
0.2713751792907715,
0.056938767433166504,
-1.440623164176941,
-0.706920862197876,
-0.33053964376449585,
-0.4419773519039154,
-1.2544816732406616,
0.5561875104904175,
-0.3193601667881012,
-0.8716607093811035,
-1.5388579368591309,
0.04570101201534271,
-1.1587820053100586,
-1.6809145212173462,
0.2760401666164398,
1.8663477897644043,
2.0036044120788574,
-0.7078672051429749,
1.5244148969650269,
-0.30079197883605957,
0.04774286597967148,
1.1742888689041138,
1.2000761032104492,
3.0962295532226562,
1.938481330871582,
-1.2274078130722046,
0.7331267595291138,
-0.07230769097805023,
-0.4143533706665039,
1.134238600730896,
-1.1557343006134033,
1.2847211360931396,
-0.19102057814598083,
-1.2634555101394653,
-1.216794729232788,
0.973508358001709,
0.4321473240852356,
0.020546095445752144,
-0.5253702402114868,
1.286665916442871,
0.05392900109291077,
1.2890185117721558,
0.507666289806366,
-0.3173224627971649,
0.6042106747627258,
-0.39194345474243164,
-0.5215069651603699,
1.5957621335983276,
0.2052343189716339,
-1.469826102256775,
-2.3757636547088623,
-0.24454395473003387,
-0.7881750464439392,
0.013736948370933533,
-0.6333320140838623,
-1.0771079063415527,
1.7019076347351074,
0.4244462847709656,
-1.269282341003418,
-0.27322813868522644,
-0.3460020422935486,
-0.5907617211341858,
2.6833982467651367,
-1.453320860862732,
-0.15855789184570312,
-0.9716829657554626,
-0.6088515520095825,
1.6095260381698608,
-1.154006838798523,
-0.1739647090435028,
-1.0810348987579346,
-0.6062009334564209,
-1.326407790184021,
-0.5326869487762451,
-0.01344145368784666,
-0.9324941039085388,
0.8292308449745178,
0.1626618206501007,
-1.1210941076278687,
-0.23822923004627228,
-0.9171645641326904,
0.9046302437782288,
-0.0838211178779602,
0.23791545629501343,
1.9768925905227661,
0.43833425641059875,
-0.44886937737464905,
0.7102206349372864,
1.166123390197754,
0.6438978314399719,
-0.7097073197364807,
0.1131429374217987,
-0.6844974756240845,
0.310308039188385,
-1.3895772695541382,
0.22427064180374146,
-2.811593770980835,
0.640626847743988,
-0.04645863175392151,
-0.040787190198898315,
0.07167043536901474,
-1.2166941165924072,
1.1459711790084839,
2.621478319168091,
-1.1727783679962158,
0.5020530223846436,
0.3111254572868347,
1.2175666093826294,
-1.5507006645202637,
0.3621058762073517,
-0.39761078357696533,
2.0387344360351562,
0.2084735631942749,
1.1543138027191162,
-0.4992736577987671,
-2.207833766937256,
0.6288199424743652,
-1.2517876625061035,
-1.1475540399551392,
0.7885823845863342,
-0.904139518737793,
0.1614477038383484,
-1.4632511138916016,
-0.21872097253799438,
-0.9255772233009338,
-1.2445237636566162,
0.6861385703086853,
0.1768537312746048,
0.47469884157180786,
-0.5877225399017334,
0.34416988492012024,
-2.228614330291748,
-1.4119014739990234,
-0.21444277465343475,
-0.96769779920578,
0.48499494791030884,
-0.35161304473876953,
0.7279738187789917,
-0.16283485293388367,
0.011251399293541908,
0.33372485637664795,
1.3284690380096436,
3.3884716033935547,
0.16477859020233154,
0.2662009000778198,
-0.16338518261909485,
-0.9789815545082092,
1.3782726526260376,
0.9500302076339722,
-0.1518038660287857,
-0.6200442910194397,
-1.0090172290802002,
1.195512056350708,
1.9968571662902832,
1.0841997861862183,
0.028796086087822914,
-0.8424066305160522,
-0.7619249820709229,
0.10847461968660355,
0.2030474692583084,
0.5025843977928162,
0.9644692540168762,
-0.015782369300723076,
0.10423669964075089,
1.5587739944458008,
1.1590287685394287,
-0.38505035638809204,
0.3543919026851654,
-0.8596413731575012,
-0.5059113502502441,
0.5035489797592163,
0.32873427867889404,
0.04433334618806839,
0.3928411602973938,
-1.0785441398620605,
-0.2415911853313446,
-0.3991551697254181,
-0.9554749131202698,
-0.6814478039741516,
-0.40840059518814087,
-0.3611240088939667,
1.6480767726898193,
0.08925497531890869,
-0.4392836391925812,
-0.052923232316970825,
-0.7513001561164856,
-0.13525046408176422,
-1.0671086311340332,
0.3492223024368286,
-0.1277753859758377,
-0.06633542478084564,
-0.044250890612602234,
1.8521422147750854,
-0.9597856998443604,
-2.0492308139801025,
0.24221014976501465,
0.19811856746673584,
-0.36822932958602905,
0.2508501410484314,
1.6301287412643433,
0.5860109329223633,
1.3771642446517944,
1.302361249923706,
0.8865513205528259,
-0.6728057265281677,
-1.3171508312225342,
0.5690463781356812,
0.9960952997207642,
-1.372933268547058,
0.8567798733711243,
-0.07907261699438095,
-0.5154211521148682,
0.640878438949585,
1.4022198915481567,
0.4087699055671692,
-1.977128505706787,
0.8217830657958984,
-0.8632746934890747,
0.7984637022018433,
0.7374486923217773,
0.7030637264251709,
0.1878148913383484,
0.8007134795188904,
-1.259303092956543,
-1.1727243661880493,
-0.7780727744102478,
-0.5701571106910706,
1.9143239259719849,
-0.17315073311328888,
0.5446757674217224,
-0.23889106512069702,
-1.2521140575408936,
-0.07159698754549026,
0.6783280968666077,
0.36219125986099243,
-0.4313208758831024,
0.8215733766555786,
-0.5616418719291687,
-1.1378437280654907,
-1.3038685321807861,
-0.47228682041168213,
-0.979748547077179,
-0.8929241299629211,
1.0335257053375244,
0.7858556509017944,
0.3435481786727905,
1.9235994815826416,
0.5727387070655823,
0.2423691749572754,
-2.6645636558532715,
0.8837393522262573,
0.29447701573371887,
-0.06510625779628754,
0.9561201333999634,
0.313191294670105,
1.0323139429092407,
-0.031632546335458755,
0.53092360496521,
-2.3716607093811035,
2.251124382019043,
-0.25484782457351685,
0.7168163061141968,
-0.005324467550963163,
-0.13502256572246552,
1.0963242053985596,
0.5611977577209473,
0.5584143400192261,
-1.0355812311172485,
0.6607334613800049,
-0.5494239926338196,
1.1584876775741577,
0.9638675451278687,
-0.7577407360076904,
0.04937499761581421,
1.3126542568206787,
0.49994760751724243,
-0.4922258257865906,
-0.9124547839164734,
-0.91436767578125,
0.9233717322349548,
1.7613495588302612,
-0.0550389364361763,
0.08757604658603668,
0.8897939920425415,
0.6280189156532288,
-1.3257595300674438,
0.10383956134319305,
-0.7288170456886292,
-0.713225245475769,
1.6534467935562134,
2.1597795486450195,
-0.09494846314191818,
-0.14231085777282715,
-0.6824080944061279,
-1.2291934490203857,
0.7972569465637207,
-0.0587044283747673,
0.24605220556259155,
0.653500497341156,
-0.6148926615715027,
1.1478290557861328,
0.7476022839546204,
1.0192625522613525,
0.1546243280172348,
0.41736724972724915,
0.3834437131881714,
-0.32378968596458435,
-1.1689823865890503,
-0.24498464167118073,
-1.0376895666122437,
-2.3736586570739746,
0.4551844596862793,
-0.20278142392635345,
-1.453934669494629,
0.055274687707424164,
-0.9943131804466248,
0.9191437363624573,
-0.5588482618331909,
-1.0155448913574219,
-1.5314055681228638,
0.22471871972084045,
-0.1283978670835495,
0.9759502410888672,
-1.5882025957107544,
-0.10182731598615646,
1.2415944337844849,
0.9398208260536194,
-0.6083660125732422,
1.012424111366272,
0.2371664196252823,
1.029041051864624,
0.8147421479225159,
-0.34809601306915283,
0.45118290185928345,
0.0776696652173996,
-1.3278305530548096,
0.45458748936653137,
1.18282949924469,
0.20360544323921204,
1.4675583839416504,
-0.5418087244033813,
-0.02210920862853527,
0.4358956813812256,
-0.5140392184257507,
-0.3912445604801178,
-0.49616292119026184,
0.6358861327171326,
0.10977264493703842,
-0.9017727971076965,
-0.04056484252214432,
-0.1292565017938614,
-0.21217043697834015,
0.21088941395282745,
-1.4881870746612549,
-0.14363154768943787,
-0.4425589144229889,
-0.5472970008850098,
-1.2637165784835815,
-0.021498484537005424,
1.3221937417984009,
-0.8001359105110168,
-0.17093586921691895,
0.4508455991744995,
0.4283106327056885,
0.5136473178863525,
0.6861628890037537,
-0.6553228497505188,
-0.35319390892982483,
-0.28387731313705444,
-0.36220937967300415,
0.2438277304172516,
1.2804688215255737,
-0.14939764142036438,
-0.9969673156738281,
0.6889585852622986,
-0.44027864933013916,
0.057434432208538055,
1.9573408365249634,
0.012958724051713943,
-0.7606021761894226,
0.28119564056396484,
-0.6688703298568726,
1.9124127626419067,
1.6977169513702393,
1.3717703819274902,
-0.14949573576450348,
-0.9031482934951782,
0.5449773073196411,
-0.2502555549144745,
-0.3834144175052643,
0.8751092553138733,
0.4637976586818695,
-0.20859390497207642,
-1.421396255493164,
0.5550941824913025,
1.2497544288635254,
-0.9683694839477539,
-0.7395042777061462,
0.11081990599632263,
-0.8282804489135742,
1.0293627977371216,
0.6836090087890625,
0.36992424726486206,
0.26908785104751587,
1.5689661502838135,
0.7004731893539429,
-0.5451866388320923,
0.5445104241371155,
0.4575534760951996,
-0.15511612594127655,
-2.078141689300537,
-1.0812846422195435,
0.37620633840560913,
-0.3842617869377136,
-1.6272484064102173,
1.3790494203567505,
-1.1759835481643677,
-0.954089343547821,
0.4749571979045868,
0.08909045904874802,
1.3248413801193237,
0.28313085436820984,
1.6675875186920166,
2.1380198001861572,
0.8889577388763428,
0.3230372369289398,
1.3227306604385376,
-0.10241440683603287,
-0.5226578712463379,
1.8781344890594482,
-0.4217684268951416,
0.5474209785461426,
1.0195096731185913,
-0.3126237988471985,
-1.0368800163269043,
-0.7591808438301086,
-1.214235544204712,
-0.6739137768745422,
1.1261687278747559,
0.09440070390701294,
-1.150238037109375,
0.2361059933900833,
1.5154801607131958,
0.12830732762813568,
-0.3078575134277344,
0.6945213079452515,
0.4524722993373871,
-0.7757728695869446,
-0.1291758120059967,
-0.8998554944992065,
0.5224765539169312,
-0.16649894416332245,
-0.35037538409233093,
0.2016814947128296,
0.4161810278892517,
1.3036112785339355,
-0.02996094338595867,
0.09607852250337601,
1.2594811916351318,
-1.4226895570755005,
1.4968372583389282,
-0.622732400894165,
0.2200821191072464,
-2.389016628265381,
1.4134540557861328,
-0.7768620252609253,
1.8140926361083984,
-2.648446798324585,
0.47881725430488586,
-0.5651214122772217,
-0.41089415550231934,
0.271945983171463,
-0.33400672674179077,
0.20586185157299042,
-0.13079440593719482,
-1.0820029973983765,
-0.04281718283891678,
-0.7370831370353699,
0.554538905620575,
1.1070448160171509,
1.3613307476043701,
-1.0747179985046387,
-0.2659805417060852,
-1.7707560062408447,
-0.1914740949869156,
-0.7019520401954651,
0.305427610874176,
-2.000716209411621,
-0.17692998051643372,
-1.9009283781051636,
-2.4330852031707764,
-1.4334346055984497,
-0.8771142959594727,
1.0758130550384521,
0.16871370375156403,
-0.9732785820960999,
1.1904462575912476,
-0.38936835527420044,
-1.8588924407958984,
1.0843660831451416,
-2.1832525730133057
] |
https://github.com/huggingface/datasets/issues/5422
|
Datasets load error for saved github issues
|
Found this when searching for the same error, looks like based on #3965 it's just an issue with the data. I found that changing `df = pd.DataFrame.from_records(all_issues)` to `df = pd.DataFrame.from_records(all_issues).dropna(axis=1, how='all').drop(['milestone'], axis=1)` from the fetch_issues function fixed the issue.
The "milestone" column seemed to be problematic (only ~50 non null rows) and dropped any columns that were all null as well just in case.
|
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
| 345 | 65 |
Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
Found this when searching for the same error, looks like based on #3965 it's just an issue with the data. I found that changing `df = pd.DataFrame.from_records(all_issues)` to `df = pd.DataFrame.from_records(all_issues).dropna(axis=1, how='all').drop(['milestone'], axis=1)` from the fetch_issues function fixed the issue.
The "milestone" column seemed to be problematic (only ~50 non null rows) and dropped any columns that were all null as well just in case.
|
[
-1.1963127851486206,
-0.9330918788909912,
-0.7827396392822266,
1.4344896078109741,
-0.1406930536031723,
-1.2193514108657837,
0.08512034267187119,
-1.1205116510391235,
1.6201714277267456,
-0.678076446056366,
0.23913109302520752,
-1.6713672876358032,
0.04052264243364334,
-0.5257079005241394,
-0.727277398109436,
-0.9132007956504822,
-0.4457392990589142,
-0.7832931876182556,
1.039745569229126,
2.553744077682495,
1.2455302476882935,
-1.3454058170318604,
2.7519757747650146,
0.7733988761901855,
-0.20083430409431458,
-0.9936761856079102,
0.5939254760742188,
0.08613280206918716,
-1.3476773500442505,
-0.39533689618110657,
-0.9301313757896423,
-0.12255214899778366,
-0.5196858644485474,
-0.5056213736534119,
0.056812629103660583,
0.37340641021728516,
-0.3209276795387268,
-0.4142794609069824,
-0.6137562394142151,
-0.7004385590553284,
0.4339582920074463,
-0.34088200330734253,
0.9217231273651123,
-0.29713279008865356,
1.7964930534362793,
-0.6220569610595703,
0.3851083815097809,
0.729198157787323,
1.2878361940383911,
0.24229711294174194,
0.057973265647888184,
0.3297666609287262,
0.4207382798194885,
-0.03582301363348961,
0.42502766847610474,
1.2176133394241333,
0.6391205191612244,
0.450739324092865,
0.757041871547699,
-2.173771619796753,
1.295736312866211,
-0.9564512372016907,
0.255735844373703,
1.3685253858566284,
-0.9302455186843872,
0.36197030544281006,
-1.7935283184051514,
-0.07607708871364594,
0.6241359710693359,
-2.245116949081421,
0.21123266220092773,
-1.3188856840133667,
-0.5523850321769714,
0.9297446608543396,
0.30967214703559875,
-1.1874884366989136,
0.21643240749835968,
-0.5421547889709473,
1.0504262447357178,
0.454480916261673,
1.19706130027771,
-1.7150973081588745,
-0.06484316289424896,
-0.28525006771087646,
0.11113414913415909,
-1.3187494277954102,
-1.551162838935852,
0.588192880153656,
0.6144393682479858,
0.6694850921630859,
-0.04125126451253891,
0.966902494430542,
-1.0298343896865845,
0.8381138443946838,
-0.9850296974182129,
-1.7487008571624756,
-1.4154644012451172,
-2.307955741882324,
-2.281989812850952,
0.7721827626228333,
-0.45548495650291443,
-0.4979220926761627,
2.044119358062744,
-1.0438038110733032,
-1.7463428974151611,
1.1161223649978638,
0.26736563444137573,
-0.03158705681562424,
2.423990249633789,
0.2970874309539795,
-0.7164976596832275,
0.44160374999046326,
-0.7417882680892944,
0.7658222913742065,
-0.3041578531265259,
1.3748550415039062,
0.41163623332977295,
-0.9854326844215393,
1.5576221942901611,
-0.40985721349716187,
0.5786521434783936,
-0.6954913139343262,
-0.5300037860870361,
-0.7964998483657837,
0.28700166940689087,
1.915679693222046,
-0.339327871799469,
1.6485669612884521,
-0.3408086895942688,
-1.6109870672225952,
-1.6204626560211182,
0.8159289360046387,
0.5080567598342896,
-0.8270281553268433,
0.07725593447685242,
-0.31959110498428345,
0.0554586797952652,
0.020173782482743263,
1.0991014242172241,
1.2852405309677124,
0.7148051261901855,
-0.3366878628730774,
-0.8891682028770447,
0.13425812125205994,
-0.0929669663310051,
-0.7834908366203308,
-1.7592542171478271,
-0.3171573579311371,
0.13886283338069916,
0.6648567914962769,
-1.3215248584747314,
1.6324161291122437,
0.8923439383506775,
1.937158226966858,
1.094266653060913,
-0.4076118767261505,
1.4866077899932861,
0.10346145927906036,
1.844605565071106,
-0.5928158760070801,
0.6599614024162292,
-0.37942323088645935,
-1.1018627882003784,
0.848377525806427,
-0.3102072775363922,
-2.0419955253601074,
-0.7289724946022034,
-0.7332409024238586,
-0.22017236053943634,
-0.7558048367500305,
0.9306036233901978,
-0.3167366683483124,
-1.4350656270980835,
0.2651248872280121,
-0.7258081436157227,
0.06321162730455399,
-1.2662270069122314,
0.25594303011894226,
0.7491654753684998,
-0.6105225086212158,
0.08293342590332031,
-0.21794427931308746,
-1.3143889904022217,
-0.4495285153388977,
0.2742244005203247,
1.9121406078338623,
-0.7619855999946594,
0.9761967658996582,
1.029388427734375,
-0.7000743746757507,
0.06098397076129913,
0.36040881276130676,
-0.3124944567680359,
0.832477867603302,
-1.1273571252822876,
-0.4143946170806885,
1.128124475479126,
-0.10615990310907364,
-0.5337290167808533,
1.449006199836731,
0.7387826442718506,
-1.0162169933319092,
-0.2722429037094116,
-0.07340437173843384,
-0.8397454023361206,
0.013042189180850983,
-1.6186368465423584,
-0.14750953018665314,
0.3195720613002777,
-1.5265581607818604,
-0.5188238620758057,
-0.23587557673454285,
1.2722288370132446,
-0.15679770708084106,
1.426255464553833,
-0.2976452112197876,
-0.20925605297088623,
-0.3629318177700043,
-0.4272013008594513,
0.12982112169265747,
-0.2955821752548218,
-0.5787747502326965,
0.2465803623199463,
-0.8128191828727722,
0.2891960144042969,
1.4270297288894653,
0.36643922328948975,
0.08220522105693817,
0.4916340112686157,
1.0717747211456299,
0.40715184807777405,
-0.08579559624195099,
-0.8550070524215698,
-1.5305615663528442,
2.0767934322357178,
-1.4803295135498047,
1.9874805212020874,
0.7874659895896912,
-0.06270987540483475,
-1.837090015411377,
-1.9160221815109253,
1.3332297801971436,
1.1375610828399658,
2.365048885345459,
0.536858081817627,
0.3778708279132843,
-0.7557786107063293,
-0.6516799926757812,
0.30063921213150024,
-1.022310733795166,
-0.7101193070411682,
0.19282743334770203,
2.41162109375,
1.7292031049728394,
-0.5000223517417908,
-0.21761947870254517,
-0.9781011343002319,
1.2888450622558594,
-0.14562338590621948,
0.17186801135540009,
1.9694486856460571,
-0.2123529613018036,
-1.0738861560821533,
1.2410682439804077,
-2.31320858001709,
0.14458169043064117,
2.0039145946502686,
0.2713751792907715,
0.056938767433166504,
-1.440623164176941,
-0.706920862197876,
-0.33053964376449585,
-0.4419773519039154,
-1.2544816732406616,
0.5561875104904175,
-0.3193601667881012,
-0.8716607093811035,
-1.5388579368591309,
0.04570101201534271,
-1.1587820053100586,
-1.6809145212173462,
0.2760401666164398,
1.8663477897644043,
2.0036044120788574,
-0.7078672051429749,
1.5244148969650269,
-0.30079197883605957,
0.04774286597967148,
1.1742888689041138,
1.2000761032104492,
3.0962295532226562,
1.938481330871582,
-1.2274078130722046,
0.7331267595291138,
-0.07230769097805023,
-0.4143533706665039,
1.134238600730896,
-1.1557343006134033,
1.2847211360931396,
-0.19102057814598083,
-1.2634555101394653,
-1.216794729232788,
0.973508358001709,
0.4321473240852356,
0.020546095445752144,
-0.5253702402114868,
1.286665916442871,
0.05392900109291077,
1.2890185117721558,
0.507666289806366,
-0.3173224627971649,
0.6042106747627258,
-0.39194345474243164,
-0.5215069651603699,
1.5957621335983276,
0.2052343189716339,
-1.469826102256775,
-2.3757636547088623,
-0.24454395473003387,
-0.7881750464439392,
0.013736948370933533,
-0.6333320140838623,
-1.0771079063415527,
1.7019076347351074,
0.4244462847709656,
-1.269282341003418,
-0.27322813868522644,
-0.3460020422935486,
-0.5907617211341858,
2.6833982467651367,
-1.453320860862732,
-0.15855789184570312,
-0.9716829657554626,
-0.6088515520095825,
1.6095260381698608,
-1.154006838798523,
-0.1739647090435028,
-1.0810348987579346,
-0.6062009334564209,
-1.326407790184021,
-0.5326869487762451,
-0.01344145368784666,
-0.9324941039085388,
0.8292308449745178,
0.1626618206501007,
-1.1210941076278687,
-0.23822923004627228,
-0.9171645641326904,
0.9046302437782288,
-0.0838211178779602,
0.23791545629501343,
1.9768925905227661,
0.43833425641059875,
-0.44886937737464905,
0.7102206349372864,
1.166123390197754,
0.6438978314399719,
-0.7097073197364807,
0.1131429374217987,
-0.6844974756240845,
0.310308039188385,
-1.3895772695541382,
0.22427064180374146,
-2.811593770980835,
0.640626847743988,
-0.04645863175392151,
-0.040787190198898315,
0.07167043536901474,
-1.2166941165924072,
1.1459711790084839,
2.621478319168091,
-1.1727783679962158,
0.5020530223846436,
0.3111254572868347,
1.2175666093826294,
-1.5507006645202637,
0.3621058762073517,
-0.39761078357696533,
2.0387344360351562,
0.2084735631942749,
1.1543138027191162,
-0.4992736577987671,
-2.207833766937256,
0.6288199424743652,
-1.2517876625061035,
-1.1475540399551392,
0.7885823845863342,
-0.904139518737793,
0.1614477038383484,
-1.4632511138916016,
-0.21872097253799438,
-0.9255772233009338,
-1.2445237636566162,
0.6861385703086853,
0.1768537312746048,
0.47469884157180786,
-0.5877225399017334,
0.34416988492012024,
-2.228614330291748,
-1.4119014739990234,
-0.21444277465343475,
-0.96769779920578,
0.48499494791030884,
-0.35161304473876953,
0.7279738187789917,
-0.16283485293388367,
0.011251399293541908,
0.33372485637664795,
1.3284690380096436,
3.3884716033935547,
0.16477859020233154,
0.2662009000778198,
-0.16338518261909485,
-0.9789815545082092,
1.3782726526260376,
0.9500302076339722,
-0.1518038660287857,
-0.6200442910194397,
-1.0090172290802002,
1.195512056350708,
1.9968571662902832,
1.0841997861862183,
0.028796086087822914,
-0.8424066305160522,
-0.7619249820709229,
0.10847461968660355,
0.2030474692583084,
0.5025843977928162,
0.9644692540168762,
-0.015782369300723076,
0.10423669964075089,
1.5587739944458008,
1.1590287685394287,
-0.38505035638809204,
0.3543919026851654,
-0.8596413731575012,
-0.5059113502502441,
0.5035489797592163,
0.32873427867889404,
0.04433334618806839,
0.3928411602973938,
-1.0785441398620605,
-0.2415911853313446,
-0.3991551697254181,
-0.9554749131202698,
-0.6814478039741516,
-0.40840059518814087,
-0.3611240088939667,
1.6480767726898193,
0.08925497531890869,
-0.4392836391925812,
-0.052923232316970825,
-0.7513001561164856,
-0.13525046408176422,
-1.0671086311340332,
0.3492223024368286,
-0.1277753859758377,
-0.06633542478084564,
-0.044250890612602234,
1.8521422147750854,
-0.9597856998443604,
-2.0492308139801025,
0.24221014976501465,
0.19811856746673584,
-0.36822932958602905,
0.2508501410484314,
1.6301287412643433,
0.5860109329223633,
1.3771642446517944,
1.302361249923706,
0.8865513205528259,
-0.6728057265281677,
-1.3171508312225342,
0.5690463781356812,
0.9960952997207642,
-1.372933268547058,
0.8567798733711243,
-0.07907261699438095,
-0.5154211521148682,
0.640878438949585,
1.4022198915481567,
0.4087699055671692,
-1.977128505706787,
0.8217830657958984,
-0.8632746934890747,
0.7984637022018433,
0.7374486923217773,
0.7030637264251709,
0.1878148913383484,
0.8007134795188904,
-1.259303092956543,
-1.1727243661880493,
-0.7780727744102478,
-0.5701571106910706,
1.9143239259719849,
-0.17315073311328888,
0.5446757674217224,
-0.23889106512069702,
-1.2521140575408936,
-0.07159698754549026,
0.6783280968666077,
0.36219125986099243,
-0.4313208758831024,
0.8215733766555786,
-0.5616418719291687,
-1.1378437280654907,
-1.3038685321807861,
-0.47228682041168213,
-0.979748547077179,
-0.8929241299629211,
1.0335257053375244,
0.7858556509017944,
0.3435481786727905,
1.9235994815826416,
0.5727387070655823,
0.2423691749572754,
-2.6645636558532715,
0.8837393522262573,
0.29447701573371887,
-0.06510625779628754,
0.9561201333999634,
0.313191294670105,
1.0323139429092407,
-0.031632546335458755,
0.53092360496521,
-2.3716607093811035,
2.251124382019043,
-0.25484782457351685,
0.7168163061141968,
-0.005324467550963163,
-0.13502256572246552,
1.0963242053985596,
0.5611977577209473,
0.5584143400192261,
-1.0355812311172485,
0.6607334613800049,
-0.5494239926338196,
1.1584876775741577,
0.9638675451278687,
-0.7577407360076904,
0.04937499761581421,
1.3126542568206787,
0.49994760751724243,
-0.4922258257865906,
-0.9124547839164734,
-0.91436767578125,
0.9233717322349548,
1.7613495588302612,
-0.0550389364361763,
0.08757604658603668,
0.8897939920425415,
0.6280189156532288,
-1.3257595300674438,
0.10383956134319305,
-0.7288170456886292,
-0.713225245475769,
1.6534467935562134,
2.1597795486450195,
-0.09494846314191818,
-0.14231085777282715,
-0.6824080944061279,
-1.2291934490203857,
0.7972569465637207,
-0.0587044283747673,
0.24605220556259155,
0.653500497341156,
-0.6148926615715027,
1.1478290557861328,
0.7476022839546204,
1.0192625522613525,
0.1546243280172348,
0.41736724972724915,
0.3834437131881714,
-0.32378968596458435,
-1.1689823865890503,
-0.24498464167118073,
-1.0376895666122437,
-2.3736586570739746,
0.4551844596862793,
-0.20278142392635345,
-1.453934669494629,
0.055274687707424164,
-0.9943131804466248,
0.9191437363624573,
-0.5588482618331909,
-1.0155448913574219,
-1.5314055681228638,
0.22471871972084045,
-0.1283978670835495,
0.9759502410888672,
-1.5882025957107544,
-0.10182731598615646,
1.2415944337844849,
0.9398208260536194,
-0.6083660125732422,
1.012424111366272,
0.2371664196252823,
1.029041051864624,
0.8147421479225159,
-0.34809601306915283,
0.45118290185928345,
0.0776696652173996,
-1.3278305530548096,
0.45458748936653137,
1.18282949924469,
0.20360544323921204,
1.4675583839416504,
-0.5418087244033813,
-0.02210920862853527,
0.4358956813812256,
-0.5140392184257507,
-0.3912445604801178,
-0.49616292119026184,
0.6358861327171326,
0.10977264493703842,
-0.9017727971076965,
-0.04056484252214432,
-0.1292565017938614,
-0.21217043697834015,
0.21088941395282745,
-1.4881870746612549,
-0.14363154768943787,
-0.4425589144229889,
-0.5472970008850098,
-1.2637165784835815,
-0.021498484537005424,
1.3221937417984009,
-0.8001359105110168,
-0.17093586921691895,
0.4508455991744995,
0.4283106327056885,
0.5136473178863525,
0.6861628890037537,
-0.6553228497505188,
-0.35319390892982483,
-0.28387731313705444,
-0.36220937967300415,
0.2438277304172516,
1.2804688215255737,
-0.14939764142036438,
-0.9969673156738281,
0.6889585852622986,
-0.44027864933013916,
0.057434432208538055,
1.9573408365249634,
0.012958724051713943,
-0.7606021761894226,
0.28119564056396484,
-0.6688703298568726,
1.9124127626419067,
1.6977169513702393,
1.3717703819274902,
-0.14949573576450348,
-0.9031482934951782,
0.5449773073196411,
-0.2502555549144745,
-0.3834144175052643,
0.8751092553138733,
0.4637976586818695,
-0.20859390497207642,
-1.421396255493164,
0.5550941824913025,
1.2497544288635254,
-0.9683694839477539,
-0.7395042777061462,
0.11081990599632263,
-0.8282804489135742,
1.0293627977371216,
0.6836090087890625,
0.36992424726486206,
0.26908785104751587,
1.5689661502838135,
0.7004731893539429,
-0.5451866388320923,
0.5445104241371155,
0.4575534760951996,
-0.15511612594127655,
-2.078141689300537,
-1.0812846422195435,
0.37620633840560913,
-0.3842617869377136,
-1.6272484064102173,
1.3790494203567505,
-1.1759835481643677,
-0.954089343547821,
0.4749571979045868,
0.08909045904874802,
1.3248413801193237,
0.28313085436820984,
1.6675875186920166,
2.1380198001861572,
0.8889577388763428,
0.3230372369289398,
1.3227306604385376,
-0.10241440683603287,
-0.5226578712463379,
1.8781344890594482,
-0.4217684268951416,
0.5474209785461426,
1.0195096731185913,
-0.3126237988471985,
-1.0368800163269043,
-0.7591808438301086,
-1.214235544204712,
-0.6739137768745422,
1.1261687278747559,
0.09440070390701294,
-1.150238037109375,
0.2361059933900833,
1.5154801607131958,
0.12830732762813568,
-0.3078575134277344,
0.6945213079452515,
0.4524722993373871,
-0.7757728695869446,
-0.1291758120059967,
-0.8998554944992065,
0.5224765539169312,
-0.16649894416332245,
-0.35037538409233093,
0.2016814947128296,
0.4161810278892517,
1.3036112785339355,
-0.02996094338595867,
0.09607852250337601,
1.2594811916351318,
-1.4226895570755005,
1.4968372583389282,
-0.622732400894165,
0.2200821191072464,
-2.389016628265381,
1.4134540557861328,
-0.7768620252609253,
1.8140926361083984,
-2.648446798324585,
0.47881725430488586,
-0.5651214122772217,
-0.41089415550231934,
0.271945983171463,
-0.33400672674179077,
0.20586185157299042,
-0.13079440593719482,
-1.0820029973983765,
-0.04281718283891678,
-0.7370831370353699,
0.554538905620575,
1.1070448160171509,
1.3613307476043701,
-1.0747179985046387,
-0.2659805417060852,
-1.7707560062408447,
-0.1914740949869156,
-0.7019520401954651,
0.305427610874176,
-2.000716209411621,
-0.17692998051643372,
-1.9009283781051636,
-2.4330852031707764,
-1.4334346055984497,
-0.8771142959594727,
1.0758130550384521,
0.16871370375156403,
-0.9732785820960999,
1.1904462575912476,
-0.38936835527420044,
-1.8588924407958984,
1.0843660831451416,
-2.1832525730133057
] |
https://github.com/huggingface/datasets/issues/5422
|
Datasets load error for saved github issues
|
I have this same issue. I saved a dataset to disk and now I can't load it.
|
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
| 345 | 17 |
Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
I have this same issue. I saved a dataset to disk and now I can't load it.
|
[
-1.1963127851486206,
-0.9330918788909912,
-0.7827396392822266,
1.4344896078109741,
-0.1406930536031723,
-1.2193514108657837,
0.08512034267187119,
-1.1205116510391235,
1.6201714277267456,
-0.678076446056366,
0.23913109302520752,
-1.6713672876358032,
0.04052264243364334,
-0.5257079005241394,
-0.727277398109436,
-0.9132007956504822,
-0.4457392990589142,
-0.7832931876182556,
1.039745569229126,
2.553744077682495,
1.2455302476882935,
-1.3454058170318604,
2.7519757747650146,
0.7733988761901855,
-0.20083430409431458,
-0.9936761856079102,
0.5939254760742188,
0.08613280206918716,
-1.3476773500442505,
-0.39533689618110657,
-0.9301313757896423,
-0.12255214899778366,
-0.5196858644485474,
-0.5056213736534119,
0.056812629103660583,
0.37340641021728516,
-0.3209276795387268,
-0.4142794609069824,
-0.6137562394142151,
-0.7004385590553284,
0.4339582920074463,
-0.34088200330734253,
0.9217231273651123,
-0.29713279008865356,
1.7964930534362793,
-0.6220569610595703,
0.3851083815097809,
0.729198157787323,
1.2878361940383911,
0.24229711294174194,
0.057973265647888184,
0.3297666609287262,
0.4207382798194885,
-0.03582301363348961,
0.42502766847610474,
1.2176133394241333,
0.6391205191612244,
0.450739324092865,
0.757041871547699,
-2.173771619796753,
1.295736312866211,
-0.9564512372016907,
0.255735844373703,
1.3685253858566284,
-0.9302455186843872,
0.36197030544281006,
-1.7935283184051514,
-0.07607708871364594,
0.6241359710693359,
-2.245116949081421,
0.21123266220092773,
-1.3188856840133667,
-0.5523850321769714,
0.9297446608543396,
0.30967214703559875,
-1.1874884366989136,
0.21643240749835968,
-0.5421547889709473,
1.0504262447357178,
0.454480916261673,
1.19706130027771,
-1.7150973081588745,
-0.06484316289424896,
-0.28525006771087646,
0.11113414913415909,
-1.3187494277954102,
-1.551162838935852,
0.588192880153656,
0.6144393682479858,
0.6694850921630859,
-0.04125126451253891,
0.966902494430542,
-1.0298343896865845,
0.8381138443946838,
-0.9850296974182129,
-1.7487008571624756,
-1.4154644012451172,
-2.307955741882324,
-2.281989812850952,
0.7721827626228333,
-0.45548495650291443,
-0.4979220926761627,
2.044119358062744,
-1.0438038110733032,
-1.7463428974151611,
1.1161223649978638,
0.26736563444137573,
-0.03158705681562424,
2.423990249633789,
0.2970874309539795,
-0.7164976596832275,
0.44160374999046326,
-0.7417882680892944,
0.7658222913742065,
-0.3041578531265259,
1.3748550415039062,
0.41163623332977295,
-0.9854326844215393,
1.5576221942901611,
-0.40985721349716187,
0.5786521434783936,
-0.6954913139343262,
-0.5300037860870361,
-0.7964998483657837,
0.28700166940689087,
1.915679693222046,
-0.339327871799469,
1.6485669612884521,
-0.3408086895942688,
-1.6109870672225952,
-1.6204626560211182,
0.8159289360046387,
0.5080567598342896,
-0.8270281553268433,
0.07725593447685242,
-0.31959110498428345,
0.0554586797952652,
0.020173782482743263,
1.0991014242172241,
1.2852405309677124,
0.7148051261901855,
-0.3366878628730774,
-0.8891682028770447,
0.13425812125205994,
-0.0929669663310051,
-0.7834908366203308,
-1.7592542171478271,
-0.3171573579311371,
0.13886283338069916,
0.6648567914962769,
-1.3215248584747314,
1.6324161291122437,
0.8923439383506775,
1.937158226966858,
1.094266653060913,
-0.4076118767261505,
1.4866077899932861,
0.10346145927906036,
1.844605565071106,
-0.5928158760070801,
0.6599614024162292,
-0.37942323088645935,
-1.1018627882003784,
0.848377525806427,
-0.3102072775363922,
-2.0419955253601074,
-0.7289724946022034,
-0.7332409024238586,
-0.22017236053943634,
-0.7558048367500305,
0.9306036233901978,
-0.3167366683483124,
-1.4350656270980835,
0.2651248872280121,
-0.7258081436157227,
0.06321162730455399,
-1.2662270069122314,
0.25594303011894226,
0.7491654753684998,
-0.6105225086212158,
0.08293342590332031,
-0.21794427931308746,
-1.3143889904022217,
-0.4495285153388977,
0.2742244005203247,
1.9121406078338623,
-0.7619855999946594,
0.9761967658996582,
1.029388427734375,
-0.7000743746757507,
0.06098397076129913,
0.36040881276130676,
-0.3124944567680359,
0.832477867603302,
-1.1273571252822876,
-0.4143946170806885,
1.128124475479126,
-0.10615990310907364,
-0.5337290167808533,
1.449006199836731,
0.7387826442718506,
-1.0162169933319092,
-0.2722429037094116,
-0.07340437173843384,
-0.8397454023361206,
0.013042189180850983,
-1.6186368465423584,
-0.14750953018665314,
0.3195720613002777,
-1.5265581607818604,
-0.5188238620758057,
-0.23587557673454285,
1.2722288370132446,
-0.15679770708084106,
1.426255464553833,
-0.2976452112197876,
-0.20925605297088623,
-0.3629318177700043,
-0.4272013008594513,
0.12982112169265747,
-0.2955821752548218,
-0.5787747502326965,
0.2465803623199463,
-0.8128191828727722,
0.2891960144042969,
1.4270297288894653,
0.36643922328948975,
0.08220522105693817,
0.4916340112686157,
1.0717747211456299,
0.40715184807777405,
-0.08579559624195099,
-0.8550070524215698,
-1.5305615663528442,
2.0767934322357178,
-1.4803295135498047,
1.9874805212020874,
0.7874659895896912,
-0.06270987540483475,
-1.837090015411377,
-1.9160221815109253,
1.3332297801971436,
1.1375610828399658,
2.365048885345459,
0.536858081817627,
0.3778708279132843,
-0.7557786107063293,
-0.6516799926757812,
0.30063921213150024,
-1.022310733795166,
-0.7101193070411682,
0.19282743334770203,
2.41162109375,
1.7292031049728394,
-0.5000223517417908,
-0.21761947870254517,
-0.9781011343002319,
1.2888450622558594,
-0.14562338590621948,
0.17186801135540009,
1.9694486856460571,
-0.2123529613018036,
-1.0738861560821533,
1.2410682439804077,
-2.31320858001709,
0.14458169043064117,
2.0039145946502686,
0.2713751792907715,
0.056938767433166504,
-1.440623164176941,
-0.706920862197876,
-0.33053964376449585,
-0.4419773519039154,
-1.2544816732406616,
0.5561875104904175,
-0.3193601667881012,
-0.8716607093811035,
-1.5388579368591309,
0.04570101201534271,
-1.1587820053100586,
-1.6809145212173462,
0.2760401666164398,
1.8663477897644043,
2.0036044120788574,
-0.7078672051429749,
1.5244148969650269,
-0.30079197883605957,
0.04774286597967148,
1.1742888689041138,
1.2000761032104492,
3.0962295532226562,
1.938481330871582,
-1.2274078130722046,
0.7331267595291138,
-0.07230769097805023,
-0.4143533706665039,
1.134238600730896,
-1.1557343006134033,
1.2847211360931396,
-0.19102057814598083,
-1.2634555101394653,
-1.216794729232788,
0.973508358001709,
0.4321473240852356,
0.020546095445752144,
-0.5253702402114868,
1.286665916442871,
0.05392900109291077,
1.2890185117721558,
0.507666289806366,
-0.3173224627971649,
0.6042106747627258,
-0.39194345474243164,
-0.5215069651603699,
1.5957621335983276,
0.2052343189716339,
-1.469826102256775,
-2.3757636547088623,
-0.24454395473003387,
-0.7881750464439392,
0.013736948370933533,
-0.6333320140838623,
-1.0771079063415527,
1.7019076347351074,
0.4244462847709656,
-1.269282341003418,
-0.27322813868522644,
-0.3460020422935486,
-0.5907617211341858,
2.6833982467651367,
-1.453320860862732,
-0.15855789184570312,
-0.9716829657554626,
-0.6088515520095825,
1.6095260381698608,
-1.154006838798523,
-0.1739647090435028,
-1.0810348987579346,
-0.6062009334564209,
-1.326407790184021,
-0.5326869487762451,
-0.01344145368784666,
-0.9324941039085388,
0.8292308449745178,
0.1626618206501007,
-1.1210941076278687,
-0.23822923004627228,
-0.9171645641326904,
0.9046302437782288,
-0.0838211178779602,
0.23791545629501343,
1.9768925905227661,
0.43833425641059875,
-0.44886937737464905,
0.7102206349372864,
1.166123390197754,
0.6438978314399719,
-0.7097073197364807,
0.1131429374217987,
-0.6844974756240845,
0.310308039188385,
-1.3895772695541382,
0.22427064180374146,
-2.811593770980835,
0.640626847743988,
-0.04645863175392151,
-0.040787190198898315,
0.07167043536901474,
-1.2166941165924072,
1.1459711790084839,
2.621478319168091,
-1.1727783679962158,
0.5020530223846436,
0.3111254572868347,
1.2175666093826294,
-1.5507006645202637,
0.3621058762073517,
-0.39761078357696533,
2.0387344360351562,
0.2084735631942749,
1.1543138027191162,
-0.4992736577987671,
-2.207833766937256,
0.6288199424743652,
-1.2517876625061035,
-1.1475540399551392,
0.7885823845863342,
-0.904139518737793,
0.1614477038383484,
-1.4632511138916016,
-0.21872097253799438,
-0.9255772233009338,
-1.2445237636566162,
0.6861385703086853,
0.1768537312746048,
0.47469884157180786,
-0.5877225399017334,
0.34416988492012024,
-2.228614330291748,
-1.4119014739990234,
-0.21444277465343475,
-0.96769779920578,
0.48499494791030884,
-0.35161304473876953,
0.7279738187789917,
-0.16283485293388367,
0.011251399293541908,
0.33372485637664795,
1.3284690380096436,
3.3884716033935547,
0.16477859020233154,
0.2662009000778198,
-0.16338518261909485,
-0.9789815545082092,
1.3782726526260376,
0.9500302076339722,
-0.1518038660287857,
-0.6200442910194397,
-1.0090172290802002,
1.195512056350708,
1.9968571662902832,
1.0841997861862183,
0.028796086087822914,
-0.8424066305160522,
-0.7619249820709229,
0.10847461968660355,
0.2030474692583084,
0.5025843977928162,
0.9644692540168762,
-0.015782369300723076,
0.10423669964075089,
1.5587739944458008,
1.1590287685394287,
-0.38505035638809204,
0.3543919026851654,
-0.8596413731575012,
-0.5059113502502441,
0.5035489797592163,
0.32873427867889404,
0.04433334618806839,
0.3928411602973938,
-1.0785441398620605,
-0.2415911853313446,
-0.3991551697254181,
-0.9554749131202698,
-0.6814478039741516,
-0.40840059518814087,
-0.3611240088939667,
1.6480767726898193,
0.08925497531890869,
-0.4392836391925812,
-0.052923232316970825,
-0.7513001561164856,
-0.13525046408176422,
-1.0671086311340332,
0.3492223024368286,
-0.1277753859758377,
-0.06633542478084564,
-0.044250890612602234,
1.8521422147750854,
-0.9597856998443604,
-2.0492308139801025,
0.24221014976501465,
0.19811856746673584,
-0.36822932958602905,
0.2508501410484314,
1.6301287412643433,
0.5860109329223633,
1.3771642446517944,
1.302361249923706,
0.8865513205528259,
-0.6728057265281677,
-1.3171508312225342,
0.5690463781356812,
0.9960952997207642,
-1.372933268547058,
0.8567798733711243,
-0.07907261699438095,
-0.5154211521148682,
0.640878438949585,
1.4022198915481567,
0.4087699055671692,
-1.977128505706787,
0.8217830657958984,
-0.8632746934890747,
0.7984637022018433,
0.7374486923217773,
0.7030637264251709,
0.1878148913383484,
0.8007134795188904,
-1.259303092956543,
-1.1727243661880493,
-0.7780727744102478,
-0.5701571106910706,
1.9143239259719849,
-0.17315073311328888,
0.5446757674217224,
-0.23889106512069702,
-1.2521140575408936,
-0.07159698754549026,
0.6783280968666077,
0.36219125986099243,
-0.4313208758831024,
0.8215733766555786,
-0.5616418719291687,
-1.1378437280654907,
-1.3038685321807861,
-0.47228682041168213,
-0.979748547077179,
-0.8929241299629211,
1.0335257053375244,
0.7858556509017944,
0.3435481786727905,
1.9235994815826416,
0.5727387070655823,
0.2423691749572754,
-2.6645636558532715,
0.8837393522262573,
0.29447701573371887,
-0.06510625779628754,
0.9561201333999634,
0.313191294670105,
1.0323139429092407,
-0.031632546335458755,
0.53092360496521,
-2.3716607093811035,
2.251124382019043,
-0.25484782457351685,
0.7168163061141968,
-0.005324467550963163,
-0.13502256572246552,
1.0963242053985596,
0.5611977577209473,
0.5584143400192261,
-1.0355812311172485,
0.6607334613800049,
-0.5494239926338196,
1.1584876775741577,
0.9638675451278687,
-0.7577407360076904,
0.04937499761581421,
1.3126542568206787,
0.49994760751724243,
-0.4922258257865906,
-0.9124547839164734,
-0.91436767578125,
0.9233717322349548,
1.7613495588302612,
-0.0550389364361763,
0.08757604658603668,
0.8897939920425415,
0.6280189156532288,
-1.3257595300674438,
0.10383956134319305,
-0.7288170456886292,
-0.713225245475769,
1.6534467935562134,
2.1597795486450195,
-0.09494846314191818,
-0.14231085777282715,
-0.6824080944061279,
-1.2291934490203857,
0.7972569465637207,
-0.0587044283747673,
0.24605220556259155,
0.653500497341156,
-0.6148926615715027,
1.1478290557861328,
0.7476022839546204,
1.0192625522613525,
0.1546243280172348,
0.41736724972724915,
0.3834437131881714,
-0.32378968596458435,
-1.1689823865890503,
-0.24498464167118073,
-1.0376895666122437,
-2.3736586570739746,
0.4551844596862793,
-0.20278142392635345,
-1.453934669494629,
0.055274687707424164,
-0.9943131804466248,
0.9191437363624573,
-0.5588482618331909,
-1.0155448913574219,
-1.5314055681228638,
0.22471871972084045,
-0.1283978670835495,
0.9759502410888672,
-1.5882025957107544,
-0.10182731598615646,
1.2415944337844849,
0.9398208260536194,
-0.6083660125732422,
1.012424111366272,
0.2371664196252823,
1.029041051864624,
0.8147421479225159,
-0.34809601306915283,
0.45118290185928345,
0.0776696652173996,
-1.3278305530548096,
0.45458748936653137,
1.18282949924469,
0.20360544323921204,
1.4675583839416504,
-0.5418087244033813,
-0.02210920862853527,
0.4358956813812256,
-0.5140392184257507,
-0.3912445604801178,
-0.49616292119026184,
0.6358861327171326,
0.10977264493703842,
-0.9017727971076965,
-0.04056484252214432,
-0.1292565017938614,
-0.21217043697834015,
0.21088941395282745,
-1.4881870746612549,
-0.14363154768943787,
-0.4425589144229889,
-0.5472970008850098,
-1.2637165784835815,
-0.021498484537005424,
1.3221937417984009,
-0.8001359105110168,
-0.17093586921691895,
0.4508455991744995,
0.4283106327056885,
0.5136473178863525,
0.6861628890037537,
-0.6553228497505188,
-0.35319390892982483,
-0.28387731313705444,
-0.36220937967300415,
0.2438277304172516,
1.2804688215255737,
-0.14939764142036438,
-0.9969673156738281,
0.6889585852622986,
-0.44027864933013916,
0.057434432208538055,
1.9573408365249634,
0.012958724051713943,
-0.7606021761894226,
0.28119564056396484,
-0.6688703298568726,
1.9124127626419067,
1.6977169513702393,
1.3717703819274902,
-0.14949573576450348,
-0.9031482934951782,
0.5449773073196411,
-0.2502555549144745,
-0.3834144175052643,
0.8751092553138733,
0.4637976586818695,
-0.20859390497207642,
-1.421396255493164,
0.5550941824913025,
1.2497544288635254,
-0.9683694839477539,
-0.7395042777061462,
0.11081990599632263,
-0.8282804489135742,
1.0293627977371216,
0.6836090087890625,
0.36992424726486206,
0.26908785104751587,
1.5689661502838135,
0.7004731893539429,
-0.5451866388320923,
0.5445104241371155,
0.4575534760951996,
-0.15511612594127655,
-2.078141689300537,
-1.0812846422195435,
0.37620633840560913,
-0.3842617869377136,
-1.6272484064102173,
1.3790494203567505,
-1.1759835481643677,
-0.954089343547821,
0.4749571979045868,
0.08909045904874802,
1.3248413801193237,
0.28313085436820984,
1.6675875186920166,
2.1380198001861572,
0.8889577388763428,
0.3230372369289398,
1.3227306604385376,
-0.10241440683603287,
-0.5226578712463379,
1.8781344890594482,
-0.4217684268951416,
0.5474209785461426,
1.0195096731185913,
-0.3126237988471985,
-1.0368800163269043,
-0.7591808438301086,
-1.214235544204712,
-0.6739137768745422,
1.1261687278747559,
0.09440070390701294,
-1.150238037109375,
0.2361059933900833,
1.5154801607131958,
0.12830732762813568,
-0.3078575134277344,
0.6945213079452515,
0.4524722993373871,
-0.7757728695869446,
-0.1291758120059967,
-0.8998554944992065,
0.5224765539169312,
-0.16649894416332245,
-0.35037538409233093,
0.2016814947128296,
0.4161810278892517,
1.3036112785339355,
-0.02996094338595867,
0.09607852250337601,
1.2594811916351318,
-1.4226895570755005,
1.4968372583389282,
-0.622732400894165,
0.2200821191072464,
-2.389016628265381,
1.4134540557861328,
-0.7768620252609253,
1.8140926361083984,
-2.648446798324585,
0.47881725430488586,
-0.5651214122772217,
-0.41089415550231934,
0.271945983171463,
-0.33400672674179077,
0.20586185157299042,
-0.13079440593719482,
-1.0820029973983765,
-0.04281718283891678,
-0.7370831370353699,
0.554538905620575,
1.1070448160171509,
1.3613307476043701,
-1.0747179985046387,
-0.2659805417060852,
-1.7707560062408447,
-0.1914740949869156,
-0.7019520401954651,
0.305427610874176,
-2.000716209411621,
-0.17692998051643372,
-1.9009283781051636,
-2.4330852031707764,
-1.4334346055984497,
-0.8771142959594727,
1.0758130550384521,
0.16871370375156403,
-0.9732785820960999,
1.1904462575912476,
-0.38936835527420044,
-1.8588924407958984,
1.0843660831451416,
-2.1832525730133057
] |
https://github.com/huggingface/datasets/issues/5421
|
Support case-insensitive Hub dataset name in load_dataset
|
Closing as case-insensitivity should be only for URL redirection on the Hub. In the APIs, we will only support the canonical name (https://github.com/huggingface/moon-landing/pull/2399#issuecomment-1382085611)
|
### Feature request
The dataset name on the Hub is case-insensitive (see https://github.com/huggingface/moon-landing/pull/2399, internal issue), i.e., https://huggingface.co/datasets/GLUE redirects to https://huggingface.co/datasets/glue.
Ideally, we could load the glue dataset using the following:
```
from datasets import load_dataset
load_dataset('GLUE', 'cola')
```
It breaks because the loading script `GLUE.py` does not exist (`glue.py` should be selected instead).
Minor additional comment: in other cases without a loading script, we can load the dataset, but the automatically generated config name depends on the casing:
- `load_dataset('severo/danish-wit')` generates the config name `severo--danish-wit-e6fda5b070deb133`, while
- `load_dataset('severo/danish-WIT')` generates the config name `severo--danish-WIT-e6fda5b070deb133`
### Motivation
To follow the same UX on the Hub and in the datasets library.
### Your contribution
...
| 346 | 23 |
Support case-insensitive Hub dataset name in load_dataset
### Feature request
The dataset name on the Hub is case-insensitive (see https://github.com/huggingface/moon-landing/pull/2399, internal issue), i.e., https://huggingface.co/datasets/GLUE redirects to https://huggingface.co/datasets/glue.
Ideally, we could load the glue dataset using the following:
```
from datasets import load_dataset
load_dataset('GLUE', 'cola')
```
It breaks because the loading script `GLUE.py` does not exist (`glue.py` should be selected instead).
Minor additional comment: in other cases without a loading script, we can load the dataset, but the automatically generated config name depends on the casing:
- `load_dataset('severo/danish-wit')` generates the config name `severo--danish-wit-e6fda5b070deb133`, while
- `load_dataset('severo/danish-WIT')` generates the config name `severo--danish-WIT-e6fda5b070deb133`
### Motivation
To follow the same UX on the Hub and in the datasets library.
### Your contribution
...
Closing as case-insensitivity should be only for URL redirection on the Hub. In the APIs, we will only support the canonical name (https://github.com/huggingface/moon-landing/pull/2399#issuecomment-1382085611)
|
[
-1.1574761867523193,
-0.9057379961013794,
-0.8160881400108337,
1.4558465480804443,
-0.07727113366127014,
-1.312180995941162,
0.1407918632030487,
-0.9606278538703918,
1.6307440996170044,
-0.7902531027793884,
0.37747347354888916,
-1.7550194263458252,
0.008631757460534573,
-0.6654250621795654,
-0.7284687757492065,
-0.831890344619751,
-0.41848790645599365,
-0.7834197282791138,
0.9992997646331787,
2.4241414070129395,
1.244997501373291,
-1.3619277477264404,
2.709394931793213,
0.6511090993881226,
-0.18516215682029724,
-1.0294034481048584,
0.48295849561691284,
-0.020592615008354187,
-1.3130134344100952,
-0.4588215947151184,
-0.9550095796585083,
-0.056217752397060394,
-0.6733643412590027,
-0.595222532749176,
0.1191357746720314,
0.43058204650878906,
-0.30064427852630615,
-0.34184956550598145,
-0.4814002811908722,
-0.756310760974884,
0.4413054585456848,
-0.3422645032405853,
0.9218285083770752,
-0.3188740313053131,
1.823315978050232,
-0.5510888695716858,
0.3927217125892639,
0.6844841241836548,
1.3692413568496704,
0.22525852918624878,
-0.05450531840324402,
0.30556511878967285,
0.28879255056381226,
0.07398636639118195,
0.49244093894958496,
1.239169955253601,
0.6533587574958801,
0.5002222657203674,
0.6768640279769897,
-2.202118396759033,
1.3215336799621582,
-0.9133732318878174,
0.2695121467113495,
1.3976049423217773,
-0.9947474002838135,
0.3459944427013397,
-1.846219539642334,
-0.05666647478938103,
0.44129571318626404,
-2.2882697582244873,
0.21504610776901245,
-1.331302523612976,
-0.43243300914764404,
0.9859868288040161,
0.3285238444805145,
-1.2989847660064697,
0.1449422538280487,
-0.41026735305786133,
1.016087293624878,
0.458205908536911,
1.2047158479690552,
-1.7452472448349,
-0.04463519901037216,
-0.28061968088150024,
0.1315985471010208,
-1.195548415184021,
-1.639886736869812,
0.45703551173210144,
0.6576946973800659,
0.6487246751785278,
-0.16910703480243683,
0.9226195812225342,
-0.9957284331321716,
0.7488725781440735,
-0.9576180577278137,
-1.7286893129348755,
-1.3885592222213745,
-2.2602999210357666,
-2.4054229259490967,
0.8033104538917542,
-0.5116558074951172,
-0.47108936309814453,
2.0259530544281006,
-1.0086630582809448,
-1.8574497699737549,
1.0903973579406738,
0.356431782245636,
0.011386658065021038,
2.3599886894226074,
0.21083964407444,
-0.780184805393219,
0.48183009028434753,
-0.7531412839889526,
0.7742982506752014,
-0.33980002999305725,
1.3843340873718262,
0.5149589776992798,
-1.0443801879882812,
1.6179022789001465,
-0.5198136568069458,
0.5022487044334412,
-0.7216283679008484,
-0.4010377526283264,
-0.7217700481414795,
0.27913033962249756,
1.9542529582977295,
-0.3381037712097168,
1.634445071220398,
-0.30545511841773987,
-1.6087347269058228,
-1.4483544826507568,
0.7990593910217285,
0.47804388403892517,
-0.8194653987884521,
0.11167928576469421,
-0.3443508446216583,
0.1287555694580078,
0.008393890224397182,
1.1143264770507812,
1.1797819137573242,
0.7005306482315063,
-0.38248300552368164,
-0.8915549516677856,
0.213822141289711,
-0.0775383934378624,
-0.6790806651115417,
-1.7254390716552734,
-0.30879172682762146,
0.22547011077404022,
0.583022952079773,
-1.3015162944793701,
1.7930134534835815,
0.8307326436042786,
1.9658308029174805,
0.9474239349365234,
-0.3153458535671234,
1.4903970956802368,
0.04041949287056923,
1.9158107042312622,
-0.4653272330760956,
0.6508414149284363,
-0.33089327812194824,
-1.1997333765029907,
0.8509706258773804,
-0.35231438279151917,
-1.973486304283142,
-0.6943873763084412,
-0.8541620969772339,
-0.1379755437374115,
-0.7659408450126648,
0.9739352464675903,
-0.23768529295921326,
-1.4150598049163818,
0.21382266283035278,
-0.6801047921180725,
0.1646047830581665,
-1.3790805339813232,
0.18861381709575653,
0.738545298576355,
-0.7155128121376038,
0.013311493210494518,
-0.3288048207759857,
-1.3635586500167847,
-0.4308752417564392,
0.38679811358451843,
1.8309444189071655,
-0.7542291879653931,
0.9212828278541565,
1.0004042387008667,
-0.6653940081596375,
0.06062665581703186,
0.37941569089889526,
-0.30178794264793396,
0.8863961696624756,
-1.0507190227508545,
-0.43663451075553894,
1.246719479560852,
-0.15276405215263367,
-0.6366201043128967,
1.41263747215271,
0.8186562657356262,
-1.0156136751174927,
-0.21500687301158905,
-0.15028586983680725,
-0.9218783378601074,
0.013385971076786518,
-1.5866525173187256,
-0.10347240418195724,
0.2982565760612488,
-1.4649261236190796,
-0.45096883177757263,
-0.22453312575817108,
1.2933270931243896,
-0.17803366482257843,
1.4200735092163086,
-0.342149943113327,
-0.1798429638147354,
-0.4572964310646057,
-0.4069741666316986,
0.12498883157968521,
-0.2069445252418518,
-0.6801431179046631,
0.23922733962535858,
-0.7273809313774109,
0.29396018385887146,
1.4759172201156616,
0.35312026739120483,
0.01915847137570381,
0.5574831962585449,
1.2015997171401978,
0.3147061765193939,
-0.10806336253881454,
-0.9169855117797852,
-1.592229962348938,
2.0304622650146484,
-1.482947587966919,
1.896140217781067,
0.7703941464424133,
-0.018992170691490173,
-1.835187315940857,
-1.846893548965454,
1.3575564622879028,
1.1393799781799316,
2.402953863143921,
0.5844559669494629,
0.369996041059494,
-0.832365870475769,
-0.639443039894104,
0.3253401219844818,
-0.963295578956604,
-0.7733487486839294,
0.19514964520931244,
2.3236069679260254,
1.7685675621032715,
-0.46619153022766113,
-0.27751171588897705,
-1.015781283378601,
1.3805278539657593,
-0.2705162465572357,
0.17850424349308014,
1.9981781244277954,
-0.29640957713127136,
-1.0703785419464111,
1.2912348508834839,
-2.3212671279907227,
0.17952194809913635,
1.9844218492507935,
0.257580041885376,
0.07871845364570618,
-1.4416496753692627,
-0.741680920124054,
-0.1804850548505783,
-0.4246038794517517,
-1.3144638538360596,
0.49315762519836426,
-0.29848024249076843,
-0.8146887421607971,
-1.4495735168457031,
0.10808297991752625,
-1.0952885150909424,
-1.6810721158981323,
0.3158952593803406,
1.8678690195083618,
1.9602888822555542,
-0.7476171851158142,
1.4713361263275146,
-0.2446449249982834,
0.21529150009155273,
1.3437761068344116,
1.1754014492034912,
3.1190826892852783,
1.8991074562072754,
-1.3179423809051514,
0.794119656085968,
-0.11852239072322845,
-0.48232966661453247,
1.2414301633834839,
-1.046962022781372,
1.1757376194000244,
-0.2612251341342926,
-1.2831951379776,
-1.2490034103393555,
0.969072699546814,
0.5222426652908325,
0.060923509299755096,
-0.5194751024246216,
1.215078592300415,
0.09180844575166702,
1.2519601583480835,
0.6184475421905518,
-0.4512764513492584,
0.6052666902542114,
-0.39049097895622253,
-0.6223874688148499,
1.5273373126983643,
0.1713043749332428,
-1.4688609838485718,
-2.3750815391540527,
-0.2157943695783615,
-0.8649377226829529,
-0.06009017303586006,
-0.6964907646179199,
-0.938855767250061,
1.6330044269561768,
0.4552302956581116,
-1.2689825296401978,
-0.23025591671466827,
-0.38733190298080444,
-0.5539824962615967,
2.676781415939331,
-1.4174535274505615,
-0.16999517381191254,
-1.0018651485443115,
-0.5517668128013611,
1.6700445413589478,
-1.1178617477416992,
-0.23423974215984344,
-1.1064074039459229,
-0.5850930213928223,
-1.321670651435852,
-0.5600458383560181,
-0.05096651241183281,
-0.8111684918403625,
0.6940592527389526,
0.06041223555803299,
-1.1730269193649292,
-0.34016865491867065,
-0.8993419408798218,
0.8725756406784058,
-0.12669138610363007,
0.16936586797237396,
1.9147735834121704,
0.4137825071811676,
-0.42397063970565796,
0.7633667588233948,
1.1580790281295776,
0.6078465580940247,
-0.5806053876876831,
0.18032591044902802,
-0.6323990225791931,
0.29685962200164795,
-1.3401618003845215,
0.225767120718956,
-2.903926134109497,
0.6706109642982483,
-0.12639960646629333,
-0.07869070768356323,
-0.01661030575633049,
-1.3882532119750977,
1.0636643171310425,
2.527784585952759,
-1.2192524671554565,
0.4893060326576233,
0.3076540529727936,
1.1712872982025146,
-1.6720478534698486,
0.22073930501937866,
-0.49658191204071045,
2.113748073577881,
0.10814231634140015,
1.1618328094482422,
-0.47270816564559937,
-2.201538324356079,
0.5533397793769836,
-1.1730085611343384,
-1.0510510206222534,
0.8886112570762634,
-0.7800830006599426,
0.15855692327022552,
-1.390458106994629,
-0.1870884895324707,
-0.8217072486877441,
-1.237532377243042,
0.7545455098152161,
0.06389269977807999,
0.49667036533355713,
-0.6234186887741089,
0.37512239813804626,
-2.160736083984375,
-1.33413565158844,
-0.19909946620464325,
-0.9069620966911316,
0.42517778277397156,
-0.30515366792678833,
0.5934813618659973,
-0.11674261838197708,
0.03609198331832886,
0.32726001739501953,
1.3859468698501587,
3.4025917053222656,
0.17051377892494202,
0.3479898273944855,
-0.07519496977329254,
-0.9529330134391785,
1.4308257102966309,
0.9480519890785217,
-0.21231989562511444,
-0.5583601593971252,
-0.9498642683029175,
1.3266533613204956,
1.913571834564209,
1.0309934616088867,
0.0890338197350502,
-0.7648072242736816,
-0.8006528615951538,
0.0627201721072197,
0.14246739447116852,
0.5210274457931519,
0.8880259990692139,
0.09323558211326599,
0.10403722524642944,
1.388729214668274,
1.1243760585784912,
-0.3534826934337616,
0.49345749616622925,
-0.8908976316452026,
-0.3864283561706543,
0.48941442370414734,
0.315000981092453,
-0.02406500093638897,
0.4170459508895874,
-1.0938841104507446,
-0.306958943605423,
-0.3960863947868347,
-0.921626091003418,
-0.7386517524719238,
-0.4490557312965393,
-0.39681822061538696,
1.6599705219268799,
0.005917951464653015,
-0.49991828203201294,
0.019752666354179382,
-0.6981059908866882,
-0.11300820112228394,
-1.0918606519699097,
0.31621959805488586,
-0.11022792011499405,
-0.05625088885426521,
-0.07860103249549866,
1.6768077611923218,
-0.975845456123352,
-2.1661458015441895,
0.206369549036026,
0.2593202292919159,
-0.3745286464691162,
0.12677410244941711,
1.748740315437317,
0.47615015506744385,
1.4037940502166748,
1.4144333600997925,
0.9726572036743164,
-0.6243293881416321,
-1.3617677688598633,
0.6644557118415833,
0.9892954230308533,
-1.3754284381866455,
0.8610148429870605,
-0.0469888411462307,
-0.5798357129096985,
0.6937785148620605,
1.270919680595398,
0.4002183973789215,
-1.9603828191757202,
0.7945529222488403,
-0.8228967189788818,
0.6985849738121033,
0.6995691061019897,
0.7992262840270996,
0.16396020352840424,
0.7876479625701904,
-1.26482355594635,
-1.205715298652649,
-0.6738488078117371,
-0.6427682638168335,
1.851415753364563,
-0.1542186141014099,
0.4986496567726135,
-0.18835248053073883,
-1.2735482454299927,
-0.037787847220897675,
0.7479434609413147,
0.4027644991874695,
-0.4007352590560913,
0.8235232830047607,
-0.6516157388687134,
-1.0459051132202148,
-1.4214953184127808,
-0.44821128249168396,
-0.9943829774856567,
-0.886092483997345,
0.9755104184150696,
0.8841798305511475,
0.3267591893672943,
1.8675349950790405,
0.6942017078399658,
0.20868037641048431,
-2.6350409984588623,
0.9011911153793335,
0.3448387384414673,
-0.041510939598083496,
0.8943986892700195,
0.2981413006782532,
1.1133424043655396,
0.005044532008469105,
0.560455858707428,
-2.308715343475342,
2.202711582183838,
-0.26459142565727234,
0.682637631893158,
-0.05020461603999138,
-0.20499446988105774,
1.0763951539993286,
0.5170004963874817,
0.5744485259056091,
-1.1275591850280762,
0.8162716627120972,
-0.6157926321029663,
1.151991367340088,
0.9610323309898376,
-0.9116823673248291,
0.042204711586236954,
1.3586556911468506,
0.4519769549369812,
-0.4620417654514313,
-0.9572688341140747,
-0.8879392147064209,
0.9589326977729797,
1.7054463624954224,
0.012037637643516064,
0.019351761788129807,
0.8727334141731262,
0.6569944024085999,
-1.3358899354934692,
0.13222342729568481,
-0.6955445408821106,
-0.7366355061531067,
1.7409536838531494,
1.92373526096344,
-0.06713058054447174,
-0.16819027066230774,
-0.8608021140098572,
-1.3221546411514282,
0.7520236372947693,
0.0705866739153862,
0.03640849515795708,
0.7207897305488586,
-0.6955875754356384,
1.219678521156311,
0.8138054609298706,
0.8823382258415222,
0.1822003573179245,
0.2910115420818329,
0.3371739387512207,
-0.27705371379852295,
-1.1993603706359863,
-0.25189945101737976,
-1.189717173576355,
-2.5310096740722656,
0.4929211735725403,
-0.19859778881072998,
-1.49839186668396,
0.08041936904191971,
-1.0421726703643799,
0.8582668900489807,
-0.5711874961853027,
-1.1863014698028564,
-1.4015710353851318,
0.3530116379261017,
-0.08262396603822708,
0.8119105696678162,
-1.5737935304641724,
-0.03161034360527992,
1.2652465105056763,
0.9298873543739319,
-0.5644967555999756,
0.9392805099487305,
0.27340278029441833,
1.021718144416809,
0.8536622524261475,
-0.38404858112335205,
0.5077454447746277,
0.09522878378629684,
-1.3706800937652588,
0.4684828817844391,
1.1670713424682617,
0.2038915604352951,
1.4128921031951904,
-0.5127161741256714,
0.0475146658718586,
0.4184614419937134,
-0.5101976990699768,
-0.4756944477558136,
-0.6389876008033752,
0.6923853754997253,
0.026142176240682602,
-0.9087286591529846,
0.056304968893527985,
-0.07272820919752121,
-0.2142426073551178,
0.3179176449775696,
-1.4746487140655518,
-0.23410053551197052,
-0.3589637279510498,
-0.4946313202381134,
-1.2921311855316162,
-0.05995742976665497,
1.3561010360717773,
-0.8073374629020691,
-0.23758697509765625,
0.6322966814041138,
0.30470380187034607,
0.5310494303703308,
0.6146735548973083,
-0.6635906100273132,
-0.28131067752838135,
-0.30410632491111755,
-0.3786846995353699,
0.24284613132476807,
1.2935972213745117,
-0.11544812470674515,
-0.974848747253418,
0.7021539807319641,
-0.34327203035354614,
0.08602067828178406,
1.9256725311279297,
0.055137090384960175,
-0.8427296280860901,
0.3681454062461853,
-0.6693137884140015,
1.8540328741073608,
1.7862735986709595,
1.2888139486312866,
-0.06336525082588196,
-0.9556622505187988,
0.6546165943145752,
-0.2502693235874176,
-0.3400324285030365,
0.9610801935195923,
0.4479967951774597,
-0.14064499735832214,
-1.381892204284668,
0.5563377141952515,
1.2731659412384033,
-0.8382636308670044,
-0.7704463005065918,
0.033807940781116486,
-0.8694096803665161,
1.1015474796295166,
0.758402943611145,
0.40186816453933716,
0.1816207468509674,
1.6059784889221191,
0.693088710308075,
-0.35995662212371826,
0.5246744751930237,
0.4700191617012024,
-0.17045073211193085,
-2.0639395713806152,
-1.0469094514846802,
0.2951200604438782,
-0.3974817395210266,
-1.5905067920684814,
1.316929578781128,
-1.1993049383163452,
-0.936160683631897,
0.47032034397125244,
0.07743140310049057,
1.4527239799499512,
0.3261473476886749,
1.6037548780441284,
2.0792055130004883,
0.9317240118980408,
0.29952770471572876,
1.26485276222229,
-0.028181061148643494,
-0.3381980359554291,
1.783364176750183,
-0.42613378167152405,
0.5861250758171082,
1.0134663581848145,
-0.4023950695991516,
-1.1149777173995972,
-0.7743128538131714,
-1.1877351999282837,
-0.6692904233932495,
1.202793002128601,
0.09928672760725021,
-1.127503752708435,
0.2930683195590973,
1.5594937801361084,
0.05396602302789688,
-0.20926445722579956,
0.678356945514679,
0.48183611035346985,
-0.7690700888633728,
-0.027354225516319275,
-0.9128005504608154,
0.485106885433197,
-0.10495158284902573,
-0.29263409972190857,
0.30820250511169434,
0.5222834944725037,
1.3362451791763306,
0.1116248071193695,
0.1658940464258194,
1.2569185495376587,
-1.3595753908157349,
1.4322670698165894,
-0.6810513734817505,
0.2941533625125885,
-2.48787522315979,
1.3878610134124756,
-0.8443829417228699,
1.8618863821029663,
-2.6582140922546387,
0.45387351512908936,
-0.5006946325302124,
-0.48822593688964844,
0.35750287771224976,
-0.3926999270915985,
0.13419680297374725,
-0.11333489418029785,
-1.0813685655593872,
-0.10093497484922409,
-0.8133066296577454,
0.5621445178985596,
1.1918343305587769,
1.4003868103027344,
-1.1109447479248047,
-0.3074926435947418,
-1.7581446170806885,
-0.1733464151620865,
-0.6521876454353333,
0.3675893545150757,
-1.9093091487884521,
-0.05142899602651596,
-1.9529719352722168,
-2.487006902694702,
-1.315795660018921,
-0.880125880241394,
1.140414834022522,
0.2696946859359741,
-0.8704222440719604,
1.1702783107757568,
-0.3493453860282898,
-1.7809821367263794,
1.1000336408615112,
-2.1781625747680664
] |
https://github.com/huggingface/datasets/issues/5419
|
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
|
Hi! Thanks for pointing out this inconsistency. Changing the default value at this point is probably not worth it, considering we've started discussing the state of the task API internally - we will most likely deprecate the current one and replace it with a more robust solution that relies on the `train_eval_index` field stored in the YAML section of the dataset cards.
|
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
| 347 | 62 |
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
Hi! Thanks for pointing out this inconsistency. Changing the default value at this point is probably not worth it, considering we've started discussing the state of the task API internally - we will most likely deprecate the current one and replace it with a more robust solution that relies on the `train_eval_index` field stored in the YAML section of the dataset cards.
|
[
-1.1833069324493408,
-0.9694234132766724,
-0.619713306427002,
1.6215074062347412,
-0.12914401292800903,
-1.279888391494751,
0.24085275828838348,
-1.0611002445220947,
1.6883082389831543,
-0.8849717378616333,
0.3013935089111328,
-1.653178334236145,
0.01117192953824997,
-0.5831577777862549,
-0.6681755781173706,
-0.8222542405128479,
-0.36037158966064453,
-0.6775339245796204,
1.0935983657836914,
2.377579927444458,
1.2241233587265015,
-1.311793565750122,
2.6679489612579346,
0.7080563306808472,
-0.25358787178993225,
-1.0375956296920776,
0.4238698482513428,
-0.08153504133224487,
-1.2295267581939697,
-0.4980781674385071,
-0.9438321590423584,
0.016522454097867012,
-0.6915267109870911,
-0.5756310820579529,
-0.06822487711906433,
0.5546227693557739,
-0.3718861937522888,
-0.42129212617874146,
-0.555511474609375,
-0.7726204991340637,
0.5343396067619324,
-0.4435428977012634,
0.8208646178245544,
-0.32155632972717285,
1.8436461687088013,
-0.5448842644691467,
0.48286521434783936,
0.7049099802970886,
1.388123869895935,
0.1681605726480484,
-0.0755012184381485,
0.38633275032043457,
0.33399373292922974,
-0.018881119787693024,
0.6088438034057617,
1.11557936668396,
0.6231740713119507,
0.4882310628890991,
0.7391825914382935,
-2.346855401992798,
1.3026196956634521,
-1.0360913276672363,
0.31989985704421997,
1.3453304767608643,
-0.9181533455848694,
0.33171606063842773,
-1.689876675605774,
0.013276593759655952,
0.5929717421531677,
-2.180551767349243,
0.36141443252563477,
-1.2945789098739624,
-0.40853410959243774,
1.0721262693405151,
0.36246758699417114,
-1.2246618270874023,
0.10794125497341156,
-0.44101935625076294,
1.1237925291061401,
0.4235948920249939,
0.9179837107658386,
-1.71090567111969,
-0.0549333319067955,
-0.27334773540496826,
0.10947111248970032,
-1.257838249206543,
-1.6642447710037231,
0.5635508894920349,
0.6763511300086975,
0.5481265187263489,
-0.16604983806610107,
1.087773323059082,
-1.1001137495040894,
0.7178650498390198,
-1.0397262573242188,
-1.7521917819976807,
-1.3871567249298096,
-2.2865285873413086,
-2.1727049350738525,
0.6274186372756958,
-0.4183199405670166,
-0.5411054491996765,
2.0462772846221924,
-0.9944171905517578,
-1.6654562950134277,
1.19589102268219,
0.24665521085262299,
0.021223463118076324,
2.365304946899414,
0.17311958968639374,
-0.7962043881416321,
0.4777644872665405,
-0.831853985786438,
0.7256370782852173,
-0.3970136046409607,
1.323028326034546,
0.4255067706108093,
-1.0786763429641724,
1.5557644367218018,
-0.3622020483016968,
0.60853111743927,
-0.6591334342956543,
-0.5230614542961121,
-0.7163286209106445,
0.22953900694847107,
1.9368451833724976,
-0.29199010133743286,
1.4839928150177002,
-0.31952476501464844,
-1.439651608467102,
-1.560746431350708,
0.9005607962608337,
0.3471340537071228,
-0.8970104455947876,
0.1654205471277237,
-0.4531790018081665,
0.21471846103668213,
-0.12520600855350494,
1.2042388916015625,
1.3164488077163696,
0.6728824973106384,
-0.4144572615623474,
-0.8006612658500671,
0.20732098817825317,
-0.06003472954034805,
-0.6384831666946411,
-1.828741431236267,
-0.36072808504104614,
0.10835538804531097,
0.6501743793487549,
-1.0900626182556152,
1.7989938259124756,
0.8901401162147522,
1.819419503211975,
1.019895076751709,
-0.4093904495239258,
1.48923921585083,
0.10470029711723328,
1.8384956121444702,
-0.4401766061782837,
0.7136641144752502,
-0.4269223213195801,
-1.2353856563568115,
0.8128933310508728,
-0.24858738481998444,
-2.004589319229126,
-0.7397322058677673,
-0.7549865245819092,
-0.13761481642723083,
-0.8480818867683411,
0.8774974942207336,
-0.3517721891403198,
-1.493046522140503,
0.20858094096183777,
-0.6704849004745483,
0.28725749254226685,
-1.1361578702926636,
0.3816629648208618,
0.7492954730987549,
-0.5933088064193726,
0.0932084247469902,
-0.338731050491333,
-1.235304594039917,
-0.43378746509552,
0.43370819091796875,
1.78645658493042,
-0.7725636959075928,
0.8817911148071289,
1.048277735710144,
-0.6815729141235352,
0.05035501345992088,
0.23909689486026764,
-0.259901225566864,
0.884930431842804,
-0.9839455485343933,
-0.5487781763076782,
1.2518367767333984,
-0.3301119804382324,
-0.6776876449584961,
1.5002113580703735,
0.679479718208313,
-0.998194694519043,
-0.2014550268650055,
-0.22194483876228333,
-0.8929881453514099,
0.09325700998306274,
-1.5888053178787231,
-0.038791656494140625,
0.5726628303527832,
-1.590336561203003,
-0.45534634590148926,
-0.162457674741745,
1.447251319885254,
-0.09849248081445694,
1.4642258882522583,
-0.3728559613227844,
-0.17320990562438965,
-0.2563537359237671,
-0.34768837690353394,
0.1914590299129486,
-0.2036581188440323,
-0.6171303391456604,
0.11268964409828186,
-0.751983642578125,
0.33693039417266846,
1.3767063617706299,
0.26017385721206665,
0.002727317623794079,
0.5090276002883911,
1.1435184478759766,
0.3945996165275574,
-0.10462615638971329,
-0.8583694100379944,
-1.56083083152771,
1.9662842750549316,
-1.3965954780578613,
2.070451021194458,
0.718436598777771,
-0.0476449579000473,
-1.8001000881195068,
-1.8737330436706543,
1.3133984804153442,
1.103890299797058,
2.26850962638855,
0.5745614171028137,
0.5065439343452454,
-0.8543089628219604,
-0.6854045987129211,
0.390184223651886,
-0.9697220921516418,
-0.6886463761329651,
0.08718743175268173,
2.3130102157592773,
1.811776041984558,
-0.3482155203819275,
-0.21541018784046173,
-1.046060562133789,
1.4535002708435059,
-0.29990142583847046,
0.39040517807006836,
1.9382646083831787,
-0.2860388159751892,
-1.0904333591461182,
1.3887381553649902,
-2.377631664276123,
0.19764737784862518,
2.0893208980560303,
0.2107824683189392,
0.08831124007701874,
-1.2832082509994507,
-0.5788010954856873,
-0.24563349783420563,
-0.3359677791595459,
-1.3009716272354126,
0.3986544609069824,
-0.18863891065120697,
-0.6554064750671387,
-1.3451915979385376,
0.22269675135612488,
-1.0976448059082031,
-1.627433180809021,
0.22424787282943726,
2.0560145378112793,
2.0387136936187744,
-0.6912542581558228,
1.6123257875442505,
-0.2749156951904297,
0.24459050595760345,
1.2892290353775024,
1.345609426498413,
3.0619635581970215,
1.918502926826477,
-1.3510890007019043,
0.6503422856330872,
-0.14231117069721222,
-0.5171805620193481,
1.202722191810608,
-1.2097880840301514,
1.3371480703353882,
-0.14385829865932465,
-1.179996132850647,
-1.2675822973251343,
0.9473890662193298,
0.5015867948532104,
-0.019169289618730545,
-0.5333849787712097,
1.2148429155349731,
-0.010615838691592216,
1.324185848236084,
0.5496160387992859,
-0.45413994789123535,
0.568139910697937,
-0.4567117691040039,
-0.5372376441955566,
1.4428249597549438,
0.23988471925258636,
-1.3349703550338745,
-2.296731948852539,
-0.17684468626976013,
-0.804845929145813,
0.11500415205955505,
-0.6511569023132324,
-0.955032229423523,
1.5484113693237305,
0.3624073266983032,
-1.1649539470672607,
-0.26864778995513916,
-0.3098260164260864,
-0.5076643228530884,
2.6806252002716064,
-1.2921608686447144,
-0.17517124116420746,
-1.0224189758300781,
-0.6313532590866089,
1.6501309871673584,
-1.1978517770767212,
-0.3411588668823242,
-1.0118504762649536,
-0.5724486112594604,
-1.2402108907699585,
-0.49953895807266235,
0.043294757604599,
-0.954366147518158,
0.8855509757995605,
0.2192884385585785,
-1.2820584774017334,
-0.3563838601112366,
-0.8441389203071594,
1.010824203491211,
-0.18862585723400116,
0.1421048790216446,
1.8237725496292114,
0.2762865424156189,
-0.4040164351463318,
0.8364075422286987,
1.1186625957489014,
0.6122679710388184,
-0.5268786549568176,
0.19349880516529083,
-0.5963319540023804,
0.3896685242652893,
-1.3198307752609253,
0.2685936689376831,
-2.8904573917388916,
0.6708207130432129,
-0.0631551593542099,
-0.032093245536088943,
-0.06142719089984894,
-1.406703233718872,
0.9750451445579529,
2.5447957515716553,
-1.2087708711624146,
0.5225659608840942,
0.33809375762939453,
1.2049028873443604,
-1.598653793334961,
0.2740750312805176,
-0.45178598165512085,
2.040832757949829,
0.10919442772865295,
1.2873892784118652,
-0.42974454164505005,
-2.369650363922119,
0.519936203956604,
-1.2816623449325562,
-1.1672040224075317,
0.8736312389373779,
-0.8346624970436096,
0.09839459508657455,
-1.4120339155197144,
-0.34990090131759644,
-0.8847019076347351,
-1.1942836046218872,
0.6638983488082886,
0.1863417625427246,
0.43081575632095337,
-0.5572648644447327,
0.2970431447029114,
-2.2139832973480225,
-1.349595308303833,
-0.24194391071796417,
-0.992762565612793,
0.5155801177024841,
-0.47694486379623413,
0.6292269229888916,
-0.1470356285572052,
0.07477422803640366,
0.3743234872817993,
1.5200998783111572,
3.3816723823547363,
0.2213951051235199,
0.25869864225387573,
-0.24559733271598816,
-0.9168991446495056,
1.451221227645874,
0.9041808843612671,
-0.1688830703496933,
-0.5014632344245911,
-1.0709772109985352,
1.2347419261932373,
1.9245914220809937,
0.881931483745575,
0.061438702046871185,
-0.808256208896637,
-0.7327739000320435,
-0.12412596493959427,
0.08792777359485626,
0.5577477812767029,
0.8592802286148071,
0.2381068915128708,
0.056702278554439545,
1.354179859161377,
1.1474627256393433,
-0.3750607967376709,
0.3700019121170044,
-0.8387156128883362,
-0.44054192304611206,
0.47086936235427856,
0.2715020775794983,
-0.04706892371177673,
0.26798462867736816,
-0.9197232127189636,
-0.1965947449207306,
-0.49873876571655273,
-0.7746546864509583,
-0.808307945728302,
-0.43065589666366577,
-0.3878488540649414,
1.5887346267700195,
0.2123817354440689,
-0.6373401880264282,
-0.07381433993577957,
-0.7574213743209839,
-0.1463528424501419,
-1.0410690307617188,
0.29110318422317505,
-0.0641750916838646,
-0.16833816468715668,
-0.22422748804092407,
1.534174919128418,
-0.9165228605270386,
-2.1466405391693115,
0.11911170184612274,
0.19298528134822845,
-0.18444503843784332,
0.16528503596782684,
1.7787257432937622,
0.5328876972198486,
1.4253488779067993,
1.3759735822677612,
0.9593143463134766,
-0.6649183630943298,
-1.2675995826721191,
0.6952237486839294,
0.9408965110778809,
-1.4016923904418945,
0.822391927242279,
0.0258154459297657,
-0.5203990340232849,
0.6413463950157166,
1.2248331308364868,
0.5027907490730286,
-1.9877634048461914,
0.844728410243988,
-1.134079098701477,
0.8420499563217163,
0.8174946904182434,
0.7365323901176453,
0.2662370204925537,
0.8394429087638855,
-1.1425976753234863,
-1.1339797973632812,
-0.6392909288406372,
-0.7855875492095947,
1.9796123504638672,
-0.49709033966064453,
0.6093056201934814,
-0.17914749681949615,
-1.3266688585281372,
-0.1537623107433319,
0.8311043381690979,
0.425439715385437,
-0.4972378611564636,
0.784584641456604,
-0.6518853306770325,
-0.95038902759552,
-1.2347760200500488,
-0.4986576437950134,
-1.1089990139007568,
-0.978237509727478,
0.987845778465271,
0.8156415820121765,
0.3148016929626465,
1.8169443607330322,
0.6978287696838379,
0.26708269119262695,
-2.5229010581970215,
0.8808039426803589,
0.3584481477737427,
-0.1848384588956833,
0.7766379117965698,
0.3496930003166199,
1.038012981414795,
0.02710627391934395,
0.5579413771629333,
-2.4274349212646484,
2.308605670928955,
-0.1443127542734146,
0.6770343780517578,
-0.020866818726062775,
-0.14775638282299042,
1.1491512060165405,
0.4925529360771179,
0.5257176160812378,
-0.9511297941207886,
0.812161922454834,
-0.5795562267303467,
1.261391282081604,
0.8793803453445435,
-0.8696277141571045,
-0.05984897539019585,
1.5071511268615723,
0.3908345699310303,
-0.6899963021278381,
-0.9824188947677612,
-1.0673540830612183,
0.9145119190216064,
1.7587155103683472,
-0.02047409862279892,
-0.0073495348915457726,
0.7990529537200928,
0.6553254127502441,
-1.2161308526992798,
0.16164521872997284,
-0.6105092763900757,
-0.6935755610466003,
1.6377941370010376,
2.0719504356384277,
-0.24453911185264587,
-0.22051560878753662,
-0.7141218185424805,
-1.2677260637283325,
0.7330666184425354,
-0.051027923822402954,
-0.052028145641088486,
0.644913375377655,
-0.6808664202690125,
0.958353579044342,
0.8720755577087402,
0.8766868710517883,
0.17185960710048676,
0.24178899824619293,
0.4523431658744812,
-0.4138285517692566,
-1.233420729637146,
-0.2682386636734009,
-1.1084012985229492,
-2.567384719848633,
0.34610515832901,
-0.11407589912414551,
-1.3452166318893433,
0.062424659729003906,
-1.0295794010162354,
0.9553741812705994,
-0.6184698343276978,
-1.2160091400146484,
-1.584958553314209,
0.11761322617530823,
0.03726348653435707,
0.8541106581687927,
-1.6252169609069824,
-0.13478878140449524,
1.2172950506210327,
0.9401122331619263,
-0.717275083065033,
1.0076912641525269,
0.2253623753786087,
1.0810534954071045,
0.7991009950637817,
-0.3450968861579895,
0.6100804805755615,
-0.08408259600400925,
-1.2852352857589722,
0.5456141829490662,
1.1922696828842163,
0.14909452199935913,
1.4273499250411987,
-0.5047581195831299,
-0.03853223845362663,
0.3955182433128357,
-0.5989027619361877,
-0.45184028148651123,
-0.4882328510284424,
0.6816933155059814,
0.040139488875865936,
-0.7941684722900391,
-0.0027077440172433853,
-0.044873129576444626,
-0.3404865264892578,
0.16574835777282715,
-1.5649019479751587,
-0.1396893858909607,
-0.34538644552230835,
-0.6366926431655884,
-1.276195764541626,
-0.030417725443840027,
1.4189229011535645,
-0.7033087015151978,
-0.3120158314704895,
0.5193074941635132,
0.39425384998321533,
0.5769605040550232,
0.5816627740859985,
-0.7377621531486511,
-0.25615647435188293,
-0.22569364309310913,
-0.3167499899864197,
0.3752911686897278,
1.461110234260559,
-0.1362464278936386,
-0.9239768981933594,
0.6764798164367676,
-0.335527241230011,
0.06921336054801941,
1.917765498161316,
0.0631771832704544,
-0.7371236681938171,
0.2520870566368103,
-0.8230152726173401,
1.9206246137619019,
1.79088294506073,
1.2933905124664307,
-0.2483997344970703,
-1.0336134433746338,
0.7096531987190247,
-0.5237310528755188,
-0.32405996322631836,
0.9127907752990723,
0.3242408037185669,
-0.2760791778564453,
-1.3971577882766724,
0.8451112508773804,
1.1545368432998657,
-0.8460969924926758,
-0.8240018486976624,
0.17286306619644165,
-0.7690438032150269,
1.2360199689865112,
0.5993080735206604,
0.2930041551589966,
0.2824642062187195,
1.6348786354064941,
0.7987251281738281,
-0.3411852717399597,
0.5314364433288574,
0.5493870377540588,
-0.2470724880695343,
-2.064531087875366,
-1.2194361686706543,
0.4256712794303894,
-0.6503346562385559,
-1.7184125185012817,
1.4102544784545898,
-1.1857893466949463,
-1.0541826486587524,
0.576887845993042,
0.08627428114414215,
1.3911453485488892,
0.3805525302886963,
1.5292900800704956,
1.9951105117797852,
0.8614479899406433,
0.514039158821106,
1.2274775505065918,
-0.2346300631761551,
-0.426527202129364,
1.7570040225982666,
-0.48206114768981934,
0.42054182291030884,
1.1630934476852417,
-0.2701341509819031,
-1.1190717220306396,
-0.7484117746353149,
-1.3351223468780518,
-0.662887454032898,
1.1166741847991943,
0.13085220754146576,
-1.0489106178283691,
0.1959439516067505,
1.5183167457580566,
0.1067826971411705,
-0.24416251480579376,
0.6864544153213501,
0.41159766912460327,
-0.7793933153152466,
-0.006406016647815704,
-0.8190436363220215,
0.5306724309921265,
-0.2920132875442505,
-0.36155229806900024,
0.4437764286994934,
0.4199492931365967,
1.3852413892745972,
-0.058330126106739044,
0.20543953776359558,
1.0658437013626099,
-1.4288804531097412,
1.441206455230713,
-0.7555726766586304,
0.2816630005836487,
-2.3539533615112305,
1.373471975326538,
-0.6821659803390503,
2.062500476837158,
-2.6516408920288086,
0.48819977045059204,
-0.6216963529586792,
-0.4786001443862915,
0.31755131483078003,
-0.27661389112472534,
0.02520449087023735,
-0.09376010298728943,
-1.1758848428726196,
-0.012742837890982628,
-0.6285548806190491,
0.6162751913070679,
1.1511049270629883,
1.362389326095581,
-1.167575716972351,
-0.22042308747768402,
-1.687145471572876,
-0.15909400582313538,
-0.8131183385848999,
0.26379817724227905,
-2.021789312362671,
-0.2257673591375351,
-2.014719009399414,
-2.421130895614624,
-1.1320523023605347,
-0.7051334381103516,
1.1221846342086792,
0.10910653322935104,
-0.8380353450775146,
1.3815984725952148,
-0.33163273334503174,
-1.8130617141723633,
1.0267350673675537,
-2.1517701148986816
] |
https://github.com/huggingface/datasets/issues/5419
|
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
|
The task templates API has been deprecated (will be removed in version 3.0), so I'm closing this issue.
|
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
| 347 | 18 |
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
The task templates API has been deprecated (will be removed in version 3.0), so I'm closing this issue.
|
[
-1.1833069324493408,
-0.9694234132766724,
-0.619713306427002,
1.6215074062347412,
-0.12914401292800903,
-1.279888391494751,
0.24085275828838348,
-1.0611002445220947,
1.6883082389831543,
-0.8849717378616333,
0.3013935089111328,
-1.653178334236145,
0.01117192953824997,
-0.5831577777862549,
-0.6681755781173706,
-0.8222542405128479,
-0.36037158966064453,
-0.6775339245796204,
1.0935983657836914,
2.377579927444458,
1.2241233587265015,
-1.311793565750122,
2.6679489612579346,
0.7080563306808472,
-0.25358787178993225,
-1.0375956296920776,
0.4238698482513428,
-0.08153504133224487,
-1.2295267581939697,
-0.4980781674385071,
-0.9438321590423584,
0.016522454097867012,
-0.6915267109870911,
-0.5756310820579529,
-0.06822487711906433,
0.5546227693557739,
-0.3718861937522888,
-0.42129212617874146,
-0.555511474609375,
-0.7726204991340637,
0.5343396067619324,
-0.4435428977012634,
0.8208646178245544,
-0.32155632972717285,
1.8436461687088013,
-0.5448842644691467,
0.48286521434783936,
0.7049099802970886,
1.388123869895935,
0.1681605726480484,
-0.0755012184381485,
0.38633275032043457,
0.33399373292922974,
-0.018881119787693024,
0.6088438034057617,
1.11557936668396,
0.6231740713119507,
0.4882310628890991,
0.7391825914382935,
-2.346855401992798,
1.3026196956634521,
-1.0360913276672363,
0.31989985704421997,
1.3453304767608643,
-0.9181533455848694,
0.33171606063842773,
-1.689876675605774,
0.013276593759655952,
0.5929717421531677,
-2.180551767349243,
0.36141443252563477,
-1.2945789098739624,
-0.40853410959243774,
1.0721262693405151,
0.36246758699417114,
-1.2246618270874023,
0.10794125497341156,
-0.44101935625076294,
1.1237925291061401,
0.4235948920249939,
0.9179837107658386,
-1.71090567111969,
-0.0549333319067955,
-0.27334773540496826,
0.10947111248970032,
-1.257838249206543,
-1.6642447710037231,
0.5635508894920349,
0.6763511300086975,
0.5481265187263489,
-0.16604983806610107,
1.087773323059082,
-1.1001137495040894,
0.7178650498390198,
-1.0397262573242188,
-1.7521917819976807,
-1.3871567249298096,
-2.2865285873413086,
-2.1727049350738525,
0.6274186372756958,
-0.4183199405670166,
-0.5411054491996765,
2.0462772846221924,
-0.9944171905517578,
-1.6654562950134277,
1.19589102268219,
0.24665521085262299,
0.021223463118076324,
2.365304946899414,
0.17311958968639374,
-0.7962043881416321,
0.4777644872665405,
-0.831853985786438,
0.7256370782852173,
-0.3970136046409607,
1.323028326034546,
0.4255067706108093,
-1.0786763429641724,
1.5557644367218018,
-0.3622020483016968,
0.60853111743927,
-0.6591334342956543,
-0.5230614542961121,
-0.7163286209106445,
0.22953900694847107,
1.9368451833724976,
-0.29199010133743286,
1.4839928150177002,
-0.31952476501464844,
-1.439651608467102,
-1.560746431350708,
0.9005607962608337,
0.3471340537071228,
-0.8970104455947876,
0.1654205471277237,
-0.4531790018081665,
0.21471846103668213,
-0.12520600855350494,
1.2042388916015625,
1.3164488077163696,
0.6728824973106384,
-0.4144572615623474,
-0.8006612658500671,
0.20732098817825317,
-0.06003472954034805,
-0.6384831666946411,
-1.828741431236267,
-0.36072808504104614,
0.10835538804531097,
0.6501743793487549,
-1.0900626182556152,
1.7989938259124756,
0.8901401162147522,
1.819419503211975,
1.019895076751709,
-0.4093904495239258,
1.48923921585083,
0.10470029711723328,
1.8384956121444702,
-0.4401766061782837,
0.7136641144752502,
-0.4269223213195801,
-1.2353856563568115,
0.8128933310508728,
-0.24858738481998444,
-2.004589319229126,
-0.7397322058677673,
-0.7549865245819092,
-0.13761481642723083,
-0.8480818867683411,
0.8774974942207336,
-0.3517721891403198,
-1.493046522140503,
0.20858094096183777,
-0.6704849004745483,
0.28725749254226685,
-1.1361578702926636,
0.3816629648208618,
0.7492954730987549,
-0.5933088064193726,
0.0932084247469902,
-0.338731050491333,
-1.235304594039917,
-0.43378746509552,
0.43370819091796875,
1.78645658493042,
-0.7725636959075928,
0.8817911148071289,
1.048277735710144,
-0.6815729141235352,
0.05035501345992088,
0.23909689486026764,
-0.259901225566864,
0.884930431842804,
-0.9839455485343933,
-0.5487781763076782,
1.2518367767333984,
-0.3301119804382324,
-0.6776876449584961,
1.5002113580703735,
0.679479718208313,
-0.998194694519043,
-0.2014550268650055,
-0.22194483876228333,
-0.8929881453514099,
0.09325700998306274,
-1.5888053178787231,
-0.038791656494140625,
0.5726628303527832,
-1.590336561203003,
-0.45534634590148926,
-0.162457674741745,
1.447251319885254,
-0.09849248081445694,
1.4642258882522583,
-0.3728559613227844,
-0.17320990562438965,
-0.2563537359237671,
-0.34768837690353394,
0.1914590299129486,
-0.2036581188440323,
-0.6171303391456604,
0.11268964409828186,
-0.751983642578125,
0.33693039417266846,
1.3767063617706299,
0.26017385721206665,
0.002727317623794079,
0.5090276002883911,
1.1435184478759766,
0.3945996165275574,
-0.10462615638971329,
-0.8583694100379944,
-1.56083083152771,
1.9662842750549316,
-1.3965954780578613,
2.070451021194458,
0.718436598777771,
-0.0476449579000473,
-1.8001000881195068,
-1.8737330436706543,
1.3133984804153442,
1.103890299797058,
2.26850962638855,
0.5745614171028137,
0.5065439343452454,
-0.8543089628219604,
-0.6854045987129211,
0.390184223651886,
-0.9697220921516418,
-0.6886463761329651,
0.08718743175268173,
2.3130102157592773,
1.811776041984558,
-0.3482155203819275,
-0.21541018784046173,
-1.046060562133789,
1.4535002708435059,
-0.29990142583847046,
0.39040517807006836,
1.9382646083831787,
-0.2860388159751892,
-1.0904333591461182,
1.3887381553649902,
-2.377631664276123,
0.19764737784862518,
2.0893208980560303,
0.2107824683189392,
0.08831124007701874,
-1.2832082509994507,
-0.5788010954856873,
-0.24563349783420563,
-0.3359677791595459,
-1.3009716272354126,
0.3986544609069824,
-0.18863891065120697,
-0.6554064750671387,
-1.3451915979385376,
0.22269675135612488,
-1.0976448059082031,
-1.627433180809021,
0.22424787282943726,
2.0560145378112793,
2.0387136936187744,
-0.6912542581558228,
1.6123257875442505,
-0.2749156951904297,
0.24459050595760345,
1.2892290353775024,
1.345609426498413,
3.0619635581970215,
1.918502926826477,
-1.3510890007019043,
0.6503422856330872,
-0.14231117069721222,
-0.5171805620193481,
1.202722191810608,
-1.2097880840301514,
1.3371480703353882,
-0.14385829865932465,
-1.179996132850647,
-1.2675822973251343,
0.9473890662193298,
0.5015867948532104,
-0.019169289618730545,
-0.5333849787712097,
1.2148429155349731,
-0.010615838691592216,
1.324185848236084,
0.5496160387992859,
-0.45413994789123535,
0.568139910697937,
-0.4567117691040039,
-0.5372376441955566,
1.4428249597549438,
0.23988471925258636,
-1.3349703550338745,
-2.296731948852539,
-0.17684468626976013,
-0.804845929145813,
0.11500415205955505,
-0.6511569023132324,
-0.955032229423523,
1.5484113693237305,
0.3624073266983032,
-1.1649539470672607,
-0.26864778995513916,
-0.3098260164260864,
-0.5076643228530884,
2.6806252002716064,
-1.2921608686447144,
-0.17517124116420746,
-1.0224189758300781,
-0.6313532590866089,
1.6501309871673584,
-1.1978517770767212,
-0.3411588668823242,
-1.0118504762649536,
-0.5724486112594604,
-1.2402108907699585,
-0.49953895807266235,
0.043294757604599,
-0.954366147518158,
0.8855509757995605,
0.2192884385585785,
-1.2820584774017334,
-0.3563838601112366,
-0.8441389203071594,
1.010824203491211,
-0.18862585723400116,
0.1421048790216446,
1.8237725496292114,
0.2762865424156189,
-0.4040164351463318,
0.8364075422286987,
1.1186625957489014,
0.6122679710388184,
-0.5268786549568176,
0.19349880516529083,
-0.5963319540023804,
0.3896685242652893,
-1.3198307752609253,
0.2685936689376831,
-2.8904573917388916,
0.6708207130432129,
-0.0631551593542099,
-0.032093245536088943,
-0.06142719089984894,
-1.406703233718872,
0.9750451445579529,
2.5447957515716553,
-1.2087708711624146,
0.5225659608840942,
0.33809375762939453,
1.2049028873443604,
-1.598653793334961,
0.2740750312805176,
-0.45178598165512085,
2.040832757949829,
0.10919442772865295,
1.2873892784118652,
-0.42974454164505005,
-2.369650363922119,
0.519936203956604,
-1.2816623449325562,
-1.1672040224075317,
0.8736312389373779,
-0.8346624970436096,
0.09839459508657455,
-1.4120339155197144,
-0.34990090131759644,
-0.8847019076347351,
-1.1942836046218872,
0.6638983488082886,
0.1863417625427246,
0.43081575632095337,
-0.5572648644447327,
0.2970431447029114,
-2.2139832973480225,
-1.349595308303833,
-0.24194391071796417,
-0.992762565612793,
0.5155801177024841,
-0.47694486379623413,
0.6292269229888916,
-0.1470356285572052,
0.07477422803640366,
0.3743234872817993,
1.5200998783111572,
3.3816723823547363,
0.2213951051235199,
0.25869864225387573,
-0.24559733271598816,
-0.9168991446495056,
1.451221227645874,
0.9041808843612671,
-0.1688830703496933,
-0.5014632344245911,
-1.0709772109985352,
1.2347419261932373,
1.9245914220809937,
0.881931483745575,
0.061438702046871185,
-0.808256208896637,
-0.7327739000320435,
-0.12412596493959427,
0.08792777359485626,
0.5577477812767029,
0.8592802286148071,
0.2381068915128708,
0.056702278554439545,
1.354179859161377,
1.1474627256393433,
-0.3750607967376709,
0.3700019121170044,
-0.8387156128883362,
-0.44054192304611206,
0.47086936235427856,
0.2715020775794983,
-0.04706892371177673,
0.26798462867736816,
-0.9197232127189636,
-0.1965947449207306,
-0.49873876571655273,
-0.7746546864509583,
-0.808307945728302,
-0.43065589666366577,
-0.3878488540649414,
1.5887346267700195,
0.2123817354440689,
-0.6373401880264282,
-0.07381433993577957,
-0.7574213743209839,
-0.1463528424501419,
-1.0410690307617188,
0.29110318422317505,
-0.0641750916838646,
-0.16833816468715668,
-0.22422748804092407,
1.534174919128418,
-0.9165228605270386,
-2.1466405391693115,
0.11911170184612274,
0.19298528134822845,
-0.18444503843784332,
0.16528503596782684,
1.7787257432937622,
0.5328876972198486,
1.4253488779067993,
1.3759735822677612,
0.9593143463134766,
-0.6649183630943298,
-1.2675995826721191,
0.6952237486839294,
0.9408965110778809,
-1.4016923904418945,
0.822391927242279,
0.0258154459297657,
-0.5203990340232849,
0.6413463950157166,
1.2248331308364868,
0.5027907490730286,
-1.9877634048461914,
0.844728410243988,
-1.134079098701477,
0.8420499563217163,
0.8174946904182434,
0.7365323901176453,
0.2662370204925537,
0.8394429087638855,
-1.1425976753234863,
-1.1339797973632812,
-0.6392909288406372,
-0.7855875492095947,
1.9796123504638672,
-0.49709033966064453,
0.6093056201934814,
-0.17914749681949615,
-1.3266688585281372,
-0.1537623107433319,
0.8311043381690979,
0.425439715385437,
-0.4972378611564636,
0.784584641456604,
-0.6518853306770325,
-0.95038902759552,
-1.2347760200500488,
-0.4986576437950134,
-1.1089990139007568,
-0.978237509727478,
0.987845778465271,
0.8156415820121765,
0.3148016929626465,
1.8169443607330322,
0.6978287696838379,
0.26708269119262695,
-2.5229010581970215,
0.8808039426803589,
0.3584481477737427,
-0.1848384588956833,
0.7766379117965698,
0.3496930003166199,
1.038012981414795,
0.02710627391934395,
0.5579413771629333,
-2.4274349212646484,
2.308605670928955,
-0.1443127542734146,
0.6770343780517578,
-0.020866818726062775,
-0.14775638282299042,
1.1491512060165405,
0.4925529360771179,
0.5257176160812378,
-0.9511297941207886,
0.812161922454834,
-0.5795562267303467,
1.261391282081604,
0.8793803453445435,
-0.8696277141571045,
-0.05984897539019585,
1.5071511268615723,
0.3908345699310303,
-0.6899963021278381,
-0.9824188947677612,
-1.0673540830612183,
0.9145119190216064,
1.7587155103683472,
-0.02047409862279892,
-0.0073495348915457726,
0.7990529537200928,
0.6553254127502441,
-1.2161308526992798,
0.16164521872997284,
-0.6105092763900757,
-0.6935755610466003,
1.6377941370010376,
2.0719504356384277,
-0.24453911185264587,
-0.22051560878753662,
-0.7141218185424805,
-1.2677260637283325,
0.7330666184425354,
-0.051027923822402954,
-0.052028145641088486,
0.644913375377655,
-0.6808664202690125,
0.958353579044342,
0.8720755577087402,
0.8766868710517883,
0.17185960710048676,
0.24178899824619293,
0.4523431658744812,
-0.4138285517692566,
-1.233420729637146,
-0.2682386636734009,
-1.1084012985229492,
-2.567384719848633,
0.34610515832901,
-0.11407589912414551,
-1.3452166318893433,
0.062424659729003906,
-1.0295794010162354,
0.9553741812705994,
-0.6184698343276978,
-1.2160091400146484,
-1.584958553314209,
0.11761322617530823,
0.03726348653435707,
0.8541106581687927,
-1.6252169609069824,
-0.13478878140449524,
1.2172950506210327,
0.9401122331619263,
-0.717275083065033,
1.0076912641525269,
0.2253623753786087,
1.0810534954071045,
0.7991009950637817,
-0.3450968861579895,
0.6100804805755615,
-0.08408259600400925,
-1.2852352857589722,
0.5456141829490662,
1.1922696828842163,
0.14909452199935913,
1.4273499250411987,
-0.5047581195831299,
-0.03853223845362663,
0.3955182433128357,
-0.5989027619361877,
-0.45184028148651123,
-0.4882328510284424,
0.6816933155059814,
0.040139488875865936,
-0.7941684722900391,
-0.0027077440172433853,
-0.044873129576444626,
-0.3404865264892578,
0.16574835777282715,
-1.5649019479751587,
-0.1396893858909607,
-0.34538644552230835,
-0.6366926431655884,
-1.276195764541626,
-0.030417725443840027,
1.4189229011535645,
-0.7033087015151978,
-0.3120158314704895,
0.5193074941635132,
0.39425384998321533,
0.5769605040550232,
0.5816627740859985,
-0.7377621531486511,
-0.25615647435188293,
-0.22569364309310913,
-0.3167499899864197,
0.3752911686897278,
1.461110234260559,
-0.1362464278936386,
-0.9239768981933594,
0.6764798164367676,
-0.335527241230011,
0.06921336054801941,
1.917765498161316,
0.0631771832704544,
-0.7371236681938171,
0.2520870566368103,
-0.8230152726173401,
1.9206246137619019,
1.79088294506073,
1.2933905124664307,
-0.2483997344970703,
-1.0336134433746338,
0.7096531987190247,
-0.5237310528755188,
-0.32405996322631836,
0.9127907752990723,
0.3242408037185669,
-0.2760791778564453,
-1.3971577882766724,
0.8451112508773804,
1.1545368432998657,
-0.8460969924926758,
-0.8240018486976624,
0.17286306619644165,
-0.7690438032150269,
1.2360199689865112,
0.5993080735206604,
0.2930041551589966,
0.2824642062187195,
1.6348786354064941,
0.7987251281738281,
-0.3411852717399597,
0.5314364433288574,
0.5493870377540588,
-0.2470724880695343,
-2.064531087875366,
-1.2194361686706543,
0.4256712794303894,
-0.6503346562385559,
-1.7184125185012817,
1.4102544784545898,
-1.1857893466949463,
-1.0541826486587524,
0.576887845993042,
0.08627428114414215,
1.3911453485488892,
0.3805525302886963,
1.5292900800704956,
1.9951105117797852,
0.8614479899406433,
0.514039158821106,
1.2274775505065918,
-0.2346300631761551,
-0.426527202129364,
1.7570040225982666,
-0.48206114768981934,
0.42054182291030884,
1.1630934476852417,
-0.2701341509819031,
-1.1190717220306396,
-0.7484117746353149,
-1.3351223468780518,
-0.662887454032898,
1.1166741847991943,
0.13085220754146576,
-1.0489106178283691,
0.1959439516067505,
1.5183167457580566,
0.1067826971411705,
-0.24416251480579376,
0.6864544153213501,
0.41159766912460327,
-0.7793933153152466,
-0.006406016647815704,
-0.8190436363220215,
0.5306724309921265,
-0.2920132875442505,
-0.36155229806900024,
0.4437764286994934,
0.4199492931365967,
1.3852413892745972,
-0.058330126106739044,
0.20543953776359558,
1.0658437013626099,
-1.4288804531097412,
1.441206455230713,
-0.7555726766586304,
0.2816630005836487,
-2.3539533615112305,
1.373471975326538,
-0.6821659803390503,
2.062500476837158,
-2.6516408920288086,
0.48819977045059204,
-0.6216963529586792,
-0.4786001443862915,
0.31755131483078003,
-0.27661389112472534,
0.02520449087023735,
-0.09376010298728943,
-1.1758848428726196,
-0.012742837890982628,
-0.6285548806190491,
0.6162751913070679,
1.1511049270629883,
1.362389326095581,
-1.167575716972351,
-0.22042308747768402,
-1.687145471572876,
-0.15909400582313538,
-0.8131183385848999,
0.26379817724227905,
-2.021789312362671,
-0.2257673591375351,
-2.014719009399414,
-2.421130895614624,
-1.1320523023605347,
-0.7051334381103516,
1.1221846342086792,
0.10910653322935104,
-0.8380353450775146,
1.3815984725952148,
-0.33163273334503174,
-1.8130617141723633,
1.0267350673675537,
-2.1517701148986816
] |
https://github.com/huggingface/datasets/issues/5418
|
Add ProgressBar for `to_parquet`
|
Thanks for your proposal, @zanussbaum. Yes, I agree that would definitely be a nice feature to have!
|
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
| 348 | 17 |
Add ProgressBar for `to_parquet`
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
Thanks for your proposal, @zanussbaum. Yes, I agree that would definitely be a nice feature to have!
|
[
-1.1281404495239258,
-0.9272894859313965,
-0.876679003238678,
1.5756957530975342,
-0.12682101130485535,
-1.3146666288375854,
0.21620792150497437,
-1.059373378753662,
1.6573750972747803,
-0.7932515740394592,
0.4578741490840912,
-1.5561256408691406,
0.07988949865102768,
-0.7136300802230835,
-0.6193981170654297,
-0.873897910118103,
-0.4301373362541199,
-0.5175349116325378,
1.091529130935669,
2.5505177974700928,
1.0191396474838257,
-1.4771682024002075,
2.544720411300659,
0.7214743494987488,
-0.13451515138149261,
-0.9445092082023621,
0.42912477254867554,
0.17260903120040894,
-1.1607656478881836,
-0.399962455034256,
-1.0155117511749268,
-0.16076499223709106,
-0.5788309574127197,
-0.5392469167709351,
-0.027668457478284836,
0.5478978753089905,
-0.24642667174339294,
-0.6296337842941284,
-0.5518124103546143,
-0.6998693346977234,
0.4256819486618042,
-0.41332826018333435,
0.938543975353241,
-0.3074696362018585,
1.7758848667144775,
-0.41819581389427185,
0.5250201225280762,
0.6182492971420288,
1.3641884326934814,
0.15217746794223785,
0.09627576172351837,
0.23134367167949677,
0.4075617790222168,
-0.27861443161964417,
0.3249208927154541,
0.8695982098579407,
0.518976628780365,
0.8052011132240295,
0.7019874453544617,
-2.0462164878845215,
1.395099401473999,
-1.0471655130386353,
0.25739002227783203,
1.4056860208511353,
-1.0393909215927124,
0.45996010303497314,
-1.5878609418869019,
0.02223626896739006,
0.5866193771362305,
-2.0797293186187744,
0.3199303150177002,
-1.049143671989441,
-0.5478959679603577,
0.9756557941436768,
0.42775484919548035,
-1.3861322402954102,
0.10587799549102783,
-0.43561866879463196,
0.9976484775543213,
0.31658273935317993,
1.0885820388793945,
-1.7187469005584717,
0.1817302405834198,
-0.4265875220298767,
0.036636948585510254,
-1.3912959098815918,
-1.3848819732666016,
0.6462904810905457,
0.7246185541152954,
0.6494256258010864,
0.03329512104392052,
0.8205909729003906,
-0.9347159266471863,
0.6505151391029358,
-0.9248959422111511,
-1.6304386854171753,
-1.2243320941925049,
-2.3884756565093994,
-2.3643531799316406,
0.7335440516471863,
-0.25207775831222534,
-0.5820466876029968,
1.9717509746551514,
-0.8866658806800842,
-1.767014980316162,
1.2164443731307983,
0.20846496522426605,
-0.12021376192569733,
2.433619737625122,
0.2786267101764679,
-0.5108869075775146,
0.42935702204704285,
-0.6736804842948914,
0.9441771507263184,
-0.7266268134117126,
1.3765026330947876,
0.36446672677993774,
-1.0217126607894897,
1.6624037027359009,
-0.4471987783908844,
0.7384418249130249,
-0.7718989849090576,
-0.480132520198822,
-0.8855412006378174,
0.5147243738174438,
1.887046456336975,
-0.2137945294380188,
1.4907050132751465,
-0.4745909571647644,
-1.6422873735427856,
-1.6670055389404297,
0.9794357419013977,
0.2838303744792938,
-0.6711035966873169,
0.2883961498737335,
-0.2396184653043747,
0.15287958085536957,
-0.10866601020097733,
1.1000815629959106,
1.370048999786377,
0.6255638599395752,
-0.3043389618396759,
-0.930361807346344,
0.25936707854270935,
-0.05662348493933678,
-0.7215541005134583,
-1.8180431127548218,
-0.30400097370147705,
-0.018201977014541626,
0.6312371492385864,
-1.145630955696106,
1.8191498517990112,
0.94683837890625,
2.002368688583374,
0.9496245384216309,
-0.37419191002845764,
1.3866097927093506,
0.04259897395968437,
1.9117472171783447,
-0.463294118642807,
0.669334888458252,
-0.31736528873443604,
-1.0517752170562744,
0.799575924873352,
-0.4004441201686859,
-1.8912110328674316,
-0.7730682492256165,
-0.8875016570091248,
-0.2537151873111725,
-0.6924043893814087,
0.9895339608192444,
-0.26919201016426086,
-1.3240655660629272,
0.286711722612381,
-0.6601085662841797,
0.2392004281282425,
-1.1541900634765625,
0.3472333550453186,
0.6831545829772949,
-0.5950223803520203,
0.06187133118510246,
-0.4351445138454437,
-1.3722268342971802,
-0.39844104647636414,
0.4127521514892578,
1.7953311204910278,
-0.6922709941864014,
0.7316680550575256,
0.8977439403533936,
-0.6732078790664673,
-0.109097920358181,
0.35074296593666077,
-0.18749403953552246,
0.7328450083732605,
-1.2372578382492065,
-0.31309765577316284,
1.2566955089569092,
-0.20516853034496307,
-0.6289929747581482,
1.4265990257263184,
0.7335100769996643,
-0.97768235206604,
0.07227136939764023,
-0.27338311076164246,
-0.8882578611373901,
0.011812780983746052,
-1.7551673650741577,
-0.045740384608507156,
0.3118869960308075,
-1.4160412549972534,
-0.6414881348609924,
-0.17570453882217407,
1.1009521484375,
-0.013880226761102676,
1.3137874603271484,
-0.36271077394485474,
-0.3228350579738617,
-0.40282848477363586,
-0.3385724723339081,
0.19403612613677979,
-0.37279319763183594,
-0.536437451839447,
0.048717692494392395,
-0.6565065383911133,
0.3712579309940338,
1.522737979888916,
0.17165151238441467,
0.219710111618042,
0.5740746855735779,
1.0060303211212158,
0.29699423909187317,
0.021860715001821518,
-0.8240264058113098,
-1.4277704954147339,
1.9245198965072632,
-1.3802740573883057,
1.9993607997894287,
0.7595146298408508,
0.04880720004439354,
-1.7977570295333862,
-1.7967687845230103,
1.3383866548538208,
1.224254846572876,
2.361588478088379,
0.6469324231147766,
0.3358007073402405,
-0.93553227186203,
-0.6641379594802856,
0.3204480707645416,
-0.952709436416626,
-0.8027654886245728,
0.20525190234184265,
2.2623958587646484,
1.805558681488037,
-0.5528263449668884,
-0.14214634895324707,
-1.1454685926437378,
1.5016740560531616,
-0.20656158030033112,
0.23580926656723022,
2.0005645751953125,
-0.41704386472702026,
-1.0000721216201782,
1.1487663984298706,
-2.3371639251708984,
-0.009837673977017403,
1.8761292695999146,
0.18668457865715027,
0.2423923909664154,
-1.5107815265655518,
-0.8233786821365356,
-0.13746440410614014,
-0.09722615033388138,
-1.347205400466919,
0.505908727645874,
-0.2763116955757141,
-0.5786784887313843,
-1.5067492723464966,
0.32469695806503296,
-1.0184882879257202,
-1.4683942794799805,
0.2481517493724823,
1.853233814239502,
1.9243885278701782,
-0.9102727174758911,
1.6863216161727905,
-0.18475617468357086,
0.06707552820444107,
1.2766163349151611,
1.0015230178833008,
3.0314178466796875,
2.0538101196289062,
-1.1379945278167725,
0.7924217581748962,
-0.0716298297047615,
-0.5801674723625183,
1.2137906551361084,
-1.0545698404312134,
1.4337923526763916,
-0.20495587587356567,
-0.9189208149909973,
-1.1750346422195435,
0.7498875260353088,
0.5680187940597534,
0.11569637805223465,
-0.5381902456283569,
1.3115882873535156,
0.06827574223279953,
1.292479395866394,
0.49372920393943787,
-0.4663817286491394,
0.7443315982818604,
-0.4351513087749481,
-0.497660756111145,
1.5687296390533447,
0.35409289598464966,
-1.461286187171936,
-2.2105746269226074,
-0.19379760324954987,
-0.8235840797424316,
-0.07471317052841187,
-0.6294827461242676,
-0.9563280344009399,
1.6641027927398682,
0.48119056224823,
-1.1762785911560059,
-0.2503427267074585,
-0.24413222074508667,
-0.6570026874542236,
2.7071993350982666,
-1.483335018157959,
-0.419599324464798,
-0.9414243102073669,
-0.5266937017440796,
1.6198431253433228,
-1.2036240100860596,
-0.28707852959632874,
-1.1339932680130005,
-0.45931535959243774,
-1.2058048248291016,
-0.3651457726955414,
0.0962771400809288,
-0.8554049134254456,
0.8877905607223511,
0.09028445929288864,
-1.2863503694534302,
-0.22926370799541473,
-0.8537115454673767,
0.7512811422348022,
-0.06676703691482544,
0.4020894169807434,
1.9235657453536987,
0.44176650047302246,
-0.5142392516136169,
0.6559916734695435,
1.1573492288589478,
0.3989078402519226,
-0.8207195997238159,
0.22923173010349274,
-0.6521031260490417,
0.33405107259750366,
-1.1170732975006104,
0.3471018671989441,
-2.9199376106262207,
0.490159273147583,
-0.10940204560756683,
-0.16696298122406006,
0.020584866404533386,
-1.3845027685165405,
1.0367218255996704,
2.5822999477386475,
-1.2241629362106323,
0.5637314319610596,
0.23064421117305756,
1.4103667736053467,
-1.4800117015838623,
0.45367202162742615,
-0.3177373707294464,
1.981172800064087,
0.15527060627937317,
0.9646086096763611,
-0.635633647441864,
-2.2123050689697266,
0.4749607741832733,
-1.2530299425125122,
-1.2403652667999268,
0.7505687475204468,
-0.8983331322669983,
-0.1489759385585785,
-1.312371015548706,
-0.19318899512290955,
-0.7812942862510681,
-1.3433364629745483,
0.6571071743965149,
0.21153706312179565,
0.5560963153839111,
-0.5930162072181702,
0.3455583155155182,
-2.162349224090576,
-1.4588199853897095,
-0.39141562581062317,
-0.8677620887756348,
0.3583601415157318,
-0.46914321184158325,
0.7434045076370239,
-0.30392220616340637,
0.19173982739448547,
0.22330708801746368,
1.3945788145065308,
3.323216199874878,
0.07385294884443283,
0.5809789299964905,
-0.3173634707927704,
-0.833203911781311,
1.482170581817627,
0.8944827318191528,
0.052160609513521194,
-0.6921555399894714,
-1.0762614011764526,
1.2119826078414917,
2.0460493564605713,
1.0683590173721313,
0.020493503659963608,
-0.8210338354110718,
-0.5035135746002197,
-0.12428933382034302,
0.11545252799987793,
0.2927330434322357,
0.9097388386726379,
0.13791042566299438,
0.08743204921483994,
1.284393310546875,
1.2934945821762085,
-0.4765942394733429,
0.3897098898887634,
-0.7559378743171692,
-0.35199159383773804,
0.4568922221660614,
0.4482174217700958,
0.008791918866336346,
0.17517836391925812,
-0.8702683448791504,
-0.22485382854938507,
-0.4777422249317169,
-1.0432208776474,
-0.7525233626365662,
-0.5768784880638123,
-0.31784582138061523,
1.8205102682113647,
0.18452893197536469,
-0.7402395606040955,
-0.07507163286209106,
-0.8299158811569214,
0.06311499327421188,
-1.037138819694519,
0.1271178424358368,
-0.1658569574356079,
-0.1844588965177536,
0.16544431447982788,
1.86176335811615,
-1.1678807735443115,
-2.2889366149902344,
0.2537057101726532,
0.15796643495559692,
-0.27908241748809814,
0.2906780540943146,
1.5491832494735718,
0.5409221053123474,
1.5201168060302734,
1.3631625175476074,
1.1301071643829346,
-1.038022518157959,
-1.379351019859314,
0.6397678256034851,
1.0004712343215942,
-1.6110584735870361,
0.7477387189865112,
0.22279700636863708,
-0.4457029700279236,
0.6576761603355408,
1.2066679000854492,
0.38824334740638733,
-1.9144501686096191,
0.706641435623169,
-0.8981906175613403,
0.9772193431854248,
0.7835226655006409,
0.6210409998893738,
0.2865733504295349,
0.7569963932037354,
-1.0676758289337158,
-1.2582083940505981,
-0.781517505645752,
-0.7064226865768433,
2.13527774810791,
-0.35264113545417786,
0.5855349898338318,
-0.15461793541908264,
-1.3227699995040894,
0.04432562366127968,
0.9055042266845703,
0.5386983752250671,
-0.5011255145072937,
0.6022610068321228,
-0.7055583000183105,
-1.0408337116241455,
-1.484204649925232,
-0.7028065323829651,
-1.0945392847061157,
-1.0401641130447388,
1.1734521389007568,
0.8062297105789185,
0.21943317353725433,
1.8540191650390625,
0.7160369157791138,
0.25163596868515015,
-2.492882013320923,
0.9694294333457947,
0.3288869559764862,
0.1571100801229477,
0.7145243287086487,
0.4684991240501404,
0.9730604887008667,
-0.12270411103963852,
0.49062153697013855,
-2.3731629848480225,
2.483816385269165,
-0.35331621766090393,
0.6081810593605042,
-0.13672739267349243,
-0.14842313528060913,
1.1393194198608398,
0.551058292388916,
0.5803642868995667,
-1.175309419631958,
0.5796211361885071,
-0.4892902374267578,
1.3581291437149048,
0.8624371290206909,
-0.8304432034492493,
-0.0921986997127533,
1.3126038312911987,
0.46263498067855835,
-0.5914791226387024,
-0.9825324416160583,
-0.9705123901367188,
0.8709070086479187,
1.678074836730957,
-0.12629124522209167,
0.06524243950843811,
0.8513585925102234,
0.4936753213405609,
-1.3652909994125366,
0.06535721570253372,
-0.8938755393028259,
-0.7491474747657776,
1.6474690437316895,
2.0267460346221924,
-0.10990769416093826,
-0.13142427802085876,
-0.8670528531074524,
-1.3250291347503662,
0.8255385160446167,
0.0615970604121685,
0.062484707683324814,
0.5093344449996948,
-0.6597332954406738,
1.0855127573013306,
0.7649305462837219,
0.79169100522995,
0.14633578062057495,
0.2702559232711792,
0.6252265572547913,
-0.4310797154903412,
-1.114451289176941,
-0.21032314002513885,
-1.200824499130249,
-2.5123398303985596,
0.3816663920879364,
-0.22999761998653412,
-1.4558964967727661,
-0.10211484879255295,
-0.9988604187965393,
0.9698274731636047,
-0.47813132405281067,
-1.0719624757766724,
-1.6241164207458496,
0.1456630975008011,
-0.13007943332195282,
0.963805079460144,
-1.6578185558319092,
-0.03438669815659523,
1.0971659421920776,
0.8873723745346069,
-0.7937277555465698,
1.0460052490234375,
0.1090620905160904,
1.0180327892303467,
0.9540184736251831,
-0.304054319858551,
0.3858206868171692,
-0.12567414343357086,
-1.3091579675674438,
0.45758241415023804,
1.1497764587402344,
0.1268591731786728,
1.3788366317749023,
-0.5703864097595215,
0.0058013517409563065,
0.24803319573402405,
-0.4551541805267334,
-0.41068196296691895,
-0.4962448179721832,
0.671482264995575,
0.10489770025014877,
-0.7824716567993164,
0.04828595370054245,
0.048210423439741135,
-0.18588902056217194,
0.11698257923126221,
-1.5954866409301758,
-0.12475279718637466,
-0.40150967240333557,
-0.5221607685089111,
-1.1918085813522339,
-0.04457930475473404,
1.3235973119735718,
-0.5073268413543701,
-0.20566019415855408,
0.588784396648407,
0.5376559495925903,
0.48733222484588623,
0.5422577857971191,
-0.6904347538948059,
-0.20166704058647156,
-0.13108956813812256,
-0.24672916531562805,
0.3862370550632477,
1.393527626991272,
-0.26822134852409363,
-0.990393877029419,
0.7474405169487,
-0.4748459756374359,
0.09405475109815598,
1.9860031604766846,
0.1469597965478897,
-0.9041419625282288,
0.24767959117889404,
-0.7796136140823364,
1.9923934936523438,
1.7975901365280151,
1.3073208332061768,
-0.14908333122730255,
-1.0403286218643188,
0.7741659879684448,
-0.34637919068336487,
-0.3209969997406006,
0.8876817226409912,
0.33403244614601135,
-0.27637946605682373,
-1.4003602266311646,
0.5967739820480347,
1.1803637742996216,
-0.636504590511322,
-1.0545519590377808,
-0.026051264256238937,
-0.725217342376709,
1.0930919647216797,
0.9137910604476929,
0.6241806149482727,
0.2719520032405853,
1.6472558975219727,
0.7478176355361938,
-0.5565394163131714,
0.577996015548706,
0.42012229561805725,
-0.12360759824514389,
-2.029515266418457,
-1.251918911933899,
0.2607778012752533,
-0.5761620402336121,
-1.6552222967147827,
1.3114988803863525,
-1.1890345811843872,
-0.9621858596801758,
0.6203773021697998,
0.0826081708073616,
1.6415308713912964,
0.34332379698753357,
1.368208646774292,
2.089769124984741,
0.8328988552093506,
0.42433223128318787,
1.36952805519104,
-0.26728036999702454,
-0.5929235219955444,
1.9835929870605469,
-0.467909574508667,
0.4226706027984619,
1.0868629217147827,
-0.2960303723812103,
-1.081524133682251,
-0.7203571200370789,
-1.1457175016403198,
-0.6401774287223816,
1.1580089330673218,
0.03890424594283104,
-1.046988844871521,
0.40481024980545044,
1.6216785907745361,
0.05504116043448448,
-0.4826437532901764,
0.6205902695655823,
0.4620001018047333,
-0.8741264939308167,
-0.013542166911065578,
-0.9106394648551941,
0.6135498881340027,
-0.2941269278526306,
-0.3157314658164978,
0.5561918616294861,
0.4676690101623535,
1.2208927869796753,
-0.03450831025838852,
0.25460851192474365,
1.124384880065918,
-1.5002142190933228,
1.4195168018341064,
-0.5815063714981079,
0.21837587654590607,
-2.407174587249756,
1.4083387851715088,
-0.5558388829231262,
1.8556493520736694,
-2.800762414932251,
0.3988471031188965,
-0.6285058259963989,
-0.5662333965301514,
0.4283751845359802,
-0.3169550895690918,
0.178326815366745,
-0.1951606273651123,
-1.268404483795166,
-0.04401922971010208,
-0.6500956416130066,
0.5069505572319031,
1.1135811805725098,
1.1817221641540527,
-0.9838850498199463,
-0.15746913850307465,
-1.7167667150497437,
-0.008141662925481796,
-0.7219089269638062,
0.35651466250419617,
-2.1457135677337646,
-0.35899412631988525,
-1.7854256629943848,
-2.353168487548828,
-1.283948540687561,
-0.700114905834198,
1.078464150428772,
0.224517822265625,
-0.912979006767273,
1.2498494386672974,
-0.39867234230041504,
-1.924822449684143,
1.020774483680725,
-2.0753791332244873
] |
https://github.com/huggingface/datasets/issues/5418
|
Add ProgressBar for `to_parquet`
|
That would be awesome ! You can comment `#self-assign` to assign you to this issue and open a PR :) Will be happy to review
|
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
| 348 | 25 |
Add ProgressBar for `to_parquet`
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
That would be awesome ! You can comment `#self-assign` to assign you to this issue and open a PR :) Will be happy to review
|
[
-1.104288935661316,
-0.9040449857711792,
-0.8816316723823547,
1.6051945686340332,
-0.13855379819869995,
-1.3316636085510254,
0.15115419030189514,
-1.067552089691162,
1.6967405080795288,
-0.7785230875015259,
0.4231182038784027,
-1.550559639930725,
0.10968958586454391,
-0.7439088821411133,
-0.6875476241111755,
-0.8557696342468262,
-0.449737548828125,
-0.5533580780029297,
1.0210793018341064,
2.5487399101257324,
1.0853177309036255,
-1.4631046056747437,
2.6086487770080566,
0.7509883642196655,
-0.15183097124099731,
-0.9150233864784241,
0.407758504152298,
0.11388850212097168,
-1.167561650276184,
-0.42658787965774536,
-0.9766350984573364,
-0.18141233921051025,
-0.5520533919334412,
-0.5660819411277771,
-0.029563207179307938,
0.5306089520454407,
-0.25314271450042725,
-0.6285127997398376,
-0.5775178670883179,
-0.7506182193756104,
0.47432759404182434,
-0.4246225655078888,
0.8745900392532349,
-0.3761722445487976,
1.7644520998001099,
-0.4577272832393646,
0.4735255539417267,
0.6301636099815369,
1.337096095085144,
0.11597054451704025,
0.0994059145450592,
0.2917196750640869,
0.3562018573284149,
-0.29804790019989014,
0.2977741062641144,
1.0124741792678833,
0.529396653175354,
0.7723959684371948,
0.7233292460441589,
-2.0901384353637695,
1.4146226644515991,
-1.0162373781204224,
0.310550332069397,
1.2552415132522583,
-1.074323058128357,
0.43960806727409363,
-1.562537670135498,
0.04014787822961807,
0.5896387100219727,
-2.069171190261841,
0.3607211410999298,
-1.0884233713150024,
-0.6234661936759949,
1.0183974504470825,
0.38581690192222595,
-1.3974040746688843,
0.09447482973337173,
-0.4744178056716919,
0.9581252336502075,
0.3202228248119354,
1.063894271850586,
-1.6015852689743042,
0.20942093431949615,
-0.39095282554626465,
-0.009586897678673267,
-1.4043219089508057,
-1.3746074438095093,
0.6165411472320557,
0.7485402226448059,
0.6691860556602478,
0.020202118903398514,
0.8528376817703247,
-0.8887931704521179,
0.6474729180335999,
-0.9025144577026367,
-1.7121814489364624,
-1.2444449663162231,
-2.348165273666382,
-2.2799017429351807,
0.7635003328323364,
-0.29924827814102173,
-0.5977219939231873,
1.9782203435897827,
-0.8651984930038452,
-1.8245352506637573,
1.264148473739624,
0.2346070408821106,
-0.14151285588741302,
2.35646390914917,
0.30196642875671387,
-0.5201559662818909,
0.4889545440673828,
-0.6451860070228577,
0.9484879970550537,
-0.8061232566833496,
1.358201265335083,
0.3211676776409149,
-1.0924731492996216,
1.6814278364181519,
-0.5314674973487854,
0.772649347782135,
-0.8177711367607117,
-0.5004824995994568,
-0.8791615962982178,
0.5655156373977661,
1.8239610195159912,
-0.22599388659000397,
1.499297857284546,
-0.4328789710998535,
-1.6547908782958984,
-1.7127807140350342,
0.9425852298736572,
0.3164675831794739,
-0.6376133561134338,
0.2857663333415985,
-0.2556215524673462,
0.0790582224726677,
-0.10403620451688766,
1.127677321434021,
1.4108757972717285,
0.6272472143173218,
-0.2198564112186432,
-0.8596445322036743,
0.25313061475753784,
0.0081831905990839,
-0.6793656349182129,
-1.809913158416748,
-0.3115331828594208,
0.06337375193834305,
0.5684581398963928,
-1.1904025077819824,
1.7426559925079346,
0.9543144106864929,
1.9702541828155518,
1.0567892789840698,
-0.32197102904319763,
1.4853124618530273,
0.04669144004583359,
1.879189133644104,
-0.484982430934906,
0.6852832436561584,
-0.2808193862438202,
-1.0892435312271118,
0.7889729738235474,
-0.4490118622779846,
-1.9750752449035645,
-0.7479085326194763,
-0.9014869928359985,
-0.21882516145706177,
-0.6428911685943604,
0.9857890605926514,
-0.29458171129226685,
-1.214368224143982,
0.2802933156490326,
-0.7474908232688904,
0.260766863822937,
-1.1378570795059204,
0.360708087682724,
0.7468519806861877,
-0.5929372906684875,
0.10674425959587097,
-0.4273267090320587,
-1.357275128364563,
-0.3957975506782532,
0.45350998640060425,
1.7649929523468018,
-0.7329144477844238,
0.7297744750976562,
0.9229683876037598,
-0.6692025065422058,
-0.1243046224117279,
0.39426207542419434,
-0.21040426194667816,
0.8059312105178833,
-1.2412267923355103,
-0.34609296917915344,
1.233336329460144,
-0.17565636336803436,
-0.7243849039077759,
1.4345673322677612,
0.7124435901641846,
-0.9819780588150024,
0.022773390635848045,
-0.2692451775074005,
-0.9358461499214172,
-0.003996033221483231,
-1.7754733562469482,
-0.05243389308452606,
0.3391607105731964,
-1.4860035181045532,
-0.6114015579223633,
-0.17076988518238068,
1.1018614768981934,
-0.029491441324353218,
1.323926568031311,
-0.35049667954444885,
-0.29333651065826416,
-0.3331280052661896,
-0.40530380606651306,
0.17444948852062225,
-0.3690980076789856,
-0.5356556177139282,
0.0332258976995945,
-0.6551641225814819,
0.36649632453918457,
1.5294511318206787,
0.1657603234052658,
0.24548479914665222,
0.6166385412216187,
1.0555105209350586,
0.330287367105484,
-0.05156523361802101,
-0.7489215135574341,
-1.45793616771698,
1.8765963315963745,
-1.4064476490020752,
2.0418009757995605,
0.7948823571205139,
0.05076067894697189,
-1.8049054145812988,
-1.820371150970459,
1.373106837272644,
1.2024005651474,
2.354888677597046,
0.6768118143081665,
0.37495383620262146,
-0.9976423978805542,
-0.7137089371681213,
0.3712746798992157,
-1.0431385040283203,
-0.7798364162445068,
0.1436123251914978,
2.3136496543884277,
1.881489872932434,
-0.502740204334259,
-0.15968456864356995,
-1.1365677118301392,
1.5146104097366333,
-0.19502969086170197,
0.20119312405586243,
1.9926626682281494,
-0.37266892194747925,
-0.9269417524337769,
1.1002839803695679,
-2.301218032836914,
0.008437925949692726,
1.8891443014144897,
0.1743338406085968,
0.2041044980287552,
-1.4603158235549927,
-0.7248215675354004,
-0.11652997881174088,
-0.06701505184173584,
-1.3128830194473267,
0.5935474038124084,
-0.23697587847709656,
-0.5838689208030701,
-1.4766179323196411,
0.31455501914024353,
-1.0228261947631836,
-1.4768376350402832,
0.22996236383914948,
1.8783268928527832,
1.8894253969192505,
-0.8679846525192261,
1.7724541425704956,
-0.17095933854579926,
0.0471014678478241,
1.2729508876800537,
1.0437597036361694,
3.066378593444824,
2.0297200679779053,
-1.1685420274734497,
0.7091567516326904,
-0.021160025149583817,
-0.6077332496643066,
1.2263771295547485,
-1.0912702083587646,
1.460660696029663,
-0.2636640965938568,
-0.995654284954071,
-1.144844889640808,
0.7741936445236206,
0.5976036787033081,
0.106415756046772,
-0.5336241126060486,
1.3098942041397095,
0.035649996250867844,
1.2376033067703247,
0.5154587030410767,
-0.45472487807273865,
0.756088376045227,
-0.4416792690753937,
-0.4662911891937256,
1.4710029363632202,
0.374893456697464,
-1.4021868705749512,
-2.143615961074829,
-0.1048181876540184,
-0.8544954657554626,
-0.07875420898199081,
-0.6366623640060425,
-1.021080493927002,
1.6915371417999268,
0.4764392077922821,
-1.1846966743469238,
-0.27102285623550415,
-0.20599327981472015,
-0.6627807021141052,
2.688821792602539,
-1.4640874862670898,
-0.43033888936042786,
-0.9497537016868591,
-0.4902064800262451,
1.636423945426941,
-1.225211262702942,
-0.2764575183391571,
-1.0698126554489136,
-0.4398145079612732,
-1.1663916110992432,
-0.44817787408828735,
0.0610433891415596,
-0.8219280242919922,
0.9718915224075317,
0.0789821520447731,
-1.3320304155349731,
-0.22869731485843658,
-0.8404673933982849,
0.7313003540039062,
-0.09534472972154617,
0.3849373161792755,
1.974498987197876,
0.41035157442092896,
-0.5226426124572754,
0.6853207945823669,
1.1767410039901733,
0.4126874506473541,
-0.801704466342926,
0.33004072308540344,
-0.6441735625267029,
0.3383060097694397,
-1.1892943382263184,
0.3240568935871124,
-2.937539577484131,
0.5378226041793823,
-0.04923868179321289,
-0.1298084259033203,
0.06298993527889252,
-1.360880970954895,
0.934849202632904,
2.549290895462036,
-1.2441930770874023,
0.5713284611701965,
0.22718143463134766,
1.3276982307434082,
-1.5396654605865479,
0.4116203784942627,
-0.3406507074832916,
1.998229742050171,
0.07330956310033798,
1.0231534242630005,
-0.6050442457199097,
-2.208252191543579,
0.4925180971622467,
-1.2256113290786743,
-1.202166199684143,
0.713198721408844,
-0.9174261093139648,
-0.17213916778564453,
-1.2957239151000977,
-0.17931140959262848,
-0.783557653427124,
-1.3169763088226318,
0.6523147225379944,
0.19317811727523804,
0.538040280342102,
-0.5774272680282593,
0.31695234775543213,
-2.1099181175231934,
-1.5058189630508423,
-0.3893471658229828,
-0.7747080326080322,
0.3943854570388794,
-0.4416836202144623,
0.7532716989517212,
-0.3301042914390564,
0.1576867252588272,
0.21089619398117065,
1.3362705707550049,
3.2427587509155273,
0.08782273530960083,
0.5278940200805664,
-0.31724101305007935,
-0.8647453188896179,
1.4462928771972656,
0.9267203211784363,
-0.017537308856844902,
-0.7139711380004883,
-1.0800104141235352,
1.2537412643432617,
1.9868159294128418,
1.054483413696289,
0.04207237437367439,
-0.8243027329444885,
-0.5657411217689514,
-0.1676114946603775,
0.05982323735952377,
0.2946862280368805,
0.9262533783912659,
0.19250039756298065,
0.14647173881530762,
1.3138976097106934,
1.3121641874313354,
-0.46438735723495483,
0.38127925992012024,
-0.7016188502311707,
-0.32514986395835876,
0.444807767868042,
0.4879153370857239,
-0.03336381912231445,
0.08380003273487091,
-0.8912375569343567,
-0.25506073236465454,
-0.4539402723312378,
-0.9922589063644409,
-0.7782679796218872,
-0.5451513528823853,
-0.2795594334602356,
1.7521151304244995,
0.17280304431915283,
-0.7229174971580505,
-0.10424255579710007,
-0.8490421175956726,
0.04734310135245323,
-1.0240007638931274,
0.16617533564567566,
-0.16058672964572906,
-0.2771519720554352,
0.08342625945806503,
1.8756097555160522,
-1.2130765914916992,
-2.2752301692962646,
0.2575836479663849,
0.09412894397974014,
-0.2824731767177582,
0.25172242522239685,
1.5789397954940796,
0.521598219871521,
1.4709833860397339,
1.3978583812713623,
1.1023670434951782,
-1.0134507417678833,
-1.3041819334030151,
0.5605252981185913,
1.0501121282577515,
-1.6210275888442993,
0.7029220461845398,
0.2006562501192093,
-0.4761497974395752,
0.7042328119277954,
1.2206902503967285,
0.44833171367645264,
-1.9044344425201416,
0.6956583261489868,
-0.8842294216156006,
0.9636187553405762,
0.8397536873817444,
0.5649264454841614,
0.30982717871665955,
0.7583792805671692,
-1.126455307006836,
-1.3243340253829956,
-0.7316498160362244,
-0.7279940843582153,
2.1117098331451416,
-0.36940139532089233,
0.6252284049987793,
-0.08223029971122742,
-1.4858108758926392,
-0.005856262985616922,
0.8828772306442261,
0.48451313376426697,
-0.5759304165840149,
0.5852610468864441,
-0.6652565598487854,
-1.0570300817489624,
-1.422828197479248,
-0.7177629470825195,
-1.0834953784942627,
-1.047203540802002,
1.1351678371429443,
0.9039918780326843,
0.2691466510295868,
1.9121006727218628,
0.7403503060340881,
0.2413625866174698,
-2.5227911472320557,
0.8979030251502991,
0.41820845007896423,
0.14496472477912903,
0.6656068563461304,
0.4489941895008087,
0.931134045124054,
-0.11339560151100159,
0.47211185097694397,
-2.3571102619171143,
2.47752046585083,
-0.34385713934898376,
0.6556512713432312,
-0.15537577867507935,
-0.10177300870418549,
1.1786009073257446,
0.528282642364502,
0.6261754035949707,
-1.121896743774414,
0.5885161757469177,
-0.4258009195327759,
1.3601363897323608,
0.866357684135437,
-0.8799141645431519,
-0.10567761957645416,
1.2991708517074585,
0.40536969900131226,
-0.6765264272689819,
-0.9707210063934326,
-0.9526304602622986,
0.9087509512901306,
1.7573657035827637,
-0.046403758227825165,
0.15665727853775024,
0.9036150574684143,
0.429668128490448,
-1.3827807903289795,
0.06825107336044312,
-0.8803669214248657,
-0.7274367213249207,
1.6798851490020752,
1.9735383987426758,
-0.15669280290603638,
-0.08033398538827896,
-0.8615105152130127,
-1.2892954349517822,
0.8820800185203552,
0.07284492254257202,
0.00852886214852333,
0.5442344546318054,
-0.6242687106132507,
1.089500904083252,
0.7832378149032593,
0.792832612991333,
0.1516556590795517,
0.24203947186470032,
0.6356937289237976,
-0.4234045147895813,
-1.1467512845993042,
-0.1939428448677063,
-1.084838628768921,
-2.483808994293213,
0.35696160793304443,
-0.20771214365959167,
-1.401567816734314,
-0.15918125212192535,
-0.9967796802520752,
1.0138554573059082,
-0.46125155687332153,
-1.099959373474121,
-1.5969432592391968,
0.2064654678106308,
-0.1303081512451172,
0.9501879215240479,
-1.551213264465332,
-0.06085198000073433,
1.0184786319732666,
0.9140971899032593,
-0.8496778607368469,
1.0251638889312744,
0.10501165688037872,
1.0648654699325562,
1.0338311195373535,
-0.29113954305648804,
0.36467891931533813,
-0.07096409797668457,
-1.3005268573760986,
0.4369259774684906,
1.2163134813308716,
0.03538200631737709,
1.4301257133483887,
-0.5444591641426086,
-0.0946197360754013,
0.28175920248031616,
-0.399609237909317,
-0.31274157762527466,
-0.5454666018486023,
0.655547559261322,
0.10122253000736237,
-0.7567004561424255,
0.012770865112543106,
0.07648707181215286,
-0.1996658891439438,
0.08309619873762131,
-1.6356295347213745,
-0.03286360949277878,
-0.38391655683517456,
-0.6084097027778625,
-1.1498204469680786,
-0.04694218933582306,
1.2998712062835693,
-0.4760296940803528,
-0.31224822998046875,
0.5856645703315735,
0.5060110092163086,
0.538753092288971,
0.5308076739311218,
-0.7265221476554871,
-0.23781579732894897,
-0.07859715074300766,
-0.2907833755016327,
0.4239916503429413,
1.4212439060211182,
-0.1848549097776413,
-0.939056932926178,
0.7731536626815796,
-0.531113862991333,
0.08453167974948883,
1.9381999969482422,
0.19392016530036926,
-0.8785492181777954,
0.2613076865673065,
-0.8522773385047913,
1.985248327255249,
1.7923272848129272,
1.2456996440887451,
-0.07880355417728424,
-1.0539361238479614,
0.7830480337142944,
-0.32403916120529175,
-0.3566509783267975,
0.856594443321228,
0.2741568386554718,
-0.2421155422925949,
-1.3627893924713135,
0.6835703253746033,
1.16456937789917,
-0.7046601176261902,
-1.0315008163452148,
-0.05867733061313629,
-0.722057044506073,
1.0658355951309204,
0.8740626573562622,
0.6004025340080261,
0.29514995217323303,
1.6446791887283325,
0.7264038324356079,
-0.5855231285095215,
0.6337597370147705,
0.4720732569694519,
-0.05878116562962532,
-2.0145668983459473,
-1.278018832206726,
0.3493039608001709,
-0.5404331684112549,
-1.7249062061309814,
1.2818893194198608,
-1.2102024555206299,
-0.9810866117477417,
0.6039661765098572,
0.09570814669132233,
1.5861601829528809,
0.23746848106384277,
1.3330761194229126,
2.12565016746521,
0.8390878438949585,
0.4493299126625061,
1.443220615386963,
-0.30309388041496277,
-0.5139228701591492,
1.9585751295089722,
-0.5505979061126709,
0.4049839377403259,
1.051534652709961,
-0.34489959478378296,
-1.0761317014694214,
-0.6709328293800354,
-1.1654523611068726,
-0.6844714879989624,
1.0922656059265137,
0.05172266811132431,
-1.0227009057998657,
0.4070717394351959,
1.6522043943405151,
0.06374044716358185,
-0.47618353366851807,
0.5695457458496094,
0.4675944149494171,
-0.8670273423194885,
-0.01610385812819004,
-0.887053906917572,
0.6314936280250549,
-0.27674224972724915,
-0.2768845558166504,
0.5225216746330261,
0.47565481066703796,
1.1946427822113037,
-0.045083243399858475,
0.12255815416574478,
1.0611870288848877,
-1.5173537731170654,
1.3885607719421387,
-0.6424382925033569,
0.24869784712791443,
-2.4635870456695557,
1.4604606628417969,
-0.5471382141113281,
1.8951979875564575,
-2.6983463764190674,
0.3737495541572571,
-0.6413556337356567,
-0.5590992569923401,
0.418932169675827,
-0.2818814218044281,
0.14770624041557312,
-0.20417162775993347,
-1.3031233549118042,
0.020756423473358154,
-0.6501911282539368,
0.5147373080253601,
1.17377507686615,
1.1716017723083496,
-1.0158920288085938,
-0.10736317932605743,
-1.7001200914382935,
0.005650437902659178,
-0.7326840758323669,
0.33598873019218445,
-2.146134376525879,
-0.3644683361053467,
-1.7308003902435303,
-2.34818696975708,
-1.2992953062057495,
-0.7016714215278625,
1.0889593362808228,
0.19274072349071503,
-0.941691517829895,
1.2116665840148926,
-0.4201306998729706,
-1.942144751548767,
1.029863715171814,
-2.08593487739563
] |
https://github.com/huggingface/datasets/issues/5414
|
Sharding error with Multilingual LibriSpeech
|
Thanks for reporting, @Nithin-Holla.
This is a known issue for multiple datasets and we are investigating it:
- See e.g.: https://huggingface.co/datasets/ami/discussions/3
|
### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/2.1.0/1904af50f57a5c370c9364cc337699cfe496d4e9edcae6648a96be23086362d0...
Downloading data files: 100%
3/3 [00:00<00:00, 107.23it/s]
Downloading data files: 100%
1/1 [00:00<00:00, 35.08it/s]
Downloading data files: 100%
6/6 [00:00<00:00, 303.36it/s]
Downloading data files: 100%
3/3 [00:00<00:00, 130.37it/s]
Downloading data files: 100%
1049/1049 [00:00<00:00, 4491.40it/s]
Downloading data files: 100%
37/37 [00:00<00:00, 1096.78it/s]
Downloading data files: 100%
40/40 [00:00<00:00, 1003.93it/s]
Extracting data files: 100%
3/3 [00:11<00:00, 2.62s/it]
Generating train split:
469942/0 [34:13<00:00, 273.21 examples/s]
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-14-74fa6d092bdc> in <module>
----> 1 mls = load_dataset(MLS_DATASET,
2 LANGUAGE,
3 cache_dir="~/datadrive/cache/huggingface/datasets",
4 ignore_verifications=True)
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs)
1755
1756 # Download and prepare data
-> 1757 builder_instance.download_and_prepare(
1758 download_config=download_config,
1759 download_mode=download_mode,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
858 if num_proc is not None:
859 prepare_split_kwargs["num_proc"] = num_proc
--> 860 self._download_and_prepare(
861 dl_manager=dl_manager,
862 verify_infos=verify_infos,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
1609
1610 def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
...
RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
- key audio_archives has length 1049
- key local_extracted_archive has length 1049
- key limited_ids_paths has length 1
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length.
```
### Steps to reproduce the bug
Here is the code to reproduce it:
```python
from datasets import load_dataset
MLS_DATASET = "facebook/multilingual_librispeech"
LANGUAGE = "german"
mls = load_dataset(MLS_DATASET,
LANGUAGE,
cache_dir="~/datadrive/cache/huggingface/datasets",
ignore_verifications=True)
```
### Expected behavior
The expected behaviour is that the dataset is successfully loaded.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-1094-azure-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 10.0.1
- Pandas version: 1.2.4
| 349 | 21 |
Sharding error with Multilingual LibriSpeech
### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/2.1.0/1904af50f57a5c370c9364cc337699cfe496d4e9edcae6648a96be23086362d0...
Downloading data files: 100%
3/3 [00:00<00:00, 107.23it/s]
Downloading data files: 100%
1/1 [00:00<00:00, 35.08it/s]
Downloading data files: 100%
6/6 [00:00<00:00, 303.36it/s]
Downloading data files: 100%
3/3 [00:00<00:00, 130.37it/s]
Downloading data files: 100%
1049/1049 [00:00<00:00, 4491.40it/s]
Downloading data files: 100%
37/37 [00:00<00:00, 1096.78it/s]
Downloading data files: 100%
40/40 [00:00<00:00, 1003.93it/s]
Extracting data files: 100%
3/3 [00:11<00:00, 2.62s/it]
Generating train split:
469942/0 [34:13<00:00, 273.21 examples/s]
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-14-74fa6d092bdc> in <module>
----> 1 mls = load_dataset(MLS_DATASET,
2 LANGUAGE,
3 cache_dir="~/datadrive/cache/huggingface/datasets",
4 ignore_verifications=True)
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs)
1755
1756 # Download and prepare data
-> 1757 builder_instance.download_and_prepare(
1758 download_config=download_config,
1759 download_mode=download_mode,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
858 if num_proc is not None:
859 prepare_split_kwargs["num_proc"] = num_proc
--> 860 self._download_and_prepare(
861 dl_manager=dl_manager,
862 verify_infos=verify_infos,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
1609
1610 def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
...
RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
- key audio_archives has length 1049
- key local_extracted_archive has length 1049
- key limited_ids_paths has length 1
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length.
```
### Steps to reproduce the bug
Here is the code to reproduce it:
```python
from datasets import load_dataset
MLS_DATASET = "facebook/multilingual_librispeech"
LANGUAGE = "german"
mls = load_dataset(MLS_DATASET,
LANGUAGE,
cache_dir="~/datadrive/cache/huggingface/datasets",
ignore_verifications=True)
```
### Expected behavior
The expected behaviour is that the dataset is successfully loaded.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-1094-azure-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 10.0.1
- Pandas version: 1.2.4
Thanks for reporting, @Nithin-Holla.
This is a known issue for multiple datasets and we are investigating it:
- See e.g.: https://huggingface.co/datasets/ami/discussions/3
|
[
-1.138941764831543,
-0.8181207180023193,
-0.6920398473739624,
1.4167742729187012,
-0.001813550479710102,
-1.3891597986221313,
0.020772943273186684,
-0.9953727126121521,
1.4881454706192017,
-0.7330920696258545,
0.3880062401294708,
-1.7275402545928955,
0.11068633943796158,
-0.5629322528839111,
-0.7662057280540466,
-0.6650322675704956,
-0.3758181631565094,
-0.8200070261955261,
1.0367423295974731,
2.4297006130218506,
1.1345123052597046,
-1.393731713294983,
2.833364248275757,
0.616298496723175,
-0.22501122951507568,
-0.8457669615745544,
0.5422235727310181,
0.06699128448963165,
-1.612910509109497,
-0.21839436888694763,
-1.0096913576126099,
-0.05668359249830246,
-0.707485020160675,
-0.4410756230354309,
0.1170145720243454,
0.40216562151908875,
-0.16789400577545166,
-0.37350431084632874,
-0.35262420773506165,
-0.7354463338851929,
0.613778293132782,
-0.20211823284626007,
0.9119916558265686,
-0.3316500186920166,
1.6774533987045288,
-0.7148521542549133,
0.38716527819633484,
0.5659410357475281,
1.2066142559051514,
0.20432054996490479,
-0.030215082690119743,
0.4446386694908142,
0.26719751954078674,
0.05886725336313248,
0.4215300977230072,
1.3046543598175049,
0.5428954362869263,
0.4162316620349884,
0.760205864906311,
-2.152904987335205,
1.2995463609695435,
-0.7343491315841675,
0.2727019488811493,
1.330796480178833,
-0.9463475942611694,
0.42593154311180115,
-1.8678877353668213,
-0.18098676204681396,
0.43145227432250977,
-2.1503450870513916,
0.20887282490730286,
-1.2389835119247437,
-0.548102855682373,
0.9612423181533813,
0.37674182653427124,
-1.1740888357162476,
0.015840301290154457,
-0.614325225353241,
1.009214997291565,
0.3572167158126831,
1.1861802339553833,
-1.5233112573623657,
0.10742418467998505,
-0.21005719900131226,
0.3188250660896301,
-1.1873180866241455,
-1.5680017471313477,
0.6630892157554626,
0.7000831365585327,
0.6259577870368958,
-0.07902379333972931,
0.8887122273445129,
-1.1051377058029175,
0.9359156489372253,
-0.910617470741272,
-1.903621792793274,
-1.337243914604187,
-2.306811571121216,
-2.3194377422332764,
0.7898586392402649,
-0.4558325707912445,
-0.41758739948272705,
2.1401405334472656,
-1.0095690488815308,
-1.7112362384796143,
1.0721546411514282,
0.23985625803470612,
-0.06831195205450058,
2.370269775390625,
0.2793080508708954,
-0.9608579874038696,
0.7102648615837097,
-0.8296676278114319,
0.6678579449653625,
-0.1958288848400116,
1.2834714651107788,
0.380338579416275,
-0.9431919455528259,
1.5241631269454956,
-0.4323858320713043,
0.4277401268482208,
-0.7145216464996338,
-0.5063578486442566,
-0.5504176616668701,
0.10731445997953415,
1.9666111469268799,
-0.27154552936553955,
1.5359638929367065,
-0.154377743601799,
-1.507893443107605,
-1.3304951190948486,
0.74345463514328,
0.64244145154953,
-0.9486799240112305,
0.1243850588798523,
-0.3820778727531433,
0.13456298410892487,
0.13762864470481873,
1.0008537769317627,
1.3054265975952148,
0.8168379664421082,
-0.24813152849674225,
-0.9145315885543823,
0.0793628841638565,
-0.13671797513961792,
-0.7058896422386169,
-1.667547345161438,
-0.21500517427921295,
0.15526631474494934,
0.7365972399711609,
-1.3443846702575684,
1.9534343481063843,
0.8984724879264832,
2.161592960357666,
0.9462829232215881,
-0.46414119005203247,
1.637678861618042,
0.019641224294900894,
1.951363444328308,
-0.3283692002296448,
0.597511887550354,
-0.5411403775215149,
-1.119734525680542,
0.7538047432899475,
-0.29672884941101074,
-2.0092263221740723,
-0.44503968954086304,
-0.8966168761253357,
-0.10268735885620117,
-0.9034485220909119,
1.0247924327850342,
-0.20446693897247314,
-1.4755852222442627,
0.2576718330383301,
-0.7356424331665039,
0.058736711740493774,
-1.3585071563720703,
0.23340058326721191,
0.6959168314933777,
-0.7342706918716431,
0.1033567264676094,
-0.326639324426651,
-1.4346559047698975,
-0.6352249979972839,
0.4705587327480316,
1.790876865386963,
-0.6870478391647339,
0.9878778457641602,
1.0706994533538818,
-0.6076983213424683,
-0.059586599469184875,
0.563720703125,
-0.4122956097126007,
0.8645496964454651,
-1.2223033905029297,
-0.41372960805892944,
0.9994972348213196,
-0.13329042494297028,
-0.46069177985191345,
1.3439472913742065,
0.7826055884361267,
-1.054410696029663,
-0.39761608839035034,
-0.06930667906999588,
-0.7537820935249329,
0.017110230401158333,
-1.6927331686019897,
-0.10961109399795532,
0.2592028081417084,
-1.5318244695663452,
-0.4012598991394043,
-0.06607357412576675,
1.1528756618499756,
-0.10337841510772705,
1.374092936515808,
-0.25485050678253174,
-0.06525187939405441,
-0.5843794345855713,
-0.5803054571151733,
0.05784766376018524,
-0.16640985012054443,
-0.6149066686630249,
0.30902063846588135,
-0.8582017421722412,
0.23549120128154755,
1.4687522649765015,
0.24644522368907928,
0.113827645778656,
0.45051565766334534,
1.1610527038574219,
0.3543524742126465,
-0.0498138889670372,
-0.8714501261711121,
-1.6202231645584106,
2.1121320724487305,
-1.7521517276763916,
1.928983211517334,
0.8317115902900696,
0.025858448818325996,
-1.9163455963134766,
-1.8342698812484741,
1.457531452178955,
1.0910086631774902,
2.4749093055725098,
0.5630590915679932,
0.5450543165206909,
-0.7928367257118225,
-0.6759536266326904,
0.5082436203956604,
-0.7710579037666321,
-0.8652384281158447,
0.2593548893928528,
2.4234073162078857,
1.5833005905151367,
-0.32474154233932495,
-0.14352582395076752,
-0.8643664717674255,
1.3153411149978638,
-0.10132242739200592,
0.18603166937828064,
2.024070978164673,
-0.2635432481765747,
-1.1214125156402588,
1.2758804559707642,
-2.420112371444702,
0.30580687522888184,
2.065589666366577,
0.30262890458106995,
0.11216369271278381,
-1.2279798984527588,
-0.6604032516479492,
-0.1743077039718628,
-0.41518929600715637,
-1.2536098957061768,
0.559490978717804,
-0.26799094676971436,
-0.8864959478378296,
-1.4747258424758911,
-0.07479144632816315,
-1.2669405937194824,
-1.8426214456558228,
0.3785111904144287,
1.8251323699951172,
2.260867118835449,
-0.7332468628883362,
1.3418885469436646,
-0.3442118167877197,
0.1791306883096695,
1.0850170850753784,
1.2122081518173218,
3.153604745864868,
1.8962393999099731,
-1.2810287475585938,
0.7091054320335388,
-0.10825968533754349,
-0.4779164791107178,
1.0700902938842773,
-0.9934470653533936,
1.1030583381652832,
-0.30166304111480713,
-1.4254175424575806,
-1.108270525932312,
1.025635004043579,
0.3180398941040039,
-0.033101245760917664,
-0.4966900646686554,
1.1564855575561523,
0.21989548206329346,
1.2583746910095215,
0.5757237672805786,
-0.21805071830749512,
0.44144588708877563,
-0.2902696430683136,
-0.5188215374946594,
1.6685409545898438,
0.03983499854803085,
-1.5024569034576416,
-2.5258796215057373,
-0.25819575786590576,
-0.9521370530128479,
0.10500480234622955,
-0.8453753590583801,
-1.1404154300689697,
1.5313273668289185,
0.47344693541526794,
-1.109192967414856,
-0.1389424204826355,
-0.3367854058742523,
-0.632300078868866,
2.565833568572998,
-1.4678491353988647,
-0.20320767164230347,
-0.8373252153396606,
-0.5532824993133545,
1.5158851146697998,
-1.1281700134277344,
-0.2951102554798126,
-1.0779533386230469,
-0.5367122888565063,
-1.2991102933883667,
-0.5582368969917297,
-0.08899577707052231,
-0.7900334596633911,
0.7275754809379578,
-0.019060038030147552,
-1.2390897274017334,
-0.21057970821857452,
-1.1571072340011597,
0.9236423373222351,
-0.21106714010238647,
0.09633518010377884,
1.7125346660614014,
0.3159116804599762,
-0.4207410514354706,
0.7322158217430115,
1.30422043800354,
0.6563109159469604,
-0.5386707782745361,
0.08966933190822601,
-0.6088348031044006,
0.43726253509521484,
-1.2236770391464233,
0.37704649567604065,
-2.863961696624756,
0.7566316723823547,
0.01596808433532715,
0.03046569414436817,
-0.12617087364196777,
-1.410018801689148,
1.0851489305496216,
2.482811689376831,
-1.0956223011016846,
0.6207705736160278,
0.24983356893062592,
1.1809754371643066,
-1.5748052597045898,
0.08365289866924286,
-0.6487686038017273,
2.0673820972442627,
-0.04641139507293701,
1.1056549549102783,
-0.6023314595222473,
-2.368891477584839,
0.6163754463195801,
-1.2579398155212402,
-0.9055615663528442,
0.8567286133766174,
-0.8643285036087036,
0.22432410717010498,
-1.2395364046096802,
-0.20065905153751373,
-1.028748869895935,
-1.1605899333953857,
0.517005443572998,
0.0792529284954071,
0.6629729866981506,
-0.5491901636123657,
0.21347691118717194,
-2.3641843795776367,
-1.4871011972427368,
-0.14082251489162445,
-0.9731147885322571,
0.48386532068252563,
-0.34670841693878174,
0.7723028659820557,
-0.057636335492134094,
0.04222707450389862,
0.3266211748123169,
1.3037710189819336,
3.2432363033294678,
0.06569008529186249,
0.3503320813179016,
-0.2542393207550049,
-1.1091938018798828,
1.4228458404541016,
0.9953843951225281,
-0.27326929569244385,
-0.6236400008201599,
-0.8923748731613159,
1.2848373651504517,
2.010019302368164,
0.9653536081314087,
0.06427935510873795,
-0.9998483061790466,
-0.7874280214309692,
0.19899410009384155,
0.23788169026374817,
0.5826513767242432,
1.0076289176940918,
0.08945637941360474,
0.15212485194206238,
1.487654685974121,
0.971288800239563,
-0.35625264048576355,
0.4622504711151123,
-0.8431203961372375,
-0.36747437715530396,
0.5337893962860107,
0.2976348102092743,
0.05516348034143448,
0.359832227230072,
-1.0626291036605835,
-0.25747931003570557,
-0.2621518671512604,
-0.8907750248908997,
-0.725208580493927,
-0.3570290505886078,
-0.4100182056427002,
1.7217775583267212,
-0.0694529190659523,
-0.5064535140991211,
0.09896153211593628,
-0.7814512252807617,
-0.11202725768089294,
-1.1214001178741455,
0.34606921672821045,
-0.24478013813495636,
0.16607128083705902,
-0.04585932195186615,
1.8831959962844849,
-0.9689062237739563,
-2.1439027786254883,
0.12346850335597992,
0.2613033056259155,
-0.3937632441520691,
0.04956822842359543,
1.8337814807891846,
0.6107368469238281,
1.2956725358963013,
1.5183587074279785,
1.010087251663208,
-0.7148958444595337,
-1.2787235975265503,
0.6262568831443787,
0.9941504597663879,
-1.3538798093795776,
0.8002094626426697,
-0.19448862969875336,
-0.5142582654953003,
0.5618739128112793,
1.4722117185592651,
0.39221689105033875,
-2.0643625259399414,
0.9144765734672546,
-1.0002137422561646,
0.9357472062110901,
0.8157855868339539,
0.7889007925987244,
0.1407472789287567,
0.8351314067840576,
-1.264892578125,
-0.9353659749031067,
-0.7207421660423279,
-0.6617739796638489,
1.784671425819397,
-0.248023122549057,
0.22628174722194672,
-0.20352420210838318,
-1.236909031867981,
0.10284145921468735,
0.607201337814331,
0.30705639719963074,
-0.3479820191860199,
0.727196991443634,
-0.5997304320335388,
-1.1557033061981201,
-1.216064453125,
-0.5658466815948486,
-0.8934677243232727,
-0.8902828693389893,
1.0071619749069214,
0.6615289449691772,
0.5493837594985962,
1.9993821382522583,
0.6538255214691162,
0.15345056354999542,
-2.7014248371124268,
0.8831079006195068,
0.36535024642944336,
-0.060654252767562866,
0.9534338116645813,
0.26694244146347046,
1.222961187362671,
-0.16080084443092346,
0.5780293345451355,
-2.282435178756714,
2.254237413406372,
-0.2508535087108612,
0.7756250500679016,
0.011326311156153679,
-0.020621802657842636,
1.0843250751495361,
0.5200974345207214,
0.5307554006576538,
-1.0572854280471802,
0.8649304509162903,
-0.7023618221282959,
1.0840734243392944,
0.8409022092819214,
-0.9319172501564026,
0.20350328087806702,
1.0690795183181763,
0.32030656933784485,
-0.5235356092453003,
-0.9872009754180908,
-0.7704049348831177,
1.0064347982406616,
1.7327502965927124,
-0.004124790895730257,
0.170893132686615,
0.8883349895477295,
0.6970732808113098,
-1.2782646417617798,
-0.002762153744697571,
-0.5835077166557312,
-0.7898781299591064,
1.7846180200576782,
2.0664901733398438,
-0.0012010028585791588,
0.07632705569267273,
-0.7197086811065674,
-1.512488603591919,
0.8429855704307556,
-0.021061226725578308,
0.010111292824149132,
0.6252246499061584,
-0.6744278073310852,
1.2944563627243042,
0.7433239817619324,
0.9552010893821716,
0.14990004897117615,
0.19870726764202118,
0.12995469570159912,
-0.31334248185157776,
-1.1795185804367065,
-0.34392452239990234,
-0.9436813592910767,
-2.431744337081909,
0.4958338737487793,
-0.23540863394737244,
-1.4209905862808228,
0.13148744404315948,
-0.9122598171234131,
0.7011561393737793,
-0.49841979146003723,
-1.0568181276321411,
-1.3274173736572266,
0.35663899779319763,
-0.21994031965732574,
0.872793972492218,
-1.546976089477539,
-0.15518349409103394,
1.093908667564392,
0.9662622213363647,
-0.7267354130744934,
0.9398831129074097,
0.2890150845050812,
1.0022400617599487,
0.8896904587745667,
-0.3432238698005676,
0.4885019063949585,
0.33487147092819214,
-1.242926001548767,
0.3640333414077759,
1.314030408859253,
0.12176477909088135,
1.366456389427185,
-0.4108065962791443,
0.000090036541223526,
0.3974483013153076,
-0.27093395590782166,
-0.5098912715911865,
-0.7862948775291443,
0.6140539050102234,
0.03442709147930145,
-1.0460827350616455,
-0.14146597683429718,
-0.009865863248705864,
-0.11558545380830765,
0.3878571391105652,
-1.5226564407348633,
-0.17792001366615295,
-0.3389352560043335,
-0.5656280517578125,
-1.3443082571029663,
-0.02062416449189186,
1.287268042564392,
-0.7848330736160278,
-0.12100155651569366,
0.47532564401626587,
0.21990010142326355,
0.5423377752304077,
0.7531769871711731,
-0.6703207492828369,
-0.40748608112335205,
-0.11653453856706619,
-0.3804914653301239,
0.29078027606010437,
1.2155752182006836,
-0.036387450993061066,
-0.998918354511261,
0.5713460445404053,
-0.3815423548221588,
0.18770910799503326,
1.8801047801971436,
-0.041043899953365326,
-0.8576849102973938,
0.4199836850166321,
-0.748199462890625,
1.8901572227478027,
1.6626468896865845,
1.217193365097046,
-0.18841402232646942,
-0.871160626411438,
0.7283034920692444,
-0.2548893690109253,
-0.27383819222450256,
0.9138842821121216,
0.4417176842689514,
-0.24921707808971405,
-1.4131914377212524,
0.6270898580551147,
1.2901653051376343,
-0.8428279757499695,
-0.8256635069847107,
0.12045413255691528,
-0.7628973722457886,
1.1553289890289307,
0.6888257265090942,
0.34979966282844543,
0.34299880266189575,
1.60746431350708,
0.721234917640686,
-0.6476508378982544,
0.48427820205688477,
0.427029013633728,
-0.12445922195911407,
-2.0263476371765137,
-1.1214354038238525,
0.29704907536506653,
-0.2838512361049652,
-1.5826387405395508,
1.465552568435669,
-1.2006033658981323,
-0.8908226490020752,
0.5858025550842285,
0.09347568452358246,
1.1687636375427246,
0.26037025451660156,
1.7763358354568481,
1.949533462524414,
0.8717853426933289,
0.41438427567481995,
1.228647232055664,
-0.20468580722808838,
-0.24800725281238556,
1.7310999631881714,
-0.5808143615722656,
0.5718716979026794,
1.0210541486740112,
-0.49070388078689575,
-1.1642470359802246,
-0.8461402058601379,
-1.1801892518997192,
-0.825041651725769,
0.9884291291236877,
0.16078150272369385,
-1.261006236076355,
0.3041108548641205,
1.6333348751068115,
-0.033847928047180176,
-0.03757499158382416,
0.710695743560791,
0.3512701690196991,
-0.7351080775260925,
-0.1832888275384903,
-1.0403021574020386,
0.6116997599601746,
-0.2687733471393585,
-0.38036245107650757,
0.14743784070014954,
0.47540944814682007,
1.202125072479248,
0.20710276067256927,
0.04670210927724838,
1.3337005376815796,
-1.4268978834152222,
1.3042885065078735,
-0.8352012038230896,
0.40984591841697693,
-2.356163501739502,
1.4028351306915283,
-0.8801583647727966,
1.844864845275879,
-2.6952221393585205,
0.3734666705131531,
-0.5647321343421936,
-0.5408731698989868,
0.13344453275203705,
-0.1354508101940155,
0.1168191134929657,
-0.1392308622598648,
-0.9500612020492554,
-0.14903292059898376,
-0.8410965800285339,
0.49263566732406616,
1.201531171798706,
1.3550611734390259,
-0.9037607908248901,
-0.2974433898925781,
-1.709836721420288,
-0.11897946149110794,
-0.3540109097957611,
0.1051112711429596,
-1.79201340675354,
-0.06868799030780792,
-2.107330560684204,
-2.390083074569702,
-1.5048415660858154,
-0.9918850064277649,
1.2720670700073242,
0.17536421120166779,
-1.0065735578536987,
1.0813101530075073,
-0.42094793915748596,
-1.589786410331726,
1.1904860734939575,
-2.159196615219116
] |
https://github.com/huggingface/datasets/issues/5413
|
concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers
|
Hi ! Thanks for reporting :)
I managed to reproduce the hub using
```python
from datasets import concatenate_datasets, Dataset, load_from_disk
Dataset.from_dict({"a": range(9)}).save_to_disk("tmp/ds1")
ds1 = load_from_disk("tmp/ds1")
ds1 = concatenate_datasets([ds1, ds1])
Dataset.from_dict({"b": range(6)}).save_to_disk("tmp/ds2")
ds2 = load_from_disk("tmp/ds2")
ds2 = concatenate_datasets([ds2, ds2, ds2])
concatenate_datasets([ds1, ds2], axis=1)
```
and I get
```python
Traceback (most recent call last):
File "test.py", line 98, in <module>
dds = concatenate_datasets([ds1, ds2], axis=1)
File "/Users/.../datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/Users/.../datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/Users/.../datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/Users/.../datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/Users/.../datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
It appears to happen when the two datasets have a number of shards that is not the same
|
### Describe the bug
When using `concatenate_datasets([dataset1, dataset2], axis = 1)` to concatenate two datasets with shards > 1, it fails:
```
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
### Steps to reproduce the bug
dataset = concatenate_datasets([dataset1, dataset2], axis = 1)
### Expected behavior
The datasets are correctly concatenated.
### Environment info
datasets==2.8.0
| 350 | 140 |
concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers
### Describe the bug
When using `concatenate_datasets([dataset1, dataset2], axis = 1)` to concatenate two datasets with shards > 1, it fails:
```
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
### Steps to reproduce the bug
dataset = concatenate_datasets([dataset1, dataset2], axis = 1)
### Expected behavior
The datasets are correctly concatenated.
### Environment info
datasets==2.8.0
Hi ! Thanks for reporting :)
I managed to reproduce the hub using
```python
from datasets import concatenate_datasets, Dataset, load_from_disk
Dataset.from_dict({"a": range(9)}).save_to_disk("tmp/ds1")
ds1 = load_from_disk("tmp/ds1")
ds1 = concatenate_datasets([ds1, ds1])
Dataset.from_dict({"b": range(6)}).save_to_disk("tmp/ds2")
ds2 = load_from_disk("tmp/ds2")
ds2 = concatenate_datasets([ds2, ds2, ds2])
concatenate_datasets([ds1, ds2], axis=1)
```
and I get
```python
Traceback (most recent call last):
File "test.py", line 98, in <module>
dds = concatenate_datasets([ds1, ds2], axis=1)
File "/Users/.../datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/Users/.../datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/Users/.../datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/Users/.../datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/Users/.../datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
It appears to happen when the two datasets have a number of shards that is not the same
|
[
-1.2022230625152588,
-0.933254063129425,
-0.7547227144241333,
1.3154925107955933,
-0.1193099319934845,
-1.2487061023712158,
0.14360904693603516,
-1.046956181526184,
1.5380277633666992,
-0.7598488330841064,
0.12326542288064957,
-1.6745375394821167,
-0.19994229078292847,
-0.5410534143447876,
-0.6594473123550415,
-0.9492920637130737,
-0.3953816592693329,
-0.9115583896636963,
1.0657966136932373,
2.5464770793914795,
1.3448859453201294,
-1.2446571588516235,
2.870303153991699,
0.6820434331893921,
-0.2185499370098114,
-0.9936649203300476,
0.579095184803009,
-0.0744687169790268,
-1.203005075454712,
-0.4769638776779175,
-0.9634580016136169,
-0.030345004051923752,
-0.642344057559967,
-0.3901480436325073,
0.04737519472837448,
0.4263157844543457,
-0.34432756900787354,
-0.28521230816841125,
-0.6324281692504883,
-0.7459896206855774,
0.4810715317726135,
-0.29029127955436707,
0.9813745617866516,
-0.3560701012611389,
1.8011276721954346,
-0.5421429872512817,
0.3506911098957062,
0.7293349504470825,
1.2000447511672974,
0.19100382924079895,
0.11701690405607224,
0.28051620721817017,
0.2922610342502594,
-0.03081335499882698,
0.5909370183944702,
1.3035045862197876,
0.5933433771133423,
0.5840707421302795,
0.7651190757751465,
-2.187100887298584,
1.2997331619262695,
-0.8880492448806763,
0.29658573865890503,
1.3830243349075317,
-0.8230711817741394,
0.4662945866584778,
-1.773850917816162,
-0.09165257960557938,
0.6521231532096863,
-2.347933053970337,
0.22745415568351746,
-1.1914951801300049,
-0.5539954304695129,
0.9207162261009216,
0.4354477822780609,
-1.203465461730957,
0.1838141679763794,
-0.5330792665481567,
1.1479203701019287,
0.5739269852638245,
1.1571462154388428,
-1.6948118209838867,
0.030436068773269653,
-0.2310577780008316,
0.058988094329833984,
-1.357838749885559,
-1.6655834913253784,
0.6134198307991028,
0.6001392006874084,
0.7316396236419678,
-0.1113923192024231,
1.0577571392059326,
-1.057990550994873,
0.7735714316368103,
-0.9703716039657593,
-1.5983550548553467,
-1.4405009746551514,
-2.430870294570923,
-2.3572373390197754,
0.8052476048469543,
-0.47267207503318787,
-0.5837791562080383,
2.024141788482666,
-1.0062247514724731,
-1.7237945795059204,
1.1142021417617798,
0.2551202178001404,
0.13036802411079407,
2.4482622146606445,
0.31021568179130554,
-0.8244709968566895,
0.5002506375312805,
-0.7248691916465759,
0.850172758102417,
-0.2677685618400574,
1.266013264656067,
0.4658326208591461,
-1.0053163766860962,
1.65544855594635,
-0.5472714900970459,
0.6059726476669312,
-0.6771567463874817,
-0.5713368058204651,
-0.8875723481178284,
0.22798295319080353,
1.8723180294036865,
-0.30259624123573303,
1.6133885383605957,
-0.31201407313346863,
-1.5895650386810303,
-1.5265145301818848,
0.8119333982467651,
0.44984355568885803,
-0.8688437938690186,
0.08700576424598694,
-0.4887561500072479,
0.0769558846950531,
0.07683622092008591,
1.1855050325393677,
1.1688028573989868,
0.636899471282959,
-0.2971218526363373,
-0.8364938497543335,
0.28985849022865295,
-0.15402477979660034,
-0.7491940855979919,
-1.8104132413864136,
-0.3088489770889282,
0.19888295233249664,
0.5502647161483765,
-1.2616125345230103,
1.8040472269058228,
0.8679761290550232,
2.0454132556915283,
0.959625244140625,
-0.3520159423351288,
1.413081169128418,
-0.01827407069504261,
1.8127845525741577,
-0.41313451528549194,
0.6225749850273132,
-0.3175899386405945,
-1.19310462474823,
0.8716182708740234,
-0.4430329501628876,
-2.057539939880371,
-0.8622274398803711,
-0.6912253499031067,
-0.1628797948360443,
-0.7481241226196289,
0.7973358035087585,
-0.2986544966697693,
-1.4940134286880493,
0.13508813083171844,
-0.685671329498291,
0.1766922026872635,
-1.3555033206939697,
0.17217423021793365,
0.7312641143798828,
-0.7722650170326233,
-0.04169900342822075,
-0.27772292494773865,
-1.2777076959609985,
-0.4250069856643677,
0.27338600158691406,
1.960843563079834,
-0.5917587280273438,
0.9267787337303162,
1.0040044784545898,
-0.7554338574409485,
0.10591841489076614,
0.2546187937259674,
-0.3001852333545685,
0.7834810018539429,
-1.10586416721344,
-0.4414866268634796,
1.160402774810791,
-0.21801301836967468,
-0.7437902688980103,
1.3907827138900757,
0.7219123244285583,
-1.1029084920883179,
-0.323826402425766,
-0.18322396278381348,
-0.9314867258071899,
0.012123639695346355,
-1.518451452255249,
-0.19780106842517853,
0.4147242307662964,
-1.4589754343032837,
-0.4389140009880066,
-0.20315876603126526,
1.4011828899383545,
-0.2643722891807556,
1.4337745904922485,
-0.4524480104446411,
-0.17492377758026123,
-0.3204510807991028,
-0.4862552583217621,
0.1538768857717514,
-0.16417162120342255,
-0.5731809139251709,
0.14692141115665436,
-0.8074499368667603,
0.25561532378196716,
1.5511252880096436,
0.368418425321579,
0.11687683314085007,
0.47067752480506897,
1.1060898303985596,
0.36888614296913147,
-0.08191010355949402,
-0.8079571723937988,
-1.5377916097640991,
1.9215673208236694,
-1.4366048574447632,
1.8425750732421875,
0.7837826609611511,
-0.05738946422934532,
-1.881643295288086,
-1.7986890077590942,
1.2783286571502686,
1.1982691287994385,
2.343719244003296,
0.49658623337745667,
0.4245496094226837,
-0.7279855012893677,
-0.8475205302238464,
0.27856457233428955,
-0.9458937048912048,
-0.6888899207115173,
0.23034076392650604,
2.3786189556121826,
1.824065089225769,
-0.5449610948562622,
-0.2880187928676605,
-0.9146977066993713,
1.2191507816314697,
-0.24664460122585297,
0.21355828642845154,
1.991845965385437,
-0.35645154118537903,
-1.0618071556091309,
1.3473535776138306,
-2.3942108154296875,
0.22681917250156403,
2.0084116458892822,
0.25307926535606384,
0.1218191459774971,
-1.3764821290969849,
-0.6447241902351379,
-0.31013554334640503,
-0.4641834795475006,
-1.2987738847732544,
0.5646519064903259,
-0.3106403648853302,
-0.8607140183448792,
-1.3227585554122925,
-0.001313243992626667,
-1.1386371850967407,
-1.7245277166366577,
0.3037813603878021,
1.8837345838546753,
2.1036956310272217,
-0.7836170196533203,
1.3974549770355225,
-0.24686121940612793,
-0.0032160556875169277,
1.2140082120895386,
1.4046937227249146,
3.093438148498535,
1.8469575643539429,
-1.2989566326141357,
0.7178539037704468,
-0.16575436294078827,
-0.4905175268650055,
1.1286431550979614,
-1.099901795387268,
1.1138752698898315,
-0.16011469066143036,
-1.30968177318573,
-1.2513816356658936,
1.0321944952011108,
0.5179100632667542,
-0.023422028869390488,
-0.530372679233551,
1.3605120182037354,
0.06125306338071823,
1.239513635635376,
0.5443301200866699,
-0.4329862594604492,
0.49371007084846497,
-0.33536750078201294,
-0.6179028749465942,
1.6338510513305664,
0.16079506278038025,
-1.556269884109497,
-2.282921314239502,
-0.24598005414009094,
-0.9233947396278381,
-0.04068304970860481,
-0.7001261115074158,
-0.982384443283081,
1.5720434188842773,
0.44533243775367737,
-1.1649596691131592,
-0.32627996802330017,
-0.25189948081970215,
-0.48034751415252686,
2.680344820022583,
-1.2830427885055542,
-0.159043550491333,
-0.8936126828193665,
-0.4569850265979767,
1.6621731519699097,
-1.2192038297653198,
-0.2482742816209793,
-0.9983740448951721,
-0.7297382950782776,
-1.3349332809448242,
-0.5144977569580078,
-0.014640994369983673,
-0.9596338272094727,
0.7495895624160767,
0.1930406242609024,
-1.1469591856002808,
-0.19108517467975616,
-0.9390607476234436,
1.1154966354370117,
-0.16781193017959595,
0.2549930810928345,
1.8161062002182007,
0.295906126499176,
-0.4613047242164612,
0.7147008776664734,
1.2691514492034912,
0.6970266699790955,
-0.6979390978813171,
-0.050777509808540344,
-0.714973509311676,
0.3851180374622345,
-1.3428122997283936,
0.17516584694385529,
-3.0303616523742676,
0.7578414082527161,
-0.21814481914043427,
-0.08799435943365097,
-0.04735787585377693,
-1.2642879486083984,
1.005408763885498,
2.5606610774993896,
-1.1962640285491943,
0.44480201601982117,
0.47303104400634766,
1.1718214750289917,
-1.6858808994293213,
0.2848674952983856,
-0.5744466781616211,
2.039188861846924,
0.16407185792922974,
1.2134490013122559,
-0.47650808095932007,
-2.16369366645813,
0.593270480632782,
-1.2082635164260864,
-0.9798230528831482,
0.871771514415741,
-0.8724351525306702,
0.262213796377182,
-1.4283016920089722,
-0.15463021397590637,
-0.8938920497894287,
-1.2262426614761353,
0.7273461222648621,
0.1617060750722885,
0.4596570134162903,
-0.5042222142219543,
0.38082191348075867,
-2.191246509552002,
-1.3704389333724976,
-0.1859222650527954,
-1.0067414045333862,
0.5052933692932129,
-0.3779049217700958,
0.6012197136878967,
-0.10307290405035019,
0.0869736596941948,
0.38235238194465637,
1.4609030485153198,
3.3571102619171143,
0.1827177107334137,
0.16673223674297333,
-0.09230082482099533,
-1.0511705875396729,
1.4314924478530884,
0.8648815751075745,
-0.10646648705005646,
-0.5443452000617981,
-0.9860320687294006,
1.407562494277954,
1.9622915983200073,
1.1565426588058472,
0.14542418718338013,
-0.846534788608551,
-0.6049118041992188,
0.05729040503501892,
0.23914842307567596,
0.42165330052375793,
0.9093390703201294,
-0.025861941277980804,
0.11234521120786667,
1.4098061323165894,
1.1637051105499268,
-0.2823231816291809,
0.464233934879303,
-0.9888604879379272,
-0.40522369742393494,
0.4661458730697632,
0.14219097793102264,
0.07931338995695114,
0.39967378973960876,
-1.0994296073913574,
-0.326915442943573,
-0.28837981820106506,
-0.8650620579719543,
-0.7588257789611816,
-0.28201842308044434,
-0.3990614116191864,
1.5538029670715332,
0.02152315154671669,
-0.49720847606658936,
0.0961640328168869,
-0.6309083104133606,
-0.20662230253219604,
-1.114111304283142,
0.12480602413415909,
-0.10760542750358582,
-0.12470579147338867,
-0.23607602715492249,
1.6251587867736816,
-0.9102314114570618,
-2.1604175567626953,
0.11529689282178879,
0.3574088215827942,
-0.2945724427700043,
0.1938093602657318,
1.7739944458007812,
0.4953823387622833,
1.4230732917785645,
1.2964482307434082,
1.0036249160766602,
-0.5767199993133545,
-1.186811923980713,
0.7408498525619507,
0.9883453249931335,
-1.2969586849212646,
0.931070864200592,
-0.17422537505626678,
-0.5677201747894287,
0.7388763427734375,
1.2895623445510864,
0.4247441291809082,
-1.968592643737793,
0.9257728457450867,
-1.0201383829116821,
0.7438406944274902,
0.6754767894744873,
0.825959324836731,
0.21778379380702972,
0.94490647315979,
-1.2468920946121216,
-1.1931449174880981,
-0.6915260553359985,
-0.566940426826477,
1.8848308324813843,
-0.2357473522424698,
0.5874364972114563,
-0.23147298395633698,
-1.1971925497055054,
-0.028724558651447296,
0.7635303139686584,
0.3091813921928406,
-0.4149775207042694,
0.900649905204773,
-0.6408473253250122,
-0.9537932872772217,
-1.3217006921768188,
-0.35216543078422546,
-1.0973597764968872,
-0.8663599491119385,
1.014892578125,
0.7547067999839783,
0.43343356251716614,
1.8947880268096924,
0.5906700491905212,
0.37489238381385803,
-2.577718496322632,
0.8300419449806213,
0.21548010408878326,
0.020556025207042694,
0.838747501373291,
0.30190861225128174,
1.203558325767517,
-0.02277791127562523,
0.6225207448005676,
-2.276327610015869,
2.2222580909729004,
-0.14938801527023315,
0.5744215250015259,
0.025230109691619873,
-0.1422838568687439,
1.0538733005523682,
0.649005115032196,
0.49918851256370544,
-1.0579280853271484,
0.6734156608581543,
-0.5698611736297607,
1.079229712486267,
0.9378719329833984,
-0.9019266963005066,
0.1299607753753662,
1.459200143814087,
0.4742213487625122,
-0.45247408747673035,
-0.9603437781333923,
-0.8204209804534912,
0.9912287592887878,
1.6061971187591553,
-0.01951279118657112,
0.0031994571909308434,
0.8571209907531738,
0.6573195457458496,
-1.22147536277771,
0.10486684739589691,
-0.6390079855918884,
-0.6607978343963623,
1.7175168991088867,
2.0152227878570557,
-0.12747932970523834,
-0.10993422567844391,
-0.7094762325286865,
-1.249544620513916,
0.7806429266929626,
-0.17253901064395905,
0.013259506784379482,
0.7511227130889893,
-0.6831793785095215,
1.105028748512268,
0.687102735042572,
0.9147608280181885,
0.1408596783876419,
0.2752619683742523,
0.33781346678733826,
-0.2778870761394501,
-1.186964511871338,
-0.24058449268341064,
-0.988969624042511,
-2.546769857406616,
0.36179405450820923,
-0.278967946767807,
-1.5016628503799438,
0.07230449467897415,
-1.0083096027374268,
0.9663563966751099,
-0.5612757205963135,
-1.0287574529647827,
-1.5025657415390015,
0.43886446952819824,
-0.059287361800670624,
0.9437107443809509,
-1.619701862335205,
-0.2475518137216568,
1.2582740783691406,
0.8394538760185242,
-0.6152313351631165,
0.98399418592453,
0.28979265689849854,
0.9363230466842651,
0.714772641658783,
-0.39472806453704834,
0.5462748408317566,
-0.003300981130450964,
-1.3374831676483154,
0.3512149453163147,
1.222099781036377,
0.18623077869415283,
1.3781657218933105,
-0.43813449144363403,
0.024898625910282135,
0.41596174240112305,
-0.6143802404403687,
-0.5128761529922485,
-0.43252623081207275,
0.6599540710449219,
-0.007051398046314716,
-1.0068718194961548,
-0.22613927721977234,
-0.18646104633808136,
-0.34701618552207947,
0.2461342066526413,
-1.4419337511062622,
-0.24564996361732483,
-0.4358694851398468,
-0.4359223544597626,
-1.323065161705017,
0.06896322965621948,
1.322558879852295,
-0.8430780172348022,
-0.31010937690734863,
0.5105403065681458,
0.4321466386318207,
0.5657629370689392,
0.6039334535598755,
-0.7225056290626526,
-0.19595970213413239,
-0.4145437180995941,
-0.25511279702186584,
0.2585297226905823,
1.2004961967468262,
-0.07327686995267868,
-1.0205683708190918,
0.7232683300971985,
-0.305343359708786,
0.1679784059524536,
2.0145609378814697,
0.10729963332414627,
-0.7586604952812195,
0.35913848876953125,
-0.7437866926193237,
1.7778551578521729,
1.7268059253692627,
1.3347052335739136,
-0.05389603227376938,
-0.7291936874389648,
0.5320839285850525,
-0.25424230098724365,
-0.31695064902305603,
0.9706894159317017,
0.40626007318496704,
-0.25308820605278015,
-1.4797794818878174,
0.6608504056930542,
1.2938458919525146,
-0.671205461025238,
-0.7895013689994812,
0.06639130413532257,
-0.9220457673072815,
1.2546509504318237,
0.6315603852272034,
0.29201412200927734,
0.25329166650772095,
1.5055710077285767,
0.6958754658699036,
-0.49665895104408264,
0.46367916464805603,
0.543001115322113,
-0.14770200848579407,
-2.1082022190093994,
-1.0207080841064453,
0.2468390315771103,
-0.3652913570404053,
-1.4836574792861938,
1.3622692823410034,
-1.1233376264572144,
-1.0959584712982178,
0.4819762706756592,
0.1224730983376503,
1.2313170433044434,
0.3504602909088135,
1.66935396194458,
2.134575366973877,
0.8905266523361206,
0.3245868384838104,
1.2448616027832031,
-0.09703226387500763,
-0.3094054162502289,
1.7829176187515259,
-0.39723554253578186,
0.5333231091499329,
0.9761793613433838,
-0.37518420815467834,
-1.1417993307113647,
-0.8272533416748047,
-1.1661103963851929,
-0.6148366928100586,
1.142083764076233,
0.09085715562105179,
-1.029582142829895,
0.17799147963523865,
1.498331904411316,
0.14580649137496948,
-0.2416967898607254,
0.6584501266479492,
0.451945036649704,
-0.7275148630142212,
-0.034771520644426346,
-0.9423056840896606,
0.5278077721595764,
-0.12654229998588562,
-0.3127739429473877,
0.2676060199737549,
0.5945950746536255,
1.3338589668273926,
-0.054447732865810394,
0.14356867969036102,
1.1476179361343384,
-1.4073703289031982,
1.4619320631027222,
-0.7015556693077087,
0.265683650970459,
-2.491140604019165,
1.4128351211547852,
-0.7180540561676025,
1.9038422107696533,
-2.5918257236480713,
0.48862695693969727,
-0.48267269134521484,
-0.5357687473297119,
0.3465851843357086,
-0.47939324378967285,
0.16583386063575745,
-0.11182833462953568,
-0.9590218663215637,
0.010015781037509441,
-0.7431492805480957,
0.6552395224571228,
1.2312531471252441,
1.4331066608428955,
-1.1869988441467285,
-0.3136078417301178,
-1.6913939714431763,
-0.18769347667694092,
-0.7529826164245605,
0.3322620689868927,
-1.952858567237854,
-0.17523781955242157,
-1.9294594526290894,
-2.44122314453125,
-1.3878511190414429,
-0.8696902990341187,
1.1675946712493896,
0.21791434288024902,
-1.0293751955032349,
1.3237814903259277,
-0.41375523805618286,
-1.81510329246521,
1.1961216926574707,
-2.1986165046691895
] |
https://github.com/huggingface/datasets/issues/5412
|
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
|
Hi ! It fails because the dataset is already being prepared by your first run. I'd encourage you to prepare your dataset before using it for multiple trainings.
You can also specify another cache directory by passing `cache_dir=` to `load_dataset()`.
|
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
| 351 | 40 |
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Hi ! It fails because the dataset is already being prepared by your first run. I'd encourage you to prepare your dataset before using it for multiple trainings.
You can also specify another cache directory by passing `cache_dir=` to `load_dataset()`.
|
[
-1.2141274213790894,
-0.9969725012779236,
-0.6490305066108704,
1.4509425163269043,
-0.19368737936019897,
-1.2160694599151611,
0.19137239456176758,
-1.0793054103851318,
1.5731899738311768,
-0.7488421201705933,
0.2618825137615204,
-1.631170392036438,
-0.0954568088054657,
-0.5608007311820984,
-0.7433006763458252,
-0.9364326596260071,
-0.41281646490097046,
-0.8453432321548462,
1.022878646850586,
2.5428125858306885,
1.366662621498108,
-1.2763853073120117,
2.756913900375366,
0.6279683709144592,
-0.2821715772151947,
-0.9833272695541382,
0.5646626949310303,
0.06544171273708344,
-1.1478443145751953,
-0.47851184010505676,
-0.9521074295043945,
-0.06342742592096329,
-0.5614509582519531,
-0.4199123680591583,
0.12420400977134705,
0.373125821352005,
-0.26957938075065613,
-0.25765717029571533,
-0.58588707447052,
-0.7120150923728943,
0.5171830058097839,
-0.41917112469673157,
0.9638339281082153,
-0.3477008044719696,
1.7337993383407593,
-0.7071639895439148,
0.47373268008232117,
0.7537158727645874,
1.3493643999099731,
0.1861790120601654,
0.10676771402359009,
0.2988741993904114,
0.4164428412914276,
0.028304679319262505,
0.6216744184494019,
1.2012202739715576,
0.6260951161384583,
0.45880448818206787,
0.6053739190101624,
-2.178969144821167,
1.244471788406372,
-0.9237699508666992,
0.24414803087711334,
1.3233290910720825,
-0.801548957824707,
0.41650089621543884,
-1.8229615688323975,
-0.14820976555347443,
0.588030993938446,
-2.330613374710083,
0.16181407868862152,
-1.3167684078216553,
-0.5287935137748718,
0.9506052732467651,
0.3603508472442627,
-1.2404146194458008,
0.20262494683265686,
-0.5211619138717651,
1.0202616453170776,
0.4286530017852783,
1.1499234437942505,
-1.6470754146575928,
-0.08230680227279663,
-0.22247838973999023,
0.1075914278626442,
-1.1775245666503906,
-1.64339280128479,
0.6224895119667053,
0.466981440782547,
0.6304900646209717,
-0.1418246030807495,
0.9926528334617615,
-1.0782032012939453,
0.8533098101615906,
-0.9388768672943115,
-1.6307622194290161,
-1.3989325761795044,
-2.4362213611602783,
-2.3165628910064697,
0.8781778812408447,
-0.5335109233856201,
-0.46373510360717773,
2.0188369750976562,
-0.9818614721298218,
-1.7224695682525635,
1.1028048992156982,
0.2659922242164612,
0.06020011752843857,
2.409165620803833,
0.22032544016838074,
-0.7270029783248901,
0.5419988036155701,
-0.7242949604988098,
0.822091817855835,
-0.3625521957874298,
1.3540815114974976,
0.468821257352829,
-0.9292778968811035,
1.5894755125045776,
-0.44326597452163696,
0.5221773982048035,
-0.6251427531242371,
-0.4502663314342499,
-0.7682176828384399,
0.27975624799728394,
1.8677490949630737,
-0.35203564167022705,
1.526549220085144,
-0.2719400227069855,
-1.5341061353683472,
-1.5709930658340454,
0.851974368095398,
0.4843197762966156,
-0.8293875455856323,
0.04386235773563385,
-0.44425246119499207,
0.20141078531742096,
0.025991545990109444,
1.1298224925994873,
1.249072551727295,
0.7530848383903503,
-0.38840875029563904,
-0.8466953635215759,
0.20281793177127838,
-0.17596948146820068,
-0.7371681928634644,
-1.868892788887024,
-0.3714844584465027,
0.16730265319347382,
0.634069561958313,
-1.2067903280258179,
1.7426279783248901,
0.9124430418014526,
1.9265309572219849,
0.9915198683738708,
-0.41957759857177734,
1.466591715812683,
-0.0022067823447287083,
1.8633462190628052,
-0.5040355324745178,
0.6403148770332336,
-0.40441083908081055,
-1.1762019395828247,
0.8499268293380737,
-0.3623272478580475,
-1.9813841581344604,
-0.8392131924629211,
-0.7725170850753784,
-0.2272113859653473,
-0.7429419755935669,
0.8828854560852051,
-0.32672208547592163,
-1.4852057695388794,
0.13469375669956207,
-0.6793901920318604,
0.0731704905629158,
-1.2882163524627686,
0.2348514050245285,
0.6313921809196472,
-0.6960908770561218,
-0.0037764552980661392,
-0.3136973977088928,
-1.175032377243042,
-0.5672102570533752,
0.24842481315135956,
1.965240716934204,
-0.6691375374794006,
0.9596713185310364,
0.9675442576408386,
-0.7601949572563171,
0.115764319896698,
0.3060699999332428,
-0.3275700509548187,
0.7722687125205994,
-1.0792564153671265,
-0.4633046090602875,
1.1940443515777588,
-0.22057579457759857,
-0.660209596157074,
1.4108600616455078,
0.8140404224395752,
-1.0867221355438232,
-0.2194034457206726,
-0.2161952257156372,
-0.8349656462669373,
-0.0008625602349638939,
-1.570378065109253,
-0.20756195485591888,
0.3383904695510864,
-1.486948013305664,
-0.45446446537971497,
-0.24605914950370789,
1.3732287883758545,
-0.15537358820438385,
1.4835638999938965,
-0.2901538908481598,
-0.23485007882118225,
-0.29972410202026367,
-0.42563289403915405,
0.20994260907173157,
-0.10915561765432358,
-0.572496771812439,
0.24130241572856903,
-0.8524407148361206,
0.28948381543159485,
1.5246831178665161,
0.3115420639514923,
0.05796302855014801,
0.5177657604217529,
1.0502901077270508,
0.3876936435699463,
-0.050930656492710114,
-0.9175171852111816,
-1.5212308168411255,
1.940317988395691,
-1.445124626159668,
1.9142707586288452,
0.8365426659584045,
-0.12518617510795593,
-1.775719165802002,
-1.8441317081451416,
1.2218122482299805,
1.1295663118362427,
2.37953519821167,
0.5037855505943298,
0.36736905574798584,
-0.7260363698005676,
-0.7807110548019409,
0.33790040016174316,
-1.037868857383728,
-0.7535500526428223,
0.11999613046646118,
2.3457772731781006,
1.8248077630996704,
-0.5782249569892883,
-0.22731034457683563,
-0.9382273554801941,
1.2760124206542969,
-0.2316378653049469,
0.26539158821105957,
2.0626492500305176,
-0.37112852931022644,
-1.0591678619384766,
1.3354891538619995,
-2.3247060775756836,
0.16214731335639954,
2.057161331176758,
0.27887213230133057,
0.11377063393592834,
-1.4675133228302002,
-0.668133020401001,
-0.23929791152477264,
-0.46165525913238525,
-1.2495687007904053,
0.5706485509872437,
-0.3046877980232239,
-0.8910483121871948,
-1.462842345237732,
0.031154653057456017,
-1.16923987865448,
-1.722124695777893,
0.2756273150444031,
1.945120930671692,
2.1022562980651855,
-0.7685409784317017,
1.377940058708191,
-0.2625083327293396,
0.010165397077798843,
1.2955156564712524,
1.2791376113891602,
3.113919258117676,
1.9078208208084106,
-1.280879259109497,
0.7557817697525024,
-0.29057326912879944,
-0.4765017628669739,
1.1255176067352295,
-1.125339150428772,
1.0514404773712158,
-0.2562789022922516,
-1.2307112216949463,
-1.2247788906097412,
1.0953108072280884,
0.4558682441711426,
-0.03576623648405075,
-0.48912397027015686,
1.266207218170166,
0.18692006170749664,
1.369118094444275,
0.5978361964225769,
-0.360039621591568,
0.6140457391738892,
-0.3950536847114563,
-0.4909333884716034,
1.6582093238830566,
0.2556600868701935,
-1.5225971937179565,
-2.3839504718780518,
-0.21564120054244995,
-1.0455588102340698,
-0.021583545953035355,
-0.5688108205795288,
-1.0257898569107056,
1.5980567932128906,
0.417563259601593,
-1.1262953281402588,
-0.2934650480747223,
-0.2444465607404709,
-0.5425764918327332,
2.670430898666382,
-1.2497745752334595,
-0.18994523584842682,
-0.9018815159797668,
-0.5705705285072327,
1.6278218030929565,
-1.203966498374939,
-0.1424666792154312,
-1.0203131437301636,
-0.5678299069404602,
-1.3161872625350952,
-0.4447714686393738,
0.06971176713705063,
-1.0238794088363647,
0.8285298347473145,
0.1292065680027008,
-1.1077265739440918,
-0.3296695351600647,
-0.8738739490509033,
0.9585228562355042,
0.03199141472578049,
0.2402404546737671,
1.8725073337554932,
0.36314594745635986,
-0.4349607825279236,
0.6971304416656494,
1.1890919208526611,
0.5852125883102417,
-0.6493138670921326,
0.12274870276451111,
-0.7071465253829956,
0.38456711173057556,
-1.3243275880813599,
0.21600158512592316,
-2.8684797286987305,
0.7663437724113464,
-0.19445335865020752,
-0.12296202033758163,
-0.11099017411470413,
-1.2903447151184082,
1.0787464380264282,
2.599339723587036,
-1.0949549674987793,
0.4872013330459595,
0.37899598479270935,
1.209892988204956,
-1.5693708658218384,
0.31803280115127563,
-0.4651187062263489,
2.091409206390381,
0.15543721616268158,
1.2157360315322876,
-0.46122413873672485,
-2.203939914703369,
0.68079674243927,
-1.234754204750061,
-1.067259430885315,
0.7174217104911804,
-0.7943164706230164,
0.1776372492313385,
-1.4849117994308472,
-0.12990032136440277,
-0.8785492777824402,
-1.2021152973175049,
0.7105792164802551,
0.08813241124153137,
0.45362672209739685,
-0.5636968612670898,
0.35802072286605835,
-2.1354622840881348,
-1.4397425651550293,
-0.23445197939872742,
-0.9515698552131653,
0.5086531639099121,
-0.42946481704711914,
0.6458932161331177,
-0.1261172890663147,
-0.0030494718812406063,
0.3012951910495758,
1.437186598777771,
3.4122538566589355,
0.09388988465070724,
0.18021681904792786,
-0.10474622994661331,
-1.0545328855514526,
1.4413970708847046,
0.8281938433647156,
-0.16801641881465912,
-0.59856116771698,
-1.1047964096069336,
1.2686960697174072,
2.032437324523926,
1.124728798866272,
0.18229235708713531,
-0.7804131507873535,
-0.6864540576934814,
-0.03914623707532883,
0.2014625370502472,
0.5082274675369263,
0.9213008880615234,
-0.09708631038665771,
0.026873739436268806,
1.4106075763702393,
1.232364535331726,
-0.3319056034088135,
0.4251106381416321,
-0.9278215169906616,
-0.43448522686958313,
0.4545171558856964,
0.1858086884021759,
0.07796991616487503,
0.4074297547340393,
-1.022128701210022,
-0.3625781834125519,
-0.33872324228286743,
-0.9225188493728638,
-0.7324065566062927,
-0.3768245279788971,
-0.43395403027534485,
1.5734977722167969,
0.0725843608379364,
-0.45103776454925537,
0.022188609465956688,
-0.6785217523574829,
-0.08501291275024414,
-1.0669933557510376,
0.1377572864294052,
-0.16275808215141296,
-0.09671835601329803,
-0.18123812973499298,
1.7000751495361328,
-0.9120420217514038,
-2.1289398670196533,
0.2281113862991333,
0.30691277980804443,
-0.33964353799819946,
0.2915182411670685,
1.6511555910110474,
0.5585392713546753,
1.421687126159668,
1.2962090969085693,
0.9936836361885071,
-0.5839256644248962,
-1.2240065336227417,
0.7549033164978027,
0.9730924367904663,
-1.409690260887146,
0.8711819052696228,
-0.09286569058895111,
-0.48191899061203003,
0.635728120803833,
1.2501707077026367,
0.3189680874347687,
-2.0125722885131836,
0.9021272659301758,
-0.8906856179237366,
0.7846575975418091,
0.6801154613494873,
0.7480754852294922,
0.2556033432483673,
0.8626270890235901,
-1.234057068824768,
-1.0982176065444946,
-0.7236384749412537,
-0.5997304916381836,
1.9883853197097778,
-0.14465941488742828,
0.5697672367095947,
-0.2323308289051056,
-1.1916966438293457,
-0.1024956926703453,
0.7223588824272156,
0.35299012064933777,
-0.46536317467689514,
0.8239566087722778,
-0.6702864170074463,
-0.9719467759132385,
-1.3435239791870117,
-0.37819814682006836,
-1.0930501222610474,
-0.8663796186447144,
1.0381354093551636,
0.8256191611289978,
0.43912503123283386,
1.9738295078277588,
0.5910483002662659,
0.319061279296875,
-2.649162769317627,
0.907706618309021,
0.27033311128616333,
-0.022620389237999916,
0.9100503325462341,
0.2401079535484314,
1.1031572818756104,
-0.0035070083104074,
0.5800133943557739,
-2.3427305221557617,
2.257167100906372,
-0.13910269737243652,
0.6747178435325623,
0.13975383341312408,
-0.15390272438526154,
1.1544525623321533,
0.625665009021759,
0.6128643751144409,
-1.0794739723205566,
0.6897406578063965,
-0.5419245958328247,
1.1970940828323364,
1.0148166418075562,
-0.8525367975234985,
0.07839014381170273,
1.3892394304275513,
0.5300509929656982,
-0.3943166136741638,
-0.949559211730957,
-0.8182658553123474,
0.9342665672302246,
1.7175116539001465,
-0.09086809307336807,
-0.03354839235544205,
0.8486941456794739,
0.6481671929359436,
-1.257729172706604,
0.0678468570113182,
-0.7740964293479919,
-0.6792613863945007,
1.6996148824691772,
2.0937435626983643,
-0.18296770751476288,
-0.20570482313632965,
-0.7428234219551086,
-1.3113113641738892,
0.8067578077316284,
-0.06911491602659225,
0.13236752152442932,
0.7583487629890442,
-0.6120249032974243,
1.1283482313156128,
0.6485534906387329,
1.0433145761489868,
0.145389586687088,
0.3077307641506195,
0.36537718772888184,
-0.3884398639202118,
-1.1010617017745972,
-0.252387136220932,
-1.1521695852279663,
-2.6556832790374756,
0.4287143647670746,
-0.3063468635082245,
-1.4604231119155884,
0.11649177968502045,
-0.9902240633964539,
0.9057703018188477,
-0.5613803267478943,
-1.1133462190628052,
-1.4309601783752441,
0.2966749668121338,
-0.13735556602478027,
0.9736587405204773,
-1.7286567687988281,
-0.11772021651268005,
1.2842259407043457,
0.8378524780273438,
-0.5252074599266052,
0.882308304309845,
0.24877779185771942,
0.9607273936271667,
0.7924262881278992,
-0.33980706334114075,
0.5734639167785645,
-0.05683310329914093,
-1.3099623918533325,
0.4045991599559784,
1.2175092697143555,
0.1661349982023239,
1.3614916801452637,
-0.5060462355613708,
0.11869408190250397,
0.3854042589664459,
-0.657951295375824,
-0.5384085178375244,
-0.36764058470726013,
0.7061423063278198,
-0.02785063348710537,
-1.107494592666626,
-0.1355273574590683,
-0.06985081732273102,
-0.26745736598968506,
0.14826078712940216,
-1.3824173212051392,
-0.22826896607875824,
-0.381377637386322,
-0.4860149919986725,
-1.3185120820999146,
-0.01430593803524971,
1.2470000982284546,
-0.8191314339637756,
-0.2488224357366562,
0.4693429172039032,
0.3032081127166748,
0.6230383515357971,
0.5259079933166504,
-0.7812758088111877,
-0.36344221234321594,
-0.32464608550071716,
-0.3190169334411621,
0.2603611946105957,
1.3132981061935425,
-0.10750416666269302,
-0.9980301260948181,
0.6444550156593323,
-0.36701661348342896,
0.12032103538513184,
2.0153756141662598,
0.04023740440607071,
-0.6610305309295654,
0.32976818084716797,
-0.6459835171699524,
1.7603572607040405,
1.6860309839248657,
1.2140774726867676,
-0.08383625745773315,
-0.8137367367744446,
0.5062177777290344,
-0.3127901554107666,
-0.37174251675605774,
0.8187406063079834,
0.3664363920688629,
-0.17010298371315002,
-1.4270033836364746,
0.568266749382019,
1.2701784372329712,
-0.7966088056564331,
-0.7615712285041809,
0.015401842072606087,
-0.9062132835388184,
1.2037969827651978,
0.6769316792488098,
0.42934465408325195,
0.18892453610897064,
1.6427853107452393,
0.7711060643196106,
-0.5199629068374634,
0.490724116563797,
0.5227240920066833,
-0.16844509541988373,
-2.123091459274292,
-1.067530632019043,
0.25784000754356384,
-0.4901978671550751,
-1.5900299549102783,
1.3644464015960693,
-1.1069711446762085,
-0.9594593644142151,
0.6094348430633545,
0.14020748436450958,
1.4040518999099731,
0.35506245493888855,
1.6917651891708374,
2.1038658618927,
0.9267942309379578,
0.3797423541545868,
1.2736634016036987,
-0.06850319355726242,
-0.5082241892814636,
1.869389295578003,
-0.3516281843185425,
0.48407337069511414,
1.0172868967056274,
-0.36642709374427795,
-1.06118905544281,
-0.8094623684883118,
-1.1477183103561401,
-0.6050634384155273,
1.1818901300430298,
0.07487240433692932,
-0.9982641935348511,
0.18285271525382996,
1.6153556108474731,
0.1330968141555786,
-0.2950306236743927,
0.6884601712226868,
0.4734390676021576,
-0.7389522194862366,
-0.05371452122926712,
-0.9309958815574646,
0.4728955626487732,
-0.10856088995933533,
-0.34434840083122253,
0.25200048089027405,
0.5164679884910583,
1.362650752067566,
-0.11023719608783722,
0.14322833716869354,
1.1320282220840454,
-1.4365555047988892,
1.5477397441864014,
-0.6295567750930786,
0.2689674198627472,
-2.468395471572876,
1.392930507659912,
-0.8589073419570923,
1.9001303911209106,
-2.5434272289276123,
0.47975754737854004,
-0.5583856105804443,
-0.45024386048316956,
0.2318216860294342,
-0.42351585626602173,
0.15589329600334167,
-0.14260168373584747,
-1.0264309644699097,
-0.01285061240196228,
-0.7016003131866455,
0.579619288444519,
1.1490604877471924,
1.4430691003799438,
-1.1705001592636108,
-0.2914317548274994,
-1.772293210029602,
-0.11714020371437073,
-0.7575480341911316,
0.3562330901622772,
-1.9301499128341675,
-0.14625966548919678,
-1.945172667503357,
-2.268742561340332,
-1.3849518299102783,
-0.9149281978607178,
1.0270203351974487,
0.1561853587627411,
-0.9100437760353088,
1.1266553401947021,
-0.36807361245155334,
-1.9195024967193604,
1.2069636583328247,
-2.2206497192382812
] |
https://github.com/huggingface/datasets/issues/5412
|
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
|
Thank you! What do you mean by prepare it beforehand? I am unclear how to conduct dataset preparation outside of using the `load_dataset` function.
|
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
| 351 | 24 |
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Thank you! What do you mean by prepare it beforehand? I am unclear how to conduct dataset preparation outside of using the `load_dataset` function.
|
[
-1.2141274213790894,
-0.9969725012779236,
-0.6490305066108704,
1.4509425163269043,
-0.19368737936019897,
-1.2160694599151611,
0.19137239456176758,
-1.0793054103851318,
1.5731899738311768,
-0.7488421201705933,
0.2618825137615204,
-1.631170392036438,
-0.0954568088054657,
-0.5608007311820984,
-0.7433006763458252,
-0.9364326596260071,
-0.41281646490097046,
-0.8453432321548462,
1.022878646850586,
2.5428125858306885,
1.366662621498108,
-1.2763853073120117,
2.756913900375366,
0.6279683709144592,
-0.2821715772151947,
-0.9833272695541382,
0.5646626949310303,
0.06544171273708344,
-1.1478443145751953,
-0.47851184010505676,
-0.9521074295043945,
-0.06342742592096329,
-0.5614509582519531,
-0.4199123680591583,
0.12420400977134705,
0.373125821352005,
-0.26957938075065613,
-0.25765717029571533,
-0.58588707447052,
-0.7120150923728943,
0.5171830058097839,
-0.41917112469673157,
0.9638339281082153,
-0.3477008044719696,
1.7337993383407593,
-0.7071639895439148,
0.47373268008232117,
0.7537158727645874,
1.3493643999099731,
0.1861790120601654,
0.10676771402359009,
0.2988741993904114,
0.4164428412914276,
0.028304679319262505,
0.6216744184494019,
1.2012202739715576,
0.6260951161384583,
0.45880448818206787,
0.6053739190101624,
-2.178969144821167,
1.244471788406372,
-0.9237699508666992,
0.24414803087711334,
1.3233290910720825,
-0.801548957824707,
0.41650089621543884,
-1.8229615688323975,
-0.14820976555347443,
0.588030993938446,
-2.330613374710083,
0.16181407868862152,
-1.3167684078216553,
-0.5287935137748718,
0.9506052732467651,
0.3603508472442627,
-1.2404146194458008,
0.20262494683265686,
-0.5211619138717651,
1.0202616453170776,
0.4286530017852783,
1.1499234437942505,
-1.6470754146575928,
-0.08230680227279663,
-0.22247838973999023,
0.1075914278626442,
-1.1775245666503906,
-1.64339280128479,
0.6224895119667053,
0.466981440782547,
0.6304900646209717,
-0.1418246030807495,
0.9926528334617615,
-1.0782032012939453,
0.8533098101615906,
-0.9388768672943115,
-1.6307622194290161,
-1.3989325761795044,
-2.4362213611602783,
-2.3165628910064697,
0.8781778812408447,
-0.5335109233856201,
-0.46373510360717773,
2.0188369750976562,
-0.9818614721298218,
-1.7224695682525635,
1.1028048992156982,
0.2659922242164612,
0.06020011752843857,
2.409165620803833,
0.22032544016838074,
-0.7270029783248901,
0.5419988036155701,
-0.7242949604988098,
0.822091817855835,
-0.3625521957874298,
1.3540815114974976,
0.468821257352829,
-0.9292778968811035,
1.5894755125045776,
-0.44326597452163696,
0.5221773982048035,
-0.6251427531242371,
-0.4502663314342499,
-0.7682176828384399,
0.27975624799728394,
1.8677490949630737,
-0.35203564167022705,
1.526549220085144,
-0.2719400227069855,
-1.5341061353683472,
-1.5709930658340454,
0.851974368095398,
0.4843197762966156,
-0.8293875455856323,
0.04386235773563385,
-0.44425246119499207,
0.20141078531742096,
0.025991545990109444,
1.1298224925994873,
1.249072551727295,
0.7530848383903503,
-0.38840875029563904,
-0.8466953635215759,
0.20281793177127838,
-0.17596948146820068,
-0.7371681928634644,
-1.868892788887024,
-0.3714844584465027,
0.16730265319347382,
0.634069561958313,
-1.2067903280258179,
1.7426279783248901,
0.9124430418014526,
1.9265309572219849,
0.9915198683738708,
-0.41957759857177734,
1.466591715812683,
-0.0022067823447287083,
1.8633462190628052,
-0.5040355324745178,
0.6403148770332336,
-0.40441083908081055,
-1.1762019395828247,
0.8499268293380737,
-0.3623272478580475,
-1.9813841581344604,
-0.8392131924629211,
-0.7725170850753784,
-0.2272113859653473,
-0.7429419755935669,
0.8828854560852051,
-0.32672208547592163,
-1.4852057695388794,
0.13469375669956207,
-0.6793901920318604,
0.0731704905629158,
-1.2882163524627686,
0.2348514050245285,
0.6313921809196472,
-0.6960908770561218,
-0.0037764552980661392,
-0.3136973977088928,
-1.175032377243042,
-0.5672102570533752,
0.24842481315135956,
1.965240716934204,
-0.6691375374794006,
0.9596713185310364,
0.9675442576408386,
-0.7601949572563171,
0.115764319896698,
0.3060699999332428,
-0.3275700509548187,
0.7722687125205994,
-1.0792564153671265,
-0.4633046090602875,
1.1940443515777588,
-0.22057579457759857,
-0.660209596157074,
1.4108600616455078,
0.8140404224395752,
-1.0867221355438232,
-0.2194034457206726,
-0.2161952257156372,
-0.8349656462669373,
-0.0008625602349638939,
-1.570378065109253,
-0.20756195485591888,
0.3383904695510864,
-1.486948013305664,
-0.45446446537971497,
-0.24605914950370789,
1.3732287883758545,
-0.15537358820438385,
1.4835638999938965,
-0.2901538908481598,
-0.23485007882118225,
-0.29972410202026367,
-0.42563289403915405,
0.20994260907173157,
-0.10915561765432358,
-0.572496771812439,
0.24130241572856903,
-0.8524407148361206,
0.28948381543159485,
1.5246831178665161,
0.3115420639514923,
0.05796302855014801,
0.5177657604217529,
1.0502901077270508,
0.3876936435699463,
-0.050930656492710114,
-0.9175171852111816,
-1.5212308168411255,
1.940317988395691,
-1.445124626159668,
1.9142707586288452,
0.8365426659584045,
-0.12518617510795593,
-1.775719165802002,
-1.8441317081451416,
1.2218122482299805,
1.1295663118362427,
2.37953519821167,
0.5037855505943298,
0.36736905574798584,
-0.7260363698005676,
-0.7807110548019409,
0.33790040016174316,
-1.037868857383728,
-0.7535500526428223,
0.11999613046646118,
2.3457772731781006,
1.8248077630996704,
-0.5782249569892883,
-0.22731034457683563,
-0.9382273554801941,
1.2760124206542969,
-0.2316378653049469,
0.26539158821105957,
2.0626492500305176,
-0.37112852931022644,
-1.0591678619384766,
1.3354891538619995,
-2.3247060775756836,
0.16214731335639954,
2.057161331176758,
0.27887213230133057,
0.11377063393592834,
-1.4675133228302002,
-0.668133020401001,
-0.23929791152477264,
-0.46165525913238525,
-1.2495687007904053,
0.5706485509872437,
-0.3046877980232239,
-0.8910483121871948,
-1.462842345237732,
0.031154653057456017,
-1.16923987865448,
-1.722124695777893,
0.2756273150444031,
1.945120930671692,
2.1022562980651855,
-0.7685409784317017,
1.377940058708191,
-0.2625083327293396,
0.010165397077798843,
1.2955156564712524,
1.2791376113891602,
3.113919258117676,
1.9078208208084106,
-1.280879259109497,
0.7557817697525024,
-0.29057326912879944,
-0.4765017628669739,
1.1255176067352295,
-1.125339150428772,
1.0514404773712158,
-0.2562789022922516,
-1.2307112216949463,
-1.2247788906097412,
1.0953108072280884,
0.4558682441711426,
-0.03576623648405075,
-0.48912397027015686,
1.266207218170166,
0.18692006170749664,
1.369118094444275,
0.5978361964225769,
-0.360039621591568,
0.6140457391738892,
-0.3950536847114563,
-0.4909333884716034,
1.6582093238830566,
0.2556600868701935,
-1.5225971937179565,
-2.3839504718780518,
-0.21564120054244995,
-1.0455588102340698,
-0.021583545953035355,
-0.5688108205795288,
-1.0257898569107056,
1.5980567932128906,
0.417563259601593,
-1.1262953281402588,
-0.2934650480747223,
-0.2444465607404709,
-0.5425764918327332,
2.670430898666382,
-1.2497745752334595,
-0.18994523584842682,
-0.9018815159797668,
-0.5705705285072327,
1.6278218030929565,
-1.203966498374939,
-0.1424666792154312,
-1.0203131437301636,
-0.5678299069404602,
-1.3161872625350952,
-0.4447714686393738,
0.06971176713705063,
-1.0238794088363647,
0.8285298347473145,
0.1292065680027008,
-1.1077265739440918,
-0.3296695351600647,
-0.8738739490509033,
0.9585228562355042,
0.03199141472578049,
0.2402404546737671,
1.8725073337554932,
0.36314594745635986,
-0.4349607825279236,
0.6971304416656494,
1.1890919208526611,
0.5852125883102417,
-0.6493138670921326,
0.12274870276451111,
-0.7071465253829956,
0.38456711173057556,
-1.3243275880813599,
0.21600158512592316,
-2.8684797286987305,
0.7663437724113464,
-0.19445335865020752,
-0.12296202033758163,
-0.11099017411470413,
-1.2903447151184082,
1.0787464380264282,
2.599339723587036,
-1.0949549674987793,
0.4872013330459595,
0.37899598479270935,
1.209892988204956,
-1.5693708658218384,
0.31803280115127563,
-0.4651187062263489,
2.091409206390381,
0.15543721616268158,
1.2157360315322876,
-0.46122413873672485,
-2.203939914703369,
0.68079674243927,
-1.234754204750061,
-1.067259430885315,
0.7174217104911804,
-0.7943164706230164,
0.1776372492313385,
-1.4849117994308472,
-0.12990032136440277,
-0.8785492777824402,
-1.2021152973175049,
0.7105792164802551,
0.08813241124153137,
0.45362672209739685,
-0.5636968612670898,
0.35802072286605835,
-2.1354622840881348,
-1.4397425651550293,
-0.23445197939872742,
-0.9515698552131653,
0.5086531639099121,
-0.42946481704711914,
0.6458932161331177,
-0.1261172890663147,
-0.0030494718812406063,
0.3012951910495758,
1.437186598777771,
3.4122538566589355,
0.09388988465070724,
0.18021681904792786,
-0.10474622994661331,
-1.0545328855514526,
1.4413970708847046,
0.8281938433647156,
-0.16801641881465912,
-0.59856116771698,
-1.1047964096069336,
1.2686960697174072,
2.032437324523926,
1.124728798866272,
0.18229235708713531,
-0.7804131507873535,
-0.6864540576934814,
-0.03914623707532883,
0.2014625370502472,
0.5082274675369263,
0.9213008880615234,
-0.09708631038665771,
0.026873739436268806,
1.4106075763702393,
1.232364535331726,
-0.3319056034088135,
0.4251106381416321,
-0.9278215169906616,
-0.43448522686958313,
0.4545171558856964,
0.1858086884021759,
0.07796991616487503,
0.4074297547340393,
-1.022128701210022,
-0.3625781834125519,
-0.33872324228286743,
-0.9225188493728638,
-0.7324065566062927,
-0.3768245279788971,
-0.43395403027534485,
1.5734977722167969,
0.0725843608379364,
-0.45103776454925537,
0.022188609465956688,
-0.6785217523574829,
-0.08501291275024414,
-1.0669933557510376,
0.1377572864294052,
-0.16275808215141296,
-0.09671835601329803,
-0.18123812973499298,
1.7000751495361328,
-0.9120420217514038,
-2.1289398670196533,
0.2281113862991333,
0.30691277980804443,
-0.33964353799819946,
0.2915182411670685,
1.6511555910110474,
0.5585392713546753,
1.421687126159668,
1.2962090969085693,
0.9936836361885071,
-0.5839256644248962,
-1.2240065336227417,
0.7549033164978027,
0.9730924367904663,
-1.409690260887146,
0.8711819052696228,
-0.09286569058895111,
-0.48191899061203003,
0.635728120803833,
1.2501707077026367,
0.3189680874347687,
-2.0125722885131836,
0.9021272659301758,
-0.8906856179237366,
0.7846575975418091,
0.6801154613494873,
0.7480754852294922,
0.2556033432483673,
0.8626270890235901,
-1.234057068824768,
-1.0982176065444946,
-0.7236384749412537,
-0.5997304916381836,
1.9883853197097778,
-0.14465941488742828,
0.5697672367095947,
-0.2323308289051056,
-1.1916966438293457,
-0.1024956926703453,
0.7223588824272156,
0.35299012064933777,
-0.46536317467689514,
0.8239566087722778,
-0.6702864170074463,
-0.9719467759132385,
-1.3435239791870117,
-0.37819814682006836,
-1.0930501222610474,
-0.8663796186447144,
1.0381354093551636,
0.8256191611289978,
0.43912503123283386,
1.9738295078277588,
0.5910483002662659,
0.319061279296875,
-2.649162769317627,
0.907706618309021,
0.27033311128616333,
-0.022620389237999916,
0.9100503325462341,
0.2401079535484314,
1.1031572818756104,
-0.0035070083104074,
0.5800133943557739,
-2.3427305221557617,
2.257167100906372,
-0.13910269737243652,
0.6747178435325623,
0.13975383341312408,
-0.15390272438526154,
1.1544525623321533,
0.625665009021759,
0.6128643751144409,
-1.0794739723205566,
0.6897406578063965,
-0.5419245958328247,
1.1970940828323364,
1.0148166418075562,
-0.8525367975234985,
0.07839014381170273,
1.3892394304275513,
0.5300509929656982,
-0.3943166136741638,
-0.949559211730957,
-0.8182658553123474,
0.9342665672302246,
1.7175116539001465,
-0.09086809307336807,
-0.03354839235544205,
0.8486941456794739,
0.6481671929359436,
-1.257729172706604,
0.0678468570113182,
-0.7740964293479919,
-0.6792613863945007,
1.6996148824691772,
2.0937435626983643,
-0.18296770751476288,
-0.20570482313632965,
-0.7428234219551086,
-1.3113113641738892,
0.8067578077316284,
-0.06911491602659225,
0.13236752152442932,
0.7583487629890442,
-0.6120249032974243,
1.1283482313156128,
0.6485534906387329,
1.0433145761489868,
0.145389586687088,
0.3077307641506195,
0.36537718772888184,
-0.3884398639202118,
-1.1010617017745972,
-0.252387136220932,
-1.1521695852279663,
-2.6556832790374756,
0.4287143647670746,
-0.3063468635082245,
-1.4604231119155884,
0.11649177968502045,
-0.9902240633964539,
0.9057703018188477,
-0.5613803267478943,
-1.1133462190628052,
-1.4309601783752441,
0.2966749668121338,
-0.13735556602478027,
0.9736587405204773,
-1.7286567687988281,
-0.11772021651268005,
1.2842259407043457,
0.8378524780273438,
-0.5252074599266052,
0.882308304309845,
0.24877779185771942,
0.9607273936271667,
0.7924262881278992,
-0.33980706334114075,
0.5734639167785645,
-0.05683310329914093,
-1.3099623918533325,
0.4045991599559784,
1.2175092697143555,
0.1661349982023239,
1.3614916801452637,
-0.5060462355613708,
0.11869408190250397,
0.3854042589664459,
-0.657951295375824,
-0.5384085178375244,
-0.36764058470726013,
0.7061423063278198,
-0.02785063348710537,
-1.107494592666626,
-0.1355273574590683,
-0.06985081732273102,
-0.26745736598968506,
0.14826078712940216,
-1.3824173212051392,
-0.22826896607875824,
-0.381377637386322,
-0.4860149919986725,
-1.3185120820999146,
-0.01430593803524971,
1.2470000982284546,
-0.8191314339637756,
-0.2488224357366562,
0.4693429172039032,
0.3032081127166748,
0.6230383515357971,
0.5259079933166504,
-0.7812758088111877,
-0.36344221234321594,
-0.32464608550071716,
-0.3190169334411621,
0.2603611946105957,
1.3132981061935425,
-0.10750416666269302,
-0.9980301260948181,
0.6444550156593323,
-0.36701661348342896,
0.12032103538513184,
2.0153756141662598,
0.04023740440607071,
-0.6610305309295654,
0.32976818084716797,
-0.6459835171699524,
1.7603572607040405,
1.6860309839248657,
1.2140774726867676,
-0.08383625745773315,
-0.8137367367744446,
0.5062177777290344,
-0.3127901554107666,
-0.37174251675605774,
0.8187406063079834,
0.3664363920688629,
-0.17010298371315002,
-1.4270033836364746,
0.568266749382019,
1.2701784372329712,
-0.7966088056564331,
-0.7615712285041809,
0.015401842072606087,
-0.9062132835388184,
1.2037969827651978,
0.6769316792488098,
0.42934465408325195,
0.18892453610897064,
1.6427853107452393,
0.7711060643196106,
-0.5199629068374634,
0.490724116563797,
0.5227240920066833,
-0.16844509541988373,
-2.123091459274292,
-1.067530632019043,
0.25784000754356384,
-0.4901978671550751,
-1.5900299549102783,
1.3644464015960693,
-1.1069711446762085,
-0.9594593644142151,
0.6094348430633545,
0.14020748436450958,
1.4040518999099731,
0.35506245493888855,
1.6917651891708374,
2.1038658618927,
0.9267942309379578,
0.3797423541545868,
1.2736634016036987,
-0.06850319355726242,
-0.5082241892814636,
1.869389295578003,
-0.3516281843185425,
0.48407337069511414,
1.0172868967056274,
-0.36642709374427795,
-1.06118905544281,
-0.8094623684883118,
-1.1477183103561401,
-0.6050634384155273,
1.1818901300430298,
0.07487240433692932,
-0.9982641935348511,
0.18285271525382996,
1.6153556108474731,
0.1330968141555786,
-0.2950306236743927,
0.6884601712226868,
0.4734390676021576,
-0.7389522194862366,
-0.05371452122926712,
-0.9309958815574646,
0.4728955626487732,
-0.10856088995933533,
-0.34434840083122253,
0.25200048089027405,
0.5164679884910583,
1.362650752067566,
-0.11023719608783722,
0.14322833716869354,
1.1320282220840454,
-1.4365555047988892,
1.5477397441864014,
-0.6295567750930786,
0.2689674198627472,
-2.468395471572876,
1.392930507659912,
-0.8589073419570923,
1.9001303911209106,
-2.5434272289276123,
0.47975754737854004,
-0.5583856105804443,
-0.45024386048316956,
0.2318216860294342,
-0.42351585626602173,
0.15589329600334167,
-0.14260168373584747,
-1.0264309644699097,
-0.01285061240196228,
-0.7016003131866455,
0.579619288444519,
1.1490604877471924,
1.4430691003799438,
-1.1705001592636108,
-0.2914317548274994,
-1.772293210029602,
-0.11714020371437073,
-0.7575480341911316,
0.3562330901622772,
-1.9301499128341675,
-0.14625966548919678,
-1.945172667503357,
-2.268742561340332,
-1.3849518299102783,
-0.9149281978607178,
1.0270203351974487,
0.1561853587627411,
-0.9100437760353088,
1.1266553401947021,
-0.36807361245155334,
-1.9195024967193604,
1.2069636583328247,
-2.2206497192382812
] |
https://github.com/huggingface/datasets/issues/5412
|
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
|
You can have a separate script that does load_dataset + map + save_to_disk to save your prepared dataset somewhere. Then in your training script you can reload the dataset with load_from_disk
|
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
| 351 | 31 |
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
You can have a separate script that does load_dataset + map + save_to_disk to save your prepared dataset somewhere. Then in your training script you can reload the dataset with load_from_disk
|
[
-1.2141274213790894,
-0.9969725012779236,
-0.6490305066108704,
1.4509425163269043,
-0.19368737936019897,
-1.2160694599151611,
0.19137239456176758,
-1.0793054103851318,
1.5731899738311768,
-0.7488421201705933,
0.2618825137615204,
-1.631170392036438,
-0.0954568088054657,
-0.5608007311820984,
-0.7433006763458252,
-0.9364326596260071,
-0.41281646490097046,
-0.8453432321548462,
1.022878646850586,
2.5428125858306885,
1.366662621498108,
-1.2763853073120117,
2.756913900375366,
0.6279683709144592,
-0.2821715772151947,
-0.9833272695541382,
0.5646626949310303,
0.06544171273708344,
-1.1478443145751953,
-0.47851184010505676,
-0.9521074295043945,
-0.06342742592096329,
-0.5614509582519531,
-0.4199123680591583,
0.12420400977134705,
0.373125821352005,
-0.26957938075065613,
-0.25765717029571533,
-0.58588707447052,
-0.7120150923728943,
0.5171830058097839,
-0.41917112469673157,
0.9638339281082153,
-0.3477008044719696,
1.7337993383407593,
-0.7071639895439148,
0.47373268008232117,
0.7537158727645874,
1.3493643999099731,
0.1861790120601654,
0.10676771402359009,
0.2988741993904114,
0.4164428412914276,
0.028304679319262505,
0.6216744184494019,
1.2012202739715576,
0.6260951161384583,
0.45880448818206787,
0.6053739190101624,
-2.178969144821167,
1.244471788406372,
-0.9237699508666992,
0.24414803087711334,
1.3233290910720825,
-0.801548957824707,
0.41650089621543884,
-1.8229615688323975,
-0.14820976555347443,
0.588030993938446,
-2.330613374710083,
0.16181407868862152,
-1.3167684078216553,
-0.5287935137748718,
0.9506052732467651,
0.3603508472442627,
-1.2404146194458008,
0.20262494683265686,
-0.5211619138717651,
1.0202616453170776,
0.4286530017852783,
1.1499234437942505,
-1.6470754146575928,
-0.08230680227279663,
-0.22247838973999023,
0.1075914278626442,
-1.1775245666503906,
-1.64339280128479,
0.6224895119667053,
0.466981440782547,
0.6304900646209717,
-0.1418246030807495,
0.9926528334617615,
-1.0782032012939453,
0.8533098101615906,
-0.9388768672943115,
-1.6307622194290161,
-1.3989325761795044,
-2.4362213611602783,
-2.3165628910064697,
0.8781778812408447,
-0.5335109233856201,
-0.46373510360717773,
2.0188369750976562,
-0.9818614721298218,
-1.7224695682525635,
1.1028048992156982,
0.2659922242164612,
0.06020011752843857,
2.409165620803833,
0.22032544016838074,
-0.7270029783248901,
0.5419988036155701,
-0.7242949604988098,
0.822091817855835,
-0.3625521957874298,
1.3540815114974976,
0.468821257352829,
-0.9292778968811035,
1.5894755125045776,
-0.44326597452163696,
0.5221773982048035,
-0.6251427531242371,
-0.4502663314342499,
-0.7682176828384399,
0.27975624799728394,
1.8677490949630737,
-0.35203564167022705,
1.526549220085144,
-0.2719400227069855,
-1.5341061353683472,
-1.5709930658340454,
0.851974368095398,
0.4843197762966156,
-0.8293875455856323,
0.04386235773563385,
-0.44425246119499207,
0.20141078531742096,
0.025991545990109444,
1.1298224925994873,
1.249072551727295,
0.7530848383903503,
-0.38840875029563904,
-0.8466953635215759,
0.20281793177127838,
-0.17596948146820068,
-0.7371681928634644,
-1.868892788887024,
-0.3714844584465027,
0.16730265319347382,
0.634069561958313,
-1.2067903280258179,
1.7426279783248901,
0.9124430418014526,
1.9265309572219849,
0.9915198683738708,
-0.41957759857177734,
1.466591715812683,
-0.0022067823447287083,
1.8633462190628052,
-0.5040355324745178,
0.6403148770332336,
-0.40441083908081055,
-1.1762019395828247,
0.8499268293380737,
-0.3623272478580475,
-1.9813841581344604,
-0.8392131924629211,
-0.7725170850753784,
-0.2272113859653473,
-0.7429419755935669,
0.8828854560852051,
-0.32672208547592163,
-1.4852057695388794,
0.13469375669956207,
-0.6793901920318604,
0.0731704905629158,
-1.2882163524627686,
0.2348514050245285,
0.6313921809196472,
-0.6960908770561218,
-0.0037764552980661392,
-0.3136973977088928,
-1.175032377243042,
-0.5672102570533752,
0.24842481315135956,
1.965240716934204,
-0.6691375374794006,
0.9596713185310364,
0.9675442576408386,
-0.7601949572563171,
0.115764319896698,
0.3060699999332428,
-0.3275700509548187,
0.7722687125205994,
-1.0792564153671265,
-0.4633046090602875,
1.1940443515777588,
-0.22057579457759857,
-0.660209596157074,
1.4108600616455078,
0.8140404224395752,
-1.0867221355438232,
-0.2194034457206726,
-0.2161952257156372,
-0.8349656462669373,
-0.0008625602349638939,
-1.570378065109253,
-0.20756195485591888,
0.3383904695510864,
-1.486948013305664,
-0.45446446537971497,
-0.24605914950370789,
1.3732287883758545,
-0.15537358820438385,
1.4835638999938965,
-0.2901538908481598,
-0.23485007882118225,
-0.29972410202026367,
-0.42563289403915405,
0.20994260907173157,
-0.10915561765432358,
-0.572496771812439,
0.24130241572856903,
-0.8524407148361206,
0.28948381543159485,
1.5246831178665161,
0.3115420639514923,
0.05796302855014801,
0.5177657604217529,
1.0502901077270508,
0.3876936435699463,
-0.050930656492710114,
-0.9175171852111816,
-1.5212308168411255,
1.940317988395691,
-1.445124626159668,
1.9142707586288452,
0.8365426659584045,
-0.12518617510795593,
-1.775719165802002,
-1.8441317081451416,
1.2218122482299805,
1.1295663118362427,
2.37953519821167,
0.5037855505943298,
0.36736905574798584,
-0.7260363698005676,
-0.7807110548019409,
0.33790040016174316,
-1.037868857383728,
-0.7535500526428223,
0.11999613046646118,
2.3457772731781006,
1.8248077630996704,
-0.5782249569892883,
-0.22731034457683563,
-0.9382273554801941,
1.2760124206542969,
-0.2316378653049469,
0.26539158821105957,
2.0626492500305176,
-0.37112852931022644,
-1.0591678619384766,
1.3354891538619995,
-2.3247060775756836,
0.16214731335639954,
2.057161331176758,
0.27887213230133057,
0.11377063393592834,
-1.4675133228302002,
-0.668133020401001,
-0.23929791152477264,
-0.46165525913238525,
-1.2495687007904053,
0.5706485509872437,
-0.3046877980232239,
-0.8910483121871948,
-1.462842345237732,
0.031154653057456017,
-1.16923987865448,
-1.722124695777893,
0.2756273150444031,
1.945120930671692,
2.1022562980651855,
-0.7685409784317017,
1.377940058708191,
-0.2625083327293396,
0.010165397077798843,
1.2955156564712524,
1.2791376113891602,
3.113919258117676,
1.9078208208084106,
-1.280879259109497,
0.7557817697525024,
-0.29057326912879944,
-0.4765017628669739,
1.1255176067352295,
-1.125339150428772,
1.0514404773712158,
-0.2562789022922516,
-1.2307112216949463,
-1.2247788906097412,
1.0953108072280884,
0.4558682441711426,
-0.03576623648405075,
-0.48912397027015686,
1.266207218170166,
0.18692006170749664,
1.369118094444275,
0.5978361964225769,
-0.360039621591568,
0.6140457391738892,
-0.3950536847114563,
-0.4909333884716034,
1.6582093238830566,
0.2556600868701935,
-1.5225971937179565,
-2.3839504718780518,
-0.21564120054244995,
-1.0455588102340698,
-0.021583545953035355,
-0.5688108205795288,
-1.0257898569107056,
1.5980567932128906,
0.417563259601593,
-1.1262953281402588,
-0.2934650480747223,
-0.2444465607404709,
-0.5425764918327332,
2.670430898666382,
-1.2497745752334595,
-0.18994523584842682,
-0.9018815159797668,
-0.5705705285072327,
1.6278218030929565,
-1.203966498374939,
-0.1424666792154312,
-1.0203131437301636,
-0.5678299069404602,
-1.3161872625350952,
-0.4447714686393738,
0.06971176713705063,
-1.0238794088363647,
0.8285298347473145,
0.1292065680027008,
-1.1077265739440918,
-0.3296695351600647,
-0.8738739490509033,
0.9585228562355042,
0.03199141472578049,
0.2402404546737671,
1.8725073337554932,
0.36314594745635986,
-0.4349607825279236,
0.6971304416656494,
1.1890919208526611,
0.5852125883102417,
-0.6493138670921326,
0.12274870276451111,
-0.7071465253829956,
0.38456711173057556,
-1.3243275880813599,
0.21600158512592316,
-2.8684797286987305,
0.7663437724113464,
-0.19445335865020752,
-0.12296202033758163,
-0.11099017411470413,
-1.2903447151184082,
1.0787464380264282,
2.599339723587036,
-1.0949549674987793,
0.4872013330459595,
0.37899598479270935,
1.209892988204956,
-1.5693708658218384,
0.31803280115127563,
-0.4651187062263489,
2.091409206390381,
0.15543721616268158,
1.2157360315322876,
-0.46122413873672485,
-2.203939914703369,
0.68079674243927,
-1.234754204750061,
-1.067259430885315,
0.7174217104911804,
-0.7943164706230164,
0.1776372492313385,
-1.4849117994308472,
-0.12990032136440277,
-0.8785492777824402,
-1.2021152973175049,
0.7105792164802551,
0.08813241124153137,
0.45362672209739685,
-0.5636968612670898,
0.35802072286605835,
-2.1354622840881348,
-1.4397425651550293,
-0.23445197939872742,
-0.9515698552131653,
0.5086531639099121,
-0.42946481704711914,
0.6458932161331177,
-0.1261172890663147,
-0.0030494718812406063,
0.3012951910495758,
1.437186598777771,
3.4122538566589355,
0.09388988465070724,
0.18021681904792786,
-0.10474622994661331,
-1.0545328855514526,
1.4413970708847046,
0.8281938433647156,
-0.16801641881465912,
-0.59856116771698,
-1.1047964096069336,
1.2686960697174072,
2.032437324523926,
1.124728798866272,
0.18229235708713531,
-0.7804131507873535,
-0.6864540576934814,
-0.03914623707532883,
0.2014625370502472,
0.5082274675369263,
0.9213008880615234,
-0.09708631038665771,
0.026873739436268806,
1.4106075763702393,
1.232364535331726,
-0.3319056034088135,
0.4251106381416321,
-0.9278215169906616,
-0.43448522686958313,
0.4545171558856964,
0.1858086884021759,
0.07796991616487503,
0.4074297547340393,
-1.022128701210022,
-0.3625781834125519,
-0.33872324228286743,
-0.9225188493728638,
-0.7324065566062927,
-0.3768245279788971,
-0.43395403027534485,
1.5734977722167969,
0.0725843608379364,
-0.45103776454925537,
0.022188609465956688,
-0.6785217523574829,
-0.08501291275024414,
-1.0669933557510376,
0.1377572864294052,
-0.16275808215141296,
-0.09671835601329803,
-0.18123812973499298,
1.7000751495361328,
-0.9120420217514038,
-2.1289398670196533,
0.2281113862991333,
0.30691277980804443,
-0.33964353799819946,
0.2915182411670685,
1.6511555910110474,
0.5585392713546753,
1.421687126159668,
1.2962090969085693,
0.9936836361885071,
-0.5839256644248962,
-1.2240065336227417,
0.7549033164978027,
0.9730924367904663,
-1.409690260887146,
0.8711819052696228,
-0.09286569058895111,
-0.48191899061203003,
0.635728120803833,
1.2501707077026367,
0.3189680874347687,
-2.0125722885131836,
0.9021272659301758,
-0.8906856179237366,
0.7846575975418091,
0.6801154613494873,
0.7480754852294922,
0.2556033432483673,
0.8626270890235901,
-1.234057068824768,
-1.0982176065444946,
-0.7236384749412537,
-0.5997304916381836,
1.9883853197097778,
-0.14465941488742828,
0.5697672367095947,
-0.2323308289051056,
-1.1916966438293457,
-0.1024956926703453,
0.7223588824272156,
0.35299012064933777,
-0.46536317467689514,
0.8239566087722778,
-0.6702864170074463,
-0.9719467759132385,
-1.3435239791870117,
-0.37819814682006836,
-1.0930501222610474,
-0.8663796186447144,
1.0381354093551636,
0.8256191611289978,
0.43912503123283386,
1.9738295078277588,
0.5910483002662659,
0.319061279296875,
-2.649162769317627,
0.907706618309021,
0.27033311128616333,
-0.022620389237999916,
0.9100503325462341,
0.2401079535484314,
1.1031572818756104,
-0.0035070083104074,
0.5800133943557739,
-2.3427305221557617,
2.257167100906372,
-0.13910269737243652,
0.6747178435325623,
0.13975383341312408,
-0.15390272438526154,
1.1544525623321533,
0.625665009021759,
0.6128643751144409,
-1.0794739723205566,
0.6897406578063965,
-0.5419245958328247,
1.1970940828323364,
1.0148166418075562,
-0.8525367975234985,
0.07839014381170273,
1.3892394304275513,
0.5300509929656982,
-0.3943166136741638,
-0.949559211730957,
-0.8182658553123474,
0.9342665672302246,
1.7175116539001465,
-0.09086809307336807,
-0.03354839235544205,
0.8486941456794739,
0.6481671929359436,
-1.257729172706604,
0.0678468570113182,
-0.7740964293479919,
-0.6792613863945007,
1.6996148824691772,
2.0937435626983643,
-0.18296770751476288,
-0.20570482313632965,
-0.7428234219551086,
-1.3113113641738892,
0.8067578077316284,
-0.06911491602659225,
0.13236752152442932,
0.7583487629890442,
-0.6120249032974243,
1.1283482313156128,
0.6485534906387329,
1.0433145761489868,
0.145389586687088,
0.3077307641506195,
0.36537718772888184,
-0.3884398639202118,
-1.1010617017745972,
-0.252387136220932,
-1.1521695852279663,
-2.6556832790374756,
0.4287143647670746,
-0.3063468635082245,
-1.4604231119155884,
0.11649177968502045,
-0.9902240633964539,
0.9057703018188477,
-0.5613803267478943,
-1.1133462190628052,
-1.4309601783752441,
0.2966749668121338,
-0.13735556602478027,
0.9736587405204773,
-1.7286567687988281,
-0.11772021651268005,
1.2842259407043457,
0.8378524780273438,
-0.5252074599266052,
0.882308304309845,
0.24877779185771942,
0.9607273936271667,
0.7924262881278992,
-0.33980706334114075,
0.5734639167785645,
-0.05683310329914093,
-1.3099623918533325,
0.4045991599559784,
1.2175092697143555,
0.1661349982023239,
1.3614916801452637,
-0.5060462355613708,
0.11869408190250397,
0.3854042589664459,
-0.657951295375824,
-0.5384085178375244,
-0.36764058470726013,
0.7061423063278198,
-0.02785063348710537,
-1.107494592666626,
-0.1355273574590683,
-0.06985081732273102,
-0.26745736598968506,
0.14826078712940216,
-1.3824173212051392,
-0.22826896607875824,
-0.381377637386322,
-0.4860149919986725,
-1.3185120820999146,
-0.01430593803524971,
1.2470000982284546,
-0.8191314339637756,
-0.2488224357366562,
0.4693429172039032,
0.3032081127166748,
0.6230383515357971,
0.5259079933166504,
-0.7812758088111877,
-0.36344221234321594,
-0.32464608550071716,
-0.3190169334411621,
0.2603611946105957,
1.3132981061935425,
-0.10750416666269302,
-0.9980301260948181,
0.6444550156593323,
-0.36701661348342896,
0.12032103538513184,
2.0153756141662598,
0.04023740440607071,
-0.6610305309295654,
0.32976818084716797,
-0.6459835171699524,
1.7603572607040405,
1.6860309839248657,
1.2140774726867676,
-0.08383625745773315,
-0.8137367367744446,
0.5062177777290344,
-0.3127901554107666,
-0.37174251675605774,
0.8187406063079834,
0.3664363920688629,
-0.17010298371315002,
-1.4270033836364746,
0.568266749382019,
1.2701784372329712,
-0.7966088056564331,
-0.7615712285041809,
0.015401842072606087,
-0.9062132835388184,
1.2037969827651978,
0.6769316792488098,
0.42934465408325195,
0.18892453610897064,
1.6427853107452393,
0.7711060643196106,
-0.5199629068374634,
0.490724116563797,
0.5227240920066833,
-0.16844509541988373,
-2.123091459274292,
-1.067530632019043,
0.25784000754356384,
-0.4901978671550751,
-1.5900299549102783,
1.3644464015960693,
-1.1069711446762085,
-0.9594593644142151,
0.6094348430633545,
0.14020748436450958,
1.4040518999099731,
0.35506245493888855,
1.6917651891708374,
2.1038658618927,
0.9267942309379578,
0.3797423541545868,
1.2736634016036987,
-0.06850319355726242,
-0.5082241892814636,
1.869389295578003,
-0.3516281843185425,
0.48407337069511414,
1.0172868967056274,
-0.36642709374427795,
-1.06118905544281,
-0.8094623684883118,
-1.1477183103561401,
-0.6050634384155273,
1.1818901300430298,
0.07487240433692932,
-0.9982641935348511,
0.18285271525382996,
1.6153556108474731,
0.1330968141555786,
-0.2950306236743927,
0.6884601712226868,
0.4734390676021576,
-0.7389522194862366,
-0.05371452122926712,
-0.9309958815574646,
0.4728955626487732,
-0.10856088995933533,
-0.34434840083122253,
0.25200048089027405,
0.5164679884910583,
1.362650752067566,
-0.11023719608783722,
0.14322833716869354,
1.1320282220840454,
-1.4365555047988892,
1.5477397441864014,
-0.6295567750930786,
0.2689674198627472,
-2.468395471572876,
1.392930507659912,
-0.8589073419570923,
1.9001303911209106,
-2.5434272289276123,
0.47975754737854004,
-0.5583856105804443,
-0.45024386048316956,
0.2318216860294342,
-0.42351585626602173,
0.15589329600334167,
-0.14260168373584747,
-1.0264309644699097,
-0.01285061240196228,
-0.7016003131866455,
0.579619288444519,
1.1490604877471924,
1.4430691003799438,
-1.1705001592636108,
-0.2914317548274994,
-1.772293210029602,
-0.11714020371437073,
-0.7575480341911316,
0.3562330901622772,
-1.9301499128341675,
-0.14625966548919678,
-1.945172667503357,
-2.268742561340332,
-1.3849518299102783,
-0.9149281978607178,
1.0270203351974487,
0.1561853587627411,
-0.9100437760353088,
1.1266553401947021,
-0.36807361245155334,
-1.9195024967193604,
1.2069636583328247,
-2.2206497192382812
] |
https://github.com/huggingface/datasets/issues/5412
|
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
|
Thank you! I believe I was running additional map steps after loading, resulting in the cache conflict.
|
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
| 351 | 17 |
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Thank you! I believe I was running additional map steps after loading, resulting in the cache conflict.
|
[
-1.2141274213790894,
-0.9969725012779236,
-0.6490305066108704,
1.4509425163269043,
-0.19368737936019897,
-1.2160694599151611,
0.19137239456176758,
-1.0793054103851318,
1.5731899738311768,
-0.7488421201705933,
0.2618825137615204,
-1.631170392036438,
-0.0954568088054657,
-0.5608007311820984,
-0.7433006763458252,
-0.9364326596260071,
-0.41281646490097046,
-0.8453432321548462,
1.022878646850586,
2.5428125858306885,
1.366662621498108,
-1.2763853073120117,
2.756913900375366,
0.6279683709144592,
-0.2821715772151947,
-0.9833272695541382,
0.5646626949310303,
0.06544171273708344,
-1.1478443145751953,
-0.47851184010505676,
-0.9521074295043945,
-0.06342742592096329,
-0.5614509582519531,
-0.4199123680591583,
0.12420400977134705,
0.373125821352005,
-0.26957938075065613,
-0.25765717029571533,
-0.58588707447052,
-0.7120150923728943,
0.5171830058097839,
-0.41917112469673157,
0.9638339281082153,
-0.3477008044719696,
1.7337993383407593,
-0.7071639895439148,
0.47373268008232117,
0.7537158727645874,
1.3493643999099731,
0.1861790120601654,
0.10676771402359009,
0.2988741993904114,
0.4164428412914276,
0.028304679319262505,
0.6216744184494019,
1.2012202739715576,
0.6260951161384583,
0.45880448818206787,
0.6053739190101624,
-2.178969144821167,
1.244471788406372,
-0.9237699508666992,
0.24414803087711334,
1.3233290910720825,
-0.801548957824707,
0.41650089621543884,
-1.8229615688323975,
-0.14820976555347443,
0.588030993938446,
-2.330613374710083,
0.16181407868862152,
-1.3167684078216553,
-0.5287935137748718,
0.9506052732467651,
0.3603508472442627,
-1.2404146194458008,
0.20262494683265686,
-0.5211619138717651,
1.0202616453170776,
0.4286530017852783,
1.1499234437942505,
-1.6470754146575928,
-0.08230680227279663,
-0.22247838973999023,
0.1075914278626442,
-1.1775245666503906,
-1.64339280128479,
0.6224895119667053,
0.466981440782547,
0.6304900646209717,
-0.1418246030807495,
0.9926528334617615,
-1.0782032012939453,
0.8533098101615906,
-0.9388768672943115,
-1.6307622194290161,
-1.3989325761795044,
-2.4362213611602783,
-2.3165628910064697,
0.8781778812408447,
-0.5335109233856201,
-0.46373510360717773,
2.0188369750976562,
-0.9818614721298218,
-1.7224695682525635,
1.1028048992156982,
0.2659922242164612,
0.06020011752843857,
2.409165620803833,
0.22032544016838074,
-0.7270029783248901,
0.5419988036155701,
-0.7242949604988098,
0.822091817855835,
-0.3625521957874298,
1.3540815114974976,
0.468821257352829,
-0.9292778968811035,
1.5894755125045776,
-0.44326597452163696,
0.5221773982048035,
-0.6251427531242371,
-0.4502663314342499,
-0.7682176828384399,
0.27975624799728394,
1.8677490949630737,
-0.35203564167022705,
1.526549220085144,
-0.2719400227069855,
-1.5341061353683472,
-1.5709930658340454,
0.851974368095398,
0.4843197762966156,
-0.8293875455856323,
0.04386235773563385,
-0.44425246119499207,
0.20141078531742096,
0.025991545990109444,
1.1298224925994873,
1.249072551727295,
0.7530848383903503,
-0.38840875029563904,
-0.8466953635215759,
0.20281793177127838,
-0.17596948146820068,
-0.7371681928634644,
-1.868892788887024,
-0.3714844584465027,
0.16730265319347382,
0.634069561958313,
-1.2067903280258179,
1.7426279783248901,
0.9124430418014526,
1.9265309572219849,
0.9915198683738708,
-0.41957759857177734,
1.466591715812683,
-0.0022067823447287083,
1.8633462190628052,
-0.5040355324745178,
0.6403148770332336,
-0.40441083908081055,
-1.1762019395828247,
0.8499268293380737,
-0.3623272478580475,
-1.9813841581344604,
-0.8392131924629211,
-0.7725170850753784,
-0.2272113859653473,
-0.7429419755935669,
0.8828854560852051,
-0.32672208547592163,
-1.4852057695388794,
0.13469375669956207,
-0.6793901920318604,
0.0731704905629158,
-1.2882163524627686,
0.2348514050245285,
0.6313921809196472,
-0.6960908770561218,
-0.0037764552980661392,
-0.3136973977088928,
-1.175032377243042,
-0.5672102570533752,
0.24842481315135956,
1.965240716934204,
-0.6691375374794006,
0.9596713185310364,
0.9675442576408386,
-0.7601949572563171,
0.115764319896698,
0.3060699999332428,
-0.3275700509548187,
0.7722687125205994,
-1.0792564153671265,
-0.4633046090602875,
1.1940443515777588,
-0.22057579457759857,
-0.660209596157074,
1.4108600616455078,
0.8140404224395752,
-1.0867221355438232,
-0.2194034457206726,
-0.2161952257156372,
-0.8349656462669373,
-0.0008625602349638939,
-1.570378065109253,
-0.20756195485591888,
0.3383904695510864,
-1.486948013305664,
-0.45446446537971497,
-0.24605914950370789,
1.3732287883758545,
-0.15537358820438385,
1.4835638999938965,
-0.2901538908481598,
-0.23485007882118225,
-0.29972410202026367,
-0.42563289403915405,
0.20994260907173157,
-0.10915561765432358,
-0.572496771812439,
0.24130241572856903,
-0.8524407148361206,
0.28948381543159485,
1.5246831178665161,
0.3115420639514923,
0.05796302855014801,
0.5177657604217529,
1.0502901077270508,
0.3876936435699463,
-0.050930656492710114,
-0.9175171852111816,
-1.5212308168411255,
1.940317988395691,
-1.445124626159668,
1.9142707586288452,
0.8365426659584045,
-0.12518617510795593,
-1.775719165802002,
-1.8441317081451416,
1.2218122482299805,
1.1295663118362427,
2.37953519821167,
0.5037855505943298,
0.36736905574798584,
-0.7260363698005676,
-0.7807110548019409,
0.33790040016174316,
-1.037868857383728,
-0.7535500526428223,
0.11999613046646118,
2.3457772731781006,
1.8248077630996704,
-0.5782249569892883,
-0.22731034457683563,
-0.9382273554801941,
1.2760124206542969,
-0.2316378653049469,
0.26539158821105957,
2.0626492500305176,
-0.37112852931022644,
-1.0591678619384766,
1.3354891538619995,
-2.3247060775756836,
0.16214731335639954,
2.057161331176758,
0.27887213230133057,
0.11377063393592834,
-1.4675133228302002,
-0.668133020401001,
-0.23929791152477264,
-0.46165525913238525,
-1.2495687007904053,
0.5706485509872437,
-0.3046877980232239,
-0.8910483121871948,
-1.462842345237732,
0.031154653057456017,
-1.16923987865448,
-1.722124695777893,
0.2756273150444031,
1.945120930671692,
2.1022562980651855,
-0.7685409784317017,
1.377940058708191,
-0.2625083327293396,
0.010165397077798843,
1.2955156564712524,
1.2791376113891602,
3.113919258117676,
1.9078208208084106,
-1.280879259109497,
0.7557817697525024,
-0.29057326912879944,
-0.4765017628669739,
1.1255176067352295,
-1.125339150428772,
1.0514404773712158,
-0.2562789022922516,
-1.2307112216949463,
-1.2247788906097412,
1.0953108072280884,
0.4558682441711426,
-0.03576623648405075,
-0.48912397027015686,
1.266207218170166,
0.18692006170749664,
1.369118094444275,
0.5978361964225769,
-0.360039621591568,
0.6140457391738892,
-0.3950536847114563,
-0.4909333884716034,
1.6582093238830566,
0.2556600868701935,
-1.5225971937179565,
-2.3839504718780518,
-0.21564120054244995,
-1.0455588102340698,
-0.021583545953035355,
-0.5688108205795288,
-1.0257898569107056,
1.5980567932128906,
0.417563259601593,
-1.1262953281402588,
-0.2934650480747223,
-0.2444465607404709,
-0.5425764918327332,
2.670430898666382,
-1.2497745752334595,
-0.18994523584842682,
-0.9018815159797668,
-0.5705705285072327,
1.6278218030929565,
-1.203966498374939,
-0.1424666792154312,
-1.0203131437301636,
-0.5678299069404602,
-1.3161872625350952,
-0.4447714686393738,
0.06971176713705063,
-1.0238794088363647,
0.8285298347473145,
0.1292065680027008,
-1.1077265739440918,
-0.3296695351600647,
-0.8738739490509033,
0.9585228562355042,
0.03199141472578049,
0.2402404546737671,
1.8725073337554932,
0.36314594745635986,
-0.4349607825279236,
0.6971304416656494,
1.1890919208526611,
0.5852125883102417,
-0.6493138670921326,
0.12274870276451111,
-0.7071465253829956,
0.38456711173057556,
-1.3243275880813599,
0.21600158512592316,
-2.8684797286987305,
0.7663437724113464,
-0.19445335865020752,
-0.12296202033758163,
-0.11099017411470413,
-1.2903447151184082,
1.0787464380264282,
2.599339723587036,
-1.0949549674987793,
0.4872013330459595,
0.37899598479270935,
1.209892988204956,
-1.5693708658218384,
0.31803280115127563,
-0.4651187062263489,
2.091409206390381,
0.15543721616268158,
1.2157360315322876,
-0.46122413873672485,
-2.203939914703369,
0.68079674243927,
-1.234754204750061,
-1.067259430885315,
0.7174217104911804,
-0.7943164706230164,
0.1776372492313385,
-1.4849117994308472,
-0.12990032136440277,
-0.8785492777824402,
-1.2021152973175049,
0.7105792164802551,
0.08813241124153137,
0.45362672209739685,
-0.5636968612670898,
0.35802072286605835,
-2.1354622840881348,
-1.4397425651550293,
-0.23445197939872742,
-0.9515698552131653,
0.5086531639099121,
-0.42946481704711914,
0.6458932161331177,
-0.1261172890663147,
-0.0030494718812406063,
0.3012951910495758,
1.437186598777771,
3.4122538566589355,
0.09388988465070724,
0.18021681904792786,
-0.10474622994661331,
-1.0545328855514526,
1.4413970708847046,
0.8281938433647156,
-0.16801641881465912,
-0.59856116771698,
-1.1047964096069336,
1.2686960697174072,
2.032437324523926,
1.124728798866272,
0.18229235708713531,
-0.7804131507873535,
-0.6864540576934814,
-0.03914623707532883,
0.2014625370502472,
0.5082274675369263,
0.9213008880615234,
-0.09708631038665771,
0.026873739436268806,
1.4106075763702393,
1.232364535331726,
-0.3319056034088135,
0.4251106381416321,
-0.9278215169906616,
-0.43448522686958313,
0.4545171558856964,
0.1858086884021759,
0.07796991616487503,
0.4074297547340393,
-1.022128701210022,
-0.3625781834125519,
-0.33872324228286743,
-0.9225188493728638,
-0.7324065566062927,
-0.3768245279788971,
-0.43395403027534485,
1.5734977722167969,
0.0725843608379364,
-0.45103776454925537,
0.022188609465956688,
-0.6785217523574829,
-0.08501291275024414,
-1.0669933557510376,
0.1377572864294052,
-0.16275808215141296,
-0.09671835601329803,
-0.18123812973499298,
1.7000751495361328,
-0.9120420217514038,
-2.1289398670196533,
0.2281113862991333,
0.30691277980804443,
-0.33964353799819946,
0.2915182411670685,
1.6511555910110474,
0.5585392713546753,
1.421687126159668,
1.2962090969085693,
0.9936836361885071,
-0.5839256644248962,
-1.2240065336227417,
0.7549033164978027,
0.9730924367904663,
-1.409690260887146,
0.8711819052696228,
-0.09286569058895111,
-0.48191899061203003,
0.635728120803833,
1.2501707077026367,
0.3189680874347687,
-2.0125722885131836,
0.9021272659301758,
-0.8906856179237366,
0.7846575975418091,
0.6801154613494873,
0.7480754852294922,
0.2556033432483673,
0.8626270890235901,
-1.234057068824768,
-1.0982176065444946,
-0.7236384749412537,
-0.5997304916381836,
1.9883853197097778,
-0.14465941488742828,
0.5697672367095947,
-0.2323308289051056,
-1.1916966438293457,
-0.1024956926703453,
0.7223588824272156,
0.35299012064933777,
-0.46536317467689514,
0.8239566087722778,
-0.6702864170074463,
-0.9719467759132385,
-1.3435239791870117,
-0.37819814682006836,
-1.0930501222610474,
-0.8663796186447144,
1.0381354093551636,
0.8256191611289978,
0.43912503123283386,
1.9738295078277588,
0.5910483002662659,
0.319061279296875,
-2.649162769317627,
0.907706618309021,
0.27033311128616333,
-0.022620389237999916,
0.9100503325462341,
0.2401079535484314,
1.1031572818756104,
-0.0035070083104074,
0.5800133943557739,
-2.3427305221557617,
2.257167100906372,
-0.13910269737243652,
0.6747178435325623,
0.13975383341312408,
-0.15390272438526154,
1.1544525623321533,
0.625665009021759,
0.6128643751144409,
-1.0794739723205566,
0.6897406578063965,
-0.5419245958328247,
1.1970940828323364,
1.0148166418075562,
-0.8525367975234985,
0.07839014381170273,
1.3892394304275513,
0.5300509929656982,
-0.3943166136741638,
-0.949559211730957,
-0.8182658553123474,
0.9342665672302246,
1.7175116539001465,
-0.09086809307336807,
-0.03354839235544205,
0.8486941456794739,
0.6481671929359436,
-1.257729172706604,
0.0678468570113182,
-0.7740964293479919,
-0.6792613863945007,
1.6996148824691772,
2.0937435626983643,
-0.18296770751476288,
-0.20570482313632965,
-0.7428234219551086,
-1.3113113641738892,
0.8067578077316284,
-0.06911491602659225,
0.13236752152442932,
0.7583487629890442,
-0.6120249032974243,
1.1283482313156128,
0.6485534906387329,
1.0433145761489868,
0.145389586687088,
0.3077307641506195,
0.36537718772888184,
-0.3884398639202118,
-1.1010617017745972,
-0.252387136220932,
-1.1521695852279663,
-2.6556832790374756,
0.4287143647670746,
-0.3063468635082245,
-1.4604231119155884,
0.11649177968502045,
-0.9902240633964539,
0.9057703018188477,
-0.5613803267478943,
-1.1133462190628052,
-1.4309601783752441,
0.2966749668121338,
-0.13735556602478027,
0.9736587405204773,
-1.7286567687988281,
-0.11772021651268005,
1.2842259407043457,
0.8378524780273438,
-0.5252074599266052,
0.882308304309845,
0.24877779185771942,
0.9607273936271667,
0.7924262881278992,
-0.33980706334114075,
0.5734639167785645,
-0.05683310329914093,
-1.3099623918533325,
0.4045991599559784,
1.2175092697143555,
0.1661349982023239,
1.3614916801452637,
-0.5060462355613708,
0.11869408190250397,
0.3854042589664459,
-0.657951295375824,
-0.5384085178375244,
-0.36764058470726013,
0.7061423063278198,
-0.02785063348710537,
-1.107494592666626,
-0.1355273574590683,
-0.06985081732273102,
-0.26745736598968506,
0.14826078712940216,
-1.3824173212051392,
-0.22826896607875824,
-0.381377637386322,
-0.4860149919986725,
-1.3185120820999146,
-0.01430593803524971,
1.2470000982284546,
-0.8191314339637756,
-0.2488224357366562,
0.4693429172039032,
0.3032081127166748,
0.6230383515357971,
0.5259079933166504,
-0.7812758088111877,
-0.36344221234321594,
-0.32464608550071716,
-0.3190169334411621,
0.2603611946105957,
1.3132981061935425,
-0.10750416666269302,
-0.9980301260948181,
0.6444550156593323,
-0.36701661348342896,
0.12032103538513184,
2.0153756141662598,
0.04023740440607071,
-0.6610305309295654,
0.32976818084716797,
-0.6459835171699524,
1.7603572607040405,
1.6860309839248657,
1.2140774726867676,
-0.08383625745773315,
-0.8137367367744446,
0.5062177777290344,
-0.3127901554107666,
-0.37174251675605774,
0.8187406063079834,
0.3664363920688629,
-0.17010298371315002,
-1.4270033836364746,
0.568266749382019,
1.2701784372329712,
-0.7966088056564331,
-0.7615712285041809,
0.015401842072606087,
-0.9062132835388184,
1.2037969827651978,
0.6769316792488098,
0.42934465408325195,
0.18892453610897064,
1.6427853107452393,
0.7711060643196106,
-0.5199629068374634,
0.490724116563797,
0.5227240920066833,
-0.16844509541988373,
-2.123091459274292,
-1.067530632019043,
0.25784000754356384,
-0.4901978671550751,
-1.5900299549102783,
1.3644464015960693,
-1.1069711446762085,
-0.9594593644142151,
0.6094348430633545,
0.14020748436450958,
1.4040518999099731,
0.35506245493888855,
1.6917651891708374,
2.1038658618927,
0.9267942309379578,
0.3797423541545868,
1.2736634016036987,
-0.06850319355726242,
-0.5082241892814636,
1.869389295578003,
-0.3516281843185425,
0.48407337069511414,
1.0172868967056274,
-0.36642709374427795,
-1.06118905544281,
-0.8094623684883118,
-1.1477183103561401,
-0.6050634384155273,
1.1818901300430298,
0.07487240433692932,
-0.9982641935348511,
0.18285271525382996,
1.6153556108474731,
0.1330968141555786,
-0.2950306236743927,
0.6884601712226868,
0.4734390676021576,
-0.7389522194862366,
-0.05371452122926712,
-0.9309958815574646,
0.4728955626487732,
-0.10856088995933533,
-0.34434840083122253,
0.25200048089027405,
0.5164679884910583,
1.362650752067566,
-0.11023719608783722,
0.14322833716869354,
1.1320282220840454,
-1.4365555047988892,
1.5477397441864014,
-0.6295567750930786,
0.2689674198627472,
-2.468395471572876,
1.392930507659912,
-0.8589073419570923,
1.9001303911209106,
-2.5434272289276123,
0.47975754737854004,
-0.5583856105804443,
-0.45024386048316956,
0.2318216860294342,
-0.42351585626602173,
0.15589329600334167,
-0.14260168373584747,
-1.0264309644699097,
-0.01285061240196228,
-0.7016003131866455,
0.579619288444519,
1.1490604877471924,
1.4430691003799438,
-1.1705001592636108,
-0.2914317548274994,
-1.772293210029602,
-0.11714020371437073,
-0.7575480341911316,
0.3562330901622772,
-1.9301499128341675,
-0.14625966548919678,
-1.945172667503357,
-2.268742561340332,
-1.3849518299102783,
-0.9149281978607178,
1.0270203351974487,
0.1561853587627411,
-0.9100437760353088,
1.1266553401947021,
-0.36807361245155334,
-1.9195024967193604,
1.2069636583328247,
-2.2206497192382812
] |
https://github.com/huggingface/datasets/issues/5408
|
dataset map function could not be hash properly
|
Hi ! On macos I tried with
- py 3.9.11
- datasets 2.8.0
- transformers 4.25.1
- dill 0.3.4
and I was able to hash `prepare_dataset` correctly:
```python
from datasets.fingerprint import Hasher
Hasher.hash(prepare_dataset)
```
What version of transformers do you have ? Can you try to call `Hasher.hash` on the the tokenizer and the feature extractor to see which one can't be hashed ?
|
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
| 352 | 64 |
dataset map function could not be hash properly
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
Hi ! On macos I tried with
- py 3.9.11
- datasets 2.8.0
- transformers 4.25.1
- dill 0.3.4
and I was able to hash `prepare_dataset` correctly:
```python
from datasets.fingerprint import Hasher
Hasher.hash(prepare_dataset)
```
What version of transformers do you have ? Can you try to call `Hasher.hash` on the the tokenizer and the feature extractor to see which one can't be hashed ?
|
[
-1.2026370763778687,
-0.8830283284187317,
-0.6998029947280884,
1.4831172227859497,
-0.14322924613952637,
-1.1129162311553955,
0.19913989305496216,
-1.045048475265503,
1.5351014137268066,
-0.7666561603546143,
0.2680216133594513,
-1.6109470129013062,
-0.0031448248773813248,
-0.5277487635612488,
-0.6950122714042664,
-0.9364895820617676,
-0.3683948814868927,
-0.715582549571991,
1.055716872215271,
2.440584897994995,
1.2753865718841553,
-1.3020955324172974,
2.7078449726104736,
0.7022029161453247,
-0.16964004933834076,
-1.0083609819412231,
0.5909078121185303,
0.013715404085814953,
-1.2009327411651611,
-0.46693626046180725,
-0.962750256061554,
-0.0898817703127861,
-0.567157506942749,
-0.3776194751262665,
-0.02464594691991806,
0.43986237049102783,
-0.3418470621109009,
-0.39273902773857117,
-0.6565918922424316,
-0.8510727286338806,
0.4694221317768097,
-0.3449100852012634,
0.9627668857574463,
-0.3831539750099182,
1.8686306476593018,
-0.6220664978027344,
0.471784770488739,
0.7085838913917542,
1.2249512672424316,
0.2602260112762451,
0.12112206220626831,
0.2696574926376343,
0.3551846444606781,
-0.06304875761270523,
0.5982480645179749,
1.1838589906692505,
0.6330398321151733,
0.5352461338043213,
0.7494766712188721,
-2.1688241958618164,
1.2520956993103027,
-1.0071159601211548,
0.25866928696632385,
1.425158977508545,
-0.8315551280975342,
0.4003613293170929,
-1.8010740280151367,
-0.08586999773979187,
0.5782507658004761,
-2.282203197479248,
0.2758692502975464,
-1.3349735736846924,
-0.5932357907295227,
0.9396016001701355,
0.386645644903183,
-1.1903371810913086,
0.11330679804086685,
-0.4134127199649811,
1.028412103652954,
0.43868449330329895,
1.0738738775253296,
-1.6737070083618164,
-0.0594213604927063,
-0.26937544345855713,
0.12834571301937103,
-1.289341688156128,
-1.5908218622207642,
0.5260471105575562,
0.5345026850700378,
0.5713355541229248,
-0.11086123436689377,
1.0999168157577515,
-1.0865331888198853,
0.7912465333938599,
-1.0337096452713013,
-1.6355100870132446,
-1.4094876050949097,
-2.3679919242858887,
-2.287642240524292,
0.7971701622009277,
-0.47969892621040344,
-0.537964940071106,
1.9931467771530151,
-0.9929336309432983,
-1.6771175861358643,
1.1320828199386597,
0.256359726190567,
0.11961047351360321,
2.472543954849243,
0.18647915124893188,
-0.7688114643096924,
0.48700088262557983,
-0.7421680688858032,
0.8270842432975769,
-0.29194211959838867,
1.3591753244400024,
0.43333619832992554,
-1.046842336654663,
1.6161856651306152,
-0.3693169057369232,
0.6169040203094482,
-0.6110273599624634,
-0.5458142161369324,
-0.7198020815849304,
0.2246135026216507,
1.8873404264450073,
-0.2632600665092468,
1.583657145500183,
-0.24092546105384827,
-1.5266621112823486,
-1.6395624876022339,
0.8908188939094543,
0.37293970584869385,
-0.8020471930503845,
-0.017096029594540596,
-0.4512845575809479,
0.09724032133817673,
-0.07200699299573898,
1.204526424407959,
1.3298336267471313,
0.7097772359848022,
-0.4153272807598114,
-0.8044310212135315,
0.11551959812641144,
-0.12814584374427795,
-0.7350088357925415,
-1.743409514427185,
-0.3018335700035095,
0.21339386701583862,
0.6051154732704163,
-1.2275595664978027,
1.7598520517349243,
0.9520822167396545,
1.8710302114486694,
1.0145385265350342,
-0.3695569634437561,
1.4496432542800903,
0.050797417759895325,
1.7258094549179077,
-0.5478932857513428,
0.5934117436408997,
-0.2870579957962036,
-1.139813780784607,
0.8182335495948792,
-0.31992682814598083,
-1.985745906829834,
-0.8755773305892944,
-0.7733513712882996,
-0.1755298227071762,
-0.7868462204933167,
0.8980780243873596,
-0.3890487551689148,
-1.4049910306930542,
0.17431952059268951,
-0.6762725114822388,
0.12862597405910492,
-1.2190115451812744,
0.24756847321987152,
0.6873130798339844,
-0.6769454479217529,
0.042362459003925323,
-0.16377326846122742,
-1.2741895914077759,
-0.43372642993927,
0.33437421917915344,
1.9271409511566162,
-0.583101212978363,
0.8385978937149048,
1.084816336631775,
-0.7431278228759766,
0.04867556691169739,
0.2812267541885376,
-0.2874876856803894,
0.7609955668449402,
-0.990306556224823,
-0.5113853216171265,
1.1819372177124023,
-0.2233324646949768,
-0.6878607869148254,
1.4630306959152222,
0.7545501589775085,
-1.023931622505188,
-0.22499369084835052,
-0.12698103487491608,
-0.8384862542152405,
0.02289658412337303,
-1.5055572986602783,
-0.1471962034702301,
0.36640307307243347,
-1.5516287088394165,
-0.45266929268836975,
-0.2030678391456604,
1.2815324068069458,
-0.27949389815330505,
1.44120454788208,
-0.363447904586792,
-0.2030179798603058,
-0.2703944146633148,
-0.5316934585571289,
0.13323897123336792,
-0.21192999184131622,
-0.6512494087219238,
0.19885645806789398,
-0.8737350702285767,
0.35094574093818665,
1.4884090423583984,
0.3373657763004303,
-0.04024207592010498,
0.4604737162590027,
1.1089938879013062,
0.415176659822464,
-0.08178428560495377,
-0.8796120882034302,
-1.523680329322815,
1.952681064605713,
-1.405258297920227,
1.9703569412231445,
0.77249675989151,
-0.1150338351726532,
-1.8388292789459229,
-1.8632190227508545,
1.2288072109222412,
1.1646071672439575,
2.347602367401123,
0.4600149095058441,
0.31729328632354736,
-0.7882587313652039,
-0.7265138030052185,
0.32390016317367554,
-1.0048948526382446,
-0.6624384522438049,
0.18880927562713623,
2.3311638832092285,
1.805472731590271,
-0.4315483570098877,
-0.20069123804569244,
-0.9901630282402039,
1.3530691862106323,
-0.2296290248632431,
0.2464902549982071,
2.0202600955963135,
-0.3114212155342102,
-1.034053921699524,
1.3730089664459229,
-2.3489742279052734,
0.1895851492881775,
2.025237798690796,
0.35367321968078613,
0.06396342068910599,
-1.361405611038208,
-0.6765832304954529,
-0.4533347189426422,
-0.40645840764045715,
-1.2871464490890503,
0.5134732723236084,
-0.23211541771888733,
-0.845660388469696,
-1.3861057758331299,
0.11829803884029388,
-1.1898138523101807,
-1.6095212697982788,
0.3933885991573334,
1.8987394571304321,
2.08866024017334,
-0.7028914093971252,
1.476501226425171,
-0.3161812424659729,
0.04576347768306732,
1.2105474472045898,
1.2969770431518555,
3.1555964946746826,
1.849429726600647,
-1.244632601737976,
0.6240172386169434,
-0.2104545384645462,
-0.44416800141334534,
1.1676105260849,
-1.2082164287567139,
1.2725178003311157,
-0.1515868455171585,
-1.170307993888855,
-1.2621551752090454,
0.9786442518234253,
0.419452041387558,
0.08845260739326477,
-0.508050799369812,
1.23507821559906,
0.12855982780456543,
1.3678921461105347,
0.6529026627540588,
-0.38729745149612427,
0.568801760673523,
-0.3952663838863373,
-0.5578578114509583,
1.558307409286499,
0.14703093469142914,
-1.5604997873306274,
-2.2147064208984375,
-0.2428169995546341,
-0.8820039629936218,
-0.011390025727450848,
-0.5424337387084961,
-1.115777611732483,
1.7176426649093628,
0.32687854766845703,
-1.2386163473129272,
-0.3140622079372406,
-0.3616883456707001,
-0.5400508642196655,
2.7686915397644043,
-1.3122498989105225,
-0.1886042207479477,
-1.0285696983337402,
-0.676933765411377,
1.6804728507995605,
-1.2039365768432617,
-0.19388103485107422,
-1.0631427764892578,
-0.5581534504890442,
-1.3151631355285645,
-0.44799354672431946,
0.08958903700113297,
-1.0428498983383179,
0.8591867089271545,
0.18710961937904358,
-1.0852254629135132,
-0.34199848771095276,
-0.9193013906478882,
0.9388867020606995,
-0.17621570825576782,
0.15614981949329376,
1.8654870986938477,
0.31269609928131104,
-0.3468128442764282,
0.8023906946182251,
1.2438677549362183,
0.6478813886642456,
-0.6776595711708069,
0.03952895477414131,
-0.6929417848587036,
0.35586726665496826,
-1.302509069442749,
0.1946457475423813,
-2.8357622623443604,
0.6309075355529785,
-0.1737395077943802,
-0.10604915767908096,
0.017293166369199753,
-1.3189626932144165,
1.1527442932128906,
2.5458407402038574,
-1.2013064622879028,
0.46642306447029114,
0.38078543543815613,
1.1343358755111694,
-1.6097396612167358,
0.3430386781692505,
-0.5315040946006775,
2.0310370922088623,
0.21109342575073242,
1.182138204574585,
-0.5115672945976257,
-2.248326539993286,
0.6788004636764526,
-1.2054181098937988,
-1.1680821180343628,
0.8110998272895813,
-0.9035381078720093,
0.25394919514656067,
-1.4760403633117676,
-0.26171696186065674,
-0.8736534714698792,
-1.2209821939468384,
0.6220464110374451,
0.16793566942214966,
0.4014919400215149,
-0.49330076575279236,
0.33845779299736023,
-2.2724313735961914,
-1.4348156452178955,
-0.23435841500759125,
-0.9669238924980164,
0.5710003972053528,
-0.4908677041530609,
0.6538671255111694,
-0.1557375192642212,
0.02559610828757286,
0.3200889825820923,
1.5223214626312256,
3.4276695251464844,
0.21707358956336975,
0.25074073672294617,
-0.14493194222450256,
-1.005272626876831,
1.5028268098831177,
0.8972482681274414,
0.0032518627122044563,
-0.5458605885505676,
-0.9952197074890137,
1.2527875900268555,
1.941294550895691,
1.0653860569000244,
-0.05549469217658043,
-0.8520126938819885,
-0.6885107755661011,
-0.035767920315265656,
0.24671776592731476,
0.4260139465332031,
0.9726853370666504,
-0.004139267839491367,
0.05754910409450531,
1.4543358087539673,
1.2269529104232788,
-0.29474806785583496,
0.24754075706005096,
-0.8657528162002563,
-0.4719310998916626,
0.5099628567695618,
0.22312325239181519,
-0.010294529609382153,
0.5112225413322449,
-1.0626190900802612,
-0.2714587450027466,
-0.41246935725212097,
-0.9068095684051514,
-0.6712411642074585,
-0.4378774166107178,
-0.3411955237388611,
1.5764169692993164,
0.15236620604991913,
-0.5249543190002441,
0.03033086284995079,
-0.7414841651916504,
-0.18710331618785858,
-1.1265143156051636,
0.2020566761493683,
-0.05648662894964218,
-0.18005502223968506,
-0.17857059836387634,
1.719434380531311,
-0.972296953201294,
-2.0830516815185547,
0.1679987609386444,
0.328209787607193,
-0.2180769294500351,
0.15246547758579254,
1.6845723390579224,
0.4540746212005615,
1.4442342519760132,
1.2378720045089722,
0.9125616550445557,
-0.5834745168685913,
-1.2747247219085693,
0.6751657724380493,
0.99966961145401,
-1.2679497003555298,
0.8955745697021484,
-0.1350100189447403,
-0.5293165445327759,
0.6300632953643799,
1.205897331237793,
0.46817049384117126,
-1.835978627204895,
0.8419193029403687,
-1.0409667491912842,
0.7734155058860779,
0.7210898995399475,
0.7209699749946594,
0.21031807363033295,
0.8888581991195679,
-1.1568549871444702,
-1.1343491077423096,
-0.6685622334480286,
-0.6476458311080933,
1.9198306798934937,
-0.2842491567134857,
0.6267001628875732,
-0.23037219047546387,
-1.1984602212905884,
-0.026973433792591095,
0.8063957691192627,
0.4101625978946686,
-0.4861392080783844,
0.8184989094734192,
-0.689469039440155,
-0.9346960783004761,
-1.384951114654541,
-0.3422141969203949,
-1.0359647274017334,
-0.9908219575881958,
1.0621984004974365,
0.7293156385421753,
0.304953932762146,
1.8918336629867554,
0.7065380215644836,
0.41592949628829956,
-2.6125900745391846,
0.8964813947677612,
0.2779482305049896,
-0.05697176232933998,
0.9306502342224121,
0.3222956955432892,
1.0315477848052979,
-0.004820412956178188,
0.5165688991546631,
-2.3715059757232666,
2.2641501426696777,
-0.23814508318901062,
0.7609344124794006,
-0.01705743931233883,
-0.12723340094089508,
1.1459722518920898,
0.6335182189941406,
0.4774940013885498,
-1.0847994089126587,
0.7082322835922241,
-0.5076550841331482,
1.1626837253570557,
0.9462904334068298,
-0.7860520482063293,
0.057478852570056915,
1.439801573753357,
0.4965099096298218,
-0.5234509706497192,
-0.918228268623352,
-0.8268672823905945,
0.9595829844474792,
1.6753851175308228,
0.0020731277763843536,
-0.01316257193684578,
0.838932991027832,
0.557650089263916,
-1.2931592464447021,
0.03271310776472092,
-0.6750237941741943,
-0.6658450365066528,
1.7098320722579956,
2.0326297283172607,
-0.14863567054271698,
-0.1975060999393463,
-0.7016374468803406,
-1.299906849861145,
0.7428759336471558,
-0.11206153780221939,
0.21413646638393402,
0.6273965835571289,
-0.6549508571624756,
1.0392405986785889,
0.7891481518745422,
0.9619364142417908,
0.1924257129430771,
0.33373260498046875,
0.543073296546936,
-0.3413842022418976,
-1.1900174617767334,
-0.3096924126148224,
-1.0928783416748047,
-2.6491992473602295,
0.4212688207626343,
-0.33876705169677734,
-1.4405750036239624,
0.034081678837537766,
-1.009289026260376,
0.9957665801048279,
-0.6358391046524048,
-1.0363733768463135,
-1.5744154453277588,
0.2644015848636627,
-0.038022372871637344,
0.9456862211227417,
-1.6083307266235352,
-0.2913336753845215,
1.2069443464279175,
0.8568795323371887,
-0.6462509036064148,
0.9353911280632019,
0.23904840648174286,
1.0717800855636597,
0.7171627879142761,
-0.4616827070713043,
0.5596297979354858,
-0.024467842653393745,
-1.4281041622161865,
0.3838310241699219,
1.2497910261154175,
0.19582459330558777,
1.4466331005096436,
-0.46511635184288025,
0.01322156097739935,
0.40787920355796814,
-0.6322968602180481,
-0.5133117437362671,
-0.4222204089164734,
0.6038841605186462,
0.03746793046593666,
-0.9482111930847168,
-0.11837279796600342,
-0.11639972776174545,
-0.32992053031921387,
0.14264455437660217,
-1.4363008737564087,
-0.17949597537517548,
-0.5121398568153381,
-0.6098320484161377,
-1.3052386045455933,
-0.0352095365524292,
1.4217439889907837,
-0.7990102767944336,
-0.2067631632089615,
0.39089348912239075,
0.37346184253692627,
0.5236716270446777,
0.622786819934845,
-0.797354519367218,
-0.2057986706495285,
-0.27809950709342957,
-0.2757846713066101,
0.31624412536621094,
1.3411264419555664,
-0.1256895661354065,
-1.0007379055023193,
0.6934639811515808,
-0.3532845377922058,
0.12319856882095337,
2.027204751968384,
0.1006748154759407,
-0.7238255143165588,
0.2967684864997864,
-0.7596732974052429,
1.836259126663208,
1.6870396137237549,
1.3792821168899536,
-0.13108842074871063,
-0.7929084300994873,
0.6362018585205078,
-0.3337281346321106,
-0.3711619973182678,
0.8000099062919617,
0.36627280712127686,
-0.2512727975845337,
-1.4783071279525757,
0.7319771647453308,
1.234973669052124,
-0.8854541778564453,
-0.7410246729850769,
0.1615391969680786,
-0.8878280520439148,
1.1736472845077515,
0.5358983278274536,
0.3972662687301636,
0.3388010263442993,
1.6389001607894897,
0.7277585864067078,
-0.474628746509552,
0.49240612983703613,
0.632175862789154,
-0.1838463991880417,
-2.076608896255493,
-1.1217461824417114,
0.3439599573612213,
-0.5867186784744263,
-1.5164514780044556,
1.4347251653671265,
-1.0948691368103027,
-1.0603595972061157,
0.5235268473625183,
0.1351240873336792,
1.3725943565368652,
0.40935754776000977,
1.605623483657837,
2.0985841751098633,
0.8336052894592285,
0.442461758852005,
1.2235747575759888,
-0.1209583505988121,
-0.460360586643219,
1.843519926071167,
-0.40158364176750183,
0.5447582602500916,
1.0588561296463013,
-0.28481730818748474,
-1.0755419731140137,
-0.7000148892402649,
-1.2144638299942017,
-0.638430655002594,
1.227277159690857,
0.07413288205862045,
-1.0146470069885254,
0.2379782348871231,
1.5743852853775024,
0.16429965198040009,
-0.34082043170928955,
0.6196929812431335,
0.42285946011543274,
-0.8074743151664734,
-0.06930313259363174,
-0.9538673162460327,
0.5933205485343933,
-0.2003195583820343,
-0.3198081851005554,
0.21027013659477234,
0.46323397755622864,
1.3889460563659668,
-0.14500297605991364,
0.16381971538066864,
1.1124589443206787,
-1.4393380880355835,
1.542915940284729,
-0.6824698448181152,
0.24713633954524994,
-2.3989181518554688,
1.3731995820999146,
-0.7704636454582214,
1.9376776218414307,
-2.595736503601074,
0.4993763566017151,
-0.539889931678772,
-0.4956039786338806,
0.30171898007392883,
-0.43248313665390015,
0.11132185161113739,
-0.0862673968076706,
-1.0617574453353882,
0.026877842843532562,
-0.701663076877594,
0.6460000276565552,
1.1655538082122803,
1.4339628219604492,
-1.1704609394073486,
-0.3026725947856903,
-1.720141053199768,
-0.1527528613805771,
-0.8506946563720703,
0.27239540219306946,
-1.9642773866653442,
-0.16799739003181458,
-1.8777679204940796,
-2.4212021827697754,
-1.273983359336853,
-0.8199272751808167,
1.176456332206726,
0.17816156148910522,
-0.9397957921028137,
1.2949299812316895,
-0.3924340009689331,
-1.9397672414779663,
1.2041563987731934,
-2.1422109603881836
] |
https://github.com/huggingface/datasets/issues/5408
|
dataset map function could not be hash properly
|
Thanks for your prompt reply.
I update datasets version to 2.8.0 and the warning is gong.
|
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
| 352 | 16 |
dataset map function could not be hash properly
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
Thanks for your prompt reply.
I update datasets version to 2.8.0 and the warning is gong.
|
[
-1.2026370763778687,
-0.8830283284187317,
-0.6998029947280884,
1.4831172227859497,
-0.14322924613952637,
-1.1129162311553955,
0.19913989305496216,
-1.045048475265503,
1.5351014137268066,
-0.7666561603546143,
0.2680216133594513,
-1.6109470129013062,
-0.0031448248773813248,
-0.5277487635612488,
-0.6950122714042664,
-0.9364895820617676,
-0.3683948814868927,
-0.715582549571991,
1.055716872215271,
2.440584897994995,
1.2753865718841553,
-1.3020955324172974,
2.7078449726104736,
0.7022029161453247,
-0.16964004933834076,
-1.0083609819412231,
0.5909078121185303,
0.013715404085814953,
-1.2009327411651611,
-0.46693626046180725,
-0.962750256061554,
-0.0898817703127861,
-0.567157506942749,
-0.3776194751262665,
-0.02464594691991806,
0.43986237049102783,
-0.3418470621109009,
-0.39273902773857117,
-0.6565918922424316,
-0.8510727286338806,
0.4694221317768097,
-0.3449100852012634,
0.9627668857574463,
-0.3831539750099182,
1.8686306476593018,
-0.6220664978027344,
0.471784770488739,
0.7085838913917542,
1.2249512672424316,
0.2602260112762451,
0.12112206220626831,
0.2696574926376343,
0.3551846444606781,
-0.06304875761270523,
0.5982480645179749,
1.1838589906692505,
0.6330398321151733,
0.5352461338043213,
0.7494766712188721,
-2.1688241958618164,
1.2520956993103027,
-1.0071159601211548,
0.25866928696632385,
1.425158977508545,
-0.8315551280975342,
0.4003613293170929,
-1.8010740280151367,
-0.08586999773979187,
0.5782507658004761,
-2.282203197479248,
0.2758692502975464,
-1.3349735736846924,
-0.5932357907295227,
0.9396016001701355,
0.386645644903183,
-1.1903371810913086,
0.11330679804086685,
-0.4134127199649811,
1.028412103652954,
0.43868449330329895,
1.0738738775253296,
-1.6737070083618164,
-0.0594213604927063,
-0.26937544345855713,
0.12834571301937103,
-1.289341688156128,
-1.5908218622207642,
0.5260471105575562,
0.5345026850700378,
0.5713355541229248,
-0.11086123436689377,
1.0999168157577515,
-1.0865331888198853,
0.7912465333938599,
-1.0337096452713013,
-1.6355100870132446,
-1.4094876050949097,
-2.3679919242858887,
-2.287642240524292,
0.7971701622009277,
-0.47969892621040344,
-0.537964940071106,
1.9931467771530151,
-0.9929336309432983,
-1.6771175861358643,
1.1320828199386597,
0.256359726190567,
0.11961047351360321,
2.472543954849243,
0.18647915124893188,
-0.7688114643096924,
0.48700088262557983,
-0.7421680688858032,
0.8270842432975769,
-0.29194211959838867,
1.3591753244400024,
0.43333619832992554,
-1.046842336654663,
1.6161856651306152,
-0.3693169057369232,
0.6169040203094482,
-0.6110273599624634,
-0.5458142161369324,
-0.7198020815849304,
0.2246135026216507,
1.8873404264450073,
-0.2632600665092468,
1.583657145500183,
-0.24092546105384827,
-1.5266621112823486,
-1.6395624876022339,
0.8908188939094543,
0.37293970584869385,
-0.8020471930503845,
-0.017096029594540596,
-0.4512845575809479,
0.09724032133817673,
-0.07200699299573898,
1.204526424407959,
1.3298336267471313,
0.7097772359848022,
-0.4153272807598114,
-0.8044310212135315,
0.11551959812641144,
-0.12814584374427795,
-0.7350088357925415,
-1.743409514427185,
-0.3018335700035095,
0.21339386701583862,
0.6051154732704163,
-1.2275595664978027,
1.7598520517349243,
0.9520822167396545,
1.8710302114486694,
1.0145385265350342,
-0.3695569634437561,
1.4496432542800903,
0.050797417759895325,
1.7258094549179077,
-0.5478932857513428,
0.5934117436408997,
-0.2870579957962036,
-1.139813780784607,
0.8182335495948792,
-0.31992682814598083,
-1.985745906829834,
-0.8755773305892944,
-0.7733513712882996,
-0.1755298227071762,
-0.7868462204933167,
0.8980780243873596,
-0.3890487551689148,
-1.4049910306930542,
0.17431952059268951,
-0.6762725114822388,
0.12862597405910492,
-1.2190115451812744,
0.24756847321987152,
0.6873130798339844,
-0.6769454479217529,
0.042362459003925323,
-0.16377326846122742,
-1.2741895914077759,
-0.43372642993927,
0.33437421917915344,
1.9271409511566162,
-0.583101212978363,
0.8385978937149048,
1.084816336631775,
-0.7431278228759766,
0.04867556691169739,
0.2812267541885376,
-0.2874876856803894,
0.7609955668449402,
-0.990306556224823,
-0.5113853216171265,
1.1819372177124023,
-0.2233324646949768,
-0.6878607869148254,
1.4630306959152222,
0.7545501589775085,
-1.023931622505188,
-0.22499369084835052,
-0.12698103487491608,
-0.8384862542152405,
0.02289658412337303,
-1.5055572986602783,
-0.1471962034702301,
0.36640307307243347,
-1.5516287088394165,
-0.45266929268836975,
-0.2030678391456604,
1.2815324068069458,
-0.27949389815330505,
1.44120454788208,
-0.363447904586792,
-0.2030179798603058,
-0.2703944146633148,
-0.5316934585571289,
0.13323897123336792,
-0.21192999184131622,
-0.6512494087219238,
0.19885645806789398,
-0.8737350702285767,
0.35094574093818665,
1.4884090423583984,
0.3373657763004303,
-0.04024207592010498,
0.4604737162590027,
1.1089938879013062,
0.415176659822464,
-0.08178428560495377,
-0.8796120882034302,
-1.523680329322815,
1.952681064605713,
-1.405258297920227,
1.9703569412231445,
0.77249675989151,
-0.1150338351726532,
-1.8388292789459229,
-1.8632190227508545,
1.2288072109222412,
1.1646071672439575,
2.347602367401123,
0.4600149095058441,
0.31729328632354736,
-0.7882587313652039,
-0.7265138030052185,
0.32390016317367554,
-1.0048948526382446,
-0.6624384522438049,
0.18880927562713623,
2.3311638832092285,
1.805472731590271,
-0.4315483570098877,
-0.20069123804569244,
-0.9901630282402039,
1.3530691862106323,
-0.2296290248632431,
0.2464902549982071,
2.0202600955963135,
-0.3114212155342102,
-1.034053921699524,
1.3730089664459229,
-2.3489742279052734,
0.1895851492881775,
2.025237798690796,
0.35367321968078613,
0.06396342068910599,
-1.361405611038208,
-0.6765832304954529,
-0.4533347189426422,
-0.40645840764045715,
-1.2871464490890503,
0.5134732723236084,
-0.23211541771888733,
-0.845660388469696,
-1.3861057758331299,
0.11829803884029388,
-1.1898138523101807,
-1.6095212697982788,
0.3933885991573334,
1.8987394571304321,
2.08866024017334,
-0.7028914093971252,
1.476501226425171,
-0.3161812424659729,
0.04576347768306732,
1.2105474472045898,
1.2969770431518555,
3.1555964946746826,
1.849429726600647,
-1.244632601737976,
0.6240172386169434,
-0.2104545384645462,
-0.44416800141334534,
1.1676105260849,
-1.2082164287567139,
1.2725178003311157,
-0.1515868455171585,
-1.170307993888855,
-1.2621551752090454,
0.9786442518234253,
0.419452041387558,
0.08845260739326477,
-0.508050799369812,
1.23507821559906,
0.12855982780456543,
1.3678921461105347,
0.6529026627540588,
-0.38729745149612427,
0.568801760673523,
-0.3952663838863373,
-0.5578578114509583,
1.558307409286499,
0.14703093469142914,
-1.5604997873306274,
-2.2147064208984375,
-0.2428169995546341,
-0.8820039629936218,
-0.011390025727450848,
-0.5424337387084961,
-1.115777611732483,
1.7176426649093628,
0.32687854766845703,
-1.2386163473129272,
-0.3140622079372406,
-0.3616883456707001,
-0.5400508642196655,
2.7686915397644043,
-1.3122498989105225,
-0.1886042207479477,
-1.0285696983337402,
-0.676933765411377,
1.6804728507995605,
-1.2039365768432617,
-0.19388103485107422,
-1.0631427764892578,
-0.5581534504890442,
-1.3151631355285645,
-0.44799354672431946,
0.08958903700113297,
-1.0428498983383179,
0.8591867089271545,
0.18710961937904358,
-1.0852254629135132,
-0.34199848771095276,
-0.9193013906478882,
0.9388867020606995,
-0.17621570825576782,
0.15614981949329376,
1.8654870986938477,
0.31269609928131104,
-0.3468128442764282,
0.8023906946182251,
1.2438677549362183,
0.6478813886642456,
-0.6776595711708069,
0.03952895477414131,
-0.6929417848587036,
0.35586726665496826,
-1.302509069442749,
0.1946457475423813,
-2.8357622623443604,
0.6309075355529785,
-0.1737395077943802,
-0.10604915767908096,
0.017293166369199753,
-1.3189626932144165,
1.1527442932128906,
2.5458407402038574,
-1.2013064622879028,
0.46642306447029114,
0.38078543543815613,
1.1343358755111694,
-1.6097396612167358,
0.3430386781692505,
-0.5315040946006775,
2.0310370922088623,
0.21109342575073242,
1.182138204574585,
-0.5115672945976257,
-2.248326539993286,
0.6788004636764526,
-1.2054181098937988,
-1.1680821180343628,
0.8110998272895813,
-0.9035381078720093,
0.25394919514656067,
-1.4760403633117676,
-0.26171696186065674,
-0.8736534714698792,
-1.2209821939468384,
0.6220464110374451,
0.16793566942214966,
0.4014919400215149,
-0.49330076575279236,
0.33845779299736023,
-2.2724313735961914,
-1.4348156452178955,
-0.23435841500759125,
-0.9669238924980164,
0.5710003972053528,
-0.4908677041530609,
0.6538671255111694,
-0.1557375192642212,
0.02559610828757286,
0.3200889825820923,
1.5223214626312256,
3.4276695251464844,
0.21707358956336975,
0.25074073672294617,
-0.14493194222450256,
-1.005272626876831,
1.5028268098831177,
0.8972482681274414,
0.0032518627122044563,
-0.5458605885505676,
-0.9952197074890137,
1.2527875900268555,
1.941294550895691,
1.0653860569000244,
-0.05549469217658043,
-0.8520126938819885,
-0.6885107755661011,
-0.035767920315265656,
0.24671776592731476,
0.4260139465332031,
0.9726853370666504,
-0.004139267839491367,
0.05754910409450531,
1.4543358087539673,
1.2269529104232788,
-0.29474806785583496,
0.24754075706005096,
-0.8657528162002563,
-0.4719310998916626,
0.5099628567695618,
0.22312325239181519,
-0.010294529609382153,
0.5112225413322449,
-1.0626190900802612,
-0.2714587450027466,
-0.41246935725212097,
-0.9068095684051514,
-0.6712411642074585,
-0.4378774166107178,
-0.3411955237388611,
1.5764169692993164,
0.15236620604991913,
-0.5249543190002441,
0.03033086284995079,
-0.7414841651916504,
-0.18710331618785858,
-1.1265143156051636,
0.2020566761493683,
-0.05648662894964218,
-0.18005502223968506,
-0.17857059836387634,
1.719434380531311,
-0.972296953201294,
-2.0830516815185547,
0.1679987609386444,
0.328209787607193,
-0.2180769294500351,
0.15246547758579254,
1.6845723390579224,
0.4540746212005615,
1.4442342519760132,
1.2378720045089722,
0.9125616550445557,
-0.5834745168685913,
-1.2747247219085693,
0.6751657724380493,
0.99966961145401,
-1.2679497003555298,
0.8955745697021484,
-0.1350100189447403,
-0.5293165445327759,
0.6300632953643799,
1.205897331237793,
0.46817049384117126,
-1.835978627204895,
0.8419193029403687,
-1.0409667491912842,
0.7734155058860779,
0.7210898995399475,
0.7209699749946594,
0.21031807363033295,
0.8888581991195679,
-1.1568549871444702,
-1.1343491077423096,
-0.6685622334480286,
-0.6476458311080933,
1.9198306798934937,
-0.2842491567134857,
0.6267001628875732,
-0.23037219047546387,
-1.1984602212905884,
-0.026973433792591095,
0.8063957691192627,
0.4101625978946686,
-0.4861392080783844,
0.8184989094734192,
-0.689469039440155,
-0.9346960783004761,
-1.384951114654541,
-0.3422141969203949,
-1.0359647274017334,
-0.9908219575881958,
1.0621984004974365,
0.7293156385421753,
0.304953932762146,
1.8918336629867554,
0.7065380215644836,
0.41592949628829956,
-2.6125900745391846,
0.8964813947677612,
0.2779482305049896,
-0.05697176232933998,
0.9306502342224121,
0.3222956955432892,
1.0315477848052979,
-0.004820412956178188,
0.5165688991546631,
-2.3715059757232666,
2.2641501426696777,
-0.23814508318901062,
0.7609344124794006,
-0.01705743931233883,
-0.12723340094089508,
1.1459722518920898,
0.6335182189941406,
0.4774940013885498,
-1.0847994089126587,
0.7082322835922241,
-0.5076550841331482,
1.1626837253570557,
0.9462904334068298,
-0.7860520482063293,
0.057478852570056915,
1.439801573753357,
0.4965099096298218,
-0.5234509706497192,
-0.918228268623352,
-0.8268672823905945,
0.9595829844474792,
1.6753851175308228,
0.0020731277763843536,
-0.01316257193684578,
0.838932991027832,
0.557650089263916,
-1.2931592464447021,
0.03271310776472092,
-0.6750237941741943,
-0.6658450365066528,
1.7098320722579956,
2.0326297283172607,
-0.14863567054271698,
-0.1975060999393463,
-0.7016374468803406,
-1.299906849861145,
0.7428759336471558,
-0.11206153780221939,
0.21413646638393402,
0.6273965835571289,
-0.6549508571624756,
1.0392405986785889,
0.7891481518745422,
0.9619364142417908,
0.1924257129430771,
0.33373260498046875,
0.543073296546936,
-0.3413842022418976,
-1.1900174617767334,
-0.3096924126148224,
-1.0928783416748047,
-2.6491992473602295,
0.4212688207626343,
-0.33876705169677734,
-1.4405750036239624,
0.034081678837537766,
-1.009289026260376,
0.9957665801048279,
-0.6358391046524048,
-1.0363733768463135,
-1.5744154453277588,
0.2644015848636627,
-0.038022372871637344,
0.9456862211227417,
-1.6083307266235352,
-0.2913336753845215,
1.2069443464279175,
0.8568795323371887,
-0.6462509036064148,
0.9353911280632019,
0.23904840648174286,
1.0717800855636597,
0.7171627879142761,
-0.4616827070713043,
0.5596297979354858,
-0.024467842653393745,
-1.4281041622161865,
0.3838310241699219,
1.2497910261154175,
0.19582459330558777,
1.4466331005096436,
-0.46511635184288025,
0.01322156097739935,
0.40787920355796814,
-0.6322968602180481,
-0.5133117437362671,
-0.4222204089164734,
0.6038841605186462,
0.03746793046593666,
-0.9482111930847168,
-0.11837279796600342,
-0.11639972776174545,
-0.32992053031921387,
0.14264455437660217,
-1.4363008737564087,
-0.17949597537517548,
-0.5121398568153381,
-0.6098320484161377,
-1.3052386045455933,
-0.0352095365524292,
1.4217439889907837,
-0.7990102767944336,
-0.2067631632089615,
0.39089348912239075,
0.37346184253692627,
0.5236716270446777,
0.622786819934845,
-0.797354519367218,
-0.2057986706495285,
-0.27809950709342957,
-0.2757846713066101,
0.31624412536621094,
1.3411264419555664,
-0.1256895661354065,
-1.0007379055023193,
0.6934639811515808,
-0.3532845377922058,
0.12319856882095337,
2.027204751968384,
0.1006748154759407,
-0.7238255143165588,
0.2967684864997864,
-0.7596732974052429,
1.836259126663208,
1.6870396137237549,
1.3792821168899536,
-0.13108842074871063,
-0.7929084300994873,
0.6362018585205078,
-0.3337281346321106,
-0.3711619973182678,
0.8000099062919617,
0.36627280712127686,
-0.2512727975845337,
-1.4783071279525757,
0.7319771647453308,
1.234973669052124,
-0.8854541778564453,
-0.7410246729850769,
0.1615391969680786,
-0.8878280520439148,
1.1736472845077515,
0.5358983278274536,
0.3972662687301636,
0.3388010263442993,
1.6389001607894897,
0.7277585864067078,
-0.474628746509552,
0.49240612983703613,
0.632175862789154,
-0.1838463991880417,
-2.076608896255493,
-1.1217461824417114,
0.3439599573612213,
-0.5867186784744263,
-1.5164514780044556,
1.4347251653671265,
-1.0948691368103027,
-1.0603595972061157,
0.5235268473625183,
0.1351240873336792,
1.3725943565368652,
0.40935754776000977,
1.605623483657837,
2.0985841751098633,
0.8336052894592285,
0.442461758852005,
1.2235747575759888,
-0.1209583505988121,
-0.460360586643219,
1.843519926071167,
-0.40158364176750183,
0.5447582602500916,
1.0588561296463013,
-0.28481730818748474,
-1.0755419731140137,
-0.7000148892402649,
-1.2144638299942017,
-0.638430655002594,
1.227277159690857,
0.07413288205862045,
-1.0146470069885254,
0.2379782348871231,
1.5743852853775024,
0.16429965198040009,
-0.34082043170928955,
0.6196929812431335,
0.42285946011543274,
-0.8074743151664734,
-0.06930313259363174,
-0.9538673162460327,
0.5933205485343933,
-0.2003195583820343,
-0.3198081851005554,
0.21027013659477234,
0.46323397755622864,
1.3889460563659668,
-0.14500297605991364,
0.16381971538066864,
1.1124589443206787,
-1.4393380880355835,
1.542915940284729,
-0.6824698448181152,
0.24713633954524994,
-2.3989181518554688,
1.3731995820999146,
-0.7704636454582214,
1.9376776218414307,
-2.595736503601074,
0.4993763566017151,
-0.539889931678772,
-0.4956039786338806,
0.30171898007392883,
-0.43248313665390015,
0.11132185161113739,
-0.0862673968076706,
-1.0617574453353882,
0.026877842843532562,
-0.701663076877594,
0.6460000276565552,
1.1655538082122803,
1.4339628219604492,
-1.1704609394073486,
-0.3026725947856903,
-1.720141053199768,
-0.1527528613805771,
-0.8506946563720703,
0.27239540219306946,
-1.9642773866653442,
-0.16799739003181458,
-1.8777679204940796,
-2.4212021827697754,
-1.273983359336853,
-0.8199272751808167,
1.176456332206726,
0.17816156148910522,
-0.9397957921028137,
1.2949299812316895,
-0.3924340009689331,
-1.9397672414779663,
1.2041563987731934,
-2.1422109603881836
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`.
Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything)
Anyway you can try uninstalling `datasets` and install it again
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 76 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`.
Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything)
Anyway you can try uninstalling `datasets` and install it again
|
[
-1.19907546043396,
-0.9080106019973755,
-0.7455325722694397,
1.4518007040023804,
-0.1747923493385315,
-1.2968993186950684,
0.09794913232326508,
-1.1907931566238403,
1.7332526445388794,
-0.7653722167015076,
0.3084734082221985,
-1.6923916339874268,
0.04660734534263611,
-0.5048437714576721,
-0.863045334815979,
-0.9170548915863037,
-0.4209021329879761,
-0.8127956986427307,
0.9820972084999084,
2.5212671756744385,
1.1800814867019653,
-1.340885877609253,
2.692255973815918,
0.702019214630127,
-0.13041050732135773,
-1.0171631574630737,
0.5482168793678284,
-0.044669728726148605,
-1.3617860078811646,
-0.409354031085968,
-0.9563682675361633,
-0.05381292849779129,
-0.5767537355422974,
-0.5761136412620544,
0.008156869560480118,
0.37053588032722473,
-0.3201029896736145,
-0.45895519852638245,
-0.5663464665412903,
-0.7859354019165039,
0.3864157199859619,
-0.3720266819000244,
0.9449580907821655,
-0.37778955698013306,
1.8636585474014282,
-0.49902477860450745,
0.40693357586860657,
0.7019972205162048,
1.2949947118759155,
0.20751065015792847,
0.13308480381965637,
0.19931837916374207,
0.4506889879703522,
-0.0017597516998648643,
0.4769790470600128,
1.2199523448944092,
0.6814898252487183,
0.4833395779132843,
0.7376020550727844,
-2.2411246299743652,
1.326979637145996,
-0.9788060784339905,
0.3099505305290222,
1.3510346412658691,
-0.935646653175354,
0.3067086338996887,
-1.7969591617584229,
-0.015852991491556168,
0.5425147414207458,
-2.276909351348877,
0.16698037087917328,
-1.3917250633239746,
-0.49957388639450073,
1.015659213066101,
0.30423709750175476,
-1.2402775287628174,
0.23930007219314575,
-0.37085530161857605,
0.9845752716064453,
0.4768484830856323,
1.195891261100769,
-1.6602566242218018,
-0.012841012328863144,
-0.3586277365684509,
0.13741636276245117,
-1.2918519973754883,
-1.5680396556854248,
0.611839771270752,
0.748180627822876,
0.5432003140449524,
-0.14183655381202698,
1.0770249366760254,
-0.9891111254692078,
0.7387202978134155,
-0.9245615005493164,
-1.8240914344787598,
-1.3964396715164185,
-2.2099497318267822,
-2.250182628631592,
0.7491486668586731,
-0.4617306590080261,
-0.4213152825832367,
2.0448684692382812,
-1.067497968673706,
-1.7581032514572144,
1.0437805652618408,
0.3308137059211731,
0.024568762630224228,
2.309718370437622,
0.20256522297859192,
-0.7631616592407227,
0.45405349135398865,
-0.741616427898407,
0.7050174474716187,
-0.25491514801979065,
1.385284185409546,
0.4502856731414795,
-1.0814435482025146,
1.5504616498947144,
-0.40516752004623413,
0.5965010523796082,
-0.6973124146461487,
-0.5133127570152283,
-0.7463060021400452,
0.3069966733455658,
1.927520513534546,
-0.32141491770744324,
1.585179090499878,
-0.35722848773002625,
-1.6014046669006348,
-1.6385780572891235,
0.8075761198997498,
0.5774524807929993,
-0.6910167336463928,
-0.01802394911646843,
-0.3057531416416168,
0.07954363524913788,
-0.011068468913435936,
1.1492396593093872,
1.2532953023910522,
0.7954111099243164,
-0.305357962846756,
-0.8088403344154358,
0.1889379322528839,
-0.04240002855658531,
-0.7853780388832092,
-1.7995526790618896,
-0.3497365415096283,
0.2249062955379486,
0.6491822004318237,
-1.1903342008590698,
1.6444706916809082,
0.8513557314872742,
1.9279035329818726,
1.110640048980713,
-0.3568519353866577,
1.5792816877365112,
0.07996827363967896,
1.7964836359024048,
-0.461088091135025,
0.6998023390769958,
-0.3744942843914032,
-1.142570972442627,
0.8324898481369019,
-0.3128919303417206,
-2.0753471851348877,
-0.6706616282463074,
-0.8393365740776062,
-0.11929468810558319,
-0.7080596089363098,
0.9171095490455627,
-0.22262203693389893,
-1.4487402439117432,
0.24179179966449738,
-0.6848117113113403,
0.017411427572369576,
-1.1791316270828247,
0.30822038650512695,
0.8136735558509827,
-0.6914060711860657,
0.008025702089071274,
-0.2182706743478775,
-1.3230578899383545,
-0.4324307441711426,
0.2449112981557846,
1.814369797706604,
-0.792112410068512,
0.9149981141090393,
1.0624371767044067,
-0.7421002388000488,
0.04914257675409317,
0.371109277009964,
-0.30569222569465637,
0.8836214542388916,
-1.0140587091445923,
-0.32877540588378906,
1.124653697013855,
-0.11353696882724762,
-0.6122183203697205,
1.4803340435028076,
0.7102177143096924,
-0.913206160068512,
-0.1597031056880951,
-0.1041591614484787,
-0.7928970456123352,
-0.003410809673368931,
-1.5705569982528687,
-0.20339325070381165,
0.32048413157463074,
-1.5889644622802734,
-0.4851286709308624,
-0.23778373003005981,
1.3641866445541382,
-0.18634189665317535,
1.3826520442962646,
-0.2680903673171997,
-0.21309050917625427,
-0.4013822078704834,
-0.403919517993927,
0.12126888334751129,
-0.20340904593467712,
-0.6770672798156738,
0.296818345785141,
-0.8325672745704651,
0.34676092863082886,
1.369769811630249,
0.38769209384918213,
0.04894454404711723,
0.5474260449409485,
1.1382458209991455,
0.3678503930568695,
-0.06183374673128128,
-0.8317639827728271,
-1.6663490533828735,
2.018981456756592,
-1.436402440071106,
2.0347485542297363,
0.7505123615264893,
-0.03559357672929764,
-1.7583247423171997,
-1.9453895092010498,
1.4730478525161743,
1.0062034130096436,
2.3780436515808105,
0.5994982123374939,
0.4192450940608978,
-0.8112687468528748,
-0.5944005846977234,
0.39681658148765564,
-0.9216652512550354,
-0.7860903739929199,
0.1300339549779892,
2.351292610168457,
1.663452386856079,
-0.5508334040641785,
-0.23057138919830322,
-1.0326510667800903,
1.4141508340835571,
-0.14273548126220703,
0.20871223509311676,
1.9877184629440308,
-0.23342442512512207,
-1.074709177017212,
1.3434160947799683,
-2.2534844875335693,
0.14649873971939087,
1.9979431629180908,
0.25258752703666687,
-0.002732574939727783,
-1.4428259134292603,
-0.6318678855895996,
-0.25684040784835815,
-0.5170616507530212,
-1.2700051069259644,
0.6238201856613159,
-0.25483983755111694,
-0.8644295334815979,
-1.4823397397994995,
0.08826524019241333,
-1.1709775924682617,
-1.658402681350708,
0.2541542947292328,
1.9782943725585938,
1.9097658395767212,
-0.7514649629592896,
1.568353533744812,
-0.3161596655845642,
0.15972718596458435,
1.2046869993209839,
1.2328040599822998,
3.187317132949829,
1.918938398361206,
-1.2451589107513428,
0.7331735491752625,
-0.16009512543678284,
-0.4735869765281677,
1.1343579292297363,
-1.1307348012924194,
1.3025543689727783,
-0.18684473633766174,
-1.2196036577224731,
-1.2048557996749878,
0.9853010177612305,
0.536956787109375,
0.03639589250087738,
-0.49950969219207764,
1.2467565536499023,
0.029833607375621796,
1.2653552293777466,
0.45818644762039185,
-0.24766823649406433,
0.6171091198921204,
-0.39886945486068726,
-0.5680692195892334,
1.5081318616867065,
0.19090653955936432,
-1.3399567604064941,
-2.2988498210906982,
-0.21366864442825317,
-0.8072490096092224,
-0.01601972058415413,
-0.5846973657608032,
-0.9517055153846741,
1.6925299167633057,
0.4410529136657715,
-1.2576850652694702,
-0.19782662391662598,
-0.3965371549129486,
-0.6135603189468384,
2.619600534439087,
-1.3721821308135986,
-0.1364198476076126,
-1.0081303119659424,
-0.5740674138069153,
1.5567368268966675,
-1.1950712203979492,
-0.12730352580547333,
-0.9476224780082703,
-0.5549322366714478,
-1.362372636795044,
-0.6410033106803894,
0.04776633158326149,
-0.8934856653213501,
0.7748005390167236,
0.20216892659664154,
-1.162871241569519,
-0.383583664894104,
-0.9022881984710693,
0.917303204536438,
-0.07308609783649445,
0.21680310368537903,
2.0004794597625732,
0.40338778495788574,
-0.37428414821624756,
0.6237804889678955,
1.0828429460525513,
0.6484712362289429,
-0.5967046022415161,
0.3138875663280487,
-0.7157193422317505,
0.3309110403060913,
-1.3823740482330322,
0.1959216594696045,
-2.8710715770721436,
0.679630696773529,
0.06067989394068718,
-0.06347519159317017,
0.05098903179168701,
-1.2724559307098389,
1.0495836734771729,
2.6410984992980957,
-1.189283013343811,
0.4456135928630829,
0.3216136395931244,
1.1270772218704224,
-1.508139967918396,
0.32381778955459595,
-0.3643782138824463,
2.0695536136627197,
0.11841273307800293,
1.2652997970581055,
-0.436346173286438,
-2.2001566886901855,
0.6016127467155457,
-1.2111985683441162,
-1.1940356492996216,
0.8262283802032471,
-0.8692823052406311,
0.02894146367907524,
-1.3924778699874878,
-0.23576036095619202,
-0.921552300453186,
-1.2040214538574219,
0.7548805475234985,
0.1457241028547287,
0.47494059801101685,
-0.6301816701889038,
0.4298441708087921,
-2.135688066482544,
-1.3801257610321045,
-0.21959161758422852,
-0.9832218289375305,
0.5321505665779114,
-0.23756194114685059,
0.6549050807952881,
-0.13941936194896698,
0.0009627249091863632,
0.3598121404647827,
1.3501578569412231,
3.336576461791992,
0.14190086722373962,
0.34217384457588196,
-0.15036478638648987,
-1.0656589269638062,
1.4369909763336182,
0.9280263781547546,
-0.1849614828824997,
-0.5185477137565613,
-1.0513386726379395,
1.2201493978500366,
1.9839502573013306,
1.0550848245620728,
-0.0026078345254063606,
-0.9060763120651245,
-0.8536826372146606,
0.08569778501987457,
0.14346420764923096,
0.47960856556892395,
0.8950456380844116,
0.07539108395576477,
0.12607403099536896,
1.4336731433868408,
1.2315940856933594,
-0.37375885248184204,
0.4260525405406952,
-0.8884471654891968,
-0.48368895053863525,
0.5024706721305847,
0.34046149253845215,
0.11136513948440552,
0.37956109642982483,
-1.076495885848999,
-0.21605907380580902,
-0.33230409026145935,
-0.9339390993118286,
-0.6961555480957031,
-0.4954800605773926,
-0.3153502345085144,
1.599062442779541,
0.05737203732132912,
-0.507538914680481,
-0.036000318825244904,
-0.792799174785614,
-0.06401756405830383,
-0.9300704002380371,
0.31769368052482605,
-0.11928993463516235,
-0.08171583712100983,
-0.12236838042736053,
1.70088529586792,
-1.003130555152893,
-2.000324249267578,
0.2643558382987976,
0.19214864075183868,
-0.4324847161769867,
0.2502182722091675,
1.5908292531967163,
0.6420014500617981,
1.4194403886795044,
1.3411062955856323,
0.9449193477630615,
-0.6342417597770691,
-1.376935601234436,
0.5908018350601196,
0.9527317881584167,
-1.3638014793395996,
0.8189207911491394,
0.01922759599983692,
-0.5553497076034546,
0.6767414212226868,
1.3007019758224487,
0.4221906363964081,
-2.0195488929748535,
0.758979082107544,
-0.7949183583259583,
0.6965106129646301,
0.6309560537338257,
0.7457072138786316,
0.13638602197170258,
0.8029161095619202,
-1.2788171768188477,
-1.1112807989120483,
-0.6632617115974426,
-0.7110497355461121,
1.9425551891326904,
-0.1841190755367279,
0.5748468637466431,
-0.1618615984916687,
-1.3416510820388794,
-0.16832219064235687,
0.5919927358627319,
0.4416169226169586,
-0.4867112338542938,
0.7577086091041565,
-0.6928718090057373,
-1.1306949853897095,
-1.3677393198013306,
-0.47147318720817566,
-1.0189987421035767,
-0.8733422756195068,
0.9774885177612305,
0.8719229102134705,
0.41215699911117554,
1.8991013765335083,
0.5475482940673828,
0.24512074887752533,
-2.740180253982544,
0.8843660354614258,
0.3140816390514374,
-0.1011250913143158,
0.8667889833450317,
0.275589257478714,
0.9944562315940857,
-0.11802098155021667,
0.6225941181182861,
-2.3139584064483643,
2.3231499195098877,
-0.2682384252548218,
0.6875733733177185,
-0.048225920647382736,
-0.14580374956130981,
1.0743416547775269,
0.5318483114242554,
0.6873307228088379,
-1.1568505764007568,
0.7026433944702148,
-0.6151673197746277,
1.2025389671325684,
0.921891987323761,
-0.841664731502533,
-0.09985397756099701,
1.3363615274429321,
0.5008060336112976,
-0.4901629090309143,
-0.9308518767356873,
-0.9714453816413879,
0.8457751274108887,
1.7647231817245483,
-0.03776756301522255,
0.05787530168890953,
0.8839964270591736,
0.6314966082572937,
-1.3927922248840332,
0.10067620873451233,
-0.790233314037323,
-0.715014636516571,
1.6376423835754395,
2.1101930141448975,
-0.09212912619113922,
-0.1659630537033081,
-0.7031012773513794,
-1.107796311378479,
0.7635540962219238,
0.022637944668531418,
0.11616946756839752,
0.6323329210281372,
-0.6429678201675415,
1.162475347518921,
0.8915545344352722,
0.9512937664985657,
0.21628637611865997,
0.3575284481048584,
0.3367423713207245,
-0.2837660312652588,
-1.1999620199203491,
-0.30953237414360046,
-0.9544939398765564,
-2.499168634414673,
0.4322643578052521,
-0.14370955526828766,
-1.390028715133667,
-0.04903489723801613,
-0.9904334545135498,
0.7871694564819336,
-0.5478237867355347,
-1.1575353145599365,
-1.4684542417526245,
0.25448471307754517,
-0.012279292568564415,
0.874737024307251,
-1.6450318098068237,
-0.030413473024964333,
1.3045204877853394,
1.06879460811615,
-0.6192042827606201,
0.98430335521698,
0.25599709153175354,
1.057361125946045,
0.8911133408546448,
-0.41377750039100647,
0.4595581889152527,
0.11718881130218506,
-1.2633554935455322,
0.43860405683517456,
1.1322237253189087,
0.19210727512836456,
1.4522567987442017,
-0.6073563098907471,
0.04701711982488632,
0.4861527383327484,
-0.5036407113075256,
-0.36051759123802185,
-0.6159648895263672,
0.6776319742202759,
0.16966508328914642,
-0.885875403881073,
0.031775400042533875,
-0.10971137881278992,
-0.05940978601574898,
0.18323175609111786,
-1.5334677696228027,
-0.12224176526069641,
-0.2724741995334625,
-0.5813491940498352,
-1.1720776557922363,
-0.07308600842952728,
1.3561995029449463,
-0.8307506442070007,
-0.18238350749015808,
0.45369747281074524,
0.32502317428588867,
0.552632749080658,
0.6243640184402466,
-0.7060600519180298,
-0.38225114345550537,
-0.31638213992118835,
-0.386487752199173,
0.2713833153247833,
1.366455316543579,
-0.16422022879123688,
-0.9645777344703674,
0.7506473064422607,
-0.43738824129104614,
0.008659452199935913,
1.8922830820083618,
0.03305454179644585,
-0.8144493699073792,
0.35517993569374084,
-0.7305473685264587,
1.8698394298553467,
1.7665513753890991,
1.3826757669448853,
-0.07387731969356537,
-0.9813277721405029,
0.5467206239700317,
-0.3700411319732666,
-0.4326680600643158,
0.9628793597221375,
0.3867151737213135,
-0.2053874284029007,
-1.354435920715332,
0.6285427212715149,
1.3340178728103638,
-0.9933575391769409,
-0.7628862857818604,
0.028774205595254898,
-0.7953346967697144,
1.044334053993225,
0.769488513469696,
0.3900408148765564,
0.29764068126678467,
1.525801181793213,
0.7858840227127075,
-0.4218504726886749,
0.5267950892448425,
0.4619863033294678,
-0.1711132973432541,
-2.092038154602051,
-1.1375807523727417,
0.31722694635391235,
-0.4527260363101959,
-1.6101821660995483,
1.346231460571289,
-1.2188067436218262,
-0.9622630476951599,
0.4823949933052063,
0.029731109738349915,
1.4634548425674438,
0.34013640880584717,
1.6185632944107056,
2.066619634628296,
0.887874960899353,
0.2852955758571625,
1.354819416999817,
-0.17561769485473633,
-0.44211795926094055,
1.7944573163986206,
-0.555487871170044,
0.5404087901115417,
1.027953028678894,
-0.30872538685798645,
-0.9780634045600891,
-0.884704053401947,
-1.270334243774414,
-0.6451729536056519,
1.1233636140823364,
0.09147109091281891,
-1.134731411933899,
0.2586846947669983,
1.5827466249465942,
0.05999305471777916,
-0.29914307594299316,
0.6803662180900574,
0.46007856726646423,
-0.7622196078300476,
-0.11273527145385742,
-0.8660653233528137,
0.5488120317459106,
-0.24797597527503967,
-0.40519487857818604,
0.3224784731864929,
0.39600494503974915,
1.2702420949935913,
0.0007337853312492371,
0.01922164298593998,
1.2291089296340942,
-1.372174859046936,
1.5011647939682007,
-0.6806077361106873,
0.27260467410087585,
-2.44903564453125,
1.4379842281341553,
-0.7875819802284241,
1.952406406402588,
-2.652688980102539,
0.4893761873245239,
-0.5143156051635742,
-0.4941636919975281,
0.3414963483810425,
-0.35902780294418335,
0.18315857648849487,
-0.17319348454475403,
-1.0911253690719604,
-0.13849300146102905,
-0.7552090287208557,
0.5641310214996338,
1.0567246675491333,
1.3787797689437866,
-1.11037015914917,
-0.2496185004711151,
-1.780012607574463,
-0.1798793226480484,
-0.6566493511199951,
0.40595391392707825,
-1.9623777866363525,
-0.23729726672172546,
-1.9283798933029175,
-2.4866912364959717,
-1.3356071710586548,
-0.8036088943481445,
1.0761762857437134,
0.010614223778247833,
-0.896385133266449,
1.1088452339172363,
-0.3804446756839752,
-1.9133055210113525,
1.0958733558654785,
-2.1271681785583496
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling

I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 54 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling

I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback
|
[
-1.1893925666809082,
-0.9478173851966858,
-0.7714112997055054,
1.412634253501892,
-0.15072843432426453,
-1.257697343826294,
0.09516014158725739,
-1.0975152254104614,
1.7222583293914795,
-0.7652689814567566,
0.3060447573661804,
-1.7043513059616089,
0.013540535233914852,
-0.5268344283103943,
-0.828644871711731,
-0.917595624923706,
-0.38653677701950073,
-0.7958873510360718,
1.019059419631958,
2.574687957763672,
1.1695691347122192,
-1.3960089683532715,
2.6909658908843994,
0.659050464630127,
-0.11067631840705872,
-1.0043221712112427,
0.5405950546264648,
-0.003773492295295,
-1.366676688194275,
-0.4114759564399719,
-0.9591819643974304,
-0.013441698625683784,
-0.6211297512054443,
-0.5297438502311707,
0.03809342905879021,
0.3739703595638275,
-0.31100937724113464,
-0.44730666279792786,
-0.5659071803092957,
-0.7650201916694641,
0.41279205679893494,
-0.42866358160972595,
0.9367561340332031,
-0.3539048731327057,
1.8220316171646118,
-0.5165473818778992,
0.4323919713497162,
0.7090079188346863,
1.28244149684906,
0.22865189611911774,
0.10304679721593857,
0.2737422585487366,
0.4517611563205719,
-0.00753078842535615,
0.47821033000946045,
1.1922142505645752,
0.6772006750106812,
0.474168062210083,
0.7087314128875732,
-2.250434160232544,
1.3145791292190552,
-0.9760499000549316,
0.3020741939544678,
1.3377653360366821,
-0.9493165016174316,
0.3279239237308502,
-1.8493419885635376,
-0.04200555756688118,
0.5432071685791016,
-2.224958658218384,
0.17871275544166565,
-1.3493155241012573,
-0.4625518023967743,
1.0287710428237915,
0.32821258902549744,
-1.2637428045272827,
0.2105349600315094,
-0.3957838714122772,
1.0003151893615723,
0.4683365225791931,
1.1960757970809937,
-1.7048574686050415,
-0.04729238152503967,
-0.3252873420715332,
0.17851026356220245,
-1.2233281135559082,
-1.5486526489257812,
0.5911709070205688,
0.7107932567596436,
0.5647940039634705,
-0.11224063485860825,
1.0312690734863281,
-0.9971147179603577,
0.7603427767753601,
-0.9895756840705872,
-1.8068491220474243,
-1.4194003343582153,
-2.26827073097229,
-2.2820136547088623,
0.770329475402832,
-0.4035061299800873,
-0.40491876006126404,
2.043198823928833,
-1.0457807779312134,
-1.7454323768615723,
1.0568104982376099,
0.3024635314941406,
-0.007757613435387611,
2.3141510486602783,
0.21479004621505737,
-0.789501428604126,
0.5084750652313232,
-0.7950937151908875,
0.7069032192230225,
-0.2890203893184662,
1.4144355058670044,
0.47928646206855774,
-1.0399491786956787,
1.5649619102478027,
-0.3726791441440582,
0.5836138129234314,
-0.6788225173950195,
-0.48112714290618896,
-0.7273624539375305,
0.27407851815223694,
1.9302119016647339,
-0.30789250135421753,
1.5624691247940063,
-0.3607499599456787,
-1.5916621685028076,
-1.6489557027816772,
0.8281421661376953,
0.5644811987876892,
-0.7219683527946472,
0.003965937532484531,
-0.3447578549385071,
0.10673697292804718,
0.019177202135324478,
1.1005301475524902,
1.2467715740203857,
0.7891621589660645,
-0.2978419363498688,
-0.8818134069442749,
0.1633552610874176,
-0.04442919045686722,
-0.7399451732635498,
-1.8052889108657837,
-0.349785178899765,
0.19461596012115479,
0.6466036438941956,
-1.2393139600753784,
1.647768497467041,
0.8717898726463318,
1.9324378967285156,
1.1124860048294067,
-0.39222562313079834,
1.5850119590759277,
0.08401686698198318,
1.8302475214004517,
-0.47252628207206726,
0.6591110229492188,
-0.3479171693325043,
-1.1172572374343872,
0.8423998355865479,
-0.3030696511268616,
-2.0973916053771973,
-0.6706871390342712,
-0.8334757089614868,
-0.1477823108434677,
-0.7362031936645508,
0.9293068051338196,
-0.2138228565454483,
-1.437190294265747,
0.26099783182144165,
-0.7125275135040283,
0.05408761277794838,
-1.1869559288024902,
0.2772890627384186,
0.7822834253311157,
-0.647430419921875,
0.04671735316514969,
-0.24793516099452972,
-1.3413019180297852,
-0.43833133578300476,
0.30990976095199585,
1.7726128101348877,
-0.7476398348808289,
0.9289307594299316,
1.0489661693572998,
-0.7155815362930298,
0.021143369376659393,
0.3877793848514557,
-0.30395805835723877,
0.9014159440994263,
-0.9869898557662964,
-0.36371633410453796,
1.137208342552185,
-0.18937386572360992,
-0.6001753211021423,
1.4465011358261108,
0.7078564167022705,
-0.9332315325737,
-0.196059912443161,
-0.11498776823282242,
-0.7980953454971313,
0.02728649601340294,
-1.613720417022705,
-0.22302860021591187,
0.3519821763038635,
-1.6024470329284668,
-0.46746236085891724,
-0.24960024654865265,
1.35231614112854,
-0.14797566831111908,
1.373551368713379,
-0.28173360228538513,
-0.1633560061454773,
-0.4054798483848572,
-0.4161304533481598,
0.16722099483013153,
-0.19820433855056763,
-0.6618527173995972,
0.3009551167488098,
-0.844670832157135,
0.3352193832397461,
1.4201478958129883,
0.3743070363998413,
0.022399313747882843,
0.5203744769096375,
1.0638246536254883,
0.37019991874694824,
-0.039148151874542236,
-0.8468282222747803,
-1.644242286682129,
2.063279628753662,
-1.4259681701660156,
2.0133416652679443,
0.7535966634750366,
-0.03253478929400444,
-1.771774172782898,
-1.938036561012268,
1.4669636487960815,
1.0237728357315063,
2.3888978958129883,
0.5542623400688171,
0.41361895203590393,
-0.7631548047065735,
-0.6204962730407715,
0.3819217085838318,
-0.9331393241882324,
-0.8471909165382385,
0.12137752771377563,
2.3562164306640625,
1.6739023923873901,
-0.4987969994544983,
-0.20813630521297455,
-1.04486882686615,
1.443192720413208,
-0.12859979271888733,
0.2006855010986328,
1.9881036281585693,
-0.21470384299755096,
-1.088384985923767,
1.323231816291809,
-2.262467861175537,
0.17823541164398193,
2.0030951499938965,
0.25768959522247314,
0.024213213473558426,
-1.4740124940872192,
-0.6548784971237183,
-0.2521302103996277,
-0.5037607550621033,
-1.2442727088928223,
0.6097376346588135,
-0.24086232483386993,
-0.8655736446380615,
-1.4856393337249756,
0.08588720113039017,
-1.1811991930007935,
-1.6726101636886597,
0.2581198215484619,
1.9477699995040894,
1.9701217412948608,
-0.7391979098320007,
1.5199650526046753,
-0.29819414019584656,
0.18870696425437927,
1.1837105751037598,
1.2106441259384155,
3.154675245285034,
1.9027551412582397,
-1.2412757873535156,
0.7373417615890503,
-0.16021281480789185,
-0.4690679609775543,
1.075779676437378,
-1.1025207042694092,
1.2640228271484375,
-0.17425082623958588,
-1.1740769147872925,
-1.1758612394332886,
1.0079820156097412,
0.5233630537986755,
0.008941841311752796,
-0.4998505115509033,
1.2197000980377197,
0.041718512773513794,
1.233656644821167,
0.47040483355522156,
-0.22743208706378937,
0.6129723191261292,
-0.3551816940307617,
-0.5632888078689575,
1.5181715488433838,
0.20211757719516754,
-1.4255428314208984,
-2.317300319671631,
-0.22253452241420746,
-0.837605357170105,
-0.03021286055445671,
-0.5555005669593811,
-0.9614614248275757,
1.699241042137146,
0.448236346244812,
-1.2469401359558105,
-0.19491778314113617,
-0.348903626203537,
-0.6097612977027893,
2.6410787105560303,
-1.3469806909561157,
-0.17196214199066162,
-0.9862481355667114,
-0.5721732378005981,
1.5399032831192017,
-1.1908557415008545,
-0.12334228307008743,
-0.9483805894851685,
-0.5645583868026733,
-1.3670077323913574,
-0.6154640316963196,
0.013858863152563572,
-0.896246612071991,
0.7597201466560364,
0.1802738606929779,
-1.1778066158294678,
-0.36029350757598877,
-0.9284332394599915,
0.9102745652198792,
-0.06963693350553513,
0.23474951088428497,
1.988399624824524,
0.37894561886787415,
-0.382582426071167,
0.6490577459335327,
1.1284805536270142,
0.6526992917060852,
-0.566783607006073,
0.2623341679573059,
-0.7009612917900085,
0.34146633744239807,
-1.283380150794983,
0.24609309434890747,
-2.882612943649292,
0.6984533667564392,
0.020833462476730347,
-0.06317368149757385,
0.0030848532915115356,
-1.2235150337219238,
1.1162415742874146,
2.6214206218719482,
-1.1995768547058105,
0.4834240972995758,
0.3191429078578949,
1.1315311193466187,
-1.4526017904281616,
0.3379388749599457,
-0.3766363561153412,
2.126278877258301,
0.1852400302886963,
1.2390921115875244,
-0.4709246754646301,
-2.2126002311706543,
0.6162678003311157,
-1.2340114116668701,
-1.1652588844299316,
0.7682355642318726,
-0.8289424777030945,
0.008935683406889439,
-1.4050155878067017,
-0.2150493860244751,
-0.9150702357292175,
-1.2198742628097534,
0.716968834400177,
0.13612455129623413,
0.45343610644340515,
-0.6425994634628296,
0.39740779995918274,
-2.180485963821411,
-1.4389499425888062,
-0.21753692626953125,
-1.0260825157165527,
0.5184710621833801,
-0.27628305554389954,
0.6973603367805481,
-0.1323097199201584,
-0.03278768062591553,
0.33988961577415466,
1.3773009777069092,
3.365899085998535,
0.11535969376564026,
0.3418349325656891,
-0.14993396401405334,
-1.0342994928359985,
1.4594731330871582,
0.8916218876838684,
-0.18562141060829163,
-0.5367180705070496,
-1.0776841640472412,
1.251943826675415,
2.015796184539795,
1.035154104232788,
0.04248539358377457,
-0.8689805269241333,
-0.8282074332237244,
0.08867411315441132,
0.1540900319814682,
0.4980478286743164,
0.9063220620155334,
0.04481187462806702,
0.10558344423770905,
1.4729700088500977,
1.219740867614746,
-0.3769459128379822,
0.42780280113220215,
-0.8750808238983154,
-0.4389418959617615,
0.4616450369358063,
0.3001086413860321,
0.09645511955022812,
0.3990035355091095,
-1.0967127084732056,
-0.21250882744789124,
-0.31776925921440125,
-0.9408204555511475,
-0.7216529846191406,
-0.4513525664806366,
-0.339811772108078,
1.5963566303253174,
0.12224055826663971,
-0.47917836904525757,
-0.019788136705756187,
-0.7829277515411377,
-0.05303642153739929,
-0.9234132170677185,
0.30028000473976135,
-0.12519335746765137,
-0.07481707632541656,
-0.1352139115333557,
1.7298390865325928,
-0.9721909165382385,
-2.0419390201568604,
0.2485850751399994,
0.23014594614505768,
-0.4444328844547272,
0.237708181142807,
1.6040992736816406,
0.6802963018417358,
1.4027485847473145,
1.3271958827972412,
0.9474905133247375,
-0.602907657623291,
-1.3648713827133179,
0.6306576132774353,
0.9592024683952332,
-1.3529736995697021,
0.8115993142127991,
0.011505070142447948,
-0.537257194519043,
0.697932243347168,
1.2978914976119995,
0.39761459827423096,
-2.0335307121276855,
0.7881755232810974,
-0.7998675107955933,
0.7302215099334717,
0.6242644786834717,
0.7629339098930359,
0.14218898117542267,
0.7849518060684204,
-1.323179841041565,
-1.0596493482589722,
-0.693780779838562,
-0.6846826672554016,
1.9549553394317627,
-0.17451128363609314,
0.5662991404533386,
-0.1686897873878479,
-1.3479331731796265,
-0.1657014787197113,
0.584150493144989,
0.40574249625205994,
-0.4857371151447296,
0.7588682770729065,
-0.6758428812026978,
-1.1741911172866821,
-1.3598837852478027,
-0.4636359214782715,
-1.0073963403701782,
-0.8633913397789001,
0.9863821268081665,
0.8126693964004517,
0.42132502794265747,
1.9092164039611816,
0.5432115793228149,
0.21958601474761963,
-2.745561122894287,
0.9147264957427979,
0.3058682084083557,
-0.06640472263097763,
0.9133803844451904,
0.2414465844631195,
0.9965353608131409,
-0.13083532452583313,
0.6444152593612671,
-2.2696611881256104,
2.2933740615844727,
-0.2706315219402313,
0.7162513732910156,
-0.003697717562317848,
-0.10346744954586029,
1.0735300779342651,
0.5653978586196899,
0.7215325236320496,
-1.1441690921783447,
0.7015236616134644,
-0.6448684334754944,
1.223478078842163,
0.9398729801177979,
-0.8086032867431641,
-0.08941911906003952,
1.3056507110595703,
0.4711546301841736,
-0.45539724826812744,
-0.9638071060180664,
-0.9836219549179077,
0.896350622177124,
1.7989413738250732,
-0.05370756983757019,
0.050135497003793716,
0.8733140230178833,
0.6436198353767395,
-1.4078916311264038,
0.04538830742239952,
-0.7671248316764832,
-0.6699506044387817,
1.6331225633621216,
2.1420960426330566,
-0.09392432123422623,
-0.20712846517562866,
-0.6854831576347351,
-1.1820242404937744,
0.7466769218444824,
0.03370412439107895,
0.12197507917881012,
0.679530680179596,
-0.596932053565979,
1.1643271446228027,
0.8544831871986389,
0.9612695574760437,
0.19888703525066376,
0.3429694175720215,
0.29109084606170654,
-0.3062068521976471,
-1.1948652267456055,
-0.33712878823280334,
-1.0232857465744019,
-2.5119898319244385,
0.41032201051712036,
-0.14379514753818512,
-1.3877846002578735,
-0.009007323533296585,
-1.0142557621002197,
0.7665103673934937,
-0.5197805762290955,
-1.1492457389831543,
-1.4281147718429565,
0.26167386770248413,
-0.03755892068147659,
0.8755223155021667,
-1.661449909210205,
-0.06099313125014305,
1.3161848783493042,
1.0710563659667969,
-0.6276228427886963,
0.9792366027832031,
0.2594577372074127,
0.9997969269752502,
0.8793612122535706,
-0.3920135200023651,
0.4669477939605713,
0.10513634979724884,
-1.2456952333450317,
0.4196135699748993,
1.1495732069015503,
0.15095829963684082,
1.3969475030899048,
-0.6292266845703125,
0.049726009368896484,
0.47775396704673767,
-0.5204364061355591,
-0.39571595191955566,
-0.6014857292175293,
0.6778550148010254,
0.11463434994220734,
-0.922605574131012,
0.00343309435993433,
-0.11297205090522766,
-0.07070188224315643,
0.21099644899368286,
-1.4926707744598389,
-0.13471829891204834,
-0.2741870880126953,
-0.5999289155006409,
-1.2308295965194702,
-0.10136555880308151,
1.3635027408599854,
-0.8527402877807617,
-0.17726120352745056,
0.49336880445480347,
0.35089045763015747,
0.6325167417526245,
0.6378651857376099,
-0.7308037877082825,
-0.39529502391815186,
-0.29027271270751953,
-0.32139772176742554,
0.2704486846923828,
1.2954611778259277,
-0.18496617674827576,
-1.0057305097579956,
0.7351438999176025,
-0.4266895651817322,
0.05563602223992348,
1.8963500261306763,
0.006142280995845795,
-0.8251122236251831,
0.3521779775619507,
-0.6918591260910034,
1.8609449863433838,
1.7444881200790405,
1.3715109825134277,
-0.09130588173866272,
-0.9393330812454224,
0.5916033387184143,
-0.31201761960983276,
-0.44468188285827637,
0.90513014793396,
0.36823177337646484,
-0.19011330604553223,
-1.3668793439865112,
0.607560396194458,
1.3252755403518677,
-0.9588678479194641,
-0.8206639289855957,
0.04598446190357208,
-0.8341569304466248,
1.1258065700531006,
0.7343361973762512,
0.4084451496601105,
0.25982794165611267,
1.5682275295257568,
0.7831063270568848,
-0.4847504496574402,
0.5057686567306519,
0.4782398045063019,
-0.21601258218288422,
-2.078113555908203,
-1.1140950918197632,
0.27731287479400635,
-0.455617755651474,
-1.6358859539031982,
1.333751916885376,
-1.2151411771774292,
-0.9533864855766296,
0.5256504416465759,
0.04016963765025139,
1.4121969938278198,
0.3346736431121826,
1.6008703708648682,
2.0656347274780273,
0.9032670855522156,
0.3229183256626129,
1.3244407176971436,
-0.1960069090127945,
-0.44151368737220764,
1.7961242198944092,
-0.4927547574043274,
0.5739887952804565,
1.0441538095474243,
-0.3292391896247864,
-0.9635823369026184,
-0.8703261613845825,
-1.2144237756729126,
-0.6332842111587524,
1.1318036317825317,
0.1205282062292099,
-1.1553499698638916,
0.2302667647600174,
1.5552029609680176,
0.061239149421453476,
-0.2845490872859955,
0.6516348719596863,
0.4468051791191101,
-0.7314799427986145,
-0.11651541292667389,
-0.9435862898826599,
0.5465105175971985,
-0.2723906934261322,
-0.4016391634941101,
0.31129980087280273,
0.368729829788208,
1.2584969997406006,
-0.0394931323826313,
0.07087870687246323,
1.2404364347457886,
-1.3714656829833984,
1.4884963035583496,
-0.6858415007591248,
0.2858523726463318,
-2.4184656143188477,
1.406278133392334,
-0.7812709212303162,
1.9514902830123901,
-2.660228967666626,
0.43850773572921753,
-0.5489012598991394,
-0.498123437166214,
0.2818065285682678,
-0.3411843776702881,
0.1675005853176117,
-0.19800855219364166,
-1.0782421827316284,
-0.16626986861228943,
-0.7551175951957703,
0.4972466230392456,
1.0690557956695557,
1.387315034866333,
-1.0825691223144531,
-0.22375105321407318,
-1.766687273979187,
-0.18366046249866486,
-0.668515682220459,
0.4159623682498932,
-1.969525694847107,
-0.21724867820739746,
-1.9198100566864014,
-2.468287706375122,
-1.3141045570373535,
-0.8327302932739258,
1.0905143022537231,
0.04736170545220375,
-0.8844847679138184,
1.1296730041503906,
-0.32919901609420776,
-1.8609000444412231,
1.0960242748260498,
-2.178467273712158
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
@ntrpnr @mtwichel Did you install `datasets` with conda ?
I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error.
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 34 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
@ntrpnr @mtwichel Did you install `datasets` with conda ?
I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error.
|
[
-1.1625075340270996,
-0.9114705920219421,
-0.756309449672699,
1.44755220413208,
-0.1924143135547638,
-1.2859165668487549,
0.12256346642971039,
-1.187840461730957,
1.7959147691726685,
-0.7802746891975403,
0.3234862983226776,
-1.747164011001587,
0.018785636872053146,
-0.5356882214546204,
-0.8493496179580688,
-0.9767200350761414,
-0.4503471255302429,
-0.7354860305786133,
0.9667189121246338,
2.550157308578491,
1.1686911582946777,
-1.2910740375518799,
2.6569087505340576,
0.6782271265983582,
-0.07134752720594406,
-0.9998011589050293,
0.5676718354225159,
-0.0006737085059285164,
-1.3131569623947144,
-0.4108997583389282,
-0.9315357804298401,
-0.0993005558848381,
-0.6160908937454224,
-0.5854953527450562,
0.04062243178486824,
0.34628385305404663,
-0.40435081720352173,
-0.4555830955505371,
-0.540230929851532,
-0.8206666707992554,
0.39195510745048523,
-0.40321803092956543,
0.9438021183013916,
-0.4333397150039673,
1.8988829851150513,
-0.5221443176269531,
0.43351081013679504,
0.7645503878593445,
1.2595109939575195,
0.24061621725559235,
0.13851389288902283,
0.18992367386817932,
0.4471488893032074,
0.013990641571581364,
0.4828670620918274,
1.1640335321426392,
0.6144254803657532,
0.5414763689041138,
0.6794899702072144,
-2.2562451362609863,
1.3096511363983154,
-1.0422828197479248,
0.2962634563446045,
1.3608466386795044,
-0.9186509847640991,
0.29661908745765686,
-1.7746007442474365,
-0.028377313166856766,
0.5414273142814636,
-2.2544925212860107,
0.1743210107088089,
-1.4015469551086426,
-0.47747108340263367,
1.07585871219635,
0.363569438457489,
-1.2277487516403198,
0.22515049576759338,
-0.28072237968444824,
0.994104266166687,
0.5145472288131714,
1.1865326166152954,
-1.7172080278396606,
0.0003813067451119423,
-0.3947731554508209,
0.12550747394561768,
-1.2887707948684692,
-1.5033235549926758,
0.6275284886360168,
0.726239800453186,
0.5445677638053894,
-0.08675415068864822,
1.0139356851577759,
-0.9311886429786682,
0.7052579522132874,
-0.9824693202972412,
-1.8076343536376953,
-1.3994170427322388,
-2.2366249561309814,
-2.3426992893218994,
0.775992751121521,
-0.41788381338119507,
-0.43316665291786194,
2.0300114154815674,
-1.0445722341537476,
-1.7930001020431519,
1.0793498754501343,
0.31408798694610596,
-0.013577432371675968,
2.295947313308716,
0.23363502323627472,
-0.7175016403198242,
0.4427044689655304,
-0.7842742204666138,
0.6425654292106628,
-0.2505582571029663,
1.4257787466049194,
0.48044243454933167,
-1.12981379032135,
1.5621249675750732,
-0.43746787309646606,
0.6295599937438965,
-0.665834367275238,
-0.5061184167861938,
-0.7220990657806396,
0.2910493016242981,
1.9315725564956665,
-0.2887071371078491,
1.5524835586547852,
-0.31861960887908936,
-1.5940322875976562,
-1.6712607145309448,
0.829828679561615,
0.5621405839920044,
-0.6301464438438416,
-0.005247809458523989,
-0.2623942792415619,
0.08071810007095337,
0.017921052873134613,
1.1590691804885864,
1.1980072259902954,
0.8366996049880981,
-0.3371843099594116,
-0.8065020442008972,
0.2211214005947113,
0.025341100990772247,
-0.795428454875946,
-1.7851015329360962,
-0.4004257619380951,
0.20645006000995636,
0.6438305974006653,
-1.159936547279358,
1.6324105262756348,
0.8366877436637878,
1.9020321369171143,
1.1356083154678345,
-0.33997589349746704,
1.5294967889785767,
0.07343576848506927,
1.8362383842468262,
-0.44504308700561523,
0.7201982140541077,
-0.34904566407203674,
-1.1252633333206177,
0.8043646812438965,
-0.31190258264541626,
-2.1182894706726074,
-0.7134591937065125,
-0.8448719382286072,
-0.0864192321896553,
-0.6768876314163208,
0.9533974528312683,
-0.15069296956062317,
-1.4296799898147583,
0.20910847187042236,
-0.6892307996749878,
-0.0020035887137055397,
-1.1949572563171387,
0.3116554617881775,
0.8110542297363281,
-0.6766855120658875,
0.04183867201209068,
-0.22386421263217926,
-1.3133572340011597,
-0.41344550251960754,
0.23532116413116455,
1.7973772287368774,
-0.8077057003974915,
0.9297798871994019,
1.0431389808654785,
-0.796801745891571,
0.022392500191926956,
0.39955615997314453,
-0.30736225843429565,
0.8700923919677734,
-0.9402590990066528,
-0.33473509550094604,
1.1643620729446411,
-0.16472572088241577,
-0.6228219270706177,
1.4974935054779053,
0.7030332088470459,
-0.9214442372322083,
-0.09506534039974213,
-0.19185243546962738,
-0.7729464173316956,
0.031190257519483566,
-1.5902801752090454,
-0.17948482930660248,
0.3342783749103546,
-1.5713170766830444,
-0.5352893471717834,
-0.22803835570812225,
1.3713823556900024,
-0.15291330218315125,
1.3290073871612549,
-0.2668682038784027,
-0.2516295909881592,
-0.4370031952857971,
-0.38536810874938965,
0.1224210113286972,
-0.20210573077201843,
-0.6859639286994934,
0.2911525368690491,
-0.794394850730896,
0.3346746563911438,
1.3633750677108765,
0.3653649687767029,
0.05476715415716171,
0.549791157245636,
1.087960124015808,
0.3327648639678955,
-0.10760320723056793,
-0.8756059408187866,
-1.6571604013442993,
1.9949861764907837,
-1.3703125715255737,
2.03397536277771,
0.6524038314819336,
-0.03228349983692169,
-1.7389289140701294,
-1.9386112689971924,
1.5068402290344238,
1.0288065671920776,
2.3437302112579346,
0.5852599740028381,
0.4147126376628876,
-0.8131857514381409,
-0.5996054410934448,
0.3685573637485504,
-0.9679042100906372,
-0.8184446096420288,
0.1424742490053177,
2.3321259021759033,
1.6487209796905518,
-0.5881876945495605,
-0.19852077960968018,
-1.1141178607940674,
1.4311084747314453,
-0.1363338977098465,
0.14413349330425262,
2.031465768814087,
-0.25971564650535583,
-1.107527732849121,
1.3438729047775269,
-2.2230117321014404,
0.10449244827032089,
1.9510698318481445,
0.2596018612384796,
0.006228875368833542,
-1.4844616651535034,
-0.6872057318687439,
-0.2702834904193878,
-0.5069218277931213,
-1.2591766119003296,
0.6349644064903259,
-0.2286776453256607,
-0.8184928894042969,
-1.4384392499923706,
0.11794425547122955,
-1.1331535577774048,
-1.6590349674224854,
0.2091110199689865,
1.9361549615859985,
1.8962055444717407,
-0.7624062895774841,
1.5729421377182007,
-0.27764472365379333,
0.15264230966567993,
1.2438712120056152,
1.2123411893844604,
3.157396078109741,
1.9596785306930542,
-1.2507084608078003,
0.7777470350265503,
-0.11962640285491943,
-0.5160666704177856,
1.1850240230560303,
-1.1356192827224731,
1.3266947269439697,
-0.19009189307689667,
-1.1821320056915283,
-1.2231453657150269,
0.9386516213417053,
0.5601060390472412,
0.04472809657454491,
-0.49370598793029785,
1.234976053237915,
0.008808542974293232,
1.2911136150360107,
0.43201130628585815,
-0.24575310945510864,
0.6598618030548096,
-0.4319179058074951,
-0.5486884713172913,
1.5145643949508667,
0.23606793582439423,
-1.3501731157302856,
-2.3046460151672363,
-0.2148302048444748,
-0.8260002136230469,
-0.04051341488957405,
-0.5345607995986938,
-0.9137911200523376,
1.6929517984390259,
0.5034692883491516,
-1.2864208221435547,
-0.18328891694545746,
-0.3900091350078583,
-0.6554333567619324,
2.683469295501709,
-1.369585633277893,
-0.12815675139427185,
-1.0111169815063477,
-0.5855087637901306,
1.5406478643417358,
-1.2122905254364014,
-0.1033797413110733,
-0.9402364492416382,
-0.5742290019989014,
-1.3802802562713623,
-0.6479750275611877,
0.04554959759116173,
-0.9256668090820312,
0.8205748796463013,
0.17051663994789124,
-1.205189824104309,
-0.41983404755592346,
-0.9290528893470764,
0.867710530757904,
-0.06287460029125214,
0.2661193311214447,
2.0092716217041016,
0.4173753261566162,
-0.3705422580242157,
0.5854485034942627,
1.084831714630127,
0.6422832608222961,
-0.6118229031562805,
0.38387537002563477,
-0.7600619196891785,
0.3123590052127838,
-1.3079923391342163,
0.1845756620168686,
-2.880345344543457,
0.6747915744781494,
0.04923628643155098,
-0.03701791912317276,
0.02224862203001976,
-1.2108174562454224,
1.079219102859497,
2.666402578353882,
-1.2129926681518555,
0.46243831515312195,
0.302737295627594,
1.11471688747406,
-1.4309200048446655,
0.3697814643383026,
-0.3422932028770447,
2.0828983783721924,
0.12868079543113708,
1.2535632848739624,
-0.42698702216148376,
-2.170501470565796,
0.666522204875946,
-1.240405559539795,
-1.2178990840911865,
0.8475830554962158,
-0.8194013237953186,
-0.018079491332173347,
-1.3546444177627563,
-0.1942676156759262,
-0.8716180920600891,
-1.2405595779418945,
0.7622617483139038,
0.17951546609401703,
0.4997907876968384,
-0.5918225646018982,
0.4457165598869324,
-2.1845703125,
-1.3940458297729492,
-0.24454674124717712,
-1.00808584690094,
0.5165516138076782,
-0.1798485666513443,
0.6868582963943481,
-0.19926351308822632,
-0.0070427837781608105,
0.4139205813407898,
1.3942301273345947,
3.330775260925293,
0.08269002288579941,
0.3518572449684143,
-0.1227220892906189,
-1.0341321229934692,
1.4227434396743774,
0.9037719964981079,
-0.2241365760564804,
-0.49190592765808105,
-1.0765787363052368,
1.1752111911773682,
1.9774552583694458,
1.0835984945297241,
0.007441003806889057,
-0.9408206343650818,
-0.8366455435752869,
0.12858211994171143,
0.13564658164978027,
0.4409002959728241,
0.8461635112762451,
0.08749326318502426,
0.09662238508462906,
1.4305609464645386,
1.24221670627594,
-0.36867183446884155,
0.4261377453804016,
-0.8705548644065857,
-0.4784258306026459,
0.5354103446006775,
0.3459790050983429,
0.12177382409572601,
0.35243871808052063,
-1.0243858098983765,
-0.18669965863227844,
-0.2776876986026764,
-0.9299768805503845,
-0.7207326889038086,
-0.5555288195610046,
-0.368460088968277,
1.6154391765594482,
0.06574270129203796,
-0.5227466821670532,
-0.03897324949502945,
-0.8022158741950989,
-0.028658483177423477,
-0.8973538279533386,
0.2944872975349426,
-0.11740457266569138,
-0.12976926565170288,
-0.17795170843601227,
1.7335014343261719,
-1.0290195941925049,
-1.9809242486953735,
0.32403016090393066,
0.2433788776397705,
-0.45195960998535156,
0.27949854731559753,
1.530025601387024,
0.6560572385787964,
1.4344544410705566,
1.3306989669799805,
0.961496114730835,
-0.6361038088798523,
-1.4418271780014038,
0.580185055732727,
0.9923021793365479,
-1.3699957132339478,
0.7887157797813416,
0.10700313001871109,
-0.48641470074653625,
0.6618120074272156,
1.2662467956542969,
0.43010297417640686,
-1.9571833610534668,
0.6953920722007751,
-0.7615704536437988,
0.6934406757354736,
0.6080553531646729,
0.7374913692474365,
0.09965410828590393,
0.7568475008010864,
-1.2759438753128052,
-1.0912513732910156,
-0.6247624754905701,
-0.6900676488876343,
1.9391390085220337,
-0.14778192341327667,
0.5842705368995667,
-0.18345670402050018,
-1.3730072975158691,
-0.16571161150932312,
0.5934633016586304,
0.44217658042907715,
-0.49103763699531555,
0.7584180235862732,
-0.64536052942276,
-1.1412655115127563,
-1.3700007200241089,
-0.44387614727020264,
-1.0442931652069092,
-0.8259835839271545,
0.9943039417266846,
0.8801539540290833,
0.36692291498184204,
1.8370845317840576,
0.5442121624946594,
0.2849859297275543,
-2.754607677459717,
0.911720335483551,
0.30324846506118774,
-0.07409503310918808,
0.8151877522468567,
0.2878583073616028,
0.97674959897995,
-0.1910359114408493,
0.6604942083358765,
-2.270472526550293,
2.3760600090026855,
-0.2604721188545227,
0.6213091015815735,
0.00951117929071188,
-0.11686228215694427,
1.03793203830719,
0.5556191205978394,
0.6832447648048401,
-1.1515978574752808,
0.6434667110443115,
-0.643473207950592,
1.2254652976989746,
0.9236648678779602,
-0.841806173324585,
-0.14667350053787231,
1.322169542312622,
0.5306487679481506,
-0.42826512455940247,
-0.9357258081436157,
-1.023080825805664,
0.9148480296134949,
1.746489405632019,
-0.07574339210987091,
0.004453222267329693,
0.9099483489990234,
0.6069973111152649,
-1.4012342691421509,
0.07379908859729767,
-0.8087052702903748,
-0.6765002608299255,
1.5883915424346924,
2.1305534839630127,
-0.04694211483001709,
-0.19287309050559998,
-0.764988899230957,
-1.0855180025100708,
0.7946767807006836,
0.07290694117546082,
0.09991226345300674,
0.6387271881103516,
-0.5596762895584106,
1.176845669746399,
0.976250410079956,
0.948218584060669,
0.3103627860546112,
0.3807297945022583,
0.2579190135002136,
-0.27398690581321716,
-1.2512058019638062,
-0.3136358857154846,
-0.9736150503158569,
-2.5384087562561035,
0.465597540140152,
-0.19206692278385162,
-1.3700532913208008,
-0.06578318774700165,
-1.034109115600586,
0.7748345136642456,
-0.5204408764839172,
-1.1058753728866577,
-1.484840750694275,
0.2284848392009735,
-0.014042302966117859,
0.8737326860427856,
-1.6510580778121948,
-0.01796760782599449,
1.3517144918441772,
1.0777614116668701,
-0.678888201713562,
0.9703359603881836,
0.2645910084247589,
1.0128803253173828,
0.8887106776237488,
-0.39855629205703735,
0.5070230960845947,
0.0796036496758461,
-1.27689528465271,
0.4154552221298218,
1.0951370000839233,
0.19713257253170013,
1.42294180393219,
-0.656111478805542,
0.10604322701692581,
0.4650510251522064,
-0.5160393118858337,
-0.39424097537994385,
-0.6473533511161804,
0.6650381684303284,
0.19105872511863708,
-0.8938075304031372,
0.04554159939289093,
-0.0794563814997673,
-0.017341013997793198,
0.19021621346473694,
-1.5125792026519775,
-0.13994397222995758,
-0.23906247317790985,
-0.6211792230606079,
-1.1574639081954956,
-0.144149512052536,
1.4025293588638306,
-0.8422968983650208,
-0.1834774613380432,
0.49290937185287476,
0.34820812940597534,
0.5820930600166321,
0.6068945527076721,
-0.7098689675331116,
-0.35474473237991333,
-0.35439038276672363,
-0.29815664887428284,
0.2536376714706421,
1.365588903427124,
-0.18515759706497192,
-0.976463794708252,
0.7950569987297058,
-0.4106822907924652,
0.0446985699236393,
1.8823949098587036,
0.020692002028226852,
-0.8653626441955566,
0.3132016360759735,
-0.6955279111862183,
1.846896767616272,
1.7835843563079834,
1.3318203687667847,
-0.052612945437431335,
-0.9954004287719727,
0.5122310519218445,
-0.36031097173690796,
-0.43548640608787537,
0.9568384885787964,
0.38739946484565735,
-0.19993740320205688,
-1.312669277191162,
0.6168769001960754,
1.350490927696228,
-0.9512522220611572,
-0.8577110171318054,
0.05216750130057335,
-0.8326120972633362,
1.0118184089660645,
0.8003796935081482,
0.3744383454322815,
0.31148475408554077,
1.5207239389419556,
0.784005880355835,
-0.4317176938056946,
0.5221040844917297,
0.40950265526771545,
-0.20439064502716064,
-2.0575356483459473,
-1.1597098112106323,
0.3267803192138672,
-0.5330489873886108,
-1.6186277866363525,
1.3481799364089966,
-1.2111536264419556,
-0.9233266711235046,
0.5316701531410217,
0.01845509558916092,
1.4930505752563477,
0.32857009768486023,
1.578709602355957,
2.0175931453704834,
0.9127469658851624,
0.28264960646629333,
1.4122282266616821,
-0.19076339900493622,
-0.4537230134010315,
1.794897198677063,
-0.5320844650268555,
0.5118353962898254,
1.074972152709961,
-0.2759810984134674,
-0.9279901385307312,
-0.9180441498756409,
-1.2436259984970093,
-0.6895901560783386,
1.1476777791976929,
0.12651470303535461,
-1.1238071918487549,
0.22626365721225739,
1.5602924823760986,
0.021036967635154724,
-0.27515026926994324,
0.6994910836219788,
0.41968849301338196,
-0.8072718381881714,
-0.08885207027196884,
-0.9171480536460876,
0.5440608263015747,
-0.26416996121406555,
-0.4018705189228058,
0.30303141474723816,
0.33786970376968384,
1.260901927947998,
-0.016144879162311554,
0.07215402275323868,
1.2034778594970703,
-1.3408045768737793,
1.4999189376831055,
-0.6735047101974487,
0.2843795716762543,
-2.450711488723755,
1.4029382467269897,
-0.7696523666381836,
1.896133303642273,
-2.668227195739746,
0.4832557439804077,
-0.500837504863739,
-0.4690673351287842,
0.3038347363471985,
-0.397273987531662,
0.2052239626646042,
-0.18412843346595764,
-1.1536365747451782,
-0.16601267457008362,
-0.7837169170379639,
0.5468924045562744,
1.0270485877990723,
1.4236716032028198,
-1.1116364002227783,
-0.26801490783691406,
-1.794041633605957,
-0.17385420203208923,
-0.6638245582580566,
0.4618367552757263,
-1.9307456016540527,
-0.2337389588356018,
-1.849076271057129,
-2.5010056495666504,
-1.3040565252304077,
-0.7849428653717041,
1.0941431522369385,
-0.03083816170692444,
-0.8515655398368835,
1.0944492816925049,
-0.37651222944259644,
-1.952052116394043,
1.1210110187530518,
-2.1728909015655518
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
> @ntrpnr @mtwichel Did you install datasets with conda ?
I did yeah, I wonder if that's the issue
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 19 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
> @ntrpnr @mtwichel Did you install datasets with conda ?
I did yeah, I wonder if that's the issue
|
[
-1.1661595106124878,
-0.9210278987884521,
-0.7668328881263733,
1.4417788982391357,
-0.21570250391960144,
-1.2651389837265015,
0.10105810314416885,
-1.1767208576202393,
1.7375155687332153,
-0.787563145160675,
0.3176383376121521,
-1.7452316284179688,
0.016856275498867035,
-0.5132984519004822,
-0.842752993106842,
-0.9760454893112183,
-0.47762686014175415,
-0.7202600836753845,
0.9552491307258606,
2.5550880432128906,
1.1635109186172485,
-1.3159717321395874,
2.6424343585968018,
0.7047417163848877,
-0.058340493589639664,
-1.0356372594833374,
0.5798738598823547,
0.00962247233837843,
-1.2898916006088257,
-0.39243650436401367,
-0.9366427659988403,
-0.10248632729053497,
-0.622089147567749,
-0.5521376729011536,
0.0281074121594429,
0.3288976848125458,
-0.37157896161079407,
-0.41906237602233887,
-0.5518227815628052,
-0.8152645230293274,
0.39157477021217346,
-0.42674821615219116,
0.9196034073829651,
-0.42223018407821655,
1.8726757764816284,
-0.5196324586868286,
0.4545096755027771,
0.7603549361228943,
1.2637059688568115,
0.25430020689964294,
0.1581902801990509,
0.1962016522884369,
0.45125052332878113,
0.00855748075991869,
0.4546874761581421,
1.1501084566116333,
0.6282404661178589,
0.51216721534729,
0.6743146777153015,
-2.2543976306915283,
1.287758708000183,
-1.0291264057159424,
0.28853660821914673,
1.386304497718811,
-0.912727415561676,
0.31862905621528625,
-1.7916147708892822,
-0.028024498373270035,
0.5509002208709717,
-2.2713749408721924,
0.18049490451812744,
-1.3899716138839722,
-0.4799729585647583,
1.0567785501480103,
0.36801838874816895,
-1.2411185503005981,
0.22111299633979797,
-0.3265085518360138,
0.9791956543922424,
0.5307689309120178,
1.1875102519989014,
-1.7004897594451904,
0.0015552500262856483,
-0.38408273458480835,
0.14383333921432495,
-1.295845866203308,
-1.4974141120910645,
0.6253731846809387,
0.7169758677482605,
0.5239682197570801,
-0.06557092815637589,
1.0094407796859741,
-0.9305133819580078,
0.7325199246406555,
-0.9915785789489746,
-1.7958225011825562,
-1.4286366701126099,
-2.244459629058838,
-2.317615270614624,
0.7857794165611267,
-0.42919421195983887,
-0.41912907361984253,
2.034794330596924,
-1.0528682470321655,
-1.7561686038970947,
1.0841411352157593,
0.2863592505455017,
0.0017562182620167732,
2.3358778953552246,
0.22639483213424683,
-0.7319625020027161,
0.45095300674438477,
-0.7851600050926208,
0.6512941718101501,
-0.253587007522583,
1.4163273572921753,
0.47283315658569336,
-1.1112879514694214,
1.5880290269851685,
-0.4539475440979004,
0.5975972414016724,
-0.6559860110282898,
-0.5316250324249268,
-0.7313364744186401,
0.2784567177295685,
1.9208492040634155,
-0.28569355607032776,
1.565767765045166,
-0.31680259108543396,
-1.562325119972229,
-1.680937647819519,
0.8489705324172974,
0.5328235030174255,
-0.6813284158706665,
0.006836912594735622,
-0.26149189472198486,
0.07493047416210175,
0.011849590577185154,
1.1346840858459473,
1.2232637405395508,
0.8210591077804565,
-0.3392937481403351,
-0.8240654468536377,
0.21232445538043976,
-0.0045210979878902435,
-0.8130810260772705,
-1.8016045093536377,
-0.3972504436969757,
0.19634777307510376,
0.6757229566574097,
-1.1900051832199097,
1.6375010013580322,
0.8350955843925476,
1.8901797533035278,
1.137919545173645,
-0.3532070517539978,
1.5243797302246094,
0.03927096724510193,
1.8280925750732422,
-0.45416244864463806,
0.7331193685531616,
-0.3729773759841919,
-1.1088180541992188,
0.8072832226753235,
-0.28679388761520386,
-2.1397297382354736,
-0.7310956716537476,
-0.8423587083816528,
-0.11487677693367004,
-0.6885330080986023,
0.961431622505188,
-0.17175541818141937,
-1.4054349660873413,
0.23801878094673157,
-0.7024640440940857,
-0.0004119453951716423,
-1.1991705894470215,
0.3161187171936035,
0.8211715221405029,
-0.6618260741233826,
0.024369120597839355,
-0.21556377410888672,
-1.3141180276870728,
-0.4063495993614197,
0.23996786773204803,
1.7960790395736694,
-0.8058764338493347,
0.8997483849525452,
1.0150642395019531,
-0.7747582793235779,
0.03138938173651695,
0.3792303800582886,
-0.27566778659820557,
0.8773720264434814,
-0.9314838647842407,
-0.3583315312862396,
1.1698241233825684,
-0.1793796569108963,
-0.640442967414856,
1.4962955713272095,
0.7111960649490356,
-0.897050142288208,
-0.12465380877256393,
-0.18733081221580505,
-0.7669458985328674,
0.01565835252404213,
-1.610121250152588,
-0.17720100283622742,
0.3204897344112396,
-1.5925467014312744,
-0.5074684023857117,
-0.2105553299188614,
1.3943939208984375,
-0.1641523689031601,
1.3787555694580078,
-0.2876857817173004,
-0.2531444728374481,
-0.4357756972312927,
-0.39477238059043884,
0.15648825466632843,
-0.19098040461540222,
-0.68623286485672,
0.29947590827941895,
-0.8289360404014587,
0.34062233567237854,
1.3853272199630737,
0.38729041814804077,
0.0819023922085762,
0.5592175126075745,
1.0695886611938477,
0.33186236023902893,
-0.08620383590459824,
-0.8668213486671448,
-1.6576266288757324,
2.025974988937378,
-1.3698394298553467,
2.073096990585327,
0.653328001499176,
-0.07331965118646622,
-1.757546067237854,
-1.9674770832061768,
1.4735922813415527,
1.0484780073165894,
2.306612491607666,
0.5875880122184753,
0.422946572303772,
-0.8371459245681763,
-0.608258068561554,
0.35966041684150696,
-0.9762618541717529,
-0.8185344338417053,
0.1228674128651619,
2.340956211090088,
1.6434504985809326,
-0.5801678895950317,
-0.15696334838867188,
-1.1374667882919312,
1.4250003099441528,
-0.11355666071176529,
0.16318710148334503,
2.0147783756256104,
-0.26765674352645874,
-1.1111366748809814,
1.343513011932373,
-2.241772413253784,
0.10646452754735947,
1.976263403892517,
0.257671594619751,
0.00611129030585289,
-1.4559710025787354,
-0.6764596700668335,
-0.270590603351593,
-0.49845266342163086,
-1.2344744205474854,
0.6281673908233643,
-0.2440284937620163,
-0.8347145318984985,
-1.4315978288650513,
0.08392605930566788,
-1.137398600578308,
-1.6481140851974487,
0.23645520210266113,
1.9076669216156006,
1.9060139656066895,
-0.7557535171508789,
1.5508744716644287,
-0.2923728823661804,
0.1420111358165741,
1.240378499031067,
1.240818738937378,
3.1477720737457275,
1.9618804454803467,
-1.245955228805542,
0.7637926936149597,
-0.1496143788099289,
-0.49517199397087097,
1.1470736265182495,
-1.1412179470062256,
1.3278244733810425,
-0.18637029826641083,
-1.1872482299804688,
-1.2073558568954468,
0.9550169110298157,
0.521594226360321,
0.03837721794843674,
-0.5217024087905884,
1.2485100030899048,
0.010426373220980167,
1.3021893501281738,
0.45632705092430115,
-0.23161686956882477,
0.6262142062187195,
-0.440078467130661,
-0.5580183267593384,
1.5327636003494263,
0.2286984622478485,
-1.403123378753662,
-2.3275506496429443,
-0.22225461900234222,
-0.8249917030334473,
-0.04119350016117096,
-0.5343686938285828,
-0.9421499371528625,
1.7228580713272095,
0.4597245752811432,
-1.2547669410705566,
-0.20911970734596252,
-0.3845631778240204,
-0.6294786334037781,
2.7109432220458984,
-1.409240961074829,
-0.13922132551670074,
-0.9972206354141235,
-0.5833756327629089,
1.5410641431808472,
-1.219996690750122,
-0.07375792413949966,
-0.9375500082969666,
-0.5884702801704407,
-1.38560950756073,
-0.6174705028533936,
0.027811437845230103,
-0.9615081548690796,
0.8172007203102112,
0.1920633465051651,
-1.1987861394882202,
-0.42905765771865845,
-0.9181503653526306,
0.8634943962097168,
-0.05964779481291771,
0.290987104177475,
1.99954354763031,
0.42540377378463745,
-0.36433976888656616,
0.5875475406646729,
1.1216135025024414,
0.6700460910797119,
-0.5972611904144287,
0.3315528333187103,
-0.7292643189430237,
0.344167560338974,
-1.2950241565704346,
0.1705070436000824,
-2.87404465675354,
0.6816205978393555,
0.030497662723064423,
-0.055403389036655426,
0.016376983374357224,
-1.2105339765548706,
1.078096628189087,
2.646012783050537,
-1.212478518486023,
0.45555004477500916,
0.2930315136909485,
1.0968905687332153,
-1.4103962182998657,
0.35681819915771484,
-0.368225634098053,
2.1041624546051025,
0.13588076829910278,
1.2450835704803467,
-0.43580546975135803,
-2.159034490585327,
0.6756519079208374,
-1.2112019062042236,
-1.208837628364563,
0.8408003449440002,
-0.8333787322044373,
-0.00008677318692207336,
-1.3657780885696411,
-0.18409447371959686,
-0.8934891819953918,
-1.224980115890503,
0.746687114238739,
0.16271677613258362,
0.4868466556072235,
-0.5899252891540527,
0.42821985483169556,
-2.2074007987976074,
-1.4215316772460938,
-0.25337061285972595,
-1.005197525024414,
0.5215889811515808,
-0.2073102444410324,
0.688625156879425,
-0.17004890739917755,
-0.003333402331918478,
0.3976854681968689,
1.4006526470184326,
3.308396100997925,
0.08989797532558441,
0.3616957366466522,
-0.14478714764118195,
-1.0314722061157227,
1.4468598365783691,
0.9077663421630859,
-0.20506353676319122,
-0.49540579319000244,
-1.0424381494522095,
1.21225106716156,
1.9695292711257935,
1.0551952123641968,
-0.014861083589494228,
-0.902437686920166,
-0.7960871458053589,
0.1321098506450653,
0.15018896758556366,
0.46476298570632935,
0.8734659552574158,
0.0337163545191288,
0.10710002481937408,
1.4548685550689697,
1.2755261659622192,
-0.38710901141166687,
0.4244377613067627,
-0.8743736743927002,
-0.4852924942970276,
0.5581010580062866,
0.35175737738609314,
0.11519376188516617,
0.3880717158317566,
-1.046913743019104,
-0.20754919946193695,
-0.2721714675426483,
-0.9421903491020203,
-0.7136027812957764,
-0.5479401350021362,
-0.384956032037735,
1.6066663265228271,
0.08861733973026276,
-0.4969363510608673,
-0.017697308212518692,
-0.7903269529342651,
-0.04849383607506752,
-0.9017908573150635,
0.3077372610569,
-0.10559424757957458,
-0.1291094422340393,
-0.18114279210567474,
1.7397534847259521,
-1.0326900482177734,
-1.9988871812820435,
0.30933085083961487,
0.24911156296730042,
-0.4440588355064392,
0.2859896421432495,
1.539156198501587,
0.6152965426445007,
1.4519262313842773,
1.3253462314605713,
0.9214829802513123,
-0.6397659182548523,
-1.3971621990203857,
0.5812815427780151,
1.0048271417617798,
-1.3958381414413452,
0.8099832534790039,
0.08737308531999588,
-0.5186830163002014,
0.6639744639396667,
1.253082036972046,
0.4140496253967285,
-1.964847207069397,
0.7129683494567871,
-0.76915043592453,
0.7162495255470276,
0.6277339458465576,
0.7428514957427979,
0.13045509159564972,
0.7796899676322937,
-1.2974554300308228,
-1.0775318145751953,
-0.6557151079177856,
-0.6936873197555542,
1.9453198909759521,
-0.15572936832904816,
0.5801095962524414,
-0.16367889940738678,
-1.331194281578064,
-0.18315669894218445,
0.5929530262947083,
0.4269002676010132,
-0.47336429357528687,
0.784220814704895,
-0.6291982531547546,
-1.1527289152145386,
-1.3641514778137207,
-0.4674896001815796,
-1.0235987901687622,
-0.8338100910186768,
1.0234874486923218,
0.877011775970459,
0.3497050106525421,
1.860004186630249,
0.5032109022140503,
0.24985897541046143,
-2.7562739849090576,
0.9137677550315857,
0.2871340811252594,
-0.07647722214460373,
0.8190352916717529,
0.26731887459754944,
0.9723237156867981,
-0.1926780641078949,
0.660886287689209,
-2.2794227600097656,
2.3595054149627686,
-0.27141866087913513,
0.650831401348114,
0.009051227010786533,
-0.06813943386077881,
1.0141030550003052,
0.5754255056381226,
0.6695387959480286,
-1.1259320974349976,
0.6514348387718201,
-0.6337980031967163,
1.2351206541061401,
0.9397114515304565,
-0.8131557703018188,
-0.1369362324476242,
1.322832465171814,
0.5319169759750366,
-0.42844751477241516,
-0.9374509453773499,
-0.9766095876693726,
0.8990343809127808,
1.7829011678695679,
-0.07987582683563232,
0.030316568911075592,
0.8874363899230957,
0.6119386553764343,
-1.4011598825454712,
0.07183533906936646,
-0.8304741978645325,
-0.6560331583023071,
1.5756723880767822,
2.128662347793579,
-0.06278238445520401,
-0.14781446754932404,
-0.7179650664329529,
-1.111188530921936,
0.8046378493309021,
0.03453410416841507,
0.14183294773101807,
0.6613051891326904,
-0.5676953792572021,
1.1568286418914795,
0.9244351387023926,
0.953522264957428,
0.2933139503002167,
0.3795665502548218,
0.25865423679351807,
-0.2527311146259308,
-1.219504475593567,
-0.29821813106536865,
-0.9877105951309204,
-2.5553667545318604,
0.45380279421806335,
-0.22070366144180298,
-1.3636027574539185,
-0.04512059688568115,
-1.0139573812484741,
0.7819650769233704,
-0.520683765411377,
-1.1077316999435425,
-1.4889556169509888,
0.2279190719127655,
0.0026789652183651924,
0.8818510174751282,
-1.6487029790878296,
-0.007661482319235802,
1.3531743288040161,
1.0696243047714233,
-0.6630396246910095,
0.974219024181366,
0.2892628610134125,
1.0692952871322632,
0.8583242297172546,
-0.38458287715911865,
0.5038570761680603,
0.05937077850103378,
-1.2673745155334473,
0.4386763274669647,
1.101233720779419,
0.19817222654819489,
1.4380673170089722,
-0.6393161416053772,
0.08135986328125,
0.4594549536705017,
-0.5124380588531494,
-0.3913489878177643,
-0.6377145051956177,
0.6656923890113831,
0.20161156356334686,
-0.9128798842430115,
0.024126708507537842,
-0.11277879029512405,
-0.035557229071855545,
0.1766599714756012,
-1.4964721202850342,
-0.12595444917678833,
-0.258663147687912,
-0.6057941317558289,
-1.180135726928711,
-0.13385875523090363,
1.3901283740997314,
-0.8404018878936768,
-0.1560775488615036,
0.49630454182624817,
0.3650343716144562,
0.599186360836029,
0.630365788936615,
-0.7130968570709229,
-0.38931795954704285,
-0.3380599021911621,
-0.27706071734428406,
0.26278039813041687,
1.3308991193771362,
-0.2067355513572693,
-0.9781128168106079,
0.8073805570602417,
-0.40553808212280273,
0.03402237221598625,
1.874250054359436,
0.017216026782989502,
-0.8332473039627075,
0.3154171407222748,
-0.6890989542007446,
1.8301326036453247,
1.753551959991455,
1.331087350845337,
-0.06822455674409866,
-0.9848116040229797,
0.5396098494529724,
-0.355248361825943,
-0.4116845726966858,
0.8888238072395325,
0.4169122278690338,
-0.20447584986686707,
-1.3262944221496582,
0.6245972514152527,
1.3314588069915771,
-0.9691404104232788,
-0.8384606242179871,
0.046224869787693024,
-0.819298267364502,
1.0247912406921387,
0.7871392369270325,
0.38490286469459534,
0.29858988523483276,
1.5360183715820312,
0.7908125519752502,
-0.4419154226779938,
0.49686524271965027,
0.4406319558620453,
-0.21316877007484436,
-2.0392253398895264,
-1.1641077995300293,
0.30528655648231506,
-0.5197575688362122,
-1.6092389822006226,
1.342990517616272,
-1.2209911346435547,
-0.9289231896400452,
0.5226302146911621,
0.024279244244098663,
1.4948956966400146,
0.3347746431827545,
1.5775095224380493,
2.0138306617736816,
0.9338588714599609,
0.3091825842857361,
1.4448972940444946,
-0.18139410018920898,
-0.43729016184806824,
1.7947442531585693,
-0.5053672194480896,
0.5028380751609802,
1.0733914375305176,
-0.28754207491874695,
-0.9035252332687378,
-0.8987494707107544,
-1.260630488395691,
-0.6834651827812195,
1.1476712226867676,
0.11531151086091995,
-1.0913015604019165,
0.19407372176647186,
1.5484415292739868,
0.03832024335861206,
-0.2902161180973053,
0.6719686388969421,
0.42567378282546997,
-0.7983369827270508,
-0.0999215692281723,
-0.9127235412597656,
0.547447681427002,
-0.2682836055755615,
-0.41066035628318787,
0.29959776997566223,
0.3268890380859375,
1.2661019563674927,
-0.02918141707777977,
0.08758121728897095,
1.188159465789795,
-1.3496520519256592,
1.4977376461029053,
-0.6554059982299805,
0.2631293833255768,
-2.4497740268707275,
1.3917638063430786,
-0.7742740511894226,
1.9151161909103394,
-2.6655452251434326,
0.48120415210723877,
-0.5151059627532959,
-0.4564075469970703,
0.3151206374168396,
-0.39542078971862793,
0.21267558634281158,
-0.18307194113731384,
-1.1297181844711304,
-0.16007214784622192,
-0.7803488969802856,
0.5057149529457092,
1.0229750871658325,
1.3999254703521729,
-1.1169041395187378,
-0.2588641941547394,
-1.783664584159851,
-0.20243962109088898,
-0.6811363697052002,
0.4689066410064697,
-1.953751802444458,
-0.22719623148441315,
-1.8580867052078247,
-2.4967215061187744,
-1.323074460029602,
-0.7953176498413086,
1.1027162075042725,
-0.027960777282714844,
-0.866849958896637,
1.0948024988174438,
-0.35759490728378296,
-1.9390605688095093,
1.1212060451507568,
-2.173128604888916
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
I just checked on conda at https://anaconda.org/HuggingFace/datasets/files
and everything looks fine, I got
```python
f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing."
```
as expected in features.py line 1760 (notice the "int()") to not have the TypeError.
From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel
edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 70 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
I just checked on conda at https://anaconda.org/HuggingFace/datasets/files
and everything looks fine, I got
```python
f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing."
```
as expected in features.py line 1760 (notice the "int()") to not have the TypeError.
From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel
edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well
|
[
-1.1509339809417725,
-0.919567346572876,
-0.776763916015625,
1.4301351308822632,
-0.14443561434745789,
-1.3198052644729614,
0.10859495401382446,
-1.1645647287368774,
1.7269237041473389,
-0.7640339732170105,
0.315082311630249,
-1.7467060089111328,
0.035089846700429916,
-0.5291357636451721,
-0.8539162278175354,
-0.9238592386245728,
-0.43737491965293884,
-0.7785645723342896,
0.9528005719184875,
2.5345840454101562,
1.224725365638733,
-1.3341659307479858,
2.6939139366149902,
0.7262681126594543,
-0.10305573791265488,
-0.9939939379692078,
0.5370916128158569,
-0.03143231198191643,
-1.333693027496338,
-0.415813148021698,
-0.9453991055488586,
-0.06800400465726852,
-0.5962425470352173,
-0.5836552381515503,
0.046415064483881,
0.3527418375015259,
-0.3676029145717621,
-0.48321837186813354,
-0.6121104955673218,
-0.8105453848838806,
0.42976805567741394,
-0.38795915246009827,
0.9532531499862671,
-0.40948787331581116,
1.8603614568710327,
-0.5125409364700317,
0.4119497239589691,
0.728808581829071,
1.3000532388687134,
0.22442959249019623,
0.13390879333019257,
0.23060747981071472,
0.4418099820613861,
0.004610464908182621,
0.4972664713859558,
1.2235631942749023,
0.6401890516281128,
0.5248770713806152,
0.7230772376060486,
-2.215491771697998,
1.3030122518539429,
-1.0093704462051392,
0.303195059299469,
1.3134115934371948,
-0.9021308422088623,
0.30709606409072876,
-1.7812764644622803,
-0.05301743373274803,
0.561805009841919,
-2.274458169937134,
0.172382652759552,
-1.3750790357589722,
-0.456068754196167,
1.0431865453720093,
0.3349936008453369,
-1.2058087587356567,
0.23015882074832916,
-0.36987224221229553,
0.9842579960823059,
0.4920234680175781,
1.2049235105514526,
-1.6903445720672607,
0.0011294027790427208,
-0.3782980442047119,
0.1332242637872696,
-1.2422782182693481,
-1.5361043214797974,
0.6064910292625427,
0.7214928269386292,
0.5389851331710815,
-0.12946560978889465,
1.0468732118606567,
-0.9420903921127319,
0.7639162540435791,
-0.9771067500114441,
-1.8025754690170288,
-1.410666584968567,
-2.1964285373687744,
-2.2772035598754883,
0.7915428280830383,
-0.4434727430343628,
-0.4370313286781311,
2.036588191986084,
-1.017179250717163,
-1.793817162513733,
1.0311219692230225,
0.29540207982063293,
0.022333219647407532,
2.2871391773223877,
0.21766811609268188,
-0.7527059316635132,
0.47085443139076233,
-0.7081695199012756,
0.6499767303466797,
-0.27229219675064087,
1.388176679611206,
0.4468560218811035,
-1.0815770626068115,
1.5876598358154297,
-0.4135425388813019,
0.6100739240646362,
-0.6870821714401245,
-0.5277690887451172,
-0.6937443017959595,
0.2822044789791107,
1.9191770553588867,
-0.3587755262851715,
1.5444631576538086,
-0.30555546283721924,
-1.5826694965362549,
-1.6716703176498413,
0.8149804472923279,
0.562578022480011,
-0.6985858082771301,
-0.024827685207128525,
-0.30123430490493774,
0.08200047165155411,
0.005032540298998356,
1.1354221105575562,
1.203860878944397,
0.8056057095527649,
-0.32360050082206726,
-0.807232141494751,
0.2113923728466034,
0.04915682226419449,
-0.7980647087097168,
-1.7696400880813599,
-0.3818243443965912,
0.22842195630073547,
0.614450991153717,
-1.1816298961639404,
1.6618859767913818,
0.8672996759414673,
1.9223699569702148,
1.12881338596344,
-0.32596108317375183,
1.5754038095474243,
0.04841994866728783,
1.8166065216064453,
-0.4454880654811859,
0.6785550117492676,
-0.334440141916275,
-1.1470575332641602,
0.821228563785553,
-0.32859089970588684,
-2.1073248386383057,
-0.6721360087394714,
-0.8132672309875488,
-0.08961410820484161,
-0.6965780258178711,
0.9395183324813843,
-0.20702219009399414,
-1.4094692468643188,
0.18725861608982086,
-0.7029775977134705,
0.005028543993830681,
-1.1872763633728027,
0.25365686416625977,
0.7601794600486755,
-0.7041987776756287,
0.05654345825314522,
-0.20607903599739075,
-1.3019479513168335,
-0.4268765151500702,
0.2589220702648163,
1.8081125020980835,
-0.8047783970832825,
0.8828141689300537,
1.057893991470337,
-0.7782590389251709,
0.06377832591533661,
0.3921898901462555,
-0.30980271100997925,
0.8731677532196045,
-1.0028537511825562,
-0.3602554202079773,
1.1672040224075317,
-0.14131984114646912,
-0.621671736240387,
1.4705690145492554,
0.7087746262550354,
-0.9423243999481201,
-0.18176165223121643,
-0.12478040903806686,
-0.8159192800521851,
0.03362228348851204,
-1.560957431793213,
-0.15818065404891968,
0.3079007565975189,
-1.5964750051498413,
-0.5144287347793579,
-0.2488735467195511,
1.3456188440322876,
-0.15185007452964783,
1.375822901725769,
-0.27302491664886475,
-0.21527603268623352,
-0.3812313377857208,
-0.37803706526756287,
0.1179501935839653,
-0.21457350254058838,
-0.6624972820281982,
0.2781909704208374,
-0.8183659315109253,
0.3418721854686737,
1.426552653312683,
0.3714786171913147,
0.0639396458864212,
0.5465332269668579,
1.097411870956421,
0.3792579174041748,
-0.07870593667030334,
-0.8419371247291565,
-1.6147416830062866,
2.0156984329223633,
-1.3860805034637451,
2.0525593757629395,
0.6972682476043701,
-0.015913397073745728,
-1.7655141353607178,
-1.9764643907546997,
1.4471975564956665,
1.0409427881240845,
2.375044822692871,
0.5792655944824219,
0.41225963830947876,
-0.8032651543617249,
-0.617742657661438,
0.39744168519973755,
-0.9529069066047668,
-0.7886757850646973,
0.1366194635629654,
2.3381381034851074,
1.7104109525680542,
-0.541415274143219,
-0.23071947693824768,
-1.0816335678100586,
1.420117974281311,
-0.14128759503364563,
0.1527407169342041,
2.0023460388183594,
-0.24416375160217285,
-1.070406198501587,
1.3747332096099854,
-2.2551684379577637,
0.11591262370347977,
1.9526890516281128,
0.24147553741931915,
0.033184029161930084,
-1.455029010772705,
-0.6516209840774536,
-0.268485963344574,
-0.5332503914833069,
-1.278032898902893,
0.5771562457084656,
-0.27478471398353577,
-0.860920786857605,
-1.440076470375061,
0.10430238395929337,
-1.1398017406463623,
-1.6778484582901,
0.26946666836738586,
1.9332668781280518,
1.9138398170471191,
-0.7491016983985901,
1.5873175859451294,
-0.3109108507633209,
0.13829879462718964,
1.2588794231414795,
1.2655565738677979,
3.1826608180999756,
1.8787927627563477,
-1.2837145328521729,
0.7451860308647156,
-0.15006418526172638,
-0.48828497529029846,
1.1518579721450806,
-1.1431995630264282,
1.290090799331665,
-0.21324743330478668,
-1.2079647779464722,
-1.2017251253128052,
0.9737259149551392,
0.553617000579834,
0.03764376416802406,
-0.48650211095809937,
1.2286319732666016,
0.024877775460481644,
1.2529535293579102,
0.47965729236602783,
-0.3275071978569031,
0.6558630466461182,
-0.33959314227104187,
-0.5240218639373779,
1.4924778938293457,
0.22345085442066193,
-1.350599765777588,
-2.32494854927063,
-0.19429044425487518,
-0.8361296653747559,
-0.01770455203950405,
-0.6072801947593689,
-0.9412659406661987,
1.712605595588684,
0.4385282099246979,
-1.3062537908554077,
-0.19920843839645386,
-0.38381436467170715,
-0.5793747305870056,
2.6612322330474854,
-1.3789070844650269,
-0.1405092030763626,
-1.0047287940979004,
-0.5330318808555603,
1.5613791942596436,
-1.1806279420852661,
-0.1438402235507965,
-0.942950427532196,
-0.582879364490509,
-1.3699493408203125,
-0.6609010100364685,
0.06666049361228943,
-0.8943131566047668,
0.7857546806335449,
0.1778411567211151,
-1.1668128967285156,
-0.36446717381477356,
-0.9274212718009949,
0.9037082195281982,
-0.10799867659807205,
0.21178042888641357,
2.074144124984741,
0.40519997477531433,
-0.375220388174057,
0.6093665361404419,
1.121203064918518,
0.6470692157745361,
-0.604593813419342,
0.3267514407634735,
-0.7501997947692871,
0.31323686242103577,
-1.3754470348358154,
0.20108795166015625,
-2.8666880130767822,
0.679709255695343,
0.025594376027584076,
-0.03143737092614174,
0.03338085114955902,
-1.2592612504959106,
1.0378291606903076,
2.6939423084259033,
-1.177506923675537,
0.40612560510635376,
0.29003700613975525,
1.0948001146316528,
-1.4763480424880981,
0.3121536672115326,
-0.35548529028892517,
2.0671658515930176,
0.10967234522104263,
1.241882085800171,
-0.43064558506011963,
-2.178792715072632,
0.6724410653114319,
-1.2469148635864258,
-1.1824231147766113,
0.8345423936843872,
-0.8351529240608215,
0.024996887892484665,
-1.3970187902450562,
-0.18203774094581604,
-0.8782481551170349,
-1.185530424118042,
0.7416773438453674,
0.17501643300056458,
0.4834604561328888,
-0.6283880472183228,
0.4092159867286682,
-2.1186697483062744,
-1.3881964683532715,
-0.2402401566505432,
-0.9902247786521912,
0.5293283462524414,
-0.22381149232387543,
0.6376409530639648,
-0.17389507591724396,
-0.015450154431164265,
0.4156205356121063,
1.357337236404419,
3.346132755279541,
0.11971402913331985,
0.29426613450050354,
-0.1777629554271698,
-1.0392725467681885,
1.4285027980804443,
0.9028737545013428,
-0.2046019434928894,
-0.5213515758514404,
-1.0393027067184448,
1.222661018371582,
1.9839885234832764,
1.0660598278045654,
0.033485546708106995,
-0.9179149270057678,
-0.8485574126243591,
0.09441831707954407,
0.19893519580364227,
0.44565844535827637,
0.8660325407981873,
0.07543277740478516,
0.06962790340185165,
1.466475486755371,
1.2004295587539673,
-0.37659981846809387,
0.44837692379951477,
-0.8929702639579773,
-0.4774894118309021,
0.5082079768180847,
0.3355805277824402,
0.10757269710302353,
0.3535003364086151,
-1.0620453357696533,
-0.24291552603244781,
-0.34056639671325684,
-0.9112963676452637,
-0.7022371292114258,
-0.49492716789245605,
-0.3691519498825073,
1.625523567199707,
0.07466153055429459,
-0.5193889141082764,
-0.05344104766845703,
-0.7724786996841431,
-0.074257493019104,
-0.9161303639411926,
0.32237035036087036,
-0.09935294091701508,
-0.09261443465948105,
-0.16191256046295166,
1.6961698532104492,
-1.0111600160598755,
-1.9916667938232422,
0.2917381227016449,
0.19604818522930145,
-0.43953844904899597,
0.26969796419143677,
1.6005409955978394,
0.6565011143684387,
1.442507028579712,
1.3694339990615845,
0.9323156476020813,
-0.6244545578956604,
-1.365269422531128,
0.5831767320632935,
0.9862009286880493,
-1.392422080039978,
0.8228118419647217,
0.05056155100464821,
-0.5322439074516296,
0.6724840402603149,
1.2842729091644287,
0.4240160584449768,
-2.0105667114257812,
0.7310904264450073,
-0.7754663228988647,
0.7050694227218628,
0.6401711702346802,
0.735343337059021,
0.13127465546131134,
0.7557456493377686,
-1.2756515741348267,
-1.1320061683654785,
-0.6329333782196045,
-0.6853811144828796,
1.935636281967163,
-0.155344158411026,
0.5986114144325256,
-0.21901679039001465,
-1.3627614974975586,
-0.18837442994117737,
0.6057357788085938,
0.4265093505382538,
-0.5254360437393188,
0.7656931281089783,
-0.6610650420188904,
-1.0750279426574707,
-1.3442171812057495,
-0.44143494963645935,
-1.0561623573303223,
-0.8319788575172424,
0.995899498462677,
0.8608300685882568,
0.3902527391910553,
1.8995858430862427,
0.5522948503494263,
0.2827030420303345,
-2.718005657196045,
0.8770511746406555,
0.3064436614513397,
-0.12448990345001221,
0.8629480004310608,
0.2657461166381836,
0.9676535129547119,
-0.13281038403511047,
0.6381480097770691,
-2.2732746601104736,
2.3177032470703125,
-0.1953316628932953,
0.6391897797584534,
0.0049132611602544785,
-0.13788583874702454,
1.0478726625442505,
0.527798593044281,
0.6591055393218994,
-1.1101610660552979,
0.6644363403320312,
-0.6356914043426514,
1.216233491897583,
0.90525883436203,
-0.8532902002334595,
-0.11469722539186478,
1.3302514553070068,
0.5464927554130554,
-0.43099361658096313,
-0.9408882260322571,
-0.991743266582489,
0.8938814997673035,
1.7623299360275269,
-0.040622927248477936,
0.008271274156868458,
0.9217668175697327,
0.6316900253295898,
-1.3808019161224365,
0.07954074442386627,
-0.7727193832397461,
-0.6641958951950073,
1.6178817749023438,
2.074974536895752,
-0.11339452862739563,
-0.16984757781028748,
-0.7096862196922302,
-1.1170049905776978,
0.7993900179862976,
0.0016529671847820282,
0.09266863763332367,
0.6512042880058289,
-0.616600513458252,
1.198683738708496,
0.9290624260902405,
0.9425532221794128,
0.21747711300849915,
0.3665108382701874,
0.28707560896873474,
-0.3092503845691681,
-1.234314203262329,
-0.2799766957759857,
-0.9656559824943542,
-2.4893198013305664,
0.4751895070075989,
-0.1320347785949707,
-1.378862738609314,
-0.03643479198217392,
-1.0301790237426758,
0.814342737197876,
-0.5431360602378845,
-1.0987739562988281,
-1.4850633144378662,
0.27860915660858154,
-0.013588545843958855,
0.889590859413147,
-1.6083166599273682,
-0.033628612756729126,
1.2992545366287231,
1.05388343334198,
-0.6506821513175964,
0.9235274195671082,
0.27808138728141785,
1.0514227151870728,
0.8889229893684387,
-0.3983789384365082,
0.46322593092918396,
0.10265035927295685,
-1.2810953855514526,
0.4084221124649048,
1.1264573335647583,
0.20536912977695465,
1.4392061233520508,
-0.6275202631950378,
0.11489402502775192,
0.46326202154159546,
-0.5361309051513672,
-0.3979164659976959,
-0.6415692567825317,
0.6489721536636353,
0.12221788614988327,
-0.9247527122497559,
-0.02215971052646637,
-0.10024379938840866,
-0.09186969697475433,
0.18644678592681885,
-1.5055851936340332,
-0.1308327317237854,
-0.24782738089561462,
-0.5784236192703247,
-1.181908369064331,
-0.08249672502279282,
1.3702001571655273,
-0.8129852414131165,
-0.19408610463142395,
0.48638591170310974,
0.34049472212791443,
0.5548663139343262,
0.6180061101913452,
-0.7132599949836731,
-0.3491872549057007,
-0.302152544260025,
-0.3687414526939392,
0.2596181631088257,
1.349198579788208,
-0.17484407126903534,
-0.9896500706672668,
0.7877557277679443,
-0.46505287289619446,
0.024871505796909332,
1.90249502658844,
0.012888533063232899,
-0.8217340111732483,
0.3196800947189331,
-0.7104519009590149,
1.8635693788528442,
1.828320026397705,
1.3478076457977295,
-0.07010773569345474,
-0.9796318411827087,
0.5657573938369751,
-0.3892248570919037,
-0.40893125534057617,
0.9495490193367004,
0.371351957321167,
-0.2220011055469513,
-1.371706485748291,
0.5867423415184021,
1.3507835865020752,
-0.9512103796005249,
-0.8050013780593872,
0.05390717461705208,
-0.8031958937644958,
1.0573315620422363,
0.7727415561676025,
0.3545229732990265,
0.30491065979003906,
1.5125055313110352,
0.7725017070770264,
-0.37343382835388184,
0.5055401921272278,
0.4433700740337372,
-0.20215822756290436,
-2.066155433654785,
-1.138882040977478,
0.3242824673652649,
-0.48102498054504395,
-1.640336513519287,
1.3476897478103638,
-1.237032175064087,
-0.9546797871589661,
0.49918508529663086,
0.02456974983215332,
1.4698600769042969,
0.35165935754776,
1.5896944999694824,
2.063041925430298,
0.909186065196991,
0.2916809618473053,
1.3648160696029663,
-0.14417099952697754,
-0.3904932737350464,
1.7953732013702393,
-0.5183166861534119,
0.5510419011116028,
1.0056664943695068,
-0.284104585647583,
-0.9935548305511475,
-0.8812026977539062,
-1.270841360092163,
-0.7136724591255188,
1.1363825798034668,
0.0878283753991127,
-1.1307363510131836,
0.249062642455101,
1.5870633125305176,
0.045820482075214386,
-0.29820629954338074,
0.6891699433326721,
0.4004548192024231,
-0.7605680823326111,
-0.09544455260038376,
-0.8904497027397156,
0.5480560660362244,
-0.23931026458740234,
-0.3970266282558441,
0.32327598333358765,
0.3717952370643616,
1.2804619073867798,
-0.009243648499250412,
0.07601358741521835,
1.1935601234436035,
-1.3893957138061523,
1.5047346353530884,
-0.7324774861335754,
0.29377973079681396,
-2.4974820613861084,
1.4425394535064697,
-0.8232070207595825,
1.9291586875915527,
-2.639740467071533,
0.49808335304260254,
-0.4801483452320099,
-0.4662829041481018,
0.3024367392063141,
-0.3762298822402954,
0.19857898354530334,
-0.14871251583099365,
-1.110011100769043,
-0.10768219828605652,
-0.7540477514266968,
0.5786904096603394,
1.0623425245285034,
1.4126758575439453,
-1.1200073957443237,
-0.26735132932662964,
-1.8153084516525269,
-0.18703331053256989,
-0.6964722275733948,
0.3946332335472107,
-1.9352648258209229,
-0.2059166133403778,
-1.8544114828109741,
-2.5012428760528564,
-1.3441063165664673,
-0.7951806783676147,
1.0792278051376343,
0.048076082020998,
-0.872302234172821,
1.1397935152053833,
-0.39706867933273315,
-1.9590660333633423,
1.105046033859253,
-2.2198357582092285
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell
```python
import datasets; datasets.__version__
```
and
```
!which python
```
```python
import sys; sys.executable
```
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 37 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell
```python
import datasets; datasets.__version__
```
and
```
!which python
```
```python
import sys; sys.executable
```
|
[
-1.1121143102645874,
-0.9188764095306396,
-0.7429848909378052,
1.4759175777435303,
-0.17823047935962677,
-1.3194260597229004,
0.14361748099327087,
-1.1888262033462524,
1.8266671895980835,
-0.8005570769309998,
0.3374331593513489,
-1.7366091012954712,
0.02338600531220436,
-0.5286593437194824,
-0.8773322701454163,
-0.922289252281189,
-0.4578707218170166,
-0.7103415131568909,
0.9193387627601624,
2.477280855178833,
1.186637043952942,
-1.3053303956985474,
2.618299722671509,
0.657337486743927,
-0.11800756305456161,
-0.9776939749717712,
0.5405862331390381,
-0.026984643191099167,
-1.3096190690994263,
-0.39189469814300537,
-0.9152620434761047,
-0.06562328338623047,
-0.6173530220985413,
-0.6054130792617798,
0.022576071321964264,
0.4168475866317749,
-0.43292608857154846,
-0.5003864169120789,
-0.5200178027153015,
-0.8560064435005188,
0.35746386647224426,
-0.37070122361183167,
0.9652444124221802,
-0.4364679753780365,
1.8587926626205444,
-0.5228637456893921,
0.4419900178909302,
0.7961750626564026,
1.2843329906463623,
0.21302653849124908,
0.10847116261720657,
0.20913009345531464,
0.44955888390541077,
0.006185152567923069,
0.5048256516456604,
1.1654534339904785,
0.614865779876709,
0.5131744742393494,
0.6860476136207581,
-2.2854576110839844,
1.3214471340179443,
-1.0425362586975098,
0.2891382873058319,
1.3378708362579346,
-0.9249534606933594,
0.24338918924331665,
-1.7800880670547485,
0.008164727129042149,
0.5347713232040405,
-2.2783894538879395,
0.21185122430324554,
-1.409273386001587,
-0.4568118453025818,
1.0861092805862427,
0.3757818341255188,
-1.2302720546722412,
0.19111527502536774,
-0.24746444821357727,
1.0017638206481934,
0.5149071216583252,
1.1535369157791138,
-1.7382274866104126,
-0.034142594784498215,
-0.38514599204063416,
0.13194409012794495,
-1.2653852701187134,
-1.5218981504440308,
0.6008673310279846,
0.758798360824585,
0.5286734104156494,
-0.1122492253780365,
1.0720219612121582,
-0.9128311276435852,
0.7045531272888184,
-1.0176678895950317,
-1.846388578414917,
-1.3510305881500244,
-2.184187412261963,
-2.2953288555145264,
0.7606680989265442,
-0.4346626400947571,
-0.4194754362106323,
2.0687851905822754,
-1.0105469226837158,
-1.8182051181793213,
1.0482414960861206,
0.33122941851615906,
-0.009333183988928795,
2.2479121685028076,
0.22681154310703278,
-0.7244580984115601,
0.42478370666503906,
-0.7778651118278503,
0.6454116702079773,
-0.27639254927635193,
1.389519453048706,
0.49010345339775085,
-1.1645708084106445,
1.5309792757034302,
-0.4182683229446411,
0.6460139155387878,
-0.6778420209884644,
-0.506804347038269,
-0.6630734801292419,
0.3156861662864685,
1.9354747533798218,
-0.3191714882850647,
1.4961193799972534,
-0.32109323143959045,
-1.5849337577819824,
-1.6676666736602783,
0.8542191982269287,
0.5519540905952454,
-0.6430215835571289,
0.007438656874001026,
-0.2247646301984787,
0.10765474289655685,
-0.03713033348321915,
1.1601530313491821,
1.2145048379898071,
0.8388943076133728,
-0.33144935965538025,
-0.7777097821235657,
0.2093728929758072,
0.019971564412117004,
-0.8040564060211182,
-1.7792402505874634,
-0.37247398495674133,
0.21030433475971222,
0.6088493466377258,
-1.1383998394012451,
1.6756483316421509,
0.8390178680419922,
1.915551781654358,
1.0999621152877808,
-0.3043491244316101,
1.5474954843521118,
0.05319063737988472,
1.8451998233795166,
-0.4266589283943176,
0.6903785467147827,
-0.3608193099498749,
-1.1183594465255737,
0.8539712429046631,
-0.2712472975254059,
-2.089792490005493,
-0.696490466594696,
-0.8711591958999634,
-0.09274326264858246,
-0.6501713395118713,
0.9425143003463745,
-0.16992314159870148,
-1.446707844734192,
0.1809506118297577,
-0.7197993397712708,
-0.003595976624637842,
-1.1627726554870605,
0.2942160964012146,
0.8027910590171814,
-0.683838963508606,
0.05185651034116745,
-0.23446711897850037,
-1.2907527685165405,
-0.4405304789543152,
0.3003719449043274,
1.8284295797348022,
-0.780478298664093,
0.9410578608512878,
1.057671308517456,
-0.8166559338569641,
0.02281535044312477,
0.3362155556678772,
-0.27508920431137085,
0.8717032670974731,
-0.9919388890266418,
-0.36312052607536316,
1.1610872745513916,
-0.1405426263809204,
-0.6830069422721863,
1.5228559970855713,
0.6926555633544922,
-0.9418773651123047,
-0.10269686579704285,
-0.20675453543663025,
-0.7563951015472412,
0.06502236425876617,
-1.5888751745224,
-0.1331425905227661,
0.35480666160583496,
-1.5755629539489746,
-0.5100385546684265,
-0.23802495002746582,
1.3790147304534912,
-0.1921822428703308,
1.3628168106079102,
-0.2312210202217102,
-0.23551179468631744,
-0.4284029006958008,
-0.3839576840400696,
0.09394224733114243,
-0.21658293902873993,
-0.6946881413459778,
0.29572126269340515,
-0.7544858455657959,
0.37783804535865784,
1.3753929138183594,
0.2971437871456146,
0.047042734920978546,
0.5313010811805725,
1.108876347541809,
0.31915348768234253,
-0.06659731268882751,
-0.9024195671081543,
-1.6328234672546387,
1.9928696155548096,
-1.3802094459533691,
2.0411393642425537,
0.6056209802627563,
-0.0015146918594837189,
-1.7413010597229004,
-1.9989190101623535,
1.5202373266220093,
1.0527153015136719,
2.3312933444976807,
0.6254602074623108,
0.3913430869579315,
-0.8325148224830627,
-0.6016578674316406,
0.38783887028694153,
-0.9558201432228088,
-0.7643278241157532,
0.1267080157995224,
2.3220202922821045,
1.6448543071746826,
-0.547958254814148,
-0.22504521906375885,
-1.1044645309448242,
1.4819422960281372,
-0.10033120959997177,
0.1768171787261963,
1.9984288215637207,
-0.23642869293689728,
-1.091897964477539,
1.3065731525421143,
-2.2268383502960205,
0.11125297099351883,
1.996671438217163,
0.20079877972602844,
0.041452862322330475,
-1.475563406944275,
-0.6735813021659851,
-0.27691400051116943,
-0.5063744783401489,
-1.2782891988754272,
0.5926310420036316,
-0.21573799848556519,
-0.7914677262306213,
-1.4158364534378052,
0.1987813413143158,
-1.1003259420394897,
-1.659530520439148,
0.19829310476779938,
1.978600263595581,
1.8641661405563354,
-0.7496036887168884,
1.6046513319015503,
-0.31437185406684875,
0.17820768058300018,
1.2985771894454956,
1.2322551012039185,
3.1654045581817627,
1.955841302871704,
-1.2547705173492432,
0.7694737315177917,
-0.13893578946590424,
-0.4765850305557251,
1.222415804862976,
-1.14482843875885,
1.2925163507461548,
-0.19164180755615234,
-1.1615042686462402,
-1.2463268041610718,
0.9216638207435608,
0.5640525221824646,
0.045060962438583374,
-0.5144701600074768,
1.2125087976455688,
0.030389536172151566,
1.2813334465026855,
0.46525272727012634,
-0.2727394700050354,
0.6988106369972229,
-0.42288827896118164,
-0.5192340612411499,
1.525380253791809,
0.25145864486694336,
-1.27912175655365,
-2.3007805347442627,
-0.18164390325546265,
-0.8671499490737915,
0.00046335160732269287,
-0.5299458503723145,
-0.8986916542053223,
1.7152312994003296,
0.46336954832077026,
-1.2845256328582764,
-0.15571558475494385,
-0.3860480487346649,
-0.616445779800415,
2.688917875289917,
-1.3683284521102905,
-0.1199362576007843,
-1.0442324876785278,
-0.5869309902191162,
1.5853945016860962,
-1.2294217348098755,
-0.1366681307554245,
-0.9575051665306091,
-0.5470833778381348,
-1.3688862323760986,
-0.6495727300643921,
0.03263852745294571,
-0.9036163687705994,
0.862808883190155,
0.17265817523002625,
-1.2498828172683716,
-0.44883912801742554,
-0.9304587244987488,
0.8838656544685364,
-0.091568723320961,
0.2337092161178589,
2.0032546520233154,
0.40655437111854553,
-0.36208269000053406,
0.6031021475791931,
1.0399812459945679,
0.6503438353538513,
-0.560486912727356,
0.4423246681690216,
-0.7164044380187988,
0.3127768337726593,
-1.336180567741394,
0.1839328110218048,
-2.89007568359375,
0.6590166687965393,
0.034205179661512375,
-0.014417079277336597,
-0.004618102218955755,
-1.2564316987991333,
1.0522722005844116,
2.6527092456817627,
-1.2238271236419678,
0.44081416726112366,
0.28095585107803345,
1.1022875308990479,
-1.4158258438110352,
0.34114745259284973,
-0.35608068108558655,
2.0899741649627686,
0.09517563134431839,
1.2651054859161377,
-0.3910999298095703,
-2.192505359649658,
0.6353398561477661,
-1.2274292707443237,
-1.2264283895492554,
0.8429282903671265,
-0.7687364220619202,
-0.03428896516561508,
-1.3328564167022705,
-0.2209334522485733,
-0.8601347208023071,
-1.2382135391235352,
0.7950055003166199,
0.14109757542610168,
0.4953378140926361,
-0.6240408420562744,
0.45304253697395325,
-2.134286880493164,
-1.3889504671096802,
-0.2922677993774414,
-0.9961156845092773,
0.5008689761161804,
-0.18550312519073486,
0.629823625087738,
-0.1671580821275711,
0.0004428960382938385,
0.3962908387184143,
1.3704485893249512,
3.3678700923919678,
0.09357540309429169,
0.3365846276283264,
-0.15357182919979095,
-1.0169883966445923,
1.3889422416687012,
0.9422266483306885,
-0.19790291786193848,
-0.4930843114852905,
-1.087133765220642,
1.178743600845337,
1.9751743078231812,
1.0290167331695557,
-0.0025769025087356567,
-0.9070044159889221,
-0.8732037544250488,
0.1019970029592514,
0.1049017459154129,
0.4582741856575012,
0.7867252230644226,
0.1387539803981781,
0.10763761401176453,
1.3766800165176392,
1.2267321348190308,
-0.34441664814949036,
0.42895635962486267,
-0.8814361095428467,
-0.4575518071651459,
0.5499929785728455,
0.38175857067108154,
0.12182630598545074,
0.31035247445106506,
-1.0452767610549927,
-0.20491130650043488,
-0.3027718663215637,
-0.9222733974456787,
-0.7145757675170898,
-0.5636454224586487,
-0.36677369475364685,
1.633070707321167,
0.03697133809328079,
-0.49869582056999207,
-0.03894392028450966,
-0.7711249589920044,
0.016816120594739914,
-0.9113950133323669,
0.3138849437236786,
-0.1424926370382309,
-0.12020891904830933,
-0.16004520654678345,
1.7043671607971191,
-1.0252898931503296,
-1.9571382999420166,
0.3203795254230499,
0.2144106775522232,
-0.46949923038482666,
0.28390899300575256,
1.534101128578186,
0.6643276810646057,
1.4229143857955933,
1.3666026592254639,
0.9753291010856628,
-0.6296922564506531,
-1.4112138748168945,
0.5609298348426819,
0.9873612523078918,
-1.407046914100647,
0.7835455536842346,
0.15695300698280334,
-0.4569956064224243,
0.6783490180969238,
1.2856770753860474,
0.4444645643234253,
-1.9917246103286743,
0.6573752164840698,
-0.7679259181022644,
0.6766535639762878,
0.6744878888130188,
0.7226514220237732,
0.11530083417892456,
0.7815290093421936,
-1.2532999515533447,
-1.108262538909912,
-0.6174681186676025,
-0.7144696712493896,
1.9048943519592285,
-0.20677253603935242,
0.5709947347640991,
-0.15693673491477966,
-1.3799399137496948,
-0.2232990860939026,
0.6391972303390503,
0.4868581295013428,
-0.5369523763656616,
0.7504528760910034,
-0.6397806406021118,
-1.0664159059524536,
-1.3455803394317627,
-0.48599156737327576,
-1.0504618883132935,
-0.8694530129432678,
0.9554991126060486,
0.9263858795166016,
0.39705854654312134,
1.8627210855484009,
0.5795296430587769,
0.25438007712364197,
-2.6970980167388916,
0.8723242282867432,
0.33070141077041626,
-0.08891810476779938,
0.7992520332336426,
0.2939620912075043,
0.9664081335067749,
-0.18116238713264465,
0.691456139087677,
-2.2695207595825195,
2.387281894683838,
-0.250033438205719,
0.6289560794830322,
0.012926102615892887,
-0.18393933773040771,
1.0224369764328003,
0.4776681959629059,
0.6493011116981506,
-1.1565741300582886,
0.6491953134536743,
-0.6681463718414307,
1.2333698272705078,
0.8805438876152039,
-0.8265250325202942,
-0.18361420929431915,
1.3172247409820557,
0.5250962376594543,
-0.4652985632419586,
-0.9281233549118042,
-1.064424991607666,
0.8922941088676453,
1.73464035987854,
-0.08799003064632416,
0.020667728036642075,
0.9450381398200989,
0.6396523118019104,
-1.3733339309692383,
0.08285389840602875,
-0.8362571597099304,
-0.6790619492530823,
1.5866950750350952,
2.069718599319458,
-0.1021263375878334,
-0.1604709029197693,
-0.8134763240814209,
-1.0749174356460571,
0.7800478339195251,
0.12482571601867676,
0.030977237969636917,
0.6184108853340149,
-0.558286190032959,
1.1841384172439575,
0.9617307782173157,
0.9600042104721069,
0.2597309947013855,
0.3956844210624695,
0.30228832364082336,
-0.3063007891178131,
-1.25791335105896,
-0.2978503704071045,
-0.9497417211532593,
-2.5783631801605225,
0.4701116681098938,
-0.15772925317287445,
-1.3580683469772339,
-0.09331779181957245,
-1.0503944158554077,
0.7745283246040344,
-0.5479459166526794,
-1.1824086904525757,
-1.474429965019226,
0.24262270331382751,
-0.02177524007856846,
0.8647438883781433,
-1.647533655166626,
0.014539702795445919,
1.3499672412872314,
1.085769534111023,
-0.7179495096206665,
0.9565120339393616,
0.23978032171726227,
1.0450201034545898,
0.9293571710586548,
-0.3674018681049347,
0.5298202037811279,
0.03689400851726532,
-1.2754840850830078,
0.4568057358264923,
1.0899505615234375,
0.16483034193515778,
1.41107976436615,
-0.6547427177429199,
0.0807366818189621,
0.44928860664367676,
-0.49833473563194275,
-0.4215659201145172,
-0.6906321048736572,
0.6937161684036255,
0.18594010174274445,
-0.8933939933776855,
0.10149265825748444,
-0.02316901832818985,
-0.02038469910621643,
0.19285443425178528,
-1.516013503074646,
-0.14762701094150543,
-0.19898980855941772,
-0.6241081953048706,
-1.1575647592544556,
-0.1478101760149002,
1.343755841255188,
-0.7756674289703369,
-0.2248229682445526,
0.4865760803222656,
0.32922297716140747,
0.5613883137702942,
0.5896639823913574,
-0.7065197229385376,
-0.36478114128112793,
-0.3774748146533966,
-0.31299978494644165,
0.31650978326797485,
1.370080828666687,
-0.12598088383674622,
-0.9614520072937012,
0.7862606644630432,
-0.4271531403064728,
0.024534866213798523,
1.8989689350128174,
0.0011716261506080627,
-0.8575073480606079,
0.33198973536491394,
-0.6999855637550354,
1.8494617938995361,
1.8177404403686523,
1.3299100399017334,
-0.021928803995251656,
-1.0644372701644897,
0.5633182525634766,
-0.3986974060535431,
-0.45115551352500916,
0.9712823033332825,
0.36698251962661743,
-0.21856631338596344,
-1.2835146188735962,
0.6312006711959839,
1.3624240159988403,
-0.9457610845565796,
-0.9099657535552979,
0.06843511760234833,
-0.8065464496612549,
0.9867624640464783,
0.7911887168884277,
0.3622400164604187,
0.3025193214416504,
1.519300937652588,
0.8122957348823547,
-0.3652321994304657,
0.510047435760498,
0.4185538589954376,
-0.19388557970523834,
-2.052586793899536,
-1.1969069242477417,
0.3421880006790161,
-0.5541595816612244,
-1.676579475402832,
1.3849409818649292,
-1.212267518043518,
-0.922435998916626,
0.49864956736564636,
0.006119392812252045,
1.4972937107086182,
0.33258143067359924,
1.5711439847946167,
2.028106689453125,
0.8964006900787354,
0.3272646367549896,
1.405164361000061,
-0.21143606305122375,
-0.47740891575813293,
1.8132648468017578,
-0.5859832763671875,
0.46653103828430176,
1.0884214639663696,
-0.2688934803009033,
-0.9469443559646606,
-0.9136829376220703,
-1.2610387802124023,
-0.6784037947654724,
1.1522231101989746,
0.10562899708747864,
-1.1044032573699951,
0.27004632353782654,
1.5660464763641357,
0.03866059333086014,
-0.2733577787876129,
0.7350170016288757,
0.3680962026119232,
-0.852901816368103,
-0.0695786252617836,
-0.9246145486831665,
0.5560546517372131,
-0.2148049771785736,
-0.3804352283477783,
0.3432513177394867,
0.3325963020324707,
1.2735259532928467,
-0.0004145205020904541,
0.09435765445232391,
1.1677225828170776,
-1.3575646877288818,
1.5136898756027222,
-0.6936498880386353,
0.3050863444805145,
-2.4530961513519287,
1.3777848482131958,
-0.8031205534934998,
1.8856977224349976,
-2.6773715019226074,
0.44634512066841125,
-0.48573818802833557,
-0.4498363137245178,
0.31788119673728943,
-0.37768352031707764,
0.19013075530529022,
-0.1923416554927826,
-1.1888198852539062,
-0.1592143326997757,
-0.7770819067955017,
0.5649538636207581,
1.0093404054641724,
1.4376033544540405,
-1.1469866037368774,
-0.24754366278648376,
-1.8339369297027588,
-0.12992794811725616,
-0.6531016826629639,
0.4818906784057617,
-1.9400739669799805,
-0.1951756328344345,
-1.8550070524215698,
-2.4846084117889404,
-1.2836967706680298,
-0.7724054455757141,
1.060915470123291,
-0.057165101170539856,
-0.8270598649978638,
1.0755561590194702,
-0.3592921793460846,
-1.9567985534667969,
1.1069655418395996,
-2.1665213108062744
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
Mmmm, just a potential clue:
Where are you running your Python code? Is it the Spyder IDE?
I have recently seen some users reporting conflicting Python environments while using Spyder...
Maybe related:
- #5487
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 34 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Mmmm, just a potential clue:
Where are you running your Python code? Is it the Spyder IDE?
I have recently seen some users reporting conflicting Python environments while using Spyder...
Maybe related:
- #5487
|
[
-1.164669394493103,
-0.9222587943077087,
-0.7590553760528564,
1.463395595550537,
-0.20731991529464722,
-1.2697645425796509,
0.071416936814785,
-1.1582248210906982,
1.7317662239074707,
-0.7659924626350403,
0.3236183822154999,
-1.733502984046936,
0.014324785210192204,
-0.5283750891685486,
-0.8344082832336426,
-0.9700902700424194,
-0.49475497007369995,
-0.73720383644104,
0.941684365272522,
2.5769197940826416,
1.1510026454925537,
-1.3228100538253784,
2.6427855491638184,
0.6899763941764832,
-0.07551579177379608,
-1.0276011228561401,
0.600635290145874,
-0.007707504555583,
-1.3193399906158447,
-0.3947407007217407,
-0.9388796091079712,
-0.09462618082761765,
-0.605153501033783,
-0.5565499663352966,
0.02634100615978241,
0.3349357545375824,
-0.3615206480026245,
-0.4460078477859497,
-0.5818101763725281,
-0.8238022327423096,
0.4152792990207672,
-0.44080832600593567,
0.9203627705574036,
-0.44155755639076233,
1.8494492769241333,
-0.5040670037269592,
0.46468034386634827,
0.7717557549476624,
1.2966643571853638,
0.23520047962665558,
0.13794685900211334,
0.20614926517009735,
0.458047091960907,
-0.014462669380009174,
0.45745888352394104,
1.137237548828125,
0.6192382574081421,
0.4765437841415405,
0.6651871204376221,
-2.2611541748046875,
1.316978096961975,
-0.9965978264808655,
0.27814406156539917,
1.366123914718628,
-0.9314322471618652,
0.3031664192676544,
-1.7891484498977661,
-0.040204137563705444,
0.5540812015533447,
-2.2680253982543945,
0.16351290047168732,
-1.3791183233261108,
-0.47409331798553467,
1.0459011793136597,
0.3497990071773529,
-1.2536195516586304,
0.1861305683851242,
-0.33883780241012573,
0.9593523144721985,
0.5445374250411987,
1.1861073970794678,
-1.719078540802002,
-0.03963807597756386,
-0.3821428716182709,
0.1252068281173706,
-1.29732084274292,
-1.483327865600586,
0.6294459700584412,
0.7425786256790161,
0.5282150506973267,
-0.06908588111400604,
1.0139176845550537,
-0.944463312625885,
0.7517383098602295,
-0.9842066168785095,
-1.8340179920196533,
-1.4127564430236816,
-2.2505435943603516,
-2.3094217777252197,
0.769200325012207,
-0.440572589635849,
-0.4211331605911255,
2.060607433319092,
-1.0621551275253296,
-1.7578262090682983,
1.0861164331436157,
0.27817291021347046,
0.02717474102973938,
2.327766180038452,
0.20707912743091583,
-0.7441602945327759,
0.44312962889671326,
-0.7796302437782288,
0.6514695286750793,
-0.2908654808998108,
1.3968693017959595,
0.4678550958633423,
-1.107222080230713,
1.572576880455017,
-0.4280844032764435,
0.6026592254638672,
-0.6418043375015259,
-0.5119774341583252,
-0.7005904912948608,
0.30215510725975037,
1.9219257831573486,
-0.3072947859764099,
1.5500538349151611,
-0.29065564274787903,
-1.546561598777771,
-1.6649001836776733,
0.8325754404067993,
0.5572084784507751,
-0.6779688596725464,
-0.02032415196299553,
-0.2427327185869217,
0.08487723767757416,
-0.0016609667800366879,
1.1148529052734375,
1.233428716659546,
0.8346072435379028,
-0.33617934584617615,
-0.8263788819313049,
0.19464045763015747,
-0.01314760372042656,
-0.8118569850921631,
-1.7571284770965576,
-0.3918974697589874,
0.18683108687400818,
0.6598414778709412,
-1.201796293258667,
1.643864393234253,
0.8629134297370911,
1.902711272239685,
1.1222312450408936,
-0.36291512846946716,
1.5381014347076416,
0.04198528081178665,
1.8171064853668213,
-0.4601873755455017,
0.697426974773407,
-0.3809145987033844,
-1.1202529668807983,
0.7905031442642212,
-0.27090609073638916,
-2.0982067584991455,
-0.7395114898681641,
-0.8380935192108154,
-0.12116982042789459,
-0.6974577307701111,
0.9610079526901245,
-0.17801602184772491,
-1.3909558057785034,
0.26694419980049133,
-0.71381014585495,
-0.012524972669780254,
-1.1904560327529907,
0.3078790605068207,
0.7800558805465698,
-0.6552336812019348,
0.02306472137570381,
-0.21814361214637756,
-1.3055212497711182,
-0.4252558946609497,
0.2385372370481491,
1.8112832307815552,
-0.7877691984176636,
0.9099165201187134,
1.0245459079742432,
-0.7710773348808289,
0.006888224743306637,
0.3669714331626892,
-0.2803371846675873,
0.9003676772117615,
-0.9383314251899719,
-0.35179466009140015,
1.1437095403671265,
-0.16967782378196716,
-0.6468686461448669,
1.5079072713851929,
0.7312558889389038,
-0.9047843217849731,
-0.160183385014534,
-0.18435074388980865,
-0.743882954120636,
0.01394020114094019,
-1.6139099597930908,
-0.15828688442707062,
0.32657426595687866,
-1.5766794681549072,
-0.5037145018577576,
-0.21482117474079132,
1.3775641918182373,
-0.12912140786647797,
1.3773020505905151,
-0.26442062854766846,
-0.25882571935653687,
-0.423782080411911,
-0.39328208565711975,
0.14787189662456512,
-0.211403489112854,
-0.6722046732902527,
0.3220635652542114,
-0.8219370245933533,
0.34020671248435974,
1.3712810277938843,
0.3798896372318268,
0.08418752998113632,
0.5499152541160583,
1.0768330097198486,
0.34917202591896057,
-0.08403690159320831,
-0.893089234828949,
-1.6365669965744019,
2.0575387477874756,
-1.3745272159576416,
2.05910587310791,
0.676116406917572,
-0.04735780879855156,
-1.7741187810897827,
-1.963729977607727,
1.471420168876648,
1.0286306142807007,
2.328681707382202,
0.603022038936615,
0.4258196949958801,
-0.8380832076072693,
-0.5901930332183838,
0.35525649785995483,
-0.9804977774620056,
-0.8060136437416077,
0.1131865531206131,
2.3684191703796387,
1.6599873304367065,
-0.5595281720161438,
-0.17308561503887177,
-1.1175841093063354,
1.4620732069015503,
-0.08727863430976868,
0.16531692445278168,
1.990702748298645,
-0.2178838849067688,
-1.1213351488113403,
1.3052080869674683,
-2.2282023429870605,
0.11316466331481934,
1.9805437326431274,
0.25576990842819214,
0.014589530415832996,
-1.462551474571228,
-0.6895057559013367,
-0.2951256036758423,
-0.513884425163269,
-1.2473429441452026,
0.6253979206085205,
-0.262818306684494,
-0.8357324600219727,
-1.4358965158462524,
0.11274404078722,
-1.1484113931655884,
-1.6691253185272217,
0.2009413093328476,
1.8856000900268555,
1.8993829488754272,
-0.743965208530426,
1.571433186531067,
-0.29419609904289246,
0.14559239149093628,
1.2233697175979614,
1.2455263137817383,
3.1538708209991455,
1.951123833656311,
-1.2437705993652344,
0.7693197727203369,
-0.158898264169693,
-0.4499094486236572,
1.1257514953613281,
-1.13777756690979,
1.3430622816085815,
-0.19432173669338226,
-1.185799241065979,
-1.1928497552871704,
0.9731153249740601,
0.5411257743835449,
0.04395419359207153,
-0.5300721526145935,
1.2378394603729248,
0.0261005237698555,
1.310266375541687,
0.4519016146659851,
-0.21585524082183838,
0.6380287408828735,
-0.4386901259422302,
-0.5339060425758362,
1.5626673698425293,
0.23999370634555817,
-1.379373550415039,
-2.3364920616149902,
-0.22741176187992096,
-0.8132484555244446,
-0.03226671367883682,
-0.5486471652984619,
-0.9384686350822449,
1.7161803245544434,
0.46660012006759644,
-1.3069217205047607,
-0.2005014717578888,
-0.41450443863868713,
-0.6460282802581787,
2.702378273010254,
-1.3935892581939697,
-0.12961342930793762,
-0.9937722682952881,
-0.5843935608863831,
1.5416218042373657,
-1.2209511995315552,
-0.08846493810415268,
-0.9499965310096741,
-0.5936169624328613,
-1.3760665655136108,
-0.6612960696220398,
0.009202755056321621,
-0.9468194246292114,
0.7909606099128723,
0.19202490150928497,
-1.1933485269546509,
-0.4087677299976349,
-0.9076146483421326,
0.8596910834312439,
-0.05950623378157616,
0.24238957464694977,
1.9872307777404785,
0.41388362646102905,
-0.33173054456710815,
0.5833584666252136,
1.0777783393859863,
0.6540955305099487,
-0.610100269317627,
0.33995118737220764,
-0.7201313376426697,
0.3357084095478058,
-1.2514492273330688,
0.18151991069316864,
-2.881575584411621,
0.6774208545684814,
0.03930457681417465,
-0.04189148172736168,
0.03263067826628685,
-1.1629436016082764,
1.1047108173370361,
2.6616013050079346,
-1.2119581699371338,
0.475296288728714,
0.2773708403110504,
1.0712207555770874,
-1.4313924312591553,
0.3522515296936035,
-0.3540322184562683,
2.122476100921631,
0.12682375311851501,
1.2453867197036743,
-0.44372105598449707,
-2.188371419906616,
0.6680005788803101,
-1.2252247333526611,
-1.2117462158203125,
0.7904841303825378,
-0.8183492422103882,
-0.0011160173453390598,
-1.3602451086044312,
-0.1797879934310913,
-0.8839200735092163,
-1.2415826320648193,
0.7445358633995056,
0.1693858951330185,
0.5074554085731506,
-0.5923380255699158,
0.4193247854709625,
-2.1792540550231934,
-1.4212162494659424,
-0.26769641041755676,
-1.0087567567825317,
0.5158651471138,
-0.20535583794116974,
0.7055090665817261,
-0.15749281644821167,
-0.019090458750724792,
0.39535531401634216,
1.3492968082427979,
3.346734046936035,
0.0808102935552597,
0.3663027584552765,
-0.15683379769325256,
-1.0500397682189941,
1.4325003623962402,
0.9242896437644958,
-0.19849491119384766,
-0.515195906162262,
-1.0386857986450195,
1.203766942024231,
1.9825953245162964,
1.0620675086975098,
0.015327521599829197,
-0.8906151652336121,
-0.8032969832420349,
0.1321534961462021,
0.16983310878276825,
0.47761040925979614,
0.8707891702651978,
0.02092713862657547,
0.09564200043678284,
1.4664901494979858,
1.269587755203247,
-0.37572234869003296,
0.3686214089393616,
-0.8441237807273865,
-0.4594472646713257,
0.5519955158233643,
0.34230658411979675,
0.12857578694820404,
0.3739873766899109,
-1.0543938875198364,
-0.19798462092876434,
-0.2695082426071167,
-0.9358460307121277,
-0.6856977939605713,
-0.5522284507751465,
-0.4035695791244507,
1.630659818649292,
0.07120884954929352,
-0.4915255606174469,
-0.011490844190120697,
-0.7821646332740784,
-0.025796648114919662,
-0.9268076419830322,
0.303335577249527,
-0.08435162901878357,
-0.09159787744283676,
-0.16928331553936005,
1.7761868238449097,
-1.0297752618789673,
-2.0431363582611084,
0.31837624311447144,
0.2017701119184494,
-0.42336389422416687,
0.2942391633987427,
1.5397510528564453,
0.6618096828460693,
1.4278978109359741,
1.3471213579177856,
0.937217652797699,
-0.6729959845542908,
-1.4084296226501465,
0.5885244011878967,
1.00950288772583,
-1.4081732034683228,
0.8125475645065308,
0.06623128801584244,
-0.5118542909622192,
0.6703645586967468,
1.2695708274841309,
0.40878403186798096,
-1.9786491394042969,
0.6903980374336243,
-0.7568988800048828,
0.7004191279411316,
0.6253740787506104,
0.7228646278381348,
0.11269790679216385,
0.7468942999839783,
-1.3013371229171753,
-1.0757685899734497,
-0.6597659587860107,
-0.6975012421607971,
1.9415560960769653,
-0.17684556543827057,
0.5824685096740723,
-0.17673790454864502,
-1.3615031242370605,
-0.16959676146507263,
0.5929186940193176,
0.4379335045814514,
-0.47706204652786255,
0.7720676064491272,
-0.6411866545677185,
-1.178124189376831,
-1.3823299407958984,
-0.4527607858181,
-1.0069795846939087,
-0.8470905423164368,
1.0302664041519165,
0.856835663318634,
0.35140958428382874,
1.8757638931274414,
0.5279529690742493,
0.23751609027385712,
-2.7423717975616455,
0.8998560309410095,
0.29854321479797363,
-0.07218700647354126,
0.8529170751571655,
0.2781183421611786,
0.9589764475822449,
-0.19736357033252716,
0.6545658111572266,
-2.2847628593444824,
2.349395990371704,
-0.26125743985176086,
0.673334002494812,
-0.0063347951509058475,
-0.08808037638664246,
0.9989097118377686,
0.5359371304512024,
0.6918810606002808,
-1.1245372295379639,
0.6255945563316345,
-0.6381397843360901,
1.2451690435409546,
0.9307320713996887,
-0.8117563128471375,
-0.1232164278626442,
1.288196325302124,
0.5446273684501648,
-0.4309236407279968,
-0.9388272762298584,
-0.9718649983406067,
0.8845968246459961,
1.8009697198867798,
-0.09159193187952042,
0.04385293275117874,
0.9221925139427185,
0.601317822933197,
-1.427762508392334,
0.050544578582048416,
-0.8088856339454651,
-0.6741231083869934,
1.5770217180252075,
2.155529737472534,
-0.06984702497720718,
-0.16625769436359406,
-0.725130021572113,
-1.1471909284591675,
0.7931431531906128,
0.04243270680308342,
0.1367267668247223,
0.637122392654419,
-0.5438700914382935,
1.147662878036499,
0.9317063093185425,
0.9774647951126099,
0.27873221039772034,
0.36630484461784363,
0.2805284559726715,
-0.26802757382392883,
-1.222548007965088,
-0.2918982207775116,
-0.9690167903900146,
-2.52020525932312,
0.4570228159427643,
-0.18209458887577057,
-1.36433744430542,
-0.06365299224853516,
-1.0319472551345825,
0.7770386338233948,
-0.4974760413169861,
-1.1055595874786377,
-1.4590126276016235,
0.2342066615819931,
-0.04762665927410126,
0.8738057613372803,
-1.6613149642944336,
-0.02221880853176117,
1.3662432432174683,
1.0796139240264893,
-0.6626133918762207,
0.9722381830215454,
0.2923842668533325,
1.0521464347839355,
0.8582654595375061,
-0.3965199291706085,
0.5103967785835266,
0.08625469356775284,
-1.267169713973999,
0.4130297899246216,
1.0986603498458862,
0.19545327126979828,
1.4229021072387695,
-0.6515315175056458,
0.07671209424734116,
0.4780694842338562,
-0.49466490745544434,
-0.3590782880783081,
-0.6641404628753662,
0.6778028607368469,
0.1904536634683609,
-0.9119739532470703,
0.0701431930065155,
-0.1079898551106453,
-0.045562807470560074,
0.17577768862247467,
-1.4501982927322388,
-0.14422187209129333,
-0.24551653861999512,
-0.5894454717636108,
-1.1676764488220215,
-0.13083481788635254,
1.3627269268035889,
-0.8310389518737793,
-0.13287445902824402,
0.46694380044937134,
0.3636486828327179,
0.6217719316482544,
0.6431350111961365,
-0.6887738704681396,
-0.3693128824234009,
-0.32886844873428345,
-0.2987348735332489,
0.25743162631988525,
1.3159281015396118,
-0.17769913375377655,
-0.9950184226036072,
0.8126352429389954,
-0.40262576937675476,
0.04804861173033714,
1.915672779083252,
0.022715162485837936,
-0.8474077582359314,
0.32439756393432617,
-0.6729902029037476,
1.8531125783920288,
1.7198386192321777,
1.3346165418624878,
-0.08292944729328156,
-1.0047465562820435,
0.5644535422325134,
-0.33643069863319397,
-0.41752302646636963,
0.9165392518043518,
0.4079849123954773,
-0.2082989364862442,
-1.346479058265686,
0.588904082775116,
1.3091607093811035,
-0.9511950016021729,
-0.8286153078079224,
0.06041644513607025,
-0.808994472026825,
1.0216081142425537,
0.8072594404220581,
0.3915756046772003,
0.28562113642692566,
1.5654891729354858,
0.7974080443382263,
-0.4442498981952667,
0.50990891456604,
0.4317871034145355,
-0.2087000608444214,
-2.057835102081299,
-1.1396185159683228,
0.3108198344707489,
-0.533608078956604,
-1.6158764362335205,
1.335464596748352,
-1.2425496578216553,
-0.9300239682197571,
0.5188355445861816,
0.008161581121385098,
1.4905575513839722,
0.340167373418808,
1.5706735849380493,
2.006225824356079,
0.9189691543579102,
0.31234800815582275,
1.4290359020233154,
-0.1698245406150818,
-0.43374529480934143,
1.8247370719909668,
-0.5412605404853821,
0.518216609954834,
1.0783442258834839,
-0.2733151316642761,
-0.9140129089355469,
-0.8810016512870789,
-1.2077295780181885,
-0.6661916971206665,
1.1391794681549072,
0.09271888434886932,
-1.092697262763977,
0.21466916799545288,
1.55190110206604,
0.021299898624420166,
-0.2796342670917511,
0.6560052633285522,
0.4000026285648346,
-0.7748696804046631,
-0.10443352162837982,
-0.9291805028915405,
0.5129875540733337,
-0.2545831501483917,
-0.38430777192115784,
0.3117241859436035,
0.352357417345047,
1.2589386701583862,
-0.022791463881731033,
0.10452494770288467,
1.2158010005950928,
-1.364593744277954,
1.4981898069381714,
-0.6551340818405151,
0.25244513154029846,
-2.442049026489258,
1.3986026048660278,
-0.7847034335136414,
1.9048784971237183,
-2.675198793411255,
0.44981080293655396,
-0.5124115347862244,
-0.45374050736427307,
0.32637038826942444,
-0.3678104877471924,
0.1942104548215866,
-0.19607828557491302,
-1.1328426599502563,
-0.15971624851226807,
-0.7799936532974243,
0.5062713623046875,
0.9942699670791626,
1.4015744924545288,
-1.087719202041626,
-0.2515883147716522,
-1.8085215091705322,
-0.196303591132164,
-0.7135831117630005,
0.4448196589946747,
-1.9619115591049194,
-0.2164212465286255,
-1.8412691354751587,
-2.470144510269165,
-1.3166059255599976,
-0.8081786036491394,
1.1117146015167236,
-0.010808071121573448,
-0.8479562401771545,
1.107138991355896,
-0.36173325777053833,
-1.9613037109375,
1.1144005060195923,
-2.186396837234497
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
Other potential clue:
- Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it.
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 30 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Other potential clue:
- Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it.
|
[
-1.172698974609375,
-0.9135552048683167,
-0.7403936982154846,
1.4711757898330688,
-0.19127242267131805,
-1.3008623123168945,
0.09696647524833679,
-1.1633660793304443,
1.7608200311660767,
-0.799736499786377,
0.3188323378562927,
-1.7471706867218018,
0.02611558884382248,
-0.5236750245094299,
-0.8530637621879578,
-0.9757472276687622,
-0.4939653277397156,
-0.7178832292556763,
0.9128694534301758,
2.5521976947784424,
1.1517210006713867,
-1.3259316682815552,
2.639573812484741,
0.6885337829589844,
-0.0632815957069397,
-1.005495548248291,
0.5852184295654297,
0.00018853787332773209,
-1.3553169965744019,
-0.38479870557785034,
-0.9433462619781494,
-0.09601837396621704,
-0.6095303893089294,
-0.5706233382225037,
0.030417457222938538,
0.3448062241077423,
-0.3861159086227417,
-0.4206315279006958,
-0.5538862347602844,
-0.8288301229476929,
0.40967515110969543,
-0.4145198464393616,
0.9336674809455872,
-0.4430031478404999,
1.8518900871276855,
-0.5101050138473511,
0.45440560579299927,
0.7667030692100525,
1.2904695272445679,
0.2513488829135895,
0.1385529637336731,
0.20391538739204407,
0.43454450368881226,
0.005836663767695427,
0.450941264629364,
1.1295267343521118,
0.6358354091644287,
0.5012081265449524,
0.67253178358078,
-2.2765636444091797,
1.3019309043884277,
-1.0372267961502075,
0.29784244298934937,
1.3665844202041626,
-0.915992021560669,
0.29544225335121155,
-1.8221837282180786,
-0.027928350493311882,
0.5394147634506226,
-2.261592388153076,
0.1617008000612259,
-1.3831192255020142,
-0.46912893652915955,
1.0635710954666138,
0.36729443073272705,
-1.235073447227478,
0.20823103189468384,
-0.3304228186607361,
0.9852917194366455,
0.5369966626167297,
1.1781638860702515,
-1.7350525856018066,
-0.029750021174550056,
-0.3745294213294983,
0.14400041103363037,
-1.2773741483688354,
-1.4999303817749023,
0.6375086307525635,
0.7240749597549438,
0.5257135629653931,
-0.05812210962176323,
0.995648205280304,
-0.9311632513999939,
0.724826455116272,
-1.0282387733459473,
-1.8369697332382202,
-1.4090564250946045,
-2.236670732498169,
-2.3271114826202393,
0.7537665963172913,
-0.4357331693172455,
-0.40794435143470764,
2.0400495529174805,
-1.0502281188964844,
-1.7459880113601685,
1.0820283889770508,
0.3098961412906647,
-0.006589999422430992,
2.3071231842041016,
0.21244819462299347,
-0.7452006340026855,
0.49567243456840515,
-0.7540701031684875,
0.6410113573074341,
-0.24389562010765076,
1.3827910423278809,
0.4858013093471527,
-1.1196379661560059,
1.5783019065856934,
-0.46401455998420715,
0.5983989834785461,
-0.6653008460998535,
-0.5355650782585144,
-0.691804826259613,
0.28909310698509216,
1.923658013343811,
-0.2804591655731201,
1.5423213243484497,
-0.2910279929637909,
-1.5618864297866821,
-1.659134030342102,
0.8512482643127441,
0.5705971717834473,
-0.6519749760627747,
-0.03845198452472687,
-0.2420249879360199,
0.07212524116039276,
0.011111171916127205,
1.1089365482330322,
1.2203195095062256,
0.8217166066169739,
-0.3210023045539856,
-0.827338695526123,
0.20254574716091156,
-0.01768525317311287,
-0.8057727813720703,
-1.771750807762146,
-0.3957483768463135,
0.2006530910730362,
0.654097855091095,
-1.1986846923828125,
1.6503044366836548,
0.85261070728302,
1.9026890993118286,
1.1375831365585327,
-0.36206725239753723,
1.5215961933135986,
0.04506850987672806,
1.8410842418670654,
-0.46615928411483765,
0.7249274849891663,
-0.3493269085884094,
-1.113395094871521,
0.801469624042511,
-0.2940826117992401,
-2.12860107421875,
-0.7174606919288635,
-0.8442259430885315,
-0.1243097186088562,
-0.6956571340560913,
0.9603473544120789,
-0.16673098504543304,
-1.4209423065185547,
0.24754847586154938,
-0.7135850191116333,
-0.010468784719705582,
-1.1936742067337036,
0.3257851302623749,
0.8083066344261169,
-0.6596989035606384,
0.041657283902168274,
-0.2191096544265747,
-1.3290396928787231,
-0.41730400919914246,
0.26088064908981323,
1.7897992134094238,
-0.7778183817863464,
0.9217953681945801,
1.0184245109558105,
-0.7874634265899658,
-0.013119466602802277,
0.3773293197154999,
-0.27418291568756104,
0.89344722032547,
-0.9302453994750977,
-0.3884877562522888,
1.1790399551391602,
-0.14913319051265717,
-0.6506475806236267,
1.5052753686904907,
0.6913064122200012,
-0.9121524691581726,
-0.13177677989006042,
-0.18780747056007385,
-0.7472294569015503,
0.010692901909351349,
-1.6117892265319824,
-0.156941756606102,
0.3144972622394562,
-1.587459683418274,
-0.5092135667800903,
-0.19242917001247406,
1.3729441165924072,
-0.15814204514026642,
1.3819187879562378,
-0.27811726927757263,
-0.24925115704536438,
-0.42933031916618347,
-0.40746209025382996,
0.1228654682636261,
-0.19339866936206818,
-0.6747266054153442,
0.31546273827552795,
-0.8229292035102844,
0.3648988604545593,
1.390620231628418,
0.3895884156227112,
0.09112361073493958,
0.5437135100364685,
1.0760442018508911,
0.33835726976394653,
-0.09118731319904327,
-0.8782930374145508,
-1.6344069242477417,
2.043762445449829,
-1.3791791200637817,
2.049433708190918,
0.6459119319915771,
-0.06479030847549438,
-1.7663121223449707,
-1.9244470596313477,
1.4908983707427979,
1.0428110361099243,
2.339869499206543,
0.6005644202232361,
0.4152475893497467,
-0.8113710284233093,
-0.6011566519737244,
0.3874337673187256,
-0.9573158621788025,
-0.8107565641403198,
0.11165380477905273,
2.3501861095428467,
1.6526180505752563,
-0.5257068276405334,
-0.16127964854240417,
-1.1250044107437134,
1.4486119747161865,
-0.10344403982162476,
0.17815394699573517,
1.9937264919281006,
-0.22927477955818176,
-1.1282365322113037,
1.341007113456726,
-2.223642587661743,
0.13323071599006653,
1.9856239557266235,
0.2902340590953827,
-0.004052930977195501,
-1.4675196409225464,
-0.6758661270141602,
-0.2825954854488373,
-0.47238749265670776,
-1.266433835029602,
0.6375452280044556,
-0.24752314388751984,
-0.8400261402130127,
-1.4006202220916748,
0.10050004720687866,
-1.1289736032485962,
-1.6627522706985474,
0.21565940976142883,
1.9140733480453491,
1.8843982219696045,
-0.7313709855079651,
1.5616761445999146,
-0.31532296538352966,
0.16453945636749268,
1.2299381494522095,
1.2320377826690674,
3.1689453125,
1.9802031517028809,
-1.2547810077667236,
0.7797377705574036,
-0.15453194081783295,
-0.4699779748916626,
1.1675691604614258,
-1.1307075023651123,
1.3324633836746216,
-0.194065123796463,
-1.2132481336593628,
-1.1937025785446167,
0.9732977747917175,
0.5158839225769043,
0.04456780105829239,
-0.5734949707984924,
1.2208839654922485,
0.013680201023817062,
1.2834111452102661,
0.45197245478630066,
-0.24509049952030182,
0.6277266144752502,
-0.4290800988674164,
-0.5663201212882996,
1.5664201974868774,
0.2378436177968979,
-1.3891645669937134,
-2.3455772399902344,
-0.22344662249088287,
-0.8161018490791321,
-0.04621987044811249,
-0.5497980713844299,
-0.941871166229248,
1.7390892505645752,
0.45363956689834595,
-1.289779543876648,
-0.19976405799388885,
-0.3841385245323181,
-0.6384472250938416,
2.7090353965759277,
-1.3998377323150635,
-0.10408605635166168,
-1.022271752357483,
-0.6029900312423706,
1.534592628479004,
-1.2391266822814941,
-0.08468508720397949,
-0.9402409195899963,
-0.6013110280036926,
-1.3682117462158203,
-0.6396011710166931,
0.013153573498129845,
-0.9338157176971436,
0.8016901612281799,
0.17865566909313202,
-1.2175168991088867,
-0.40587732195854187,
-0.9002435803413391,
0.8495355248451233,
-0.0713040679693222,
0.25438907742500305,
1.9882625341415405,
0.4344192445278168,
-0.31954726576805115,
0.5884064435958862,
1.1151041984558105,
0.6905276775360107,
-0.606555163860321,
0.34620678424835205,
-0.7555050253868103,
0.336486279964447,
-1.2537410259246826,
0.1823163777589798,
-2.866295099258423,
0.6881406903266907,
0.041513592004776,
-0.03710728511214256,
0.03819577023386955,
-1.1607389450073242,
1.0649574995040894,
2.6517112255096436,
-1.2280832529067993,
0.4543623924255371,
0.2879592776298523,
1.073686122894287,
-1.400861144065857,
0.3265262544155121,
-0.3862132728099823,
2.116795063018799,
0.11614246666431427,
1.2391741275787354,
-0.47969380021095276,
-2.167451858520508,
0.6785946488380432,
-1.2026830911636353,
-1.2293808460235596,
0.8011456727981567,
-0.8260190486907959,
0.0060770465061068535,
-1.3476125001907349,
-0.17476166784763336,
-0.8956520557403564,
-1.2274361848831177,
0.7673185467720032,
0.1624128818511963,
0.5022433996200562,
-0.5703582763671875,
0.4282335638999939,
-2.1848199367523193,
-1.4278638362884521,
-0.26746535301208496,
-1.0215216875076294,
0.5455134510993958,
-0.17829352617263794,
0.6864381432533264,
-0.1775035262107849,
-0.02593393810093403,
0.4101460576057434,
1.3587766885757446,
3.323261260986328,
0.09937402606010437,
0.35978490114212036,
-0.13670599460601807,
-1.055568814277649,
1.4536060094833374,
0.951849639415741,
-0.2081918567419052,
-0.5088514089584351,
-1.0338157415390015,
1.1904857158660889,
1.965133786201477,
1.080877661705017,
-0.011724047362804413,
-0.9190005660057068,
-0.8082180619239807,
0.17682351171970367,
0.12886004149913788,
0.4502113461494446,
0.8694720268249512,
0.050912898033857346,
0.12415231764316559,
1.4553180932998657,
1.2540079355239868,
-0.34696346521377563,
0.3926270306110382,
-0.8380792737007141,
-0.46880167722702026,
0.5694125890731812,
0.3669203817844391,
0.12868432700634003,
0.40844976902008057,
-1.0526583194732666,
-0.19069339334964752,
-0.30271315574645996,
-0.9327095746994019,
-0.6901212334632874,
-0.5491622090339661,
-0.3763938546180725,
1.628222107887268,
0.06658975780010223,
-0.5008007287979126,
-0.004321846179664135,
-0.8065742254257202,
-0.015452774241566658,
-0.9315887689590454,
0.34427475929260254,
-0.11074288189411163,
-0.11706165969371796,
-0.15917475521564484,
1.7521165609359741,
-1.0416858196258545,
-2.0186777114868164,
0.29769232869148254,
0.2324412763118744,
-0.4461352825164795,
0.278059184551239,
1.5194841623306274,
0.6450680494308472,
1.4113903045654297,
1.3811531066894531,
0.9410213828086853,
-0.655439555644989,
-1.4187391996383667,
0.5761008262634277,
1.0178098678588867,
-1.4110441207885742,
0.8250762224197388,
0.08117330074310303,
-0.5268073678016663,
0.6926268339157104,
1.2858291864395142,
0.42600658535957336,
-1.9495587348937988,
0.7055343985557556,
-0.7547722458839417,
0.7057269215583801,
0.6235494017601013,
0.7535357475280762,
0.09452249109745026,
0.7597805857658386,
-1.3214534521102905,
-1.087044358253479,
-0.6468270421028137,
-0.693496823310852,
1.9258371591567993,
-0.16350597143173218,
0.5632381439208984,
-0.1837378591299057,
-1.3446406126022339,
-0.1931309998035431,
0.5962464809417725,
0.4424442648887634,
-0.48630449175834656,
0.7582475543022156,
-0.6363383531570435,
-1.1459391117095947,
-1.37333083152771,
-0.4763304889202118,
-0.995857298374176,
-0.8456125259399414,
1.0206586122512817,
0.8649434447288513,
0.39998361468315125,
1.8422499895095825,
0.5462653636932373,
0.2328401803970337,
-2.750000476837158,
0.8827719688415527,
0.30770838260650635,
-0.08340562880039215,
0.8147903680801392,
0.2789691388607025,
0.9476370215415955,
-0.19260750710964203,
0.6785332560539246,
-2.261901617050171,
2.3639519214630127,
-0.28047314286231995,
0.6603337526321411,
0.02709798887372017,
-0.06396770477294922,
0.9983183741569519,
0.5468407273292542,
0.6578280329704285,
-1.1467317342758179,
0.6589356064796448,
-0.6470980048179626,
1.2174500226974487,
0.9282509684562683,
-0.8281714916229248,
-0.15502749383449554,
1.3005061149597168,
0.5229613780975342,
-0.4262712895870209,
-0.9306922554969788,
-0.9578098058700562,
0.9095701575279236,
1.781980276107788,
-0.08209562301635742,
0.04631645232439041,
0.929245114326477,
0.5969650149345398,
-1.4171675443649292,
0.058909397572278976,
-0.8256955146789551,
-0.6848776936531067,
1.574923038482666,
2.1070094108581543,
-0.07215090095996857,
-0.1520252525806427,
-0.7375478148460388,
-1.1107738018035889,
0.7916210889816284,
0.05801120772957802,
0.11915400624275208,
0.6221340894699097,
-0.557934045791626,
1.1570985317230225,
0.9557218551635742,
0.9396601915359497,
0.27845025062561035,
0.3695676326751709,
0.25432467460632324,
-0.27446067333221436,
-1.2254583835601807,
-0.2698309123516083,
-0.9624063968658447,
-2.5512444972991943,
0.42518606781959534,
-0.20225605368614197,
-1.380388617515564,
-0.05688399076461792,
-1.0119454860687256,
0.7644730806350708,
-0.527982771396637,
-1.1412320137023926,
-1.4690102338790894,
0.2480172961950302,
-0.01824577897787094,
0.8810990452766418,
-1.6727272272109985,
-0.011031289584934711,
1.3346997499465942,
1.0579915046691895,
-0.6559310555458069,
0.965004026889801,
0.27906227111816406,
1.0345162153244019,
0.8748384714126587,
-0.3997536897659302,
0.49071231484413147,
0.10505105555057526,
-1.2696866989135742,
0.4203684628009796,
1.1037389039993286,
0.18480688333511353,
1.4325658082962036,
-0.636279284954071,
0.06455296277999878,
0.4244494140148163,
-0.49200648069381714,
-0.3663625717163086,
-0.7012958526611328,
0.663550078868866,
0.21465906500816345,
-0.9064000248908997,
0.06632520258426666,
-0.08815915882587433,
-0.025065327063202858,
0.18558473885059357,
-1.4846512079238892,
-0.14409855008125305,
-0.2623334527015686,
-0.6024651527404785,
-1.1662143468856812,
-0.16828516125679016,
1.3710049390792847,
-0.848724901676178,
-0.1490226686000824,
0.46811744570732117,
0.36821311712265015,
0.6090121269226074,
0.6331419348716736,
-0.6957483291625977,
-0.38041195273399353,
-0.34398865699768066,
-0.3049604296684265,
0.25351354479789734,
1.3349488973617554,
-0.1894608438014984,
-0.968483567237854,
0.7941395044326782,
-0.40084928274154663,
0.03698035329580307,
1.8860950469970703,
0.011781660839915276,
-0.8343392014503479,
0.33588409423828125,
-0.681693971157074,
1.8448654413223267,
1.748091697692871,
1.3488847017288208,
-0.10267713665962219,
-1.0085238218307495,
0.5420681834220886,
-0.3526462912559509,
-0.4180258512496948,
0.9149472117424011,
0.40839481353759766,
-0.2123594880104065,
-1.3036874532699585,
0.61952143907547,
1.3346043825149536,
-0.952405571937561,
-0.8381347060203552,
0.0638543963432312,
-0.8051947355270386,
1.0122097730636597,
0.7729781270027161,
0.3576231598854065,
0.2923341989517212,
1.5406032800674438,
0.7836834788322449,
-0.429101824760437,
0.5019303560256958,
0.43567195534706116,
-0.21588382124900818,
-2.0482406616210938,
-1.170285940170288,
0.3387945294380188,
-0.5287593007087708,
-1.6126054525375366,
1.350431203842163,
-1.2391750812530518,
-0.9167355895042419,
0.5212254524230957,
0.04286776855587959,
1.49379301071167,
0.32510480284690857,
1.5671615600585938,
2.022937774658203,
0.9439331889152527,
0.32553014159202576,
1.4581049680709839,
-0.17293092608451843,
-0.4136119484901428,
1.79874587059021,
-0.5224477648735046,
0.4938572347164154,
1.0639848709106445,
-0.2886565625667572,
-0.9294285774230957,
-0.8769485354423523,
-1.2574390172958374,
-0.6545498371124268,
1.1255879402160645,
0.09323666989803314,
-1.0997792482376099,
0.20844800770282745,
1.5424453020095825,
0.021508919075131416,
-0.2541917562484741,
0.6780008673667908,
0.4142758250236511,
-0.7868587374687195,
-0.12063010036945343,
-0.9262915253639221,
0.5226470232009888,
-0.24561846256256104,
-0.3855507969856262,
0.2795340120792389,
0.35218456387519836,
1.2480796575546265,
-0.00993179902434349,
0.08490543067455292,
1.211275339126587,
-1.3408006429672241,
1.4858524799346924,
-0.670081377029419,
0.2849174737930298,
-2.4403624534606934,
1.3841948509216309,
-0.7781792879104614,
1.8858102560043335,
-2.67226243019104,
0.46992626786231995,
-0.5123040080070496,
-0.47956016659736633,
0.33574622869491577,
-0.37698882818222046,
0.20409396290779114,
-0.18976670503616333,
-1.1154139041900635,
-0.1727796196937561,
-0.7764909267425537,
0.507034957408905,
1.015542984008789,
1.4223053455352783,
-1.112744688987732,
-0.26683375239372253,
-1.8059983253479004,
-0.17845122516155243,
-0.6719065308570862,
0.4663087725639343,
-1.9445765018463135,
-0.20244267582893372,
-1.8327915668487549,
-2.494943618774414,
-1.317333459854126,
-0.7969167232513428,
1.1118613481521606,
-0.02146007865667343,
-0.8658991456031799,
1.0908098220825195,
-0.36379316449165344,
-1.9225767850875854,
1.1075233221054077,
-2.210866928100586
] |
https://github.com/huggingface/datasets/issues/5406
|
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
|
I installed `datasets` with Conda using `conda install datasets` and got this issue.
Then I tried to reinstall using
`
conda install -c huggingface -c conda-forge datasets
`
The issue is now fixed.
|
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
| 354 | 33 |
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
I installed `datasets` with Conda using `conda install datasets` and got this issue.
Then I tried to reinstall using
`
conda install -c huggingface -c conda-forge datasets
`
The issue is now fixed.
|
[
-1.1325589418411255,
-0.9141225814819336,
-0.764790415763855,
1.4390449523925781,
-0.15683706104755402,
-1.3214763402938843,
0.09748121351003647,
-1.172407865524292,
1.7872029542922974,
-0.7789129018783569,
0.33265209197998047,
-1.7489564418792725,
0.02682737447321415,
-0.5387814044952393,
-0.8676948547363281,
-0.9612558484077454,
-0.4602980613708496,
-0.7332332730293274,
0.9717973470687866,
2.5601797103881836,
1.1621108055114746,
-1.3068174123764038,
2.6567468643188477,
0.6878500580787659,
-0.06789252161979675,
-0.9995002150535583,
0.560069739818573,
-0.006281704641878605,
-1.3193507194519043,
-0.41033464670181274,
-0.9198640584945679,
-0.08776528388261795,
-0.6111747026443481,
-0.5888540744781494,
0.030551491305232048,
0.3467586934566498,
-0.38488638401031494,
-0.4815956652164459,
-0.5447933077812195,
-0.8300427794456482,
0.3945358693599701,
-0.3942183256149292,
0.9207229614257812,
-0.4356137216091156,
1.8887394666671753,
-0.5179183483123779,
0.43500685691833496,
0.7585767507553101,
1.2570527791976929,
0.235181525349617,
0.148756742477417,
0.1888422966003418,
0.4461420774459839,
-0.003179976250976324,
0.4664056599140167,
1.1575433015823364,
0.6304585337638855,
0.5256103873252869,
0.681272029876709,
-2.2420856952667236,
1.325019121170044,
-1.0176002979278564,
0.2872849404811859,
1.3696634769439697,
-0.940054714679718,
0.29609209299087524,
-1.77926766872406,
-0.038534536957740784,
0.5423897504806519,
-2.2564239501953125,
0.1682925969362259,
-1.3899204730987549,
-0.45764076709747314,
1.0692459344863892,
0.3652336001396179,
-1.2329845428466797,
0.20051990449428558,
-0.33914345502853394,
0.9732323288917542,
0.5420583486557007,
1.2048954963684082,
-1.7316844463348389,
-0.00873744860291481,
-0.40578052401542664,
0.1387723833322525,
-1.297693133354187,
-1.4961045980453491,
0.6270852088928223,
0.7415207028388977,
0.5432829260826111,
-0.10419280081987381,
1.010079026222229,
-0.9336146116256714,
0.7179093956947327,
-0.9724245071411133,
-1.8163620233535767,
-1.4183284044265747,
-2.2445363998413086,
-2.3456871509552,
0.7683330178260803,
-0.428856760263443,
-0.42809364199638367,
2.039271593093872,
-1.0584042072296143,
-1.7771919965744019,
1.051491379737854,
0.2939644455909729,
-0.006702474784106016,
2.3041670322418213,
0.23023253679275513,
-0.7362244725227356,
0.4737829864025116,
-0.7495651245117188,
0.6211586594581604,
-0.2588941156864166,
1.4067063331604004,
0.47908955812454224,
-1.16927969455719,
1.5622766017913818,
-0.446732759475708,
0.6125032901763916,
-0.6960867047309875,
-0.5056136250495911,
-0.7179091572761536,
0.2761775553226471,
1.9137799739837646,
-0.28167784214019775,
1.5508432388305664,
-0.2987517714500427,
-1.5671875476837158,
-1.6591126918792725,
0.8220835328102112,
0.5208073258399963,
-0.6425979733467102,
0.010467957705259323,
-0.266152024269104,
0.06784228980541229,
0.017442835494875908,
1.135931134223938,
1.2026585340499878,
0.8156198263168335,
-0.3293568789958954,
-0.7988936305046082,
0.21283982694149017,
0.02556079439818859,
-0.7985274195671082,
-1.779873013496399,
-0.38656896352767944,
0.22121009230613708,
0.6319616436958313,
-1.19041109085083,
1.6370186805725098,
0.8592634797096252,
1.9188235998153687,
1.1422123908996582,
-0.33137479424476624,
1.5151910781860352,
0.043740466237068176,
1.8336900472640991,
-0.41728946566581726,
0.7381075620651245,
-0.30906057357788086,
-1.1337875127792358,
0.8193590641021729,
-0.29411694407463074,
-2.125763416290283,
-0.740928053855896,
-0.8412197232246399,
-0.09757024049758911,
-0.6811527013778687,
0.9588119983673096,
-0.15492551028728485,
-1.4078381061553955,
0.22824843227863312,
-0.6969147324562073,
0.01041259802877903,
-1.2104705572128296,
0.3010263741016388,
0.7805401682853699,
-0.6690586805343628,
0.045743249356746674,
-0.21067222952842712,
-1.3346514701843262,
-0.4238530099391937,
0.2649218440055847,
1.781774878501892,
-0.8153690099716187,
0.919006884098053,
1.0539655685424805,
-0.7907900214195251,
-0.0017181350849568844,
0.3863132894039154,
-0.29515185952186584,
0.8948769569396973,
-0.9518469572067261,
-0.3372246325016022,
1.175599217414856,
-0.18127308785915375,
-0.6301863789558411,
1.5197373628616333,
0.6913480758666992,
-0.9218705296516418,
-0.11210823804140091,
-0.18820665776729584,
-0.7784587144851685,
0.03426162898540497,
-1.5761144161224365,
-0.1633070856332779,
0.3169820308685303,
-1.5806387662887573,
-0.5366965532302856,
-0.21683691442012787,
1.3756012916564941,
-0.15881316363811493,
1.353721261024475,
-0.2801332175731659,
-0.2454688400030136,
-0.43283939361572266,
-0.3782668709754944,
0.14928936958312988,
-0.18310554325580597,
-0.7088016271591187,
0.3140984773635864,
-0.7916740775108337,
0.35054799914360046,
1.360316276550293,
0.372236967086792,
0.06276891380548477,
0.5494787096977234,
1.0838617086410522,
0.33982643485069275,
-0.11982771009206772,
-0.8532696962356567,
-1.6574897766113281,
2.0419936180114746,
-1.3801385164260864,
2.0284879207611084,
0.6515859365463257,
-0.033403486013412476,
-1.7534480094909668,
-1.9387338161468506,
1.5154602527618408,
1.0486869812011719,
2.340099811553955,
0.5885636806488037,
0.4237331449985504,
-0.8177525997161865,
-0.60660719871521,
0.3540767729282379,
-0.9525627493858337,
-0.8060800433158875,
0.14333583414554596,
2.331244945526123,
1.6640220880508423,
-0.5699633359909058,
-0.16674543917179108,
-1.1260496377944946,
1.4315822124481201,
-0.13513079285621643,
0.14270997047424316,
2.0313374996185303,
-0.24207203090190887,
-1.0868221521377563,
1.3594861030578613,
-2.2283360958099365,
0.11878659576177597,
1.9532463550567627,
0.24443359673023224,
0.0055884430184960365,
-1.4707790613174438,
-0.6648374199867249,
-0.3006078600883484,
-0.5151658058166504,
-1.2569472789764404,
0.6372959017753601,
-0.23113349080085754,
-0.8330747485160828,
-1.42616605758667,
0.11782551556825638,
-1.1264615058898926,
-1.6664999723434448,
0.2148292362689972,
1.8937928676605225,
1.8751486539840698,
-0.7591801881790161,
1.575518250465393,
-0.29359036684036255,
0.15379424393177032,
1.2364987134933472,
1.20316481590271,
3.190206527709961,
1.932300329208374,
-1.256438136100769,
0.7915579080581665,
-0.13019125163555145,
-0.5048580169677734,
1.17023766040802,
-1.1395132541656494,
1.336775779724121,
-0.19924011826515198,
-1.2040619850158691,
-1.2440998554229736,
0.9521352052688599,
0.5521934032440186,
0.037571974098682404,
-0.5328303575515747,
1.2454246282577515,
0.012048549950122833,
1.279826283454895,
0.4286070764064789,
-0.24833334982395172,
0.6494331359863281,
-0.45008689165115356,
-0.5386092662811279,
1.4855877161026,
0.24412618577480316,
-1.3664554357528687,
-2.3002262115478516,
-0.22479720413684845,
-0.8364114165306091,
-0.051505349576473236,
-0.5592920780181885,
-0.9191835522651672,
1.7246057987213135,
0.48980599641799927,
-1.2866406440734863,
-0.20225393772125244,
-0.3706781566143036,
-0.667599081993103,
2.712009906768799,
-1.377896785736084,
-0.12228545546531677,
-1.0032440423965454,
-0.5849980711936951,
1.5674142837524414,
-1.2357627153396606,
-0.11010218411684036,
-0.9679521322250366,
-0.587028443813324,
-1.3642343282699585,
-0.6482705473899841,
0.03095042146742344,
-0.9384715557098389,
0.8296560049057007,
0.15484316647052765,
-1.2024216651916504,
-0.40494537353515625,
-0.9396019577980042,
0.8501052260398865,
-0.057684168219566345,
0.2501234710216522,
1.9980583190917969,
0.4234166741371155,
-0.34705111384391785,
0.5690886974334717,
1.09214186668396,
0.6656543612480164,
-0.6175588965415955,
0.36416375637054443,
-0.7489348649978638,
0.32635238766670227,
-1.2821587324142456,
0.1916811466217041,
-2.880363941192627,
0.6454641819000244,
0.05457425117492676,
-0.019142692908644676,
0.03641621768474579,
-1.1951645612716675,
1.0719822645187378,
2.6358325481414795,
-1.2151789665222168,
0.46869832277297974,
0.29327479004859924,
1.0957982540130615,
-1.4404523372650146,
0.3571515381336212,
-0.3581780195236206,
2.099769353866577,
0.1169324591755867,
1.244926929473877,
-0.41906431317329407,
-2.14530086517334,
0.6672252416610718,
-1.228107213973999,
-1.2120245695114136,
0.8487564921379089,
-0.818491518497467,
-0.01487407460808754,
-1.349461317062378,
-0.18870706856250763,
-0.8596070408821106,
-1.223328948020935,
0.7656802535057068,
0.17380978167057037,
0.5143880844116211,
-0.5881646871566772,
0.4206838011741638,
-2.1808106899261475,
-1.3918808698654175,
-0.25924739241600037,
-1.0049002170562744,
0.5146316885948181,
-0.18877457082271576,
0.6758296489715576,
-0.17237743735313416,
-0.00620607566088438,
0.41923752427101135,
1.3972233533859253,
3.3234379291534424,
0.08375541120767593,
0.365250825881958,
-0.13100676238536835,
-1.0373380184173584,
1.4386237859725952,
0.8924141526222229,
-0.2220734804868698,
-0.5035462975502014,
-1.0462613105773926,
1.1844525337219238,
1.9682303667068481,
1.0680092573165894,
-0.0019938284531235695,
-0.9157268404960632,
-0.8365767002105713,
0.13569457828998566,
0.139230877161026,
0.46558547019958496,
0.8551931977272034,
0.07169771939516068,
0.09732447564601898,
1.4818702936172485,
1.2340002059936523,
-0.36438873410224915,
0.41626590490341187,
-0.8494347333908081,
-0.4702170491218567,
0.537935197353363,
0.3578825891017914,
0.1412670612335205,
0.365043044090271,
-1.0348458290100098,
-0.20958852767944336,
-0.2861896753311157,
-0.9494845867156982,
-0.7041597366333008,
-0.5552597045898438,
-0.3866078555583954,
1.6255589723587036,
0.04846400022506714,
-0.5183234214782715,
-0.02027786709368229,
-0.7928224802017212,
-0.03108506090939045,
-0.8873641490936279,
0.32025405764579773,
-0.09443836659193039,
-0.11733026802539825,
-0.15794219076633453,
1.713516354560852,
-1.0562317371368408,
-2.000837802886963,
0.29599109292030334,
0.21825283765792847,
-0.44486501812934875,
0.258398175239563,
1.528937816619873,
0.6586726903915405,
1.4462335109710693,
1.3536370992660522,
0.9312605261802673,
-0.663553774356842,
-1.428815484046936,
0.5486019253730774,
1.0111058950424194,
-1.3894532918930054,
0.8215519189834595,
0.09576305747032166,
-0.5154621005058289,
0.6730102896690369,
1.267122745513916,
0.4285384714603424,
-1.9562337398529053,
0.6920503973960876,
-0.7814944982528687,
0.6953473687171936,
0.6252266764640808,
0.729313313961029,
0.10374502092599869,
0.742129385471344,
-1.277845859527588,
-1.0941416025161743,
-0.6153954267501831,
-0.724863588809967,
1.9196932315826416,
-0.15571025013923645,
0.579840898513794,
-0.1844969540834427,
-1.3826137781143188,
-0.14630289375782013,
0.5941908359527588,
0.4461899995803833,
-0.4864089787006378,
0.7412938475608826,
-0.6492873430252075,
-1.134639024734497,
-1.382149577140808,
-0.4586438238620758,
-1.0514458417892456,
-0.8212341070175171,
0.9989320039749146,
0.8812472224235535,
0.35528725385665894,
1.84129798412323,
0.5558613538742065,
0.2744121849536896,
-2.7345075607299805,
0.881019115447998,
0.2947046458721161,
-0.060249678790569305,
0.824643611907959,
0.28450554609298706,
0.9645217657089233,
-0.19051668047904968,
0.6616713404655457,
-2.27510929107666,
2.3277764320373535,
-0.2683911621570587,
0.6123660206794739,
-0.005192814860492945,
-0.1231178492307663,
1.0316863059997559,
0.5798519849777222,
0.6816993355751038,
-1.1517938375473022,
0.6783736348152161,
-0.6349841356277466,
1.2226399183273315,
0.9207038283348083,
-0.826806902885437,
-0.12313234806060791,
1.2866121530532837,
0.5291598439216614,
-0.4120716452598572,
-0.9668685793876648,
-1.0217586755752563,
0.9194154739379883,
1.7514768838882446,
-0.08587950468063354,
0.021537018939852715,
0.9195877909660339,
0.6178209781646729,
-1.401797890663147,
0.09927530586719513,
-0.8141957521438599,
-0.6579357981681824,
1.5956157445907593,
2.112232208251953,
-0.07335445284843445,
-0.17556880414485931,
-0.7309815287590027,
-1.0714725255966187,
0.8057624697685242,
0.05186218023300171,
0.09653118252754211,
0.6274861693382263,
-0.5802339911460876,
1.1664559841156006,
0.9845548272132874,
0.9503312110900879,
0.29312965273857117,
0.36691445112228394,
0.2737598121166229,
-0.26119810342788696,
-1.2360608577728271,
-0.2620279788970947,
-0.9689401984214783,
-2.5439882278442383,
0.4422173500061035,
-0.20985612273216248,
-1.3777753114700317,
-0.05111677944660187,
-1.0265028476715088,
0.7849031686782837,
-0.5228923559188843,
-1.1170436143875122,
-1.4796595573425293,
0.22745811939239502,
-0.007650746498256922,
0.8545382618904114,
-1.6314774751663208,
-0.00951169990003109,
1.3637642860412598,
1.0686863660812378,
-0.6596096754074097,
0.9605944156646729,
0.27391138672828674,
1.0340651273727417,
0.8804435729980469,
-0.39994361996650696,
0.5041447281837463,
0.09416643530130386,
-1.2940772771835327,
0.410025417804718,
1.1246224641799927,
0.2054516226053238,
1.4365770816802979,
-0.655911386013031,
0.10326988995075226,
0.4504566192626953,
-0.48276257514953613,
-0.37983450293540955,
-0.6650160551071167,
0.6766091585159302,
0.17895710468292236,
-0.900677502155304,
0.06278742849826813,
-0.09487967193126678,
-0.04542923718690872,
0.20271943509578705,
-1.514758825302124,
-0.12817580997943878,
-0.24507836997509003,
-0.6102506518363953,
-1.1621875762939453,
-0.14467287063598633,
1.3762151002883911,
-0.8467841148376465,
-0.17642873525619507,
0.48150834441185,
0.3718653619289398,
0.597272515296936,
0.6228600740432739,
-0.6907249689102173,
-0.3531529903411865,
-0.341169536113739,
-0.30425944924354553,
0.2548920512199402,
1.338049054145813,
-0.18122811615467072,
-0.9770986437797546,
0.8080149292945862,
-0.4305800497531891,
0.04389634728431702,
1.888602614402771,
0.0367586612701416,
-0.8515290021896362,
0.34061041474342346,
-0.6922470927238464,
1.843214750289917,
1.785876750946045,
1.3354603052139282,
-0.03362374007701874,
-1.0157331228256226,
0.5269953608512878,
-0.34432902932167053,
-0.4224701225757599,
0.9536094069480896,
0.3942486047744751,
-0.22101546823978424,
-1.3137520551681519,
0.6104896068572998,
1.3491438627243042,
-0.9454339742660522,
-0.8564370274543762,
0.049615636467933655,
-0.836341917514801,
1.018347978591919,
0.8214284181594849,
0.38237464427948,
0.31031689047813416,
1.5164210796356201,
0.7827594876289368,
-0.42470625042915344,
0.48933151364326477,
0.4196030795574188,
-0.21246881783008575,
-2.0240767002105713,
-1.1302860975265503,
0.31594231724739075,
-0.5439250469207764,
-1.6015491485595703,
1.3325214385986328,
-1.233217477798462,
-0.934262216091156,
0.523341953754425,
0.028478166088461876,
1.5017427206039429,
0.3476316034793854,
1.5734363794326782,
2.0293452739715576,
0.9223272800445557,
0.2815358638763428,
1.4006116390228271,
-0.19338305294513702,
-0.4304214119911194,
1.7957978248596191,
-0.5256319046020508,
0.5365124344825745,
1.0628107786178589,
-0.2903081178665161,
-0.9235647320747375,
-0.9062801599502563,
-1.2135976552963257,
-0.6778026819229126,
1.1396832466125488,
0.1150592491030693,
-1.1093080043792725,
0.21419060230255127,
1.5549650192260742,
0.038474276661872864,
-0.28368625044822693,
0.6679942011833191,
0.42284005880355835,
-0.7949509620666504,
-0.10753481090068817,
-0.9333528280258179,
0.5649728775024414,
-0.27243223786354065,
-0.3847310543060303,
0.28893300890922546,
0.3566286563873291,
1.2699799537658691,
-0.010845721699297428,
0.1073174774646759,
1.223615288734436,
-1.3426027297973633,
1.4891325235366821,
-0.7047682404518127,
0.2527697682380676,
-2.4389777183532715,
1.415262222290039,
-0.7838912010192871,
1.9102232456207275,
-2.67227840423584,
0.48122143745422363,
-0.48273929953575134,
-0.47897759079933167,
0.3110150992870331,
-0.3886251747608185,
0.20558369159698486,
-0.1862560510635376,
-1.145288109779358,
-0.14970552921295166,
-0.7766061425209045,
0.5234427452087402,
1.0456970930099487,
1.4150372743606567,
-1.0892075300216675,
-0.25109580159187317,
-1.7881531715393066,
-0.21010641753673553,
-0.7028700709342957,
0.46685364842414856,
-1.9061734676361084,
-0.19400008022785187,
-1.8419647216796875,
-2.5405492782592773,
-1.3125697374343872,
-0.8229804635047913,
1.1081218719482422,
0.006970120593905449,
-0.8680899739265442,
1.1010425090789795,
-0.3969910740852356,
-1.950616717338562,
1.1262154579162598,
-2.182502508163452
] |
https://github.com/huggingface/datasets/issues/5405
|
size_in_bytes the same for all splits
|
Hi @Breakend,
Indeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split.
This is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files).
The size of the Arrow files for a specific split can be accessed: e.g. size of the "test" split only
```python
ds["train"].info.splits["test"].num_bytes
```
I agree this is confusing and maybe we should improve it.
|
### Describe the bug
Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example:
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 1097.70it/s]
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
>>>
```
### Steps to reproduce the bug
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
```
### Expected behavior
The expected behavior is that it should return the separate sizes for all splits.
### Environment info
- `datasets` version: 2.7.1
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
| 355 | 76 |
size_in_bytes the same for all splits
### Describe the bug
Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example:
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 1097.70it/s]
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
>>>
```
### Steps to reproduce the bug
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
```
### Expected behavior
The expected behavior is that it should return the separate sizes for all splits.
### Environment info
- `datasets` version: 2.7.1
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
Hi @Breakend,
Indeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split.
This is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files).
The size of the Arrow files for a specific split can be accessed: e.g. size of the "test" split only
```python
ds["train"].info.splits["test"].num_bytes
```
I agree this is confusing and maybe we should improve it.
|
[
-1.1352394819259644,
-0.796729326248169,
-0.7571126818656921,
1.434135913848877,
-0.0972394347190857,
-1.2886606454849243,
0.20292288064956665,
-1.1315603256225586,
1.7133888006210327,
-0.8233996629714966,
0.27702584862709045,
-1.6561424732208252,
-0.028486154973506927,
-0.5886371731758118,
-0.7704916000366211,
-0.9122561812400818,
-0.38316863775253296,
-0.8023562431335449,
0.9685481786727905,
2.485745906829834,
1.2753499746322632,
-1.3102531433105469,
2.7567732334136963,
0.6835366487503052,
-0.25043317675590515,
-0.9320311546325684,
0.5972805023193359,
-0.05445946753025055,
-1.3223499059677124,
-0.4614277482032776,
-0.8984983563423157,
-0.08481200039386749,
-0.5797069072723389,
-0.5063335299491882,
0.05083373188972473,
0.3554551601409912,
-0.3584370017051697,
-0.38852304220199585,
-0.5405642986297607,
-0.7303356528282166,
0.32070598006248474,
-0.3547874987125397,
0.9800496101379395,
-0.3919323980808258,
1.695695161819458,
-0.6240161657333374,
0.44177669286727905,
0.7255533933639526,
1.2495323419570923,
0.32022425532341003,
-0.019728880375623703,
0.2588580846786499,
0.35577431321144104,
-0.03688298910856247,
0.47085896134376526,
1.1269582509994507,
0.6576731204986572,
0.5070624947547913,
0.679373562335968,
-2.2281360626220703,
1.3205660581588745,
-0.9706213474273682,
0.15219561755657196,
1.403555989265442,
-0.818871021270752,
0.3707375228404999,
-1.833197832107544,
-0.0008000647649168968,
0.6443541049957275,
-2.3584394454956055,
0.26008808612823486,
-1.366326093673706,
-0.5455215573310852,
0.8768067359924316,
0.3025016188621521,
-1.1843913793563843,
0.056626539677381516,
-0.46754059195518494,
0.9537895917892456,
0.46740439534187317,
1.1256779432296753,
-1.7687116861343384,
-0.012359047308564186,
-0.27659791707992554,
0.15918301045894623,
-1.2096638679504395,
-1.6280628442764282,
0.6739315390586853,
0.6986631155014038,
0.5532699227333069,
-0.07729171216487885,
0.9623123407363892,
-0.9992176294326782,
0.6771239638328552,
-0.9549351334571838,
-1.8184937238693237,
-1.380295991897583,
-2.2331180572509766,
-2.2447569370269775,
0.6510298252105713,
-0.6017192602157593,
-0.4851401150226593,
2.0766875743865967,
-1.0321195125579834,
-1.739636778831482,
1.0746382474899292,
0.26382380723953247,
0.059870343655347824,
2.468780755996704,
0.21827678382396698,
-0.6555933356285095,
0.4459984600543976,
-0.6605495810508728,
0.7379405498504639,
-0.29620131850242615,
1.2826322317123413,
0.32940930128097534,
-1.0095666646957397,
1.6445810794830322,
-0.391209214925766,
0.6260446906089783,
-0.6327645182609558,
-0.5376184582710266,
-0.6791329383850098,
0.2693968117237091,
1.8878978490829468,
-0.3196984827518463,
1.5570040941238403,
-0.24632573127746582,
-1.5596388578414917,
-1.6138741970062256,
0.8514137268066406,
0.4319196045398712,
-0.8306834101676941,
0.18685801327228546,
-0.4258425831794739,
0.12274399399757385,
-0.036819808185100555,
1.228905439376831,
1.3228737115859985,
0.8032728433609009,
-0.2970694601535797,
-0.8991422653198242,
0.16103574633598328,
-0.03236258774995804,
-0.7754825353622437,
-1.7559459209442139,
-0.243478924036026,
0.13674168288707733,
0.6646095514297485,
-1.151861310005188,
1.7279117107391357,
0.9060454964637756,
1.976522445678711,
1.1111351251602173,
-0.3482624888420105,
1.4480922222137451,
0.12814606726169586,
1.7784322500228882,
-0.5172589421272278,
0.5532058477401733,
-0.4219302833080292,
-1.122101068496704,
0.9167538285255432,
-0.3382304608821869,
-1.9146157503128052,
-0.7030976414680481,
-0.7762174010276794,
-0.2353401929140091,
-0.7700664401054382,
0.9800465106964111,
-0.18437759578227997,
-1.3535856008529663,
0.2707708477973938,
-0.7162817120552063,
0.034842349588871,
-1.225386142730713,
0.32053419947624207,
0.7348101735115051,
-0.639757513999939,
0.12364214658737183,
-0.2567795217037201,
-1.3790099620819092,
-0.4730110764503479,
0.2228849083185196,
1.8941234350204468,
-0.6673696041107178,
0.8613198399543762,
1.0353302955627441,
-0.7198711633682251,
-0.05130390077829361,
0.3270246982574463,
-0.27583855390548706,
0.7835129499435425,
-1.1669459342956543,
-0.31050941348075867,
1.1995395421981812,
-0.24905717372894287,
-0.5731086730957031,
1.4255292415618896,
0.571180522441864,
-1.081690788269043,
-0.22939296066761017,
-0.0979667603969574,
-0.7921008467674255,
0.09185793250799179,
-1.6745655536651611,
-0.08804263174533844,
0.4241839349269867,
-1.5453482866287231,
-0.47475725412368774,
-0.1847519427537918,
1.2521346807479858,
-0.15800122916698456,
1.403605341911316,
-0.24300697445869446,
-0.10492035001516342,
-0.42585617303848267,
-0.41797664761543274,
0.06158968433737755,
-0.25798919796943665,
-0.6015167236328125,
0.2091209441423416,
-0.8285390734672546,
0.32906273007392883,
1.4699795246124268,
0.2547079622745514,
-0.03390273451805115,
0.4910046458244324,
1.0345211029052734,
0.37790846824645996,
-0.08182719349861145,
-0.9035271406173706,
-1.539349913597107,
2.0697927474975586,
-1.4621493816375732,
1.89998459815979,
0.6687266826629639,
-0.11316930502653122,
-1.7877781391143799,
-1.9728175401687622,
1.352169156074524,
1.1243841648101807,
2.311535596847534,
0.5331974625587463,
0.4061201512813568,
-0.7353054881095886,
-0.7188832759857178,
0.2843186855316162,
-0.9748750925064087,
-0.7132519483566284,
0.1832156777381897,
2.3598504066467285,
1.6443333625793457,
-0.5723007917404175,
-0.13736222684383392,
-0.8635938763618469,
1.3531206846237183,
-0.18289244174957275,
0.14867131412029266,
1.96417236328125,
-0.2748430371284485,
-1.0957704782485962,
1.354056477546692,
-2.2996926307678223,
0.1339685171842575,
2.0133044719696045,
0.2003318816423416,
0.10814553499221802,
-1.3414713144302368,
-0.6853592991828918,
-0.40277037024497986,
-0.3796335756778717,
-1.318936824798584,
0.5687086582183838,
-0.196207657456398,
-0.7797849178314209,
-1.5124293565750122,
0.23938025534152985,
-1.0535351037979126,
-1.646386742591858,
0.16949023306369781,
1.8267499208450317,
2.090289831161499,
-0.8009119629859924,
1.4869927167892456,
-0.39401865005493164,
0.05754585191607475,
1.166390061378479,
1.1822819709777832,
3.1483991146087646,
1.905079960823059,
-1.2715401649475098,
0.699616551399231,
-0.137836292386055,
-0.47273483872413635,
1.2362051010131836,
-1.2592837810516357,
1.2208589315414429,
-0.23540769517421722,
-1.2562090158462524,
-1.2323373556137085,
0.9179829359054565,
0.4386996626853943,
0.0809924378991127,
-0.5016692280769348,
1.2634981870651245,
0.08435750007629395,
1.3966273069381714,
0.5684552788734436,
-0.31556758284568787,
0.6640300750732422,
-0.4992968738079071,
-0.4530121982097626,
1.5919350385665894,
0.2602558434009552,
-1.4108070135116577,
-2.2631773948669434,
-0.18453460931777954,
-0.9035521745681763,
0.08056345582008362,
-0.6234338879585266,
-1.0910663604736328,
1.6632291078567505,
0.4029625356197357,
-1.1629223823547363,
-0.36410248279571533,
-0.40801042318344116,
-0.6177309155464172,
2.760737419128418,
-1.4233397245407104,
-0.12701945006847382,
-1.0196324586868286,
-0.6192622780799866,
1.6923860311508179,
-1.2628679275512695,
-0.16865438222885132,
-1.0307084321975708,
-0.46252331137657166,
-1.339821219444275,
-0.4827706217765808,
0.04095843434333801,
-0.8920249938964844,
0.8300146460533142,
0.27337148785591125,
-1.267720103263855,
-0.25343087315559387,
-0.9086297154426575,
0.8567652106285095,
-0.15773095190525055,
0.27342310547828674,
1.9305375814437866,
0.3268800973892212,
-0.3318275809288025,
0.7399356365203857,
1.1503549814224243,
0.6080783605575562,
-0.6296950578689575,
0.08776367455720901,
-0.6741946339607239,
0.3466362953186035,
-1.348777413368225,
0.21405546367168427,
-2.8068439960479736,
0.6734556555747986,
-0.05906671658158302,
-0.011780241504311562,
0.025303397327661514,
-1.3193533420562744,
1.0670888423919678,
2.6488242149353027,
-1.1948256492614746,
0.5018824338912964,
0.3093950152397156,
1.2229180335998535,
-1.5166829824447632,
0.2560161054134369,
-0.5061742067337036,
2.2015631198883057,
0.10459653288125992,
1.201833963394165,
-0.4128780961036682,
-2.4349398612976074,
0.7135034799575806,
-1.2087136507034302,
-1.1733824014663696,
0.8472740650177002,
-0.9105217456817627,
-0.023899409919977188,
-1.3945211172103882,
-0.23117826879024506,
-0.9212928414344788,
-1.1423277854919434,
0.7769491672515869,
0.008682833053171635,
0.4498462975025177,
-0.6172409653663635,
0.2965768575668335,
-2.245060682296753,
-1.2745256423950195,
-0.2083292156457901,
-0.9752382636070251,
0.5105299353599548,
-0.33482250571250916,
0.7284670472145081,
-0.1992974579334259,
0.010595823638141155,
0.4379028379917145,
1.4104007482528687,
3.4182448387145996,
0.11878851056098938,
0.34725871682167053,
-0.35356441140174866,
-0.9693401455879211,
1.4041630029678345,
0.8867977857589722,
-0.11948508769273758,
-0.5449771881103516,
-1.0220787525177002,
1.218546748161316,
1.9585731029510498,
0.8887300491333008,
0.07865775376558304,
-0.9821056723594666,
-0.6670381426811218,
-0.009458230808377266,
0.26179239153862,
0.5164691805839539,
0.9190367460250854,
0.046350810676813126,
0.06693217903375626,
1.3782763481140137,
1.1215637922286987,
-0.2599887549877167,
0.34793156385421753,
-0.8078868985176086,
-0.43888533115386963,
0.69365394115448,
0.347898930311203,
0.04471767321228981,
0.3938085436820984,
-0.9549936652183533,
-0.19101582467556,
-0.3375617265701294,
-0.8754584193229675,
-0.7551513314247131,
-0.3643115162849426,
-0.2596920430660248,
1.6586424112319946,
0.04478676617145538,
-0.5081113576889038,
0.11121169477701187,
-0.7669141888618469,
-0.1742103397846222,
-1.13105046749115,
0.2622204124927521,
-0.16459205746650696,
-0.08851446211338043,
-0.05323922261595726,
1.7050153017044067,
-0.9627065062522888,
-2.057143449783325,
0.1927708387374878,
0.3115401864051819,
-0.4060300290584564,
0.2031494677066803,
1.7534350156784058,
0.553022027015686,
1.5364042520523071,
1.3241970539093018,
1.038548231124878,
-0.7103533148765564,
-1.3073854446411133,
0.5400708317756653,
0.9543934464454651,
-1.393498182296753,
0.8957192897796631,
-0.04506649449467659,
-0.5629971027374268,
0.5190353393554688,
1.2321794033050537,
0.4770185053348541,
-1.9940516948699951,
0.8017237782478333,
-0.9198598861694336,
0.7555363774299622,
0.6843239068984985,
0.8800632357597351,
0.1994863599538803,
0.8239511251449585,
-1.1416765451431274,
-1.079943299293518,
-0.7243663668632507,
-0.6689485907554626,
1.9029897451400757,
-0.2985154390335083,
0.5147344470024109,
-0.18949763476848602,
-1.3227792978286743,
-0.043900951743125916,
0.7522884607315063,
0.38928282260894775,
-0.3896484076976776,
0.8070600032806396,
-0.7508342862129211,
-1.1249288320541382,
-1.3732457160949707,
-0.4587457478046417,
-1.0240482091903687,
-0.997714638710022,
1.1194430589675903,
0.747628390789032,
0.3317875862121582,
1.8962937593460083,
0.5837706923484802,
0.2752950191497803,
-2.6540920734405518,
0.8794795870780945,
0.22854316234588623,
-0.08691521733999252,
0.9344772696495056,
0.4705692529678345,
1.1287623643875122,
-0.052063118666410446,
0.5428425073623657,
-2.3972580432891846,
2.2911343574523926,
-0.26033833622932434,
0.7658320665359497,
-0.00886552594602108,
-0.21669408679008484,
0.9151803851127625,
0.6130449771881104,
0.5703878402709961,
-1.1166068315505981,
0.8105010390281677,
-0.5953946113586426,
1.1982266902923584,
0.9219383001327515,
-0.8449717164039612,
0.13651573657989502,
1.3031527996063232,
0.4654240906238556,
-0.5077266693115234,
-0.9508646726608276,
-0.9146222472190857,
0.9305227994918823,
1.676774024963379,
-0.03692873567342758,
0.017468228936195374,
0.7678778767585754,
0.6414409875869751,
-1.2506067752838135,
0.0807248055934906,
-0.7156917452812195,
-0.7489028573036194,
1.608046054840088,
1.9999206066131592,
-0.06586942821741104,
-0.12316694855690002,
-0.7481279373168945,
-1.2491788864135742,
0.8035751581192017,
0.08005669713020325,
0.061617281287908554,
0.6673535108566284,
-0.6255847811698914,
1.0837160348892212,
0.7990994453430176,
0.9618184566497803,
0.18751992285251617,
0.5126184225082397,
0.49879950284957886,
-0.3147285282611847,
-1.1043808460235596,
-0.2603669762611389,
-1.1000243425369263,
-2.5409064292907715,
0.517462968826294,
-0.3150569796562195,
-1.4743424654006958,
-0.06368369609117508,
-0.9434570670127869,
0.8678362369537354,
-0.6500576138496399,
-1.0745527744293213,
-1.4452989101409912,
0.2374427169561386,
-0.029605071991682053,
0.9964059591293335,
-1.5421000719070435,
-0.18405677378177643,
1.1868088245391846,
0.9960846900939941,
-0.7080252766609192,
0.9974195957183838,
0.3350672721862793,
1.0298720598220825,
0.8775185346603394,
-0.38272351026535034,
0.5168198347091675,
0.09388794004917145,
-1.2982922792434692,
0.4063676595687866,
1.2099990844726562,
0.29733410477638245,
1.369983196258545,
-0.5729407668113708,
-0.011868536472320557,
0.400810569524765,
-0.4212493896484375,
-0.40319395065307617,
-0.5770428776741028,
0.6867541670799255,
0.06973494589328766,
-0.8921495079994202,
-0.13908857107162476,
-0.18567852675914764,
-0.19950652122497559,
0.26234331727027893,
-1.487411379814148,
-0.141646146774292,
-0.4569076597690582,
-0.4698762893676758,
-1.2653470039367676,
-0.12529128789901733,
1.4300765991210938,
-0.7121046781539917,
-0.12210866808891296,
0.4647991955280304,
0.29254093766212463,
0.48881101608276367,
0.5418033003807068,
-0.7026129961013794,
-0.304763525724411,
-0.35904285311698914,
-0.35501953959465027,
0.27950894832611084,
1.295159101486206,
-0.09528423100709915,
-1.0658437013626099,
0.6617047190666199,
-0.3501114845275879,
0.07584397494792938,
1.9063770771026611,
0.05471331253647804,
-0.803967297077179,
0.2607516348361969,
-0.5990250110626221,
1.933363914489746,
1.7187066078186035,
1.2707494497299194,
-0.12660099565982819,
-1.0019829273223877,
0.7460336685180664,
-0.3408587574958801,
-0.3816920518875122,
0.7786315083503723,
0.4402475357055664,
-0.32665833830833435,
-1.5480228662490845,
0.7095468044281006,
1.208282709121704,
-0.9387670755386353,
-0.7429399490356445,
0.1416793167591095,
-0.8136280179023743,
1.068371057510376,
0.7392166256904602,
0.39680543541908264,
0.25959542393684387,
1.691451072692871,
0.7465701699256897,
-0.46104320883750916,
0.5541234612464905,
0.5096275806427002,
-0.19281506538391113,
-2.073211431503296,
-1.1683104038238525,
0.29875054955482483,
-0.4353152811527252,
-1.5185528993606567,
1.467059850692749,
-1.2268394231796265,
-1.0118041038513184,
0.4263521730899811,
0.11728473007678986,
1.357302188873291,
0.34470808506011963,
1.6743775606155396,
2.048539161682129,
0.8427313566207886,
0.34933948516845703,
1.293493390083313,
-0.17538321018218994,
-0.4197717607021332,
1.7834340333938599,
-0.46424591541290283,
0.5230316519737244,
1.1745494604110718,
-0.4058683514595032,
-1.0831913948059082,
-0.8451662063598633,
-1.2151639461517334,
-0.7851464152336121,
1.1747947931289673,
0.06826268136501312,
-1.1401503086090088,
0.36769187450408936,
1.6305981874465942,
0.09413131326436996,
-0.34565162658691406,
0.7219193577766418,
0.49477332830429077,
-0.7936718463897705,
-0.11745920777320862,
-0.941874623298645,
0.6578452587127686,
-0.23060190677642822,
-0.2970089912414551,
0.32349586486816406,
0.43472880125045776,
1.3697015047073364,
-0.009373129345476627,
0.11101332306861877,
1.1499792337417603,
-1.3669817447662354,
1.4978429079055786,
-0.6325072646141052,
0.19415967166423798,
-2.3707644939422607,
1.411960482597351,
-0.7653109431266785,
1.907471776008606,
-2.6047775745391846,
0.4957069158554077,
-0.5332263708114624,
-0.3731258809566498,
0.29020246863365173,
-0.2832644283771515,
0.17904667556285858,
-0.18505676090717316,
-1.0534214973449707,
-0.13299769163131714,
-0.701104462146759,
0.6358222365379333,
1.0625473260879517,
1.362861156463623,
-1.1018811464309692,
-0.2452506273984909,
-1.7513741254806519,
-0.0660381093621254,
-0.7270395159721375,
0.22514910995960236,
-1.8596363067626953,
-0.24569891393184662,
-1.970478892326355,
-2.4669411182403564,
-1.3155605792999268,
-0.7299346923828125,
1.0557998418807983,
0.13483689725399017,
-0.9470723271369934,
1.2806860208511353,
-0.36487624049186707,
-1.8324406147003174,
1.132346510887146,
-2.0890045166015625
] |
https://github.com/huggingface/datasets/issues/5402
|
Missing state.json when creating a cloud dataset using a dataset_builder
|
`load_from_disk` must be used on datasets saved using `save_to_disk`: they correspond to fully serialized datasets including their state.
On the other hand, `download_and_prepare` just downloads the raw data and convert them to arrow (or parquet if you want). We are working on allowing you to reload a dataset saved on S3 with `download_and_prepare` using `load_dataset` in #5281
For now I'd encourage you to keep using `save_to_disk`
|
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
| 357 | 66 |
Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
`load_from_disk` must be used on datasets saved using `save_to_disk`: they correspond to fully serialized datasets including their state.
On the other hand, `download_and_prepare` just downloads the raw data and convert them to arrow (or parquet if you want). We are working on allowing you to reload a dataset saved on S3 with `download_and_prepare` using `load_dataset` in #5281
For now I'd encourage you to keep using `save_to_disk`
|
[
-1.2194854021072388,
-0.9229915738105774,
-0.633399486541748,
1.543872594833374,
-0.1812359094619751,
-1.2233837842941284,
0.22043099999427795,
-1.0921630859375,
1.6815913915634155,
-0.8181195259094238,
0.33051154017448425,
-1.6326212882995605,
-0.0265568345785141,
-0.5852939486503601,
-0.7187764048576355,
-0.8392133116722107,
-0.4346570670604706,
-0.7455413937568665,
1.084931492805481,
2.376081705093384,
1.215342402458191,
-1.3835088014602661,
2.7627649307250977,
0.7012985944747925,
-0.2210545390844345,
-0.909276008605957,
0.4137589633464813,
-0.015427516773343086,
-1.22566556930542,
-0.4910249412059784,
-0.8574204444885254,
-0.15351934731006622,
-0.518734335899353,
-0.47715017199516296,
0.015820205211639404,
0.4729089140892029,
-0.3779304325580597,
-0.40409401059150696,
-0.6106261014938354,
-0.7873607277870178,
0.44605380296707153,
-0.3411308228969574,
0.9632939696311951,
-0.2668205499649048,
1.831154704093933,
-0.5785771608352661,
0.487779438495636,
0.7416595816612244,
1.2427020072937012,
0.1469285935163498,
0.05056610703468323,
0.4419704079627991,
0.32346418499946594,
-0.09097055345773697,
0.494793176651001,
1.1810330152511597,
0.6280276775360107,
0.5525398850440979,
0.7525271773338318,
-2.2379908561706543,
1.2903764247894287,
-1.0450570583343506,
0.3460903763771057,
1.3416827917099,
-0.954380452632904,
0.301019549369812,
-1.6672210693359375,
-0.048029039055109024,
0.5234081149101257,
-2.22552227973938,
0.38006141781806946,
-1.209571361541748,
-0.5623109340667725,
0.9637548923492432,
0.38146379590034485,
-1.169110655784607,
0.21050956845283508,
-0.48563235998153687,
1.1104899644851685,
0.3775978088378906,
1.029144287109375,
-1.741883397102356,
-0.055221959948539734,
-0.18748709559440613,
0.10875877737998962,
-1.3213375806808472,
-1.6340651512145996,
0.5794855952262878,
0.6076478362083435,
0.7523673176765442,
-0.21237091720104218,
1.1819995641708374,
-1.0506449937820435,
0.8303849101066589,
-1.1589535474777222,
-1.6318401098251343,
-1.5079436302185059,
-2.3814268112182617,
-2.3048837184906006,
0.6472412943840027,
-0.4973536729812622,
-0.5352426171302795,
2.0803534984588623,
-0.8989126086235046,
-1.677027940750122,
1.1305592060089111,
0.1834409236907959,
-0.0466410294175148,
2.32247257232666,
0.2568332850933075,
-0.6823422312736511,
0.4511304497718811,
-0.7513392567634583,
0.8631049394607544,
-0.2975996732711792,
1.3277921676635742,
0.44870373606681824,
-1.0581721067428589,
1.4905948638916016,
-0.31688258051872253,
0.7025903463363647,
-0.5474255084991455,
-0.5989091396331787,
-0.8637651801109314,
0.2958613932132721,
1.8413509130477905,
-0.2633516192436218,
1.5782827138900757,
-0.36001497507095337,
-1.588975429534912,
-1.7615160942077637,
0.9598921537399292,
0.33932599425315857,
-0.7827269434928894,
0.0972360372543335,
-0.4749329388141632,
0.16876189410686493,
-0.14704540371894836,
1.2500511407852173,
1.3276435136795044,
0.675918459892273,
-0.426461786031723,
-0.7810590863227844,
0.13563407957553864,
-0.1092056855559349,
-0.7289217710494995,
-1.7013906240463257,
-0.37728118896484375,
0.12907028198242188,
0.4888884127140045,
-1.1429966688156128,
1.7944976091384888,
0.918117344379425,
1.9349030256271362,
1.027974247932434,
-0.318303644657135,
1.396639347076416,
0.038087885826826096,
1.8550283908843994,
-0.6159307956695557,
0.5951684713363647,
-0.31874772906303406,
-1.1178025007247925,
0.9655787348747253,
-0.31525489687919617,
-2.13887882232666,
-0.764604389667511,
-0.7350086569786072,
-0.23395398259162903,
-0.7379035949707031,
0.8593751788139343,
-0.2902606129646301,
-1.5973771810531616,
0.18458180129528046,
-0.6682021617889404,
0.22349613904953003,
-1.1047356128692627,
0.3040356934070587,
0.7383150458335876,
-0.6255828738212585,
0.031236309558153152,
-0.16353408992290497,
-1.2790526151657104,
-0.39282044768333435,
0.4738560914993286,
1.9056109189987183,
-0.6423056125640869,
0.9030787944793701,
1.0480709075927734,
-0.7366645932197571,
0.11517497152090073,
0.14140930771827698,
-0.18287809193134308,
0.7897299528121948,
-1.1204911470413208,
-0.4311027228832245,
1.1282519102096558,
-0.28915539383888245,
-0.6196425557136536,
1.4679962396621704,
0.7804561853408813,
-1.0652830600738525,
-0.13293512165546417,
-0.16926880180835724,
-0.9085699915885925,
-0.04477556422352791,
-1.4559000730514526,
-0.12075738608837128,
0.4057964086532593,
-1.5226168632507324,
-0.529763400554657,
-0.26026585698127747,
1.2470674514770508,
-0.24902594089508057,
1.3527106046676636,
-0.33720511198043823,
-0.19744770228862762,
-0.26771974563598633,
-0.42296770215034485,
0.16066348552703857,
-0.21606329083442688,
-0.532528817653656,
0.12346754223108292,
-0.6708405613899231,
0.41422197222709656,
1.479422688484192,
0.2558709979057312,
0.09021347016096115,
0.44938892126083374,
1.1849206686019897,
0.48978090286254883,
-0.03996271640062332,
-0.8079249262809753,
-1.4980416297912598,
1.9269745349884033,
-1.4300341606140137,
1.9692639112472534,
0.6563408374786377,
-0.026364963501691818,
-1.82016921043396,
-1.9124950170516968,
1.3095190525054932,
1.2025048732757568,
2.2816052436828613,
0.4886930584907532,
0.35328951478004456,
-0.7813681364059448,
-0.7819536924362183,
0.30672985315322876,
-1.0111184120178223,
-0.5961089730262756,
0.15259967744350433,
2.373852014541626,
1.8535269498825073,
-0.4701203405857086,
-0.22792819142341614,
-0.9151384234428406,
1.4776115417480469,
-0.23618797957897186,
0.25699228048324585,
2.046935796737671,
-0.18809272348880768,
-1.0217061042785645,
1.4140691757202148,
-2.4061882495880127,
0.30730611085891724,
2.075443983078003,
0.2967072129249573,
0.10339411348104477,
-1.3731937408447266,
-0.6179061532020569,
-0.3773905336856842,
-0.36506325006484985,
-1.2523490190505981,
0.464905321598053,
-0.2760259807109833,
-0.6988512873649597,
-1.4254326820373535,
0.2048635631799698,
-1.124773383140564,
-1.656160831451416,
0.24515807628631592,
1.9720442295074463,
1.9786771535873413,
-0.6908029913902283,
1.5402382612228394,
-0.39101442694664,
0.09259753674268723,
1.2728161811828613,
1.29768967628479,
3.106719493865967,
1.873313069343567,
-1.2529911994934082,
0.6301600933074951,
-0.1493225246667862,
-0.5135296583175659,
1.147649884223938,
-1.2079540491104126,
1.3383492231369019,
-0.0666976347565651,
-1.108494520187378,
-1.2799162864685059,
1.0289191007614136,
0.4701997935771942,
0.046056099236011505,
-0.5065719485282898,
1.1712708473205566,
0.09920400381088257,
1.3095792531967163,
0.5755500793457031,
-0.39339786767959595,
0.5410846471786499,
-0.4405674934387207,
-0.5986077785491943,
1.5307929515838623,
0.2835841774940491,
-1.453150987625122,
-2.2125003337860107,
-0.29764434695243835,
-0.8716036677360535,
0.11858338862657547,
-0.6840187907218933,
-0.9771425127983093,
1.6782259941101074,
0.3134539723396301,
-1.2634798288345337,
-0.23092207312583923,
-0.2461129128932953,
-0.4112437069416046,
2.7615842819213867,
-1.2463032007217407,
-0.16529808938503265,
-0.958936870098114,
-0.7070732712745667,
1.6732208728790283,
-1.2563151121139526,
-0.40374428033828735,
-1.1808141469955444,
-0.5893768072128296,
-1.1331664323806763,
-0.39117783308029175,
0.041552599519491196,
-0.9104239344596863,
0.8372994065284729,
0.11321506649255753,
-1.1846237182617188,
-0.3677622973918915,
-0.9264112710952759,
1.0684888362884521,
-0.20438063144683838,
0.12639829516410828,
1.7364150285720825,
0.3225943446159363,
-0.4725038707256317,
0.8419082164764404,
1.2566903829574585,
0.6774713397026062,
-0.7042993307113647,
0.06031588837504387,
-0.6805232763290405,
0.30715444684028625,
-1.2812631130218506,
0.3346528112888336,
-2.9207913875579834,
0.6251894235610962,
-0.11905026435852051,
-0.1741587370634079,
-0.04803408309817314,
-1.3825793266296387,
1.0191335678100586,
2.5768015384674072,
-1.2353659868240356,
0.4690575897693634,
0.4038171172142029,
1.1184982061386108,
-1.6311652660369873,
0.310833215713501,
-0.48227623105049133,
2.065009355545044,
0.19261088967323303,
1.2812800407409668,
-0.48785167932510376,
-2.334179401397705,
0.5612648129463196,
-1.2462503910064697,
-1.2383558750152588,
0.776458203792572,
-0.9228771328926086,
0.28416377305984497,
-1.3430709838867188,
-0.2490813434123993,
-0.9077454209327698,
-1.2365063428878784,
0.6318944692611694,
0.16588044166564941,
0.2595505714416504,
-0.5120671987533569,
0.34089428186416626,
-2.229076385498047,
-1.3781440258026123,
-0.20613200962543488,
-1.0161831378936768,
0.6062260270118713,
-0.5271359086036682,
0.6323521137237549,
-0.1441897600889206,
0.013748356141149998,
0.26830896735191345,
1.6216663122177124,
3.373814821243286,
0.10226082056760788,
0.27214500308036804,
-0.10944415628910065,
-0.9360423684120178,
1.4120367765426636,
0.9048025608062744,
-0.010067785158753395,
-0.5629087686538696,
-1.12958562374115,
1.2901661396026611,
1.9922676086425781,
1.118446707725525,
-0.11085755378007889,
-0.797692060470581,
-0.7581532001495361,
-0.013590643182396889,
0.16570328176021576,
0.5357938408851624,
0.9370177984237671,
0.1109314039349556,
0.04657423496246338,
1.4277729988098145,
1.1291991472244263,
-0.34800106287002563,
0.3641279637813568,
-0.8613408207893372,
-0.4994509816169739,
0.3512219488620758,
0.27544599771499634,
-0.024292543530464172,
0.4137532413005829,
-1.0118523836135864,
-0.1997392624616623,
-0.4752258062362671,
-0.8080120086669922,
-0.74632328748703,
-0.5033827424049377,
-0.47119277715682983,
1.643430233001709,
0.10389351844787598,
-0.5160543322563171,
-0.047291677445173264,
-0.6704533100128174,
-0.11280573904514313,
-1.1258907318115234,
0.3173142075538635,
-0.09179402142763138,
-0.19439664483070374,
-0.1039477288722992,
1.6081184148788452,
-0.9896637201309204,
-2.0090653896331787,
0.11786141246557236,
0.22949102520942688,
-0.17362907528877258,
0.1938031017780304,
1.5454094409942627,
0.5122904181480408,
1.3809345960617065,
1.3280391693115234,
0.9794194102287292,
-0.6913957595825195,
-1.3178791999816895,
0.7611593008041382,
0.9402506351470947,
-1.3446762561798096,
0.7836408615112305,
-0.1324639618396759,
-0.5167685747146606,
0.6532994508743286,
1.2801110744476318,
0.5268833041191101,
-2.0432541370391846,
0.9018242955207825,
-1.0342358350753784,
0.8809205889701843,
0.8377366662025452,
0.6331433653831482,
0.21825215220451355,
0.8921504020690918,
-1.2189550399780273,
-1.1631041765213013,
-0.6926145553588867,
-0.7769926190376282,
1.8712446689605713,
-0.3904976546764374,
0.6599079966545105,
-0.2217714488506317,
-1.2093373537063599,
-0.10324196517467499,
0.7839162349700928,
0.39968356490135193,
-0.5338903069496155,
0.8150222897529602,
-0.6753062009811401,
-0.9731564521789551,
-1.2623685598373413,
-0.45310062170028687,
-1.1389718055725098,
-1.0011540651321411,
1.0124605894088745,
0.7611362934112549,
0.40341484546661377,
1.9400161504745483,
0.7569432854652405,
0.4076819121837616,
-2.567136526107788,
0.8265410661697388,
0.2444119155406952,
-0.028812836855649948,
0.856232762336731,
0.41612449288368225,
1.0629949569702148,
0.004324415698647499,
0.6711257100105286,
-2.4099647998809814,
2.2685344219207764,
-0.24156443774700165,
0.6307706832885742,
-0.0858922228217125,
-0.2301853448152542,
1.1933611631393433,
0.6172868013381958,
0.449966698884964,
-1.120998501777649,
0.6168481707572937,
-0.5035678148269653,
1.1010353565216064,
0.8362438678741455,
-0.7892425060272217,
0.015731219202280045,
1.379745602607727,
0.4086180329322815,
-0.5730112195014954,
-0.9828301072120667,
-0.9379963278770447,
0.9628506302833557,
1.569935917854309,
-0.07259804755449295,
-0.06853719055652618,
0.7915571331977844,
0.7380875945091248,
-1.3133008480072021,
0.1321289837360382,
-0.6477338671684265,
-0.7368477582931519,
1.5918477773666382,
2.0001518726348877,
-0.19952619075775146,
-0.10916060209274292,
-0.6748788952827454,
-1.2735506296157837,
0.8431422710418701,
-0.056177642196416855,
-0.0009115934371948242,
0.5521337389945984,
-0.5984728932380676,
0.9879540801048279,
0.7339654564857483,
0.9799970984458923,
0.07830145955085754,
0.32270023226737976,
0.4625813066959381,
-0.36733314394950867,
-1.248260259628296,
-0.3678326904773712,
-0.9945983290672302,
-2.5861005783081055,
0.41961193084716797,
-0.21772445738315582,
-1.4920753240585327,
0.06383239477872849,
-1.0501184463500977,
0.9739667177200317,
-0.5839561820030212,
-1.1559361219406128,
-1.5946025848388672,
0.2340611219406128,
-0.07897908985614777,
0.9857050776481628,
-1.5324182510375977,
-0.20306658744812012,
1.1399517059326172,
0.7769447565078735,
-0.6447164416313171,
0.9890369176864624,
0.0913771241903305,
0.9723954200744629,
0.8312052488327026,
-0.3539894223213196,
0.6026670932769775,
0.05476631596684456,
-1.3741902112960815,
0.48148247599601746,
1.1747742891311646,
0.1730765402317047,
1.4804455041885376,
-0.4705196022987366,
0.07874477654695511,
0.4266173541545868,
-0.7009238004684448,
-0.4684099555015564,
-0.4359378218650818,
0.6497223377227783,
-0.0308479405939579,
-0.8659762144088745,
-0.08956905454397202,
-0.07298900932073593,
-0.33249548077583313,
0.154084712266922,
-1.4703673124313354,
-0.17330382764339447,
-0.4422914981842041,
-0.558323085308075,
-1.2451739311218262,
-0.013024380430579185,
1.3505399227142334,
-0.6375030279159546,
-0.2624830901622772,
0.473092257976532,
0.4209235906600952,
0.5344753265380859,
0.6124781370162964,
-0.6931408643722534,
-0.19286048412322998,
-0.3809266984462738,
-0.3133140206336975,
0.3428928554058075,
1.2924997806549072,
-0.11134365946054459,
-0.9723476767539978,
0.7089694738388062,
-0.3610769808292389,
0.1069730594754219,
1.890843152999878,
0.12614528834819794,
-0.6617276668548584,
0.3319288194179535,
-0.7401455044746399,
1.87368643283844,
1.7779042720794678,
1.308057188987732,
-0.14303642511367798,
-0.9873086810112,
0.6413382291793823,
-0.341281920671463,
-0.30197393894195557,
0.8955125212669373,
0.3595818281173706,
-0.23474633693695068,
-1.404848575592041,
0.8949692249298096,
1.2843947410583496,
-0.7921449542045593,
-0.835209846496582,
0.22766909003257751,
-0.7607282400131226,
1.1521350145339966,
0.5117071270942688,
0.35263243317604065,
0.30411002039909363,
1.6767224073410034,
0.8622565865516663,
-0.45373985171318054,
0.5995149612426758,
0.6132880449295044,
-0.1704912781715393,
-2.0681285858154297,
-1.1586707830429077,
0.4024963080883026,
-0.6481624245643616,
-1.6296169757843018,
1.4391194581985474,
-1.0699630975723267,
-1.1068017482757568,
0.5931758284568787,
0.021360941231250763,
1.3889726400375366,
0.38376566767692566,
1.5717265605926514,
2.1361000537872314,
0.7749792337417603,
0.5597901940345764,
1.2222349643707275,
-0.14927148818969727,
-0.4632290005683899,
1.8654463291168213,
-0.43247780203819275,
0.4228925108909607,
1.1251929998397827,
-0.35368669033050537,
-1.0750092267990112,
-0.8075671195983887,
-1.2158455848693848,
-0.717867910861969,
1.0769656896591187,
0.03558022528886795,
-1.0328853130340576,
0.2484416663646698,
1.5502755641937256,
0.16428877413272858,
-0.3092150390148163,
0.6738796234130859,
0.3086138665676117,
-0.8120874762535095,
-0.09768448770046234,
-0.9540132880210876,
0.5545883178710938,
-0.2783947288990021,
-0.3330749273300171,
0.27651646733283997,
0.49984413385391235,
1.3166704177856445,
-0.026790320873260498,
0.14097650349140167,
1.0466527938842773,
-1.4714421033859253,
1.4711135625839233,
-0.6111712455749512,
0.32630258798599243,
-2.375150442123413,
1.3693389892578125,
-0.6392119526863098,
2.014979600906372,
-2.6105756759643555,
0.42701926827430725,
-0.6195071339607239,
-0.48975589871406555,
0.41937732696533203,
-0.2635325789451599,
0.07609021663665771,
-0.1480548083782196,
-1.1048301458358765,
0.09830187261104584,
-0.65203458070755,
0.6557776927947998,
1.1028242111206055,
1.4066811800003052,
-1.0886640548706055,
-0.27416735887527466,
-1.6821693181991577,
-0.1168435737490654,
-0.8118355870246887,
0.3395610749721527,
-1.972220778465271,
-0.13470955193042755,
-1.9331635236740112,
-2.387094020843506,
-1.170802354812622,
-0.7938960790634155,
1.0243602991104126,
0.1392180472612381,
-0.796553373336792,
1.3591039180755615,
-0.3288988173007965,
-1.8239535093307495,
1.1088615655899048,
-2.1283700466156006
] |
https://github.com/huggingface/datasets/issues/5402
|
Missing state.json when creating a cloud dataset using a dataset_builder
|
Thanks, I'll follow that issue.
I was following the [cloud storage](https://huggingface.co/docs/datasets/filesystems) docs section and perhaps I'm missing some part of the flow; start with `load_dataset_builder` + `download_and_prepare`. You say I need an explicit `save_to_disk` but what object needs to be saved? the builder? is that related to the other issue?
|
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
| 357 | 50 |
Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
Thanks, I'll follow that issue.
I was following the [cloud storage](https://huggingface.co/docs/datasets/filesystems) docs section and perhaps I'm missing some part of the flow; start with `load_dataset_builder` + `download_and_prepare`. You say I need an explicit `save_to_disk` but what object needs to be saved? the builder? is that related to the other issue?
|
[
-1.2194854021072388,
-0.9229915738105774,
-0.633399486541748,
1.543872594833374,
-0.1812359094619751,
-1.2233837842941284,
0.22043099999427795,
-1.0921630859375,
1.6815913915634155,
-0.8181195259094238,
0.33051154017448425,
-1.6326212882995605,
-0.0265568345785141,
-0.5852939486503601,
-0.7187764048576355,
-0.8392133116722107,
-0.4346570670604706,
-0.7455413937568665,
1.084931492805481,
2.376081705093384,
1.215342402458191,
-1.3835088014602661,
2.7627649307250977,
0.7012985944747925,
-0.2210545390844345,
-0.909276008605957,
0.4137589633464813,
-0.015427516773343086,
-1.22566556930542,
-0.4910249412059784,
-0.8574204444885254,
-0.15351934731006622,
-0.518734335899353,
-0.47715017199516296,
0.015820205211639404,
0.4729089140892029,
-0.3779304325580597,
-0.40409401059150696,
-0.6106261014938354,
-0.7873607277870178,
0.44605380296707153,
-0.3411308228969574,
0.9632939696311951,
-0.2668205499649048,
1.831154704093933,
-0.5785771608352661,
0.487779438495636,
0.7416595816612244,
1.2427020072937012,
0.1469285935163498,
0.05056610703468323,
0.4419704079627991,
0.32346418499946594,
-0.09097055345773697,
0.494793176651001,
1.1810330152511597,
0.6280276775360107,
0.5525398850440979,
0.7525271773338318,
-2.2379908561706543,
1.2903764247894287,
-1.0450570583343506,
0.3460903763771057,
1.3416827917099,
-0.954380452632904,
0.301019549369812,
-1.6672210693359375,
-0.048029039055109024,
0.5234081149101257,
-2.22552227973938,
0.38006141781806946,
-1.209571361541748,
-0.5623109340667725,
0.9637548923492432,
0.38146379590034485,
-1.169110655784607,
0.21050956845283508,
-0.48563235998153687,
1.1104899644851685,
0.3775978088378906,
1.029144287109375,
-1.741883397102356,
-0.055221959948539734,
-0.18748709559440613,
0.10875877737998962,
-1.3213375806808472,
-1.6340651512145996,
0.5794855952262878,
0.6076478362083435,
0.7523673176765442,
-0.21237091720104218,
1.1819995641708374,
-1.0506449937820435,
0.8303849101066589,
-1.1589535474777222,
-1.6318401098251343,
-1.5079436302185059,
-2.3814268112182617,
-2.3048837184906006,
0.6472412943840027,
-0.4973536729812622,
-0.5352426171302795,
2.0803534984588623,
-0.8989126086235046,
-1.677027940750122,
1.1305592060089111,
0.1834409236907959,
-0.0466410294175148,
2.32247257232666,
0.2568332850933075,
-0.6823422312736511,
0.4511304497718811,
-0.7513392567634583,
0.8631049394607544,
-0.2975996732711792,
1.3277921676635742,
0.44870373606681824,
-1.0581721067428589,
1.4905948638916016,
-0.31688258051872253,
0.7025903463363647,
-0.5474255084991455,
-0.5989091396331787,
-0.8637651801109314,
0.2958613932132721,
1.8413509130477905,
-0.2633516192436218,
1.5782827138900757,
-0.36001497507095337,
-1.588975429534912,
-1.7615160942077637,
0.9598921537399292,
0.33932599425315857,
-0.7827269434928894,
0.0972360372543335,
-0.4749329388141632,
0.16876189410686493,
-0.14704540371894836,
1.2500511407852173,
1.3276435136795044,
0.675918459892273,
-0.426461786031723,
-0.7810590863227844,
0.13563407957553864,
-0.1092056855559349,
-0.7289217710494995,
-1.7013906240463257,
-0.37728118896484375,
0.12907028198242188,
0.4888884127140045,
-1.1429966688156128,
1.7944976091384888,
0.918117344379425,
1.9349030256271362,
1.027974247932434,
-0.318303644657135,
1.396639347076416,
0.038087885826826096,
1.8550283908843994,
-0.6159307956695557,
0.5951684713363647,
-0.31874772906303406,
-1.1178025007247925,
0.9655787348747253,
-0.31525489687919617,
-2.13887882232666,
-0.764604389667511,
-0.7350086569786072,
-0.23395398259162903,
-0.7379035949707031,
0.8593751788139343,
-0.2902606129646301,
-1.5973771810531616,
0.18458180129528046,
-0.6682021617889404,
0.22349613904953003,
-1.1047356128692627,
0.3040356934070587,
0.7383150458335876,
-0.6255828738212585,
0.031236309558153152,
-0.16353408992290497,
-1.2790526151657104,
-0.39282044768333435,
0.4738560914993286,
1.9056109189987183,
-0.6423056125640869,
0.9030787944793701,
1.0480709075927734,
-0.7366645932197571,
0.11517497152090073,
0.14140930771827698,
-0.18287809193134308,
0.7897299528121948,
-1.1204911470413208,
-0.4311027228832245,
1.1282519102096558,
-0.28915539383888245,
-0.6196425557136536,
1.4679962396621704,
0.7804561853408813,
-1.0652830600738525,
-0.13293512165546417,
-0.16926880180835724,
-0.9085699915885925,
-0.04477556422352791,
-1.4559000730514526,
-0.12075738608837128,
0.4057964086532593,
-1.5226168632507324,
-0.529763400554657,
-0.26026585698127747,
1.2470674514770508,
-0.24902594089508057,
1.3527106046676636,
-0.33720511198043823,
-0.19744770228862762,
-0.26771974563598633,
-0.42296770215034485,
0.16066348552703857,
-0.21606329083442688,
-0.532528817653656,
0.12346754223108292,
-0.6708405613899231,
0.41422197222709656,
1.479422688484192,
0.2558709979057312,
0.09021347016096115,
0.44938892126083374,
1.1849206686019897,
0.48978090286254883,
-0.03996271640062332,
-0.8079249262809753,
-1.4980416297912598,
1.9269745349884033,
-1.4300341606140137,
1.9692639112472534,
0.6563408374786377,
-0.026364963501691818,
-1.82016921043396,
-1.9124950170516968,
1.3095190525054932,
1.2025048732757568,
2.2816052436828613,
0.4886930584907532,
0.35328951478004456,
-0.7813681364059448,
-0.7819536924362183,
0.30672985315322876,
-1.0111184120178223,
-0.5961089730262756,
0.15259967744350433,
2.373852014541626,
1.8535269498825073,
-0.4701203405857086,
-0.22792819142341614,
-0.9151384234428406,
1.4776115417480469,
-0.23618797957897186,
0.25699228048324585,
2.046935796737671,
-0.18809272348880768,
-1.0217061042785645,
1.4140691757202148,
-2.4061882495880127,
0.30730611085891724,
2.075443983078003,
0.2967072129249573,
0.10339411348104477,
-1.3731937408447266,
-0.6179061532020569,
-0.3773905336856842,
-0.36506325006484985,
-1.2523490190505981,
0.464905321598053,
-0.2760259807109833,
-0.6988512873649597,
-1.4254326820373535,
0.2048635631799698,
-1.124773383140564,
-1.656160831451416,
0.24515807628631592,
1.9720442295074463,
1.9786771535873413,
-0.6908029913902283,
1.5402382612228394,
-0.39101442694664,
0.09259753674268723,
1.2728161811828613,
1.29768967628479,
3.106719493865967,
1.873313069343567,
-1.2529911994934082,
0.6301600933074951,
-0.1493225246667862,
-0.5135296583175659,
1.147649884223938,
-1.2079540491104126,
1.3383492231369019,
-0.0666976347565651,
-1.108494520187378,
-1.2799162864685059,
1.0289191007614136,
0.4701997935771942,
0.046056099236011505,
-0.5065719485282898,
1.1712708473205566,
0.09920400381088257,
1.3095792531967163,
0.5755500793457031,
-0.39339786767959595,
0.5410846471786499,
-0.4405674934387207,
-0.5986077785491943,
1.5307929515838623,
0.2835841774940491,
-1.453150987625122,
-2.2125003337860107,
-0.29764434695243835,
-0.8716036677360535,
0.11858338862657547,
-0.6840187907218933,
-0.9771425127983093,
1.6782259941101074,
0.3134539723396301,
-1.2634798288345337,
-0.23092207312583923,
-0.2461129128932953,
-0.4112437069416046,
2.7615842819213867,
-1.2463032007217407,
-0.16529808938503265,
-0.958936870098114,
-0.7070732712745667,
1.6732208728790283,
-1.2563151121139526,
-0.40374428033828735,
-1.1808141469955444,
-0.5893768072128296,
-1.1331664323806763,
-0.39117783308029175,
0.041552599519491196,
-0.9104239344596863,
0.8372994065284729,
0.11321506649255753,
-1.1846237182617188,
-0.3677622973918915,
-0.9264112710952759,
1.0684888362884521,
-0.20438063144683838,
0.12639829516410828,
1.7364150285720825,
0.3225943446159363,
-0.4725038707256317,
0.8419082164764404,
1.2566903829574585,
0.6774713397026062,
-0.7042993307113647,
0.06031588837504387,
-0.6805232763290405,
0.30715444684028625,
-1.2812631130218506,
0.3346528112888336,
-2.9207913875579834,
0.6251894235610962,
-0.11905026435852051,
-0.1741587370634079,
-0.04803408309817314,
-1.3825793266296387,
1.0191335678100586,
2.5768015384674072,
-1.2353659868240356,
0.4690575897693634,
0.4038171172142029,
1.1184982061386108,
-1.6311652660369873,
0.310833215713501,
-0.48227623105049133,
2.065009355545044,
0.19261088967323303,
1.2812800407409668,
-0.48785167932510376,
-2.334179401397705,
0.5612648129463196,
-1.2462503910064697,
-1.2383558750152588,
0.776458203792572,
-0.9228771328926086,
0.28416377305984497,
-1.3430709838867188,
-0.2490813434123993,
-0.9077454209327698,
-1.2365063428878784,
0.6318944692611694,
0.16588044166564941,
0.2595505714416504,
-0.5120671987533569,
0.34089428186416626,
-2.229076385498047,
-1.3781440258026123,
-0.20613200962543488,
-1.0161831378936768,
0.6062260270118713,
-0.5271359086036682,
0.6323521137237549,
-0.1441897600889206,
0.013748356141149998,
0.26830896735191345,
1.6216663122177124,
3.373814821243286,
0.10226082056760788,
0.27214500308036804,
-0.10944415628910065,
-0.9360423684120178,
1.4120367765426636,
0.9048025608062744,
-0.010067785158753395,
-0.5629087686538696,
-1.12958562374115,
1.2901661396026611,
1.9922676086425781,
1.118446707725525,
-0.11085755378007889,
-0.797692060470581,
-0.7581532001495361,
-0.013590643182396889,
0.16570328176021576,
0.5357938408851624,
0.9370177984237671,
0.1109314039349556,
0.04657423496246338,
1.4277729988098145,
1.1291991472244263,
-0.34800106287002563,
0.3641279637813568,
-0.8613408207893372,
-0.4994509816169739,
0.3512219488620758,
0.27544599771499634,
-0.024292543530464172,
0.4137532413005829,
-1.0118523836135864,
-0.1997392624616623,
-0.4752258062362671,
-0.8080120086669922,
-0.74632328748703,
-0.5033827424049377,
-0.47119277715682983,
1.643430233001709,
0.10389351844787598,
-0.5160543322563171,
-0.047291677445173264,
-0.6704533100128174,
-0.11280573904514313,
-1.1258907318115234,
0.3173142075538635,
-0.09179402142763138,
-0.19439664483070374,
-0.1039477288722992,
1.6081184148788452,
-0.9896637201309204,
-2.0090653896331787,
0.11786141246557236,
0.22949102520942688,
-0.17362907528877258,
0.1938031017780304,
1.5454094409942627,
0.5122904181480408,
1.3809345960617065,
1.3280391693115234,
0.9794194102287292,
-0.6913957595825195,
-1.3178791999816895,
0.7611593008041382,
0.9402506351470947,
-1.3446762561798096,
0.7836408615112305,
-0.1324639618396759,
-0.5167685747146606,
0.6532994508743286,
1.2801110744476318,
0.5268833041191101,
-2.0432541370391846,
0.9018242955207825,
-1.0342358350753784,
0.8809205889701843,
0.8377366662025452,
0.6331433653831482,
0.21825215220451355,
0.8921504020690918,
-1.2189550399780273,
-1.1631041765213013,
-0.6926145553588867,
-0.7769926190376282,
1.8712446689605713,
-0.3904976546764374,
0.6599079966545105,
-0.2217714488506317,
-1.2093373537063599,
-0.10324196517467499,
0.7839162349700928,
0.39968356490135193,
-0.5338903069496155,
0.8150222897529602,
-0.6753062009811401,
-0.9731564521789551,
-1.2623685598373413,
-0.45310062170028687,
-1.1389718055725098,
-1.0011540651321411,
1.0124605894088745,
0.7611362934112549,
0.40341484546661377,
1.9400161504745483,
0.7569432854652405,
0.4076819121837616,
-2.567136526107788,
0.8265410661697388,
0.2444119155406952,
-0.028812836855649948,
0.856232762336731,
0.41612449288368225,
1.0629949569702148,
0.004324415698647499,
0.6711257100105286,
-2.4099647998809814,
2.2685344219207764,
-0.24156443774700165,
0.6307706832885742,
-0.0858922228217125,
-0.2301853448152542,
1.1933611631393433,
0.6172868013381958,
0.449966698884964,
-1.120998501777649,
0.6168481707572937,
-0.5035678148269653,
1.1010353565216064,
0.8362438678741455,
-0.7892425060272217,
0.015731219202280045,
1.379745602607727,
0.4086180329322815,
-0.5730112195014954,
-0.9828301072120667,
-0.9379963278770447,
0.9628506302833557,
1.569935917854309,
-0.07259804755449295,
-0.06853719055652618,
0.7915571331977844,
0.7380875945091248,
-1.3133008480072021,
0.1321289837360382,
-0.6477338671684265,
-0.7368477582931519,
1.5918477773666382,
2.0001518726348877,
-0.19952619075775146,
-0.10916060209274292,
-0.6748788952827454,
-1.2735506296157837,
0.8431422710418701,
-0.056177642196416855,
-0.0009115934371948242,
0.5521337389945984,
-0.5984728932380676,
0.9879540801048279,
0.7339654564857483,
0.9799970984458923,
0.07830145955085754,
0.32270023226737976,
0.4625813066959381,
-0.36733314394950867,
-1.248260259628296,
-0.3678326904773712,
-0.9945983290672302,
-2.5861005783081055,
0.41961193084716797,
-0.21772445738315582,
-1.4920753240585327,
0.06383239477872849,
-1.0501184463500977,
0.9739667177200317,
-0.5839561820030212,
-1.1559361219406128,
-1.5946025848388672,
0.2340611219406128,
-0.07897908985614777,
0.9857050776481628,
-1.5324182510375977,
-0.20306658744812012,
1.1399517059326172,
0.7769447565078735,
-0.6447164416313171,
0.9890369176864624,
0.0913771241903305,
0.9723954200744629,
0.8312052488327026,
-0.3539894223213196,
0.6026670932769775,
0.05476631596684456,
-1.3741902112960815,
0.48148247599601746,
1.1747742891311646,
0.1730765402317047,
1.4804455041885376,
-0.4705196022987366,
0.07874477654695511,
0.4266173541545868,
-0.7009238004684448,
-0.4684099555015564,
-0.4359378218650818,
0.6497223377227783,
-0.0308479405939579,
-0.8659762144088745,
-0.08956905454397202,
-0.07298900932073593,
-0.33249548077583313,
0.154084712266922,
-1.4703673124313354,
-0.17330382764339447,
-0.4422914981842041,
-0.558323085308075,
-1.2451739311218262,
-0.013024380430579185,
1.3505399227142334,
-0.6375030279159546,
-0.2624830901622772,
0.473092257976532,
0.4209235906600952,
0.5344753265380859,
0.6124781370162964,
-0.6931408643722534,
-0.19286048412322998,
-0.3809266984462738,
-0.3133140206336975,
0.3428928554058075,
1.2924997806549072,
-0.11134365946054459,
-0.9723476767539978,
0.7089694738388062,
-0.3610769808292389,
0.1069730594754219,
1.890843152999878,
0.12614528834819794,
-0.6617276668548584,
0.3319288194179535,
-0.7401455044746399,
1.87368643283844,
1.7779042720794678,
1.308057188987732,
-0.14303642511367798,
-0.9873086810112,
0.6413382291793823,
-0.341281920671463,
-0.30197393894195557,
0.8955125212669373,
0.3595818281173706,
-0.23474633693695068,
-1.404848575592041,
0.8949692249298096,
1.2843947410583496,
-0.7921449542045593,
-0.835209846496582,
0.22766909003257751,
-0.7607282400131226,
1.1521350145339966,
0.5117071270942688,
0.35263243317604065,
0.30411002039909363,
1.6767224073410034,
0.8622565865516663,
-0.45373985171318054,
0.5995149612426758,
0.6132880449295044,
-0.1704912781715393,
-2.0681285858154297,
-1.1586707830429077,
0.4024963080883026,
-0.6481624245643616,
-1.6296169757843018,
1.4391194581985474,
-1.0699630975723267,
-1.1068017482757568,
0.5931758284568787,
0.021360941231250763,
1.3889726400375366,
0.38376566767692566,
1.5717265605926514,
2.1361000537872314,
0.7749792337417603,
0.5597901940345764,
1.2222349643707275,
-0.14927148818969727,
-0.4632290005683899,
1.8654463291168213,
-0.43247780203819275,
0.4228925108909607,
1.1251929998397827,
-0.35368669033050537,
-1.0750092267990112,
-0.8075671195983887,
-1.2158455848693848,
-0.717867910861969,
1.0769656896591187,
0.03558022528886795,
-1.0328853130340576,
0.2484416663646698,
1.5502755641937256,
0.16428877413272858,
-0.3092150390148163,
0.6738796234130859,
0.3086138665676117,
-0.8120874762535095,
-0.09768448770046234,
-0.9540132880210876,
0.5545883178710938,
-0.2783947288990021,
-0.3330749273300171,
0.27651646733283997,
0.49984413385391235,
1.3166704177856445,
-0.026790320873260498,
0.14097650349140167,
1.0466527938842773,
-1.4714421033859253,
1.4711135625839233,
-0.6111712455749512,
0.32630258798599243,
-2.375150442123413,
1.3693389892578125,
-0.6392119526863098,
2.014979600906372,
-2.6105756759643555,
0.42701926827430725,
-0.6195071339607239,
-0.48975589871406555,
0.41937732696533203,
-0.2635325789451599,
0.07609021663665771,
-0.1480548083782196,
-1.1048301458358765,
0.09830187261104584,
-0.65203458070755,
0.6557776927947998,
1.1028242111206055,
1.4066811800003052,
-1.0886640548706055,
-0.27416735887527466,
-1.6821693181991577,
-0.1168435737490654,
-0.8118355870246887,
0.3395610749721527,
-1.972220778465271,
-0.13470955193042755,
-1.9331635236740112,
-2.387094020843506,
-1.170802354812622,
-0.7938960790634155,
1.0243602991104126,
0.1392180472612381,
-0.796553373336792,
1.3591039180755615,
-0.3288988173007965,
-1.8239535093307495,
1.1088615655899048,
-2.1283700466156006
] |
https://github.com/huggingface/datasets/issues/5402
|
Missing state.json when creating a cloud dataset using a dataset_builder
|
Right now `load_dataset_builder` + `download_and_prepare` is to be used with tools like dask or spark, but `load_dataset` will support private cloud storage soon as well so you'll be able to reload the dataset with `datasets`.
Right now the only function that can load a dataset from a cloud storage is `load_from_disk`, that must be used with a dataset serialized with `save_to_disk`.
|
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
| 357 | 61 |
Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
Right now `load_dataset_builder` + `download_and_prepare` is to be used with tools like dask or spark, but `load_dataset` will support private cloud storage soon as well so you'll be able to reload the dataset with `datasets`.
Right now the only function that can load a dataset from a cloud storage is `load_from_disk`, that must be used with a dataset serialized with `save_to_disk`.
|
[
-1.2194854021072388,
-0.9229915738105774,
-0.633399486541748,
1.543872594833374,
-0.1812359094619751,
-1.2233837842941284,
0.22043099999427795,
-1.0921630859375,
1.6815913915634155,
-0.8181195259094238,
0.33051154017448425,
-1.6326212882995605,
-0.0265568345785141,
-0.5852939486503601,
-0.7187764048576355,
-0.8392133116722107,
-0.4346570670604706,
-0.7455413937568665,
1.084931492805481,
2.376081705093384,
1.215342402458191,
-1.3835088014602661,
2.7627649307250977,
0.7012985944747925,
-0.2210545390844345,
-0.909276008605957,
0.4137589633464813,
-0.015427516773343086,
-1.22566556930542,
-0.4910249412059784,
-0.8574204444885254,
-0.15351934731006622,
-0.518734335899353,
-0.47715017199516296,
0.015820205211639404,
0.4729089140892029,
-0.3779304325580597,
-0.40409401059150696,
-0.6106261014938354,
-0.7873607277870178,
0.44605380296707153,
-0.3411308228969574,
0.9632939696311951,
-0.2668205499649048,
1.831154704093933,
-0.5785771608352661,
0.487779438495636,
0.7416595816612244,
1.2427020072937012,
0.1469285935163498,
0.05056610703468323,
0.4419704079627991,
0.32346418499946594,
-0.09097055345773697,
0.494793176651001,
1.1810330152511597,
0.6280276775360107,
0.5525398850440979,
0.7525271773338318,
-2.2379908561706543,
1.2903764247894287,
-1.0450570583343506,
0.3460903763771057,
1.3416827917099,
-0.954380452632904,
0.301019549369812,
-1.6672210693359375,
-0.048029039055109024,
0.5234081149101257,
-2.22552227973938,
0.38006141781806946,
-1.209571361541748,
-0.5623109340667725,
0.9637548923492432,
0.38146379590034485,
-1.169110655784607,
0.21050956845283508,
-0.48563235998153687,
1.1104899644851685,
0.3775978088378906,
1.029144287109375,
-1.741883397102356,
-0.055221959948539734,
-0.18748709559440613,
0.10875877737998962,
-1.3213375806808472,
-1.6340651512145996,
0.5794855952262878,
0.6076478362083435,
0.7523673176765442,
-0.21237091720104218,
1.1819995641708374,
-1.0506449937820435,
0.8303849101066589,
-1.1589535474777222,
-1.6318401098251343,
-1.5079436302185059,
-2.3814268112182617,
-2.3048837184906006,
0.6472412943840027,
-0.4973536729812622,
-0.5352426171302795,
2.0803534984588623,
-0.8989126086235046,
-1.677027940750122,
1.1305592060089111,
0.1834409236907959,
-0.0466410294175148,
2.32247257232666,
0.2568332850933075,
-0.6823422312736511,
0.4511304497718811,
-0.7513392567634583,
0.8631049394607544,
-0.2975996732711792,
1.3277921676635742,
0.44870373606681824,
-1.0581721067428589,
1.4905948638916016,
-0.31688258051872253,
0.7025903463363647,
-0.5474255084991455,
-0.5989091396331787,
-0.8637651801109314,
0.2958613932132721,
1.8413509130477905,
-0.2633516192436218,
1.5782827138900757,
-0.36001497507095337,
-1.588975429534912,
-1.7615160942077637,
0.9598921537399292,
0.33932599425315857,
-0.7827269434928894,
0.0972360372543335,
-0.4749329388141632,
0.16876189410686493,
-0.14704540371894836,
1.2500511407852173,
1.3276435136795044,
0.675918459892273,
-0.426461786031723,
-0.7810590863227844,
0.13563407957553864,
-0.1092056855559349,
-0.7289217710494995,
-1.7013906240463257,
-0.37728118896484375,
0.12907028198242188,
0.4888884127140045,
-1.1429966688156128,
1.7944976091384888,
0.918117344379425,
1.9349030256271362,
1.027974247932434,
-0.318303644657135,
1.396639347076416,
0.038087885826826096,
1.8550283908843994,
-0.6159307956695557,
0.5951684713363647,
-0.31874772906303406,
-1.1178025007247925,
0.9655787348747253,
-0.31525489687919617,
-2.13887882232666,
-0.764604389667511,
-0.7350086569786072,
-0.23395398259162903,
-0.7379035949707031,
0.8593751788139343,
-0.2902606129646301,
-1.5973771810531616,
0.18458180129528046,
-0.6682021617889404,
0.22349613904953003,
-1.1047356128692627,
0.3040356934070587,
0.7383150458335876,
-0.6255828738212585,
0.031236309558153152,
-0.16353408992290497,
-1.2790526151657104,
-0.39282044768333435,
0.4738560914993286,
1.9056109189987183,
-0.6423056125640869,
0.9030787944793701,
1.0480709075927734,
-0.7366645932197571,
0.11517497152090073,
0.14140930771827698,
-0.18287809193134308,
0.7897299528121948,
-1.1204911470413208,
-0.4311027228832245,
1.1282519102096558,
-0.28915539383888245,
-0.6196425557136536,
1.4679962396621704,
0.7804561853408813,
-1.0652830600738525,
-0.13293512165546417,
-0.16926880180835724,
-0.9085699915885925,
-0.04477556422352791,
-1.4559000730514526,
-0.12075738608837128,
0.4057964086532593,
-1.5226168632507324,
-0.529763400554657,
-0.26026585698127747,
1.2470674514770508,
-0.24902594089508057,
1.3527106046676636,
-0.33720511198043823,
-0.19744770228862762,
-0.26771974563598633,
-0.42296770215034485,
0.16066348552703857,
-0.21606329083442688,
-0.532528817653656,
0.12346754223108292,
-0.6708405613899231,
0.41422197222709656,
1.479422688484192,
0.2558709979057312,
0.09021347016096115,
0.44938892126083374,
1.1849206686019897,
0.48978090286254883,
-0.03996271640062332,
-0.8079249262809753,
-1.4980416297912598,
1.9269745349884033,
-1.4300341606140137,
1.9692639112472534,
0.6563408374786377,
-0.026364963501691818,
-1.82016921043396,
-1.9124950170516968,
1.3095190525054932,
1.2025048732757568,
2.2816052436828613,
0.4886930584907532,
0.35328951478004456,
-0.7813681364059448,
-0.7819536924362183,
0.30672985315322876,
-1.0111184120178223,
-0.5961089730262756,
0.15259967744350433,
2.373852014541626,
1.8535269498825073,
-0.4701203405857086,
-0.22792819142341614,
-0.9151384234428406,
1.4776115417480469,
-0.23618797957897186,
0.25699228048324585,
2.046935796737671,
-0.18809272348880768,
-1.0217061042785645,
1.4140691757202148,
-2.4061882495880127,
0.30730611085891724,
2.075443983078003,
0.2967072129249573,
0.10339411348104477,
-1.3731937408447266,
-0.6179061532020569,
-0.3773905336856842,
-0.36506325006484985,
-1.2523490190505981,
0.464905321598053,
-0.2760259807109833,
-0.6988512873649597,
-1.4254326820373535,
0.2048635631799698,
-1.124773383140564,
-1.656160831451416,
0.24515807628631592,
1.9720442295074463,
1.9786771535873413,
-0.6908029913902283,
1.5402382612228394,
-0.39101442694664,
0.09259753674268723,
1.2728161811828613,
1.29768967628479,
3.106719493865967,
1.873313069343567,
-1.2529911994934082,
0.6301600933074951,
-0.1493225246667862,
-0.5135296583175659,
1.147649884223938,
-1.2079540491104126,
1.3383492231369019,
-0.0666976347565651,
-1.108494520187378,
-1.2799162864685059,
1.0289191007614136,
0.4701997935771942,
0.046056099236011505,
-0.5065719485282898,
1.1712708473205566,
0.09920400381088257,
1.3095792531967163,
0.5755500793457031,
-0.39339786767959595,
0.5410846471786499,
-0.4405674934387207,
-0.5986077785491943,
1.5307929515838623,
0.2835841774940491,
-1.453150987625122,
-2.2125003337860107,
-0.29764434695243835,
-0.8716036677360535,
0.11858338862657547,
-0.6840187907218933,
-0.9771425127983093,
1.6782259941101074,
0.3134539723396301,
-1.2634798288345337,
-0.23092207312583923,
-0.2461129128932953,
-0.4112437069416046,
2.7615842819213867,
-1.2463032007217407,
-0.16529808938503265,
-0.958936870098114,
-0.7070732712745667,
1.6732208728790283,
-1.2563151121139526,
-0.40374428033828735,
-1.1808141469955444,
-0.5893768072128296,
-1.1331664323806763,
-0.39117783308029175,
0.041552599519491196,
-0.9104239344596863,
0.8372994065284729,
0.11321506649255753,
-1.1846237182617188,
-0.3677622973918915,
-0.9264112710952759,
1.0684888362884521,
-0.20438063144683838,
0.12639829516410828,
1.7364150285720825,
0.3225943446159363,
-0.4725038707256317,
0.8419082164764404,
1.2566903829574585,
0.6774713397026062,
-0.7042993307113647,
0.06031588837504387,
-0.6805232763290405,
0.30715444684028625,
-1.2812631130218506,
0.3346528112888336,
-2.9207913875579834,
0.6251894235610962,
-0.11905026435852051,
-0.1741587370634079,
-0.04803408309817314,
-1.3825793266296387,
1.0191335678100586,
2.5768015384674072,
-1.2353659868240356,
0.4690575897693634,
0.4038171172142029,
1.1184982061386108,
-1.6311652660369873,
0.310833215713501,
-0.48227623105049133,
2.065009355545044,
0.19261088967323303,
1.2812800407409668,
-0.48785167932510376,
-2.334179401397705,
0.5612648129463196,
-1.2462503910064697,
-1.2383558750152588,
0.776458203792572,
-0.9228771328926086,
0.28416377305984497,
-1.3430709838867188,
-0.2490813434123993,
-0.9077454209327698,
-1.2365063428878784,
0.6318944692611694,
0.16588044166564941,
0.2595505714416504,
-0.5120671987533569,
0.34089428186416626,
-2.229076385498047,
-1.3781440258026123,
-0.20613200962543488,
-1.0161831378936768,
0.6062260270118713,
-0.5271359086036682,
0.6323521137237549,
-0.1441897600889206,
0.013748356141149998,
0.26830896735191345,
1.6216663122177124,
3.373814821243286,
0.10226082056760788,
0.27214500308036804,
-0.10944415628910065,
-0.9360423684120178,
1.4120367765426636,
0.9048025608062744,
-0.010067785158753395,
-0.5629087686538696,
-1.12958562374115,
1.2901661396026611,
1.9922676086425781,
1.118446707725525,
-0.11085755378007889,
-0.797692060470581,
-0.7581532001495361,
-0.013590643182396889,
0.16570328176021576,
0.5357938408851624,
0.9370177984237671,
0.1109314039349556,
0.04657423496246338,
1.4277729988098145,
1.1291991472244263,
-0.34800106287002563,
0.3641279637813568,
-0.8613408207893372,
-0.4994509816169739,
0.3512219488620758,
0.27544599771499634,
-0.024292543530464172,
0.4137532413005829,
-1.0118523836135864,
-0.1997392624616623,
-0.4752258062362671,
-0.8080120086669922,
-0.74632328748703,
-0.5033827424049377,
-0.47119277715682983,
1.643430233001709,
0.10389351844787598,
-0.5160543322563171,
-0.047291677445173264,
-0.6704533100128174,
-0.11280573904514313,
-1.1258907318115234,
0.3173142075538635,
-0.09179402142763138,
-0.19439664483070374,
-0.1039477288722992,
1.6081184148788452,
-0.9896637201309204,
-2.0090653896331787,
0.11786141246557236,
0.22949102520942688,
-0.17362907528877258,
0.1938031017780304,
1.5454094409942627,
0.5122904181480408,
1.3809345960617065,
1.3280391693115234,
0.9794194102287292,
-0.6913957595825195,
-1.3178791999816895,
0.7611593008041382,
0.9402506351470947,
-1.3446762561798096,
0.7836408615112305,
-0.1324639618396759,
-0.5167685747146606,
0.6532994508743286,
1.2801110744476318,
0.5268833041191101,
-2.0432541370391846,
0.9018242955207825,
-1.0342358350753784,
0.8809205889701843,
0.8377366662025452,
0.6331433653831482,
0.21825215220451355,
0.8921504020690918,
-1.2189550399780273,
-1.1631041765213013,
-0.6926145553588867,
-0.7769926190376282,
1.8712446689605713,
-0.3904976546764374,
0.6599079966545105,
-0.2217714488506317,
-1.2093373537063599,
-0.10324196517467499,
0.7839162349700928,
0.39968356490135193,
-0.5338903069496155,
0.8150222897529602,
-0.6753062009811401,
-0.9731564521789551,
-1.2623685598373413,
-0.45310062170028687,
-1.1389718055725098,
-1.0011540651321411,
1.0124605894088745,
0.7611362934112549,
0.40341484546661377,
1.9400161504745483,
0.7569432854652405,
0.4076819121837616,
-2.567136526107788,
0.8265410661697388,
0.2444119155406952,
-0.028812836855649948,
0.856232762336731,
0.41612449288368225,
1.0629949569702148,
0.004324415698647499,
0.6711257100105286,
-2.4099647998809814,
2.2685344219207764,
-0.24156443774700165,
0.6307706832885742,
-0.0858922228217125,
-0.2301853448152542,
1.1933611631393433,
0.6172868013381958,
0.449966698884964,
-1.120998501777649,
0.6168481707572937,
-0.5035678148269653,
1.1010353565216064,
0.8362438678741455,
-0.7892425060272217,
0.015731219202280045,
1.379745602607727,
0.4086180329322815,
-0.5730112195014954,
-0.9828301072120667,
-0.9379963278770447,
0.9628506302833557,
1.569935917854309,
-0.07259804755449295,
-0.06853719055652618,
0.7915571331977844,
0.7380875945091248,
-1.3133008480072021,
0.1321289837360382,
-0.6477338671684265,
-0.7368477582931519,
1.5918477773666382,
2.0001518726348877,
-0.19952619075775146,
-0.10916060209274292,
-0.6748788952827454,
-1.2735506296157837,
0.8431422710418701,
-0.056177642196416855,
-0.0009115934371948242,
0.5521337389945984,
-0.5984728932380676,
0.9879540801048279,
0.7339654564857483,
0.9799970984458923,
0.07830145955085754,
0.32270023226737976,
0.4625813066959381,
-0.36733314394950867,
-1.248260259628296,
-0.3678326904773712,
-0.9945983290672302,
-2.5861005783081055,
0.41961193084716797,
-0.21772445738315582,
-1.4920753240585327,
0.06383239477872849,
-1.0501184463500977,
0.9739667177200317,
-0.5839561820030212,
-1.1559361219406128,
-1.5946025848388672,
0.2340611219406128,
-0.07897908985614777,
0.9857050776481628,
-1.5324182510375977,
-0.20306658744812012,
1.1399517059326172,
0.7769447565078735,
-0.6447164416313171,
0.9890369176864624,
0.0913771241903305,
0.9723954200744629,
0.8312052488327026,
-0.3539894223213196,
0.6026670932769775,
0.05476631596684456,
-1.3741902112960815,
0.48148247599601746,
1.1747742891311646,
0.1730765402317047,
1.4804455041885376,
-0.4705196022987366,
0.07874477654695511,
0.4266173541545868,
-0.7009238004684448,
-0.4684099555015564,
-0.4359378218650818,
0.6497223377227783,
-0.0308479405939579,
-0.8659762144088745,
-0.08956905454397202,
-0.07298900932073593,
-0.33249548077583313,
0.154084712266922,
-1.4703673124313354,
-0.17330382764339447,
-0.4422914981842041,
-0.558323085308075,
-1.2451739311218262,
-0.013024380430579185,
1.3505399227142334,
-0.6375030279159546,
-0.2624830901622772,
0.473092257976532,
0.4209235906600952,
0.5344753265380859,
0.6124781370162964,
-0.6931408643722534,
-0.19286048412322998,
-0.3809266984462738,
-0.3133140206336975,
0.3428928554058075,
1.2924997806549072,
-0.11134365946054459,
-0.9723476767539978,
0.7089694738388062,
-0.3610769808292389,
0.1069730594754219,
1.890843152999878,
0.12614528834819794,
-0.6617276668548584,
0.3319288194179535,
-0.7401455044746399,
1.87368643283844,
1.7779042720794678,
1.308057188987732,
-0.14303642511367798,
-0.9873086810112,
0.6413382291793823,
-0.341281920671463,
-0.30197393894195557,
0.8955125212669373,
0.3595818281173706,
-0.23474633693695068,
-1.404848575592041,
0.8949692249298096,
1.2843947410583496,
-0.7921449542045593,
-0.835209846496582,
0.22766909003257751,
-0.7607282400131226,
1.1521350145339966,
0.5117071270942688,
0.35263243317604065,
0.30411002039909363,
1.6767224073410034,
0.8622565865516663,
-0.45373985171318054,
0.5995149612426758,
0.6132880449295044,
-0.1704912781715393,
-2.0681285858154297,
-1.1586707830429077,
0.4024963080883026,
-0.6481624245643616,
-1.6296169757843018,
1.4391194581985474,
-1.0699630975723267,
-1.1068017482757568,
0.5931758284568787,
0.021360941231250763,
1.3889726400375366,
0.38376566767692566,
1.5717265605926514,
2.1361000537872314,
0.7749792337417603,
0.5597901940345764,
1.2222349643707275,
-0.14927148818969727,
-0.4632290005683899,
1.8654463291168213,
-0.43247780203819275,
0.4228925108909607,
1.1251929998397827,
-0.35368669033050537,
-1.0750092267990112,
-0.8075671195983887,
-1.2158455848693848,
-0.717867910861969,
1.0769656896591187,
0.03558022528886795,
-1.0328853130340576,
0.2484416663646698,
1.5502755641937256,
0.16428877413272858,
-0.3092150390148163,
0.6738796234130859,
0.3086138665676117,
-0.8120874762535095,
-0.09768448770046234,
-0.9540132880210876,
0.5545883178710938,
-0.2783947288990021,
-0.3330749273300171,
0.27651646733283997,
0.49984413385391235,
1.3166704177856445,
-0.026790320873260498,
0.14097650349140167,
1.0466527938842773,
-1.4714421033859253,
1.4711135625839233,
-0.6111712455749512,
0.32630258798599243,
-2.375150442123413,
1.3693389892578125,
-0.6392119526863098,
2.014979600906372,
-2.6105756759643555,
0.42701926827430725,
-0.6195071339607239,
-0.48975589871406555,
0.41937732696533203,
-0.2635325789451599,
0.07609021663665771,
-0.1480548083782196,
-1.1048301458358765,
0.09830187261104584,
-0.65203458070755,
0.6557776927947998,
1.1028242111206055,
1.4066811800003052,
-1.0886640548706055,
-0.27416735887527466,
-1.6821693181991577,
-0.1168435737490654,
-0.8118355870246887,
0.3395610749721527,
-1.972220778465271,
-0.13470955193042755,
-1.9331635236740112,
-2.387094020843506,
-1.170802354812622,
-0.7938960790634155,
1.0243602991104126,
0.1392180472612381,
-0.796553373336792,
1.3591039180755615,
-0.3288988173007965,
-1.8239535093307495,
1.1088615655899048,
-2.1283700466156006
] |
https://github.com/huggingface/datasets/issues/5394
|
CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
|
@MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment.
Note that `datasets` does not depend on `spacy`.
|
### Describe the bug
While installing the dependencies, the CI raises a TypeError:
```
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module>
from .errors import setup_default_warnings
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module>
from .compat import Literal
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module>
from thinc.util import copy_array
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module>
from .config import registry
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module>
import confection
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module>
from pydantic import BaseModel, create_model, ValidationError, Extra
File "pydantic/__init__.py", line 2, in init pydantic.__init__
File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses
# | None | Attribute is set to None. |
File "pydantic/main.py", line 121, in init pydantic.main
TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
```
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
### Steps to reproduce the bug
```shell
pip install .[tests,metrics-tests]
python -m spacy download en_core_web_sm
```
### Expected behavior
No error.
### Environment info
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
| 358 | 22 |
CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
### Describe the bug
While installing the dependencies, the CI raises a TypeError:
```
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module>
from .errors import setup_default_warnings
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module>
from .compat import Literal
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module>
from thinc.util import copy_array
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module>
from .config import registry
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module>
import confection
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module>
from pydantic import BaseModel, create_model, ValidationError, Extra
File "pydantic/__init__.py", line 2, in init pydantic.__init__
File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses
# | None | Attribute is set to None. |
File "pydantic/main.py", line 121, in init pydantic.main
TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
```
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
### Steps to reproduce the bug
```shell
pip install .[tests,metrics-tests]
python -m spacy download en_core_web_sm
```
### Expected behavior
No error.
### Environment info
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
@MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment.
Note that `datasets` does not depend on `spacy`.
|
[
-1.151152491569519,
-0.8921622633934021,
-0.6899294853210449,
1.5089271068572998,
-0.10564844310283661,
-1.2708711624145508,
0.18829965591430664,
-0.9905667304992676,
1.4451483488082886,
-0.7144368886947632,
0.18018119037151337,
-1.629974365234375,
-0.14859190583229065,
-0.4965536296367645,
-0.6285001635551453,
-0.9124859571456909,
-0.36317315697669983,
-0.9365140199661255,
0.970379114151001,
2.468238115310669,
1.401554822921753,
-1.2987329959869385,
2.8318753242492676,
0.687369167804718,
-0.35608971118927,
-1.0622646808624268,
0.6344088912010193,
-0.03492710739374161,
-1.2168269157409668,
-0.5741020441055298,
-0.8820733428001404,
0.03326205536723137,
-0.5539538860321045,
-0.2716354429721832,
0.05664046108722687,
0.5007036328315735,
-0.22711236774921417,
-0.19715234637260437,
-0.6395758390426636,
-0.7788284420967102,
0.5395347476005554,
-0.2931545078754425,
0.9155393242835999,
-0.3313315510749817,
1.5804334878921509,
-0.6408759951591492,
0.4333685040473938,
0.8094862699508667,
1.3140923976898193,
0.2020895779132843,
0.11114563047885895,
0.26476556062698364,
0.325042188167572,
0.04163331538438797,
0.61454176902771,
1.1362316608428955,
0.5433948636054993,
0.5043015480041504,
0.5282049775123596,
-2.182661533355713,
1.3412692546844482,
-0.8854853510856628,
0.22081808745861053,
1.3368388414382935,
-0.8174392580986023,
0.33868929743766785,
-1.7954611778259277,
-0.061768896877765656,
0.6507502794265747,
-2.242713212966919,
0.27740031480789185,
-1.3389673233032227,
-0.5616732835769653,
0.8561895489692688,
0.3845547139644623,
-1.1573865413665771,
0.12253397703170776,
-0.6065481901168823,
1.1485309600830078,
0.46474477648735046,
0.9781268239021301,
-1.6280553340911865,
-0.1382872611284256,
-0.07978598773479462,
0.09818289428949356,
-1.233279824256897,
-1.7716255187988281,
0.5687028765678406,
0.6039506196975708,
0.6332588195800781,
-0.1085277572274208,
0.9969866871833801,
-1.12546968460083,
0.8288678526878357,
-0.9800306558609009,
-1.6261239051818848,
-1.4071749448776245,
-2.399085283279419,
-2.2334630489349365,
0.7682903409004211,
-0.4671665132045746,
-0.4868369996547699,
2.0293467044830322,
-0.9377856254577637,
-1.7414400577545166,
1.004331350326538,
0.31151118874549866,
0.1663011610507965,
2.418748140335083,
0.16164550185203552,
-0.751274049282074,
0.3412111699581146,
-0.7462374567985535,
0.7991460561752319,
-0.4201646149158478,
1.251349687576294,
0.4405636489391327,
-0.98782879114151,
1.6156660318374634,
-0.48018667101860046,
0.6557680368423462,
-0.512086808681488,
-0.4566640853881836,
-0.7748872637748718,
0.17860738933086395,
1.894810676574707,
-0.35381394624710083,
1.4474413394927979,
-0.17045971751213074,
-1.523477554321289,
-1.6144658327102661,
0.8540884852409363,
0.5162868499755859,
-0.9882595539093018,
0.06174256652593613,
-0.6022301316261292,
0.22141386568546295,
-0.06533550471067429,
1.107343316078186,
1.3131035566329956,
0.6976478099822998,
-0.31372037529945374,
-0.804848849773407,
0.25447461009025574,
-0.2902134954929352,
-0.6689165234565735,
-1.8392490148544312,
-0.29967498779296875,
0.2842073440551758,
0.729328989982605,
-1.177648901939392,
1.8557544946670532,
0.8588951826095581,
2.00698184967041,
0.925170361995697,
-0.4313788414001465,
1.4727742671966553,
-0.04777985066175461,
1.8109878301620483,
-0.6253380179405212,
0.6226654648780823,
-0.5147174596786499,
-1.115019679069519,
0.9006680250167847,
-0.3640938401222229,
-1.8775142431259155,
-0.7999231219291687,
-0.690863847732544,
-0.18239238858222961,
-0.6949815154075623,
0.890406608581543,
-0.344896525144577,
-1.4390157461166382,
0.08809927850961685,
-0.8187994360923767,
0.17894528806209564,
-1.20954167842865,
0.16826729476451874,
0.6834093928337097,
-0.5642246603965759,
-0.0006350865587592125,
-0.23488865792751312,
-1.2632477283477783,
-0.49871209263801575,
0.4164160490036011,
1.8606659173965454,
-0.43762528896331787,
1.014108419418335,
0.8941930532455444,
-0.7437064051628113,
0.21440434455871582,
0.23767270147800446,
-0.3319680392742157,
0.7509332895278931,
-1.1238045692443848,
-0.4270707070827484,
1.1949551105499268,
-0.3838258683681488,
-0.8087307214736938,
1.4406347274780273,
0.9509336948394775,
-1.1018725633621216,
-0.3792898654937744,
-0.2638348340988159,
-0.8591437935829163,
0.10458569973707199,
-1.5064271688461304,
-0.11104215681552887,
0.4828872084617615,
-1.5223115682601929,
-0.24435551464557648,
-0.1457473635673523,
1.4597736597061157,
-0.25040706992149353,
1.5634288787841797,
-0.31323960423469543,
-0.15832102298736572,
-0.22962822020053864,
-0.5240442156791687,
0.1692618578672409,
-0.1831904649734497,
-0.45984673500061035,
0.21624262630939484,
-0.8913180232048035,
0.3282669484615326,
1.5175745487213135,
0.3154831528663635,
0.04360963776707649,
0.40103843808174133,
1.1142539978027344,
0.41927728056907654,
-0.1076432466506958,
-0.9445538520812988,
-1.5219001770019531,
1.9525532722473145,
-1.338673710823059,
2.0087671279907227,
0.8574869632720947,
-0.11914987117052078,
-1.772250771522522,
-1.869601845741272,
1.1411460638046265,
1.06312894821167,
2.3088572025299072,
0.4352976679801941,
0.4782482087612152,
-0.7861842513084412,
-0.8270894289016724,
0.35125380754470825,
-1.0585968494415283,
-0.6024848818778992,
0.2540419101715088,
2.409512758255005,
1.814644455909729,
-0.5309657454490662,
-0.26091083884239197,
-0.9139128923416138,
1.3488147258758545,
-0.26614072918891907,
0.28199148178100586,
2.1271188259124756,
-0.21524061262607574,
-0.9632888436317444,
1.233707070350647,
-2.395979166030884,
0.36291131377220154,
2.1835389137268066,
0.27920010685920715,
0.1456160694360733,
-1.4697678089141846,
-0.6596009135246277,
-0.3648248612880707,
-0.3448009788990021,
-1.2739794254302979,
0.6225419640541077,
-0.13634812831878662,
-0.8750163316726685,
-1.4527437686920166,
0.03649287670850754,
-1.1168124675750732,
-1.7951951026916504,
0.38659751415252686,
1.8991254568099976,
2.090348482131958,
-0.892966628074646,
1.3491032123565674,
-0.3051433265209198,
-0.025219231843948364,
1.3163114786148071,
1.4161581993103027,
3.048530340194702,
1.8545193672180176,
-1.3003877401351929,
0.8589769005775452,
-0.21701279282569885,
-0.3945162296295166,
1.1218184232711792,
-1.1823315620422363,
1.0290170907974243,
-0.20550672709941864,
-1.1770366430282593,
-1.2382627725601196,
1.131300926208496,
0.44255828857421875,
-0.08716549724340439,
-0.42554745078086853,
1.2481359243392944,
0.23898622393608093,
1.46396803855896,
0.6118649244308472,
-0.34601014852523804,
0.5370230078697205,
-0.33008068799972534,
-0.5385662317276001,
1.7366795539855957,
0.19842545688152313,
-1.5989874601364136,
-2.301269054412842,
-0.34478580951690674,
-0.913975715637207,
-0.049658600240945816,
-0.591692328453064,
-1.039219617843628,
1.5855380296707153,
0.2934950292110443,
-1.18971848487854,
-0.25548115372657776,
-0.2790783941745758,
-0.40653887391090393,
2.6456847190856934,
-1.1932523250579834,
-0.07847808301448822,
-0.9206229448318481,
-0.5666897892951965,
1.562813639640808,
-1.3821985721588135,
-0.18514318764209747,
-1.0466068983078003,
-0.5862318277359009,
-1.247708797454834,
-0.4337432384490967,
0.054462529718875885,
-0.9776901602745056,
0.6079809665679932,
0.20881466567516327,
-1.0874063968658447,
-0.3789863586425781,
-0.773095965385437,
1.1680866479873657,
-0.08113446086645126,
0.20832572877407074,
1.77515709400177,
0.23067383468151093,
-0.30176740884780884,
0.7987784147262573,
1.1493339538574219,
0.5466570854187012,
-0.5709336400032043,
-0.10156591981649399,
-0.6335173845291138,
0.3577079474925995,
-1.3647425174713135,
0.1369415521621704,
-2.9618113040924072,
0.8031808733940125,
-0.26506203413009644,
-0.20753797888755798,
-0.20166130363941193,
-1.378262996673584,
1.1152757406234741,
2.622535228729248,
-1.115852952003479,
0.4151247441768646,
0.43427959084510803,
1.0601314306259155,
-1.582952618598938,
0.3672165274620056,
-0.48522424697875977,
2.113609790802002,
0.18976671993732452,
1.2778197526931763,
-0.5519447922706604,
-2.235644817352295,
0.5942370295524597,
-1.0834535360336304,
-0.9029651284217834,
0.8198492527008057,
-0.9436402320861816,
0.27263274788856506,
-1.505615234375,
-0.19567812979221344,
-0.9034806489944458,
-1.2834322452545166,
0.7132599949836731,
0.02017085626721382,
0.42090916633605957,
-0.5218892097473145,
0.3504142463207245,
-2.200376272201538,
-1.3535103797912598,
-0.17918594181537628,
-0.9442740678787231,
0.6423189043998718,
-0.4324316680431366,
0.5313154458999634,
0.0413343571126461,
0.10835928469896317,
0.2916026711463928,
1.4758203029632568,
3.5003724098205566,
0.10232925415039062,
0.15432040393352509,
-0.10113417357206345,
-1.0764169692993164,
1.3287190198898315,
0.9082161784172058,
-0.15403877198696136,
-0.5191364288330078,
-0.9271026253700256,
1.3569536209106445,
2.153041124343872,
1.0932708978652954,
0.22581179440021515,
-0.9252609610557556,
-0.8421381711959839,
-0.06488554924726486,
0.10341430455446243,
0.5313532948493958,
0.9856823086738586,
-0.05294915288686752,
0.06789752840995789,
1.40743088722229,
1.2565964460372925,
-0.2566249668598175,
0.35847237706184387,
-1.095347285270691,
-0.3580267131328583,
0.34746628999710083,
0.18381398916244507,
-0.010855731554329395,
0.5686525702476501,
-1.0362515449523926,
-0.2641475796699524,
-0.2572574019432068,
-0.7907421588897705,
-0.8586296439170837,
-0.41836684942245483,
-0.4407983422279358,
1.6296669244766235,
0.14903895556926727,
-0.5696246027946472,
0.14237360656261444,
-0.5532030463218689,
-0.13438370823860168,
-1.0985560417175293,
0.06607700139284134,
-0.07926275581121445,
-0.06098728999495506,
-0.2653287351131439,
1.6508327722549438,
-0.9585691094398499,
-2.1261205673217773,
0.17234697937965393,
0.28433454036712646,
-0.32594335079193115,
0.19279935956001282,
1.7862052917480469,
0.47905629873275757,
1.4398080110549927,
1.302268147468567,
0.9839381575584412,
-0.6311030983924866,
-1.2861089706420898,
0.8215906620025635,
0.9191959500312805,
-1.33157217502594,
0.887251615524292,
-0.3391213119029999,
-0.5033518671989441,
0.6378278136253357,
1.2129366397857666,
0.4303785264492035,
-2.069960355758667,
0.8946843147277832,
-0.9389780163764954,
0.6518540382385254,
0.7124102115631104,
0.7641023397445679,
0.29494035243988037,
0.8614956736564636,
-1.2269055843353271,
-1.0756514072418213,
-0.7437165975570679,
-0.6662696003913879,
1.9097719192504883,
-0.337328165769577,
0.5673021674156189,
-0.140170618891716,
-1.2388650178909302,
-0.23077495396137238,
0.8273254632949829,
0.4089212715625763,
-0.524400532245636,
0.919384241104126,
-0.6547812819480896,
-0.9146654605865479,
-1.1033118963241577,
-0.44502153992652893,
-1.0247197151184082,
-1.010146141052246,
0.9882058501243591,
0.7012084126472473,
0.4829976558685303,
1.9566277265548706,
0.5212341547012329,
0.298260360956192,
-2.620192527770996,
0.8599012494087219,
0.29492682218551636,
-0.04844902083277702,
0.9751935601234436,
0.2256588637828827,
1.1917414665222168,
0.009517106227576733,
0.5798671841621399,
-2.3291993141174316,
2.2414917945861816,
-0.17180657386779785,
0.6299888491630554,
-0.018269646912813187,
-0.27635183930397034,
1.164524793624878,
0.5540093183517456,
0.5530785322189331,
-1.0776773691177368,
0.6898516416549683,
-0.5746214389801025,
1.0392180681228638,
0.8486348390579224,
-0.9140615463256836,
0.10832789540290833,
1.451865315437317,
0.4595223069190979,
-0.33900582790374756,
-0.9877004027366638,
-0.82008296251297,
0.9336564540863037,
1.5929515361785889,
-0.10780304670333862,
-0.024818912148475647,
0.8180443644523621,
0.63747239112854,
-1.2046736478805542,
0.01634184643626213,
-0.7261219620704651,
-0.7017889618873596,
1.7152812480926514,
2.0592527389526367,
-0.1609741598367691,
-0.10779047757387161,
-0.71650630235672,
-1.367903470993042,
0.7041709423065186,
-0.21217697858810425,
-0.028457269072532654,
0.6817417144775391,
-0.5603390336036682,
1.064253807067871,
0.46463873982429504,
1.1674628257751465,
-0.03627835959196091,
0.3738960325717926,
0.2508920133113861,
-0.4363442063331604,
-1.2264211177825928,
-0.5070244669914246,
-1.1138393878936768,
-2.560957431793213,
0.4143402576446533,
-0.2530355751514435,
-1.5268715620040894,
0.11139053106307983,
-1.0694674253463745,
0.8270212411880493,
-0.6060718894004822,
-1.1451317071914673,
-1.3556044101715088,
0.3586767911911011,
-0.33826106786727905,
1.011492371559143,
-1.6224250793457031,
-0.16780142486095428,
1.2717477083206177,
0.8210363984107971,
-0.5152471661567688,
0.9165312051773071,
0.2988090515136719,
1.0886130332946777,
0.7585400938987732,
-0.3344568610191345,
0.6586439609527588,
-0.009060157462954521,
-1.2530579566955566,
0.44465747475624084,
1.1747848987579346,
0.21537603437900543,
1.379300832748413,
-0.4409954249858856,
0.1933227926492691,
0.48350128531455994,
-0.7600340843200684,
-0.5197477340698242,
-0.29255378246307373,
0.8028048872947693,
-0.014682111330330372,
-1.1665595769882202,
-0.20245146751403809,
-0.22677651047706604,
-0.24020415544509888,
0.17614491283893585,
-1.457777976989746,
-0.269016295671463,
-0.2685931324958801,
-0.43594592809677124,
-1.3884482383728027,
0.06797149032354355,
1.3441449403762817,
-0.7094631791114807,
-0.23812782764434814,
0.41045594215393066,
0.449123352766037,
0.560504138469696,
0.622839629650116,
-0.87526535987854,
-0.287159264087677,
-0.38485482335090637,
-0.31796741485595703,
0.3829200863838196,
1.1361639499664307,
0.03613217920064926,
-0.9940535426139832,
0.6846078634262085,
-0.44646012783050537,
0.22937893867492676,
2.064089298248291,
0.01081464346498251,
-0.7335889935493469,
0.3617537319660187,
-0.6257566213607788,
1.7647818326950073,
1.7897019386291504,
1.122556447982788,
-0.05854513496160507,
-0.811367928981781,
0.595969557762146,
-0.22701075673103333,
-0.2778731882572174,
0.847723126411438,
0.3890731632709503,
-0.2713840901851654,
-1.4232466220855713,
0.6399474740028381,
1.2967983484268188,
-0.7818453907966614,
-0.7383397817611694,
0.16263628005981445,
-0.939009964466095,
1.3502633571624756,
0.46195754408836365,
0.27893325686454773,
0.2924410104751587,
1.5780091285705566,
0.7333514094352722,
-0.3873943090438843,
0.47554811835289,
0.5485482811927795,
-0.34545448422431946,
-2.1338014602661133,
-1.0522959232330322,
0.28979378938674927,
-0.4527382552623749,
-1.6344332695007324,
1.3563859462738037,
-1.0492275953292847,
-0.999079704284668,
0.49930137395858765,
0.12753401696681976,
1.2061898708343506,
0.3429007828235626,
1.60147225856781,
2.0781662464141846,
0.8654389381408691,
0.4077737331390381,
1.2241226434707642,
-0.1012813076376915,
-0.550172746181488,
1.867205023765564,
-0.4542854130268097,
0.5383991599082947,
1.1224201917648315,
-0.47174763679504395,
-1.0427310466766357,
-0.9203198552131653,
-1.0389912128448486,
-0.6493965983390808,
1.3210923671722412,
0.08529546111822128,
-1.0595526695251465,
0.21351714432239532,
1.5447686910629272,
0.2317335158586502,
-0.2195790410041809,
0.716264009475708,
0.3683111071586609,
-0.6577042937278748,
-0.07118082791566849,
-0.7898510694503784,
0.4767758548259735,
-0.1497827172279358,
-0.2796023190021515,
0.3010329008102417,
0.5562493801116943,
1.3361738920211792,
-0.17450766265392303,
0.06020481139421463,
1.0157086849212646,
-1.4228824377059937,
1.6531932353973389,
-0.5018430948257446,
0.3148459196090698,
-2.4088988304138184,
1.263745665550232,
-0.7822259068489075,
1.954689383506775,
-2.4896490573883057,
0.381942480802536,
-0.5065721869468689,
-0.506346583366394,
0.23022139072418213,
-0.46977975964546204,
0.1021675243973732,
-0.21088789403438568,
-0.9220746159553528,
-0.0433635488152504,
-0.776713490486145,
0.623141348361969,
1.0824018716812134,
1.5382510423660278,
-1.128967523574829,
-0.2022850066423416,
-1.7655214071273804,
-0.16692273318767548,
-0.9317742586135864,
0.2677365839481354,
-2.024632692337036,
-0.11398318409919739,
-2.0024514198303223,
-2.2842764854431152,
-1.4212573766708374,
-0.819393515586853,
0.9039996862411499,
0.17459987103939056,
-0.8685339093208313,
1.2126184701919556,
-0.2970323860645294,
-1.8215763568878174,
1.1705408096313477,
-2.206941843032837
] |
https://github.com/huggingface/datasets/issues/5391
|
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
|
Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448).
There are two options here:
1. Increase the model's `max_length` parameter:
```python
model.config.max_length = 512
```
2. Filter data with labels longer than max length: https://discuss.huggingface.co/t/open-to-the-community-whisper-fine-tuning-event/26681/21?u=sanchit-gandhi
Note that the datasets repo is reserved for issues directly related to the HF datasets library. Issues related to custom fine-tuning implementations are more applicable to the HF Forum: https://discuss.huggingface.co. You're more likely to get a response by posting your issue in the most applicable place and boost the chance of someone sharing a working solution!
|
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
| 359 | 108 |
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448).
There are two options here:
1. Increase the model's `max_length` parameter:
```python
model.config.max_length = 512
```
2. Filter data with labels longer than max length: https://discuss.huggingface.co/t/open-to-the-community-whisper-fine-tuning-event/26681/21?u=sanchit-gandhi
Note that the datasets repo is reserved for issues directly related to the HF datasets library. Issues related to custom fine-tuning implementations are more applicable to the HF Forum: https://discuss.huggingface.co. You're more likely to get a response by posting your issue in the most applicable place and boost the chance of someone sharing a working solution!
|
[
-1.2096641063690186,
-0.8761712312698364,
-0.6895792484283447,
1.4795067310333252,
-0.06263969838619232,
-1.3368308544158936,
0.07178962975740433,
-0.9243023991584778,
1.5293045043945312,
-0.7532963156700134,
0.3631325662136078,
-1.6789805889129639,
0.0257553793489933,
-0.5565799474716187,
-0.7453787326812744,
-0.7370343804359436,
-0.388721764087677,
-0.8243210315704346,
1.0691765546798706,
2.53613018989563,
1.3629302978515625,
-1.3753235340118408,
2.801025390625,
0.6405707597732544,
-0.24189677834510803,
-0.9928291440010071,
0.49734941124916077,
-0.015509005635976791,
-1.4423054456710815,
-0.42769747972488403,
-0.9380594491958618,
-0.013656945899128914,
-0.5830395817756653,
-0.46019938588142395,
0.07415325939655304,
0.35222968459129333,
-0.15088815987110138,
-0.3228549659252167,
-0.5379368662834167,
-0.7470918893814087,
0.5772402882575989,
-0.2515476942062378,
0.8959854245185852,
-0.2395572066307068,
1.8076590299606323,
-0.6893017888069153,
0.4318491220474243,
0.6064211130142212,
1.3761894702911377,
0.23294413089752197,
-0.07290328294038773,
0.3757524788379669,
0.31081056594848633,
-0.030212808400392532,
0.4918750822544098,
1.2931113243103027,
0.7426964044570923,
0.42166465520858765,
0.705569863319397,
-2.2013251781463623,
1.4023689031600952,
-0.9437792301177979,
0.3164403438568115,
1.2684210538864136,
-1.0752376317977905,
0.41327691078186035,
-1.8181332349777222,
-0.18003247678279877,
0.4547811448574066,
-2.270512580871582,
0.137400820851326,
-1.2736212015151978,
-0.5952808260917664,
0.9814808368682861,
0.27479806542396545,
-1.273503065109253,
0.12851844727993011,
-0.5052263140678406,
1.0252450704574585,
0.4176817238330841,
1.1913847923278809,
-1.6706366539001465,
-0.03171559423208237,
-0.22527103126049042,
0.2221055030822754,
-1.231112003326416,
-1.666496992111206,
0.5911316275596619,
0.6722007393836975,
0.6240963339805603,
-0.11235049366950989,
0.9415022134780884,
-0.9942569136619568,
0.8667091727256775,
-0.9178458452224731,
-1.7769947052001953,
-1.430935263633728,
-2.3500733375549316,
-2.2321712970733643,
0.7545691132545471,
-0.4355940520763397,
-0.4899251461029053,
2.0952322483062744,
-1.0729997158050537,
-1.8107199668884277,
1.1002424955368042,
0.2665519416332245,
0.023124944418668747,
2.4430131912231445,
0.18358922004699707,
-0.859430193901062,
0.5392422080039978,
-0.7517603635787964,
0.7688772082328796,
-0.3906218409538269,
1.3514554500579834,
0.4411039650440216,
-1.032181739807129,
1.605853796005249,
-0.4273681640625,
0.4201188385486603,
-0.7324946522712708,
-0.4874797463417053,
-0.6195322275161743,
0.2505515217781067,
1.8947235345840454,
-0.3267728090286255,
1.5207455158233643,
-0.20294345915317535,
-1.4972635507583618,
-1.4898666143417358,
0.7689818739891052,
0.4894731044769287,
-0.851916491985321,
0.10443386435508728,
-0.44927456974983215,
0.129309743642807,
0.1264658421278,
1.0701488256454468,
1.2492625713348389,
0.7125836610794067,
-0.26774513721466064,
-0.9296982288360596,
0.16345788538455963,
-0.11476171761751175,
-0.5896955132484436,
-1.7626409530639648,
-0.30638033151626587,
0.14240841567516327,
0.6689749956130981,
-1.236831784248352,
1.8483580350875854,
0.8446879386901855,
2.0431909561157227,
1.0532820224761963,
-0.3434840738773346,
1.5228811502456665,
-0.0070093609392642975,
1.8599088191986084,
-0.43189001083374023,
0.6415392160415649,
-0.46556299924850464,
-1.1969616413116455,
0.8093785047531128,
-0.3825915455818176,
-2.051422357559204,
-0.610206127166748,
-0.8104525208473206,
-0.17355763912200928,
-0.8931382298469543,
0.9590392708778381,
-0.22760990262031555,
-1.3101210594177246,
0.20927347242832184,
-0.7408588528633118,
0.13940760493278503,
-1.3371577262878418,
0.2369379848241806,
0.7845297455787659,
-0.6676320433616638,
0.10630706697702408,
-0.3253514766693115,
-1.3695564270019531,
-0.558082640171051,
0.3913697898387909,
1.8192574977874756,
-0.6781491637229919,
0.9293627738952637,
1.0828813314437866,
-0.5641161799430847,
0.04004267230629921,
0.41663500666618347,
-0.33795881271362305,
0.9367011189460754,
-0.9882708787918091,
-0.3675621747970581,
1.1042211055755615,
-0.17559657990932465,
-0.548653244972229,
1.3825995922088623,
0.8275044560432434,
-1.0023283958435059,
-0.32674354314804077,
-0.07588234543800354,
-0.9018970131874084,
0.05569305643439293,
-1.5891408920288086,
-0.11828700453042984,
0.27438098192214966,
-1.5205659866333008,
-0.4148555099964142,
-0.154837965965271,
1.382668375968933,
-0.16886946558952332,
1.4861230850219727,
-0.31818482279777527,
-0.123121477663517,
-0.40551626682281494,
-0.40359658002853394,
0.12724196910858154,
-0.212849959731102,
-0.6602142453193665,
0.3154880702495575,
-0.8177618384361267,
0.25665584206581116,
1.4514797925949097,
0.3564201593399048,
0.11905597895383835,
0.4867612421512604,
1.1715151071548462,
0.3386564552783966,
-0.12334571033716202,
-0.8477526307106018,
-1.6421558856964111,
2.111402988433838,
-1.4956130981445312,
1.9838093519210815,
0.899321973323822,
-0.03811398893594742,
-1.808219313621521,
-1.8515758514404297,
1.3715275526046753,
1.1264804601669312,
2.4171385765075684,
0.5531529784202576,
0.3630349636077881,
-0.7795302867889404,
-0.6428776383399963,
0.4205752909183502,
-0.9324658513069153,
-0.844287633895874,
0.11470934748649597,
2.361232042312622,
1.7966809272766113,
-0.41019561886787415,
-0.21507582068443298,
-0.9315685033798218,
1.3299075365066528,
-0.21333098411560059,
0.15864595770835876,
1.9076007604599,
-0.24722561240196228,
-1.037976622581482,
1.306006669998169,
-2.40525484085083,
0.2610833942890167,
2.0551278591156006,
0.3695431649684906,
0.017464827746152878,
-1.3435237407684326,
-0.6693597435951233,
-0.274050772190094,
-0.4446823298931122,
-1.1839450597763062,
0.5064060091972351,
-0.2844388782978058,
-0.8829628229141235,
-1.4220050573349,
0.009783226065337658,
-1.1490623950958252,
-1.7508443593978882,
0.35034769773483276,
1.8122035264968872,
2.0568017959594727,
-0.7305082678794861,
1.4011553525924683,
-0.2741612493991852,
0.13858835399150848,
1.2167320251464844,
1.2832409143447876,
3.152017831802368,
1.9017133712768555,
-1.290505290031433,
0.709052324295044,
-0.17504112422466278,
-0.4760008156299591,
1.0545578002929688,
-1.1728734970092773,
1.1694965362548828,
-0.19618374109268188,
-1.352526307106018,
-1.1704524755477905,
1.110396385192871,
0.4475516676902771,
-0.004349368158727884,
-0.5032461881637573,
1.1685751676559448,
0.16459038853645325,
1.2858452796936035,
0.5856356620788574,
-0.25724199414253235,
0.5078018307685852,
-0.28409335017204285,
-0.6029795408248901,
1.5784640312194824,
0.14565150439739227,
-1.5039788484573364,
-2.3362605571746826,
-0.15939965844154358,
-0.9324517846107483,
-0.007294195704162121,
-0.7573262453079224,
-1.0281991958618164,
1.5985815525054932,
0.42440304160118103,
-1.202118158340454,
-0.19337676465511322,
-0.36472705006599426,
-0.6180821061134338,
2.6316988468170166,
-1.4577749967575073,
-0.2161853313446045,
-1.0184290409088135,
-0.5166259407997131,
1.5743045806884766,
-1.20335054397583,
-0.2223636507987976,
-0.9904730319976807,
-0.564698338508606,
-1.2407569885253906,
-0.5240413546562195,
-0.08590371161699295,
-0.8219640254974365,
0.6494315266609192,
0.019147217273712158,
-1.188883662223816,
-0.338916540145874,
-0.9268023371696472,
0.8883059024810791,
-0.14099714159965515,
0.13006174564361572,
1.8644580841064453,
0.37390467524528503,
-0.43253615498542786,
0.7360547184944153,
1.2066272497177124,
0.609073281288147,
-0.5178857445716858,
0.15967342257499695,
-0.6519522070884705,
0.40925148129463196,
-1.2990260124206543,
0.3664409816265106,
-2.8766000270843506,
0.6968947649002075,
-0.005471742246299982,
-0.013866843655705452,
-0.09776509553194046,
-1.3843268156051636,
1.0651265382766724,
2.5183942317962646,
-1.0799007415771484,
0.5689945816993713,
0.28743961453437805,
1.1649245023727417,
-1.6644530296325684,
0.1669650375843048,
-0.5581077337265015,
2.125730037689209,
0.101532481610775,
1.1330286264419556,
-0.48113250732421875,
-2.263622283935547,
0.5760633945465088,
-1.2104759216308594,
-0.9429051280021667,
0.7921913862228394,
-0.8430302143096924,
0.15888868272304535,
-1.2275334596633911,
-0.1262129843235016,
-0.902351975440979,
-1.1209325790405273,
0.630474328994751,
0.06281784921884537,
0.5567079186439514,
-0.6351745128631592,
0.2536795437335968,
-2.1595444679260254,
-1.3195371627807617,
-0.16098375618457794,
-0.9904139041900635,
0.49085840582847595,
-0.3570708632469177,
0.6325408220291138,
-0.10999476164579391,
-0.020326342433691025,
0.2752860188484192,
1.4111769199371338,
3.283795118331909,
0.12682494521141052,
0.45376360416412354,
-0.15468169748783112,
-0.9873283505439758,
1.4454281330108643,
0.9021899700164795,
-0.24821588397026062,
-0.6531485319137573,
-0.9318265914916992,
1.3534300327301025,
1.932332158088684,
1.0437668561935425,
0.12097445875406265,
-0.8692118525505066,
-0.8814160227775574,
0.10220742225646973,
0.28572461009025574,
0.546376645565033,
0.9767882227897644,
0.05410588160157204,
0.10234929621219635,
1.3538563251495361,
1.2143839597702026,
-0.4056713283061981,
0.46849021315574646,
-0.9248173236846924,
-0.40803292393684387,
0.4213665723800659,
0.3435713052749634,
-0.02384290099143982,
0.37022101879119873,
-1.0830562114715576,
-0.2694377303123474,
-0.2659107446670532,
-0.912562906742096,
-0.7553510069847107,
-0.4106588065624237,
-0.37402909994125366,
1.6727215051651,
0.05404447391629219,
-0.40813446044921875,
0.05125131458044052,
-0.7878482341766357,
-0.19779762625694275,
-1.0590900182724,
0.2725610136985779,
-0.1312015950679779,
0.03572176769375801,
-0.11371824890375137,
1.7608236074447632,
-0.9140549302101135,
-2.242457151412964,
0.2645515501499176,
0.18607543408870697,
-0.37798038125038147,
0.07311837375164032,
1.7379940748214722,
0.5329174995422363,
1.3651103973388672,
1.4250297546386719,
0.983987033367157,
-0.6055203080177307,
-1.2905280590057373,
0.7423349618911743,
1.0099589824676514,
-1.46964693069458,
0.9392949342727661,
-0.1584504097700119,
-0.513170599937439,
0.6134771704673767,
1.3050682544708252,
0.38725733757019043,
-2.0486013889312744,
0.9018909931182861,
-0.9546751379966736,
0.8018909692764282,
0.7149096131324768,
0.766712486743927,
0.23086220026016235,
0.8231709003448486,
-1.3028507232666016,
-1.1269012689590454,
-0.7422361373901367,
-0.6979399919509888,
1.8388407230377197,
-0.2577480971813202,
0.4984482228755951,
-0.19232363998889923,
-1.3803496360778809,
-0.0729842409491539,
0.6270596385002136,
0.30247268080711365,
-0.43560367822647095,
0.8676854968070984,
-0.7180675268173218,
-1.1577332019805908,
-1.319469928741455,
-0.4950447082519531,
-0.9489413499832153,
-0.9053103923797607,
1.0182143449783325,
0.7981051206588745,
0.3398226499557495,
1.9780763387680054,
0.5670753717422485,
0.1709136813879013,
-2.649519920349121,
0.8669100999832153,
0.3399028778076172,
-0.0467868372797966,
0.9178295135498047,
0.2811649441719055,
1.0742343664169312,
-0.025715935975313187,
0.5195842981338501,
-2.385397434234619,
2.2521910667419434,
-0.20291928946971893,
0.8767446279525757,
0.04347573220729828,
-0.12251968681812286,
1.0733217000961304,
0.5281689763069153,
0.6505245566368103,
-1.0851008892059326,
0.7895267009735107,
-0.6463778614997864,
1.1643850803375244,
0.8264979720115662,
-0.8000505566596985,
0.08963828533887863,
1.2648078203201294,
0.43222856521606445,
-0.47174835205078125,
-0.9487401843070984,
-0.871169924736023,
0.9342154860496521,
1.8419216871261597,
0.0872822031378746,
0.13077598810195923,
0.8146333694458008,
0.7173663377761841,
-1.3173269033432007,
0.04110877215862274,
-0.7009009718894958,
-0.752261221408844,
1.7096853256225586,
2.0745229721069336,
-0.11074592173099518,
-0.09113457053899765,
-0.7023255228996277,
-1.325056552886963,
0.7631020545959473,
-0.017954062670469284,
0.06545139104127884,
0.7077621817588806,
-0.6956878304481506,
1.1429548263549805,
0.8222106695175171,
0.9745118021965027,
0.20515981316566467,
0.22081433236598969,
0.19220782816410065,
-0.28472375869750977,
-1.1473302841186523,
-0.3197024464607239,
-1.0625810623168945,
-2.483963966369629,
0.42873668670654297,
-0.2098844349384308,
-1.4911320209503174,
0.14342530071735382,
-1.027775526046753,
0.7292437553405762,
-0.5726395845413208,
-1.11356520652771,
-1.3821161985397339,
0.299098938703537,
-0.16080261766910553,
0.8291430473327637,
-1.6600581407546997,
-0.13012370467185974,
1.2045131921768188,
0.9189708232879639,
-0.5525302290916443,
0.8919209241867065,
0.23589710891246796,
0.9942563772201538,
0.9733424186706543,
-0.3376288414001465,
0.42132478952407837,
0.2008386254310608,
-1.3351590633392334,
0.3760964274406433,
1.2847559452056885,
0.11828062683343887,
1.4062260389328003,
-0.49738049507141113,
0.011805669404566288,
0.43469130992889404,
-0.4386238157749176,
-0.48495250940322876,
-0.6516625285148621,
0.7778244018554688,
-0.02692139893770218,
-1.005306363105774,
-0.045215729624032974,
-0.11316076666116714,
-0.18186742067337036,
0.28395670652389526,
-1.491807460784912,
-0.16254308819770813,
-0.3153032660484314,
-0.5501430630683899,
-1.399096131324768,
-0.03758854791522026,
1.315192461013794,
-0.815838634967804,
-0.14356030523777008,
0.4853099584579468,
0.30316007137298584,
0.5903533697128296,
0.6914346814155579,
-0.7188767790794373,
-0.3836279511451721,
-0.09830967336893082,
-0.3623196482658386,
0.32369694113731384,
1.2138603925704956,
-0.1287924200296402,
-0.9096319675445557,
0.6541079878807068,
-0.33608296513557434,
0.12584556639194489,
1.9313665628433228,
0.02297942340373993,
-0.7611742615699768,
0.36785173416137695,
-0.6734901070594788,
1.8655662536621094,
1.6920216083526611,
1.2876527309417725,
-0.14795686304569244,
-0.9679421782493591,
0.676232099533081,
-0.24317613244056702,
-0.340137779712677,
0.8486721515655518,
0.4079637825489044,
-0.28560250997543335,
-1.4366847276687622,
0.5601538419723511,
1.2828152179718018,
-0.8753905892372131,
-0.7625308632850647,
0.051484569907188416,
-0.8404515385627747,
1.1724984645843506,
0.6780275702476501,
0.29438474774360657,
0.22645582258701324,
1.6119565963745117,
0.7227509021759033,
-0.5210034251213074,
0.45019233226776123,
0.5093284249305725,
-0.12253698706626892,
-2.0730514526367188,
-1.0214046239852905,
0.25038474798202515,
-0.33450576663017273,
-1.5177946090698242,
1.3673572540283203,
-1.2193448543548584,
-0.9430958032608032,
0.5182079672813416,
0.102833092212677,
1.3340753316879272,
0.2029578983783722,
1.6609065532684326,
2.079216718673706,
0.9345277547836304,
0.35095828771591187,
1.2739619016647339,
-0.0966821014881134,
-0.35963132977485657,
1.7398419380187988,
-0.4492691457271576,
0.6362162232398987,
1.0641326904296875,
-0.49607399106025696,
-1.1738446950912476,
-0.7633733749389648,
-1.1239135265350342,
-0.7195147275924683,
1.1593220233917236,
0.13398602604866028,
-1.0339174270629883,
0.271866112947464,
1.5347621440887451,
0.07320228219032288,
-0.15776419639587402,
0.5956157445907593,
0.4455447196960449,
-0.6382784843444824,
-0.11512325704097748,
-0.9389567375183105,
0.5877761244773865,
-0.26700109243392944,
-0.42071741819381714,
0.26192569732666016,
0.46357524394989014,
1.1661432981491089,
0.08441336452960968,
0.06765296310186386,
1.2079133987426758,
-1.5012054443359375,
1.3964076042175293,
-0.7168502807617188,
0.2835301160812378,
-2.3809874057769775,
1.4716403484344482,
-0.8808191418647766,
1.9570094347000122,
-2.6454708576202393,
0.44221124053001404,
-0.553050696849823,
-0.4821214973926544,
0.24562564492225647,
-0.2767816483974457,
0.07557408511638641,
-0.11634406447410583,
-1.0176326036453247,
-0.09730984270572662,
-0.7773365378379822,
0.45326733589172363,
1.1745039224624634,
1.329380989074707,
-0.9811636805534363,
-0.27883195877075195,
-1.6976211071014404,
-0.18056969344615936,
-0.6324566006660461,
0.2428845763206482,
-1.8764714002609253,
-0.11136110126972198,
-2.0751662254333496,
-2.3646585941314697,
-1.3998198509216309,
-0.9519158005714417,
1.105760097503662,
0.2283429205417633,
-0.888515293598175,
1.1449710130691528,
-0.4667676091194153,
-1.7678567171096802,
1.0870639085769653,
-2.1556129455566406
] |
https://github.com/huggingface/datasets/issues/5391
|
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
|
@sanchit-gandhi Thank you for all your work on this topic.
I'm finding that changing the `max_length` value does not make this error go away.
|
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
| 359 | 24 |
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
@sanchit-gandhi Thank you for all your work on this topic.
I'm finding that changing the `max_length` value does not make this error go away.
|
[
-1.2096641063690186,
-0.8761712312698364,
-0.6895792484283447,
1.4795067310333252,
-0.06263969838619232,
-1.3368308544158936,
0.07178962975740433,
-0.9243023991584778,
1.5293045043945312,
-0.7532963156700134,
0.3631325662136078,
-1.6789805889129639,
0.0257553793489933,
-0.5565799474716187,
-0.7453787326812744,
-0.7370343804359436,
-0.388721764087677,
-0.8243210315704346,
1.0691765546798706,
2.53613018989563,
1.3629302978515625,
-1.3753235340118408,
2.801025390625,
0.6405707597732544,
-0.24189677834510803,
-0.9928291440010071,
0.49734941124916077,
-0.015509005635976791,
-1.4423054456710815,
-0.42769747972488403,
-0.9380594491958618,
-0.013656945899128914,
-0.5830395817756653,
-0.46019938588142395,
0.07415325939655304,
0.35222968459129333,
-0.15088815987110138,
-0.3228549659252167,
-0.5379368662834167,
-0.7470918893814087,
0.5772402882575989,
-0.2515476942062378,
0.8959854245185852,
-0.2395572066307068,
1.8076590299606323,
-0.6893017888069153,
0.4318491220474243,
0.6064211130142212,
1.3761894702911377,
0.23294413089752197,
-0.07290328294038773,
0.3757524788379669,
0.31081056594848633,
-0.030212808400392532,
0.4918750822544098,
1.2931113243103027,
0.7426964044570923,
0.42166465520858765,
0.705569863319397,
-2.2013251781463623,
1.4023689031600952,
-0.9437792301177979,
0.3164403438568115,
1.2684210538864136,
-1.0752376317977905,
0.41327691078186035,
-1.8181332349777222,
-0.18003247678279877,
0.4547811448574066,
-2.270512580871582,
0.137400820851326,
-1.2736212015151978,
-0.5952808260917664,
0.9814808368682861,
0.27479806542396545,
-1.273503065109253,
0.12851844727993011,
-0.5052263140678406,
1.0252450704574585,
0.4176817238330841,
1.1913847923278809,
-1.6706366539001465,
-0.03171559423208237,
-0.22527103126049042,
0.2221055030822754,
-1.231112003326416,
-1.666496992111206,
0.5911316275596619,
0.6722007393836975,
0.6240963339805603,
-0.11235049366950989,
0.9415022134780884,
-0.9942569136619568,
0.8667091727256775,
-0.9178458452224731,
-1.7769947052001953,
-1.430935263633728,
-2.3500733375549316,
-2.2321712970733643,
0.7545691132545471,
-0.4355940520763397,
-0.4899251461029053,
2.0952322483062744,
-1.0729997158050537,
-1.8107199668884277,
1.1002424955368042,
0.2665519416332245,
0.023124944418668747,
2.4430131912231445,
0.18358922004699707,
-0.859430193901062,
0.5392422080039978,
-0.7517603635787964,
0.7688772082328796,
-0.3906218409538269,
1.3514554500579834,
0.4411039650440216,
-1.032181739807129,
1.605853796005249,
-0.4273681640625,
0.4201188385486603,
-0.7324946522712708,
-0.4874797463417053,
-0.6195322275161743,
0.2505515217781067,
1.8947235345840454,
-0.3267728090286255,
1.5207455158233643,
-0.20294345915317535,
-1.4972635507583618,
-1.4898666143417358,
0.7689818739891052,
0.4894731044769287,
-0.851916491985321,
0.10443386435508728,
-0.44927456974983215,
0.129309743642807,
0.1264658421278,
1.0701488256454468,
1.2492625713348389,
0.7125836610794067,
-0.26774513721466064,
-0.9296982288360596,
0.16345788538455963,
-0.11476171761751175,
-0.5896955132484436,
-1.7626409530639648,
-0.30638033151626587,
0.14240841567516327,
0.6689749956130981,
-1.236831784248352,
1.8483580350875854,
0.8446879386901855,
2.0431909561157227,
1.0532820224761963,
-0.3434840738773346,
1.5228811502456665,
-0.0070093609392642975,
1.8599088191986084,
-0.43189001083374023,
0.6415392160415649,
-0.46556299924850464,
-1.1969616413116455,
0.8093785047531128,
-0.3825915455818176,
-2.051422357559204,
-0.610206127166748,
-0.8104525208473206,
-0.17355763912200928,
-0.8931382298469543,
0.9590392708778381,
-0.22760990262031555,
-1.3101210594177246,
0.20927347242832184,
-0.7408588528633118,
0.13940760493278503,
-1.3371577262878418,
0.2369379848241806,
0.7845297455787659,
-0.6676320433616638,
0.10630706697702408,
-0.3253514766693115,
-1.3695564270019531,
-0.558082640171051,
0.3913697898387909,
1.8192574977874756,
-0.6781491637229919,
0.9293627738952637,
1.0828813314437866,
-0.5641161799430847,
0.04004267230629921,
0.41663500666618347,
-0.33795881271362305,
0.9367011189460754,
-0.9882708787918091,
-0.3675621747970581,
1.1042211055755615,
-0.17559657990932465,
-0.548653244972229,
1.3825995922088623,
0.8275044560432434,
-1.0023283958435059,
-0.32674354314804077,
-0.07588234543800354,
-0.9018970131874084,
0.05569305643439293,
-1.5891408920288086,
-0.11828700453042984,
0.27438098192214966,
-1.5205659866333008,
-0.4148555099964142,
-0.154837965965271,
1.382668375968933,
-0.16886946558952332,
1.4861230850219727,
-0.31818482279777527,
-0.123121477663517,
-0.40551626682281494,
-0.40359658002853394,
0.12724196910858154,
-0.212849959731102,
-0.6602142453193665,
0.3154880702495575,
-0.8177618384361267,
0.25665584206581116,
1.4514797925949097,
0.3564201593399048,
0.11905597895383835,
0.4867612421512604,
1.1715151071548462,
0.3386564552783966,
-0.12334571033716202,
-0.8477526307106018,
-1.6421558856964111,
2.111402988433838,
-1.4956130981445312,
1.9838093519210815,
0.899321973323822,
-0.03811398893594742,
-1.808219313621521,
-1.8515758514404297,
1.3715275526046753,
1.1264804601669312,
2.4171385765075684,
0.5531529784202576,
0.3630349636077881,
-0.7795302867889404,
-0.6428776383399963,
0.4205752909183502,
-0.9324658513069153,
-0.844287633895874,
0.11470934748649597,
2.361232042312622,
1.7966809272766113,
-0.41019561886787415,
-0.21507582068443298,
-0.9315685033798218,
1.3299075365066528,
-0.21333098411560059,
0.15864595770835876,
1.9076007604599,
-0.24722561240196228,
-1.037976622581482,
1.306006669998169,
-2.40525484085083,
0.2610833942890167,
2.0551278591156006,
0.3695431649684906,
0.017464827746152878,
-1.3435237407684326,
-0.6693597435951233,
-0.274050772190094,
-0.4446823298931122,
-1.1839450597763062,
0.5064060091972351,
-0.2844388782978058,
-0.8829628229141235,
-1.4220050573349,
0.009783226065337658,
-1.1490623950958252,
-1.7508443593978882,
0.35034769773483276,
1.8122035264968872,
2.0568017959594727,
-0.7305082678794861,
1.4011553525924683,
-0.2741612493991852,
0.13858835399150848,
1.2167320251464844,
1.2832409143447876,
3.152017831802368,
1.9017133712768555,
-1.290505290031433,
0.709052324295044,
-0.17504112422466278,
-0.4760008156299591,
1.0545578002929688,
-1.1728734970092773,
1.1694965362548828,
-0.19618374109268188,
-1.352526307106018,
-1.1704524755477905,
1.110396385192871,
0.4475516676902771,
-0.004349368158727884,
-0.5032461881637573,
1.1685751676559448,
0.16459038853645325,
1.2858452796936035,
0.5856356620788574,
-0.25724199414253235,
0.5078018307685852,
-0.28409335017204285,
-0.6029795408248901,
1.5784640312194824,
0.14565150439739227,
-1.5039788484573364,
-2.3362605571746826,
-0.15939965844154358,
-0.9324517846107483,
-0.007294195704162121,
-0.7573262453079224,
-1.0281991958618164,
1.5985815525054932,
0.42440304160118103,
-1.202118158340454,
-0.19337676465511322,
-0.36472705006599426,
-0.6180821061134338,
2.6316988468170166,
-1.4577749967575073,
-0.2161853313446045,
-1.0184290409088135,
-0.5166259407997131,
1.5743045806884766,
-1.20335054397583,
-0.2223636507987976,
-0.9904730319976807,
-0.564698338508606,
-1.2407569885253906,
-0.5240413546562195,
-0.08590371161699295,
-0.8219640254974365,
0.6494315266609192,
0.019147217273712158,
-1.188883662223816,
-0.338916540145874,
-0.9268023371696472,
0.8883059024810791,
-0.14099714159965515,
0.13006174564361572,
1.8644580841064453,
0.37390467524528503,
-0.43253615498542786,
0.7360547184944153,
1.2066272497177124,
0.609073281288147,
-0.5178857445716858,
0.15967342257499695,
-0.6519522070884705,
0.40925148129463196,
-1.2990260124206543,
0.3664409816265106,
-2.8766000270843506,
0.6968947649002075,
-0.005471742246299982,
-0.013866843655705452,
-0.09776509553194046,
-1.3843268156051636,
1.0651265382766724,
2.5183942317962646,
-1.0799007415771484,
0.5689945816993713,
0.28743961453437805,
1.1649245023727417,
-1.6644530296325684,
0.1669650375843048,
-0.5581077337265015,
2.125730037689209,
0.101532481610775,
1.1330286264419556,
-0.48113250732421875,
-2.263622283935547,
0.5760633945465088,
-1.2104759216308594,
-0.9429051280021667,
0.7921913862228394,
-0.8430302143096924,
0.15888868272304535,
-1.2275334596633911,
-0.1262129843235016,
-0.902351975440979,
-1.1209325790405273,
0.630474328994751,
0.06281784921884537,
0.5567079186439514,
-0.6351745128631592,
0.2536795437335968,
-2.1595444679260254,
-1.3195371627807617,
-0.16098375618457794,
-0.9904139041900635,
0.49085840582847595,
-0.3570708632469177,
0.6325408220291138,
-0.10999476164579391,
-0.020326342433691025,
0.2752860188484192,
1.4111769199371338,
3.283795118331909,
0.12682494521141052,
0.45376360416412354,
-0.15468169748783112,
-0.9873283505439758,
1.4454281330108643,
0.9021899700164795,
-0.24821588397026062,
-0.6531485319137573,
-0.9318265914916992,
1.3534300327301025,
1.932332158088684,
1.0437668561935425,
0.12097445875406265,
-0.8692118525505066,
-0.8814160227775574,
0.10220742225646973,
0.28572461009025574,
0.546376645565033,
0.9767882227897644,
0.05410588160157204,
0.10234929621219635,
1.3538563251495361,
1.2143839597702026,
-0.4056713283061981,
0.46849021315574646,
-0.9248173236846924,
-0.40803292393684387,
0.4213665723800659,
0.3435713052749634,
-0.02384290099143982,
0.37022101879119873,
-1.0830562114715576,
-0.2694377303123474,
-0.2659107446670532,
-0.912562906742096,
-0.7553510069847107,
-0.4106588065624237,
-0.37402909994125366,
1.6727215051651,
0.05404447391629219,
-0.40813446044921875,
0.05125131458044052,
-0.7878482341766357,
-0.19779762625694275,
-1.0590900182724,
0.2725610136985779,
-0.1312015950679779,
0.03572176769375801,
-0.11371824890375137,
1.7608236074447632,
-0.9140549302101135,
-2.242457151412964,
0.2645515501499176,
0.18607543408870697,
-0.37798038125038147,
0.07311837375164032,
1.7379940748214722,
0.5329174995422363,
1.3651103973388672,
1.4250297546386719,
0.983987033367157,
-0.6055203080177307,
-1.2905280590057373,
0.7423349618911743,
1.0099589824676514,
-1.46964693069458,
0.9392949342727661,
-0.1584504097700119,
-0.513170599937439,
0.6134771704673767,
1.3050682544708252,
0.38725733757019043,
-2.0486013889312744,
0.9018909931182861,
-0.9546751379966736,
0.8018909692764282,
0.7149096131324768,
0.766712486743927,
0.23086220026016235,
0.8231709003448486,
-1.3028507232666016,
-1.1269012689590454,
-0.7422361373901367,
-0.6979399919509888,
1.8388407230377197,
-0.2577480971813202,
0.4984482228755951,
-0.19232363998889923,
-1.3803496360778809,
-0.0729842409491539,
0.6270596385002136,
0.30247268080711365,
-0.43560367822647095,
0.8676854968070984,
-0.7180675268173218,
-1.1577332019805908,
-1.319469928741455,
-0.4950447082519531,
-0.9489413499832153,
-0.9053103923797607,
1.0182143449783325,
0.7981051206588745,
0.3398226499557495,
1.9780763387680054,
0.5670753717422485,
0.1709136813879013,
-2.649519920349121,
0.8669100999832153,
0.3399028778076172,
-0.0467868372797966,
0.9178295135498047,
0.2811649441719055,
1.0742343664169312,
-0.025715935975313187,
0.5195842981338501,
-2.385397434234619,
2.2521910667419434,
-0.20291928946971893,
0.8767446279525757,
0.04347573220729828,
-0.12251968681812286,
1.0733217000961304,
0.5281689763069153,
0.6505245566368103,
-1.0851008892059326,
0.7895267009735107,
-0.6463778614997864,
1.1643850803375244,
0.8264979720115662,
-0.8000505566596985,
0.08963828533887863,
1.2648078203201294,
0.43222856521606445,
-0.47174835205078125,
-0.9487401843070984,
-0.871169924736023,
0.9342154860496521,
1.8419216871261597,
0.0872822031378746,
0.13077598810195923,
0.8146333694458008,
0.7173663377761841,
-1.3173269033432007,
0.04110877215862274,
-0.7009009718894958,
-0.752261221408844,
1.7096853256225586,
2.0745229721069336,
-0.11074592173099518,
-0.09113457053899765,
-0.7023255228996277,
-1.325056552886963,
0.7631020545959473,
-0.017954062670469284,
0.06545139104127884,
0.7077621817588806,
-0.6956878304481506,
1.1429548263549805,
0.8222106695175171,
0.9745118021965027,
0.20515981316566467,
0.22081433236598969,
0.19220782816410065,
-0.28472375869750977,
-1.1473302841186523,
-0.3197024464607239,
-1.0625810623168945,
-2.483963966369629,
0.42873668670654297,
-0.2098844349384308,
-1.4911320209503174,
0.14342530071735382,
-1.027775526046753,
0.7292437553405762,
-0.5726395845413208,
-1.11356520652771,
-1.3821161985397339,
0.299098938703537,
-0.16080261766910553,
0.8291430473327637,
-1.6600581407546997,
-0.13012370467185974,
1.2045131921768188,
0.9189708232879639,
-0.5525302290916443,
0.8919209241867065,
0.23589710891246796,
0.9942563772201538,
0.9733424186706543,
-0.3376288414001465,
0.42132478952407837,
0.2008386254310608,
-1.3351590633392334,
0.3760964274406433,
1.2847559452056885,
0.11828062683343887,
1.4062260389328003,
-0.49738049507141113,
0.011805669404566288,
0.43469130992889404,
-0.4386238157749176,
-0.48495250940322876,
-0.6516625285148621,
0.7778244018554688,
-0.02692139893770218,
-1.005306363105774,
-0.045215729624032974,
-0.11316076666116714,
-0.18186742067337036,
0.28395670652389526,
-1.491807460784912,
-0.16254308819770813,
-0.3153032660484314,
-0.5501430630683899,
-1.399096131324768,
-0.03758854791522026,
1.315192461013794,
-0.815838634967804,
-0.14356030523777008,
0.4853099584579468,
0.30316007137298584,
0.5903533697128296,
0.6914346814155579,
-0.7188767790794373,
-0.3836279511451721,
-0.09830967336893082,
-0.3623196482658386,
0.32369694113731384,
1.2138603925704956,
-0.1287924200296402,
-0.9096319675445557,
0.6541079878807068,
-0.33608296513557434,
0.12584556639194489,
1.9313665628433228,
0.02297942340373993,
-0.7611742615699768,
0.36785173416137695,
-0.6734901070594788,
1.8655662536621094,
1.6920216083526611,
1.2876527309417725,
-0.14795686304569244,
-0.9679421782493591,
0.676232099533081,
-0.24317613244056702,
-0.340137779712677,
0.8486721515655518,
0.4079637825489044,
-0.28560250997543335,
-1.4366847276687622,
0.5601538419723511,
1.2828152179718018,
-0.8753905892372131,
-0.7625308632850647,
0.051484569907188416,
-0.8404515385627747,
1.1724984645843506,
0.6780275702476501,
0.29438474774360657,
0.22645582258701324,
1.6119565963745117,
0.7227509021759033,
-0.5210034251213074,
0.45019233226776123,
0.5093284249305725,
-0.12253698706626892,
-2.0730514526367188,
-1.0214046239852905,
0.25038474798202515,
-0.33450576663017273,
-1.5177946090698242,
1.3673572540283203,
-1.2193448543548584,
-0.9430958032608032,
0.5182079672813416,
0.102833092212677,
1.3340753316879272,
0.2029578983783722,
1.6609065532684326,
2.079216718673706,
0.9345277547836304,
0.35095828771591187,
1.2739619016647339,
-0.0966821014881134,
-0.35963132977485657,
1.7398419380187988,
-0.4492691457271576,
0.6362162232398987,
1.0641326904296875,
-0.49607399106025696,
-1.1738446950912476,
-0.7633733749389648,
-1.1239135265350342,
-0.7195147275924683,
1.1593220233917236,
0.13398602604866028,
-1.0339174270629883,
0.271866112947464,
1.5347621440887451,
0.07320228219032288,
-0.15776419639587402,
0.5956157445907593,
0.4455447196960449,
-0.6382784843444824,
-0.11512325704097748,
-0.9389567375183105,
0.5877761244773865,
-0.26700109243392944,
-0.42071741819381714,
0.26192569732666016,
0.46357524394989014,
1.1661432981491089,
0.08441336452960968,
0.06765296310186386,
1.2079133987426758,
-1.5012054443359375,
1.3964076042175293,
-0.7168502807617188,
0.2835301160812378,
-2.3809874057769775,
1.4716403484344482,
-0.8808191418647766,
1.9570094347000122,
-2.6454708576202393,
0.44221124053001404,
-0.553050696849823,
-0.4821214973926544,
0.24562564492225647,
-0.2767816483974457,
0.07557408511638641,
-0.11634406447410583,
-1.0176326036453247,
-0.09730984270572662,
-0.7773365378379822,
0.45326733589172363,
1.1745039224624634,
1.329380989074707,
-0.9811636805534363,
-0.27883195877075195,
-1.6976211071014404,
-0.18056969344615936,
-0.6324566006660461,
0.2428845763206482,
-1.8764714002609253,
-0.11136110126972198,
-2.0751662254333496,
-2.3646585941314697,
-1.3998198509216309,
-0.9519158005714417,
1.105760097503662,
0.2283429205417633,
-0.888515293598175,
1.1449710130691528,
-0.4667676091194153,
-1.7678567171096802,
1.0870639085769653,
-2.1556129455566406
] |
https://github.com/huggingface/datasets/issues/5390
|
Error when pushing to the CI hub
|
Hmmm, git bisect tells me that the behavior is the same since https://github.com/huggingface/datasets/commit/67e65c90e9490810b89ee140da11fdd13c356c9c (3 Oct), i.e. https://github.com/huggingface/datasets/pull/4926
|
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 360 | 17 |
Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Hmmm, git bisect tells me that the behavior is the same since https://github.com/huggingface/datasets/commit/67e65c90e9490810b89ee140da11fdd13c356c9c (3 Oct), i.e. https://github.com/huggingface/datasets/pull/4926
|
[
-1.1982983350753784,
-0.9045103192329407,
-0.6958116292953491,
1.477090835571289,
-0.09118883311748505,
-1.2786083221435547,
0.10011560469865799,
-1.0638335943222046,
1.448171854019165,
-0.6696186661720276,
0.2905119061470032,
-1.6558254957199097,
-0.12557749450206757,
-0.5398754477500916,
-0.6706233620643616,
-0.9138610363006592,
-0.35828760266304016,
-0.8647133111953735,
1.0132955312728882,
2.539193868637085,
1.3389991521835327,
-1.2591032981872559,
2.770843982696533,
0.6544392704963684,
-0.22054561972618103,
-1.065980315208435,
0.6086640357971191,
0.04072850942611694,
-1.2388859987258911,
-0.43314215540885925,
-0.9030892848968506,
-0.041692569851875305,
-0.6328808665275574,
-0.33229437470436096,
0.11017774790525436,
0.44782575964927673,
-0.2856599688529968,
-0.22833731770515442,
-0.7013671398162842,
-0.734449565410614,
0.5804823040962219,
-0.3880782425403595,
0.9813613295555115,
-0.32847604155540466,
1.750903844833374,
-0.6658838987350464,
0.4619033932685852,
0.7659700512886047,
1.3023121356964111,
0.17017626762390137,
0.09735143184661865,
0.23263812065124512,
0.37663042545318604,
0.04713054746389389,
0.5828241109848022,
1.1920497417449951,
0.5829481482505798,
0.5075064897537231,
0.5957545042037964,
-2.2758049964904785,
1.289686679840088,
-0.853352963924408,
0.2480226755142212,
1.3877978324890137,
-0.8036419749259949,
0.29723572731018066,
-1.836396336555481,
-0.06897126138210297,
0.5887780785560608,
-2.296754837036133,
0.2974904775619507,
-1.3451849222183228,
-0.468903511762619,
0.8738093972206116,
0.3291475474834442,
-1.2253248691558838,
0.12753069400787354,
-0.533565878868103,
1.0883556604385376,
0.44652947783470154,
1.0922082662582397,
-1.6927188634872437,
-0.06554096937179565,
-0.16231968998908997,
0.07639817148447037,
-1.2764991521835327,
-1.6113001108169556,
0.5625733137130737,
0.5256491899490356,
0.6650899052619934,
-0.03223010152578354,
1.0084408521652222,
-1.0906237363815308,
0.8311896324157715,
-0.9341976642608643,
-1.646561861038208,
-1.4257603883743286,
-2.3979179859161377,
-2.2873520851135254,
0.7186795473098755,
-0.4979270100593567,
-0.519353985786438,
1.9981569051742554,
-1.0067700147628784,
-1.7228503227233887,
1.115216612815857,
0.32889997959136963,
0.1820734143257141,
2.4321839809417725,
0.20062369108200073,
-0.7708458304405212,
0.46854037046432495,
-0.7272903323173523,
0.7717190384864807,
-0.3128775656223297,
1.3159704208374023,
0.4860002398490906,
-1.028712272644043,
1.5824131965637207,
-0.4860766530036926,
0.5703232288360596,
-0.6897540092468262,
-0.4979328513145447,
-0.8299819231033325,
0.1688658893108368,
1.830491542816162,
-0.3263360559940338,
1.5594913959503174,
-0.2534724473953247,
-1.505371332168579,
-1.5403857231140137,
0.852910041809082,
0.5041579008102417,
-0.9037332534790039,
-0.05078352242708206,
-0.4869591295719147,
0.1882820427417755,
-0.04727917164564133,
1.084261417388916,
1.1956020593643188,
0.7511637806892395,
-0.3733878433704376,
-0.8348401784896851,
0.16245141625404358,
-0.1429036557674408,
-0.7267665266990662,
-1.8363173007965088,
-0.27909567952156067,
0.2382398247718811,
0.6305305361747742,
-1.2342946529388428,
1.8187164068222046,
0.9096848964691162,
1.9783809185028076,
0.9335166811943054,
-0.40362444519996643,
1.4342002868652344,
-0.0013253483921289444,
1.8345564603805542,
-0.5470139384269714,
0.6110588312149048,
-0.3822498023509979,
-1.1712039709091187,
0.8677740693092346,
-0.3164518475532532,
-2.0051746368408203,
-0.8287745714187622,
-0.6903587579727173,
-0.17913347482681274,
-0.7006932497024536,
0.9417683482170105,
-0.3008173108100891,
-1.4003647565841675,
0.09374230355024338,
-0.6428077816963196,
0.1649090051651001,
-1.2574115991592407,
0.1908814013004303,
0.6924101114273071,
-0.6777612566947937,
-0.07577788829803467,
-0.24800023436546326,
-1.238606333732605,
-0.5609502792358398,
0.3274987041950226,
1.874994158744812,
-0.6021651029586792,
0.9482870697975159,
1.0040347576141357,
-0.6932169198989868,
0.16347062587738037,
0.1961841583251953,
-0.31590378284454346,
0.8089977502822876,
-1.0732090473175049,
-0.43636900186538696,
1.2011579275131226,
-0.2289087474346161,
-0.7790232300758362,
1.5389240980148315,
0.8423242568969727,
-1.0852309465408325,
-0.28040021657943726,
-0.20180639624595642,
-0.8279041647911072,
0.05371133238077164,
-1.5483059883117676,
-0.16372564435005188,
0.39845025539398193,
-1.422569751739502,
-0.32086360454559326,
-0.21476265788078308,
1.3976515531539917,
-0.18724560737609863,
1.470017433166504,
-0.3047725558280945,
-0.21133670210838318,
-0.32706987857818604,
-0.4568420350551605,
0.12437266856431961,
-0.15912199020385742,
-0.5326421856880188,
0.18938061594963074,
-0.8786590695381165,
0.3238062262535095,
1.463484764099121,
0.327058881521225,
0.09554318338632584,
0.4028409421443939,
1.1129752397537231,
0.3387715518474579,
-0.05508203059434891,
-0.9352369904518127,
-1.5895498991012573,
1.976496696472168,
-1.4424325227737427,
2.05625057220459,
0.84955233335495,
-0.037160515785217285,
-1.8056695461273193,
-1.8069322109222412,
1.1852688789367676,
1.0717756748199463,
2.4145076274871826,
0.4850483536720276,
0.3771415650844574,
-0.8009922504425049,
-0.7481234073638916,
0.3510514199733734,
-0.972602128982544,
-0.599739134311676,
0.17007064819335938,
2.3306071758270264,
1.7747091054916382,
-0.5043922066688538,
-0.19089245796203613,
-0.9445773363113403,
1.2838772535324097,
-0.22092506289482117,
0.2798119783401489,
2.060004472732544,
-0.21347638964653015,
-1.0631651878356934,
1.2946518659591675,
-2.3542912006378174,
0.29882338643074036,
2.1156864166259766,
0.2631109356880188,
0.15759903192520142,
-1.428565502166748,
-0.6731939315795898,
-0.33570849895477295,
-0.4575220048427582,
-1.23953115940094,
0.5953109860420227,
-0.32938849925994873,
-0.8525994420051575,
-1.4215576648712158,
0.025155354291200638,
-1.168674349784851,
-1.7743253707885742,
0.3189382255077362,
1.9620462656021118,
2.096177577972412,
-0.7417132258415222,
1.3996984958648682,
-0.2910369336605072,
-0.03526692092418671,
1.29487144947052,
1.3675289154052734,
3.043165683746338,
1.874573826789856,
-1.3174176216125488,
0.7658423781394958,
-0.2541608214378357,
-0.47974035143852234,
1.1323192119598389,
-1.0877684354782104,
1.126592755317688,
-0.2174212634563446,
-1.2747933864593506,
-1.25020170211792,
1.1537256240844727,
0.48683369159698486,
0.017887195572257042,
-0.5455579161643982,
1.24985933303833,
0.1317189633846283,
1.3352787494659424,
0.6303033828735352,
-0.39519959688186646,
0.5364470481872559,
-0.38273799419403076,
-0.5839748382568359,
1.6497615575790405,
0.16649514436721802,
-1.5000979900360107,
-2.440479040145874,
-0.2684183120727539,
-0.8904029130935669,
-0.05056839436292648,
-0.6097109913825989,
-1.0833938121795654,
1.6417903900146484,
0.36894312500953674,
-1.3067625761032104,
-0.3061985671520233,
-0.31982049345970154,
-0.4887844920158386,
2.6400187015533447,
-1.3000010251998901,
-0.12317049503326416,
-0.9505671858787537,
-0.5314744114875793,
1.6397476196289062,
-1.2094576358795166,
-0.2064056694507599,
-1.0032199621200562,
-0.6277434229850769,
-1.2657296657562256,
-0.49544060230255127,
0.057260408997535706,
-0.9360306262969971,
0.7111913561820984,
0.1949322521686554,
-1.1889441013336182,
-0.3231812119483948,
-0.8658955693244934,
1.0591621398925781,
-0.08646883815526962,
0.18762516975402832,
1.8996738195419312,
0.3379937708377838,
-0.4681906998157501,
0.7363519668579102,
1.1612985134124756,
0.6110527515411377,
-0.6713785529136658,
0.05270172655582428,
-0.6699126362800598,
0.3021202087402344,
-1.4030628204345703,
0.1950453519821167,
-2.9523351192474365,
0.7753669023513794,
-0.1831781268119812,
-0.09439102560281754,
-0.04611097648739815,
-1.273155927658081,
1.0946146249771118,
2.6048645973205566,
-1.1765646934509277,
0.4619850218296051,
0.4028026759624481,
1.0613203048706055,
-1.638545274734497,
0.29290899634361267,
-0.44809484481811523,
2.0082521438598633,
0.15121528506278992,
1.2366687059402466,
-0.5221776962280273,
-2.1906485557556152,
0.639605700969696,
-1.27511465549469,
-0.9956402778625488,
0.8961460590362549,
-0.8708842992782593,
0.2734919488430023,
-1.4553279876708984,
-0.16661429405212402,
-0.9838472008705139,
-1.238032341003418,
0.6882402300834656,
0.08142291009426117,
0.44909095764160156,
-0.5810179710388184,
0.3104187250137329,
-2.211073160171509,
-1.4077932834625244,
-0.19556087255477905,
-1.0313326120376587,
0.5686843991279602,
-0.3948228061199188,
0.6345412731170654,
-0.019207019358873367,
0.07883745431900024,
0.3621411919593811,
1.4948594570159912,
3.448833465576172,
0.13766798377037048,
0.22187891602516174,
-0.12542006373405457,
-1.0025469064712524,
1.408852219581604,
0.909137487411499,
-0.10260827839374542,
-0.6160125732421875,
-0.9586566686630249,
1.2864642143249512,
2.0049896240234375,
1.075297474861145,
0.16266107559204102,
-0.8996105194091797,
-0.7256731986999512,
-0.014213956892490387,
0.11282214522361755,
0.5468083620071411,
1.0047457218170166,
-0.02329983189702034,
0.09619080275297165,
1.4120162725448608,
1.1895475387573242,
-0.31706565618515015,
0.32761669158935547,
-0.9450910091400146,
-0.416411817073822,
0.44470474123954773,
0.17707213759422302,
-0.024104151874780655,
0.5308820009231567,
-1.0493677854537964,
-0.23999696969985962,
-0.3457287549972534,
-0.8869717717170715,
-0.740383505821228,
-0.45651572942733765,
-0.46506139636039734,
1.5919218063354492,
0.09611903131008148,
-0.4325127899646759,
0.11931059509515762,
-0.6337766647338867,
-0.22606614232063293,
-1.141400694847107,
0.18359339237213135,
-0.11481167376041412,
-0.04488518089056015,
-0.1957520842552185,
1.6378096342086792,
-0.9356973767280579,
-2.1278977394104004,
0.1534610092639923,
0.23610547184944153,
-0.32116326689720154,
0.2642269432544708,
1.7263519763946533,
0.48789623379707336,
1.3693764209747314,
1.2825697660446167,
0.9318152070045471,
-0.5796610713005066,
-1.2602591514587402,
0.7038870453834534,
0.979438841342926,
-1.4083812236785889,
0.9987978935241699,
-0.25129997730255127,
-0.5039580464363098,
0.695746898651123,
1.3559184074401855,
0.4387218654155731,
-2.033703088760376,
0.8547917604446411,
-0.9679230451583862,
0.7942885756492615,
0.6812382340431213,
0.750032365322113,
0.2207137644290924,
0.8496081233024597,
-1.2058838605880737,
-1.1024935245513916,
-0.6676827669143677,
-0.6783496141433716,
1.8520164489746094,
-0.30946066975593567,
0.5801133513450623,
-0.19124776124954224,
-1.2199716567993164,
-0.12555965781211853,
0.7723322510719299,
0.37816232442855835,
-0.39187750220298767,
0.9212628602981567,
-0.5954993963241577,
-1.008008360862732,
-1.2173497676849365,
-0.4102559983730316,
-1.0707056522369385,
-0.8301107287406921,
1.05470609664917,
0.7593555450439453,
0.40612539649009705,
1.866316318511963,
0.5889703035354614,
0.3009585738182068,
-2.6728103160858154,
0.9289638996124268,
0.2754836678504944,
-0.046435244381427765,
0.9626744985580444,
0.20555764436721802,
1.1517444849014282,
-0.010963594540953636,
0.6202790141105652,
-2.3714916706085205,
2.2681620121002197,
-0.1959550380706787,
0.5885879397392273,
-0.015888836234807968,
-0.22311469912528992,
1.1125915050506592,
0.5329431295394897,
0.6281726360321045,
-1.0781521797180176,
0.7496088743209839,
-0.5450082421302795,
1.0196031332015991,
0.9503628015518188,
-0.9047366976737976,
-0.011168081313371658,
1.4326679706573486,
0.512761116027832,
-0.4750303030014038,
-0.9136617183685303,
-0.77220618724823,
0.9450210332870483,
1.7062225341796875,
0.02934766560792923,
-0.022605136036872864,
0.8678956627845764,
0.563896119594574,
-1.2484688758850098,
0.0742570012807846,
-0.6647302508354187,
-0.6863129734992981,
1.6842344999313354,
2.0548508167266846,
-0.09113709628582001,
-0.1575070023536682,
-0.7051920890808105,
-1.2938956022262573,
0.7891967296600342,
-0.11490894854068756,
0.05719573795795441,
0.6271222829818726,
-0.6195470690727234,
1.0986675024032593,
0.5589331984519958,
1.0938762426376343,
0.010713225230574608,
0.32789137959480286,
0.3200782537460327,
-0.41618821024894714,
-1.18724524974823,
-0.31330034136772156,
-1.149017095565796,
-2.5643346309661865,
0.46486878395080566,
-0.2253495454788208,
-1.5141637325286865,
0.05210806801915169,
-1.0667173862457275,
0.8846539258956909,
-0.5352984666824341,
-1.0815702676773071,
-1.4470075368881226,
0.32576796412467957,
-0.19238883256912231,
0.947379469871521,
-1.6667273044586182,
-0.18444836139678955,
1.2660653591156006,
0.8209375143051147,
-0.6110293865203857,
0.9476349353790283,
0.2516396641731262,
0.9721618294715881,
0.7513562440872192,
-0.3974341154098511,
0.5839086771011353,
-0.0066436296328902245,
-1.312208890914917,
0.42942723631858826,
1.2059673070907593,
0.17951062321662903,
1.426830768585205,
-0.36900684237480164,
0.07702165842056274,
0.45200589299201965,
-0.6486738920211792,
-0.46452268958091736,
-0.38068515062332153,
0.7155736088752747,
0.12010089308023453,
-0.989985466003418,
-0.1656489372253418,
-0.10802695900201797,
-0.2881011962890625,
0.16076791286468506,
-1.4500278234481812,
-0.2890472412109375,
-0.4061223566532135,
-0.44824665784835815,
-1.3661092519760132,
0.043387915939092636,
1.2720353603363037,
-0.7236001491546631,
-0.2529541552066803,
0.4116278886795044,
0.33856135606765747,
0.6553488969802856,
0.5703248977661133,
-0.8119996786117554,
-0.31129300594329834,
-0.3593480885028839,
-0.27187231183052063,
0.2680298388004303,
1.195753574371338,
-0.09993010759353638,
-0.9706900715827942,
0.7254664301872253,
-0.3907988667488098,
0.15730342268943787,
2.0105299949645996,
-0.03710802644491196,
-0.71846604347229,
0.3491124212741852,
-0.6919289231300354,
1.8127671480178833,
1.7419755458831787,
1.2365859746932983,
-0.1377527117729187,
-0.7930130362510681,
0.5647716522216797,
-0.309163898229599,
-0.2949806749820709,
0.8812077641487122,
0.40384483337402344,
-0.20139649510383606,
-1.394765853881836,
0.6423061490058899,
1.2969298362731934,
-0.7966181039810181,
-0.6708720326423645,
0.11227422952651978,
-0.856654942035675,
1.2318373918533325,
0.5788374543190002,
0.31347307562828064,
0.2753280997276306,
1.510709524154663,
0.7014860510826111,
-0.4741688668727875,
0.48600712418556213,
0.4976404309272766,
-0.22130095958709717,
-2.1077020168304443,
-1.0553938150405884,
0.35111066699028015,
-0.4294598400592804,
-1.5752148628234863,
1.312670111656189,
-1.1203945875167847,
-1.0056891441345215,
0.5654049515724182,
0.07418534904718399,
1.330867886543274,
0.4065036475658417,
1.680467128753662,
2.1003663539886475,
0.9513180255889893,
0.40633395314216614,
1.28299880027771,
-0.012689689174294472,
-0.4770306646823883,
1.887403964996338,
-0.398789644241333,
0.5426691770553589,
0.9928203821182251,
-0.3931235671043396,
-1.0689234733581543,
-0.8127670288085938,
-1.177431344985962,
-0.5773933529853821,
1.2137442827224731,
0.14393240213394165,
-1.0218034982681274,
0.2011377215385437,
1.5692778825759888,
0.1730935275554657,
-0.1773023009300232,
0.7413188219070435,
0.39051517844200134,
-0.7494480609893799,
-0.05939064174890518,
-0.8269503116607666,
0.4697869122028351,
-0.11703747510910034,
-0.27585262060165405,
0.30635279417037964,
0.5529768466949463,
1.3232307434082031,
-0.10292013734579086,
0.12395723909139633,
1.124639630317688,
-1.4280762672424316,
1.557146668434143,
-0.5956841707229614,
0.28033122420310974,
-2.4710373878479004,
1.3670340776443481,
-0.7645208835601807,
1.930749535560608,
-2.4854962825775146,
0.4284796714782715,
-0.5265141129493713,
-0.5474424958229065,
0.20743697881698608,
-0.41218534111976624,
0.07617805153131485,
-0.11866208165884018,
-1.0056322813034058,
0.015116000548005104,
-0.7511322498321533,
0.5495700836181641,
1.1370176076889038,
1.4050401449203491,
-1.1353282928466797,
-0.23581933975219727,
-1.7813634872436523,
-0.24437382817268372,
-0.8159343004226685,
0.3373446464538574,
-1.9798356294631958,
-0.1212407648563385,
-2.0036072731018066,
-2.325624704360962,
-1.4080206155776978,
-0.8519205451011658,
1.0389878749847412,
0.2557292878627777,
-0.8607470393180847,
1.2043157815933228,
-0.33726295828819275,
-1.8351799249649048,
1.1093240976333618,
-2.18900728225708
] |
https://github.com/huggingface/datasets/issues/5390
|
Error when pushing to the CI hub
|
Maybe the current version of moonlanding in Hub CI is the issue.
I relaunched tests that were working two days ago: now they are failing. https://github.com/huggingface/datasets-server/commit/746414449cae4b311733f8a76e5b3b4ca73b38a9 for example
cc @huggingface/moon-landing
|
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 360 | 30 |
Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Maybe the current version of moonlanding in Hub CI is the issue.
I relaunched tests that were working two days ago: now they are failing. https://github.com/huggingface/datasets-server/commit/746414449cae4b311733f8a76e5b3b4ca73b38a9 for example
cc @huggingface/moon-landing
|
[
-1.1982983350753784,
-0.9045103192329407,
-0.6958116292953491,
1.477090835571289,
-0.09118883311748505,
-1.2786083221435547,
0.10011560469865799,
-1.0638335943222046,
1.448171854019165,
-0.6696186661720276,
0.2905119061470032,
-1.6558254957199097,
-0.12557749450206757,
-0.5398754477500916,
-0.6706233620643616,
-0.9138610363006592,
-0.35828760266304016,
-0.8647133111953735,
1.0132955312728882,
2.539193868637085,
1.3389991521835327,
-1.2591032981872559,
2.770843982696533,
0.6544392704963684,
-0.22054561972618103,
-1.065980315208435,
0.6086640357971191,
0.04072850942611694,
-1.2388859987258911,
-0.43314215540885925,
-0.9030892848968506,
-0.041692569851875305,
-0.6328808665275574,
-0.33229437470436096,
0.11017774790525436,
0.44782575964927673,
-0.2856599688529968,
-0.22833731770515442,
-0.7013671398162842,
-0.734449565410614,
0.5804823040962219,
-0.3880782425403595,
0.9813613295555115,
-0.32847604155540466,
1.750903844833374,
-0.6658838987350464,
0.4619033932685852,
0.7659700512886047,
1.3023121356964111,
0.17017626762390137,
0.09735143184661865,
0.23263812065124512,
0.37663042545318604,
0.04713054746389389,
0.5828241109848022,
1.1920497417449951,
0.5829481482505798,
0.5075064897537231,
0.5957545042037964,
-2.2758049964904785,
1.289686679840088,
-0.853352963924408,
0.2480226755142212,
1.3877978324890137,
-0.8036419749259949,
0.29723572731018066,
-1.836396336555481,
-0.06897126138210297,
0.5887780785560608,
-2.296754837036133,
0.2974904775619507,
-1.3451849222183228,
-0.468903511762619,
0.8738093972206116,
0.3291475474834442,
-1.2253248691558838,
0.12753069400787354,
-0.533565878868103,
1.0883556604385376,
0.44652947783470154,
1.0922082662582397,
-1.6927188634872437,
-0.06554096937179565,
-0.16231968998908997,
0.07639817148447037,
-1.2764991521835327,
-1.6113001108169556,
0.5625733137130737,
0.5256491899490356,
0.6650899052619934,
-0.03223010152578354,
1.0084408521652222,
-1.0906237363815308,
0.8311896324157715,
-0.9341976642608643,
-1.646561861038208,
-1.4257603883743286,
-2.3979179859161377,
-2.2873520851135254,
0.7186795473098755,
-0.4979270100593567,
-0.519353985786438,
1.9981569051742554,
-1.0067700147628784,
-1.7228503227233887,
1.115216612815857,
0.32889997959136963,
0.1820734143257141,
2.4321839809417725,
0.20062369108200073,
-0.7708458304405212,
0.46854037046432495,
-0.7272903323173523,
0.7717190384864807,
-0.3128775656223297,
1.3159704208374023,
0.4860002398490906,
-1.028712272644043,
1.5824131965637207,
-0.4860766530036926,
0.5703232288360596,
-0.6897540092468262,
-0.4979328513145447,
-0.8299819231033325,
0.1688658893108368,
1.830491542816162,
-0.3263360559940338,
1.5594913959503174,
-0.2534724473953247,
-1.505371332168579,
-1.5403857231140137,
0.852910041809082,
0.5041579008102417,
-0.9037332534790039,
-0.05078352242708206,
-0.4869591295719147,
0.1882820427417755,
-0.04727917164564133,
1.084261417388916,
1.1956020593643188,
0.7511637806892395,
-0.3733878433704376,
-0.8348401784896851,
0.16245141625404358,
-0.1429036557674408,
-0.7267665266990662,
-1.8363173007965088,
-0.27909567952156067,
0.2382398247718811,
0.6305305361747742,
-1.2342946529388428,
1.8187164068222046,
0.9096848964691162,
1.9783809185028076,
0.9335166811943054,
-0.40362444519996643,
1.4342002868652344,
-0.0013253483921289444,
1.8345564603805542,
-0.5470139384269714,
0.6110588312149048,
-0.3822498023509979,
-1.1712039709091187,
0.8677740693092346,
-0.3164518475532532,
-2.0051746368408203,
-0.8287745714187622,
-0.6903587579727173,
-0.17913347482681274,
-0.7006932497024536,
0.9417683482170105,
-0.3008173108100891,
-1.4003647565841675,
0.09374230355024338,
-0.6428077816963196,
0.1649090051651001,
-1.2574115991592407,
0.1908814013004303,
0.6924101114273071,
-0.6777612566947937,
-0.07577788829803467,
-0.24800023436546326,
-1.238606333732605,
-0.5609502792358398,
0.3274987041950226,
1.874994158744812,
-0.6021651029586792,
0.9482870697975159,
1.0040347576141357,
-0.6932169198989868,
0.16347062587738037,
0.1961841583251953,
-0.31590378284454346,
0.8089977502822876,
-1.0732090473175049,
-0.43636900186538696,
1.2011579275131226,
-0.2289087474346161,
-0.7790232300758362,
1.5389240980148315,
0.8423242568969727,
-1.0852309465408325,
-0.28040021657943726,
-0.20180639624595642,
-0.8279041647911072,
0.05371133238077164,
-1.5483059883117676,
-0.16372564435005188,
0.39845025539398193,
-1.422569751739502,
-0.32086360454559326,
-0.21476265788078308,
1.3976515531539917,
-0.18724560737609863,
1.470017433166504,
-0.3047725558280945,
-0.21133670210838318,
-0.32706987857818604,
-0.4568420350551605,
0.12437266856431961,
-0.15912199020385742,
-0.5326421856880188,
0.18938061594963074,
-0.8786590695381165,
0.3238062262535095,
1.463484764099121,
0.327058881521225,
0.09554318338632584,
0.4028409421443939,
1.1129752397537231,
0.3387715518474579,
-0.05508203059434891,
-0.9352369904518127,
-1.5895498991012573,
1.976496696472168,
-1.4424325227737427,
2.05625057220459,
0.84955233335495,
-0.037160515785217285,
-1.8056695461273193,
-1.8069322109222412,
1.1852688789367676,
1.0717756748199463,
2.4145076274871826,
0.4850483536720276,
0.3771415650844574,
-0.8009922504425049,
-0.7481234073638916,
0.3510514199733734,
-0.972602128982544,
-0.599739134311676,
0.17007064819335938,
2.3306071758270264,
1.7747091054916382,
-0.5043922066688538,
-0.19089245796203613,
-0.9445773363113403,
1.2838772535324097,
-0.22092506289482117,
0.2798119783401489,
2.060004472732544,
-0.21347638964653015,
-1.0631651878356934,
1.2946518659591675,
-2.3542912006378174,
0.29882338643074036,
2.1156864166259766,
0.2631109356880188,
0.15759903192520142,
-1.428565502166748,
-0.6731939315795898,
-0.33570849895477295,
-0.4575220048427582,
-1.23953115940094,
0.5953109860420227,
-0.32938849925994873,
-0.8525994420051575,
-1.4215576648712158,
0.025155354291200638,
-1.168674349784851,
-1.7743253707885742,
0.3189382255077362,
1.9620462656021118,
2.096177577972412,
-0.7417132258415222,
1.3996984958648682,
-0.2910369336605072,
-0.03526692092418671,
1.29487144947052,
1.3675289154052734,
3.043165683746338,
1.874573826789856,
-1.3174176216125488,
0.7658423781394958,
-0.2541608214378357,
-0.47974035143852234,
1.1323192119598389,
-1.0877684354782104,
1.126592755317688,
-0.2174212634563446,
-1.2747933864593506,
-1.25020170211792,
1.1537256240844727,
0.48683369159698486,
0.017887195572257042,
-0.5455579161643982,
1.24985933303833,
0.1317189633846283,
1.3352787494659424,
0.6303033828735352,
-0.39519959688186646,
0.5364470481872559,
-0.38273799419403076,
-0.5839748382568359,
1.6497615575790405,
0.16649514436721802,
-1.5000979900360107,
-2.440479040145874,
-0.2684183120727539,
-0.8904029130935669,
-0.05056839436292648,
-0.6097109913825989,
-1.0833938121795654,
1.6417903900146484,
0.36894312500953674,
-1.3067625761032104,
-0.3061985671520233,
-0.31982049345970154,
-0.4887844920158386,
2.6400187015533447,
-1.3000010251998901,
-0.12317049503326416,
-0.9505671858787537,
-0.5314744114875793,
1.6397476196289062,
-1.2094576358795166,
-0.2064056694507599,
-1.0032199621200562,
-0.6277434229850769,
-1.2657296657562256,
-0.49544060230255127,
0.057260408997535706,
-0.9360306262969971,
0.7111913561820984,
0.1949322521686554,
-1.1889441013336182,
-0.3231812119483948,
-0.8658955693244934,
1.0591621398925781,
-0.08646883815526962,
0.18762516975402832,
1.8996738195419312,
0.3379937708377838,
-0.4681906998157501,
0.7363519668579102,
1.1612985134124756,
0.6110527515411377,
-0.6713785529136658,
0.05270172655582428,
-0.6699126362800598,
0.3021202087402344,
-1.4030628204345703,
0.1950453519821167,
-2.9523351192474365,
0.7753669023513794,
-0.1831781268119812,
-0.09439102560281754,
-0.04611097648739815,
-1.273155927658081,
1.0946146249771118,
2.6048645973205566,
-1.1765646934509277,
0.4619850218296051,
0.4028026759624481,
1.0613203048706055,
-1.638545274734497,
0.29290899634361267,
-0.44809484481811523,
2.0082521438598633,
0.15121528506278992,
1.2366687059402466,
-0.5221776962280273,
-2.1906485557556152,
0.639605700969696,
-1.27511465549469,
-0.9956402778625488,
0.8961460590362549,
-0.8708842992782593,
0.2734919488430023,
-1.4553279876708984,
-0.16661429405212402,
-0.9838472008705139,
-1.238032341003418,
0.6882402300834656,
0.08142291009426117,
0.44909095764160156,
-0.5810179710388184,
0.3104187250137329,
-2.211073160171509,
-1.4077932834625244,
-0.19556087255477905,
-1.0313326120376587,
0.5686843991279602,
-0.3948228061199188,
0.6345412731170654,
-0.019207019358873367,
0.07883745431900024,
0.3621411919593811,
1.4948594570159912,
3.448833465576172,
0.13766798377037048,
0.22187891602516174,
-0.12542006373405457,
-1.0025469064712524,
1.408852219581604,
0.909137487411499,
-0.10260827839374542,
-0.6160125732421875,
-0.9586566686630249,
1.2864642143249512,
2.0049896240234375,
1.075297474861145,
0.16266107559204102,
-0.8996105194091797,
-0.7256731986999512,
-0.014213956892490387,
0.11282214522361755,
0.5468083620071411,
1.0047457218170166,
-0.02329983189702034,
0.09619080275297165,
1.4120162725448608,
1.1895475387573242,
-0.31706565618515015,
0.32761669158935547,
-0.9450910091400146,
-0.416411817073822,
0.44470474123954773,
0.17707213759422302,
-0.024104151874780655,
0.5308820009231567,
-1.0493677854537964,
-0.23999696969985962,
-0.3457287549972534,
-0.8869717717170715,
-0.740383505821228,
-0.45651572942733765,
-0.46506139636039734,
1.5919218063354492,
0.09611903131008148,
-0.4325127899646759,
0.11931059509515762,
-0.6337766647338867,
-0.22606614232063293,
-1.141400694847107,
0.18359339237213135,
-0.11481167376041412,
-0.04488518089056015,
-0.1957520842552185,
1.6378096342086792,
-0.9356973767280579,
-2.1278977394104004,
0.1534610092639923,
0.23610547184944153,
-0.32116326689720154,
0.2642269432544708,
1.7263519763946533,
0.48789623379707336,
1.3693764209747314,
1.2825697660446167,
0.9318152070045471,
-0.5796610713005066,
-1.2602591514587402,
0.7038870453834534,
0.979438841342926,
-1.4083812236785889,
0.9987978935241699,
-0.25129997730255127,
-0.5039580464363098,
0.695746898651123,
1.3559184074401855,
0.4387218654155731,
-2.033703088760376,
0.8547917604446411,
-0.9679230451583862,
0.7942885756492615,
0.6812382340431213,
0.750032365322113,
0.2207137644290924,
0.8496081233024597,
-1.2058838605880737,
-1.1024935245513916,
-0.6676827669143677,
-0.6783496141433716,
1.8520164489746094,
-0.30946066975593567,
0.5801133513450623,
-0.19124776124954224,
-1.2199716567993164,
-0.12555965781211853,
0.7723322510719299,
0.37816232442855835,
-0.39187750220298767,
0.9212628602981567,
-0.5954993963241577,
-1.008008360862732,
-1.2173497676849365,
-0.4102559983730316,
-1.0707056522369385,
-0.8301107287406921,
1.05470609664917,
0.7593555450439453,
0.40612539649009705,
1.866316318511963,
0.5889703035354614,
0.3009585738182068,
-2.6728103160858154,
0.9289638996124268,
0.2754836678504944,
-0.046435244381427765,
0.9626744985580444,
0.20555764436721802,
1.1517444849014282,
-0.010963594540953636,
0.6202790141105652,
-2.3714916706085205,
2.2681620121002197,
-0.1959550380706787,
0.5885879397392273,
-0.015888836234807968,
-0.22311469912528992,
1.1125915050506592,
0.5329431295394897,
0.6281726360321045,
-1.0781521797180176,
0.7496088743209839,
-0.5450082421302795,
1.0196031332015991,
0.9503628015518188,
-0.9047366976737976,
-0.011168081313371658,
1.4326679706573486,
0.512761116027832,
-0.4750303030014038,
-0.9136617183685303,
-0.77220618724823,
0.9450210332870483,
1.7062225341796875,
0.02934766560792923,
-0.022605136036872864,
0.8678956627845764,
0.563896119594574,
-1.2484688758850098,
0.0742570012807846,
-0.6647302508354187,
-0.6863129734992981,
1.6842344999313354,
2.0548508167266846,
-0.09113709628582001,
-0.1575070023536682,
-0.7051920890808105,
-1.2938956022262573,
0.7891967296600342,
-0.11490894854068756,
0.05719573795795441,
0.6271222829818726,
-0.6195470690727234,
1.0986675024032593,
0.5589331984519958,
1.0938762426376343,
0.010713225230574608,
0.32789137959480286,
0.3200782537460327,
-0.41618821024894714,
-1.18724524974823,
-0.31330034136772156,
-1.149017095565796,
-2.5643346309661865,
0.46486878395080566,
-0.2253495454788208,
-1.5141637325286865,
0.05210806801915169,
-1.0667173862457275,
0.8846539258956909,
-0.5352984666824341,
-1.0815702676773071,
-1.4470075368881226,
0.32576796412467957,
-0.19238883256912231,
0.947379469871521,
-1.6667273044586182,
-0.18444836139678955,
1.2660653591156006,
0.8209375143051147,
-0.6110293865203857,
0.9476349353790283,
0.2516396641731262,
0.9721618294715881,
0.7513562440872192,
-0.3974341154098511,
0.5839086771011353,
-0.0066436296328902245,
-1.312208890914917,
0.42942723631858826,
1.2059673070907593,
0.17951062321662903,
1.426830768585205,
-0.36900684237480164,
0.07702165842056274,
0.45200589299201965,
-0.6486738920211792,
-0.46452268958091736,
-0.38068515062332153,
0.7155736088752747,
0.12010089308023453,
-0.989985466003418,
-0.1656489372253418,
-0.10802695900201797,
-0.2881011962890625,
0.16076791286468506,
-1.4500278234481812,
-0.2890472412109375,
-0.4061223566532135,
-0.44824665784835815,
-1.3661092519760132,
0.043387915939092636,
1.2720353603363037,
-0.7236001491546631,
-0.2529541552066803,
0.4116278886795044,
0.33856135606765747,
0.6553488969802856,
0.5703248977661133,
-0.8119996786117554,
-0.31129300594329834,
-0.3593480885028839,
-0.27187231183052063,
0.2680298388004303,
1.195753574371338,
-0.09993010759353638,
-0.9706900715827942,
0.7254664301872253,
-0.3907988667488098,
0.15730342268943787,
2.0105299949645996,
-0.03710802644491196,
-0.71846604347229,
0.3491124212741852,
-0.6919289231300354,
1.8127671480178833,
1.7419755458831787,
1.2365859746932983,
-0.1377527117729187,
-0.7930130362510681,
0.5647716522216797,
-0.309163898229599,
-0.2949806749820709,
0.8812077641487122,
0.40384483337402344,
-0.20139649510383606,
-1.394765853881836,
0.6423061490058899,
1.2969298362731934,
-0.7966181039810181,
-0.6708720326423645,
0.11227422952651978,
-0.856654942035675,
1.2318373918533325,
0.5788374543190002,
0.31347307562828064,
0.2753280997276306,
1.510709524154663,
0.7014860510826111,
-0.4741688668727875,
0.48600712418556213,
0.4976404309272766,
-0.22130095958709717,
-2.1077020168304443,
-1.0553938150405884,
0.35111066699028015,
-0.4294598400592804,
-1.5752148628234863,
1.312670111656189,
-1.1203945875167847,
-1.0056891441345215,
0.5654049515724182,
0.07418534904718399,
1.330867886543274,
0.4065036475658417,
1.680467128753662,
2.1003663539886475,
0.9513180255889893,
0.40633395314216614,
1.28299880027771,
-0.012689689174294472,
-0.4770306646823883,
1.887403964996338,
-0.398789644241333,
0.5426691770553589,
0.9928203821182251,
-0.3931235671043396,
-1.0689234733581543,
-0.8127670288085938,
-1.177431344985962,
-0.5773933529853821,
1.2137442827224731,
0.14393240213394165,
-1.0218034982681274,
0.2011377215385437,
1.5692778825759888,
0.1730935275554657,
-0.1773023009300232,
0.7413188219070435,
0.39051517844200134,
-0.7494480609893799,
-0.05939064174890518,
-0.8269503116607666,
0.4697869122028351,
-0.11703747510910034,
-0.27585262060165405,
0.30635279417037964,
0.5529768466949463,
1.3232307434082031,
-0.10292013734579086,
0.12395723909139633,
1.124639630317688,
-1.4280762672424316,
1.557146668434143,
-0.5956841707229614,
0.28033122420310974,
-2.4710373878479004,
1.3670340776443481,
-0.7645208835601807,
1.930749535560608,
-2.4854962825775146,
0.4284796714782715,
-0.5265141129493713,
-0.5474424958229065,
0.20743697881698608,
-0.41218534111976624,
0.07617805153131485,
-0.11866208165884018,
-1.0056322813034058,
0.015116000548005104,
-0.7511322498321533,
0.5495700836181641,
1.1370176076889038,
1.4050401449203491,
-1.1353282928466797,
-0.23581933975219727,
-1.7813634872436523,
-0.24437382817268372,
-0.8159343004226685,
0.3373446464538574,
-1.9798356294631958,
-0.1212407648563385,
-2.0036072731018066,
-2.325624704360962,
-1.4080206155776978,
-0.8519205451011658,
1.0389878749847412,
0.2557292878627777,
-0.8607470393180847,
1.2043157815933228,
-0.33726295828819275,
-1.8351799249649048,
1.1093240976333618,
-2.18900728225708
] |
https://github.com/huggingface/datasets/issues/5390
|
Error when pushing to the CI hub
|
Hi! I don't think this has anything to do with `datasets`. Hub CI seems to be the culprit - the identical failure can be found in [this](https://github.com/huggingface/datasets/pull/5389) PR (with unrelated changes) opened today.
|
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 360 | 33 |
Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Hi! I don't think this has anything to do with `datasets`. Hub CI seems to be the culprit - the identical failure can be found in [this](https://github.com/huggingface/datasets/pull/5389) PR (with unrelated changes) opened today.
|
[
-1.1982983350753784,
-0.9045103192329407,
-0.6958116292953491,
1.477090835571289,
-0.09118883311748505,
-1.2786083221435547,
0.10011560469865799,
-1.0638335943222046,
1.448171854019165,
-0.6696186661720276,
0.2905119061470032,
-1.6558254957199097,
-0.12557749450206757,
-0.5398754477500916,
-0.6706233620643616,
-0.9138610363006592,
-0.35828760266304016,
-0.8647133111953735,
1.0132955312728882,
2.539193868637085,
1.3389991521835327,
-1.2591032981872559,
2.770843982696533,
0.6544392704963684,
-0.22054561972618103,
-1.065980315208435,
0.6086640357971191,
0.04072850942611694,
-1.2388859987258911,
-0.43314215540885925,
-0.9030892848968506,
-0.041692569851875305,
-0.6328808665275574,
-0.33229437470436096,
0.11017774790525436,
0.44782575964927673,
-0.2856599688529968,
-0.22833731770515442,
-0.7013671398162842,
-0.734449565410614,
0.5804823040962219,
-0.3880782425403595,
0.9813613295555115,
-0.32847604155540466,
1.750903844833374,
-0.6658838987350464,
0.4619033932685852,
0.7659700512886047,
1.3023121356964111,
0.17017626762390137,
0.09735143184661865,
0.23263812065124512,
0.37663042545318604,
0.04713054746389389,
0.5828241109848022,
1.1920497417449951,
0.5829481482505798,
0.5075064897537231,
0.5957545042037964,
-2.2758049964904785,
1.289686679840088,
-0.853352963924408,
0.2480226755142212,
1.3877978324890137,
-0.8036419749259949,
0.29723572731018066,
-1.836396336555481,
-0.06897126138210297,
0.5887780785560608,
-2.296754837036133,
0.2974904775619507,
-1.3451849222183228,
-0.468903511762619,
0.8738093972206116,
0.3291475474834442,
-1.2253248691558838,
0.12753069400787354,
-0.533565878868103,
1.0883556604385376,
0.44652947783470154,
1.0922082662582397,
-1.6927188634872437,
-0.06554096937179565,
-0.16231968998908997,
0.07639817148447037,
-1.2764991521835327,
-1.6113001108169556,
0.5625733137130737,
0.5256491899490356,
0.6650899052619934,
-0.03223010152578354,
1.0084408521652222,
-1.0906237363815308,
0.8311896324157715,
-0.9341976642608643,
-1.646561861038208,
-1.4257603883743286,
-2.3979179859161377,
-2.2873520851135254,
0.7186795473098755,
-0.4979270100593567,
-0.519353985786438,
1.9981569051742554,
-1.0067700147628784,
-1.7228503227233887,
1.115216612815857,
0.32889997959136963,
0.1820734143257141,
2.4321839809417725,
0.20062369108200073,
-0.7708458304405212,
0.46854037046432495,
-0.7272903323173523,
0.7717190384864807,
-0.3128775656223297,
1.3159704208374023,
0.4860002398490906,
-1.028712272644043,
1.5824131965637207,
-0.4860766530036926,
0.5703232288360596,
-0.6897540092468262,
-0.4979328513145447,
-0.8299819231033325,
0.1688658893108368,
1.830491542816162,
-0.3263360559940338,
1.5594913959503174,
-0.2534724473953247,
-1.505371332168579,
-1.5403857231140137,
0.852910041809082,
0.5041579008102417,
-0.9037332534790039,
-0.05078352242708206,
-0.4869591295719147,
0.1882820427417755,
-0.04727917164564133,
1.084261417388916,
1.1956020593643188,
0.7511637806892395,
-0.3733878433704376,
-0.8348401784896851,
0.16245141625404358,
-0.1429036557674408,
-0.7267665266990662,
-1.8363173007965088,
-0.27909567952156067,
0.2382398247718811,
0.6305305361747742,
-1.2342946529388428,
1.8187164068222046,
0.9096848964691162,
1.9783809185028076,
0.9335166811943054,
-0.40362444519996643,
1.4342002868652344,
-0.0013253483921289444,
1.8345564603805542,
-0.5470139384269714,
0.6110588312149048,
-0.3822498023509979,
-1.1712039709091187,
0.8677740693092346,
-0.3164518475532532,
-2.0051746368408203,
-0.8287745714187622,
-0.6903587579727173,
-0.17913347482681274,
-0.7006932497024536,
0.9417683482170105,
-0.3008173108100891,
-1.4003647565841675,
0.09374230355024338,
-0.6428077816963196,
0.1649090051651001,
-1.2574115991592407,
0.1908814013004303,
0.6924101114273071,
-0.6777612566947937,
-0.07577788829803467,
-0.24800023436546326,
-1.238606333732605,
-0.5609502792358398,
0.3274987041950226,
1.874994158744812,
-0.6021651029586792,
0.9482870697975159,
1.0040347576141357,
-0.6932169198989868,
0.16347062587738037,
0.1961841583251953,
-0.31590378284454346,
0.8089977502822876,
-1.0732090473175049,
-0.43636900186538696,
1.2011579275131226,
-0.2289087474346161,
-0.7790232300758362,
1.5389240980148315,
0.8423242568969727,
-1.0852309465408325,
-0.28040021657943726,
-0.20180639624595642,
-0.8279041647911072,
0.05371133238077164,
-1.5483059883117676,
-0.16372564435005188,
0.39845025539398193,
-1.422569751739502,
-0.32086360454559326,
-0.21476265788078308,
1.3976515531539917,
-0.18724560737609863,
1.470017433166504,
-0.3047725558280945,
-0.21133670210838318,
-0.32706987857818604,
-0.4568420350551605,
0.12437266856431961,
-0.15912199020385742,
-0.5326421856880188,
0.18938061594963074,
-0.8786590695381165,
0.3238062262535095,
1.463484764099121,
0.327058881521225,
0.09554318338632584,
0.4028409421443939,
1.1129752397537231,
0.3387715518474579,
-0.05508203059434891,
-0.9352369904518127,
-1.5895498991012573,
1.976496696472168,
-1.4424325227737427,
2.05625057220459,
0.84955233335495,
-0.037160515785217285,
-1.8056695461273193,
-1.8069322109222412,
1.1852688789367676,
1.0717756748199463,
2.4145076274871826,
0.4850483536720276,
0.3771415650844574,
-0.8009922504425049,
-0.7481234073638916,
0.3510514199733734,
-0.972602128982544,
-0.599739134311676,
0.17007064819335938,
2.3306071758270264,
1.7747091054916382,
-0.5043922066688538,
-0.19089245796203613,
-0.9445773363113403,
1.2838772535324097,
-0.22092506289482117,
0.2798119783401489,
2.060004472732544,
-0.21347638964653015,
-1.0631651878356934,
1.2946518659591675,
-2.3542912006378174,
0.29882338643074036,
2.1156864166259766,
0.2631109356880188,
0.15759903192520142,
-1.428565502166748,
-0.6731939315795898,
-0.33570849895477295,
-0.4575220048427582,
-1.23953115940094,
0.5953109860420227,
-0.32938849925994873,
-0.8525994420051575,
-1.4215576648712158,
0.025155354291200638,
-1.168674349784851,
-1.7743253707885742,
0.3189382255077362,
1.9620462656021118,
2.096177577972412,
-0.7417132258415222,
1.3996984958648682,
-0.2910369336605072,
-0.03526692092418671,
1.29487144947052,
1.3675289154052734,
3.043165683746338,
1.874573826789856,
-1.3174176216125488,
0.7658423781394958,
-0.2541608214378357,
-0.47974035143852234,
1.1323192119598389,
-1.0877684354782104,
1.126592755317688,
-0.2174212634563446,
-1.2747933864593506,
-1.25020170211792,
1.1537256240844727,
0.48683369159698486,
0.017887195572257042,
-0.5455579161643982,
1.24985933303833,
0.1317189633846283,
1.3352787494659424,
0.6303033828735352,
-0.39519959688186646,
0.5364470481872559,
-0.38273799419403076,
-0.5839748382568359,
1.6497615575790405,
0.16649514436721802,
-1.5000979900360107,
-2.440479040145874,
-0.2684183120727539,
-0.8904029130935669,
-0.05056839436292648,
-0.6097109913825989,
-1.0833938121795654,
1.6417903900146484,
0.36894312500953674,
-1.3067625761032104,
-0.3061985671520233,
-0.31982049345970154,
-0.4887844920158386,
2.6400187015533447,
-1.3000010251998901,
-0.12317049503326416,
-0.9505671858787537,
-0.5314744114875793,
1.6397476196289062,
-1.2094576358795166,
-0.2064056694507599,
-1.0032199621200562,
-0.6277434229850769,
-1.2657296657562256,
-0.49544060230255127,
0.057260408997535706,
-0.9360306262969971,
0.7111913561820984,
0.1949322521686554,
-1.1889441013336182,
-0.3231812119483948,
-0.8658955693244934,
1.0591621398925781,
-0.08646883815526962,
0.18762516975402832,
1.8996738195419312,
0.3379937708377838,
-0.4681906998157501,
0.7363519668579102,
1.1612985134124756,
0.6110527515411377,
-0.6713785529136658,
0.05270172655582428,
-0.6699126362800598,
0.3021202087402344,
-1.4030628204345703,
0.1950453519821167,
-2.9523351192474365,
0.7753669023513794,
-0.1831781268119812,
-0.09439102560281754,
-0.04611097648739815,
-1.273155927658081,
1.0946146249771118,
2.6048645973205566,
-1.1765646934509277,
0.4619850218296051,
0.4028026759624481,
1.0613203048706055,
-1.638545274734497,
0.29290899634361267,
-0.44809484481811523,
2.0082521438598633,
0.15121528506278992,
1.2366687059402466,
-0.5221776962280273,
-2.1906485557556152,
0.639605700969696,
-1.27511465549469,
-0.9956402778625488,
0.8961460590362549,
-0.8708842992782593,
0.2734919488430023,
-1.4553279876708984,
-0.16661429405212402,
-0.9838472008705139,
-1.238032341003418,
0.6882402300834656,
0.08142291009426117,
0.44909095764160156,
-0.5810179710388184,
0.3104187250137329,
-2.211073160171509,
-1.4077932834625244,
-0.19556087255477905,
-1.0313326120376587,
0.5686843991279602,
-0.3948228061199188,
0.6345412731170654,
-0.019207019358873367,
0.07883745431900024,
0.3621411919593811,
1.4948594570159912,
3.448833465576172,
0.13766798377037048,
0.22187891602516174,
-0.12542006373405457,
-1.0025469064712524,
1.408852219581604,
0.909137487411499,
-0.10260827839374542,
-0.6160125732421875,
-0.9586566686630249,
1.2864642143249512,
2.0049896240234375,
1.075297474861145,
0.16266107559204102,
-0.8996105194091797,
-0.7256731986999512,
-0.014213956892490387,
0.11282214522361755,
0.5468083620071411,
1.0047457218170166,
-0.02329983189702034,
0.09619080275297165,
1.4120162725448608,
1.1895475387573242,
-0.31706565618515015,
0.32761669158935547,
-0.9450910091400146,
-0.416411817073822,
0.44470474123954773,
0.17707213759422302,
-0.024104151874780655,
0.5308820009231567,
-1.0493677854537964,
-0.23999696969985962,
-0.3457287549972534,
-0.8869717717170715,
-0.740383505821228,
-0.45651572942733765,
-0.46506139636039734,
1.5919218063354492,
0.09611903131008148,
-0.4325127899646759,
0.11931059509515762,
-0.6337766647338867,
-0.22606614232063293,
-1.141400694847107,
0.18359339237213135,
-0.11481167376041412,
-0.04488518089056015,
-0.1957520842552185,
1.6378096342086792,
-0.9356973767280579,
-2.1278977394104004,
0.1534610092639923,
0.23610547184944153,
-0.32116326689720154,
0.2642269432544708,
1.7263519763946533,
0.48789623379707336,
1.3693764209747314,
1.2825697660446167,
0.9318152070045471,
-0.5796610713005066,
-1.2602591514587402,
0.7038870453834534,
0.979438841342926,
-1.4083812236785889,
0.9987978935241699,
-0.25129997730255127,
-0.5039580464363098,
0.695746898651123,
1.3559184074401855,
0.4387218654155731,
-2.033703088760376,
0.8547917604446411,
-0.9679230451583862,
0.7942885756492615,
0.6812382340431213,
0.750032365322113,
0.2207137644290924,
0.8496081233024597,
-1.2058838605880737,
-1.1024935245513916,
-0.6676827669143677,
-0.6783496141433716,
1.8520164489746094,
-0.30946066975593567,
0.5801133513450623,
-0.19124776124954224,
-1.2199716567993164,
-0.12555965781211853,
0.7723322510719299,
0.37816232442855835,
-0.39187750220298767,
0.9212628602981567,
-0.5954993963241577,
-1.008008360862732,
-1.2173497676849365,
-0.4102559983730316,
-1.0707056522369385,
-0.8301107287406921,
1.05470609664917,
0.7593555450439453,
0.40612539649009705,
1.866316318511963,
0.5889703035354614,
0.3009585738182068,
-2.6728103160858154,
0.9289638996124268,
0.2754836678504944,
-0.046435244381427765,
0.9626744985580444,
0.20555764436721802,
1.1517444849014282,
-0.010963594540953636,
0.6202790141105652,
-2.3714916706085205,
2.2681620121002197,
-0.1959550380706787,
0.5885879397392273,
-0.015888836234807968,
-0.22311469912528992,
1.1125915050506592,
0.5329431295394897,
0.6281726360321045,
-1.0781521797180176,
0.7496088743209839,
-0.5450082421302795,
1.0196031332015991,
0.9503628015518188,
-0.9047366976737976,
-0.011168081313371658,
1.4326679706573486,
0.512761116027832,
-0.4750303030014038,
-0.9136617183685303,
-0.77220618724823,
0.9450210332870483,
1.7062225341796875,
0.02934766560792923,
-0.022605136036872864,
0.8678956627845764,
0.563896119594574,
-1.2484688758850098,
0.0742570012807846,
-0.6647302508354187,
-0.6863129734992981,
1.6842344999313354,
2.0548508167266846,
-0.09113709628582001,
-0.1575070023536682,
-0.7051920890808105,
-1.2938956022262573,
0.7891967296600342,
-0.11490894854068756,
0.05719573795795441,
0.6271222829818726,
-0.6195470690727234,
1.0986675024032593,
0.5589331984519958,
1.0938762426376343,
0.010713225230574608,
0.32789137959480286,
0.3200782537460327,
-0.41618821024894714,
-1.18724524974823,
-0.31330034136772156,
-1.149017095565796,
-2.5643346309661865,
0.46486878395080566,
-0.2253495454788208,
-1.5141637325286865,
0.05210806801915169,
-1.0667173862457275,
0.8846539258956909,
-0.5352984666824341,
-1.0815702676773071,
-1.4470075368881226,
0.32576796412467957,
-0.19238883256912231,
0.947379469871521,
-1.6667273044586182,
-0.18444836139678955,
1.2660653591156006,
0.8209375143051147,
-0.6110293865203857,
0.9476349353790283,
0.2516396641731262,
0.9721618294715881,
0.7513562440872192,
-0.3974341154098511,
0.5839086771011353,
-0.0066436296328902245,
-1.312208890914917,
0.42942723631858826,
1.2059673070907593,
0.17951062321662903,
1.426830768585205,
-0.36900684237480164,
0.07702165842056274,
0.45200589299201965,
-0.6486738920211792,
-0.46452268958091736,
-0.38068515062332153,
0.7155736088752747,
0.12010089308023453,
-0.989985466003418,
-0.1656489372253418,
-0.10802695900201797,
-0.2881011962890625,
0.16076791286468506,
-1.4500278234481812,
-0.2890472412109375,
-0.4061223566532135,
-0.44824665784835815,
-1.3661092519760132,
0.043387915939092636,
1.2720353603363037,
-0.7236001491546631,
-0.2529541552066803,
0.4116278886795044,
0.33856135606765747,
0.6553488969802856,
0.5703248977661133,
-0.8119996786117554,
-0.31129300594329834,
-0.3593480885028839,
-0.27187231183052063,
0.2680298388004303,
1.195753574371338,
-0.09993010759353638,
-0.9706900715827942,
0.7254664301872253,
-0.3907988667488098,
0.15730342268943787,
2.0105299949645996,
-0.03710802644491196,
-0.71846604347229,
0.3491124212741852,
-0.6919289231300354,
1.8127671480178833,
1.7419755458831787,
1.2365859746932983,
-0.1377527117729187,
-0.7930130362510681,
0.5647716522216797,
-0.309163898229599,
-0.2949806749820709,
0.8812077641487122,
0.40384483337402344,
-0.20139649510383606,
-1.394765853881836,
0.6423061490058899,
1.2969298362731934,
-0.7966181039810181,
-0.6708720326423645,
0.11227422952651978,
-0.856654942035675,
1.2318373918533325,
0.5788374543190002,
0.31347307562828064,
0.2753280997276306,
1.510709524154663,
0.7014860510826111,
-0.4741688668727875,
0.48600712418556213,
0.4976404309272766,
-0.22130095958709717,
-2.1077020168304443,
-1.0553938150405884,
0.35111066699028015,
-0.4294598400592804,
-1.5752148628234863,
1.312670111656189,
-1.1203945875167847,
-1.0056891441345215,
0.5654049515724182,
0.07418534904718399,
1.330867886543274,
0.4065036475658417,
1.680467128753662,
2.1003663539886475,
0.9513180255889893,
0.40633395314216614,
1.28299880027771,
-0.012689689174294472,
-0.4770306646823883,
1.887403964996338,
-0.398789644241333,
0.5426691770553589,
0.9928203821182251,
-0.3931235671043396,
-1.0689234733581543,
-0.8127670288085938,
-1.177431344985962,
-0.5773933529853821,
1.2137442827224731,
0.14393240213394165,
-1.0218034982681274,
0.2011377215385437,
1.5692778825759888,
0.1730935275554657,
-0.1773023009300232,
0.7413188219070435,
0.39051517844200134,
-0.7494480609893799,
-0.05939064174890518,
-0.8269503116607666,
0.4697869122028351,
-0.11703747510910034,
-0.27585262060165405,
0.30635279417037964,
0.5529768466949463,
1.3232307434082031,
-0.10292013734579086,
0.12395723909139633,
1.124639630317688,
-1.4280762672424316,
1.557146668434143,
-0.5956841707229614,
0.28033122420310974,
-2.4710373878479004,
1.3670340776443481,
-0.7645208835601807,
1.930749535560608,
-2.4854962825775146,
0.4284796714782715,
-0.5265141129493713,
-0.5474424958229065,
0.20743697881698608,
-0.41218534111976624,
0.07617805153131485,
-0.11866208165884018,
-1.0056322813034058,
0.015116000548005104,
-0.7511322498321533,
0.5495700836181641,
1.1370176076889038,
1.4050401449203491,
-1.1353282928466797,
-0.23581933975219727,
-1.7813634872436523,
-0.24437382817268372,
-0.8159343004226685,
0.3373446464538574,
-1.9798356294631958,
-0.1212407648563385,
-2.0036072731018066,
-2.325624704360962,
-1.4080206155776978,
-0.8519205451011658,
1.0389878749847412,
0.2557292878627777,
-0.8607470393180847,
1.2043157815933228,
-0.33726295828819275,
-1.8351799249649048,
1.1093240976333618,
-2.18900728225708
] |
https://github.com/huggingface/datasets/issues/5388
|
Getting Value Error while loading a dataset..
|
Hi! I can't reproduce this error locally (Mac) or in Colab. What version of `datasets` are you using?
|
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
| 361 | 18 |
Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
Hi! I can't reproduce this error locally (Mac) or in Colab. What version of `datasets` are you using?
|
[
-1.2207598686218262,
-0.8148059844970703,
-0.5596593022346497,
1.43604576587677,
0.0015513254329562187,
-1.3575323820114136,
0.09363394975662231,
-0.8919865489006042,
1.5938446521759033,
-0.777728259563446,
0.3635711371898651,
-1.6353535652160645,
0.05427566543221474,
-0.6565396189689636,
-0.6805813312530518,
-0.7126931548118591,
-0.32473868131637573,
-0.7105810642242432,
1.1724514961242676,
2.551136016845703,
1.2718454599380493,
-1.3554950952529907,
2.8075075149536133,
0.6377637386322021,
-0.24258507788181305,
-0.8660306930541992,
0.3638395071029663,
0.02642468363046646,
-1.4618964195251465,
-0.27763837575912476,
-1.039333701133728,
-0.09518900513648987,
-0.6467477083206177,
-0.5578610301017761,
0.08387541770935059,
0.4369807541370392,
-0.17224514484405518,
-0.41146722435951233,
-0.44411709904670715,
-0.7576412558555603,
0.6129388809204102,
-0.30307620763778687,
0.8047406673431396,
-0.26948535442352295,
1.7793163061141968,
-0.6710287928581238,
0.4916906952857971,
0.5355533957481384,
1.2542766332626343,
0.24968691170215607,
-0.10112419724464417,
0.43709900975227356,
0.23487205803394318,
0.026344772428274155,
0.6034471392631531,
1.2539043426513672,
0.6662812232971191,
0.466195285320282,
0.7359446287155151,
-2.1776769161224365,
1.292884349822998,
-0.7594223618507385,
0.2202305942773819,
1.2503910064697266,
-1.1259160041809082,
0.5024546980857849,
-1.868111252784729,
-0.17780989408493042,
0.4029417932033539,
-2.25671648979187,
0.13810905814170837,
-1.2494373321533203,
-0.6172782778739929,
0.9908753633499146,
0.3207138180732727,
-1.1986911296844482,
-0.0674469918012619,
-0.45626816153526306,
0.9781582951545715,
0.35653236508369446,
1.1714468002319336,
-1.6380364894866943,
0.06919382512569427,
-0.22334781289100647,
0.3700094223022461,
-1.1807315349578857,
-1.5880653858184814,
0.612091600894928,
0.7341682314872742,
0.6326254606246948,
-0.193401038646698,
0.892825722694397,
-1.1209996938705444,
0.8166183829307556,
-0.9418213963508606,
-1.8070505857467651,
-1.331622838973999,
-2.4430091381073,
-2.420776605606079,
0.7569354176521301,
-0.41033512353897095,
-0.4107152223587036,
2.1984095573425293,
-1.1141608953475952,
-1.7838870286941528,
1.0867666006088257,
0.2948155105113983,
-0.09720776975154877,
2.390925884246826,
0.2231631726026535,
-0.9584304094314575,
0.7562073469161987,
-0.824388325214386,
0.5991014838218689,
-0.44130268692970276,
1.2756270170211792,
0.3755893111228943,
-1.066285490989685,
1.5744043588638306,
-0.4054105281829834,
0.5526055097579956,
-0.7434546947479248,
-0.34645068645477295,
-0.5246531963348389,
0.20010904967784882,
2.0198111534118652,
-0.21373705565929413,
1.5732203722000122,
-0.11587220430374146,
-1.433977723121643,
-1.373308539390564,
0.7324647903442383,
0.5094386339187622,
-0.7548598647117615,
0.23723451793193817,
-0.4353533685207367,
0.1488916277885437,
0.15566657483577728,
1.0189414024353027,
1.267849326133728,
0.819080650806427,
-0.13853032886981964,
-0.9099007844924927,
0.14247649908065796,
-0.07209658622741699,
-0.5201850533485413,
-1.6685407161712646,
-0.2640354037284851,
0.09973937273025513,
0.6310906410217285,
-1.2158567905426025,
1.9277112483978271,
0.8213203549385071,
2.0084662437438965,
1.0085222721099854,
-0.2888428270816803,
1.560855746269226,
0.10697956383228302,
1.9075727462768555,
-0.2931753396987915,
0.6607255339622498,
-0.5182701349258423,
-1.251590371131897,
0.6342225670814514,
-0.3727254867553711,
-1.9990512132644653,
-0.3767499625682831,
-0.8810824155807495,
-0.054843105375766754,
-0.9152570962905884,
1.0315980911254883,
-0.15816308557987213,
-1.3875547647476196,
0.23838989436626434,
-0.6946845054626465,
0.17721368372440338,
-1.4419751167297363,
0.3227367699146271,
0.7376312017440796,
-0.7047804594039917,
0.09966091811656952,
-0.5200873017311096,
-1.3702471256256104,
-0.6511383652687073,
0.4689129889011383,
1.7567634582519531,
-0.7185714244842529,
0.9797248244285583,
1.0575188398361206,
-0.5914464592933655,
-0.010355254635214806,
0.5498330593109131,
-0.4522571563720703,
0.8919780254364014,
-1.0231881141662598,
-0.4242708086967468,
1.1379882097244263,
-0.320970356464386,
-0.4834389090538025,
1.2755380868911743,
0.7112231850624084,
-0.9763365983963013,
-0.30466893315315247,
-0.1062493622303009,
-0.8296471834182739,
0.04998566210269928,
-1.6004953384399414,
-0.09363292157649994,
0.2661776542663574,
-1.4947541952133179,
-0.5011175870895386,
-0.04469567537307739,
1.2759582996368408,
-0.007122974842786789,
1.3882821798324585,
-0.20610304176807404,
-0.07000121474266052,
-0.49681705236434937,
-0.4989888072013855,
0.13136684894561768,
-0.15748053789138794,
-0.6242278218269348,
0.28693145513534546,
-0.7294377088546753,
0.15278960764408112,
1.495701551437378,
0.24446429312229156,
0.09444215893745422,
0.51705002784729,
1.1729098558425903,
0.3088380992412567,
-0.2498031109571457,
-0.802929162979126,
-1.6899110078811646,
2.003322124481201,
-1.5362253189086914,
1.9581838846206665,
0.8680216670036316,
-0.028439538553357124,
-1.830527424812317,
-1.8474416732788086,
1.4889788627624512,
1.146592140197754,
2.519812822341919,
0.5437304377555847,
0.43842366337776184,
-0.8142861723899841,
-0.6729744672775269,
0.4379706382751465,
-0.8200870752334595,
-0.9323973059654236,
0.1403522789478302,
2.391702890396118,
1.706861972808838,
-0.3190547227859497,
-0.19836051762104034,
-0.9489604234695435,
1.321195125579834,
-0.27880486845970154,
0.2292458415031433,
1.827696681022644,
-0.3725903630256653,
-1.063783049583435,
1.256547212600708,
-2.3709707260131836,
0.2820751368999481,
1.9911866188049316,
0.3266393542289734,
-0.0038034841418266296,
-1.201042652130127,
-0.6929740309715271,
-0.10869872570037842,
-0.4267898499965668,
-1.1818376779556274,
0.3973030149936676,
-0.2487623393535614,
-0.8155617713928223,
-1.3959969282150269,
0.01874653995037079,
-1.1909106969833374,
-1.7190386056900024,
0.3262157142162323,
1.7290650606155396,
2.1374828815460205,
-0.8253973722457886,
1.343508005142212,
-0.2737633287906647,
0.30355459451675415,
1.1635740995407104,
1.262030839920044,
3.245361804962158,
1.9434542655944824,
-1.266433596611023,
0.6849345564842224,
-0.13204261660575867,
-0.4970642030239105,
1.2172685861587524,
-1.0494418144226074,
1.1942356824874878,
-0.24227334558963776,
-1.3870421648025513,
-1.2012542486190796,
0.9226983785629272,
0.4826609492301941,
-0.10689021646976471,
-0.4778195917606354,
1.1163524389266968,
0.19278040528297424,
1.3078160285949707,
0.6345230937004089,
-0.29195353388786316,
0.5567193627357483,
-0.3217029571533203,
-0.523436427116394,
1.5685197114944458,
0.04249215126037598,
-1.5345134735107422,
-2.2956581115722656,
-0.1365182101726532,
-0.9962867498397827,
0.0012337854132056236,
-0.9293399453163147,
-1.0680197477340698,
1.4505947828292847,
0.41609856486320496,
-0.9709228277206421,
-0.08989723026752472,
-0.3735303580760956,
-0.6575492024421692,
2.607616662979126,
-1.4273122549057007,
-0.2803761661052704,
-0.9247893691062927,
-0.5741413831710815,
1.4868884086608887,
-1.1737338304519653,
-0.29092034697532654,
-1.0225812196731567,
-0.49467211961746216,
-1.2378662824630737,
-0.5019562840461731,
-0.09246805310249329,
-0.8066122531890869,
0.7398949861526489,
0.04097956418991089,
-1.319429874420166,
-0.27873679995536804,
-1.0439029932022095,
0.8334872722625732,
-0.22763708233833313,
0.07887697219848633,
1.752020001411438,
0.2680334448814392,
-0.4030066132545471,
0.7875028848648071,
1.263569951057434,
0.6088289022445679,
-0.5255170464515686,
0.2494218796491623,
-0.7089910507202148,
0.4594897925853729,
-1.2013999223709106,
0.3174973428249359,
-2.880751132965088,
0.6522340774536133,
0.051190540194511414,
-0.013464021496474743,
-0.13181479275226593,
-1.465599536895752,
0.9103963375091553,
2.4917893409729004,
-1.114738941192627,
0.6835407614707947,
0.3242385983467102,
1.2383575439453125,
-1.659789800643921,
-0.010433570481836796,
-0.6376156806945801,
2.0768826007843018,
0.03599902242422104,
1.0983740091323853,
-0.5384872555732727,
-2.353302240371704,
0.5432917475700378,
-1.2249394655227661,
-0.9743432402610779,
0.7975156903266907,
-0.8649196028709412,
0.2240680605173111,
-1.124489665031433,
-0.11301584541797638,
-0.8496720194816589,
-1.0981037616729736,
0.49801164865493774,
-0.00375693803653121,
0.7096961736679077,
-0.6040899157524109,
0.2577105462551117,
-2.188403606414795,
-1.374656319618225,
-0.17778021097183228,
-0.9083845019340515,
0.4162399172782898,
-0.44271767139434814,
0.7300253510475159,
-0.18880335986614227,
0.002358304336667061,
0.27415645122528076,
1.4995501041412354,
3.184582233428955,
0.05863681063055992,
0.34305816888809204,
-0.23371751606464386,
-1.0375475883483887,
1.5083236694335938,
0.8505966067314148,
-0.33333155512809753,
-0.6099305748939514,
-0.9742254614830017,
1.3536134958267212,
1.8908472061157227,
1.0725562572479248,
0.11955133080482483,
-0.868489146232605,
-0.7982727289199829,
0.10352364182472229,
0.10365897417068481,
0.42870599031448364,
1.0017257928848267,
0.10054905712604523,
0.17880922555923462,
1.3328973054885864,
1.0783405303955078,
-0.34645071625709534,
0.47263842821121216,
-0.8821457624435425,
-0.4410417377948761,
0.5576788187026978,
0.32278749346733093,
-0.06143219396471977,
0.2281375378370285,
-1.0120335817337036,
-0.1914643943309784,
-0.22855837643146515,
-0.8252407908439636,
-0.7277386784553528,
-0.37796151638031006,
-0.37132081389427185,
1.7709420919418335,
-0.0700337365269661,
-0.5425349473953247,
-0.0493105947971344,
-0.7789305448532104,
-0.07177110016345978,
-0.9992675185203552,
0.2714501619338989,
-0.13661792874336243,
0.010125366970896721,
-0.09798304736614227,
1.7087104320526123,
-0.9901399612426758,
-2.2917561531066895,
0.1915619820356369,
0.13871733844280243,
-0.37865591049194336,
-0.07911650836467743,
1.8609235286712646,
0.537155032157898,
1.4076321125030518,
1.5471899509429932,
1.1261439323425293,
-0.6305357217788696,
-1.2909263372421265,
0.7686411142349243,
0.9923995733261108,
-1.309602975845337,
0.8783023357391357,
-0.12551409006118774,
-0.5643913745880127,
0.5117678642272949,
1.3007107973098755,
0.489684134721756,
-1.9298619031906128,
0.8777446150779724,
-1.1216646432876587,
0.9105097055435181,
0.7800499200820923,
0.8205969333648682,
0.08797895908355713,
0.902539849281311,
-1.2474581003189087,
-1.026934266090393,
-0.592365026473999,
-0.6537371873855591,
1.8377777338027954,
-0.21495354175567627,
0.3063259422779083,
-0.27232179045677185,
-1.3580944538116455,
0.12380626797676086,
0.6864495277404785,
0.25690558552742004,
-0.3406803011894226,
0.706549346446991,
-0.7774074673652649,
-1.0603982210159302,
-1.3370187282562256,
-0.45769554376602173,
-1.0044641494750977,
-0.8635441660881042,
1.069507122039795,
0.7436464428901672,
0.45162340998649597,
1.9016375541687012,
0.7203331589698792,
0.18902280926704407,
-2.5500965118408203,
0.8254935145378113,
0.4223681688308716,
-0.09827925264835358,
0.8172417283058167,
0.2592562437057495,
1.2167420387268066,
-0.15401531755924225,
0.5600215792655945,
-2.337162494659424,
2.209437370300293,
-0.22629061341285706,
0.7728341817855835,
0.11034281551837921,
0.01683843322098255,
0.9928683042526245,
0.510033369064331,
0.5512646436691284,
-1.0902128219604492,
0.8728954195976257,
-0.6307947039604187,
1.1900099515914917,
0.8668605089187622,
-0.9156885743141174,
0.2141498625278473,
1.203706979751587,
0.33704984188079834,
-0.5907909274101257,
-0.9985615015029907,
-0.8717235326766968,
0.9900559186935425,
1.8056484460830688,
0.041496120393276215,
0.14611776173114777,
0.8481634855270386,
0.7596667408943176,
-1.2754400968551636,
-0.012877192348241806,
-0.6135825514793396,
-0.7030085921287537,
1.8320969343185425,
2.0868725776672363,
-0.02022385038435459,
-0.11872655153274536,
-0.6939849257469177,
-1.4879971742630005,
0.8545546531677246,
0.12122564017772675,
-0.07679051160812378,
0.8222543001174927,
-0.6824455261230469,
1.1756941080093384,
0.8995618224143982,
0.8505033850669861,
0.3001949191093445,
0.005829509347677231,
0.2600685656070709,
-0.25310346484184265,
-1.1845694780349731,
-0.2959699034690857,
-1.011664867401123,
-2.5553054809570312,
0.4316466748714447,
-0.22243060171604156,
-1.4398592710494995,
0.12974224984645844,
-0.9681909084320068,
0.7627265453338623,
-0.49423304200172424,
-1.2189269065856934,
-1.3752349615097046,
0.22692708671092987,
-0.16422460973262787,
0.7803513407707214,
-1.587719440460205,
-0.19563546776771545,
1.1568069458007812,
0.996687650680542,
-0.6690133810043335,
0.853071928024292,
0.2524589002132416,
0.9236627817153931,
0.9770810604095459,
-0.4156167209148407,
0.42673149704933167,
0.2824397683143616,
-1.3092846870422363,
0.34639251232147217,
1.3895412683486938,
0.15216264128684998,
1.3661195039749146,
-0.45481809973716736,
-0.11547158658504486,
0.3850874900817871,
-0.2544870674610138,
-0.5802068114280701,
-0.7489188313484192,
0.6184346675872803,
-0.16253440082073212,
-0.9507175087928772,
-0.09120321273803711,
0.054119694977998734,
-0.2044682800769806,
0.3242059648036957,
-1.565500020980835,
0.010441670194268227,
-0.3780461847782135,
-0.6596495509147644,
-1.410791277885437,
-0.03007027506828308,
1.3511441946029663,
-0.8970059752464294,
-0.16413508355617523,
0.5508562922477722,
0.21321676671504974,
0.5608434081077576,
0.6813398003578186,
-0.7719352841377258,
-0.2262776494026184,
-0.09030075371265411,
-0.46537286043167114,
0.27230051159858704,
1.3108941316604614,
-0.10417748987674713,
-0.9701513648033142,
0.5416548848152161,
-0.23926463723182678,
0.22783619165420532,
1.8847426176071167,
0.06922522187232971,
-0.9024759531021118,
0.3107749819755554,
-0.7808583974838257,
1.8848751783370972,
1.6185649633407593,
1.3666638135910034,
-0.09483051300048828,
-0.9451838731765747,
0.6435278058052063,
-0.30241119861602783,
-0.4107288718223572,
0.9014036059379578,
0.3884390592575073,
-0.2764974534511566,
-1.4256200790405273,
0.7136302590370178,
1.2137588262557983,
-0.7634021639823914,
-0.7906568646430969,
0.07234056293964386,
-0.8190446496009827,
1.2465711832046509,
0.6795992255210876,
0.3282470107078552,
0.25901880860328674,
1.6883641481399536,
0.7771589159965515,
-0.605775773525238,
0.584875762462616,
0.4705655872821808,
-0.1403149664402008,
-1.9619916677474976,
-1.0877954959869385,
0.2561059296131134,
-0.39523807168006897,
-1.5130409002304077,
1.4643926620483398,
-1.2345067262649536,
-0.9579301476478577,
0.5584051609039307,
0.14464205503463745,
1.3614896535873413,
0.24206320941448212,
1.734944462776184,
1.9572222232818604,
0.9436803460121155,
0.4648975431919098,
1.1176202297210693,
-0.2557224631309509,
-0.26825666427612305,
1.6908398866653442,
-0.4939076006412506,
0.6664797067642212,
1.0114994049072266,
-0.4485452175140381,
-1.2321851253509521,
-0.8145425915718079,
-1.189503788948059,
-0.7789236903190613,
1.0150622129440308,
0.10467460751533508,
-1.1342065334320068,
0.31850311160087585,
1.6512436866760254,
0.048840828239917755,
-0.14543630182743073,
0.711300790309906,
0.3403049111366272,
-0.6677631735801697,
-0.08227424323558807,
-1.0627249479293823,
0.5954934358596802,
-0.30237478017807007,
-0.37499818205833435,
0.20716723799705505,
0.5535333156585693,
1.1890922784805298,
0.2029620110988617,
0.023561060428619385,
1.3247984647750854,
-1.4127824306488037,
1.202510952949524,
-1.0376473665237427,
0.3644827902317047,
-2.299783706665039,
1.480525016784668,
-0.9625056385993958,
1.948698878288269,
-2.671335458755493,
0.5165582895278931,
-0.4929772913455963,
-0.5356647968292236,
0.1587972640991211,
-0.190466970205307,
0.09965825080871582,
-0.007159640546888113,
-1.0928771495819092,
-0.1829967349767685,
-0.8548690676689148,
0.5267362594604492,
1.2678197622299194,
1.3150510787963867,
-0.9133249521255493,
-0.29377612471580505,
-1.6255176067352295,
-0.18978330492973328,
-0.49698811769485474,
0.18219231069087982,
-1.800789713859558,
-0.16759665310382843,
-2.0479867458343506,
-2.4325966835021973,
-1.3216822147369385,
-1.0207514762878418,
1.285489797592163,
0.1597757488489151,
-0.9813460111618042,
1.1351079940795898,
-0.4382282793521881,
-1.7320228815078735,
1.2196331024169922,
-2.2584614753723145
] |
https://github.com/huggingface/datasets/issues/5388
|
Getting Value Error while loading a dataset..
|
@valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
Please, restart your Colab runtime and execute the install commands before importing `datasets`:
```python
!pip install datasets
!pip install zstandard
from datasets import load_dataset
ds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
next(iter(ds))
```
|
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
| 361 | 49 |
Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
@valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
Please, restart your Colab runtime and execute the install commands before importing `datasets`:
```python
!pip install datasets
!pip install zstandard
from datasets import load_dataset
ds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
next(iter(ds))
```
|
[
-1.2318658828735352,
-0.8209953308105469,
-0.5635695457458496,
1.4319144487380981,
0.012867887504398823,
-1.3619483709335327,
0.09219809621572495,
-0.9112747311592102,
1.611975908279419,
-0.7809149026870728,
0.36555957794189453,
-1.6345086097717285,
0.04313938692212105,
-0.6638200879096985,
-0.6922405958175659,
-0.7215746641159058,
-0.330843985080719,
-0.7260558605194092,
1.161759376525879,
2.5332138538360596,
1.2820072174072266,
-1.3315632343292236,
2.805509090423584,
0.6413559913635254,
-0.24257002770900726,
-0.8469178676605225,
0.3676188588142395,
0.007251371629536152,
-1.4667284488677979,
-0.2810009717941284,
-1.0507014989852905,
-0.0965704694390297,
-0.6509122252464294,
-0.5762144327163696,
0.08983666449785233,
0.4431605637073517,
-0.181361123919487,
-0.4126627445220947,
-0.4487718939781189,
-0.7611902356147766,
0.6157817840576172,
-0.29595473408699036,
0.8029136657714844,
-0.28156253695487976,
1.7876814603805542,
-0.6795331239700317,
0.49673062562942505,
0.527014970779419,
1.2451800107955933,
0.23875319957733154,
-0.10372500121593475,
0.432224303483963,
0.23982347548007965,
0.0290239155292511,
0.5977900624275208,
1.2708934545516968,
0.659057080745697,
0.47214317321777344,
0.7563448548316956,
-2.179537296295166,
1.2900582551956177,
-0.7472078204154968,
0.20824965834617615,
1.2412381172180176,
-1.1178010702133179,
0.49790483713150024,
-1.8728481531143188,
-0.17360897362232208,
0.39355361461639404,
-2.2592597007751465,
0.13876548409461975,
-1.2491976022720337,
-0.6329641342163086,
0.9943153858184814,
0.3305243253707886,
-1.2031644582748413,
-0.07216309756040573,
-0.45224907994270325,
0.986909031867981,
0.3657756447792053,
1.184751272201538,
-1.641360878944397,
0.05194038152694702,
-0.24185875058174133,
0.3523242175579071,
-1.1824615001678467,
-1.5868992805480957,
0.6141607165336609,
0.7221236824989319,
0.6396844387054443,
-0.18647724390029907,
0.9024178385734558,
-1.1107590198516846,
0.8140684366226196,
-0.9506832361221313,
-1.8069819211959839,
-1.3325496912002563,
-2.4215481281280518,
-2.420215129852295,
0.7502188086509705,
-0.41718244552612305,
-0.4186742305755615,
2.192194938659668,
-1.1059942245483398,
-1.7935340404510498,
1.0853005647659302,
0.3054865300655365,
-0.10248179733753204,
2.390493154525757,
0.2366856038570404,
-0.9485353827476501,
0.7547522187232971,
-0.814527690410614,
0.6045601963996887,
-0.4358760118484497,
1.2706208229064941,
0.36359095573425293,
-1.0608123540878296,
1.5737446546554565,
-0.41101643443107605,
0.5575411915779114,
-0.7416108846664429,
-0.34342408180236816,
-0.5181879997253418,
0.19553041458129883,
2.015239715576172,
-0.21836450695991516,
1.5788700580596924,
-0.11765345185995102,
-1.4313350915908813,
-1.3800091743469238,
0.7348635792732239,
0.5038979053497314,
-0.7596254944801331,
0.23581542074680328,
-0.4315125346183777,
0.1412082463502884,
0.15367405116558075,
1.0201457738876343,
1.2678836584091187,
0.8176690936088562,
-0.14007030427455902,
-0.9042723178863525,
0.1376279890537262,
-0.062020983546972275,
-0.5279359817504883,
-1.6474109888076782,
-0.2621708810329437,
0.10087952762842178,
0.6203676462173462,
-1.2237789630889893,
1.9210247993469238,
0.8205486536026001,
2.0263874530792236,
1.0085934400558472,
-0.29289984703063965,
1.5432697534561157,
0.10515417158603668,
1.8999522924423218,
-0.2900194823741913,
0.6558694243431091,
-0.515408456325531,
-1.2501360177993774,
0.6436793804168701,
-0.38786613941192627,
-2.006108522415161,
-0.38078945875167847,
-0.886909008026123,
-0.04892700910568237,
-0.9170818328857422,
1.0348501205444336,
-0.1624075472354889,
-1.3912168741226196,
0.2362138032913208,
-0.7040480971336365,
0.1720849871635437,
-1.436524510383606,
0.32366055250167847,
0.7409074902534485,
-0.7080209255218506,
0.09168314933776855,
-0.5176832675933838,
-1.3614553213119507,
-0.6502708196640015,
0.4634340703487396,
1.7667598724365234,
-0.718656599521637,
0.9784406423568726,
1.0606735944747925,
-0.5982541441917419,
-0.015178553760051727,
0.5369343757629395,
-0.4553970396518707,
0.8896851539611816,
-1.0294445753097534,
-0.4126110076904297,
1.134875774383545,
-0.31171202659606934,
-0.4918438196182251,
1.2833404541015625,
0.7109683752059937,
-0.9801291227340698,
-0.30162984132766724,
-0.10574249923229218,
-0.8041492700576782,
0.04200901463627815,
-1.5964816808700562,
-0.08001255244016647,
0.25696372985839844,
-1.4964725971221924,
-0.5183348059654236,
-0.039966341108083725,
1.2755804061889648,
-0.007664520293474197,
1.3776048421859741,
-0.20182110369205475,
-0.07191546261310577,
-0.493951678276062,
-0.498716801404953,
0.11480619013309479,
-0.1449550986289978,
-0.6171251535415649,
0.28494223952293396,
-0.7308783531188965,
0.15131235122680664,
1.4932113885879517,
0.2520603537559509,
0.1012900099158287,
0.5178966522216797,
1.1801307201385498,
0.31581413745880127,
-0.25269463658332825,
-0.7979387044906616,
-1.695863962173462,
2.0088727474212646,
-1.532727599143982,
1.9568511247634888,
0.8492321372032166,
-0.03130919858813286,
-1.8353157043457031,
-1.8508771657943726,
1.4894474744796753,
1.1477274894714355,
2.519625663757324,
0.5600547194480896,
0.43338316679000854,
-0.8146113753318787,
-0.6755940914154053,
0.44375404715538025,
-0.8125125765800476,
-0.9283191561698914,
0.1278413087129593,
2.398897647857666,
1.6995152235031128,
-0.31853553652763367,
-0.20997315645217896,
-0.9295858144760132,
1.3146088123321533,
-0.2905227243900299,
0.23654145002365112,
1.8126522302627563,
-0.37452131509780884,
-1.0595505237579346,
1.254776954650879,
-2.352170944213867,
0.2767515182495117,
1.9887222051620483,
0.3232865333557129,
0.0007029063999652863,
-1.1894922256469727,
-0.6897517442703247,
-0.11101192235946655,
-0.42764079570770264,
-1.1827174425125122,
0.38181841373443604,
-0.24730616807937622,
-0.823237419128418,
-1.3964600563049316,
0.02887878194451332,
-1.1798903942108154,
-1.7090373039245605,
0.3270167410373688,
1.7385928630828857,
2.1357955932617188,
-0.8269255757331848,
1.3468399047851562,
-0.2781849503517151,
0.29852038621902466,
1.1612882614135742,
1.2631975412368774,
3.2442212104797363,
1.9399795532226562,
-1.2610880136489868,
0.6942364573478699,
-0.12888874113559723,
-0.5078535079956055,
1.2311896085739136,
-1.0482131242752075,
1.2027559280395508,
-0.2580373287200928,
-1.381825566291809,
-1.2065709829330444,
0.9241904616355896,
0.49197304248809814,
-0.11059688776731491,
-0.48869913816452026,
1.1313705444335938,
0.17856812477111816,
1.314095139503479,
0.6276007890701294,
-0.29984092712402344,
0.5634399652481079,
-0.3139120042324066,
-0.5335689783096313,
1.5670139789581299,
0.05425093695521355,
-1.5173702239990234,
-2.297077178955078,
-0.13951422274112701,
-0.995354175567627,
0.002486223354935646,
-0.9277104735374451,
-1.067248821258545,
1.4564491510391235,
0.4173315167427063,
-0.9775175452232361,
-0.08978652209043503,
-0.3650061786174774,
-0.6423013210296631,
2.6251609325408936,
-1.429649829864502,
-0.26770153641700745,
-0.9143790602684021,
-0.5587437152862549,
1.484145998954773,
-1.167279839515686,
-0.30165550112724304,
-1.0236330032348633,
-0.5013952255249023,
-1.23440420627594,
-0.5017858743667603,
-0.09095168113708496,
-0.8078421950340271,
0.7484809756278992,
0.042870890349149704,
-1.3210464715957642,
-0.2609686255455017,
-1.0484886169433594,
0.8368814587593079,
-0.23406752943992615,
0.06927371770143509,
1.7646085023880005,
0.2730136811733246,
-0.410338431596756,
0.7859951257705688,
1.2647942304611206,
0.6074122190475464,
-0.5366708636283875,
0.2520853877067566,
-0.701758086681366,
0.4639873504638672,
-1.210741400718689,
0.309900164604187,
-2.88032603263855,
0.6400504112243652,
0.05066295340657234,
-0.015699617564678192,
-0.13565680384635925,
-1.4799214601516724,
0.9106495976448059,
2.5142526626586914,
-1.1188727617263794,
0.6759042739868164,
0.32906848192214966,
1.2349252700805664,
-1.657027244567871,
-0.016400089487433434,
-0.6593585014343262,
2.0684561729431152,
0.03368115425109863,
1.0910991430282593,
-0.5443559885025024,
-2.340888261795044,
0.5430943369865417,
-1.2272343635559082,
-0.9759263396263123,
0.7960253357887268,
-0.8743603229522705,
0.2391013354063034,
-1.1190491914749146,
-0.11154355853796005,
-0.8460668325424194,
-1.1012201309204102,
0.49410325288772583,
0.002886766567826271,
0.7100682854652405,
-0.6066900491714478,
0.2741243541240692,
-2.1750192642211914,
-1.3892017602920532,
-0.17881856858730316,
-0.8960028886795044,
0.41715845465660095,
-0.43300196528434753,
0.7362563014030457,
-0.18417996168136597,
0.0011742282658815384,
0.2964734435081482,
1.4910622835159302,
3.1780996322631836,
0.062384460121393204,
0.32356613874435425,
-0.24152307212352753,
-1.0349406003952026,
1.5115407705307007,
0.8554835319519043,
-0.3264630436897278,
-0.6028285622596741,
-0.962026834487915,
1.3583709001541138,
1.891524076461792,
1.0824131965637207,
0.11142626404762268,
-0.8713535666465759,
-0.806637167930603,
0.11431887745857239,
0.10280286520719528,
0.41810762882232666,
0.9956804513931274,
0.11527995765209198,
0.19225502014160156,
1.325429081916809,
1.0677317380905151,
-0.34318041801452637,
0.48032552003860474,
-0.8781362771987915,
-0.4429740011692047,
0.5614221692085266,
0.3309892416000366,
-0.05124983191490173,
0.22321602702140808,
-1.0082095861434937,
-0.19466927647590637,
-0.2329605370759964,
-0.8269429206848145,
-0.7303944230079651,
-0.37019139528274536,
-0.36668023467063904,
1.781691074371338,
-0.08403020352125168,
-0.54536372423172,
-0.05208321288228035,
-0.7881990075111389,
-0.06400910019874573,
-1.0076297521591187,
0.27817094326019287,
-0.13697591423988342,
0.006632913835346699,
-0.0858563557267189,
1.6951524019241333,
-1.0013234615325928,
-2.2858190536499023,
0.2036522626876831,
0.13999776542186737,
-0.39471617341041565,
-0.08265285193920135,
1.8615837097167969,
0.5428639650344849,
1.4220961332321167,
1.5423393249511719,
1.1394860744476318,
-0.648695170879364,
-1.2869728803634644,
0.7683641314506531,
0.9904253482818604,
-1.3112763166427612,
0.8833910822868347,
-0.12645837664604187,
-0.5748419761657715,
0.49942630529403687,
1.2957087755203247,
0.4917568564414978,
-1.9207767248153687,
0.8789118528366089,
-1.110679030418396,
0.9198963642120361,
0.7708817720413208,
0.8275116682052612,
0.09732752293348312,
0.9188589453697205,
-1.2408702373504639,
-1.0331082344055176,
-0.5831669569015503,
-0.6462414264678955,
1.8409786224365234,
-0.22170062363147736,
0.3060028553009033,
-0.27710670232772827,
-1.348766803741455,
0.12627984583377838,
0.694602906703949,
0.257260262966156,
-0.34443429112434387,
0.6967728734016418,
-0.7603444457054138,
-1.044577956199646,
-1.3286842107772827,
-0.456219345331192,
-1.0053045749664307,
-0.8574147820472717,
1.0739389657974243,
0.7388119101524353,
0.46524348855018616,
1.9031869173049927,
0.7194624543190002,
0.20518086850643158,
-2.546769618988037,
0.8312485218048096,
0.4253827631473541,
-0.10506538301706314,
0.8017446994781494,
0.2651152014732361,
1.2172658443450928,
-0.15348009765148163,
0.5572832822799683,
-2.3319520950317383,
2.207216501235962,
-0.2156861126422882,
0.751454770565033,
0.11595867574214935,
0.013913285918533802,
0.9829613566398621,
0.5126838088035583,
0.5474165081977844,
-1.0915404558181763,
0.8586233854293823,
-0.6243464946746826,
1.1792443990707397,
0.8735853433609009,
-0.9249047040939331,
0.22387632727622986,
1.2030558586120605,
0.3374526798725128,
-0.5920374989509583,
-1.0007123947143555,
-0.8611053228378296,
0.9978203773498535,
1.791070580482483,
0.044349778443574905,
0.13492318987846375,
0.8632933497428894,
0.7582288980484009,
-1.2807115316390991,
0.00014583393931388855,
-0.6048826575279236,
-0.714739978313446,
1.8275213241577148,
2.0831820964813232,
-0.019327808171510696,
-0.1107383668422699,
-0.6911070942878723,
-1.4871299266815186,
0.8800698518753052,
0.11597660183906555,
-0.06847327202558517,
0.8123645782470703,
-0.6784982681274414,
1.1860212087631226,
0.8955045938491821,
0.8484647274017334,
0.28163981437683105,
0.0038231369107961655,
0.2668735682964325,
-0.24755537509918213,
-1.1837483644485474,
-0.2852190434932709,
-0.9934334754943848,
-2.555980920791626,
0.4327608644962311,
-0.22076131403446198,
-1.4312679767608643,
0.11905831098556519,
-0.9596511721611023,
0.7654030919075012,
-0.49340683221817017,
-1.2165417671203613,
-1.3750137090682983,
0.2368251085281372,
-0.15712055563926697,
0.7818537950515747,
-1.5838146209716797,
-0.19381052255630493,
1.1486575603485107,
0.9866349101066589,
-0.6813750863075256,
0.8471517562866211,
0.24685759842395782,
0.9244345426559448,
0.9685101509094238,
-0.4074993133544922,
0.4280673563480377,
0.27364370226860046,
-1.320003628730774,
0.3276791572570801,
1.3947097063064575,
0.14809904992580414,
1.368497610092163,
-0.4494425654411316,
-0.1090376228094101,
0.3886357247829437,
-0.25960737466812134,
-0.5746433734893799,
-0.7701143026351929,
0.6042984127998352,
-0.15665026009082794,
-0.9596388936042786,
-0.09668347239494324,
0.059111472219228745,
-0.20228344202041626,
0.3336758017539978,
-1.567146897315979,
0.004682013764977455,
-0.3717857301235199,
-0.6553061008453369,
-1.4041814804077148,
-0.034668002277612686,
1.350378155708313,
-0.8744465112686157,
-0.16378942131996155,
0.5558950304985046,
0.1960829347372055,
0.5460842251777649,
0.6838191151618958,
-0.7886524796485901,
-0.21791191399097443,
-0.10043004155158997,
-0.4694109857082367,
0.2708941102027893,
1.3196431398391724,
-0.1069200336933136,
-0.9702482223510742,
0.5424667596817017,
-0.2399410456418991,
0.2176569402217865,
1.8841145038604736,
0.07983655482530594,
-0.8939944505691528,
0.30376142263412476,
-0.7836090326309204,
1.8722491264343262,
1.6212972402572632,
1.3772176504135132,
-0.10487066954374313,
-0.9417017102241516,
0.6491010785102844,
-0.3083890676498413,
-0.40986859798431396,
0.9129119515419006,
0.38473421335220337,
-0.28527605533599854,
-1.4292458295822144,
0.7086665630340576,
1.2142431735992432,
-0.7659181952476501,
-0.8002403378486633,
0.0689711943268776,
-0.810175359249115,
1.249576210975647,
0.6745656132698059,
0.3143782913684845,
0.26810723543167114,
1.688003659248352,
0.7558712363243103,
-0.5916094183921814,
0.5763707160949707,
0.47306495904922485,
-0.13620787858963013,
-1.9579662084579468,
-1.0922739505767822,
0.2665792405605316,
-0.4000757038593292,
-1.5235044956207275,
1.4700652360916138,
-1.2443046569824219,
-0.9565708041191101,
0.5500243306159973,
0.14793381094932556,
1.3692123889923096,
0.237798810005188,
1.7464655637741089,
1.965449333190918,
0.9393212199211121,
0.45955750346183777,
1.1222929954528809,
-0.2524309456348419,
-0.24395321309566498,
1.681869387626648,
-0.4987463355064392,
0.6669081449508667,
1.0057249069213867,
-0.44553548097610474,
-1.2476224899291992,
-0.8151723146438599,
-1.207535743713379,
-0.7942672967910767,
1.0148814916610718,
0.09766558557748795,
-1.1395087242126465,
0.3183128535747528,
1.6627681255340576,
0.03497711941599846,
-0.1460217833518982,
0.7110999822616577,
0.3397532105445862,
-0.6720156073570251,
-0.07961921393871307,
-1.0604872703552246,
0.600064754486084,
-0.27957236766815186,
-0.37832534313201904,
0.20686876773834229,
0.5596984624862671,
1.1873884201049805,
0.20463533699512482,
0.024675175547599792,
1.3279346227645874,
-1.3941476345062256,
1.211617350578308,
-1.0300358533859253,
0.36096176505088806,
-2.3224387168884277,
1.4854810237884521,
-0.9487680196762085,
1.9298288822174072,
-2.6717469692230225,
0.526277482509613,
-0.48511508107185364,
-0.5388299822807312,
0.17584435641765594,
-0.18995973467826843,
0.09944489598274231,
-0.019472088664770126,
-1.0887062549591064,
-0.16692595183849335,
-0.8637257814407349,
0.5306455492973328,
1.259459376335144,
1.320133924484253,
-0.9201442003250122,
-0.3005611300468445,
-1.6332058906555176,
-0.19439418613910675,
-0.49923962354660034,
0.18380841612815857,
-1.8087372779846191,
-0.16656017303466797,
-2.052269697189331,
-2.4531731605529785,
-1.3179092407226562,
-1.0053654909133911,
1.289955735206604,
0.154661163687706,
-0.9707318544387817,
1.1380094289779663,
-0.44579631090164185,
-1.7461265325546265,
1.2218151092529297,
-2.2547738552093506
] |
https://github.com/huggingface/datasets/issues/5388
|
Getting Value Error while loading a dataset..
|
> @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
>
> Please, restart your Colab runtime and execute the install commands before importing `datasets`:
>
> ```python
> !pip install datasets
> !pip install zstandard
>
> from datasets import load_dataset
>
> ds = load_dataset(
> "json",
> data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
> split="train",
> streaming=True,
> )
> next(iter(ds))
> ```
I guess that was the problem, importing datasets before the installation of zstandard. Thank you for the feedback.
|
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
| 361 | 85 |
Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
> @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
>
> Please, restart your Colab runtime and execute the install commands before importing `datasets`:
>
> ```python
> !pip install datasets
> !pip install zstandard
>
> from datasets import load_dataset
>
> ds = load_dataset(
> "json",
> data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
> split="train",
> streaming=True,
> )
> next(iter(ds))
> ```
I guess that was the problem, importing datasets before the installation of zstandard. Thank you for the feedback.
|
[
-1.2317373752593994,
-0.8201888203620911,
-0.5662683844566345,
1.4329051971435547,
0.011797354556620121,
-1.3598886728286743,
0.09152227640151978,
-0.9091744422912598,
1.6110221147537231,
-0.7832229137420654,
0.36153727769851685,
-1.6367824077606201,
0.041485495865345,
-0.6567408442497253,
-0.6930665373802185,
-0.7300934195518494,
-0.32770904898643494,
-0.7286669611930847,
1.1620681285858154,
2.5353150367736816,
1.2829668521881104,
-1.333001971244812,
2.806398868560791,
0.6384371519088745,
-0.25068947672843933,
-0.849992573261261,
0.36569729447364807,
0.009456147439777851,
-1.4688191413879395,
-0.27918022871017456,
-1.0534756183624268,
-0.09552657604217529,
-0.6481156349182129,
-0.567700207233429,
0.08943703770637512,
0.43911805748939514,
-0.1825936734676361,
-0.4091126024723053,
-0.4489363729953766,
-0.7616503238677979,
0.6148270964622498,
-0.2950928807258606,
0.8028087615966797,
-0.2783663868904114,
1.7903443574905396,
-0.6804042458534241,
0.4973393678665161,
0.5270695090293884,
1.2464009523391724,
0.24049341678619385,
-0.10545175522565842,
0.43034687638282776,
0.23538091778755188,
0.028767380863428116,
0.5975027084350586,
1.2666692733764648,
0.6570868492126465,
0.4741346538066864,
0.7509152293205261,
-2.1789517402648926,
1.293411374092102,
-0.7472237348556519,
0.20606878399848938,
1.2437572479248047,
-1.1182445287704468,
0.5011083483695984,
-1.8720871210098267,
-0.1738435924053192,
0.3965691030025482,
-2.256840705871582,
0.13885514438152313,
-1.2493928670883179,
-0.63344806432724,
0.9940911531448364,
0.3277709484100342,
-1.2059953212738037,
-0.07083136588335037,
-0.45353975892066956,
0.9864534139633179,
0.36452025175094604,
1.184300184249878,
-1.6421422958374023,
0.05566108971834183,
-0.2384808212518692,
0.3558211922645569,
-1.1814063787460327,
-1.595016598701477,
0.617079496383667,
0.723749041557312,
0.6433403491973877,
-0.1859963834285736,
0.8972079157829285,
-1.109368920326233,
0.8145937323570251,
-0.9449928998947144,
-1.8088711500167847,
-1.3306888341903687,
-2.423306465148926,
-2.421992778778076,
0.7497092485427856,
-0.41872745752334595,
-0.41789576411247253,
2.1931347846984863,
-1.107063889503479,
-1.7903035879135132,
1.084730863571167,
0.3073214292526245,
-0.1050698459148407,
2.396533489227295,
0.23559895157814026,
-0.9480978846549988,
0.7556865811347961,
-0.8183214068412781,
0.6037818193435669,
-0.43186891078948975,
1.2716013193130493,
0.365230530500412,
-1.0581833124160767,
1.5808717012405396,
-0.41298869252204895,
0.555188000202179,
-0.7437543869018555,
-0.3486464321613312,
-0.5231374502182007,
0.19045709073543549,
2.015644073486328,
-0.21834969520568848,
1.583699345588684,
-0.11730746179819107,
-1.4292832612991333,
-1.3784520626068115,
0.7372856736183167,
0.5010865926742554,
-0.760194718837738,
0.2389894276857376,
-0.4359597861766815,
0.14289915561676025,
0.15451626479625702,
1.0229146480560303,
1.2695549726486206,
0.8164151310920715,
-0.14198388159275055,
-0.907690167427063,
0.13766789436340332,
-0.0630296841263771,
-0.5289750099182129,
-1.650338053703308,
-0.2592637240886688,
0.09703030437231064,
0.6237004995346069,
-1.2220945358276367,
1.9182426929473877,
0.8184075355529785,
2.027513027191162,
1.009141206741333,
-0.29009220004081726,
1.541879653930664,
0.10709191113710403,
1.8964338302612305,
-0.2958090007305145,
0.6587620973587036,
-0.5116074681282043,
-1.2495230436325073,
0.6393527984619141,
-0.38853171467781067,
-2.001713514328003,
-0.38114723563194275,
-0.8842318654060364,
-0.05665237084031105,
-0.9173581600189209,
1.0393202304840088,
-0.16160783171653748,
-1.3866220712661743,
0.2363738715648651,
-0.7019931674003601,
0.173226460814476,
-1.442820429801941,
0.3202941417694092,
0.7432166337966919,
-0.7090470194816589,
0.09296592324972153,
-0.5152170062065125,
-1.3644052743911743,
-0.6498756408691406,
0.463045209646225,
1.766122817993164,
-0.7124692797660828,
0.97586590051651,
1.0577118396759033,
-0.5972832441329956,
-0.015295322053134441,
0.5370055437088013,
-0.4482705593109131,
0.8903142809867859,
-1.0315799713134766,
-0.41139259934425354,
1.1339994668960571,
-0.3185166120529175,
-0.4914405941963196,
1.2794291973114014,
0.7117348313331604,
-0.9758579134941101,
-0.3006432056427002,
-0.10663429647684097,
-0.8025838732719421,
0.044710829854011536,
-1.5971537828445435,
-0.08402448147535324,
0.2557080388069153,
-1.498755931854248,
-0.5215975642204285,
-0.04251186177134514,
1.2745883464813232,
-0.008443951606750488,
1.380650520324707,
-0.2002488374710083,
-0.07255438715219498,
-0.4920019805431366,
-0.5021493434906006,
0.11512188613414764,
-0.14754080772399902,
-0.6157799363136292,
0.2812648415565491,
-0.7320672869682312,
0.14888674020767212,
1.4907164573669434,
0.2547644078731537,
0.10137777030467987,
0.5102769136428833,
1.180084466934204,
0.31101495027542114,
-0.2565735876560211,
-0.7987989187240601,
-1.6963598728179932,
2.005253314971924,
-1.5324115753173828,
1.956231713294983,
0.8559731841087341,
-0.027169130742549896,
-1.8355060815811157,
-1.8508425951004028,
1.4845285415649414,
1.1460968255996704,
2.516265869140625,
0.5638169050216675,
0.43537724018096924,
-0.8116779923439026,
-0.6789558529853821,
0.44507288932800293,
-0.8049631118774414,
-0.9289456605911255,
0.1268654763698578,
2.4002950191497803,
1.7020978927612305,
-0.319137841463089,
-0.20431531965732574,
-0.9275124669075012,
1.310478925704956,
-0.2883351147174835,
0.23354007303714752,
1.8142646551132202,
-0.37719225883483887,
-1.0552749633789062,
1.2580100297927856,
-2.3556368350982666,
0.27692440152168274,
1.9892634153366089,
0.32497212290763855,
0.002321086823940277,
-1.185520887374878,
-0.6896632313728333,
-0.11341756582260132,
-0.43044665455818176,
-1.1840237379074097,
0.3831899166107178,
-0.24622449278831482,
-0.8232868909835815,
-1.3971296548843384,
0.02176501229405403,
-1.1802312135696411,
-1.7069379091262817,
0.3277607262134552,
1.7415906190872192,
2.1380481719970703,
-0.8322942852973938,
1.345870852470398,
-0.27873802185058594,
0.29472172260284424,
1.1573073863983154,
1.2572377920150757,
3.2442615032196045,
1.937347412109375,
-1.258307933807373,
0.6947680115699768,
-0.12822195887565613,
-0.5038254857063293,
1.2354345321655273,
-1.0482332706451416,
1.2044669389724731,
-0.2592231035232544,
-1.3878244161605835,
-1.2070116996765137,
0.9265905618667603,
0.4895952641963959,
-0.11190004646778107,
-0.48748868703842163,
1.1287803649902344,
0.17706668376922607,
1.3145155906677246,
0.6266681551933289,
-0.2990562617778778,
0.5588982105255127,
-0.3113682270050049,
-0.5326826572418213,
1.5679467916488647,
0.051851335912942886,
-1.521667242050171,
-2.2959516048431396,
-0.14106445014476776,
-0.9952194094657898,
0.0003738226369023323,
-0.9323233366012573,
-1.0723495483398438,
1.4532712697982788,
0.41711553931236267,
-0.974910318851471,
-0.08776579797267914,
-0.3641074597835541,
-0.6373618841171265,
2.6209325790405273,
-1.4280548095703125,
-0.26447629928588867,
-0.9160160422325134,
-0.5596367120742798,
1.4839544296264648,
-1.168601632118225,
-0.2980037331581116,
-1.022650957107544,
-0.5013182163238525,
-1.2324708700180054,
-0.49914833903312683,
-0.09216301888227463,
-0.8080676198005676,
0.7427029013633728,
0.042737703770399094,
-1.3186317682266235,
-0.26010891795158386,
-1.0443506240844727,
0.8411516547203064,
-0.23912344872951508,
0.07117749005556107,
1.7618014812469482,
0.2716951072216034,
-0.40940362215042114,
0.7859592437744141,
1.266618251800537,
0.6046761274337769,
-0.5408976078033447,
0.24510353803634644,
-0.7071117758750916,
0.4695034921169281,
-1.209647536277771,
0.308284193277359,
-2.8820369243621826,
0.6441264748573303,
0.04999736323952675,
-0.016849633306264877,
-0.1321413666009903,
-1.4789882898330688,
0.9083099365234375,
2.5127835273742676,
-1.1192963123321533,
0.674716055393219,
0.3262007534503937,
1.2351834774017334,
-1.6610163450241089,
-0.016921432688832283,
-0.6570621132850647,
2.0738468170166016,
0.03163598105311394,
1.0909955501556396,
-0.5451028347015381,
-2.3478245735168457,
0.540433943271637,
-1.2236015796661377,
-0.974751353263855,
0.7968045473098755,
-0.8770450949668884,
0.23601892590522766,
-1.1246088743209839,
-0.1140902042388916,
-0.8485323786735535,
-1.0977205038070679,
0.4919103980064392,
0.0004034629091620445,
0.707770049571991,
-0.6119800209999084,
0.2695698142051697,
-2.181119680404663,
-1.389617919921875,
-0.1784776747226715,
-0.8958068490028381,
0.4204087555408478,
-0.4324972629547119,
0.7378732562065125,
-0.18102310597896576,
0.004975230433046818,
0.29641515016555786,
1.4926939010620117,
3.175647258758545,
0.05562245100736618,
0.3206441104412079,
-0.23823679983615875,
-1.0329735279083252,
1.5094479322433472,
0.855772078037262,
-0.3272707760334015,
-0.6013296246528625,
-0.9617370367050171,
1.362066388130188,
1.8908025026321411,
1.0839533805847168,
0.11483205854892731,
-0.874133288860321,
-0.7990380525588989,
0.11060774326324463,
0.10383592545986176,
0.41800639033317566,
1.000175952911377,
0.11252713203430176,
0.19592568278312683,
1.325156569480896,
1.0711108446121216,
-0.33840063214302063,
0.4820748567581177,
-0.88194340467453,
-0.4481167495250702,
0.5585992336273193,
0.32934102416038513,
-0.050868503749370575,
0.22762741148471832,
-1.006636142730713,
-0.1908113956451416,
-0.23342826962471008,
-0.8234894871711731,
-0.7307034730911255,
-0.3695642650127411,
-0.36557894945144653,
1.777238130569458,
-0.08442454040050507,
-0.5476313829421997,
-0.04753129929304123,
-0.7852613925933838,
-0.06548041105270386,
-1.0093507766723633,
0.2807111442089081,
-0.13623587787151337,
0.008609308861196041,
-0.08806825429201126,
1.694412112236023,
-1.0019621849060059,
-2.285215139389038,
0.19961774349212646,
0.13872486352920532,
-0.3930317461490631,
-0.08354517817497253,
1.8630117177963257,
0.5364468693733215,
1.4245927333831787,
1.5425457954406738,
1.1402270793914795,
-0.6492798924446106,
-1.2852468490600586,
0.7668617367744446,
0.9888724684715271,
-1.3053641319274902,
0.8887500166893005,
-0.12967929244041443,
-0.5752939581871033,
0.4950554370880127,
1.2971978187561035,
0.49121302366256714,
-1.9186755418777466,
0.8816930055618286,
-1.1090734004974365,
0.9171034097671509,
0.7719162106513977,
0.833248496055603,
0.09605030715465546,
0.9149810075759888,
-1.2417691946029663,
-1.0279161930084229,
-0.5825071334838867,
-0.644267737865448,
1.8381012678146362,
-0.2209881991147995,
0.306633323431015,
-0.2817035913467407,
-1.348986268043518,
0.12743206322193146,
0.6906045079231262,
0.2612575590610504,
-0.3406464755535126,
0.7003473043441772,
-0.7605534195899963,
-1.0461335182189941,
-1.328885793685913,
-0.449768990278244,
-1.002548098564148,
-0.8564926385879517,
1.075500726699829,
0.73780757188797,
0.46713489294052124,
1.9086389541625977,
0.7137954235076904,
0.20366676151752472,
-2.547041654586792,
0.8377882838249207,
0.4212678074836731,
-0.10796411335468292,
0.8082196116447449,
0.26956868171691895,
1.2181788682937622,
-0.1522291749715805,
0.555417537689209,
-2.3225955963134766,
2.205998182296753,
-0.2186145931482315,
0.7550415396690369,
0.11268725991249084,
0.022442784160375595,
0.979640007019043,
0.5147751569747925,
0.5445659160614014,
-1.09333074092865,
0.8617373704910278,
-0.6219403147697449,
1.1754473447799683,
0.8757528066635132,
-0.9251360297203064,
0.22627662122249603,
1.2019332647323608,
0.33699387311935425,
-0.5899748802185059,
-1.0040134191513062,
-0.8575929403305054,
0.9950945377349854,
1.7885838747024536,
0.04574068635702133,
0.13498082756996155,
0.8550692796707153,
0.7582134008407593,
-1.2816591262817383,
-0.002482783980667591,
-0.6052176356315613,
-0.7190433740615845,
1.8261386156082153,
2.081181764602661,
-0.012860443443059921,
-0.10771070420742035,
-0.6899433732032776,
-1.489309310913086,
0.8772334456443787,
0.11552545428276062,
-0.07070259749889374,
0.8115953803062439,
-0.6763187646865845,
1.1854883432388306,
0.8902196884155273,
0.8473881483078003,
0.2757019102573395,
0.006748600862920284,
0.2701781988143921,
-0.24953174591064453,
-1.1811180114746094,
-0.28520479798316956,
-0.9900415539741516,
-2.5600640773773193,
0.43394631147384644,
-0.22712664306163788,
-1.4322034120559692,
0.11757805943489075,
-0.9574925303459167,
0.7668353915214539,
-0.49459898471832275,
-1.2172383069992065,
-1.3761236667633057,
0.23257707059383392,
-0.161492720246315,
0.7840522527694702,
-1.5819337368011475,
-0.1902214139699936,
1.1500169038772583,
0.992694616317749,
-0.6791596412658691,
0.8524171710014343,
0.24989604949951172,
0.9220598340034485,
0.9719927906990051,
-0.41188299655914307,
0.4295727610588074,
0.2819262146949768,
-1.318992018699646,
0.32547417283058167,
1.393797755241394,
0.15077678859233856,
1.3659898042678833,
-0.4508005380630493,
-0.11297573149204254,
0.3936081528663635,
-0.25538185238838196,
-0.5748804807662964,
-0.7619271278381348,
0.605962336063385,
-0.15706761181354523,
-0.9594184160232544,
-0.09881821274757385,
0.054551929235458374,
-0.2033122032880783,
0.33115649223327637,
-1.5655134916305542,
0.0025098416954278946,
-0.3788280189037323,
-0.6531477570533752,
-1.4059271812438965,
-0.03299865499138832,
1.3517959117889404,
-0.8816424012184143,
-0.15854662656784058,
0.5533549189567566,
0.1977711319923401,
0.54981929063797,
0.6826630234718323,
-0.7856462597846985,
-0.2170821577310562,
-0.10010652989149094,
-0.47302064299583435,
0.2715218961238861,
1.3133490085601807,
-0.10596279799938202,
-0.9758134484291077,
0.5372704863548279,
-0.23825906217098236,
0.2246793806552887,
1.8871461153030396,
0.08196062594652176,
-0.8933899402618408,
0.3041619658470154,
-0.7785840630531311,
1.8739720582962036,
1.621910572052002,
1.3757967948913574,
-0.10627394169569016,
-0.9408037662506104,
0.6478604674339294,
-0.30753231048583984,
-0.4071030020713806,
0.9105076789855957,
0.3900161385536194,
-0.2813436686992645,
-1.4309883117675781,
0.7082305550575256,
1.2167614698410034,
-0.7691237330436707,
-0.7947277426719666,
0.07077451795339584,
-0.8092191219329834,
1.2495713233947754,
0.6750320792198181,
0.3174148499965668,
0.26785093545913696,
1.6828879117965698,
0.7513843774795532,
-0.5941275358200073,
0.5800131559371948,
0.469350665807724,
-0.13456380367279053,
-1.957296371459961,
-1.0909459590911865,
0.26174843311309814,
-0.39964044094085693,
-1.5180137157440186,
1.471652865409851,
-1.2434182167053223,
-0.9601107239723206,
0.5453106760978699,
0.15263433754444122,
1.3660808801651,
0.23679524660110474,
1.7455639839172363,
1.9692810773849487,
0.9414299726486206,
0.46060511469841003,
1.1208152770996094,
-0.25110089778900146,
-0.24572546780109406,
1.6806479692459106,
-0.4964803457260132,
0.6679815649986267,
1.0107367038726807,
-0.4506833851337433,
-1.2442587614059448,
-0.8183228373527527,
-1.200264811515808,
-0.7904139757156372,
1.0143368244171143,
0.09679819643497467,
-1.1413053274154663,
0.320115864276886,
1.6634045839309692,
0.03358854725956917,
-0.14667977392673492,
0.7103880643844604,
0.3383483290672302,
-0.6683127284049988,
-0.08028611540794373,
-1.0570485591888428,
0.5973326563835144,
-0.28737083077430725,
-0.3801726698875427,
0.2047303318977356,
0.5554800629615784,
1.1913219690322876,
0.20576658844947815,
0.02333347499370575,
1.3325653076171875,
-1.3899894952774048,
1.2119070291519165,
-1.0299503803253174,
0.35822463035583496,
-2.324814796447754,
1.488551139831543,
-0.9501252770423889,
1.9315510988235474,
-2.6770341396331787,
0.5324046015739441,
-0.48245540261268616,
-0.5341969728469849,
0.17169639468193054,
-0.18908905982971191,
0.10281519591808319,
-0.018579358235001564,
-1.0834283828735352,
-0.1685216873884201,
-0.861258327960968,
0.5290850400924683,
1.2595670223236084,
1.3216938972473145,
-0.9184198975563049,
-0.30127179622650146,
-1.631508708000183,
-0.19331854581832886,
-0.5039442181587219,
0.1794920563697815,
-1.81037437915802,
-0.16823703050613403,
-2.0525801181793213,
-2.455592393875122,
-1.3162089586257935,
-1.004813551902771,
1.2890037298202515,
0.15489178895950317,
-0.972292423248291,
1.1440799236297607,
-0.4454418420791626,
-1.7436153888702393,
1.2243382930755615,
-2.2524678707122803
] |
https://github.com/huggingface/datasets/issues/5387
|
Missing documentation page : improve-performance
|
Hi! Our documentation builder does not support links to sections, hence the bug. This is the link it should point to https://huggingface.co/docs/datasets/v2.8.0/en/cache#improve-performance.
|
### Describe the bug
Trying to access https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/cache#improve-performance, the page is missing.
The link is in here : https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset.keep_in_memory
### Steps to reproduce the bug
Access the page and see it's missing.
### Expected behavior
Not missing page
### Environment info
Doesn't matter
| 362 | 22 |
Missing documentation page : improve-performance
### Describe the bug
Trying to access https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/cache#improve-performance, the page is missing.
The link is in here : https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset.keep_in_memory
### Steps to reproduce the bug
Access the page and see it's missing.
### Expected behavior
Not missing page
### Environment info
Doesn't matter
Hi! Our documentation builder does not support links to sections, hence the bug. This is the link it should point to https://huggingface.co/docs/datasets/v2.8.0/en/cache#improve-performance.
|
[
-1.1014243364334106,
-0.9106428623199463,
-0.7939819097518921,
1.4811865091323853,
-0.051111478358507156,
-1.3317861557006836,
0.023666583001613617,
-0.8950523734092712,
1.5431022644042969,
-0.7251619696617126,
0.16005802154541016,
-1.662352204322815,
-0.09296072274446487,
-0.5701299905776978,
-0.6375985145568848,
-0.8370427489280701,
-0.4175737798213959,
-0.7685209512710571,
1.0169329643249512,
2.5818660259246826,
1.2469948530197144,
-1.2240182161331177,
2.755140781402588,
0.6967225074768066,
-0.28859102725982666,
-1.0683643817901611,
0.5057648420333862,
0.022897325456142426,
-1.325747013092041,
-0.4584963321685791,
-0.9259495139122009,
0.09119777381420135,
-0.4222466051578522,
-0.39003294706344604,
0.13950029015541077,
0.4041256904602051,
-0.29667535424232483,
-0.30202972888946533,
-0.6516796350479126,
-0.708217203617096,
0.29368719458580017,
-0.3990052342414856,
0.9534832239151001,
-0.4396498501300812,
1.8120059967041016,
-0.48923343420028687,
0.3911171555519104,
0.6482499241828918,
1.3028634786605835,
0.018774572759866714,
0.06367530673742294,
0.23217788338661194,
0.3577927350997925,
0.019000504165887833,
0.5379465818405151,
1.1611078977584839,
0.5655137300491333,
0.43599119782447815,
0.5070376992225647,
-2.234635591506958,
1.380453109741211,
-0.8113207817077637,
0.1597176343202591,
1.5492650270462036,
-1.0492072105407715,
0.37507131695747375,
-1.7272852659225464,
-0.0634404644370079,
0.6051759123802185,
-2.4144279956817627,
0.14908328652381897,
-1.1649702787399292,
-0.5902056097984314,
0.9689081907272339,
0.4094056189060211,
-1.213881254196167,
0.05012768507003784,
-0.5197461843490601,
0.9714409112930298,
0.5481075644493103,
1.1286647319793701,
-1.6362735033035278,
-0.059092115610837936,
-0.12447188049554825,
-0.056496378034353256,
-1.3501845598220825,
-1.607708215713501,
0.510158121585846,
0.7407292127609253,
0.7676510810852051,
0.018912523984909058,
0.8702347874641418,
-0.9324138164520264,
0.7838874459266663,
-0.7971631288528442,
-1.7871010303497314,
-1.3723517656326294,
-2.5274007320404053,
-2.3057663440704346,
0.7957821488380432,
-0.38995280861854553,
-0.4996337890625,
2.040877342224121,
-1.0029492378234863,
-1.7884924411773682,
1.1368842124938965,
0.2163974642753601,
0.14819225668907166,
2.4785568714141846,
0.33103838562965393,
-0.7305207848548889,
0.3941247761249542,
-0.651364803314209,
0.8156288266181946,
-0.5031121373176575,
1.303877592086792,
0.4287266731262207,
-1.0071691274642944,
1.5718506574630737,
-0.3998432755470276,
0.5275864601135254,
-0.732438862323761,
-0.4012536108493805,
-0.833962619304657,
0.21973787248134613,
1.8451050519943237,
-0.38903266191482544,
1.6100311279296875,
-0.3435838520526886,
-1.4712612628936768,
-1.5804189443588257,
0.7799764275550842,
0.4325416684150696,
-0.7990860939025879,
0.13401567935943604,
-0.42662835121154785,
0.10022953897714615,
-0.04366973042488098,
1.098101019859314,
1.2048063278198242,
0.48401448130607605,
-0.3482856750488281,
-0.9082514047622681,
0.3761838972568512,
-0.10595137625932693,
-0.6676620244979858,
-1.7840086221694946,
-0.27994006872177124,
0.2220587432384491,
0.5156988501548767,
-1.3020713329315186,
1.7125345468521118,
0.7886175513267517,
2.0587117671966553,
0.9483650922775269,
-0.3319016695022583,
1.4233653545379639,
0.058515600860118866,
1.9083703756332397,
-0.5383553504943848,
0.6632978916168213,
-0.2953632175922394,
-1.1018162965774536,
0.8087033629417419,
-0.44767308235168457,
-1.9134695529937744,
-0.8064407110214233,
-1.0086047649383545,
-0.22104522585868835,
-0.6307284235954285,
0.9785740375518799,
-0.28426966071128845,
-1.241416335105896,
0.057984136044979095,
-0.7542237043380737,
0.15439990162849426,
-1.3553378582000732,
0.13174933195114136,
0.9222425818443298,
-0.6010493636131287,
-0.08115951716899872,
-0.28078192472457886,
-1.3346329927444458,
-0.4293968975543976,
0.4784002900123596,
1.9439047574996948,
-0.6331474184989929,
0.9713536500930786,
0.8861128091812134,
-0.7258281111717224,
0.1445201337337494,
0.31506431102752686,
-0.3541819751262665,
0.8222026228904724,
-1.0987889766693115,
-0.32273074984550476,
1.19938325881958,
-0.28560376167297363,
-0.8747684359550476,
1.504825234413147,
0.8043643236160278,
-1.1185370683670044,
-0.28180280327796936,
-0.11143326759338379,
-0.7972164154052734,
0.011077276431024075,
-1.6898356676101685,
-0.14750202000141144,
0.19941741228103638,
-1.5273501873016357,
-0.5239325761795044,
-0.1999020129442215,
1.3719325065612793,
-0.13857290148735046,
1.4826781749725342,
-0.27404338121414185,
-0.23580802977085114,
-0.40422749519348145,
-0.5624955296516418,
0.12565603852272034,
-0.1797446608543396,
-0.5070874691009521,
0.3130059540271759,
-0.9172883033752441,
0.3127032518386841,
1.4439398050308228,
0.35134848952293396,
0.15703293681144714,
0.6579638123512268,
0.8800347447395325,
0.39387935400009155,
-0.17695772647857666,
-0.9456748962402344,
-1.6617605686187744,
2.0424258708953857,
-1.2719690799713135,
1.9700819253921509,
0.8428566455841064,
-0.13022182881832123,
-1.7512680292129517,
-1.9809448719024658,
1.3377394676208496,
1.121323823928833,
2.236137628555298,
0.5105336308479309,
0.4862686097621918,
-0.7376337051391602,
-0.8355469703674316,
0.21253515779972076,
-0.9538585543632507,
-0.7244143486022949,
0.0647178441286087,
2.3138556480407715,
1.821117639541626,
-0.3888925015926361,
-0.26878443360328674,
-1.0504196882247925,
1.2427750825881958,
-0.2143106907606125,
0.22790145874023438,
2.034550666809082,
-0.25225701928138733,
-0.8040119409561157,
1.2699896097183228,
-2.2950422763824463,
0.32911086082458496,
2.0397419929504395,
0.17034755647182465,
0.10791750997304916,
-1.5450005531311035,
-0.7135074138641357,
-0.29216083884239197,
-0.31033316254615784,
-1.2113145589828491,
0.5746375918388367,
-0.34617936611175537,
-0.988360583782196,
-1.4865025281906128,
0.09820619970560074,
-1.0771372318267822,
-1.7614797353744507,
0.3175731897354126,
1.9586035013198853,
1.9619618654251099,
-0.8179104328155518,
1.3698092699050903,
-0.0413445420563221,
0.033560119569301605,
1.319673776626587,
1.2305735349655151,
3.089989185333252,
2.032046318054199,
-1.2960115671157837,
0.8726143836975098,
-0.037811774760484695,
-0.35742270946502686,
1.2008676528930664,
-1.1418037414550781,
1.1115199327468872,
-0.2988833785057068,
-1.3944848775863647,
-1.3569008111953735,
1.058374047279358,
0.4971913993358612,
-0.04415352642536163,
-0.5588045716285706,
1.4228217601776123,
-0.014042492024600506,
1.2777460813522339,
0.5744315385818481,
-0.4670584499835968,
0.5583311915397644,
-0.40782690048217773,
-0.5432820320129395,
1.6024705171585083,
0.2221885621547699,
-1.5822205543518066,
-2.236609935760498,
-0.32708436250686646,
-0.8859432935714722,
-0.13863010704517365,
-0.6957964897155762,
-0.9776079654693604,
1.619488000869751,
0.5260083079338074,
-1.1047413349151611,
-0.4116339087486267,
-0.23335956037044525,
-0.5912430286407471,
2.72282338142395,
-1.4260942935943604,
-0.16574925184249878,
-1.082587718963623,
-0.4455951452255249,
1.6709994077682495,
-1.2986829280853271,
-0.15984997153282166,
-1.0483516454696655,
-0.7459646463394165,
-1.1677258014678955,
-0.4639584422111511,
0.003063422627747059,
-0.8992929458618164,
0.7643763422966003,
-0.0009524142369627953,
-1.0801461935043335,
-0.13543741405010223,
-0.9363346695899963,
1.0422829389572144,
-0.12125431001186371,
0.19083385169506073,
1.845295786857605,
0.37895622849464417,
-0.5079843997955322,
0.6868360638618469,
1.2553043365478516,
0.5829023718833923,
-0.8052530288696289,
0.15535086393356323,
-0.6228442788124084,
0.30556052923202515,
-1.4190720319747925,
0.22001273930072784,
-2.8912737369537354,
0.5990555286407471,
-0.2022659182548523,
-0.16461192071437836,
0.005870829336345196,
-1.1554774045944214,
1.190243124961853,
2.4153854846954346,
-1.2740087509155273,
0.5567086338996887,
0.38371625542640686,
1.1765620708465576,
-1.5885987281799316,
0.4279656410217285,
-0.46498939394950867,
2.0257036685943604,
0.1319969743490219,
1.1378713846206665,
-0.4421888291835785,
-2.0256731510162354,
0.7238991260528564,
-1.2582875490188599,
-0.8686268925666809,
0.7514780759811401,
-0.8754821419715881,
0.25246989727020264,
-1.4274673461914062,
-0.07060964405536652,
-0.7605198621749878,
-1.3712300062179565,
0.6616458892822266,
0.06135914474725723,
0.40376245975494385,
-0.522373378276825,
0.3037388026714325,
-2.1195201873779297,
-1.3917138576507568,
-0.16559068858623505,
-1.0102344751358032,
0.41815629601478577,
-0.37677061557769775,
0.665041983127594,
-0.16258923709392548,
0.12595270574092865,
0.2425268143415451,
1.2495931386947632,
3.4541409015655518,
0.13995377719402313,
0.26845595240592957,
-0.06926948577165604,
-1.0161471366882324,
1.4777295589447021,
1.0217758417129517,
-0.05976581573486328,
-0.5708913803100586,
-0.9892210364341736,
1.3977406024932861,
2.0590274333953857,
1.146114468574524,
0.20293691754341125,
-0.8938271403312683,
-0.7659741044044495,
0.04758422076702118,
0.2056722342967987,
0.5896235108375549,
0.9021770358085632,
-0.06080852821469307,
0.10821885615587234,
1.4530514478683472,
1.2920279502868652,
-0.2608753442764282,
0.4478696286678314,
-0.9402540922164917,
-0.41182488203048706,
0.3278997242450714,
0.4186389446258545,
0.013658418320119381,
0.4610728919506073,
-1.09425687789917,
-0.23805254697799683,
-0.322271466255188,
-0.8397471904754639,
-0.7126030921936035,
-0.35641729831695557,
-0.3633895516395569,
1.60443115234375,
0.14376206696033478,
-0.45026642084121704,
0.03636307641863823,
-0.686493992805481,
-0.09281305968761444,
-1.0455548763275146,
0.27082550525665283,
-0.11136619001626968,
0.003405357711017132,
-0.04970718175172806,
1.7646424770355225,
-1.103534460067749,
-2.300807237625122,
0.16444920003414154,
0.2288609892129898,
-0.35983631014823914,
0.1597134917974472,
1.7038413286209106,
0.5469309687614441,
1.397376537322998,
1.3939164876937866,
1.0467848777770996,
-0.7269810438156128,
-1.3009320497512817,
0.651012659072876,
0.9838648438453674,
-1.4391889572143555,
0.8716773390769958,
-0.2207372486591339,
-0.5486754179000854,
0.7341466546058655,
1.3361831903457642,
0.4639826714992523,
-1.8383467197418213,
0.9097896218299866,
-0.8986369371414185,
0.8896636366844177,
0.7708840370178223,
0.8130314350128174,
0.2776454985141754,
0.7967557311058044,
-1.3115283250808716,
-1.1748502254486084,
-0.8008626103401184,
-0.542823851108551,
1.862923502922058,
-0.2970028221607208,
0.498445063829422,
-0.09623391181230545,
-1.2347642183303833,
-0.06270943582057953,
0.7701097130775452,
0.28140708804130554,
-0.31275811791419983,
0.9229481220245361,
-0.6226253509521484,
-1.0591031312942505,
-1.3446494340896606,
-0.5143677592277527,
-1.010216474533081,
-0.796021580696106,
1.102589726448059,
0.7355315089225769,
0.45533493161201477,
1.8584798574447632,
0.4768999218940735,
0.3766423165798187,
-2.684577703475952,
0.9849451184272766,
0.255350798368454,
0.14376406371593475,
0.8883314728736877,
0.2217354029417038,
1.1924688816070557,
0.00008288677781820297,
0.49541178345680237,
-2.231468439102173,
2.2118847370147705,
-0.2622811198234558,
0.6163929104804993,
0.10443137586116791,
-0.08813995867967606,
1.110156536102295,
0.5303689241409302,
0.6525128483772278,
-1.186488151550293,
0.8375850319862366,
-0.5091319680213928,
1.1375117301940918,
0.889667272567749,
-0.8771647810935974,
0.06576230376958847,
1.3963048458099365,
0.5196479558944702,
-0.5474758744239807,
-0.9223551154136658,
-0.9237851500511169,
0.9184342622756958,
1.6610081195831299,
0.03636440262198448,
0.04636562615633011,
0.9697368144989014,
0.5434357523918152,
-1.190986156463623,
0.08123528957366943,
-0.6843219995498657,
-0.5204735994338989,
1.63249933719635,
2.057318687438965,
-0.06053224578499794,
-0.12228447198867798,
-0.6971228122711182,
-1.172421932220459,
0.5486136078834534,
-0.08198463171720505,
0.009063095785677433,
0.8638321757316589,
-0.6128939390182495,
1.0941048860549927,
0.5038910508155823,
1.009229302406311,
-0.14917141199111938,
0.33941882848739624,
0.44562557339668274,
-0.3677047789096832,
-1.2610424757003784,
-0.3432224690914154,
-1.0660786628723145,
-2.451838493347168,
0.44645461440086365,
-0.36902499198913574,
-1.4033637046813965,
0.08109796792268753,
-1.1708155870437622,
0.9502815008163452,
-0.5267707109451294,
-1.0646060705184937,
-1.4178664684295654,
0.14399173855781555,
-0.34616798162460327,
0.8366647958755493,
-1.5914702415466309,
-0.24670083820819855,
1.37246572971344,
0.7980697154998779,
-0.6860328912734985,
1.0761706829071045,
0.1626431941986084,
1.0198956727981567,
0.6702225804328918,
-0.2634616792201996,
0.41236281394958496,
0.18520371615886688,
-1.4360579252243042,
0.4754727780818939,
1.1483889818191528,
0.1621772199869156,
1.3852134943008423,
-0.5460478663444519,
0.10657914727926254,
0.5418935418128967,
-0.44795432686805725,
-0.5053468346595764,
-0.4478498697280884,
0.7998880743980408,
0.04546815901994705,
-0.9509705305099487,
-0.042843278497457504,
-0.20992892980575562,
-0.21980524063110352,
0.10429522395133972,
-1.5738091468811035,
-0.23677954077720642,
-0.2856634557247162,
-0.5171591639518738,
-1.3423988819122314,
0.12027467042207718,
1.2991666793823242,
-0.8723520040512085,
-0.2661983072757721,
0.504903256893158,
0.30474844574928284,
0.5820582509040833,
0.5612912178039551,
-0.6286280155181885,
-0.1730818897485733,
-0.3399462103843689,
-0.24805498123168945,
0.3761358857154846,
1.2873400449752808,
-0.12571874260902405,
-1.062044382095337,
0.6582072973251343,
-0.4752156734466553,
0.1360587179660797,
2.120086908340454,
-0.01141018234193325,
-0.8237228393554688,
0.31354737281799316,
-0.6643472909927368,
1.8676683902740479,
1.5796754360198975,
1.3860955238342285,
-0.09312564134597778,
-0.8643615245819092,
0.6042107343673706,
-0.05127407982945442,
-0.33079713582992554,
0.9256245493888855,
0.445012629032135,
-0.2928740680217743,
-1.3462363481521606,
0.42869624495506287,
1.2054234743118286,
-0.948884904384613,
-0.822185754776001,
0.1683514267206192,
-0.9579846262931824,
1.117624282836914,
0.6436972618103027,
0.33772486448287964,
0.1709340214729309,
1.5010548830032349,
0.652591347694397,
-0.6443817615509033,
0.39338117837905884,
0.4769984185695648,
-0.24434354901313782,
-1.9115787744522095,
-0.7473146319389343,
0.3592841625213623,
-0.3901752531528473,
-1.5439825057983398,
1.289371371269226,
-1.152250051498413,
-0.8655341267585754,
0.3899824619293213,
0.22487428784370422,
1.4193170070648193,
0.24830736219882965,
1.713179111480713,
2.1037425994873047,
0.9383010268211365,
0.2697318196296692,
1.3329273462295532,
-0.13791906833648682,
-0.4497952163219452,
1.7032887935638428,
-0.4220842719078064,
0.4913710653781891,
0.9849231839179993,
-0.5410040020942688,
-1.099000096321106,
-0.709213137626648,
-1.0202840566635132,
-0.5172342658042908,
1.1924490928649902,
0.21413441002368927,
-1.1528234481811523,
0.08434794098138809,
1.3863722085952759,
0.28227606415748596,
-0.20795173943042755,
0.620479941368103,
0.5267786979675293,
-0.7375347018241882,
-0.06548625230789185,
-0.8166200518608093,
0.5601138472557068,
-0.09721183031797409,
-0.3002500534057617,
0.31556305289268494,
0.45331335067749023,
1.305516004562378,
-0.07747083902359009,
0.19886432588100433,
1.285922646522522,
-1.3299400806427002,
1.550614833831787,
-0.554847776889801,
0.1606471836566925,
-2.467710256576538,
1.4171603918075562,
-0.7308517098426819,
1.8057798147201538,
-2.623983144760132,
0.3961239755153656,
-0.6402260065078735,
-0.41601189970970154,
0.26999107003211975,
-0.36119717359542847,
0.04704241082072258,
-0.2170688956975937,
-1.10800302028656,
-0.08551859855651855,
-0.7485243678092957,
0.5828588008880615,
1.2584619522094727,
1.39031982421875,
-1.1051626205444336,
-0.22476337850093842,
-1.878332495689392,
-0.19747956097126007,
-0.8544546365737915,
0.4146830439567566,
-2.00105357170105,
-0.13547319173812866,
-1.9369747638702393,
-2.445342779159546,
-1.5020902156829834,
-0.8183767795562744,
1.0451457500457764,
0.2344631552696228,
-0.9500094652175903,
1.2262650728225708,
-0.227255180478096,
-1.7191671133041382,
0.9700033068656921,
-2.2494397163391113
] |
https://github.com/huggingface/datasets/issues/5386
|
`max_shard_size` in `datasets.push_to_hub()` breaks with large files
|
Hi!
This behavior stems from the fact that we don't always embed image bytes in the underlying arrow table, which can lead to bad size estimation (we use the first 1000 table rows to [estimate](https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L4627) the external file size). We plan to address this in the next major release by always embedding external bytes. In the meantime, you can either shuffle the dataset with `.shuffle().flatten_indices()` to make the estimation more precise or embed the bytes in the table like so:
```python
from datasets.table import embed_table_storage
format = ds.format
ds = ds.with_format("arrow")
ds = ds.map(embed_table_storage, batched=True)
ds = ds.with_format(**format)
...
ds.push_to_hub(...)
```
|
### Describe the bug
`max_shard_size` parameter for `datasets.push_to_hub()` works unreliably with large files, generating shard files that are way past the specified limit.
In my private dataset, which contains unprocessed images of all sizes (up to `~100MB` per file), I've encountered cases where `max_shard_size='100MB'` results in shard files that are `>2GB` in size. Setting `max_shard_size` to another value, such as `1GB` or `500MB` does not fix this problem.
**The real problem is this:** When the shard file size grows too big, the entire dataset breaks because of #4721 and ultimately https://issues.apache.org/jira/browse/ARROW-5030. Since `max_shard_size` does not let one accurately control the size of the shard files, it becomes very easy to build a large dataset without any warnings that it will be broken -- even when you think you are mitigating this problem by setting `max_shard_size`.
```
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/builder.py", line 1763, in _prepare_split_single
for _, table in generator:
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
```
### Steps to reproduce the bug
1. Clone [example repo](https://github.com/salieri/hf-dataset-shard-size-bug)
2. Follow steps in [README.md](https://github.com/salieri/hf-dataset-shard-size-bug/blob/main/README.md)
3. After uploading the dataset, you will see that the shard file size varies between `30MB` and `200MB` -- way beyond the `max_shard_size='75MB'` limit (example: `train-00003-of-00131...` is `155MB` in [here](https://huggingface.co/datasets/slri/shard-size-test/tree/main/data))
(Note that this example repo does not generate shard files that are so large that they would trigger #4721)
### Expected behavior
The shard file size should remain below or equal to `max_shard_size`.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.10.157-139.675.amzn2.aarch64-aarch64-with-glibc2.17
- Python version: 3.7.15
- PyArrow version: 10.0.1
- Pandas version: 1.3.5
| 363 | 101 |
`max_shard_size` in `datasets.push_to_hub()` breaks with large files
### Describe the bug
`max_shard_size` parameter for `datasets.push_to_hub()` works unreliably with large files, generating shard files that are way past the specified limit.
In my private dataset, which contains unprocessed images of all sizes (up to `~100MB` per file), I've encountered cases where `max_shard_size='100MB'` results in shard files that are `>2GB` in size. Setting `max_shard_size` to another value, such as `1GB` or `500MB` does not fix this problem.
**The real problem is this:** When the shard file size grows too big, the entire dataset breaks because of #4721 and ultimately https://issues.apache.org/jira/browse/ARROW-5030. Since `max_shard_size` does not let one accurately control the size of the shard files, it becomes very easy to build a large dataset without any warnings that it will be broken -- even when you think you are mitigating this problem by setting `max_shard_size`.
```
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/builder.py", line 1763, in _prepare_split_single
for _, table in generator:
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
```
### Steps to reproduce the bug
1. Clone [example repo](https://github.com/salieri/hf-dataset-shard-size-bug)
2. Follow steps in [README.md](https://github.com/salieri/hf-dataset-shard-size-bug/blob/main/README.md)
3. After uploading the dataset, you will see that the shard file size varies between `30MB` and `200MB` -- way beyond the `max_shard_size='75MB'` limit (example: `train-00003-of-00131...` is `155MB` in [here](https://huggingface.co/datasets/slri/shard-size-test/tree/main/data))
(Note that this example repo does not generate shard files that are so large that they would trigger #4721)
### Expected behavior
The shard file size should remain below or equal to `max_shard_size`.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.10.157-139.675.amzn2.aarch64-aarch64-with-glibc2.17
- Python version: 3.7.15
- PyArrow version: 10.0.1
- Pandas version: 1.3.5
Hi!
This behavior stems from the fact that we don't always embed image bytes in the underlying arrow table, which can lead to bad size estimation (we use the first 1000 table rows to [estimate](https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L4627) the external file size). We plan to address this in the next major release by always embedding external bytes. In the meantime, you can either shuffle the dataset with `.shuffle().flatten_indices()` to make the estimation more precise or embed the bytes in the table like so:
```python
from datasets.table import embed_table_storage
format = ds.format
ds = ds.with_format("arrow")
ds = ds.map(embed_table_storage, batched=True)
ds = ds.with_format(**format)
...
ds.push_to_hub(...)
```
|
[
-1.1633338928222656,
-0.8149734735488892,
-0.7043008804321289,
1.434211254119873,
-0.09023202210664749,
-1.3169342279434204,
0.18928304314613342,
-1.1059308052062988,
1.6641753911972046,
-0.8078272342681885,
0.33024078607559204,
-1.6406126022338867,
0.01942853070795536,
-0.6141484379768372,
-0.7303051352500916,
-0.862147331237793,
-0.4290657043457031,
-0.8428320288658142,
1.04645836353302,
2.4277918338775635,
1.3267371654510498,
-1.3447366952896118,
2.6662633419036865,
0.7042413353919983,
-0.3159795105457306,
-1.0553606748580933,
0.4863179624080658,
-0.023264575749635696,
-1.2695322036743164,
-0.5297951698303223,
-0.879250705242157,
-0.08532107621431351,
-0.6060061454772949,
-0.5112707614898682,
0.06405442208051682,
0.5365256667137146,
-0.23809261620044708,
-0.3656364381313324,
-0.6021418571472168,
-0.7374148368835449,
0.5448088049888611,
-0.38487932085990906,
0.9619422554969788,
-0.3805404305458069,
1.803013801574707,
-0.6783772110939026,
0.47046875953674316,
0.7777677178382874,
1.343596339225769,
0.12886673212051392,
0.007661951705813408,
0.22853833436965942,
0.3429621756076813,
-0.052785709500312805,
0.5012176632881165,
1.193981647491455,
0.6836750507354736,
0.5495531558990479,
0.6637581586837769,
-2.233883857727051,
1.3211450576782227,
-1.012373685836792,
0.24263814091682434,
1.2912427186965942,
-0.9443382024765015,
0.33403223752975464,
-1.7821755409240723,
-0.0682787224650383,
0.6079059839248657,
-2.2589118480682373,
0.2673654854297638,
-1.314847707748413,
-0.5517765283584595,
0.9678076505661011,
0.3296188712120056,
-1.2484588623046875,
0.15024621784687042,
-0.41745612025260925,
1.0424007177352905,
0.4840838611125946,
1.061943531036377,
-1.656991958618164,
-0.0073088775388896465,
-0.22253453731536865,
0.04802143573760986,
-1.25153648853302,
-1.5914417505264282,
0.5647607445716858,
0.6319280862808228,
0.5435805320739746,
-0.16812868416309357,
1.0543948411941528,
-1.0496795177459717,
0.8006665110588074,
-1.0074772834777832,
-1.689915657043457,
-1.3762564659118652,
-2.327547788619995,
-2.2681074142456055,
0.797963559627533,
-0.5173174142837524,
-0.5165385007858276,
2.0763602256774902,
-1.026915192604065,
-1.73624849319458,
1.0752335786819458,
0.2390984296798706,
0.06333310157060623,
2.3280205726623535,
0.17679399251937866,
-0.7108446955680847,
0.3907129168510437,
-0.7528231739997864,
0.8371437191963196,
-0.4330710172653198,
1.330930233001709,
0.40432652831077576,
-1.083927035331726,
1.6146632432937622,
-0.434588223695755,
0.587356686592102,
-0.6828186511993408,
-0.46972182393074036,
-0.8230485916137695,
0.32962456345558167,
1.8889262676239014,
-0.34805870056152344,
1.4516328573226929,
-0.28073233366012573,
-1.5635336637496948,
-1.512022852897644,
0.8616324663162231,
0.45781615376472473,
-0.7970036864280701,
0.09172581881284714,
-0.4435386061668396,
0.22912202775478363,
-0.06627517938613892,
1.1557493209838867,
1.1649466753005981,
0.7904065847396851,
-0.3736473321914673,
-0.8027315735816956,
0.22811172902584076,
-0.07142692059278488,
-0.7068971395492554,
-1.814772367477417,
-0.36353591084480286,
0.21873711049556732,
0.5972506403923035,
-1.1348825693130493,
1.9182547330856323,
0.8884514570236206,
2.0338292121887207,
0.9568161964416504,
-0.4151275157928467,
1.5376288890838623,
0.02873324044048786,
1.9339783191680908,
-0.4252416491508484,
0.6240537762641907,
-0.4086366593837738,
-1.1964718103408813,
0.8849149942398071,
-0.318996787071228,
-1.9766902923583984,
-0.732460618019104,
-0.757988691329956,
-0.22472336888313293,
-0.7608020901679993,
0.9146093130111694,
-0.30922481417655945,
-1.3494733572006226,
0.1089022159576416,
-0.6168621778488159,
0.14221948385238647,
-1.2556344270706177,
0.2723369896411896,
0.7325155735015869,
-0.6573333144187927,
0.058808065950870514,
-0.3293793201446533,
-1.2707692384719849,
-0.5613731741905212,
0.2744773030281067,
1.9125491380691528,
-0.6576241254806519,
0.9888114929199219,
1.0437664985656738,
-0.6960117220878601,
0.010898826643824577,
0.3171570599079132,
-0.33846017718315125,
0.7521218657493591,
-1.0888793468475342,
-0.4644891321659088,
1.2073609828948975,
-0.21890190243721008,
-0.6811206340789795,
1.4590983390808105,
0.7079272866249084,
-1.0302629470825195,
-0.2345033437013626,
-0.21108807623386383,
-0.8548624515533447,
0.10763611644506454,
-1.5607974529266357,
-0.10678976029157639,
0.4867617189884186,
-1.437157392501831,
-0.3608032166957855,
-0.16277556121349335,
1.2922770977020264,
-0.1976516842842102,
1.4373546838760376,
-0.31303709745407104,
-0.2093934714794159,
-0.31953999400138855,
-0.43939459323883057,
0.13825155794620514,
-0.1364222913980484,
-0.6789308190345764,
0.2271670252084732,
-0.7885651588439941,
0.3408104479312897,
1.4874205589294434,
0.2761502265930176,
0.025463348254561424,
0.44907256960868835,
1.1572473049163818,
0.28605079650878906,
-0.0515117347240448,
-0.9510674476623535,
-1.4980617761611938,
2.045903205871582,
-1.4215306043624878,
1.9466239213943481,
0.8222628235816956,
-0.03451738506555557,
-1.804633378982544,
-1.804545521736145,
1.327466368675232,
1.1546099185943604,
2.335069179534912,
0.5552219152450562,
0.4174574315547943,
-0.8167353868484497,
-0.7059664726257324,
0.3653336763381958,
-1.0129268169403076,
-0.6536633968353271,
0.17908704280853271,
2.3844170570373535,
1.804933786392212,
-0.46781617403030396,
-0.2063053995370865,
-0.9602758288383484,
1.315467119216919,
-0.2693628966808319,
0.3027758300304413,
2.0586624145507812,
-0.31102755665779114,
-1.0068665742874146,
1.2264362573623657,
-2.3796520233154297,
0.22796930372714996,
2.065969467163086,
0.28514254093170166,
0.14277496933937073,
-1.3980015516281128,
-0.5248213410377502,
-0.3092828392982483,
-0.3945775628089905,
-1.2531962394714355,
0.6068479418754578,
-0.22622157633304596,
-0.7857083678245544,
-1.3703871965408325,
0.19595018029212952,
-1.1595253944396973,
-1.7175558805465698,
0.25096988677978516,
1.9480222463607788,
2.0630078315734863,
-0.7491186857223511,
1.4673539400100708,
-0.28743696212768555,
0.07726958394050598,
1.241011381149292,
1.2727545499801636,
3.05216121673584,
1.87113356590271,
-1.329089641571045,
0.6304680109024048,
-0.2455982267856598,
-0.4481232762336731,
1.131207823753357,
-1.0840524435043335,
1.155452847480774,
-0.19771496951580048,
-1.2351679801940918,
-1.2875758409500122,
1.035544991493225,
0.4566236138343811,
0.08631320297718048,
-0.5009068846702576,
1.2500998973846436,
0.1431230902671814,
1.3600083589553833,
0.6312549114227295,
-0.43032053112983704,
0.5801957845687866,
-0.29294416308403015,
-0.5406241416931152,
1.5984022617340088,
0.23067736625671387,
-1.447059154510498,
-2.2742362022399902,
-0.1965259462594986,
-0.9704050421714783,
0.0425015464425087,
-0.637706458568573,
-1.0155925750732422,
1.5801682472229004,
0.36566582322120667,
-1.3135979175567627,
-0.26706594228744507,
-0.28406915068626404,
-0.5987975597381592,
2.694873332977295,
-1.322817087173462,
-0.17604774236679077,
-0.9961907863616943,
-0.6017616391181946,
1.6562002897262573,
-1.2269864082336426,
-0.2037341147661209,
-0.9951854944229126,
-0.5067980289459229,
-1.2090122699737549,
-0.5677787661552429,
0.04722995311021805,
-0.8631631731987,
0.8271467089653015,
0.19894477725028992,
-1.223667025566101,
-0.362909734249115,
-0.9048154354095459,
0.9568013548851013,
-0.14360369741916656,
0.25151294469833374,
1.822562336921692,
0.3732963800430298,
-0.3605114221572876,
0.7799890637397766,
1.129330039024353,
0.6396018266677856,
-0.5884889364242554,
0.1471140831708908,
-0.7168160676956177,
0.3032817542552948,
-1.3229801654815674,
0.31102773547172546,
-2.899785280227661,
0.6958683133125305,
-0.15952086448669434,
-0.08660808205604553,
-0.0804227888584137,
-1.3971998691558838,
1.01244056224823,
2.5941503047943115,
-1.1721806526184082,
0.533604621887207,
0.3399590849876404,
1.1912283897399902,
-1.59363853931427,
0.2996442914009094,
-0.4631809592247009,
2.1429214477539062,
0.16391029953956604,
1.2547273635864258,
-0.48376235365867615,
-2.3015296459198,
0.6108750104904175,
-1.2705318927764893,
-1.094667673110962,
0.7951440811157227,
-0.8489434719085693,
0.0892506018280983,
-1.4248278141021729,
-0.2546626031398773,
-0.8882608413696289,
-1.2515729665756226,
0.7796425819396973,
0.11401692032814026,
0.47353777289390564,
-0.6346592903137207,
0.2921517491340637,
-2.165459156036377,
-1.3618557453155518,
-0.26948702335357666,
-0.9393230676651001,
0.4972878396511078,
-0.33854272961616516,
0.6827054619789124,
-0.07393110543489456,
0.02351280488073826,
0.37131547927856445,
1.5074058771133423,
3.439723491668701,
0.19748158752918243,
0.31442487239837646,
-0.19931331276893616,
-0.9310409426689148,
1.409024715423584,
0.8719812035560608,
-0.13833655416965485,
-0.5790889859199524,
-1.0207597017288208,
1.2801766395568848,
1.9372674226760864,
0.9888922572135925,
0.07260593771934509,
-0.8740434646606445,
-0.8104604482650757,
-0.06407362967729568,
0.1327795386314392,
0.49379923939704895,
0.8438966274261475,
0.08466878533363342,
0.09113804996013641,
1.3290330171585083,
1.1924245357513428,
-0.35970160365104675,
0.3743319809436798,
-0.9000826478004456,
-0.35393884778022766,
0.5181108117103577,
0.2520940899848938,
0.09488355368375778,
0.3091757297515869,
-0.9732534289360046,
-0.2919929027557373,
-0.3446013629436493,
-0.8763601779937744,
-0.834117591381073,
-0.4444962441921234,
-0.39616331458091736,
1.6443946361541748,
0.08861590921878815,
-0.5337514877319336,
0.06844893842935562,
-0.6825055480003357,
-0.16018454730510712,
-1.138960838317871,
0.13663716614246368,
-0.12060655653476715,
-0.1269272416830063,
-0.10957341641187668,
1.7424778938293457,
-1.0034719705581665,
-2.079591989517212,
0.27547314763069153,
0.2392507940530777,
-0.35235702991485596,
0.16901972889900208,
1.7798205614089966,
0.5112857818603516,
1.4315142631530762,
1.3663033246994019,
1.0491129159927368,
-0.6873119473457336,
-1.228461503982544,
0.7086726427078247,
0.9502817392349243,
-1.3972197771072388,
0.8385593891143799,
-0.0093889394775033,
-0.46474578976631165,
0.722342848777771,
1.2808955907821655,
0.4419477880001068,
-2.07869815826416,
0.8726598620414734,
-0.9855879545211792,
0.7330700159072876,
0.7492951154708862,
0.7479455471038818,
0.24790892004966736,
0.8055292963981628,
-1.1842882633209229,
-1.1640708446502686,
-0.7074151039123535,
-0.6288596391677856,
1.9178513288497925,
-0.2725641429424286,
0.557410478591919,
-0.12913300096988678,
-1.3358618021011353,
-0.10046785324811935,
0.7641030550003052,
0.39460062980651855,
-0.42183831334114075,
0.7860206365585327,
-0.7454602718353271,
-1.01143217086792,
-1.35137939453125,
-0.44660499691963196,
-1.0791194438934326,
-0.923593282699585,
1.041568636894226,
0.8215511441230774,
0.4304939806461334,
1.84428071975708,
0.6630984544754028,
0.3169984817504883,
-2.606123685836792,
0.8942967653274536,
0.28109341859817505,
-0.09210367500782013,
0.8522976636886597,
0.3912135660648346,
1.0851818323135376,
-0.023508941754698753,
0.5503526926040649,
-2.4341371059417725,
2.3282418251037598,
-0.2621772885322571,
0.6373858451843262,
0.014167843386530876,
-0.268696665763855,
1.1436972618103027,
0.5324973464012146,
0.5347532629966736,
-1.1490318775177002,
0.7183598875999451,
-0.6066527962684631,
1.1704124212265015,
0.8875026702880859,
-0.8677483201026917,
0.08706457167863846,
1.3777157068252563,
0.4461554288864136,
-0.5869191288948059,
-0.9025736451148987,
-0.9162521958351135,
0.9351739883422852,
1.7347509860992432,
-0.060419291257858276,
-0.03323410451412201,
0.8924895524978638,
0.5985720157623291,
-1.157488226890564,
0.14416661858558655,
-0.7176586389541626,
-0.7752134799957275,
1.6201800107955933,
2.0008769035339355,
-0.20773212611675262,
-0.13798364996910095,
-0.8345802426338196,
-1.1961668729782104,
0.8209049105644226,
-0.05151393264532089,
-0.0272048432379961,
0.6327722072601318,
-0.6200569868087769,
1.0831407308578491,
0.8651492595672607,
0.9722291827201843,
0.13294005393981934,
0.30205395817756653,
0.35588759183883667,
-0.40411242842674255,
-1.0146476030349731,
-0.21694663166999817,
-1.082207202911377,
-2.5658950805664062,
0.468429833650589,
-0.2671871483325958,
-1.4418656826019287,
-0.055704228579998016,
-1.0594408512115479,
0.8732467889785767,
-0.5714519619941711,
-1.1175838708877563,
-1.4306128025054932,
0.2844795882701874,
-0.10985817015171051,
0.9048281311988831,
-1.6611279249191284,
-0.15715143084526062,
1.2094935178756714,
0.8214446306228638,
-0.6571090221405029,
0.966213047504425,
0.2073407620191574,
0.9766267538070679,
0.8800266981124878,
-0.3384745717048645,
0.5645415186882019,
0.04683481901884079,
-1.3836028575897217,
0.39233896136283875,
1.1741206645965576,
0.13757915794849396,
1.370847225189209,
-0.4751923680305481,
0.06403328478336334,
0.341290146112442,
-0.5446470975875854,
-0.5424651503562927,
-0.4750466048717499,
0.7179719805717468,
0.06437843292951584,
-0.9755929708480835,
0.009747516363859177,
-0.08116377145051956,
-0.2475508153438568,
0.1815769076347351,
-1.4800885915756226,
-0.2532130777835846,
-0.30772092938423157,
-0.5105933547019958,
-1.284530520439148,
-0.039243195205926895,
1.407807469367981,
-0.6984924674034119,
-0.25462692975997925,
0.4738968014717102,
0.35731375217437744,
0.5511003732681274,
0.5867097973823547,
-0.7280901074409485,
-0.3418937921524048,
-0.23259055614471436,
-0.2967478632926941,
0.30825772881507874,
1.3774142265319824,
-0.017646877095103264,
-0.9127824306488037,
0.637782871723175,
-0.3771207928657532,
0.13712209463119507,
1.9993321895599365,
0.19299612939357758,
-0.7906123399734497,
0.3196478486061096,
-0.7315886616706848,
1.8215924501419067,
1.7830760478973389,
1.2553503513336182,
-0.04349905252456665,
-0.9384739398956299,
0.6272526383399963,
-0.38085639476776123,
-0.3979582190513611,
0.8743160367012024,
0.3475738763809204,
-0.26723361015319824,
-1.450971245765686,
0.6699519157409668,
1.324625015258789,
-0.7699884176254272,
-0.8302858471870422,
0.11223527789115906,
-0.8361386060714722,
1.1796036958694458,
0.6022756695747375,
0.39829349517822266,
0.21603158116340637,
1.5483386516571045,
0.7879444360733032,
-0.4362252950668335,
0.5685203075408936,
0.45958787202835083,
-0.18737587332725525,
-2.1424736976623535,
-1.1803780794143677,
0.29509925842285156,
-0.3919542729854584,
-1.5983946323394775,
1.4738036394119263,
-1.1894532442092896,
-0.9914287328720093,
0.5735291242599487,
0.14971569180488586,
1.3969438076019287,
0.3696712553501129,
1.5698301792144775,
2.085055351257324,
0.8247146606445312,
0.39461374282836914,
1.3136041164398193,
-0.14950333535671234,
-0.505098819732666,
1.7977697849273682,
-0.5172234177589417,
0.4639343023300171,
1.0482009649276733,
-0.3237454891204834,
-1.1621453762054443,
-0.787075936794281,
-1.2296303510665894,
-0.6426791548728943,
1.1901848316192627,
0.0855937972664833,
-1.1077301502227783,
0.33537745475769043,
1.6045175790786743,
0.07494620233774185,
-0.26483234763145447,
0.6393520832061768,
0.43058064579963684,
-0.8098252415657043,
-0.006074332632124424,
-0.8793485760688782,
0.5595583319664001,
-0.16682377457618713,
-0.27803391218185425,
0.38901543617248535,
0.51317298412323,
1.3052507638931274,
-0.08411424607038498,
0.10756265372037888,
1.108969807624817,
-1.444973349571228,
1.4522740840911865,
-0.650615930557251,
0.31765490770339966,
-2.4117608070373535,
1.3790793418884277,
-0.7337858080863953,
1.9351900815963745,
-2.5519039630889893,
0.3791079521179199,
-0.5361144542694092,
-0.48881685733795166,
0.2490772008895874,
-0.3424531817436218,
0.08115587383508682,
-0.1736227571964264,
-1.0943784713745117,
-0.0765560045838356,
-0.7498239874839783,
0.6091855764389038,
1.1148210763931274,
1.4337313175201416,
-1.1327316761016846,
-0.27132049202919006,
-1.7143744230270386,
-0.05770881474018097,
-0.671614944934845,
0.2924928069114685,
-1.9379962682724,
-0.13549655675888062,
-1.9843419790267944,
-2.29618501663208,
-1.352099061012268,
-0.8010653257369995,
1.0623955726623535,
0.17634634673595428,
-0.89415043592453,
1.183412790298462,
-0.3540312647819519,
-1.872057318687439,
1.0215989351272583,
-2.174342393875122
] |
https://github.com/huggingface/datasets/issues/5385
|
Is `fs=` deprecated in `load_from_disk()` as well?
|
Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
|
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
| 364 | 17 |
Is `fs=` deprecated in `load_from_disk()` as well?
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
|
[
-1.1008424758911133,
-0.8759396076202393,
-0.7833763957023621,
1.4252301454544067,
-0.1309547871351242,
-1.2820782661437988,
0.19362300634384155,
-0.9829559922218323,
1.6879687309265137,
-0.769312858581543,
0.26621225476264954,
-1.6562386751174927,
-0.031870193779468536,
-0.6464866399765015,
-0.7132326364517212,
-0.8664259910583496,
-0.32661423087120056,
-0.7699978947639465,
0.9593308568000793,
2.5397348403930664,
1.1930309534072876,
-1.3321986198425293,
2.7389423847198486,
0.5819355249404907,
-0.3083798289299011,
-0.9060847759246826,
0.44758495688438416,
-0.01630142144858837,
-1.1355968713760376,
-0.42494726181030273,
-0.976449728012085,
0.050644855946302414,
-0.5082181096076965,
-0.5621988773345947,
0.11835899204015732,
0.3896472454071045,
-0.3311399817466736,
-0.3874532878398895,
-0.5629587173461914,
-0.7347057461738586,
0.41159817576408386,
-0.30925312638282776,
0.9851372241973877,
-0.3546917140483856,
1.9021130800247192,
-0.566701352596283,
0.29694658517837524,
0.7206556797027588,
1.402910828590393,
0.10133726894855499,
0.04832970350980759,
0.35329172015190125,
0.24411770701408386,
-0.04772620275616646,
0.4906180500984192,
1.196812629699707,
0.5810019373893738,
0.5328902006149292,
0.7404996752738953,
-2.1630799770355225,
1.3151910305023193,
-0.9735963344573975,
0.21190357208251953,
1.3153183460235596,
-0.9755833148956299,
0.44448909163475037,
-1.793218731880188,
-0.08115175366401672,
0.5065063834190369,
-2.3222522735595703,
0.2598307430744171,
-1.3023945093154907,
-0.5585280060768127,
0.965582549571991,
0.18281243741512299,
-1.2458713054656982,
0.18728648126125336,
-0.5432507991790771,
1.1210778951644897,
0.5395216345787048,
1.1584888696670532,
-1.752254605293274,
-0.05680256336927414,
-0.22364775836467743,
0.06683845072984695,
-1.4332633018493652,
-1.6372029781341553,
0.5889551043510437,
0.7114875912666321,
0.7231451272964478,
-0.06524646282196045,
1.012184500694275,
-0.9469636082649231,
0.79215407371521,
-0.8664409518241882,
-1.6553988456726074,
-1.3893022537231445,
-2.242579460144043,
-2.310859441757202,
0.7443486452102661,
-0.4901670515537262,
-0.503756046295166,
1.977224588394165,
-0.9812020063400269,
-1.816706895828247,
1.1304816007614136,
0.3713206648826599,
-0.059485480189323425,
2.384711503982544,
0.31653261184692383,
-0.7096807956695557,
0.3656340539455414,
-0.6615667939186096,
0.8304992914199829,
-0.5170658826828003,
1.2834373712539673,
0.5823369026184082,
-1.0252575874328613,
1.6087160110473633,
-0.4993208944797516,
0.5928593873977661,
-0.7011305093765259,
-0.4943751096725464,
-0.8906765580177307,
0.3551216423511505,
1.9228700399398804,
-0.40598925948143005,
1.5947835445404053,
-0.43324196338653564,
-1.572263479232788,
-1.5694307088851929,
0.8347577452659607,
0.4442829489707947,
-0.7894089221954346,
0.18652689456939697,
-0.43199220299720764,
0.08057550340890884,
-0.04012276604771614,
1.0656707286834717,
1.153930902481079,
0.5648594498634338,
-0.25437936186790466,
-0.8173893094062805,
0.3740844428539276,
-0.08599057793617249,
-0.6207908987998962,
-1.8357832431793213,
-0.3564409017562866,
0.2782495319843292,
0.5774378180503845,
-1.1836209297180176,
1.7644598484039307,
0.7973766922950745,
1.941253900527954,
1.0219894647598267,
-0.295357882976532,
1.5315500497817993,
0.037813812494277954,
1.90384042263031,
-0.5168638825416565,
0.6478158235549927,
-0.2667490243911743,
-1.1885775327682495,
0.8220719695091248,
-0.4299560785293579,
-2.015634059906006,
-0.7748898863792419,
-0.8242003917694092,
-0.15448316931724548,
-0.7989556193351746,
0.8150902986526489,
-0.3216051161289215,
-1.4407857656478882,
0.2346780002117157,
-0.6649602651596069,
0.16490992903709412,
-1.2680851221084595,
0.2846401333808899,
0.8006890416145325,
-0.6482576131820679,
-0.03109825775027275,
-0.2266683131456375,
-1.3262687921524048,
-0.40676435828208923,
0.32673555612564087,
1.9590210914611816,
-0.6912496089935303,
0.8819538354873657,
0.9129682183265686,
-0.7434771060943604,
0.0911916047334671,
0.28394973278045654,
-0.3604699373245239,
0.7854708433151245,
-1.1149623394012451,
-0.3221006989479065,
1.2116268873214722,
-0.19273586571216583,
-0.6247828006744385,
1.3758865594863892,
0.8709132075309753,
-1.0570088624954224,
-0.20658311247825623,
-0.2685862183570862,
-0.7770342826843262,
-0.06838317960500717,
-1.635908842086792,
-0.12450461834669113,
0.3038853108882904,
-1.2815921306610107,
-0.48491281270980835,
-0.25506818294525146,
1.292338490486145,
-0.260571151971817,
1.4483338594436646,
-0.3391537368297577,
-0.2531190514564514,
-0.39578258991241455,
-0.4633621871471405,
0.17269890010356903,
-0.27269110083580017,
-0.645426869392395,
0.19790466129779816,
-0.7090774774551392,
0.358398973941803,
1.4303945302963257,
0.40750542283058167,
0.0987473651766777,
0.5742039084434509,
1.149430274963379,
0.33793002367019653,
-0.11320046335458755,
-0.862396240234375,
-1.5411376953125,
2.01779842376709,
-1.3480210304260254,
1.9552702903747559,
0.7168906331062317,
-0.0036208024248480797,
-1.7981535196304321,
-1.94429349899292,
1.317676067352295,
1.2689096927642822,
2.292731523513794,
0.5221371054649353,
0.3968433737754822,
-0.7188398838043213,
-0.7747772336006165,
0.2850440740585327,
-1.0312849283218384,
-0.7011938691139221,
0.1460714489221573,
2.3742377758026123,
1.7670786380767822,
-0.5839969515800476,
-0.24539145827293396,
-1.035797119140625,
1.316735029220581,
-0.26704829931259155,
0.1493091732263565,
2.0735883712768555,
-0.3126683235168457,
-1.0055025815963745,
1.3120613098144531,
-2.3329505920410156,
0.17728300392627716,
1.9716298580169678,
0.1879628449678421,
0.06722597032785416,
-1.3402267694473267,
-0.6658962368965149,
-0.31242603063583374,
-0.3395669758319855,
-1.2279022932052612,
0.49178728461265564,
-0.2873634099960327,
-0.7802276611328125,
-1.4450509548187256,
0.16666993498802185,
-1.0925357341766357,
-1.6283687353134155,
0.25990012288093567,
1.9180797338485718,
1.9458634853363037,
-0.8336902260780334,
1.4251444339752197,
-0.23818036913871765,
0.12171626836061478,
1.399632453918457,
1.2999379634857178,
3.216959238052368,
1.8640803098678589,
-1.2744464874267578,
0.7459821105003357,
-0.10892033576965332,
-0.5811370611190796,
1.2057666778564453,
-1.1310150623321533,
1.15462327003479,
-0.16854648292064667,
-1.2421059608459473,
-1.2880322933197021,
0.9063381552696228,
0.5453959107398987,
0.09862793982028961,
-0.5101960897445679,
1.2730731964111328,
0.04330616444349289,
1.3391733169555664,
0.6579683423042297,
-0.4728104770183563,
0.592431902885437,
-0.35996779799461365,
-0.46178916096687317,
1.5840227603912354,
0.23785248398780823,
-1.4397507905960083,
-2.318477153778076,
-0.30116260051727295,
-0.7904887795448303,
-0.08135372400283813,
-0.681053102016449,
-1.0371760129928589,
1.643641471862793,
0.41949084401130676,
-1.188576340675354,
-0.308970183134079,
-0.2832014262676239,
-0.523339033126831,
2.6206648349761963,
-1.4905918836593628,
-0.16719917953014374,
-1.046557068824768,
-0.45080485939979553,
1.6288148164749146,
-1.120651125907898,
-0.3043260872364044,
-1.0505943298339844,
-0.658677875995636,
-1.3298792839050293,
-0.5547330379486084,
-0.10029984265565872,
-0.8121393322944641,
0.7004283666610718,
0.15645158290863037,
-1.1259392499923706,
-0.2859630286693573,
-0.9590423703193665,
0.9236472249031067,
-0.23093803226947784,
0.2549629807472229,
1.8463306427001953,
0.48440036177635193,
-0.42953312397003174,
0.7562459707260132,
1.185544490814209,
0.5280247926712036,
-0.7331609725952148,
0.1951574683189392,
-0.8125234246253967,
0.2698330283164978,
-1.4066808223724365,
0.2713519036769867,
-2.909947633743286,
0.6538823246955872,
-0.1509937196969986,
-0.15945014357566833,
-0.01294395886361599,
-1.3125035762786865,
1.099774956703186,
2.645733118057251,
-1.2044923305511475,
0.46972596645355225,
0.34858939051628113,
1.268920660018921,
-1.6437381505966187,
0.2638402283191681,
-0.3454875648021698,
2.1021676063537598,
0.14908979833126068,
1.299979567527771,
-0.4924793839454651,
-2.173367977142334,
0.48677918314933777,
-1.195734977722168,
-1.1025288105010986,
0.881301999092102,
-0.8045187592506409,
0.15399309992790222,
-1.4270728826522827,
-0.19700203835964203,
-0.7773963809013367,
-1.326737880706787,
0.7364179491996765,
0.00038511957973241806,
0.4460808038711548,
-0.4906714856624603,
0.37392890453338623,
-2.0585403442382812,
-1.3174093961715698,
-0.1948174685239792,
-1.0407335758209229,
0.4975557029247284,
-0.2312454730272293,
0.6899389028549194,
-0.10192165523767471,
0.09619026631116867,
0.2527110278606415,
1.4345433712005615,
3.3997795581817627,
0.28795501589775085,
0.3717704713344574,
-0.11703458428382874,
-0.8738484382629395,
1.3797523975372314,
0.903497040271759,
-0.13584691286087036,
-0.5171646475791931,
-0.9486238360404968,
1.2654653787612915,
1.9561450481414795,
1.077707052230835,
0.07758886367082596,
-0.775400698184967,
-0.7222013473510742,
-0.010751273483037949,
0.1765528917312622,
0.4558727741241455,
0.9232347011566162,
0.05960538983345032,
0.110322505235672,
1.2940655946731567,
1.2425942420959473,
-0.5047634840011597,
0.5303739309310913,
-0.9139965772628784,
-0.3976491391658783,
0.4213106632232666,
0.23127350211143494,
-0.007951108738780022,
0.3997303247451782,
-0.9957306385040283,
-0.2997940480709076,
-0.40354275703430176,
-0.8851589560508728,
-0.7800415754318237,
-0.4317626357078552,
-0.3548988103866577,
1.6264100074768066,
0.07462635636329651,
-0.46632060408592224,
-0.012456626631319523,
-0.776452362537384,
-0.0969557985663414,
-1.0095360279083252,
0.23127232491970062,
-0.0810452550649643,
-0.10017769038677216,
-0.004436422139406204,
1.6853132247924805,
-1.018383502960205,
-2.0860509872436523,
0.1981883943080902,
0.2521037757396698,
-0.35269448161125183,
0.16055989265441895,
1.6841751337051392,
0.4632437527179718,
1.4268909692764282,
1.3040858507156372,
1.0514312982559204,
-0.7543662190437317,
-1.2398462295532227,
0.7385314106941223,
0.9137184023857117,
-1.4213725328445435,
0.8279463052749634,
-0.028413642197847366,
-0.5615358352661133,
0.7306739687919617,
1.2603833675384521,
0.4442187249660492,
-1.9862111806869507,
0.7790203094482422,
-0.9448404312133789,
0.6943069100379944,
0.7088263630867004,
0.7947821021080017,
0.32996833324432373,
0.9653420448303223,
-1.2621299028396606,
-1.172766089439392,
-0.779526948928833,
-0.6114938259124756,
1.9382555484771729,
-0.23637764155864716,
0.5016704797744751,
-0.148019477725029,
-1.2997990846633911,
-0.05876480042934418,
0.8298105001449585,
0.4141693115234375,
-0.446567565202713,
0.9078951478004456,
-0.6834195852279663,
-0.8853113651275635,
-1.3894851207733154,
-0.5360037684440613,
-1.0396479368209839,
-0.9948905110359192,
1.044938564300537,
0.9109074473381042,
0.2874099314212799,
1.8354451656341553,
0.6088542342185974,
0.29992061853408813,
-2.6134917736053467,
0.9026667475700378,
0.2379341423511505,
-0.04405103623867035,
0.8542656898498535,
0.2930178642272949,
1.1966729164123535,
-0.015543894842267036,
0.52199786901474,
-2.353167772293091,
2.1541693210601807,
-0.18570354580879211,
0.6537358164787292,
-0.036657076328992844,
-0.2494707852602005,
1.1173137426376343,
0.40895718336105347,
0.5729213953018188,
-1.1822478771209717,
0.7659454345703125,
-0.5395240783691406,
1.1261663436889648,
0.9337502717971802,
-1.0007920265197754,
0.06584057956933975,
1.4193052053451538,
0.44705119729042053,
-0.5129743814468384,
-0.9527941346168518,
-0.8737367987632751,
0.9632640480995178,
1.6083108186721802,
-0.039418675005435944,
-0.017467204481363297,
0.8923290967941284,
0.6656285524368286,
-1.347442626953125,
0.2153102159500122,
-0.6699821949005127,
-0.7445022463798523,
1.7210419178009033,
1.9842877388000488,
-0.07306323200464249,
-0.23826433718204498,
-0.7741363048553467,
-1.1663562059402466,
0.7000963091850281,
0.10084614157676697,
0.11601708084344864,
0.6341872215270996,
-0.7347733974456787,
1.1625910997390747,
0.8105219602584839,
0.9765448570251465,
0.044359467923641205,
0.3562544882297516,
0.3902260959148407,
-0.365071564912796,
-1.1857491731643677,
-0.2979721128940582,
-1.1617710590362549,
-2.4869468212127686,
0.5286656618118286,
-0.29228997230529785,
-1.479282259941101,
0.11502831429243088,
-1.0383496284484863,
0.885668933391571,
-0.6887574791908264,
-1.1444975137710571,
-1.5916022062301636,
0.34455859661102295,
-0.18446074426174164,
0.8977029919624329,
-1.594109058380127,
-0.129618838429451,
1.2324182987213135,
0.885248601436615,
-0.569622278213501,
0.9905837178230286,
0.2145942598581314,
1.0526357889175415,
0.8745190501213074,
-0.32679638266563416,
0.45366472005844116,
0.1587281972169876,
-1.3771249055862427,
0.5253265500068665,
1.2794954776763916,
0.23694607615470886,
1.548863410949707,
-0.5282663702964783,
0.1042165756225586,
0.47807422280311584,
-0.5028601884841919,
-0.5632566809654236,
-0.5387360453605652,
0.7142987251281738,
0.0660765990614891,
-0.9803292155265808,
0.03278461843729019,
-0.1406378597021103,
-0.35447779297828674,
0.20786908268928528,
-1.5399267673492432,
-0.24685047566890717,
-0.3085910975933075,
-0.5962505340576172,
-1.2202872037887573,
0.08534403890371323,
1.3618069887161255,
-0.7692739367485046,
-0.24958592653274536,
0.4630739986896515,
0.4922848641872406,
0.5039530992507935,
0.5820791125297546,
-0.5999299883842468,
-0.265698105096817,
-0.36084461212158203,
-0.3061866760253906,
0.2247769832611084,
1.2045313119888306,
-0.13718639314174652,
-1.0693846940994263,
0.7055880427360535,
-0.46609801054000854,
0.001341068185865879,
1.97783625125885,
0.09095335751771927,
-0.7903864979743958,
0.26201316714286804,
-0.715680718421936,
1.9071519374847412,
1.7263975143432617,
1.3773326873779297,
-0.023296615108847618,
-1.0071626901626587,
0.7138285040855408,
-0.1771855354309082,
-0.22172801196575165,
1.060864806175232,
0.41778793931007385,
-0.22988015413284302,
-1.4041255712509155,
0.5951414108276367,
1.313472032546997,
-0.8963297605514526,
-0.7832577228546143,
0.012739579193294048,
-0.9039877653121948,
1.0963574647903442,
0.6922773718833923,
0.2447246015071869,
0.20895327627658844,
1.646304965019226,
0.6801936030387878,
-0.45765992999076843,
0.5702852606773376,
0.535754382610321,
-0.18923112750053406,
-2.0841002464294434,
-0.9893764853477478,
0.3133630156517029,
-0.3442518711090088,
-1.5512551069259644,
1.3213059902191162,
-1.1007667779922485,
-0.9174585342407227,
0.5297129154205322,
0.15594051778316498,
1.4656552076339722,
0.23719333112239838,
1.587543249130249,
2.065514087677002,
0.8585559725761414,
0.17171083390712738,
1.2466799020767212,
-0.07760574668645859,
-0.3743095099925995,
1.8004342317581177,
-0.4601353406906128,
0.5069116353988647,
0.9702835083007812,
-0.48988693952560425,
-1.2221887111663818,
-0.7505959868431091,
-1.14583158493042,
-0.6477847099304199,
1.2199063301086426,
0.09829460084438324,
-1.0535167455673218,
0.1704091876745224,
1.640334129333496,
0.11779079586267471,
-0.32632380723953247,
0.6696373820304871,
0.5131577849388123,
-0.7264360785484314,
-0.056971341371536255,
-0.8949097990989685,
0.4918632209300995,
-0.04377342388033867,
-0.23910096287727356,
0.30988943576812744,
0.5911592245101929,
1.2359586954116821,
0.011567414738237858,
0.11590611189603806,
1.2193870544433594,
-1.3855465650558472,
1.4700614213943481,
-0.6363475322723389,
0.21958479285240173,
-2.4856863021850586,
1.4308334589004517,
-0.7593441009521484,
1.9061079025268555,
-2.536545991897583,
0.4201958477497101,
-0.6721684336662292,
-0.38318145275115967,
0.3234364986419678,
-0.3701258897781372,
0.19780085980892181,
-0.16506488621234894,
-0.9911519885063171,
-0.16263121366500854,
-0.8244360089302063,
0.6435027718544006,
1.1552947759628296,
1.3360270261764526,
-1.1308677196502686,
-0.2662340998649597,
-1.717681884765625,
-0.21713805198669434,
-0.7794281244277954,
0.30523210763931274,
-1.9890731573104858,
-0.14683310687541962,
-2.0073952674865723,
-2.396798849105835,
-1.3814862966537476,
-0.7626135349273682,
1.0065871477127075,
0.17266546189785004,
-0.9684633612632751,
1.212597370147705,
-0.3350560963153839,
-1.8002023696899414,
1.113642930984497,
-2.1516637802124023
] |
https://github.com/huggingface/datasets/issues/5385
|
Is `fs=` deprecated in `load_from_disk()` as well?
|
> Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
Yeah I can do that sometime next week. Should the storage_options be a new arg here? I’ll look around for anywhere else where fs is an arg.
|
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
| 364 | 45 |
Is `fs=` deprecated in `load_from_disk()` as well?
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
> Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
Yeah I can do that sometime next week. Should the storage_options be a new arg here? I’ll look around for anywhere else where fs is an arg.
|
[
-1.125098705291748,
-0.8834214210510254,
-0.7604483366012573,
1.4321540594100952,
-0.13877306878566742,
-1.2583807706832886,
0.16905181109905243,
-1.0252035856246948,
1.65404212474823,
-0.7715718150138855,
0.27621519565582275,
-1.647864818572998,
-0.040658678859472275,
-0.6162246465682983,
-0.6825021505355835,
-0.8851215243339539,
-0.3508831858634949,
-0.8165144920349121,
0.9652661085128784,
2.5391948223114014,
1.1726890802383423,
-1.3500540256500244,
2.728497266769409,
0.5902203321456909,
-0.2913951873779297,
-0.9605811834335327,
0.4720754027366638,
-0.030556395649909973,
-1.1486639976501465,
-0.40768277645111084,
-0.9686049222946167,
0.038231976330280304,
-0.5236870646476746,
-0.5684228539466858,
0.10129032284021378,
0.38019996881484985,
-0.29466336965560913,
-0.38808661699295044,
-0.5343161225318909,
-0.7289925813674927,
0.42482900619506836,
-0.342975378036499,
0.9763209819793701,
-0.3553810715675354,
1.8964297771453857,
-0.5494747757911682,
0.33586663007736206,
0.7193102836608887,
1.3878591060638428,
0.1273822784423828,
0.0554124191403389,
0.33244723081588745,
0.25629377365112305,
-0.07337990403175354,
0.5118219256401062,
1.1834827661514282,
0.5855661630630493,
0.5092228055000305,
0.7458814382553101,
-2.156748056411743,
1.2947551012039185,
-0.9423499703407288,
0.23709872364997864,
1.331472635269165,
-0.9616309404373169,
0.4574770927429199,
-1.7795398235321045,
-0.06632886826992035,
0.5063775777816772,
-2.3061106204986572,
0.2219335287809372,
-1.2778234481811523,
-0.5480874180793762,
1.0190589427947998,
0.18365107476711273,
-1.2531068325042725,
0.18161000311374664,
-0.5393492579460144,
1.11085045337677,
0.5346730947494507,
1.1688342094421387,
-1.7275515794754028,
-0.06436924636363983,
-0.2469787746667862,
0.06751568615436554,
-1.4290101528167725,
-1.64457368850708,
0.5634204745292664,
0.7254437208175659,
0.6903786659240723,
-0.04977869987487793,
1.0140769481658936,
-0.9155287742614746,
0.8018622398376465,
-0.8899376392364502,
-1.67141592502594,
-1.4181746244430542,
-2.242814064025879,
-2.299130916595459,
0.7408736348152161,
-0.4981025457382202,
-0.4994199872016907,
1.9695477485656738,
-0.9776423573493958,
-1.799364686012268,
1.1408469676971436,
0.35789918899536133,
-0.06852858513593674,
2.3845996856689453,
0.32252317667007446,
-0.7117167711257935,
0.34229791164398193,
-0.6698766350746155,
0.8239647150039673,
-0.49914872646331787,
1.2756575345993042,
0.5586338639259338,
-1.026810646057129,
1.592318058013916,
-0.4881807565689087,
0.58524090051651,
-0.6771861910820007,
-0.5007110834121704,
-0.8864591121673584,
0.3608596920967102,
1.9267172813415527,
-0.3917132019996643,
1.6160908937454224,
-0.425456166267395,
-1.6098192930221558,
-1.5768228769302368,
0.8089481592178345,
0.43910908699035645,
-0.8029183745384216,
0.20834368467330933,
-0.40872180461883545,
0.06785857677459717,
-0.023512987419962883,
1.0765101909637451,
1.1946911811828613,
0.5751299262046814,
-0.23909425735473633,
-0.8463019132614136,
0.3463749885559082,
-0.09803362190723419,
-0.6508461236953735,
-1.8114051818847656,
-0.36914151906967163,
0.2482108622789383,
0.5694088935852051,
-1.1701692342758179,
1.7591537237167358,
0.8303280472755432,
1.924652338027954,
1.047625184059143,
-0.32581591606140137,
1.541648030281067,
0.048055097460746765,
1.893343210220337,
-0.5032216310501099,
0.6499925851821899,
-0.26772797107696533,
-1.1852452754974365,
0.813100278377533,
-0.3989132046699524,
-2.0397450923919678,
-0.7519800662994385,
-0.8039982914924622,
-0.1354759931564331,
-0.7700092792510986,
0.802609384059906,
-0.2996709942817688,
-1.44286048412323,
0.24868528544902802,
-0.6638922691345215,
0.1695740520954132,
-1.2537152767181396,
0.3042749762535095,
0.8063135147094727,
-0.6486044526100159,
-0.023172542452812195,
-0.2390873283147812,
-1.304701566696167,
-0.41618895530700684,
0.2986948490142822,
1.93899405002594,
-0.7041382789611816,
0.863800585269928,
0.9407541155815125,
-0.7336137294769287,
0.08067173510789871,
0.2705814838409424,
-0.3487638235092163,
0.8117236495018005,
-1.1107227802276611,
-0.31168752908706665,
1.1858218908309937,
-0.1998731791973114,
-0.634026050567627,
1.3886834383010864,
0.8594931364059448,
-1.0667442083358765,
-0.21565473079681396,
-0.27798718214035034,
-0.7969802021980286,
-0.08168762177228928,
-1.6488906145095825,
-0.1347510814666748,
0.2952496409416199,
-1.342668890953064,
-0.5016628503799438,
-0.24100542068481445,
1.3075612783432007,
-0.22185449302196503,
1.4371424913406372,
-0.3541417121887207,
-0.23599503934383392,
-0.4176023602485657,
-0.46425169706344604,
0.22426289319992065,
-0.2831370234489441,
-0.6207450032234192,
0.22134988009929657,
-0.732169508934021,
0.339080274105072,
1.4276175498962402,
0.40283119678497314,
0.1125384196639061,
0.5388576984405518,
1.1482268571853638,
0.3464105725288391,
-0.10270713269710541,
-0.8323677182197571,
-1.5196290016174316,
2.04760479927063,
-1.3643707036972046,
1.9661203622817993,
0.7398194670677185,
-0.03121311217546463,
-1.7950671911239624,
-1.9353504180908203,
1.322036623954773,
1.2561663389205933,
2.2802231311798096,
0.5403344631195068,
0.42446696758270264,
-0.7225653529167175,
-0.7477876543998718,
0.2987710237503052,
-1.0308319330215454,
-0.7151057124137878,
0.10553612560033798,
2.363689661026001,
1.7755846977233887,
-0.6085291504859924,
-0.24663770198822021,
-1.0132205486297607,
1.3447186946868896,
-0.22850053012371063,
0.14263533055782318,
2.07049560546875,
-0.28227126598358154,
-1.0320793390274048,
1.321463704109192,
-2.353468656539917,
0.173199862241745,
1.9780728816986084,
0.1829039305448532,
0.06335218250751495,
-1.3219258785247803,
-0.6524089574813843,
-0.29385489225387573,
-0.364277720451355,
-1.2237029075622559,
0.4946054220199585,
-0.2708248496055603,
-0.7399243116378784,
-1.448810338973999,
0.14519408345222473,
-1.1266180276870728,
-1.6426507234573364,
0.25055962800979614,
1.9037679433822632,
1.9433437585830688,
-0.8398277163505554,
1.4508397579193115,
-0.2550922930240631,
0.12410758435726166,
1.3717511892318726,
1.3105393648147583,
3.212139129638672,
1.8919109106063843,
-1.2807668447494507,
0.7062325477600098,
-0.12369009107351303,
-0.5599474310874939,
1.1754558086395264,
-1.1361043453216553,
1.1820353269577026,
-0.15274180471897125,
-1.2575409412384033,
-1.2680950164794922,
0.9243030548095703,
0.5458498597145081,
0.07585401833057404,
-0.4976779818534851,
1.2656500339508057,
0.07202276587486267,
1.3490924835205078,
0.6081761717796326,
-0.4507448673248291,
0.6019896268844604,
-0.3852655291557312,
-0.4808259606361389,
1.579404354095459,
0.2256612628698349,
-1.4117165803909302,
-2.3152201175689697,
-0.32968568801879883,
-0.806110143661499,
-0.05696416646242142,
-0.700191855430603,
-1.0394548177719116,
1.6394957304000854,
0.4256046414375305,
-1.1842111349105835,
-0.34191668033599854,
-0.3056371212005615,
-0.5134367346763611,
2.637784481048584,
-1.4888288974761963,
-0.13278721272945404,
-1.017088532447815,
-0.467155396938324,
1.6080272197723389,
-1.137462854385376,
-0.3137066960334778,
-1.0525645017623901,
-0.6837912797927856,
-1.3079990148544312,
-0.5358144044876099,
-0.11124982684850693,
-0.8272612690925598,
0.6919028759002686,
0.20588506758213043,
-1.1097184419631958,
-0.2845049500465393,
-0.9667330384254456,
0.8987928628921509,
-0.20930293202400208,
0.2418733388185501,
1.8237193822860718,
0.4524730443954468,
-0.449043333530426,
0.7626294493675232,
1.1884962320327759,
0.5287832021713257,
-0.7139692306518555,
0.18896639347076416,
-0.7986651062965393,
0.26212555170059204,
-1.3892430067062378,
0.2488187700510025,
-2.946847915649414,
0.6631225943565369,
-0.13653729856014252,
-0.13326863944530487,
-0.013719344511628151,
-1.284888744354248,
1.1044886112213135,
2.6498911380767822,
-1.1725549697875977,
0.46268224716186523,
0.3613848090171814,
1.233157992362976,
-1.6321645975112915,
0.27744126319885254,
-0.341086208820343,
2.110168933868408,
0.1309378445148468,
1.3058998584747314,
-0.46919071674346924,
-2.2445261478424072,
0.4693334698677063,
-1.1828778982162476,
-1.1061705350875854,
0.872138500213623,
-0.8141465187072754,
0.12403494119644165,
-1.4275754690170288,
-0.19511929154396057,
-0.7745556235313416,
-1.2989692687988281,
0.7366053462028503,
0.01635928265750408,
0.46670883893966675,
-0.5290459394454956,
0.36330586671829224,
-2.0944736003875732,
-1.3421493768692017,
-0.20822666585445404,
-1.0120857954025269,
0.48646456003189087,
-0.2559555172920227,
0.6991889476776123,
-0.09437960386276245,
0.10324469953775406,
0.2587823271751404,
1.429575800895691,
3.386730432510376,
0.29179614782333374,
0.37455254793167114,
-0.10699370503425598,
-0.8873759508132935,
1.372850775718689,
0.8851457238197327,
-0.17496290802955627,
-0.5430017113685608,
-0.9788678884506226,
1.2636202573776245,
1.9557503461837769,
1.0749858617782593,
0.06875352561473846,
-0.7790024876594543,
-0.7068930268287659,
-0.005556469317525625,
0.20836889743804932,
0.481876015663147,
0.930889904499054,
0.05169528350234032,
0.09291213005781174,
1.3040647506713867,
1.2296664714813232,
-0.5062189102172852,
0.4906842112541199,
-0.9281907677650452,
-0.4114264249801636,
0.42346030473709106,
0.22256670892238617,
0.005217236466705799,
0.4106907248497009,
-0.9957762956619263,
-0.2757827639579773,
-0.37978655099868774,
-0.8792983889579773,
-0.7649710178375244,
-0.43611347675323486,
-0.350841224193573,
1.6387910842895508,
0.039623863995075226,
-0.4602665305137634,
-0.012608369812369347,
-0.7639620900154114,
-0.11735604703426361,
-1.0339680910110474,
0.2123340666294098,
-0.06929804384708405,
-0.0868043452501297,
-0.02101058140397072,
1.6962348222732544,
-0.9948399066925049,
-2.0817742347717285,
0.1981721818447113,
0.2588741183280945,
-0.35073375701904297,
0.1914714276790619,
1.7033753395080566,
0.4692080616950989,
1.4336130619049072,
1.3163851499557495,
1.0790271759033203,
-0.7719346880912781,
-1.2114219665527344,
0.7230970859527588,
0.923151969909668,
-1.4017482995986938,
0.8213258385658264,
-0.030366426333785057,
-0.5625762939453125,
0.7169283032417297,
1.2561883926391602,
0.4621097445487976,
-2.0065219402313232,
0.8429902195930481,
-0.950608491897583,
0.7140794992446899,
0.7260671854019165,
0.7764123678207397,
0.2750455141067505,
0.9486575126647949,
-1.2528935670852661,
-1.1766639947891235,
-0.7832510471343994,
-0.6185609698295593,
1.933444857597351,
-0.23892417550086975,
0.5131585597991943,
-0.15738698840141296,
-1.3117666244506836,
-0.06042925640940666,
0.8185471892356873,
0.4010011553764343,
-0.42996668815612793,
0.9095282554626465,
-0.6839233040809631,
-0.9031832814216614,
-1.3798696994781494,
-0.49725133180618286,
-1.066053032875061,
-0.9729135036468506,
1.051896572113037,
0.8949989676475525,
0.2831077575683594,
1.8426556587219238,
0.6136425733566284,
0.29937177896499634,
-2.621556282043457,
0.9181860685348511,
0.24424318969249725,
-0.0725870430469513,
0.8758766055107117,
0.2581285238265991,
1.1631578207015991,
-0.0020839287899434566,
0.5318877100944519,
-2.3532981872558594,
2.181105375289917,
-0.18470722436904907,
0.6728385090827942,
-0.029581181704998016,
-0.22848527133464813,
1.0864676237106323,
0.430692195892334,
0.6032103896141052,
-1.166421890258789,
0.7732455730438232,
-0.5549058318138123,
1.1295952796936035,
0.9273959994316101,
-0.9619779586791992,
0.05839637666940689,
1.3956128358840942,
0.43935638666152954,
-0.530602216720581,
-0.9464607238769531,
-0.8925440311431885,
0.9342201352119446,
1.6461431980133057,
-0.03497258573770523,
-0.022727612406015396,
0.8449432849884033,
0.6801517605781555,
-1.3739068508148193,
0.20168665051460266,
-0.6669058799743652,
-0.7408456206321716,
1.7054095268249512,
2.0174968242645264,
-0.08764278143644333,
-0.2364366054534912,
-0.7471477389335632,
-1.1792532205581665,
0.7045320272445679,
0.0943378433585167,
0.13474029302597046,
0.6311153769493103,
-0.7230337262153625,
1.1731915473937988,
0.8349285125732422,
0.9548078179359436,
0.07153631746768951,
0.31719398498535156,
0.3841230273246765,
-0.295457661151886,
-1.1720104217529297,
-0.293775737285614,
-1.1457024812698364,
-2.486264228820801,
0.5322703123092651,
-0.26644331216812134,
-1.4815483093261719,
0.06000570207834244,
-1.0092852115631104,
0.9073860049247742,
-0.6580736637115479,
-1.122644066810608,
-1.5963642597198486,
0.33467596769332886,
-0.15065933763980865,
0.9006919264793396,
-1.5940461158752441,
-0.10936177521944046,
1.2227556705474854,
0.9091429114341736,
-0.5876176953315735,
1.0091791152954102,
0.2310524880886078,
1.0429601669311523,
0.8866336941719055,
-0.347716748714447,
0.4649966359138489,
0.139650359749794,
-1.3803443908691406,
0.5074570775032043,
1.2677910327911377,
0.21580414474010468,
1.5135430097579956,
-0.5406144261360168,
0.0877721980214119,
0.4487994909286499,
-0.4899193048477173,
-0.5356321334838867,
-0.5723761320114136,
0.7013086080551147,
0.056772612035274506,
-0.9774368405342102,
0.025742553174495697,
-0.1452069729566574,
-0.33458125591278076,
0.20870645344257355,
-1.5395724773406982,
-0.25176581740379333,
-0.31909406185150146,
-0.5679279565811157,
-1.2270451784133911,
0.0748700201511383,
1.3755565881729126,
-0.7711945176124573,
-0.24464493989944458,
0.47186368703842163,
0.48877084255218506,
0.5036715269088745,
0.5748669505119324,
-0.6067972779273987,
-0.268726646900177,
-0.3675808310508728,
-0.29345703125,
0.2516617178916931,
1.2007043361663818,
-0.1309109628200531,
-1.0379726886749268,
0.7059590816497803,
-0.4421096444129944,
0.005966600030660629,
1.9650452136993408,
0.10875912755727768,
-0.793012261390686,
0.273065984249115,
-0.7203599810600281,
1.8954862356185913,
1.7199362516403198,
1.3849774599075317,
-0.03294799476861954,
-1.0240132808685303,
0.7213859558105469,
-0.21553818881511688,
-0.24920277297496796,
1.0613666772842407,
0.4292120933532715,
-0.2410295605659485,
-1.4029637575149536,
0.595015823841095,
1.2913243770599365,
-0.8687574863433838,
-0.7873558402061462,
0.007969126105308533,
-0.8773594498634338,
1.0943810939788818,
0.6924098134040833,
0.25215983390808105,
0.19330079853534698,
1.662864089012146,
0.713827908039093,
-0.44948339462280273,
0.5993003845214844,
0.5290212035179138,
-0.19507354497909546,
-2.066260814666748,
-1.0317269563674927,
0.30920088291168213,
-0.3733728528022766,
-1.5612939596176147,
1.3275423049926758,
-1.156921148300171,
-0.9313032627105713,
0.5167580842971802,
0.08245670795440674,
1.4543051719665527,
0.2898319363594055,
1.5938031673431396,
2.077012538909912,
0.895627498626709,
0.19457019865512848,
1.2343472242355347,
-0.08218321204185486,
-0.3541184663772583,
1.8118499517440796,
-0.44762104749679565,
0.47907477617263794,
1.0011743307113647,
-0.4486966133117676,
-1.1802433729171753,
-0.7609513998031616,
-1.1348356008529663,
-0.661977231502533,
1.1900215148925781,
0.08482382446527481,
-1.0547865629196167,
0.20925165712833405,
1.63967764377594,
0.0950155109167099,
-0.3414421081542969,
0.6752430200576782,
0.522594153881073,
-0.76424241065979,
-0.0715496838092804,
-0.9075081944465637,
0.47754907608032227,
-0.0739380419254303,
-0.26655399799346924,
0.3070942163467407,
0.5663524866104126,
1.2517238855361938,
0.025500420480966568,
0.13668663799762726,
1.2163326740264893,
-1.3917938470840454,
1.4610278606414795,
-0.6432154774665833,
0.21246764063835144,
-2.442492961883545,
1.4493999481201172,
-0.7485738396644592,
1.946101427078247,
-2.5384018421173096,
0.4409531354904175,
-0.6835672855377197,
-0.37952446937561035,
0.3371623158454895,
-0.3873273730278015,
0.18686635792255402,
-0.15941883623600006,
-1.0274745225906372,
-0.16334906220436096,
-0.8127844333648682,
0.6266629099845886,
1.1426640748977661,
1.332204818725586,
-1.1243174076080322,
-0.27257686853408813,
-1.6934396028518677,
-0.20268253982067108,
-0.7405415177345276,
0.3087899684906006,
-1.967538833618164,
-0.18178047239780426,
-2.0088300704956055,
-2.406493663787842,
-1.3733408451080322,
-0.7872645258903503,
1.0192691087722778,
0.17285068333148956,
-0.9525923132896423,
1.1913659572601318,
-0.3547956943511963,
-1.809903860092163,
1.1356375217437744,
-2.154179096221924
] |
https://github.com/huggingface/datasets/issues/5383
|
IterableDataset missing column_names, differs from Dataset interface
|
Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset.
|
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
| 365 | 23 |
IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset.
|
[
-1.1468578577041626,
-0.9682489633560181,
-0.7764684557914734,
1.501160740852356,
-0.1847407966852188,
-1.3009629249572754,
0.18761226534843445,
-1.0661351680755615,
1.805435061454773,
-0.8446510434150696,
0.3817614018917084,
-1.7188199758529663,
0.05701552331447601,
-0.5752741694450378,
-0.7814297676086426,
-0.8850469589233398,
-0.4757968485355377,
-0.8518816828727722,
0.9390832185745239,
2.519258975982666,
1.1417016983032227,
-1.304734706878662,
2.6355087757110596,
0.6262511610984802,
-0.16178590059280396,
-0.9878241419792175,
0.49584507942199707,
-0.05055420845746994,
-1.3192490339279175,
-0.5101354122161865,
-0.9052693247795105,
-0.13606469333171844,
-0.5221856236457825,
-0.6477976441383362,
0.07434941083192825,
0.45711803436279297,
-0.22201956808567047,
-0.43996068835258484,
-0.43526899814605713,
-0.8147478699684143,
0.45609185099601746,
-0.43917080760002136,
1.1125426292419434,
-0.42242130637168884,
1.9179435968399048,
-0.5169710516929626,
0.5425984263420105,
0.6934135556221008,
1.3889579772949219,
0.1966685950756073,
-0.024302300065755844,
0.22857877612113953,
0.4059877097606659,
0.0519893541932106,
0.39930135011672974,
0.9337979555130005,
0.64143967628479,
0.5813078880310059,
0.6707413196563721,
-2.20418643951416,
1.4088051319122314,
-1.0702342987060547,
0.29562342166900635,
1.3742488622665405,
-0.9797201752662659,
0.23276980221271515,
-1.7263845205307007,
-0.08357168734073639,
0.5927484035491943,
-2.2154901027679443,
0.2141326665878296,
-1.3398250341415405,
-0.44561609625816345,
1.0713893175125122,
0.3453812599182129,
-1.324377179145813,
0.09741353988647461,
-0.4079017639160156,
0.942350447177887,
0.6618009209632874,
1.09018874168396,
-1.7580748796463013,
-0.039755936712026596,
-0.3229399025440216,
0.13401223719120026,
-1.3546470403671265,
-1.4637459516525269,
0.6139802932739258,
0.6824021935462952,
0.6564528942108154,
0.008441213518381119,
0.929492712020874,
-0.9319004416465759,
0.6983805894851685,
-0.9212175607681274,
-1.7563828229904175,
-1.3125325441360474,
-2.269935131072998,
-2.4131598472595215,
0.6960176229476929,
-0.44933801889419556,
-0.47478970885276794,
1.9827558994293213,
-1.0495857000350952,
-1.7482010126113892,
1.1144819259643555,
0.20535998046398163,
-0.01911979354918003,
2.3225879669189453,
0.16485445201396942,
-0.6219671964645386,
0.2389397919178009,
-0.6857361793518066,
0.8483574390411377,
-0.4166020154953003,
1.3158172369003296,
0.4570867419242859,
-1.06194269657135,
1.5310046672821045,
-0.3997124135494232,
0.5108827948570251,
-0.6474236845970154,
-0.4718751907348633,
-0.8652201294898987,
0.25654861330986023,
1.9579075574874878,
-0.3476536273956299,
1.5553148984909058,
-0.2558160424232483,
-1.6764012575149536,
-1.6839284896850586,
0.8349974751472473,
0.4723358154296875,
-0.810371458530426,
0.043370410799980164,
-0.3729268014431,
0.17675340175628662,
-0.055284276604652405,
1.136122226715088,
1.1680340766906738,
0.7415522336959839,
-0.3205402195453644,
-0.8523955345153809,
0.2951684296131134,
-0.0532388910651207,
-0.8053479790687561,
-1.7032814025878906,
-0.44382181763648987,
0.12292949110269547,
0.6852123737335205,
-1.146646499633789,
1.7406164407730103,
0.8693578839302063,
1.8994773626327515,
1.0525636672973633,
-0.24626031517982483,
1.4475939273834229,
0.06961896270513535,
1.9297504425048828,
-0.5595400929450989,
0.692868709564209,
-0.4281119108200073,
-1.1332603693008423,
0.8090350031852722,
-0.38509443402290344,
-2.0690674781799316,
-0.7954853773117065,
-0.9480706453323364,
-0.15394723415374756,
-0.7867162227630615,
0.8898206353187561,
-0.3211885094642639,
-1.4061903953552246,
0.22475704550743103,
-0.6943202018737793,
0.09064696729183197,
-1.2347254753112793,
0.3006421625614166,
0.7679507732391357,
-0.6823694109916687,
0.09489756077528,
-0.2627047300338745,
-1.3204290866851807,
-0.47211211919784546,
0.2327626347541809,
1.974336862564087,
-0.789862334728241,
0.9951636791229248,
0.9638005495071411,
-0.7270983457565308,
-0.04151839762926102,
0.3592740297317505,
-0.25817015767097473,
0.7415432929992676,
-1.1343796253204346,
-0.28636109828948975,
1.3570724725723267,
-0.2417711466550827,
-0.6853123903274536,
1.596812129020691,
0.7116828560829163,
-0.9931680560112,
-0.17173849046230316,
-0.13653045892715454,
-0.7277126312255859,
0.029218023642897606,
-1.672654151916504,
-0.004068526439368725,
0.3588184118270874,
-1.4507910013198853,
-0.5174153447151184,
-0.22797249257564545,
1.2291312217712402,
-0.11573144048452377,
1.3876948356628418,
-0.24003057181835175,
-0.33479514718055725,
-0.3767366111278534,
-0.38971495628356934,
0.095755435526371,
-0.2699069678783417,
-0.5847017765045166,
0.21950292587280273,
-0.8116343021392822,
0.38778936862945557,
1.4551011323928833,
0.27765220403671265,
0.07820632308721542,
0.626885712146759,
0.991995096206665,
0.32092607021331787,
-0.02061542496085167,
-0.8684700131416321,
-1.6029075384140015,
2.0764658451080322,
-1.3865619897842407,
1.9579342603683472,
0.6895370483398438,
-0.12783299386501312,
-1.7724947929382324,
-1.7867779731750488,
1.275805115699768,
1.130216360092163,
2.2224936485290527,
0.7093497514724731,
0.3142968714237213,
-0.8134396076202393,
-0.5266709923744202,
0.35429659485816956,
-1.022245168685913,
-0.7617324590682983,
0.10419019311666489,
2.3661282062530518,
1.7137261629104614,
-0.5357037782669067,
-0.21653839945793152,
-1.0681273937225342,
1.3220208883285522,
-0.2543937861919403,
0.2293960303068161,
1.976117730140686,
-0.3294677138328552,
-1.152421474456787,
1.329181432723999,
-2.3497328758239746,
0.1823388934135437,
1.9577078819274902,
0.2715456187725067,
0.07982976734638214,
-1.550818681716919,
-0.6676852107048035,
-0.25815466046333313,
-0.2917402982711792,
-1.2845041751861572,
0.5858993530273438,
-0.2537917196750641,
-0.8120089769363403,
-1.4459148645401,
0.24739272892475128,
-1.037854790687561,
-1.6960923671722412,
0.22420309484004974,
1.854219675064087,
1.9321844577789307,
-0.6034411191940308,
1.484676718711853,
-0.20126979053020477,
0.28378719091415405,
1.2741349935531616,
1.2481311559677124,
3.065194845199585,
2.0619709491729736,
-1.2796119451522827,
0.8357716202735901,
-0.08559027314186096,
-0.4617530107498169,
1.282835602760315,
-1.1748770475387573,
1.1949067115783691,
-0.17424388229846954,
-1.2683916091918945,
-1.2827502489089966,
0.9569641947746277,
0.5531662702560425,
0.08422157168388367,
-0.4626239836215973,
1.3301454782485962,
-0.06480572372674942,
1.3248505592346191,
0.6463561058044434,
-0.43665891885757446,
0.6322954893112183,
-0.490154504776001,
-0.4766503572463989,
1.4945521354675293,
0.3227953016757965,
-1.3797311782836914,
-2.2854621410369873,
-0.2495759278535843,
-0.8583859801292419,
-0.02168179303407669,
-0.5812313556671143,
-0.9555937051773071,
1.691746711730957,
0.38778433203697205,
-1.291776418685913,
-0.2755306661128998,
-0.28005918860435486,
-0.5983684659004211,
2.6861252784729004,
-1.287777066230774,
-0.28654465079307556,
-1.0563085079193115,
-0.6936833262443542,
1.6405558586120605,
-1.3233205080032349,
-0.15735137462615967,
-1.0634478330612183,
-0.6455917358398438,
-1.307546615600586,
-0.5810228586196899,
-0.017514679580926895,
-0.9212210774421692,
0.828317403793335,
0.17445839941501617,
-1.1729249954223633,
-0.28834283351898193,
-0.8986194133758545,
0.8310369253158569,
-0.056392841041088104,
0.31093814969062805,
1.852354645729065,
0.4820491671562195,
-0.3243124783039093,
0.6173025369644165,
1.0981186628341675,
0.6585356593132019,
-0.7208285927772522,
0.2557344138622284,
-0.6617615818977356,
0.2487451583147049,
-1.2259584665298462,
0.29598429799079895,
-2.864887237548828,
0.5247305035591125,
-0.11671467870473862,
-0.1389295756816864,
0.00926889106631279,
-1.2263256311416626,
1.084833025932312,
2.637113571166992,
-1.2313894033432007,
0.4920666217803955,
0.21289151906967163,
1.1850980520248413,
-1.5295000076293945,
0.43554258346557617,
-0.41059526801109314,
2.1525516510009766,
0.25891730189323425,
1.241112232208252,
-0.48580992221832275,
-2.186952590942383,
0.7232869267463684,
-1.3403514623641968,
-1.2581921815872192,
0.7364712953567505,
-0.8842083215713501,
-0.04491230845451355,
-1.3749210834503174,
-0.1254993975162506,
-0.7142356038093567,
-1.3624290227890015,
0.8580785989761353,
0.09229225665330887,
0.46510452032089233,
-0.5177720785140991,
0.40838760137557983,
-2.171553373336792,
-1.3366529941558838,
-0.1869542896747589,
-0.9731670022010803,
0.4471180737018585,
-0.296709269285202,
0.6953266263008118,
-0.18964219093322754,
0.023962995037436485,
0.44450634717941284,
1.3799999952316284,
3.5416338443756104,
0.2659733295440674,
0.36521127820014954,
-0.10683868825435638,
-0.9747260212898254,
1.456611156463623,
0.9358221888542175,
-0.21982912719249725,
-0.5484695434570312,
-0.9789060950279236,
1.2110294103622437,
2.107837438583374,
1.063207983970642,
0.009743250906467438,
-0.8638474345207214,
-0.7074687480926514,
-0.022833146154880524,
0.1472242772579193,
0.4697933793067932,
0.7972177863121033,
0.13451315462589264,
0.06842164695262909,
1.4504822492599487,
1.1251733303070068,
-0.36570677161216736,
0.376743346452713,
-0.6858093738555908,
-0.4800158143043518,
0.6083206534385681,
0.35872045159339905,
0.01568273827433586,
0.35886138677597046,
-1.0804752111434937,
-0.16910293698310852,
-0.39810994267463684,
-0.9257171750068665,
-0.6980785727500916,
-0.48356640338897705,
-0.29860371351242065,
1.6588844060897827,
0.03604944795370102,
-0.5675444006919861,
-0.01576419174671173,
-0.7701588869094849,
-0.05679678916931152,
-1.0381226539611816,
0.3262525200843811,
-0.1698140799999237,
-0.12650653719902039,
-0.04811617732048035,
1.8046802282333374,
-1.0640722513198853,
-2.1389925479888916,
0.3058055341243744,
0.23056907951831818,
-0.40159350633621216,
0.2820277810096741,
1.5029712915420532,
0.5236947536468506,
1.3757222890853882,
1.3977290391921997,
1.0145316123962402,
-0.7696413397789001,
-1.405291199684143,
0.6965710520744324,
0.8456940054893494,
-1.4160200357437134,
0.7480599880218506,
0.04598669707775116,
-0.48797523975372314,
0.6811368465423584,
1.1516382694244385,
0.4549752473831177,
-1.87345290184021,
0.7311301827430725,
-0.9315940737724304,
0.7908983826637268,
0.750964879989624,
0.8069532513618469,
0.23007391393184662,
0.7842975854873657,
-1.2897742986679077,
-1.0431864261627197,
-0.7512508630752563,
-0.6225116848945618,
1.9418865442276,
-0.24849483370780945,
0.6345170140266418,
-0.09690669178962708,
-1.3174512386322021,
-0.11154772341251373,
0.7795639634132385,
0.37777531147003174,
-0.41620323061943054,
0.7725027203559875,
-0.6695865392684937,
-1.0896446704864502,
-1.4205602407455444,
-0.603148877620697,
-1.095786690711975,
-0.9537435173988342,
1.02773916721344,
0.7653263807296753,
0.309489905834198,
1.8223785161972046,
0.6369037628173828,
0.2668750584125519,
-2.731938600540161,
0.8025173544883728,
0.31235355138778687,
0.04471611976623535,
0.8784236311912537,
0.3548644185066223,
0.9946162700653076,
-0.0040796538814902306,
0.5857380628585815,
-2.4316630363464355,
2.3743512630462646,
-0.2583319842815399,
0.620725691318512,
0.03504326939582825,
-0.23428840935230255,
1.0940459966659546,
0.6014994978904724,
0.5449984073638916,
-1.1359174251556396,
0.691786527633667,
-0.6466231942176819,
1.1955658197402954,
0.871264636516571,
-0.8857560157775879,
-0.08628612756729126,
1.3847819566726685,
0.5083997249603271,
-0.4925253093242645,
-0.912173330783844,
-0.9454582333564758,
0.9011200070381165,
1.7458478212356567,
-0.1324746161699295,
-0.10732223093509674,
0.9081268310546875,
0.5236754417419434,
-1.2160463333129883,
-0.01816166192293167,
-0.7370943427085876,
-0.776242733001709,
1.5998296737670898,
2.034740447998047,
-0.051264770328998566,
-0.17578281462192535,
-0.7680048942565918,
-1.0898324251174927,
0.7488383650779724,
0.09000881761312485,
-0.07664687186479568,
0.6845537424087524,
-0.5950202345848083,
1.0753366947174072,
0.9168336391448975,
1.0784858465194702,
0.18215234577655792,
0.33152318000793457,
0.34856683015823364,
-0.29808440804481506,
-1.188794493675232,
-0.29689404368400574,
-1.1085678339004517,
-2.572218179702759,
0.5072410702705383,
-0.3223801553249359,
-1.4862898588180542,
0.04702220857143402,
-1.0733340978622437,
0.9118191003799438,
-0.5407215356826782,
-1.057938814163208,
-1.4470493793487549,
0.18230095505714417,
-0.1485474854707718,
0.9442363977432251,
-1.647945761680603,
-0.1114204004406929,
1.2434213161468506,
0.9165185689926147,
-0.6860106587409973,
1.0168921947479248,
0.1909736543893814,
1.0565029382705688,
0.8812398910522461,
-0.336153507232666,
0.5599950551986694,
0.18589061498641968,
-1.3360419273376465,
0.4945862889289856,
1.1431159973144531,
0.2244928628206253,
1.4880074262619019,
-0.5300487875938416,
0.13180610537528992,
0.39635413885116577,
-0.5382945537567139,
-0.38504865765571594,
-0.619614839553833,
0.779797375202179,
0.1705973893404007,
-0.914882481098175,
0.07313956320285797,
-0.12239544838666916,
-0.1318405568599701,
0.1309116780757904,
-1.4864274263381958,
-0.2090441733598709,
-0.3061259090900421,
-0.6282346248626709,
-1.1144304275512695,
-0.15334025025367737,
1.4361417293548584,
-0.846476137638092,
-0.13476167619228363,
0.5493814945220947,
0.40171846747398376,
0.5375393629074097,
0.6028935313224792,
-0.7327964901924133,
-0.3483853042125702,
-0.31248289346694946,
-0.34492188692092896,
0.33817946910858154,
1.4187756776809692,
-0.03589557856321335,
-1.0677976608276367,
0.7838181257247925,
-0.2916612923145294,
0.05409851670265198,
1.8697589635849,
0.09951487928628922,
-0.800754964351654,
0.2681046724319458,
-0.7028490304946899,
2.0043346881866455,
1.642377257347107,
1.244397521018982,
-0.11292716860771179,
-0.9882224202156067,
0.5062218904495239,
-0.29905784130096436,
-0.34297385811805725,
0.8880720138549805,
0.4512444734573364,
-0.19446340203285217,
-1.3418989181518555,
0.6466760635375977,
1.2257587909698486,
-0.9365093111991882,
-0.8816428184509277,
0.10803274810314178,
-0.7599888443946838,
1.0691180229187012,
0.5602816939353943,
0.4085715711116791,
0.22490546107292175,
1.5628976821899414,
0.6591209769248962,
-0.4515967071056366,
0.522200882434845,
0.4446209967136383,
-0.11603166908025742,
-2.0455434322357178,
-1.0738056898117065,
0.4384962022304535,
-0.5137019157409668,
-1.5443421602249146,
1.2214243412017822,
-1.1449042558670044,
-0.8526139259338379,
0.5752456784248352,
0.1810542196035385,
1.577736258506775,
0.41557878255844116,
1.5964239835739136,
2.036533832550049,
0.946367621421814,
0.293101966381073,
1.3773139715194702,
-0.0788789764046669,
-0.42894676327705383,
1.6668325662612915,
-0.36659955978393555,
0.44744938611984253,
1.1222416162490845,
-0.3110489845275879,
-1.0212267637252808,
-0.7251836657524109,
-1.2530332803726196,
-0.6128930449485779,
1.0263522863388062,
0.1353120058774948,
-1.1932072639465332,
0.21282587945461273,
1.6111787557601929,
0.0856318473815918,
-0.2062891572713852,
0.5976877212524414,
0.3926841616630554,
-0.7638698816299438,
0.0019659530371427536,
-0.8642566204071045,
0.38205504417419434,
-0.2646939754486084,
-0.35602664947509766,
0.32272231578826904,
0.4884689152240753,
1.2988933324813843,
-0.024753114208579063,
0.1441403329372406,
1.2981466054916382,
-1.2569377422332764,
1.4242478609085083,
-0.540058970451355,
0.18274164199829102,
-2.434621572494507,
1.3037865161895752,
-0.768812358379364,
1.8652249574661255,
-2.5554912090301514,
0.38415563106536865,
-0.5702463984489441,
-0.437951922416687,
0.27744510769844055,
-0.26566144824028015,
0.11503337323665619,
-0.2299956977367401,
-1.0861542224884033,
-0.10492025315761566,
-0.754945695400238,
0.5886865854263306,
1.0593551397323608,
1.3323943614959717,
-1.1047309637069702,
-0.2831301689147949,
-1.8825225830078125,
-0.07690589129924774,
-0.6455809473991394,
0.3509399890899658,
-1.8944724798202515,
-0.19287054240703583,
-1.8706201314926147,
-2.3901357650756836,
-1.4032117128372192,
-0.6745070815086365,
1.1091142892837524,
0.05387040227651596,
-0.7761645913124084,
1.0839972496032715,
-0.23212763667106628,
-1.8565775156021118,
1.0173507928848267,
-2.2376298904418945
] |
https://github.com/huggingface/datasets/issues/5383
|
IterableDataset missing column_names, differs from Dataset interface
|
Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it.
Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead.
|
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
| 365 | 40 |
IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it.
Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead.
|
[
-1.143869161605835,
-0.9259105920791626,
-0.748171329498291,
1.4314974546432495,
-0.15763162076473236,
-1.3012871742248535,
0.24143864214420319,
-1.051605463027954,
1.839693546295166,
-0.8496646881103516,
0.39766421914100647,
-1.699894905090332,
0.04279761016368866,
-0.5868715047836304,
-0.826580822467804,
-0.8795928955078125,
-0.5141488909721375,
-0.800646185874939,
0.9363614916801453,
2.520707607269287,
1.1681615114212036,
-1.354319453239441,
2.639805793762207,
0.6423715353012085,
-0.11754515767097473,
-0.9966983795166016,
0.47339746356010437,
-0.054365430027246475,
-1.3203493356704712,
-0.4743046760559082,
-0.9208522439002991,
-0.12222787737846375,
-0.5368531346321106,
-0.661613404750824,
0.07415256649255753,
0.4449600875377655,
-0.26459622383117676,
-0.4877617359161377,
-0.38173940777778625,
-0.8147731423377991,
0.4629744589328766,
-0.453264057636261,
1.0656070709228516,
-0.41155216097831726,
1.8583823442459106,
-0.5364283919334412,
0.5831255316734314,
0.7160472869873047,
1.3535056114196777,
0.1943158060312271,
-0.0366419218480587,
0.32111668586730957,
0.43208742141723633,
0.08086773753166199,
0.4430359899997711,
0.9842520356178284,
0.6374086737632751,
0.5439841747283936,
0.6604994535446167,
-2.2485196590423584,
1.3035145998001099,
-1.0624030828475952,
0.3009189963340759,
1.3163872957229614,
-0.9118138551712036,
0.22156906127929688,
-1.7549118995666504,
-0.06679292768239975,
0.6207261085510254,
-2.2244791984558105,
0.24067556858062744,
-1.3698076009750366,
-0.3910943567752838,
1.1263622045516968,
0.33886945247650146,
-1.352613925933838,
0.08810029178857803,
-0.345119446516037,
0.971181333065033,
0.6078417897224426,
1.114925742149353,
-1.7681939601898193,
-0.05456496775150299,
-0.37240520119667053,
0.10883863270282745,
-1.227870225906372,
-1.4796849489212036,
0.566076397895813,
0.682830274105072,
0.6326255798339844,
-0.025494616478681564,
0.9678853154182434,
-0.9321995973587036,
0.7126215100288391,
-0.9624409675598145,
-1.8093721866607666,
-1.3533461093902588,
-2.2260377407073975,
-2.3904573917388916,
0.7338443994522095,
-0.4335404634475708,
-0.45703548192977905,
2.004690170288086,
-1.022823691368103,
-1.7655277252197266,
1.112013578414917,
0.2730453908443451,
-0.06401734799146652,
2.268291711807251,
0.15511733293533325,
-0.6795488595962524,
0.326239675283432,
-0.6883787512779236,
0.7381016612052917,
-0.43040046095848083,
1.3601062297821045,
0.4648253619670868,
-1.0953528881072998,
1.5410490036010742,
-0.4369124174118042,
0.5251734852790833,
-0.6892056465148926,
-0.46727633476257324,
-0.8368901014328003,
0.23389139771461487,
1.9412164688110352,
-0.3267761766910553,
1.5428401231765747,
-0.2747932970523834,
-1.6341766119003296,
-1.6712230443954468,
0.8835808634757996,
0.5129048228263855,
-0.7713046669960022,
0.007993447594344616,
-0.3567618131637573,
0.1647137701511383,
-0.08109477907419205,
1.0936734676361084,
1.1274194717407227,
0.787057638168335,
-0.3212471306324005,
-0.838563859462738,
0.29437175393104553,
-0.04449320584535599,
-0.7663583755493164,
-1.7337573766708374,
-0.39649349451065063,
0.12774480879306793,
0.6349891424179077,
-1.13624107837677,
1.7529844045639038,
0.8469947576522827,
1.8864164352416992,
1.0499943494796753,
-0.26674559712409973,
1.4690260887145996,
0.10870341211557388,
1.9391003847122192,
-0.4939769506454468,
0.6906443238258362,
-0.3862926661968231,
-1.1288576126098633,
0.8323583602905273,
-0.35166752338409424,
-2.1036057472229004,
-0.7476024627685547,
-0.9180787801742554,
-0.10551248490810394,
-0.7699581980705261,
0.9128381013870239,
-0.27479681372642517,
-1.431028127670288,
0.21420428156852722,
-0.7288863658905029,
0.0794682651758194,
-1.253115177154541,
0.32253438234329224,
0.7438457608222961,
-0.6834908723831177,
0.13772112131118774,
-0.30254948139190674,
-1.3431823253631592,
-0.433970183134079,
0.25406771898269653,
1.9176545143127441,
-0.8035928606987,
0.9763126373291016,
1.0008888244628906,
-0.7512496113777161,
-0.04645989462733269,
0.3718458116054535,
-0.2811163067817688,
0.7847336530685425,
-1.1063885688781738,
-0.3047791123390198,
1.345762848854065,
-0.21025241911411285,
-0.6841159462928772,
1.5465060472488403,
0.6865235567092896,
-0.9748893976211548,
-0.15551042556762695,
-0.16577014327049255,
-0.7557058930397034,
0.060231566429138184,
-1.688494324684143,
0.007271037437021732,
0.39254969358444214,
-1.4632718563079834,
-0.47778910398483276,
-0.2279958724975586,
1.2530653476715088,
-0.14964419603347778,
1.4314322471618652,
-0.26158395409584045,
-0.2588629722595215,
-0.4109727144241333,
-0.3647732138633728,
0.08177880942821503,
-0.22836105525493622,
-0.6143429279327393,
0.2447872906923294,
-0.7757422924041748,
0.3926987051963806,
1.443009376525879,
0.2729822099208832,
0.03671415522694588,
0.6349643468856812,
1.0004897117614746,
0.27209630608558655,
-0.030780769884586334,
-0.8661940693855286,
-1.626659870147705,
2.095205783843994,
-1.3772386312484741,
1.9579180479049683,
0.6311007738113403,
-0.1008354127407074,
-1.7701566219329834,
-1.8105870485305786,
1.3387891054153442,
1.1059120893478394,
2.28511381149292,
0.6719409227371216,
0.39009082317352295,
-0.7593852281570435,
-0.5512416958808899,
0.3488898277282715,
-1.013698935508728,
-0.7902625203132629,
0.14213214814662933,
2.3701467514038086,
1.6997483968734741,
-0.5149347186088562,
-0.21194075047969818,
-1.1018953323364258,
1.370233178138733,
-0.2806173861026764,
0.25071942806243896,
1.9560364484786987,
-0.3113234341144562,
-1.1343780755996704,
1.328493356704712,
-2.329240083694458,
0.19814306497573853,
1.951127529144287,
0.22934195399284363,
0.08311530202627182,
-1.5005056858062744,
-0.6160061359405518,
-0.2513774335384369,
-0.326155424118042,
-1.2941977977752686,
0.5890403985977173,
-0.253811776638031,
-0.784023642539978,
-1.4046934843063354,
0.25269845128059387,
-1.0326142311096191,
-1.7028543949127197,
0.17048746347427368,
1.8940507173538208,
1.8882631063461304,
-0.6154880523681641,
1.5042332410812378,
-0.23551476001739502,
0.3216548264026642,
1.2755019664764404,
1.2434953451156616,
3.083338975906372,
2.0657639503479004,
-1.310308814048767,
0.8342311382293701,
-0.10932851582765579,
-0.5269166827201843,
1.2505052089691162,
-1.1924974918365479,
1.2093569040298462,
-0.16648168861865997,
-1.2772682905197144,
-1.2551379203796387,
0.9565003514289856,
0.5440124869346619,
0.10764588415622711,
-0.4833763837814331,
1.289315938949585,
-0.04303199052810669,
1.315177321434021,
0.6127327084541321,
-0.44801029562950134,
0.672576367855072,
-0.4101581573486328,
-0.47760507464408875,
1.497548222541809,
0.3139649033546448,
-1.3389848470687866,
-2.321073055267334,
-0.2412799596786499,
-0.9011296629905701,
-0.012940694577991962,
-0.581172525882721,
-0.9024277329444885,
1.709721326828003,
0.4252487123012543,
-1.259008765220642,
-0.2471810132265091,
-0.2202668935060501,
-0.56367427110672,
2.709782123565674,
-1.2808091640472412,
-0.28306031227111816,
-1.0731045007705688,
-0.6794354319572449,
1.655704140663147,
-1.2684401273727417,
-0.13891875743865967,
-1.0127452611923218,
-0.6135586500167847,
-1.327857494354248,
-0.6349745392799377,
0.002061496488749981,
-0.9338163733482361,
0.8468663692474365,
0.18479444086551666,
-1.225368857383728,
-0.3117125928401947,
-0.9130220413208008,
0.8306723237037659,
-0.05910337716341019,
0.26779940724372864,
1.8459134101867676,
0.46601536870002747,
-0.32438600063323975,
0.6424812078475952,
1.0740796327590942,
0.6821576952934265,
-0.6244191527366638,
0.3080192506313324,
-0.6934731006622314,
0.2456101030111313,
-1.2255836725234985,
0.26756972074508667,
-2.8615975379943848,
0.562237024307251,
-0.12111285328865051,
-0.10465486347675323,
-0.07242430746555328,
-1.2699958086013794,
1.0208101272583008,
2.616654396057129,
-1.2057664394378662,
0.4802175760269165,
0.24932293593883514,
1.1866918802261353,
-1.4870579242706299,
0.382723331451416,
-0.4092943072319031,
2.1451969146728516,
0.24591286480426788,
1.2267006635665894,
-0.43142569065093994,
-2.2034060955047607,
0.6769720911979675,
-1.3099778890609741,
-1.271346926689148,
0.812735915184021,
-0.8446078896522522,
-0.013480864465236664,
-1.3274577856063843,
-0.13183528184890747,
-0.7302942872047424,
-1.2970038652420044,
0.8486686944961548,
0.10022798925638199,
0.45920759439468384,
-0.5607467293739319,
0.3902001976966858,
-2.1752755641937256,
-1.3149973154067993,
-0.2443467676639557,
-0.9584060311317444,
0.4146375060081482,
-0.2118896096944809,
0.6693941354751587,
-0.17299441993236542,
-0.03781510889530182,
0.43753665685653687,
1.3898589611053467,
3.495243549346924,
0.2820032835006714,
0.3561795949935913,
-0.11722010374069214,
-0.9735953211784363,
1.4799234867095947,
0.9277614951133728,
-0.2580667734146118,
-0.5553160905838013,
-0.9940009117126465,
1.1976333856582642,
2.0830280780792236,
1.0333642959594727,
0.031109891831874847,
-0.8738713264465332,
-0.7574302554130554,
-0.02320234477519989,
0.10655021667480469,
0.4442446231842041,
0.8097123503684998,
0.17392253875732422,
0.06515762209892273,
1.436728596687317,
1.1190048456192017,
-0.3725886642932892,
0.4145991802215576,
-0.7180261015892029,
-0.4820129871368408,
0.5963589549064636,
0.3672270178794861,
0.022090155631303787,
0.34172067046165466,
-1.0628856420516968,
-0.17895852029323578,
-0.3902394771575928,
-0.9141205549240112,
-0.7547977566719055,
-0.46853238344192505,
-0.3111899495124817,
1.6786351203918457,
0.027313724160194397,
-0.5521755814552307,
0.003108847886323929,
-0.7632277011871338,
-0.039149824529886246,
-0.9893900752067566,
0.36694955825805664,
-0.15498919785022736,
-0.11563428491353989,
-0.034895919263362885,
1.7532320022583008,
-1.0420001745224,
-2.0786845684051514,
0.2748739719390869,
0.21509945392608643,
-0.40403708815574646,
0.29150083661079407,
1.5267850160598755,
0.5369706749916077,
1.3793224096298218,
1.3972982168197632,
1.0021079778671265,
-0.714837908744812,
-1.384643793106079,
0.6968010663986206,
0.9077430367469788,
-1.427537202835083,
0.7152501940727234,
0.09319795668125153,
-0.5121257305145264,
0.6338520646095276,
1.144644856452942,
0.444123238325119,
-1.9287497997283936,
0.7359216809272766,
-0.8808335065841675,
0.7518941760063171,
0.7238299250602722,
0.7668923735618591,
0.22499427199363708,
0.8011727333068848,
-1.3035352230072021,
-1.060616135597229,
-0.7175760865211487,
-0.6447001099586487,
1.9155381917953491,
-0.22077471017837524,
0.610790491104126,
-0.12148001044988632,
-1.3617020845413208,
-0.1297336369752884,
0.7442035675048828,
0.4214634895324707,
-0.455327570438385,
0.7334222197532654,
-0.6129096150398254,
-1.0959137678146362,
-1.3983975648880005,
-0.5714476704597473,
-1.1229884624481201,
-0.9190183877944946,
1.001254677772522,
0.7814257740974426,
0.32344505190849304,
1.8064714670181274,
0.6482305526733398,
0.2640158236026764,
-2.744227647781372,
0.8500805497169495,
0.3206355571746826,
-0.03900012746453285,
0.8247138857841492,
0.376914918422699,
1.004287600517273,
-0.046884894371032715,
0.6520094871520996,
-2.4360873699188232,
2.3637304306030273,
-0.2604634463787079,
0.6041473150253296,
0.08002790063619614,
-0.21995718777179718,
1.0677447319030762,
0.5394324064254761,
0.5564584732055664,
-1.1363134384155273,
0.663210391998291,
-0.6998651027679443,
1.2209136486053467,
0.8555367588996887,
-0.898822546005249,
-0.13604283332824707,
1.3686943054199219,
0.4763801693916321,
-0.4574488699436188,
-0.9295912384986877,
-0.9982320666313171,
0.9355436563491821,
1.7320767641067505,
-0.1554618626832962,
-0.12287082523107529,
0.9544307589530945,
0.5657606720924377,
-1.2795557975769043,
0.04201897233724594,
-0.7371799945831299,
-0.7791905999183655,
1.6354249715805054,
2.0774130821228027,
-0.0564405582845211,
-0.20467734336853027,
-0.8206509351730347,
-1.1417663097381592,
0.7735821604728699,
0.07370306551456451,
-0.06253118813037872,
0.6945188045501709,
-0.6173190474510193,
1.0698106288909912,
0.9248355627059937,
1.0551632642745972,
0.21611537039279938,
0.3108469545841217,
0.3054756820201874,
-0.3105939030647278,
-1.193003535270691,
-0.25784364342689514,
-1.0790083408355713,
-2.6114797592163086,
0.44506239891052246,
-0.2813291847705841,
-1.4358497858047485,
0.07163961231708527,
-1.078064203262329,
0.8385193347930908,
-0.550567626953125,
-1.1089414358139038,
-1.4116438627243042,
0.20773456990718842,
-0.09167870879173279,
0.9201622605323792,
-1.6270637512207031,
-0.06385786831378937,
1.235793113708496,
0.9213736057281494,
-0.655790388584137,
0.9882956147193909,
0.24710790812969208,
1.0620849132537842,
0.9292545914649963,
-0.32521775364875793,
0.5712576508522034,
0.13163860142230988,
-1.3176579475402832,
0.5281106233596802,
1.1277456283569336,
0.23216383159160614,
1.4666967391967773,
-0.5896825194358826,
0.11605242639780045,
0.4077392816543579,
-0.5548286437988281,
-0.41285526752471924,
-0.6687223315238953,
0.7428937554359436,
0.15706022083759308,
-0.9377861618995667,
0.07657578587532043,
-0.0925753191113472,
-0.099159374833107,
0.14677472412586212,
-1.5143253803253174,
-0.14840944111347198,
-0.21156534552574158,
-0.6547256112098694,
-1.1300477981567383,
-0.18277959525585175,
1.4060211181640625,
-0.8499743938446045,
-0.15356232225894928,
0.5392834544181824,
0.3579935133457184,
0.558864951133728,
0.5988225340843201,
-0.7188047170639038,
-0.37115880846977234,
-0.29136237502098083,
-0.3397068679332733,
0.34367069602012634,
1.4552303552627563,
-0.045932743698358536,
-1.0586298704147339,
0.7927772998809814,
-0.35152024030685425,
0.052750151604413986,
1.8339946269989014,
0.1317732334136963,
-0.8370360136032104,
0.25896281003952026,
-0.6790462732315063,
1.9666576385498047,
1.7363859415054321,
1.2423040866851807,
-0.10869800299406052,
-0.9922309517860413,
0.5101931691169739,
-0.4028331935405731,
-0.39406880736351013,
0.9144135117530823,
0.42625463008880615,
-0.1542721390724182,
-1.2990177869796753,
0.682800829410553,
1.2736800909042358,
-0.8937016129493713,
-0.8741616606712341,
0.09862147271633148,
-0.7889406681060791,
1.0706743001937866,
0.6375105977058411,
0.3984917402267456,
0.2077312171459198,
1.5308165550231934,
0.7149372100830078,
-0.40185314416885376,
0.532959520816803,
0.46771201491355896,
-0.12698248028755188,
-2.0799343585968018,
-1.1103907823562622,
0.41994717717170715,
-0.49876517057418823,
-1.6041655540466309,
1.263458251953125,
-1.1429320573806763,
-0.8501982092857361,
0.5653336644172668,
0.17277958989143372,
1.5977686643600464,
0.4091651439666748,
1.567704200744629,
2.036240577697754,
0.9635782837867737,
0.30707666277885437,
1.3588695526123047,
-0.09638222306966782,
-0.43025827407836914,
1.6834861040115356,
-0.3773472011089325,
0.4428686797618866,
1.1104766130447388,
-0.32896116375923157,
-1.0270187854766846,
-0.7625221014022827,
-1.2949411869049072,
-0.6255453824996948,
1.0590862035751343,
0.10992706567049026,
-1.2110090255737305,
0.24430160224437714,
1.5953664779663086,
0.06407113373279572,
-0.20507286489009857,
0.6777058243751526,
0.3437941372394562,
-0.7709314227104187,
0.002743569202721119,
-0.8751047253608704,
0.4282086491584778,
-0.249834805727005,
-0.35714080929756165,
0.30796992778778076,
0.44716551899909973,
1.28135085105896,
-0.016512293368577957,
0.16781210899353027,
1.2466257810592651,
-1.2919565439224243,
1.4043917655944824,
-0.6103317737579346,
0.2519433796405792,
-2.4340388774871826,
1.3012666702270508,
-0.8052428960800171,
1.812593936920166,
-2.5861477851867676,
0.4023191034793854,
-0.5441246628761292,
-0.4376075267791748,
0.29590603709220886,
-0.3112896978855133,
0.12124357372522354,
-0.21512407064437866,
-1.212148666381836,
-0.1601681113243103,
-0.7388858795166016,
0.5825831294059753,
0.9951889514923096,
1.366288185119629,
-1.0987441539764404,
-0.30029234290122986,
-1.8449033498764038,
-0.06169774383306503,
-0.6299653649330139,
0.3862312436103821,
-1.9056931734085083,
-0.15511740744113922,
-1.8722742795944214,
-2.392451047897339,
-1.3409056663513184,
-0.7102459669113159,
1.0904731750488281,
0.0033293496817350388,
-0.7621508836746216,
1.1360009908676147,
-0.2407221645116806,
-1.9081261157989502,
1.008423924446106,
-2.2960431575775146
] |
https://github.com/huggingface/datasets/issues/5383
|
IterableDataset missing column_names, differs from Dataset interface
|
Thanks! That's great news.
On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote:
> Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so
> please update your installation (pip install -U datasets) to use it.
>
> Regarding column_names, I agree we should add this property to
> IterableDataset. In the meantime, you can use
> list(dataset.features.keys()) instead.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
| 365 | 96 |
IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Thanks! That's great news.
On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote:
> Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so
> please update your installation (pip install -U datasets) to use it.
>
> Regarding column_names, I agree we should add this property to
> IterableDataset. In the meantime, you can use
> list(dataset.features.keys()) instead.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
[
-1.1667553186416626,
-0.9909883737564087,
-0.6709811687469482,
1.3800957202911377,
-0.18547743558883667,
-1.2485452890396118,
0.19360460340976715,
-1.0743534564971924,
1.750270962715149,
-0.6683366298675537,
0.2915157377719879,
-1.7066031694412231,
-0.06736880540847778,
-0.5485260486602783,
-0.7764133810997009,
-0.8482741117477417,
-0.47354745864868164,
-0.8978899121284485,
0.9335282444953918,
2.555864095687866,
1.2238845825195312,
-1.3899236917495728,
2.711745023727417,
0.6374194025993347,
-0.19579394161701202,
-0.9363489151000977,
0.5427645444869995,
-0.010632175952196121,
-1.3721342086791992,
-0.5093891620635986,
-0.8665885925292969,
-0.07239662855863571,
-0.5329036116600037,
-0.4797506034374237,
0.10919617861509323,
0.36272773146629333,
-0.1492670476436615,
-0.40437498688697815,
-0.508857250213623,
-0.7065569162368774,
0.43602997064590454,
-0.446593701839447,
0.9827848076820374,
-0.36250367760658264,
1.7878501415252686,
-0.5810797810554504,
0.5134003162384033,
0.7141722440719604,
1.307766079902649,
0.23306936025619507,
-0.0408913679420948,
0.33398595452308655,
0.4247792959213257,
-0.010342549532651901,
0.426196426153183,
1.0693693161010742,
0.692700982093811,
0.4916422963142395,
0.6918797492980957,
-2.1973748207092285,
1.3395800590515137,
-0.9560214281082153,
0.34708404541015625,
1.3825583457946777,
-0.8835194706916809,
0.3015875220298767,
-1.8553552627563477,
-0.030366476625204086,
0.6274354457855225,
-2.3094236850738525,
0.18877997994422913,
-1.3806387186050415,
-0.5481041669845581,
0.9704686403274536,
0.28724905848503113,
-1.3407436609268188,
0.10526946932077408,
-0.4750368893146515,
0.9810715913772583,
0.5399625301361084,
1.1734892129898071,
-1.801522970199585,
-0.09978629648685455,
-0.26742714643478394,
0.12119033932685852,
-1.1789416074752808,
-1.5851181745529175,
0.6900032162666321,
0.6080582737922668,
0.6292272210121155,
-0.06436678022146225,
0.9059343934059143,
-0.9353677034378052,
0.7644191384315491,
-0.9234447479248047,
-1.766011118888855,
-1.3931920528411865,
-2.2567920684814453,
-2.2837328910827637,
0.7550845742225647,
-0.5201107859611511,
-0.42834749817848206,
1.988795280456543,
-1.0200848579406738,
-1.7521700859069824,
1.0654857158660889,
0.2743910253047943,
-0.005332573316991329,
2.3365259170532227,
0.20781584084033966,
-0.649673581123352,
0.33138319849967957,
-0.7342705726623535,
0.7909258008003235,
-0.3617214560508728,
1.4028600454330444,
0.3847883641719818,
-0.9727405309677124,
1.561575174331665,
-0.44486019015312195,
0.51497483253479,
-0.6379339098930359,
-0.5224183797836304,
-0.7888139486312866,
0.20775215327739716,
1.9610111713409424,
-0.3154538571834564,
1.5817607641220093,
-0.3406059741973877,
-1.6956682205200195,
-1.6401041746139526,
0.8172025084495544,
0.5653026700019836,
-0.8809283971786499,
0.03405121713876724,
-0.4606531262397766,
0.11849819123744965,
-0.02261688932776451,
1.0664676427841187,
1.2442848682403564,
0.7286705374717712,
-0.35327455401420593,
-0.8871621489524841,
0.19822876155376434,
-0.08107800781726837,
-0.7720781564712524,
-1.807297945022583,
-0.3376152217388153,
0.13313697278499603,
0.6981193423271179,
-1.2351969480514526,
1.6755690574645996,
0.8751260042190552,
1.9687856435775757,
1.0495729446411133,
-0.4123726785182953,
1.4277082681655884,
0.10920721292495728,
1.7848228216171265,
-0.6175779104232788,
0.672102689743042,
-0.39652958512306213,
-1.0509915351867676,
0.8398993015289307,
-0.3551931381225586,
-2.0304203033447266,
-0.7002503275871277,
-0.8704130053520203,
-0.22565306723117828,
-0.8075243830680847,
0.9297796487808228,
-0.259635865688324,
-1.3337560892105103,
0.2435249239206314,
-0.7273491621017456,
0.10567094385623932,
-1.2925132513046265,
0.280386745929718,
0.7761668562889099,
-0.6039478182792664,
0.09377680718898773,
-0.3001241683959961,
-1.3475407361984253,
-0.5176695585250854,
0.2331545054912567,
1.9117189645767212,
-0.6924327611923218,
0.9928955435752869,
0.971773624420166,
-0.734641432762146,
0.021994102746248245,
0.35196903347969055,
-0.2711286246776581,
0.7882682085037231,
-1.15825617313385,
-0.2964393198490143,
1.1569712162017822,
-0.21046748757362366,
-0.476114422082901,
1.4875383377075195,
0.7035309672355652,
-1.0114282369613647,
-0.24207457900047302,
-0.13472355902194977,
-0.7854145169258118,
0.044096268713474274,
-1.6724863052368164,
-0.07937543839216232,
0.34322357177734375,
-1.532005786895752,
-0.5404049754142761,
-0.27731236815452576,
1.2803966999053955,
-0.10834978520870209,
1.3501429557800293,
-0.2368159145116806,
-0.19972185790538788,
-0.388545423746109,
-0.3826809227466583,
0.1328529417514801,
-0.30285853147506714,
-0.5784624814987183,
0.26604121923446655,
-0.8605245351791382,
0.3130994439125061,
1.538824439048767,
0.33605045080184937,
-0.015235669910907745,
0.5473806858062744,
0.9503374695777893,
0.33914926648139954,
-0.0927349254488945,
-0.8620642423629761,
-1.5804976224899292,
2.0915331840515137,
-1.4701204299926758,
1.9034860134124756,
0.7642054557800293,
-0.12340246140956879,
-1.8002939224243164,
-1.908963680267334,
1.2725502252578735,
1.1053674221038818,
2.3403241634368896,
0.6701398491859436,
0.4073372483253479,
-0.7272424697875977,
-0.5619171857833862,
0.26709821820259094,
-0.9681085348129272,
-0.8320115804672241,
0.15287362039089203,
2.3803775310516357,
1.7208421230316162,
-0.6299809217453003,
-0.15558837354183197,
-0.9955176115036011,
1.3546079397201538,
-0.1863207221031189,
0.21775366365909576,
1.990256905555725,
-0.25460097193717957,
-1.156417965888977,
1.3338907957077026,
-2.307516574859619,
0.22429341077804565,
1.9490408897399902,
0.2778621315956116,
0.14522197842597961,
-1.454460859298706,
-0.6256893277168274,
-0.3375058174133301,
-0.36844921112060547,
-1.2280957698822021,
0.5864951610565186,
-0.22263826429843903,
-0.8513667583465576,
-1.537748098373413,
0.1939515620470047,
-1.0680010318756104,
-1.6969000101089478,
0.26284050941467285,
1.9405139684677124,
2.025099277496338,
-0.6821262836456299,
1.4303475618362427,
-0.3077332377433777,
0.11331373453140259,
1.1826657056808472,
1.237496018409729,
3.0810205936431885,
2.0229883193969727,
-1.259630799293518,
0.7587108016014099,
-0.12779876589775085,
-0.4552696943283081,
1.1265593767166138,
-1.1484301090240479,
1.1580862998962402,
-0.1749829798936844,
-1.2453243732452393,
-1.1509214639663696,
0.9692509174346924,
0.5228620767593384,
0.06293740123510361,
-0.5233556032180786,
1.2479451894760132,
-0.061517540365457535,
1.3655171394348145,
0.5855430364608765,
-0.40582817792892456,
0.6525702476501465,
-0.4216780662536621,
-0.4798739552497864,
1.5684387683868408,
0.28639882802963257,
-1.4431661367416382,
-2.3621675968170166,
-0.23740851879119873,
-0.9059450030326843,
0.028806686401367188,
-0.5874060392379761,
-1.0230259895324707,
1.6213405132293701,
0.4577045440673828,
-1.238097906112671,
-0.32332053780555725,
-0.2644180655479431,
-0.549824595451355,
2.6175436973571777,
-1.322687029838562,
-0.1908344328403473,
-0.9764013886451721,
-0.575877845287323,
1.630987524986267,
-1.2527658939361572,
-0.1864873617887497,
-1.0669736862182617,
-0.6028072237968445,
-1.2845720052719116,
-0.5544240474700928,
0.0037582777440547943,
-0.9262840151786804,
0.8110218644142151,
0.17997148633003235,
-1.1218953132629395,
-0.26301026344299316,
-0.9301127791404724,
0.8497030735015869,
-0.07377373427152634,
0.22752028703689575,
1.8816510438919067,
0.3950917422771454,
-0.32511767745018005,
0.6692035794258118,
1.1600279808044434,
0.6450570821762085,
-0.7190441489219666,
0.08343502134084702,
-0.6532933712005615,
0.31244298815727234,
-1.2860987186431885,
0.2695898711681366,
-2.8704469203948975,
0.6589258909225464,
-0.08136413246393204,
-0.0720941573381424,
0.020873866975307465,
-1.336609959602356,
1.1514294147491455,
2.6316866874694824,
-1.199450969696045,
0.5343650579452515,
0.3508002758026123,
1.1528005599975586,
-1.5387004613876343,
0.34430140256881714,
-0.417720764875412,
2.1943395137786865,
0.23550532758235931,
1.237725019454956,
-0.5009104609489441,
-2.2738709449768066,
0.6379864811897278,
-1.21204674243927,
-1.2283674478530884,
0.6667840480804443,
-0.8901124596595764,
-0.026189472526311874,
-1.4893893003463745,
-0.13165634870529175,
-0.8413469791412354,
-1.2797350883483887,
0.7900773882865906,
0.07912993431091309,
0.3910657465457916,
-0.6196414232254028,
0.3909795880317688,
-2.232774019241333,
-1.3777827024459839,
-0.20346754789352417,
-0.9706584811210632,
0.5032309889793396,
-0.31819474697113037,
0.7244172096252441,
-0.08275843411684036,
0.006341949105262756,
0.4097127318382263,
1.3638027906417847,
3.467463254928589,
0.14382927119731903,
0.2658160328865051,
-0.11442424356937408,
-0.9507057070732117,
1.4546376466751099,
0.9495389461517334,
-0.13092724978923798,
-0.5644133687019348,
-1.0309010744094849,
1.2787094116210938,
2.0837128162384033,
1.024921178817749,
0.07140538841485977,
-0.910319447517395,
-0.6913607120513916,
0.01855061575770378,
0.26390430331230164,
0.4728492498397827,
0.9002577066421509,
0.10360176861286163,
0.09118376672267914,
1.4282549619674683,
1.1630966663360596,
-0.3541920483112335,
0.506909966468811,
-0.766759991645813,
-0.4739607572555542,
0.4941714406013489,
0.31779271364212036,
0.001195153221487999,
0.39441511034965515,
-1.0545592308044434,
-0.18983617424964905,
-0.3156774938106537,
-0.8985565304756165,
-0.7240997552871704,
-0.3830109238624573,
-0.293162077665329,
1.6334537267684937,
0.04255680367350578,
-0.4714409410953522,
0.04363890364766121,
-0.6837078332901001,
-0.05001247674226761,
-1.0938825607299805,
0.3393830358982086,
-0.1481572389602661,
-0.013460231944918633,
-0.0869298204779625,
1.7337392568588257,
-0.9182106256484985,
-2.1029539108276367,
0.24070724844932556,
0.312928706407547,
-0.5028919577598572,
0.24589867889881134,
1.5902554988861084,
0.540174126625061,
1.4607599973678589,
1.3408057689666748,
1.0371898412704468,
-0.7023000717163086,
-1.286567211151123,
0.6527276635169983,
0.8939355611801147,
-1.347899317741394,
0.7475405931472778,
-0.07031382620334625,
-0.5413315892219543,
0.6346461176872253,
1.275335669517517,
0.42216596007347107,
-1.9976376295089722,
0.9166510701179504,
-0.8753765225410461,
0.8356255888938904,
0.7007826566696167,
0.8636929988861084,
0.23611529171466827,
0.816967785358429,
-1.3894100189208984,
-1.048261046409607,
-0.7891676425933838,
-0.60065758228302,
1.9581027030944824,
-0.17914435267448425,
0.531964123249054,
-0.2120054066181183,
-1.2429016828536987,
-0.11718545109033585,
0.7211403846740723,
0.4575393795967102,
-0.37864163517951965,
0.7719764709472656,
-0.5899927616119385,
-1.1388486623764038,
-1.3416236639022827,
-0.4792052209377289,
-0.9867361783981323,
-0.9117275476455688,
0.9928650259971619,
0.8233082294464111,
0.47080716490745544,
1.8856741189956665,
0.5313776731491089,
0.23699726164340973,
-2.738018274307251,
0.8998696804046631,
0.34581440687179565,
-0.08026633411645889,
0.9482942223548889,
0.40649548172950745,
1.0884450674057007,
0.033185869455337524,
0.5650961399078369,
-2.387200355529785,
2.2940967082977295,
-0.20166267454624176,
0.7193818092346191,
0.07947206497192383,
-0.1351805329322815,
1.058740258216858,
0.5969211459159851,
0.5464568138122559,
-1.107866883277893,
0.7365989685058594,
-0.6148534417152405,
1.1386637687683105,
0.8347766399383545,
-0.8332684636116028,
-0.0064056506380438805,
1.3032234907150269,
0.4947148561477661,
-0.4878844618797302,
-0.9989286661148071,
-0.8422669172286987,
0.9188911318778992,
1.801440954208374,
-0.15320438146591187,
-0.02951885759830475,
0.8055896162986755,
0.5773960947990417,
-1.3183506727218628,
0.008297515101730824,
-0.6988669633865356,
-0.7706552743911743,
1.6052483320236206,
2.0619008541107178,
-0.01321459747850895,
-0.18955518305301666,
-0.7202431559562683,
-1.2611896991729736,
0.7816227674484253,
0.02731180191040039,
0.06204713135957718,
0.6936596632003784,
-0.6092645525932312,
1.1233214139938354,
0.8020950555801392,
1.075046181678772,
0.10059770941734314,
0.38686099648475647,
0.39569562673568726,
-0.3066904842853546,
-1.0976641178131104,
-0.3494514226913452,
-1.167380690574646,
-2.513195037841797,
0.49946069717407227,
-0.2824668884277344,
-1.441709280014038,
0.020666170865297318,
-1.0036338567733765,
0.8725531697273254,
-0.616087019443512,
-1.0427199602127075,
-1.457222819328308,
0.21341636776924133,
-0.14450731873512268,
0.9900309443473816,
-1.6227355003356934,
-0.15670865774154663,
1.1899462938308716,
0.8981367945671082,
-0.620397686958313,
0.9988411068916321,
0.276545912027359,
0.976101279258728,
0.8555361032485962,
-0.35016071796417236,
0.49294930696487427,
0.13605321943759918,
-1.3147927522659302,
0.48178038001060486,
1.2133537530899048,
0.28627684712409973,
1.334356427192688,
-0.5852912664413452,
0.06472188979387283,
0.4534444808959961,
-0.4850643277168274,
-0.41880330443382263,
-0.5068438053131104,
0.6511252522468567,
0.13447895646095276,
-1.0625134706497192,
-0.04969235137104988,
-0.2028098702430725,
-0.09362659603357315,
0.18556196987628937,
-1.4593026638031006,
-0.24650682508945465,
-0.3743166923522949,
-0.48837971687316895,
-1.1669254302978516,
-0.18502646684646606,
1.4388231039047241,
-0.8187100291252136,
-0.18020161986351013,
0.5531681776046753,
0.42496153712272644,
0.5336470007896423,
0.6260644793510437,
-0.7455174922943115,
-0.38190194964408875,
-0.31455278396606445,
-0.3653852045536041,
0.25030022859573364,
1.3466715812683105,
-0.08236857503652573,
-1.0536340475082397,
0.6582664251327515,
-0.3490293025970459,
0.09387726336717606,
1.9217419624328613,
0.0934303030371666,
-0.7908737063407898,
0.2535804510116577,
-0.6371400356292725,
1.9376587867736816,
1.6619900465011597,
1.2921651601791382,
-0.19272391498088837,
-0.9689855575561523,
0.5204983353614807,
-0.30305418372154236,
-0.3794293999671936,
0.8439429998397827,
0.4857853949069977,
-0.20306871831417084,
-1.4428800344467163,
0.6042863726615906,
1.2855184078216553,
-0.9933161735534668,
-0.797481119632721,
0.1037176325917244,
-0.7806687355041504,
1.140133023262024,
0.6078412532806396,
0.38897836208343506,
0.19512489438056946,
1.5905210971832275,
0.6488738656044006,
-0.44167736172676086,
0.5171452760696411,
0.4620172381401062,
-0.17299242317676544,
-2.064788579940796,
-1.182754635810852,
0.3411170244216919,
-0.4163317084312439,
-1.542941689491272,
1.2987494468688965,
-1.108804702758789,
-0.9319859147071838,
0.48776307702064514,
0.18858090043067932,
1.490217685699463,
0.40175455808639526,
1.6693726778030396,
2.1008994579315186,
0.9736608266830444,
0.3034701347351074,
1.3479690551757812,
-0.06953631341457367,
-0.4406782388687134,
1.7235119342803955,
-0.36116406321525574,
0.5180410742759705,
1.152367353439331,
-0.39506441354751587,
-1.0744956731796265,
-0.7923054695129395,
-1.240256905555725,
-0.6849066019058228,
1.1099823713302612,
0.08200269192457199,
-1.1863843202590942,
0.2610118091106415,
1.6282519102096558,
0.10377638787031174,
-0.24312499165534973,
0.6174471974372864,
0.4095379412174225,
-0.7485525608062744,
-0.08591656386852264,
-0.9592731595039368,
0.4544527530670166,
-0.2508731782436371,
-0.37942367792129517,
0.24237953126430511,
0.509612500667572,
1.2916609048843384,
-0.011708712205290794,
0.10055027157068253,
1.25528085231781,
-1.287824034690857,
1.4444447755813599,
-0.6077084541320801,
0.23228779435157776,
-2.4151670932769775,
1.4041939973831177,
-0.7015964388847351,
1.882612943649292,
-2.613157272338867,
0.38412758708000183,
-0.5144615173339844,
-0.39380037784576416,
0.24798409640789032,
-0.24502459168434143,
0.1953272670507431,
-0.23884505033493042,
-1.1153231859207153,
-0.1701653003692627,
-0.7205334901809692,
0.577133059501648,
1.0864378213882446,
1.4085396528244019,
-1.0813525915145874,
-0.20071040093898773,
-1.7955055236816406,
-0.0977187305688858,
-0.7129681706428528,
0.29267019033432007,
-1.8853003978729248,
-0.17487740516662598,
-1.8717155456542969,
-2.3594112396240234,
-1.3466274738311768,
-0.7569437026977539,
1.047970175743103,
0.05095566809177399,
-0.8483809232711792,
1.1711355447769165,
-0.2742774784564972,
-1.8224053382873535,
1.035599708557129,
-2.275775671005249
] |
https://github.com/huggingface/datasets/issues/5383
|
IterableDataset missing column_names, differs from Dataset interface
|
I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward,
|
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
| 365 | 47 |
IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward,
|
[
-1.1084904670715332,
-0.9190534353256226,
-0.7726215124130249,
1.4612256288528442,
-0.14932122826576233,
-1.3125042915344238,
0.23134325444698334,
-1.054985761642456,
1.868650197982788,
-0.8625642657279968,
0.3928910791873932,
-1.7145966291427612,
0.0339580737054348,
-0.6022754311561584,
-0.8450213074684143,
-0.8533739447593689,
-0.4643571674823761,
-0.846188485622406,
0.9225005507469177,
2.4899356365203857,
1.2117730379104614,
-1.3244421482086182,
2.624479293823242,
0.632984459400177,
-0.12507681548595428,
-1.0004748106002808,
0.469177782535553,
-0.0849330872297287,
-1.2848433256149292,
-0.5014367699623108,
-0.8941876292228699,
-0.10771045088768005,
-0.5666141510009766,
-0.6475526690483093,
0.05155603960156441,
0.47925865650177,
-0.3017416000366211,
-0.49331769347190857,
-0.41176357865333557,
-0.8594407439231873,
0.46593329310417175,
-0.4504930078983307,
1.1106542348861694,
-0.41453036665916443,
1.8627129793167114,
-0.5676782131195068,
0.5559995174407959,
0.722169041633606,
1.3492190837860107,
0.21720819175243378,
-0.020719170570373535,
0.271899551153183,
0.4166424870491028,
0.07986582815647125,
0.4664754867553711,
0.9977178573608398,
0.6367108225822449,
0.5772945880889893,
0.7422241568565369,
-2.247577667236328,
1.3109533786773682,
-1.1137380599975586,
0.30136653780937195,
1.3368467092514038,
-0.9024562835693359,
0.2321034073829651,
-1.7684741020202637,
-0.054495856165885925,
0.6031940579414368,
-2.215343475341797,
0.2834446430206299,
-1.3752769231796265,
-0.41970139741897583,
1.0684716701507568,
0.34331798553466797,
-1.3375964164733887,
0.10199351608753204,
-0.3545061945915222,
0.9386245608329773,
0.6144217848777771,
1.0798457860946655,
-1.7767401933670044,
-0.07707564532756805,
-0.3483145833015442,
0.11090323328971863,
-1.2648791074752808,
-1.487653374671936,
0.5751086473464966,
0.6846700310707092,
0.6049352884292603,
-0.06996996700763702,
0.969984233379364,
-0.9977911710739136,
0.709255039691925,
-0.9952422380447388,
-1.7865097522735596,
-1.3320567607879639,
-2.166811227798462,
-2.3487391471862793,
0.7353125810623169,
-0.4340420067310333,
-0.4683471620082855,
2.013014793395996,
-0.9843056797981262,
-1.7424927949905396,
1.1458936929702759,
0.2503354549407959,
-0.051834531128406525,
2.280324935913086,
0.19806672632694244,
-0.6632612347602844,
0.3400144875049591,
-0.6976138353347778,
0.7846060991287231,
-0.48449069261550903,
1.3389607667922974,
0.4252597391605377,
-1.0605428218841553,
1.5775655508041382,
-0.4609723687171936,
0.5181801915168762,
-0.6896819472312927,
-0.4727243185043335,
-0.8235516548156738,
0.2568065822124481,
1.9550813436508179,
-0.3106670677661896,
1.5178829431533813,
-0.24754709005355835,
-1.637787938117981,
-1.676430583000183,
0.8751497268676758,
0.4657383859157562,
-0.8052135705947876,
0.030184034258127213,
-0.3557448387145996,
0.1933067888021469,
-0.0896516665816307,
1.136547327041626,
1.1509308815002441,
0.8159668445587158,
-0.3099653124809265,
-0.819866955280304,
0.2932650148868561,
-0.052723776549100876,
-0.8334150314331055,
-1.6888452768325806,
-0.3968610465526581,
0.14872950315475464,
0.6253112554550171,
-1.134597897529602,
1.79902184009552,
0.8596295714378357,
1.8996784687042236,
1.018194556236267,
-0.27484381198883057,
1.4649841785430908,
0.07912997156381607,
1.9437276124954224,
-0.5216107964515686,
0.6965309977531433,
-0.4232276380062103,
-1.1330124139785767,
0.8458489775657654,
-0.3323932886123657,
-2.0692079067230225,
-0.7556554675102234,
-0.9322550892829895,
-0.13849091529846191,
-0.7530582547187805,
0.9256135821342468,
-0.2520183026790619,
-1.4219088554382324,
0.1900523453950882,
-0.7301507592201233,
0.05775323510169983,
-1.2475324869155884,
0.30294564366340637,
0.7191929221153259,
-0.6813905239105225,
0.14882402122020721,
-0.2681451737880707,
-1.3175653219223022,
-0.46007224917411804,
0.25358039140701294,
1.9409664869308472,
-0.8175148963928223,
0.955572247505188,
0.9794062376022339,
-0.7718644738197327,
-0.05292307958006859,
0.3927600383758545,
-0.3086603879928589,
0.7342667579650879,
-1.1043727397918701,
-0.3646334409713745,
1.36351478099823,
-0.23173920810222626,
-0.6650959849357605,
1.5570359230041504,
0.697868287563324,
-0.9901936650276184,
-0.13126003742218018,
-0.19453835487365723,
-0.7681432962417603,
0.05394843965768814,
-1.6406360864639282,
0.04350440204143524,
0.4472448527812958,
-1.437435269355774,
-0.5032637119293213,
-0.22249910235404968,
1.2487266063690186,
-0.16005143523216248,
1.4027636051177979,
-0.27656176686286926,
-0.3036390244960785,
-0.3873344659805298,
-0.34334900975227356,
0.07733287662267685,
-0.2142869234085083,
-0.6236968040466309,
0.1953657865524292,
-0.770930290222168,
0.36735251545906067,
1.4379280805587769,
0.24187888205051422,
0.03597310930490494,
0.5959585905075073,
1.0569040775299072,
0.27867284417152405,
-0.005601937882602215,
-0.8793497085571289,
-1.5501508712768555,
2.0692362785339355,
-1.3993556499481201,
1.9802113771438599,
0.6194974780082703,
-0.07831940054893494,
-1.7562518119812012,
-1.8349175453186035,
1.2891545295715332,
1.1330395936965942,
2.287864923477173,
0.6616771817207336,
0.35189270973205566,
-0.8001600503921509,
-0.551121175289154,
0.32841169834136963,
-1.0643655061721802,
-0.7573150992393494,
0.15443336963653564,
2.327282428741455,
1.7102231979370117,
-0.5273730754852295,
-0.22417403757572174,
-1.097056269645691,
1.3883163928985596,
-0.2717799246311188,
0.22207950055599213,
1.9492486715316772,
-0.29982003569602966,
-1.1225364208221436,
1.3155479431152344,
-2.334259510040283,
0.20339643955230713,
1.95964515209198,
0.2377205789089203,
0.09044275432825089,
-1.502178430557251,
-0.6203960180282593,
-0.23942825198173523,
-0.29094693064689636,
-1.246584415435791,
0.5773235559463501,
-0.2367539405822754,
-0.7882872819900513,
-1.3997098207473755,
0.27745920419692993,
-1.0189930200576782,
-1.710257887840271,
0.18286915123462677,
1.8884620666503906,
1.895279049873352,
-0.6471969485282898,
1.5421793460845947,
-0.21238960325717926,
0.27130043506622314,
1.342574954032898,
1.2651941776275635,
3.1015350818634033,
2.040630340576172,
-1.2735140323638916,
0.7849659323692322,
-0.13087232410907745,
-0.49868467450141907,
1.2592073678970337,
-1.1978418827056885,
1.178131103515625,
-0.12525194883346558,
-1.2328379154205322,
-1.2669909000396729,
0.9121143221855164,
0.5345278978347778,
0.09160618484020233,
-0.46385955810546875,
1.2615859508514404,
-0.03632930666208267,
1.3344208002090454,
0.6649935841560364,
-0.42684006690979004,
0.6811791062355042,
-0.4357500970363617,
-0.440123051404953,
1.5135726928710938,
0.33506283164024353,
-1.338068962097168,
-2.29063081741333,
-0.20495259761810303,
-0.9036431312561035,
0.02859818935394287,
-0.5748029947280884,
-0.9289426803588867,
1.6841450929641724,
0.3979564905166626,
-1.284409523010254,
-0.2332458347082138,
-0.252799391746521,
-0.5991171002388,
2.7552762031555176,
-1.3218883275985718,
-0.32141852378845215,
-1.0810309648513794,
-0.6767029762268066,
1.6829019784927368,
-1.297810435295105,
-0.15265808999538422,
-1.0362745523452759,
-0.5655571818351746,
-1.3559749126434326,
-0.6139474511146545,
0.0066720666363835335,
-0.9103044271469116,
0.8298134207725525,
0.19459709525108337,
-1.2619118690490723,
-0.37529388070106506,
-0.9049468040466309,
0.7922683358192444,
-0.07645230740308762,
0.3064444363117218,
1.8574310541152954,
0.5049273371696472,
-0.3290833830833435,
0.6628771424293518,
1.079699158668518,
0.6690958738327026,
-0.5874688625335693,
0.32734376192092896,
-0.6798079609870911,
0.27962934970855713,
-1.269752025604248,
0.257750928401947,
-2.831737756729126,
0.5756971836090088,
-0.17397139966487885,
-0.10935318470001221,
-0.05851751193404198,
-1.2943871021270752,
1.0598938465118408,
2.614799976348877,
-1.194359302520752,
0.4592757523059845,
0.22495652735233307,
1.2281379699707031,
-1.5614672899246216,
0.3492097556591034,
-0.35510125756263733,
2.15236496925354,
0.19699501991271973,
1.2300995588302612,
-0.40429866313934326,
-2.1987974643707275,
0.643501877784729,
-1.3224897384643555,
-1.2263916730880737,
0.795769214630127,
-0.8147541284561157,
-0.05040648952126503,
-1.3514128923416138,
-0.18549607694149017,
-0.7621970772743225,
-1.3117880821228027,
0.8980382084846497,
0.09223417192697525,
0.44901764392852783,
-0.5734161734580994,
0.4277181923389435,
-2.173774480819702,
-1.3121161460876465,
-0.2689066529273987,
-0.91263347864151,
0.4414030909538269,
-0.22710831463336945,
0.6594129204750061,
-0.2044534981250763,
-0.021664083003997803,
0.44514694809913635,
1.417698860168457,
3.5180444717407227,
0.27995747327804565,
0.39142438769340515,
-0.16922341287136078,
-0.9620213508605957,
1.4661260843276978,
0.9316791296005249,
-0.22877338528633118,
-0.5054384469985962,
-0.9783457517623901,
1.222214937210083,
2.067790985107422,
1.0208265781402588,
0.019490890204906464,
-0.8191851377487183,
-0.7563372254371643,
-0.07062885910272598,
0.08501797914505005,
0.43275994062423706,
0.8092232942581177,
0.1762388050556183,
0.027386028319597244,
1.4025670289993286,
1.0995042324066162,
-0.39845460653305054,
0.42461085319519043,
-0.7108683586120605,
-0.4462820291519165,
0.5930219292640686,
0.3683961033821106,
0.00745673943310976,
0.319312185049057,
-1.0538783073425293,
-0.20645388960838318,
-0.3650990426540375,
-0.8957318067550659,
-0.7358437776565552,
-0.5130513310432434,
-0.2997330129146576,
1.6482694149017334,
0.0424170158803463,
-0.5678237080574036,
0.006179505959153175,
-0.7527758479118347,
-0.022831685841083527,
-1.014428734779358,
0.29490476846694946,
-0.16684535145759583,
-0.1374184936285019,
-0.061518147587776184,
1.7816017866134644,
-1.000564694404602,
-2.0708916187286377,
0.257657915353775,
0.19594073295593262,
-0.39278846979141235,
0.2895068824291229,
1.5436848402023315,
0.4935258626937866,
1.4108688831329346,
1.3939766883850098,
1.0003154277801514,
-0.7273266911506653,
-1.3939334154129028,
0.7087531089782715,
0.8820645213127136,
-1.4304696321487427,
0.719668447971344,
0.11605772376060486,
-0.4468851387500763,
0.6179943680763245,
1.111785888671875,
0.40333399176597595,
-1.927429437637329,
0.6943865418434143,
-0.915008008480072,
0.7466612458229065,
0.7667853236198425,
0.7823481559753418,
0.25256773829460144,
0.8077247738838196,
-1.288205623626709,
-1.0471339225769043,
-0.7264168858528137,
-0.6717252731323242,
1.9245058298110962,
-0.21636955440044403,
0.6012079119682312,
-0.10830047726631165,
-1.3679012060165405,
-0.11997124552726746,
0.7543767690658569,
0.4272122383117676,
-0.44978758692741394,
0.7186180353164673,
-0.6554666757583618,
-1.075772762298584,
-1.39047372341156,
-0.5837669968605042,
-1.1165568828582764,
-0.9605178833007812,
0.997585654258728,
0.8176716566085815,
0.2736748158931732,
1.8161059617996216,
0.6940008997917175,
0.28535351157188416,
-2.676982879638672,
0.8305097222328186,
0.3528556525707245,
-0.06405574083328247,
0.8030179738998413,
0.4105684161186218,
0.9707432389259338,
-0.05811431631445885,
0.6242930293083191,
-2.48066782951355,
2.3734989166259766,
-0.2716543972492218,
0.6153745651245117,
0.06352521479129791,
-0.25585293769836426,
1.1218427419662476,
0.5512858033180237,
0.4919036626815796,
-1.0903732776641846,
0.6377925276756287,
-0.7125476598739624,
1.244791865348816,
0.8837518692016602,
-0.9062604308128357,
-0.09218422323465347,
1.3945602178573608,
0.47064900398254395,
-0.5156010389328003,
-0.9483441114425659,
-0.9676382541656494,
0.9127504229545593,
1.6946734189987183,
-0.15115295350551605,
-0.13688133656978607,
0.9193275570869446,
0.57779860496521,
-1.2510027885437012,
0.048621222376823425,
-0.762077808380127,
-0.8173421025276184,
1.644002079963684,
2.038954019546509,
-0.08809781074523926,
-0.1782355159521103,
-0.8430084586143494,
-1.141583800315857,
0.7616711854934692,
0.12011657655239105,
-0.055993396788835526,
0.717003345489502,
-0.620649516582489,
1.075800895690918,
0.9152306914329529,
1.006592035293579,
0.236041858792305,
0.31427446007728577,
0.33146563172340393,
-0.3643781244754791,
-1.1774488687515259,
-0.25824645161628723,
-1.158497929573059,
-2.57940936088562,
0.5020341873168945,
-0.2592333257198334,
-1.4690730571746826,
0.04746052622795105,
-1.078716516494751,
0.8824742436408997,
-0.5372172594070435,
-1.0854766368865967,
-1.4100922346115112,
0.2222273051738739,
-0.08939691632986069,
0.935592770576477,
-1.6090574264526367,
-0.09033601731061935,
1.2473875284194946,
0.9251435399055481,
-0.6797245740890503,
0.9536648988723755,
0.1965400129556656,
1.110776424407959,
0.9576358199119568,
-0.32180723547935486,
0.5607430934906006,
0.07766862213611603,
-1.3522205352783203,
0.5086981654167175,
1.110369086265564,
0.18500593304634094,
1.4845867156982422,
-0.5388994812965393,
0.10776069760322571,
0.41268447041511536,
-0.5486358404159546,
-0.4010170102119446,
-0.6579263806343079,
0.7265227437019348,
0.17100757360458374,
-0.9230173826217651,
0.06948231160640717,
-0.0780111774802208,
-0.1258799284696579,
0.1564030796289444,
-1.5311871767044067,
-0.13724885880947113,
-0.22377891838550568,
-0.6058666110038757,
-1.107251524925232,
-0.15251129865646362,
1.399478793144226,
-0.7995554208755493,
-0.18794681131839752,
0.5502385497093201,
0.3796650171279907,
0.582618772983551,
0.5709455609321594,
-0.7502079010009766,
-0.37648120522499084,
-0.29226458072662354,
-0.32905980944633484,
0.33655115962028503,
1.4749726057052612,
-0.011622380465269089,
-1.0421425104141235,
0.7997511625289917,
-0.33072730898857117,
0.018268927931785583,
1.8636448383331299,
0.11519458889961243,
-0.8170590996742249,
0.27333107590675354,
-0.7084754705429077,
1.9820646047592163,
1.753143072128296,
1.1779801845550537,
-0.08271664381027222,
-0.9786590337753296,
0.5736317038536072,
-0.42230287194252014,
-0.37068119645118713,
0.8718546628952026,
0.4157588481903076,
-0.199171245098114,
-1.3715760707855225,
0.6907538771629333,
1.260087251663208,
-0.8390512466430664,
-0.912266194820404,
0.08781345188617706,
-0.7653201222419739,
1.082975149154663,
0.6477000713348389,
0.4542815089225769,
0.2280677855014801,
1.5639599561691284,
0.7127068638801575,
-0.3778674006462097,
0.5482017397880554,
0.4830765128135681,
-0.12213082611560822,
-2.1102542877197266,
-1.1574194431304932,
0.4067622125148773,
-0.5112606287002563,
-1.5981642007827759,
1.2989494800567627,
-1.101901888847351,
-0.8705353140830994,
0.5615302324295044,
0.17577800154685974,
1.5576468706130981,
0.4203246831893921,
1.5652116537094116,
2.013704776763916,
0.9278640151023865,
0.30783867835998535,
1.3447120189666748,
-0.11568090319633484,
-0.4864335060119629,
1.6953996419906616,
-0.41666457056999207,
0.4532233476638794,
1.1098217964172363,
-0.29215627908706665,
-1.0613585710525513,
-0.7594066262245178,
-1.3136013746261597,
-0.6337491869926453,
1.069649577140808,
0.08765924721956253,
-1.162757158279419,
0.23055799305438995,
1.6510260105133057,
0.02874910831451416,
-0.26439377665519714,
0.664742112159729,
0.34850192070007324,
-0.7959800958633423,
0.015600285492837429,
-0.8520480394363403,
0.424194872379303,
-0.1892355978488922,
-0.3435192406177521,
0.3590805232524872,
0.47860538959503174,
1.3116564750671387,
-0.0096035310998559,
0.16568106412887573,
1.1824259757995605,
-1.2990806102752686,
1.4189493656158447,
-0.5956808924674988,
0.23235318064689636,
-2.4172725677490234,
1.3182214498519897,
-0.7904415726661682,
1.8425543308258057,
-2.5758492946624756,
0.37100228667259216,
-0.5449153780937195,
-0.4805642068386078,
0.3078620731830597,
-0.33289164304733276,
0.13272009789943695,
-0.19628047943115234,
-1.1762208938598633,
-0.08920014649629593,
-0.7363961338996887,
0.6061715483665466,
0.9945653676986694,
1.387365698814392,
-1.0873512029647827,
-0.3059200644493103,
-1.8554028272628784,
-0.014658546075224876,
-0.6177820563316345,
0.3387677073478699,
-1.9278486967086792,
-0.17537759244441986,
-1.8600362539291382,
-2.303224563598633,
-1.3881683349609375,
-0.7237297296524048,
1.0586223602294922,
0.0301622673869133,
-0.7485235929489136,
1.1233062744140625,
-0.26555487513542175,
-1.9064332246780396,
0.9968875646591187,
-2.2247650623321533
] |
https://github.com/huggingface/datasets/issues/5381
|
Wrong URL for the_pile dataset
|
Hi! This error can happen if there is a local file/folder with the same name as the requested dataset. And to avoid it, rename the local file/folder.
Soon, it will be possible to explicitly request a Hub dataset as follows:https://github.com/huggingface/datasets/issues/5228#issuecomment-1313494020
|
### Describe the bug
When trying to load `the_pile` dataset from the library, I get a `FileNotFound` error.
### Steps to reproduce the bug
Steps to reproduce:
Run:
```
from datasets import load_dataset
dataset = load_dataset("the_pile")
```
I get the output:
"name": "FileNotFoundError",
"message": "Unable to resolve any data file that matches '['**']' at /storage/store/work/lgrinszt/memorization/the_pile with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'GRIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG', 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF', 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ircam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'OGG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']"
### Expected behavior
`the_pile` dataset should be dowloaded.
### Environment info
- `datasets` version: 2.7.1
- Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.27
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
| 366 | 40 |
Wrong URL for the_pile dataset
### Describe the bug
When trying to load `the_pile` dataset from the library, I get a `FileNotFound` error.
### Steps to reproduce the bug
Steps to reproduce:
Run:
```
from datasets import load_dataset
dataset = load_dataset("the_pile")
```
I get the output:
"name": "FileNotFoundError",
"message": "Unable to resolve any data file that matches '['**']' at /storage/store/work/lgrinszt/memorization/the_pile with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'GRIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG', 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF', 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ircam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'OGG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']"
### Expected behavior
`the_pile` dataset should be dowloaded.
### Environment info
- `datasets` version: 2.7.1
- Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.27
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
Hi! This error can happen if there is a local file/folder with the same name as the requested dataset. And to avoid it, rename the local file/folder.
Soon, it will be possible to explicitly request a Hub dataset as follows:https://github.com/huggingface/datasets/issues/5228#issuecomment-1313494020
|
[
-1.1432254314422607,
-1.2211201190948486,
-0.8732572793960571,
1.7928019762039185,
-0.32185065746307373,
-0.9648703932762146,
-0.057976171374320984,
-0.8220487833023071,
1.4992340803146362,
-0.6081598997116089,
-0.05005406215786934,
-1.7608273029327393,
-0.2303871065378189,
-0.8806447386741638,
-0.48916321992874146,
-0.7239348292350769,
-0.03406081348657608,
-0.8946341276168823,
1.2341910600662231,
2.3355000019073486,
0.778393030166626,
-1.645876407623291,
2.7970197200775146,
0.7354598641395569,
0.06663455069065094,
-1.2620891332626343,
0.5532252788543701,
-0.2548282742500305,
-0.829858660697937,
-0.5711942911148071,
-1.0526971817016602,
0.18361212313175201,
-0.7830120325088501,
-0.20185142755508423,
0.02325648069381714,
0.5833103656768799,
-0.1873100996017456,
-0.5412980318069458,
-0.4616103768348694,
-0.5872815847396851,
0.363197922706604,
-0.5908409953117371,
0.8654813766479492,
-0.1483999341726303,
1.6661996841430664,
-0.10661530494689941,
0.14273686707019806,
0.6091872453689575,
1.404227375984192,
0.3052646517753601,
0.2617647051811218,
0.4113369584083557,
0.3504309058189392,
-0.06342728435993195,
0.6311554312705994,
1.088330626487732,
0.5827649235725403,
0.264823317527771,
0.9069477915763855,
-2.5802249908447266,
1.1410874128341675,
-1.2441285848617554,
0.2965341806411743,
1.3521785736083984,
-0.6644055843353271,
0.7444886565208435,
-1.8043605089187622,
0.2917097806930542,
0.6600228548049927,
-1.940653920173645,
0.5620812773704529,
-1.0810478925704956,
-0.2881397008895874,
0.7173349261283875,
0.45468980073928833,
-1.3719515800476074,
0.2598026990890503,
-0.27995991706848145,
1.1024516820907593,
0.27183252573013306,
0.7740159034729004,
-1.8658233880996704,
0.13240978121757507,
-0.16948208212852478,
0.18152989447116852,
-1.2056556940078735,
-1.5811047554016113,
0.4934130311012268,
0.4846402406692505,
0.8103841543197632,
-0.2029285877943039,
0.946647584438324,
-1.418565034866333,
0.41104423999786377,
-1.0806752443313599,
-1.613901972770691,
-1.1403642892837524,
-2.354417324066162,
-2.2469067573547363,
0.6781144142150879,
-0.42831945419311523,
-0.410053014755249,
1.967721939086914,
-0.6689959168434143,
-1.695772647857666,
1.411421537399292,
0.6542243957519531,
0.1682170331478119,
2.5723228454589844,
0.1533508002758026,
-0.8080868124961853,
0.5001978278160095,
-1.0431721210479736,
0.8792823553085327,
-0.5296775102615356,
1.6083086729049683,
0.34742337465286255,
-0.5758681893348694,
1.8996710777282715,
-0.49284082651138306,
0.6295669078826904,
-0.5874942541122437,
-0.4390336275100708,
-0.9041113257408142,
0.33600491285324097,
1.9229207038879395,
-0.02253129333257675,
1.232653021812439,
-0.6221112608909607,
-1.4385199546813965,
-1.4729124307632446,
1.1684108972549438,
0.04318686202168465,
-1.06650972366333,
0.12768428027629852,
-0.3969614505767822,
0.42596423625946045,
-0.3731590509414673,
1.2036499977111816,
1.303508996963501,
0.418770968914032,
-0.3537173271179199,
-1.0285474061965942,
0.08038768917322159,
-0.5074226260185242,
-0.5824112892150879,
-1.8807512521743774,
-0.22414182126522064,
0.14560891687870026,
0.7987425923347473,
-1.2901841402053833,
1.5254244804382324,
0.777167797088623,
1.9579018354415894,
0.913570761680603,
-0.6321187615394592,
1.4450117349624634,
0.20241883397102356,
1.7712795734405518,
-0.8837375640869141,
0.5419154167175293,
-0.4703980088233948,
-1.0614957809448242,
1.005340576171875,
-0.26096683740615845,
-1.7176010608673096,
-0.7989789247512817,
-0.9730846881866455,
-0.5755097270011902,
-0.7094212770462036,
0.7115839123725891,
-0.6779375672340393,
-1.5663714408874512,
0.3052496314048767,
-0.6323553323745728,
0.4902321696281433,
-1.0336741209030151,
0.21870140731334686,
0.7428979873657227,
-0.4594112038612366,
0.20088070631027222,
-0.3882143497467041,
-1.4470782279968262,
-0.5346959233283997,
0.7569190859794617,
1.8942376375198364,
-0.5753424167633057,
0.655448853969574,
1.0332868099212646,
-0.6467523574829102,
-0.11003440618515015,
0.15854044258594513,
-0.11039650440216064,
0.6073662042617798,
-0.8871983289718628,
-1.0955522060394287,
1.2282893657684326,
-0.42044222354888916,
-0.6596828103065491,
1.270914077758789,
1.0079201459884644,
-1.1937870979309082,
-0.32824820280075073,
-0.26481425762176514,
-0.8094213604927063,
0.04053681716322899,
-1.6041934490203857,
-0.25180572271347046,
0.6216740608215332,
-1.6065385341644287,
-0.4729006290435791,
-0.4527588486671448,
1.0522011518478394,
-0.06427572667598724,
1.230207085609436,
-0.4259999990463257,
-0.1300857812166214,
0.12916360795497894,
-0.746330201625824,
0.4641488790512085,
-0.4118346571922302,
-0.5386790633201599,
-0.13960810005664825,
-0.846111536026001,
0.4768069386482239,
1.5108277797698975,
0.26645833253860474,
-0.12853407859802246,
0.5580705404281616,
1.1591931581497192,
0.651497483253479,
0.47662317752838135,
-0.9263944625854492,
-1.351170301437378,
1.8051985502243042,
-1.7414703369140625,
1.8893580436706543,
0.3895663022994995,
0.03117816150188446,
-1.7179465293884277,
-1.727237343788147,
1.418866753578186,
1.1535753011703491,
1.977247953414917,
0.7432674169540405,
0.32370394468307495,
-1.0556812286376953,
-0.7144619226455688,
-0.01569136418402195,
-0.6816750764846802,
-0.6761631965637207,
0.1990833878517151,
2.440549850463867,
1.8788151741027832,
-0.4904346466064453,
-0.1883581280708313,
-0.8037921786308289,
1.668143391609192,
-0.51828533411026,
0.6300960779190063,
2.0494682788848877,
-0.3035691976547241,
-0.9732303023338318,
1.3182711601257324,
-2.6910207271575928,
0.292241632938385,
2.0639665126800537,
0.2606901526451111,
0.3542497158050537,
-1.3232619762420654,
-0.9229587912559509,
-0.1518067717552185,
-0.27845680713653564,
-1.3034017086029053,
0.5503609776496887,
-0.3685162663459778,
-0.6484216451644897,
-1.6413644552230835,
0.3107348084449768,
-1.1477346420288086,
-1.3552143573760986,
0.16089682281017303,
2.10503888130188,
2.3293676376342773,
-0.8654110431671143,
1.7993727922439575,
0.030825577676296234,
0.4912923574447632,
1.3348920345306396,
1.1299725770950317,
2.6994409561157227,
1.6193054914474487,
-0.9751183390617371,
0.5092114210128784,
-0.19249945878982544,
-0.5860134959220886,
1.1381553411483765,
-0.9262357950210571,
0.9276687502861023,
-0.14387869834899902,
-0.8796147704124451,
-1.179520606994629,
0.7580354809761047,
0.4257745146751404,
-0.09780652076005936,
-0.26460856199264526,
1.0698158740997314,
-0.11361082643270493,
1.0425435304641724,
0.8251239061355591,
-0.44893473386764526,
0.17517314851284027,
-0.42024195194244385,
-0.6848593950271606,
1.4906713962554932,
0.029675085097551346,
-1.5209414958953857,
-1.972128987312317,
-0.3836515545845032,
-0.6924238204956055,
-0.024556845426559448,
-0.4469020366668701,
-1.077387809753418,
1.3072025775909424,
0.19513531029224396,
-0.8580472469329834,
-0.11683639138936996,
-0.28326815366744995,
-0.2949969172477722,
2.631969690322876,
-1.1731840372085571,
-0.6815860867500305,
-0.888885498046875,
-0.6324073076248169,
1.691196084022522,
-0.975557267665863,
-0.05400334671139717,
-1.0084952116012573,
-0.4923681616783142,
-1.4811099767684937,
-0.35013121366500854,
0.05141698569059372,
-0.865030825138092,
1.1284592151641846,
0.6645765900611877,
-1.0506125688552856,
-0.2580992877483368,
-1.0177463293075562,
0.9416977763175964,
-0.2817814350128174,
0.3342908024787903,
1.9037922620773315,
0.2686834931373596,
-0.29960495233535767,
1.081807255744934,
0.9950868487358093,
0.6344984173774719,
-0.5396701097488403,
0.06384266912937164,
-0.3555375933647156,
0.580218493938446,
-1.3495229482650757,
0.11534683406352997,
-2.9799962043762207,
0.5345978140830994,
-0.022906694561243057,
-0.274625301361084,
0.051681846380233765,
-1.425917625427246,
1.1734298467636108,
2.2615761756896973,
-1.3795875310897827,
0.6509882807731628,
0.35541051626205444,
1.77480149269104,
-1.7361459732055664,
0.26244527101516724,
-0.3243265748023987,
2.2313649654388428,
-0.11745769530534744,
1.0697517395019531,
-0.5884650349617004,
-2.6882288455963135,
0.44814980030059814,
-1.284031867980957,
-0.9385941028594971,
0.23245131969451904,
-0.998005211353302,
0.3175174593925476,
-1.9142017364501953,
-0.3196347951889038,
-1.079579472541809,
-1.2436730861663818,
0.6916266679763794,
0.22477981448173523,
0.037734635174274445,
-0.6269776821136475,
0.47549498081207275,
-1.996881127357483,
-1.6586819887161255,
-0.09364362061023712,
-0.8370466828346252,
0.7719671130180359,
-0.5189991593360901,
0.7543928623199463,
-0.19492699205875397,
-0.0068444921635091305,
0.0031423326581716537,
1.68595552444458,
3.540714979171753,
0.07240532338619232,
0.39722174406051636,
-0.13417638838291168,
-0.8767357468605042,
1.4255226850509644,
1.05293607711792,
-0.11399450898170471,
-0.4072182774543762,
-1.2817271947860718,
1.606961965560913,
2.1716535091400146,
0.728622555732727,
0.018346332013607025,
-0.43237245082855225,
-0.39588236808776855,
-0.036249443888664246,
0.28523218631744385,
0.5828967094421387,
0.7158466577529907,
-0.018194306641817093,
-0.12830498814582825,
1.2351223230361938,
1.1269562244415283,
-0.4228355884552002,
0.1956140697002411,
-0.9774861335754395,
-0.2676272988319397,
0.6183611750602722,
-0.1455984264612198,
-0.2703647017478943,
0.3054512143135071,
-1.0022140741348267,
-0.2704964876174927,
-0.3120613694190979,
-0.8180710077285767,
-0.6427093148231506,
-0.326509952545166,
-0.30780911445617676,
1.3810487985610962,
0.717965304851532,
-0.8460410237312317,
-0.10099660605192184,
-0.46482372283935547,
0.05724044889211655,
-1.0253835916519165,
-0.24234554171562195,
-0.40013235807418823,
-0.22843506932258606,
-0.3796154856681824,
1.7137430906295776,
-0.8273775577545166,
-1.9692033529281616,
-0.3009897470474243,
0.754319965839386,
0.17686225473880768,
0.2857229709625244,
1.7426754236221313,
0.3736962676048279,
1.5606310367584229,
1.3199965953826904,
0.9588534832000732,
-0.5735047459602356,
-1.3829320669174194,
0.5295677781105042,
1.0351142883300781,
-1.1403837203979492,
0.9697757363319397,
0.08531654626131058,
-0.667040228843689,
0.6659966707229614,
1.5347334146499634,
0.35771840810775757,
-1.9981493949890137,
0.7916491627693176,
-1.3710118532180786,
0.9901025891304016,
0.7981305122375488,
0.907728374004364,
0.41820651292800903,
0.7532125115394592,
-1.119834542274475,
-1.0872809886932373,
-1.009690523147583,
-0.8408821225166321,
1.9916051626205444,
-0.30567681789398193,
0.5111756920814514,
0.16578775644302368,
-1.1625064611434937,
-0.06480322778224945,
0.6366518139839172,
0.5327584743499756,
-0.3468558192253113,
0.8179119229316711,
-0.885550320148468,
-1.3162370920181274,
-1.4063328504562378,
-0.49582862854003906,
-0.944797694683075,
-1.1354165077209473,
0.8924679160118103,
0.8430565595626831,
0.31016987562179565,
1.7605347633361816,
0.6972178816795349,
0.02379833161830902,
-2.2447309494018555,
1.0087027549743652,
0.342678964138031,
-0.280875563621521,
0.5632710456848145,
0.40479737520217896,
1.3314180374145508,
0.04869607836008072,
0.5786870121955872,
-2.061225414276123,
2.0279135704040527,
-0.17770418524742126,
0.8848719596862793,
-0.3264296054840088,
0.06314357370138168,
1.0326305627822876,
0.32391589879989624,
0.5678877234458923,
-0.899137556552887,
0.610166072845459,
-0.4532506465911865,
1.2912287712097168,
1.204081416130066,
-0.6899896860122681,
0.04482383280992508,
1.4414254426956177,
0.26486772298812866,
-0.9866668581962585,
-1.046627402305603,
-0.7330265641212463,
0.8382871150970459,
1.6054471731185913,
-0.36133819818496704,
-0.13446828722953796,
0.7438251376152039,
0.4927070736885071,
-1.242064356803894,
-0.061594635248184204,
-0.41365551948547363,
-0.4223001003265381,
1.9275882244110107,
1.9200197458267212,
-0.5708989500999451,
-0.02061939798295498,
-0.7119410037994385,
-1.4229456186294556,
0.39869552850723267,
0.03126371651887894,
-0.031546272337436676,
0.7948784828186035,
-0.6261385679244995,
0.8067975640296936,
0.46971797943115234,
0.7989082336425781,
0.009188797324895859,
0.42644935846328735,
0.6215609312057495,
-0.6575816869735718,
-0.9962659478187561,
-0.344893217086792,
-1.3472727537155151,
-2.470216989517212,
0.25603920221328735,
-0.03080219216644764,
-1.3615562915802002,
0.06657811254262924,
-0.7442513704299927,
1.456431269645691,
-0.45225411653518677,
-1.3291288614273071,
-1.1565825939178467,
0.37166011333465576,
0.09301470220088959,
0.7455528378486633,
-1.8652384281158447,
-0.04458802193403244,
1.347117304801941,
1.0615860223770142,
-0.7598662376403809,
1.1498692035675049,
0.42460405826568604,
1.168293833732605,
0.44067639112472534,
-0.3339502811431885,
0.5828767418861389,
-0.3872702121734619,
-1.180692434310913,
0.5930135846138,
1.1947513818740845,
0.07081297785043716,
1.1050889492034912,
-0.29384952783584595,
-0.2352369725704193,
0.4075806140899658,
-0.6958127021789551,
-0.3662365674972534,
-0.09392202645540237,
0.44107335805892944,
-0.08679459244012833,
-0.5429049730300903,
0.024684760719537735,
0.2431606501340866,
-0.34917712211608887,
0.09039517492055893,
-1.5401248931884766,
-0.4432653784751892,
-0.48273372650146484,
-0.2468727082014084,
-1.2878165245056152,
-0.06846202909946442,
1.3397279977798462,
-0.31117963790893555,
-0.5227680802345276,
0.7152649164199829,
0.37958621978759766,
0.3703169822692871,
0.4515465497970581,
-0.7170993685722351,
-0.2814295291900635,
-0.12261355668306351,
-0.32406336069107056,
0.11364713311195374,
1.378273844718933,
-0.1977016180753708,
-1.1105862855911255,
0.5880143642425537,
-0.3608032464981079,
-0.10663343966007233,
1.4583008289337158,
-0.20611034333705902,
-0.9515557289123535,
0.12437428534030914,
-0.8504670262336731,
2.060698986053467,
1.6548864841461182,
1.1049035787582397,
-0.35134345293045044,
-0.6618474721908569,
0.7835391759872437,
-0.3385102152824402,
-0.3637024760246277,
0.6359151601791382,
0.3880496621131897,
-0.22753046452999115,
-1.3091332912445068,
0.7966955304145813,
1.0620001554489136,
-0.7290146350860596,
-0.8449468016624451,
0.27081024646759033,
-0.7122161984443665,
1.3276100158691406,
0.6187058091163635,
0.37162625789642334,
0.13009504973888397,
1.8900147676467896,
0.8716205954551697,
-0.6413825154304504,
0.7374197244644165,
0.7031897902488708,
-0.3949205279350281,
-2.070711612701416,
-1.3573333024978638,
-0.07341238111257553,
-0.4476093053817749,
-1.7451725006103516,
1.254287600517273,
-0.8610344529151917,
-0.7824490666389465,
0.6241629719734192,
0.16387225687503815,
1.1534826755523682,
0.6697098612785339,
1.085982322692871,
1.9618417024612427,
0.5042349696159363,
0.695999801158905,
1.209243655204773,
-0.34529930353164673,
-0.6671633124351501,
2.0103659629821777,
-0.3332374095916748,
0.6350548267364502,
1.1921170949935913,
-0.27867335081100464,
-1.1227588653564453,
-0.5628684163093567,
-1.2408267259597778,
-0.452608585357666,
1.1058971881866455,
0.04568522423505783,
-1.1205803155899048,
0.31952667236328125,
1.5218325853347778,
0.045402951538562775,
-0.6210151314735413,
0.8781496286392212,
0.5294740796089172,
-0.9380466938018799,
0.00188459362834692,
-0.8777320981025696,
0.5041673183441162,
-0.3508366346359253,
0.027580056339502335,
0.5085177421569824,
0.4145745038986206,
1.5129528045654297,
0.0053410157561302185,
0.32033830881118774,
0.9387573003768921,
-1.3566296100616455,
1.5704134702682495,
-0.8748617768287659,
0.33289575576782227,
-2.3732411861419678,
1.0371438264846802,
-0.6352064609527588,
2.3014962673187256,
-2.603832960128784,
0.362995982170105,
-0.6744817495346069,
-0.5427315831184387,
0.2566497325897217,
-0.3339999318122864,
-0.09267304092645645,
0.11745734512805939,
-1.0274144411087036,
0.27314966917037964,
-0.5316255688667297,
0.2872546315193176,
1.2579838037490845,
1.3687670230865479,
-0.9948263168334961,
-0.04698028042912483,
-1.7115929126739502,
-0.19780774414539337,
-0.877586305141449,
0.4093031883239746,
-2.228256940841675,
-0.40778303146362305,
-1.7209595441818237,
-2.0748701095581055,
-1.1651555299758911,
-0.8778135180473328,
1.2932112216949463,
-0.09723447263240814,
-0.9801995754241943,
1.7427606582641602,
-0.05838029086589813,
-1.7324292659759521,
1.0132324695587158,
-1.7840672731399536
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
Hi! I agree `skip` can be inefficient to use in the current state.
To make it fast, we could use "statistics" stored in Parquet metadata and read only the chunks needed to form a dataset.
And thanks to the "datasets-server" project, which aims to store the Parquet versions of the Hub datasets (only the smaller datasets are covered currently), this solution can also be applied to datasets stored in formats other than Parquet. (cc @severo)
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 75 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Hi! I agree `skip` can be inefficient to use in the current state.
To make it fast, we could use "statistics" stored in Parquet metadata and read only the chunks needed to form a dataset.
And thanks to the "datasets-server" project, which aims to store the Parquet versions of the Hub datasets (only the smaller datasets are covered currently), this solution can also be applied to datasets stored in formats other than Parquet. (cc @severo)
|
[
-1.2274943590164185,
-0.9124903678894043,
-0.7533583641052246,
1.467544674873352,
-0.15666110813617706,
-1.300691843032837,
0.10872672498226166,
-1.1673073768615723,
1.7051230669021606,
-0.8363287448883057,
0.3156016767024994,
-1.705657720565796,
0.07431887835264206,
-0.6132233738899231,
-0.8139675855636597,
-0.9025027751922607,
-0.5029633641242981,
-0.7245727777481079,
0.9104322791099548,
2.5497677326202393,
1.1414158344268799,
-1.4513684511184692,
2.676764726638794,
0.6847062706947327,
-0.08808105438947678,
-1.0080592632293701,
0.5365771055221558,
-0.00457437289878726,
-1.26799476146698,
-0.498403936624527,
-0.9171436429023743,
-0.07708017528057098,
-0.607948362827301,
-0.5763499140739441,
-0.012153279967606068,
0.3907073438167572,
-0.3236331641674042,
-0.4506969153881073,
-0.47663414478302,
-0.7948780655860901,
0.44810155034065247,
-0.36664456129074097,
1.0253397226333618,
-0.38076964020729065,
1.8896926641464233,
-0.5302067399024963,
0.48250818252563477,
0.7194058299064636,
1.4219821691513062,
0.17661458253860474,
-0.03352855518460274,
0.28453555703163147,
0.3916565179824829,
-0.07347023487091064,
0.45768922567367554,
1.0882782936096191,
0.6338748931884766,
0.5200079679489136,
0.7013964056968689,
-2.1494600772857666,
1.309127926826477,
-1.0797059535980225,
0.3695172071456909,
1.391899824142456,
-0.9062044024467468,
0.41059908270835876,
-1.7864817380905151,
-0.06291704624891281,
0.6133520603179932,
-2.211604118347168,
0.198831707239151,
-1.248650074005127,
-0.45416444540023804,
1.0820283889770508,
0.3269592821598053,
-1.2334281206130981,
0.165719136595726,
-0.4049631357192993,
1.0264145135879517,
0.4886970818042755,
1.1928919553756714,
-1.6720325946807861,
0.014596440829336643,
-0.28627365827560425,
0.06295480579137802,
-1.256994366645813,
-1.4756535291671753,
0.5021067261695862,
0.644799530506134,
0.5105852484703064,
-0.0346493199467659,
0.9389406442642212,
-0.9535340666770935,
0.7525282502174377,
-0.8882458209991455,
-1.6231482028961182,
-1.398173451423645,
-2.241563558578491,
-2.36798357963562,
0.759824812412262,
-0.49988260865211487,
-0.5289537310600281,
2.0669443607330322,
-1.010209560394287,
-1.7410378456115723,
1.212956190109253,
0.24948960542678833,
-0.07615289092063904,
2.4226796627044678,
0.15720181167125702,
-0.721828043460846,
0.45202797651290894,
-0.6346691250801086,
0.7142435908317566,
-0.504595160484314,
1.3671159744262695,
0.417386531829834,
-1.14988112449646,
1.5867962837219238,
-0.5128593444824219,
0.590740442276001,
-0.6558817625045776,
-0.4488109052181244,
-0.766950249671936,
0.45379385352134705,
1.8314542770385742,
-0.2556034326553345,
1.5279269218444824,
-0.2804442048072815,
-1.5945372581481934,
-1.661417007446289,
0.9510584473609924,
0.44980937242507935,
-0.7082048058509827,
0.09847280383110046,
-0.29460960626602173,
0.1147693619132042,
-0.016561618074774742,
1.1165560483932495,
1.2161898612976074,
0.6983610391616821,
-0.34457913041114807,
-0.904358446598053,
0.24146127700805664,
-0.07715007662773132,
-0.7544136047363281,
-1.7803722620010376,
-0.3048821687698364,
0.15383872389793396,
0.6069615483283997,
-1.1417255401611328,
1.785517930984497,
0.932231068611145,
1.843640685081482,
1.001684546470642,
-0.3006124198436737,
1.477319598197937,
0.050674114376306534,
1.8669463396072388,
-0.4217853248119354,
0.7490372657775879,
-0.3422464430332184,
-1.1700451374053955,
0.8265783786773682,
-0.33652323484420776,
-2.05218768119812,
-0.7924736142158508,
-0.8347541093826294,
-0.18867655098438263,
-0.684669554233551,
1.0046814680099487,
-0.2151220440864563,
-1.2874716520309448,
0.3513403832912445,
-0.6573384404182434,
0.16006876528263092,
-1.2433929443359375,
0.386351078748703,
0.7300992608070374,
-0.684674084186554,
0.043376706540584564,
-0.2946164906024933,
-1.2603187561035156,
-0.4382290840148926,
0.21501344442367554,
1.8365694284439087,
-0.822890043258667,
0.8426975011825562,
1.069216012954712,
-0.6962098479270935,
-0.0469067357480526,
0.4039779305458069,
-0.32432466745376587,
0.856879711151123,
-1.075205683708191,
-0.3687540590763092,
1.2855027914047241,
-0.2377435714006424,
-0.5735917091369629,
1.4721434116363525,
0.6931102275848389,
-1.0371195077896118,
-0.0804862529039383,
-0.23905710875988007,
-0.8895241022109985,
0.006485080346465111,
-1.5912623405456543,
-0.02672532945871353,
0.3146975636482239,
-1.5192646980285645,
-0.4762340486049652,
-0.1880764663219452,
1.3054566383361816,
-0.14715106785297394,
1.5063276290893555,
-0.3778221905231476,
-0.19298607110977173,
-0.4426726996898651,
-0.3831096291542053,
0.1344173699617386,
-0.17523841559886932,
-0.6014725565910339,
0.22347235679626465,
-0.7344440817832947,
0.3287472724914551,
1.430617094039917,
0.35746681690216064,
0.07726679742336273,
0.5297619700431824,
1.1113475561141968,
0.3204692602157593,
-0.09696685522794724,
-0.8533753156661987,
-1.5287588834762573,
2.056654214859009,
-1.4294697046279907,
1.94195556640625,
0.7923753261566162,
0.03181157261133194,
-1.7450971603393555,
-1.796024203300476,
1.3777369260787964,
1.1496225595474243,
2.394022226333618,
0.5385059118270874,
0.3603402376174927,
-0.857146143913269,
-0.6340082287788391,
0.3671110272407532,
-1.0466736555099487,
-0.7932732701301575,
0.10704942047595978,
2.318671703338623,
1.8424323797225952,
-0.4678647220134735,
-0.1675507128238678,
-1.0769550800323486,
1.3687872886657715,
-0.20173195004463196,
0.13399817049503326,
2.022693395614624,
-0.3201584815979004,
-1.073682188987732,
1.2490140199661255,
-2.367063045501709,
0.04719133675098419,
1.9285259246826172,
0.24600279331207275,
0.08163073658943176,
-1.4266031980514526,
-0.6035414934158325,
-0.18906284868717194,
-0.3145587742328644,
-1.224591612815857,
0.5639849901199341,
-0.3032659590244293,
-0.6716022491455078,
-1.4960038661956787,
0.2020648568868637,
-1.1730486154556274,
-1.6478852033615112,
0.21831166744232178,
1.7741156816482544,
2.028470277786255,
-0.7723252177238464,
1.6227020025253296,
-0.21400749683380127,
0.1561613231897354,
1.233126163482666,
1.1894941329956055,
3.1749751567840576,
1.9183931350708008,
-1.3684450387954712,
0.5843051671981812,
-0.12313991039991379,
-0.5085391998291016,
1.1215567588806152,
-1.1711174249649048,
1.3456846475601196,
-0.19786745309829712,
-1.2176299095153809,
-1.2243125438690186,
0.943997323513031,
0.48818618059158325,
0.14824701845645905,
-0.5178622007369995,
1.142848253250122,
0.08945462107658386,
1.3376959562301636,
0.4510246515274048,
-0.34833431243896484,
0.6127452850341797,
-0.4652367830276489,
-0.5780110955238342,
1.502910852432251,
0.2651543915271759,
-1.4251950979232788,
-2.292522430419922,
-0.2096990942955017,
-0.8429306149482727,
0.018763858824968338,
-0.6405588984489441,
-0.900765061378479,
1.619246482849121,
0.38291314244270325,
-1.2829853296279907,
-0.3256288766860962,
-0.3179510831832886,
-0.6507803201675415,
2.6670327186584473,
-1.439046025276184,
-0.28982606530189514,
-0.9468323588371277,
-0.663704514503479,
1.6297311782836914,
-1.182515263557434,
-0.14400628209114075,
-1.055446982383728,
-0.5763236284255981,
-1.2883367538452148,
-0.5878862142562866,
0.008130417205393314,
-0.9716861248016357,
0.8350824117660522,
0.2064218372106552,
-1.2304952144622803,
-0.32545357942581177,
-0.8533803820610046,
0.7847453951835632,
-0.06595806777477264,
0.3086380362510681,
1.8220924139022827,
0.48200350999832153,
-0.4264785647392273,
0.6935338377952576,
1.1812912225723267,
0.6401813626289368,
-0.6263118982315063,
0.21404460072517395,
-0.7532916069030762,
0.29881373047828674,
-1.3152791261672974,
0.34750744700431824,
-2.8115901947021484,
0.5792852640151978,
-0.11656001210212708,
-0.054178353399038315,
0.028681807219982147,
-1.253440499305725,
1.0027483701705933,
2.646853446960449,
-1.1936845779418945,
0.44105401635169983,
0.27172693610191345,
1.260014295578003,
-1.5896317958831787,
0.35592344403266907,
-0.36495673656463623,
2.16170597076416,
0.09598394483327866,
1.1102383136749268,
-0.44452965259552,
-2.2580831050872803,
0.6009031534194946,
-1.2929496765136719,
-1.2552748918533325,
0.8452957272529602,
-0.8318560123443604,
-0.054065097123384476,
-1.3851258754730225,
-0.12337992340326309,
-0.7976612448692322,
-1.2254114151000977,
0.8342260122299194,
0.1284889131784439,
0.46965524554252625,
-0.6162461638450623,
0.3192773163318634,
-2.1922802925109863,
-1.3333345651626587,
-0.3453282117843628,
-0.8663992881774902,
0.3773379623889923,
-0.2931971549987793,
0.7571132779121399,
-0.2822107672691345,
0.016538109630346298,
0.35068279504776,
1.370942234992981,
3.4093644618988037,
0.227810338139534,
0.43085339665412903,
-0.15157775580883026,
-0.9115063548088074,
1.4079324007034302,
0.9293276071548462,
-0.19631098210811615,
-0.5761741995811462,
-1.0074964761734009,
1.2376188039779663,
1.8793126344680786,
0.9379668235778809,
0.08649826794862747,
-0.8067158460617065,
-0.6672965288162231,
-0.10250864923000336,
0.1614917367696762,
0.4529034197330475,
0.8669946789741516,
0.012605185620486736,
0.05215980485081673,
1.3985193967819214,
1.250362515449524,
-0.42054545879364014,
0.3883591592311859,
-0.733511209487915,
-0.4937160015106201,
0.5678204894065857,
0.37233179807662964,
-0.023119620978832245,
0.26451632380485535,
-0.9617365598678589,
-0.21791602671146393,
-0.4631860852241516,
-0.9989669919013977,
-0.6837955117225647,
-0.5144861936569214,
-0.34348514676094055,
1.6978962421417236,
0.14200662076473236,
-0.5286805033683777,
0.03537951037287712,
-0.8323960304260254,
-0.06590086221694946,
-1.0575884580612183,
0.2587513327598572,
-0.09050691872835159,
-0.15707923471927643,
-0.04803192988038063,
1.8020378351211548,
-1.0066999197006226,
-2.0837719440460205,
0.2725151479244232,
0.21647213399410248,
-0.3363879919052124,
0.21675947308540344,
1.6171190738677979,
0.5335392355918884,
1.4983073472976685,
1.383516788482666,
0.9417153596878052,
-0.7452989816665649,
-1.3833825588226318,
0.7026997208595276,
1.0126259326934814,
-1.5260502099990845,
0.8197901844978333,
0.10869760066270828,
-0.5257866382598877,
0.6790551543235779,
1.1818087100982666,
0.37125080823898315,
-1.9839041233062744,
0.8133792281150818,
-0.8578095436096191,
0.7209122180938721,
0.6695185899734497,
0.6659820675849915,
0.15233369171619415,
0.7236790657043457,
-1.2109417915344238,
-1.223524570465088,
-0.782346248626709,
-0.6861311197280884,
1.9274910688400269,
-0.1899212896823883,
0.5997272729873657,
-0.15693941712379456,
-1.3613876104354858,
-0.06588517129421234,
0.7173572778701782,
0.3501608967781067,
-0.3926338255405426,
0.806257963180542,
-0.7392844557762146,
-1.133076786994934,
-1.4954426288604736,
-0.4322401285171509,
-1.072258710861206,
-0.8523826599121094,
1.0901943445205688,
0.8362346291542053,
0.19252024590969086,
1.8517743349075317,
0.683715283870697,
0.2160114347934723,
-2.601919412612915,
0.8920159339904785,
0.3343713879585266,
-0.10070952773094177,
0.8576813340187073,
0.33262109756469727,
0.9379571676254272,
-0.012023763731122017,
0.4928053319454193,
-2.484318971633911,
2.3175208568573,
-0.2781287729740143,
0.6950750350952148,
0.05440867692232132,
-0.2648667097091675,
1.0760084390640259,
0.5651265978813171,
0.5344942212104797,
-1.030774474143982,
0.7049967646598816,
-0.6044767498970032,
1.2179944515228271,
0.9222853183746338,
-0.8179718255996704,
-0.07421835511922836,
1.286176323890686,
0.5148482918739319,
-0.5010498762130737,
-0.9139270782470703,
-0.9501259326934814,
0.9441863894462585,
1.764836072921753,
-0.08209729939699173,
0.04785257205367088,
0.7965936064720154,
0.660966157913208,
-1.3179081678390503,
0.10469093173742294,
-0.835371196269989,
-0.8225867748260498,
1.5622249841690063,
1.9910882711410522,
-0.07177815586328506,
-0.21552497148513794,
-0.8256685733795166,
-1.2393378019332886,
0.8343822956085205,
0.002172592096030712,
0.14905114471912384,
0.6978041529655457,
-0.6848341822624207,
1.0527042150497437,
1.0136401653289795,
0.8338989019393921,
0.24347203969955444,
0.20777422189712524,
0.4357132315635681,
-0.2723747193813324,
-1.04324471950531,
-0.18233375251293182,
-1.0857255458831787,
-2.536783456802368,
0.4904398024082184,
-0.21697524189949036,
-1.4743187427520752,
-0.029196538031101227,
-0.9864212274551392,
0.9747358560562134,
-0.4921773076057434,
-1.109058141708374,
-1.5698726177215576,
0.19622214138507843,
-0.01795020140707493,
0.9318272471427917,
-1.5679548978805542,
-0.09156268835067749,
1.1350287199020386,
0.9425476789474487,
-0.6601359248161316,
1.003740668296814,
0.22819578647613525,
1.0620726346969604,
0.8863734602928162,
-0.39036062359809875,
0.5027613043785095,
0.043503981083631516,
-1.3619108200073242,
0.4077305793762207,
1.111164927482605,
0.19546613097190857,
1.362472414970398,
-0.5366553068161011,
0.04696512594819069,
0.2909902334213257,
-0.48886772990226746,
-0.4757668077945709,
-0.5646244287490845,
0.6766111254692078,
0.048795685172080994,
-0.8114380836486816,
0.0913151428103447,
-0.09179320186376572,
-0.25856512784957886,
0.16755154728889465,
-1.5241577625274658,
-0.19574053585529327,
-0.326128214597702,
-0.5316036939620972,
-1.2205771207809448,
-0.05532136932015419,
1.420966625213623,
-0.7853090763092041,
-0.23379378020763397,
0.579398512840271,
0.4392291307449341,
0.5003294944763184,
0.6242930293083191,
-0.652216911315918,
-0.31783756613731384,
-0.26761293411254883,
-0.3311266601085663,
0.30767855048179626,
1.3695566654205322,
-0.12248292565345764,
-0.8619022369384766,
0.7696641683578491,
-0.3198222815990448,
0.015801846981048584,
1.9244261980056763,
0.18834459781646729,
-0.8914011120796204,
0.33561834692955017,
-0.6909973621368408,
1.9393806457519531,
1.7941340208053589,
1.309576153755188,
-0.15860234200954437,
-1.0467437505722046,
0.6303258538246155,
-0.3739619553089142,
-0.365326464176178,
0.9491615891456604,
0.4579455852508545,
-0.17727701365947723,
-1.436694860458374,
0.6130858659744263,
1.168819785118103,
-0.7419219613075256,
-0.7512725591659546,
0.015067930333316326,
-0.8304221034049988,
0.9883425831794739,
0.7712119221687317,
0.48955151438713074,
0.20039811730384827,
1.6320244073867798,
0.8066240549087524,
-0.5279204845428467,
0.5406001806259155,
0.5029727220535278,
-0.12988558411598206,
-2.0774073600769043,
-1.1653770208358765,
0.2668687701225281,
-0.464804083108902,
-1.5635799169540405,
1.3482586145401,
-1.2051186561584473,
-0.9387544989585876,
0.4953148066997528,
0.023785673081874847,
1.5114288330078125,
0.34573280811309814,
1.5394254922866821,
2.066786289215088,
1.0223426818847656,
0.3651965856552124,
1.3710051774978638,
-0.09317610412836075,
-0.3744743764400482,
1.9103556871414185,
-0.4316525459289551,
0.38455918431282043,
1.1348761320114136,
-0.3637546896934509,
-1.027552843093872,
-0.7236012816429138,
-1.1305192708969116,
-0.6938252449035645,
1.1909300088882446,
0.09165632724761963,
-1.0608209371566772,
0.2576477825641632,
1.604764699935913,
0.04082435742020607,
-0.356748104095459,
0.5521142482757568,
0.48600494861602783,
-0.8097599744796753,
0.004328041337430477,
-0.8827432990074158,
0.5412489771842957,
-0.15245532989501953,
-0.3624992072582245,
0.43491309881210327,
0.4296443462371826,
1.3735589981079102,
0.032476648688316345,
0.22639089822769165,
1.1473636627197266,
-1.450081706047058,
1.4360947608947754,
-0.6840776801109314,
0.2604462206363678,
-2.3362514972686768,
1.4337772130966187,
-0.7804866433143616,
1.8857263326644897,
-2.662476062774658,
0.4093528389930725,
-0.6389952301979065,
-0.49425655603408813,
0.3891080617904663,
-0.4046482443809509,
0.15158532559871674,
-0.1445557177066803,
-1.1739296913146973,
-0.14374005794525146,
-0.5671152472496033,
0.6414992809295654,
1.0741065740585327,
1.3483240604400635,
-1.0761045217514038,
-0.3448926508426666,
-1.7375035285949707,
-0.22392943501472473,
-0.6471558213233948,
0.30518826842308044,
-1.960168480873108,
-0.18321853876113892,
-1.88932466506958,
-2.358616352081299,
-1.4386646747589111,
-0.8001609444618225,
1.148725152015686,
0.1810722053050995,
-0.9311982989311218,
1.2057315111160278,
-0.47282323241233826,
-1.8716328144073486,
1.1144814491271973,
-2.172421455383301
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
@mariosasko do the current parquet files created by the datasets-server already have the required "statistics"? If not, please open an issue on https://github.com/huggingface/datasets-server with some details to make sure we implement it.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 32 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@mariosasko do the current parquet files created by the datasets-server already have the required "statistics"? If not, please open an issue on https://github.com/huggingface/datasets-server with some details to make sure we implement it.
|
[
-1.2342714071273804,
-0.9034605026245117,
-0.7973090410232544,
1.4881747961044312,
-0.1418568342924118,
-1.3189365863800049,
0.11679156124591827,
-1.119535207748413,
1.722557544708252,
-0.8398538827896118,
0.3317399024963379,
-1.7266713380813599,
0.10830366611480713,
-0.6023262143135071,
-0.837938666343689,
-0.8823213577270508,
-0.4474083483219147,
-0.7231711745262146,
0.9340496063232422,
2.54172682762146,
1.1939467191696167,
-1.4154082536697388,
2.6845321655273438,
0.7053016424179077,
-0.12213916331529617,
-1.0226129293441772,
0.5127137899398804,
-0.031741704791784286,
-1.2145711183547974,
-0.5106679201126099,
-0.9297635555267334,
-0.06109745427966118,
-0.5620356202125549,
-0.6049350500106812,
-0.01747039332985878,
0.4060073494911194,
-0.35281479358673096,
-0.4309692084789276,
-0.4834262430667877,
-0.8315674662590027,
0.413936972618103,
-0.3731008470058441,
0.9718522429466248,
-0.3982478380203247,
1.8955961465835571,
-0.5147387385368347,
0.4685681462287903,
0.7044233679771423,
1.418528437614441,
0.183151513338089,
-0.05804206058382988,
0.27142059803009033,
0.3790184259414673,
-0.043377459049224854,
0.4312991201877594,
1.0729700326919556,
0.6341647505760193,
0.5222527384757996,
0.7039644122123718,
-2.1912598609924316,
1.335687518119812,
-1.0683565139770508,
0.288534551858902,
1.3733757734298706,
-0.9234169125556946,
0.3680400550365448,
-1.763350248336792,
-0.03883904218673706,
0.5840231776237488,
-2.2485227584838867,
0.2272670865058899,
-1.2314225435256958,
-0.45447874069213867,
1.0637319087982178,
0.3157585859298706,
-1.2828483581542969,
0.14624325931072235,
-0.40581628680229187,
1.0299679040908813,
0.5097817182540894,
1.1888543367385864,
-1.6789624691009521,
-0.01350303366780281,
-0.2673165202140808,
0.06712087243795395,
-1.30806565284729,
-1.4815270900726318,
0.4931831955909729,
0.6285209655761719,
0.5243122577667236,
-0.039613332599401474,
0.9208192229270935,
-0.9376810193061829,
0.7906199097633362,
-0.9003732204437256,
-1.598978042602539,
-1.378692865371704,
-2.2776660919189453,
-2.356585741043091,
0.748192548751831,
-0.4800100028514862,
-0.5224932432174683,
2.0324530601501465,
-1.0176523923873901,
-1.7462142705917358,
1.1961129903793335,
0.260789692401886,
-0.07316569238901138,
2.4148361682891846,
0.17393334209918976,
-0.7231464385986328,
0.42145854234695435,
-0.6549654603004456,
0.6986392140388489,
-0.5449073910713196,
1.3866053819656372,
0.46042096614837646,
-1.1479969024658203,
1.6251728534698486,
-0.5047257542610168,
0.5344395041465759,
-0.6763122081756592,
-0.4252522885799408,
-0.793325662612915,
0.4471704959869385,
1.838227391242981,
-0.3048902750015259,
1.5623741149902344,
-0.3036278784275055,
-1.55048406124115,
-1.6420483589172363,
0.9290587306022644,
0.42173337936401367,
-0.7381558418273926,
0.1681334674358368,
-0.30673399567604065,
0.15384913980960846,
-0.07675472646951675,
1.0457630157470703,
1.1956452131271362,
0.7154972553253174,
-0.3309263288974762,
-0.8973214626312256,
0.29320114850997925,
-0.061507366597652435,
-0.7391341328620911,
-1.7988215684890747,
-0.3345804512500763,
0.1432507187128067,
0.6506443023681641,
-1.1233659982681274,
1.7801457643508911,
0.9187623858451843,
1.8781843185424805,
0.9629454016685486,
-0.3111270070075989,
1.4589173793792725,
0.04360971227288246,
1.907039761543274,
-0.48405295610427856,
0.7637674808502197,
-0.3050861358642578,
-1.1529541015625,
0.811745285987854,
-0.30694982409477234,
-2.024200916290283,
-0.7616441249847412,
-0.8437864780426025,
-0.18364228308200836,
-0.7474116086959839,
1.0309836864471436,
-0.20418806374073029,
-1.2798404693603516,
0.3514656722545624,
-0.6490132808685303,
0.1641707867383957,
-1.3014075756072998,
0.3515644371509552,
0.7336856722831726,
-0.6297459602355957,
0.08035525679588318,
-0.2719234824180603,
-1.257071614265442,
-0.4674667716026306,
0.19922271370887756,
1.85845947265625,
-0.8034983277320862,
0.8726372122764587,
1.0548827648162842,
-0.7093789577484131,
-0.02239309623837471,
0.48993557691574097,
-0.35674968361854553,
0.8326337337493896,
-1.045175552368164,
-0.3783256411552429,
1.3291783332824707,
-0.2887166440486908,
-0.5579800605773926,
1.4494003057479858,
0.7284884452819824,
-1.0159776210784912,
-0.050632182508707047,
-0.22711031138896942,
-0.8776668906211853,
0.023479443043470383,
-1.5987653732299805,
-0.04809039086103439,
0.3210177719593048,
-1.4965938329696655,
-0.44599267840385437,
-0.16506211459636688,
1.2922419309616089,
-0.16469644010066986,
1.5036046504974365,
-0.3723427653312683,
-0.19420839846134186,
-0.39842939376831055,
-0.3260411024093628,
0.1299697458744049,
-0.1692340075969696,
-0.6109684109687805,
0.22900359332561493,
-0.7468032240867615,
0.30361443758010864,
1.4222480058670044,
0.368443101644516,
0.06763020902872086,
0.5267991423606873,
1.1033366918563843,
0.31740567088127136,
-0.07884345203638077,
-0.8575747609138489,
-1.5310163497924805,
2.0450198650360107,
-1.4190937280654907,
1.9794654846191406,
0.8176459074020386,
0.03513256087899208,
-1.7489689588546753,
-1.778670310974121,
1.350905418395996,
1.1444971561431885,
2.3958089351654053,
0.5723535418510437,
0.33975085616111755,
-0.8257086873054504,
-0.6396366953849792,
0.3640030026435852,
-1.0863127708435059,
-0.811939537525177,
0.08594835549592972,
2.3384816646575928,
1.8695424795150757,
-0.4669949412345886,
-0.17355945706367493,
-1.080552577972412,
1.3245849609375,
-0.1980503499507904,
0.11837773025035858,
1.9642688035964966,
-0.338579922914505,
-1.0318150520324707,
1.2005715370178223,
-2.391725540161133,
0.10576924681663513,
1.9232271909713745,
0.22858603298664093,
0.05573757365345955,
-1.4343414306640625,
-0.6049925684928894,
-0.17385441064834595,
-0.29256120324134827,
-1.220350980758667,
0.5366524457931519,
-0.31919586658477783,
-0.7272140979766846,
-1.4475042819976807,
0.21366232633590698,
-1.1061996221542358,
-1.650791883468628,
0.27099940180778503,
1.8023489713668823,
2.0071728229522705,
-0.7829240560531616,
1.5889757871627808,
-0.1623968631029129,
0.18361864984035492,
1.2769027948379517,
1.2201169729232788,
3.1868796348571777,
1.8956356048583984,
-1.424431562423706,
0.6035710573196411,
-0.10773063451051712,
-0.4620538353919983,
1.1725605726242065,
-1.157632827758789,
1.3014642000198364,
-0.18495699763298035,
-1.2298709154129028,
-1.2594702243804932,
0.9155575633049011,
0.5242754817008972,
0.10701537132263184,
-0.5031527876853943,
1.1998809576034546,
0.08434978127479553,
1.3278229236602783,
0.45966097712516785,
-0.37039804458618164,
0.6141052842140198,
-0.41323646903038025,
-0.5714403986930847,
1.4794995784759521,
0.2716885805130005,
-1.425560712814331,
-2.302029609680176,
-0.2006792426109314,
-0.8334735631942749,
0.02260439470410347,
-0.6299741268157959,
-0.9421626925468445,
1.6249192953109741,
0.41646626591682434,
-1.2586143016815186,
-0.33012714982032776,
-0.3169720768928528,
-0.6589516997337341,
2.658942461013794,
-1.4112727642059326,
-0.30923229455947876,
-0.9684789180755615,
-0.632087230682373,
1.6071230173110962,
-1.2342243194580078,
-0.1553598940372467,
-1.0774492025375366,
-0.5841484665870667,
-1.3398469686508179,
-0.6020144820213318,
0.0030493810772895813,
-0.9328861832618713,
0.8231325745582581,
0.22810116410255432,
-1.2339838743209839,
-0.3806861639022827,
-0.8539780378341675,
0.794234573841095,
-0.06808528304100037,
0.3120708763599396,
1.8180224895477295,
0.44649383425712585,
-0.4490917921066284,
0.6815316677093506,
1.1386704444885254,
0.6186329126358032,
-0.6123089790344238,
0.24608510732650757,
-0.7191301584243774,
0.2906564772129059,
-1.3341416120529175,
0.33891361951828003,
-2.814704656600952,
0.5803933143615723,
-0.17374926805496216,
-0.06384807080030441,
-0.06061163917183876,
-1.2860175371170044,
1.0712581872940063,
2.6499991416931152,
-1.1730128526687622,
0.4478757679462433,
0.27055859565734863,
1.2701915502548218,
-1.61024808883667,
0.37869101762771606,
-0.3846729099750519,
2.195293664932251,
0.12201198935508728,
1.1198246479034424,
-0.4600982964038849,
-2.220085382461548,
0.5962716341018677,
-1.260487675666809,
-1.194342017173767,
0.8681004643440247,
-0.8156738877296448,
-0.05161232873797417,
-1.3827570676803589,
-0.13148930668830872,
-0.787589967250824,
-1.2666248083114624,
0.873812735080719,
0.11089496314525604,
0.49700987339019775,
-0.6454459428787231,
0.33739960193634033,
-2.147740364074707,
-1.3056292533874512,
-0.31722813844680786,
-0.8825690746307373,
0.383829802274704,
-0.2835744023323059,
0.7706848978996277,
-0.2894600033760071,
0.002078901045024395,
0.36236655712127686,
1.4126108884811401,
3.454683780670166,
0.2465205192565918,
0.42918500304222107,
-0.13817055523395538,
-0.9040442705154419,
1.4089257717132568,
0.9090157747268677,
-0.1644022911787033,
-0.5474866032600403,
-0.977845311164856,
1.2394330501556396,
1.8692076206207275,
0.9290938973426819,
0.12080107629299164,
-0.8147067427635193,
-0.6689778566360474,
-0.07041791081428528,
0.13389919698238373,
0.4659580886363983,
0.8878218531608582,
0.015573333017528057,
0.007427566684782505,
1.4061261415481567,
1.2491869926452637,
-0.47157713770866394,
0.42855459451675415,
-0.7773434519767761,
-0.46903133392333984,
0.5545978546142578,
0.3833240568637848,
-0.02898525819182396,
0.28357023000717163,
-0.9859175682067871,
-0.21878089010715485,
-0.4153960943222046,
-0.973729133605957,
-0.7032870054244995,
-0.5263460874557495,
-0.3249780833721161,
1.684893250465393,
0.1288246065378189,
-0.5225173830986023,
0.043973855674266815,
-0.8852218985557556,
-0.04332931339740753,
-1.0436633825302124,
0.23670215904712677,
-0.10391881316900253,
-0.15254324674606323,
-0.049145542085170746,
1.8007241487503052,
-0.9862588047981262,
-2.142775774002075,
0.3030385375022888,
0.2295207530260086,
-0.3719103932380676,
0.20424610376358032,
1.6443017721176147,
0.49120616912841797,
1.4815198183059692,
1.362399697303772,
0.9646833539009094,
-0.7545450925827026,
-1.349968433380127,
0.7576010227203369,
0.9638323783874512,
-1.5231386423110962,
0.8247366547584534,
0.113260917365551,
-0.508678138256073,
0.6925327181816101,
1.2024823427200317,
0.35781329870224,
-1.966155767440796,
0.8159188032150269,
-0.8695983290672302,
0.7427710294723511,
0.6472136378288269,
0.6682595610618591,
0.1665329486131668,
0.7351694703102112,
-1.2161325216293335,
-1.2316606044769287,
-0.788786768913269,
-0.6648865938186646,
1.8865898847579956,
-0.151216521859169,
0.5898462533950806,
-0.11781835556030273,
-1.355679988861084,
-0.03930695727467537,
0.7201347947120667,
0.2849050462245941,
-0.3702170252799988,
0.8108915090560913,
-0.7349388003349304,
-1.1096631288528442,
-1.4731183052062988,
-0.45755890011787415,
-1.0921937227249146,
-0.8753092288970947,
1.0629138946533203,
0.8300290107727051,
0.17132580280303955,
1.8750730752944946,
0.6556133031845093,
0.20266953110694885,
-2.5879812240600586,
0.9199128150939941,
0.342578262090683,
-0.033649466931819916,
0.8770479559898376,
0.31848442554473877,
0.9632602334022522,
0.010805799625813961,
0.45321857929229736,
-2.4885966777801514,
2.285439968109131,
-0.30036136507987976,
0.642673671245575,
0.006232233718037605,
-0.28769463300704956,
1.0999253988265991,
0.5808660387992859,
0.5118932127952576,
-1.0483875274658203,
0.7257189154624939,
-0.6533999443054199,
1.222854733467102,
0.9688839912414551,
-0.8699787259101868,
-0.04748384654521942,
1.259793758392334,
0.5165286660194397,
-0.473239928483963,
-0.9290997982025146,
-0.9456862807273865,
0.9186716079711914,
1.749353289604187,
-0.04361242055892944,
0.01978836953639984,
0.8155794739723206,
0.6873866319656372,
-1.2760460376739502,
0.10805006325244904,
-0.8070392608642578,
-0.7919691205024719,
1.63130521774292,
1.974617838859558,
-0.04523061215877533,
-0.2323562651872635,
-0.8084654211997986,
-1.218513011932373,
0.7929338812828064,
0.00612991489470005,
0.13285000622272491,
0.7281206250190735,
-0.7050851583480835,
1.051995038986206,
0.9545032978057861,
0.8745372295379639,
0.22464147210121155,
0.19965428113937378,
0.42821741104125977,
-0.32848361134529114,
-1.060613989830017,
-0.22113122045993805,
-1.1853550672531128,
-2.5753591060638428,
0.52520751953125,
-0.190163254737854,
-1.489890694618225,
-0.0017865067347884178,
-0.9938194751739502,
0.961763322353363,
-0.47000035643577576,
-1.110600233078003,
-1.5026408433914185,
0.16099144518375397,
-0.07775095105171204,
0.8933953642845154,
-1.5378016233444214,
-0.07481491565704346,
1.2058765888214111,
0.9188576936721802,
-0.6637305021286011,
1.0053337812423706,
0.23665346205234528,
1.1196675300598145,
0.887835681438446,
-0.3923824727535248,
0.4787304401397705,
0.0702638179063797,
-1.3992356061935425,
0.42313718795776367,
1.1118929386138916,
0.22329406440258026,
1.4441132545471191,
-0.4882108271121979,
0.08926894515752792,
0.3203829228878021,
-0.555580735206604,
-0.5617231726646423,
-0.5322251915931702,
0.6903396248817444,
0.0193294920027256,
-0.8352594375610352,
0.11044718325138092,
-0.07107005268335342,
-0.25336754322052,
0.16721341013908386,
-1.5477858781814575,
-0.18103563785552979,
-0.29029780626296997,
-0.5448780059814453,
-1.2557231187820435,
-0.05461195483803749,
1.4046260118484497,
-0.7908096313476562,
-0.23804442584514618,
0.5870802998542786,
0.40929698944091797,
0.49395132064819336,
0.6190906763076782,
-0.6468584537506104,
-0.36726275086402893,
-0.27710676193237305,
-0.3426506817340851,
0.33724772930145264,
1.3172101974487305,
-0.11839132010936737,
-0.9217914342880249,
0.7484099268913269,
-0.32557302713394165,
0.04084165766835213,
1.8711402416229248,
0.16478057205677032,
-0.8625251650810242,
0.29490652680397034,
-0.6685029864311218,
1.9439812898635864,
1.7467762231826782,
1.3037550449371338,
-0.133137047290802,
-1.028244972229004,
0.6467426419258118,
-0.3631812036037445,
-0.4096035063266754,
0.9206324219703674,
0.4784601926803589,
-0.17911626398563385,
-1.4373092651367188,
0.5552467107772827,
1.1532669067382812,
-0.8292959928512573,
-0.7823734879493713,
0.011076848022639751,
-0.8067870736122131,
1.0368632078170776,
0.7893579006195068,
0.4379861056804657,
0.2538713812828064,
1.6390658617019653,
0.7751979827880859,
-0.5164432525634766,
0.5490343570709229,
0.4654346704483032,
-0.16284316778182983,
-2.0982797145843506,
-1.1071491241455078,
0.28094759583473206,
-0.43243882060050964,
-1.5293434858322144,
1.334936499595642,
-1.1754275560379028,
-0.9396394491195679,
0.5048595070838928,
0.09085272252559662,
1.4699281454086304,
0.3374602496623993,
1.5868983268737793,
2.0415186882019043,
0.9993180632591248,
0.31023111939430237,
1.3510122299194336,
-0.10447324067354202,
-0.40652400255203247,
1.8439550399780273,
-0.42800524830818176,
0.4341822564601898,
1.114519715309143,
-0.34641212224960327,
-1.0779576301574707,
-0.745861828327179,
-1.119635820388794,
-0.6716592907905579,
1.2060964107513428,
0.10663583129644394,
-1.0715347528457642,
0.25115323066711426,
1.5938117504119873,
0.05454562231898308,
-0.33761292695999146,
0.5376021265983582,
0.5111587643623352,
-0.7671639323234558,
0.02729170024394989,
-0.8537041544914246,
0.5678322315216064,
-0.17010332643985748,
-0.3796217739582062,
0.41149845719337463,
0.47370457649230957,
1.3551949262619019,
0.014090255834162235,
0.21600352227687836,
1.1821801662445068,
-1.423856496810913,
1.4594985246658325,
-0.6883926391601562,
0.23559187352657318,
-2.343641996383667,
1.439672589302063,
-0.7997255325317383,
1.8672229051589966,
-2.6380162239074707,
0.44843846559524536,
-0.6106006503105164,
-0.4826970100402832,
0.39443182945251465,
-0.42142120003700256,
0.14858496189117432,
-0.16409985721111298,
-1.1261714696884155,
-0.1562122404575348,
-0.634700357913971,
0.5960972309112549,
1.1349223852157593,
1.337902545928955,
-1.079953908920288,
-0.32851290702819824,
-1.7369985580444336,
-0.18987128138542175,
-0.6681724786758423,
0.31126147508621216,
-1.9571808576583862,
-0.18839575350284576,
-1.9454567432403564,
-2.330261468887329,
-1.4391628503799438,
-0.7942515015602112,
1.1121042966842651,
0.1953517496585846,
-0.8974500298500061,
1.1521610021591187,
-0.4376729726791382,
-1.8603876829147339,
1.0806134939193726,
-2.178372859954834
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
Yes, nothing has to be changed on the datasets-server side. What I mean by "statistics" is that we can use the "row_group" metadata embedded in a Parquet file (by default) to fetch the requested rows more efficiently.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 37 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Yes, nothing has to be changed on the datasets-server side. What I mean by "statistics" is that we can use the "row_group" metadata embedded in a Parquet file (by default) to fetch the requested rows more efficiently.
|
[
-1.245270013809204,
-0.8871921896934509,
-0.8230929374694824,
1.472529411315918,
-0.14608696103096008,
-1.3091472387313843,
0.13141018152236938,
-1.1319018602371216,
1.723118543624878,
-0.8718251585960388,
0.3581838309764862,
-1.6821587085723877,
0.14463059604167938,
-0.5820703506469727,
-0.8552871942520142,
-0.8571707010269165,
-0.47161799669265747,
-0.6877172589302063,
0.9208605289459229,
2.508885145187378,
1.186675786972046,
-1.4245117902755737,
2.657209634780884,
0.691609799861908,
-0.11744233965873718,
-1.0252350568771362,
0.5153977274894714,
0.004441535100340843,
-1.2134993076324463,
-0.5237569808959961,
-0.919278085231781,
-0.06727441400289536,
-0.5481793284416199,
-0.5906413197517395,
-0.01467459462583065,
0.4033832550048828,
-0.347257524728775,
-0.44591575860977173,
-0.49815288186073303,
-0.8096810579299927,
0.4081304967403412,
-0.38883861899375916,
0.9983764886856079,
-0.4146100580692291,
1.8715373277664185,
-0.5410324931144714,
0.47104591131210327,
0.7138392925262451,
1.4323406219482422,
0.2031397670507431,
-0.08681148290634155,
0.29501014947891235,
0.4231920540332794,
-0.07695849984884262,
0.4535203278064728,
1.073914647102356,
0.617737889289856,
0.5085136294364929,
0.7509616613388062,
-2.167029619216919,
1.3514536619186401,
-1.1114548444747925,
0.30131635069847107,
1.3843811750411987,
-0.9438915848731995,
0.3799425959587097,
-1.7646191120147705,
-0.04940061271190643,
0.6185528635978699,
-2.27811336517334,
0.22256670892238617,
-1.240831971168518,
-0.5038208961486816,
1.054093837738037,
0.33194249868392944,
-1.2685822248458862,
0.14143651723861694,
-0.422357976436615,
0.9872531294822693,
0.4949762523174286,
1.1454252004623413,
-1.667514681816101,
-0.010978447273373604,
-0.2863721251487732,
0.05936767905950546,
-1.3050768375396729,
-1.4587992429733276,
0.524089515209198,
0.627565860748291,
0.48518750071525574,
-0.05261458083987236,
0.9326450228691101,
-0.9547114968299866,
0.8222224116325378,
-0.9268795847892761,
-1.5863157510757446,
-1.3803558349609375,
-2.2763092517852783,
-2.324075698852539,
0.7791638374328613,
-0.4905969500541687,
-0.5367248058319092,
2.066309690475464,
-1.0418306589126587,
-1.739669919013977,
1.217311978340149,
0.21575309336185455,
-0.03979770094156265,
2.414271831512451,
0.1610017567873001,
-0.7244300246238708,
0.4352579712867737,
-0.6460580229759216,
0.7263875603675842,
-0.5628337860107422,
1.3495844602584839,
0.44421228766441345,
-1.1340936422348022,
1.6209163665771484,
-0.49436357617378235,
0.5558319687843323,
-0.6630476713180542,
-0.44793838262557983,
-0.7593603134155273,
0.463199645280838,
1.8573508262634277,
-0.26398131251335144,
1.5466481447219849,
-0.2818024754524231,
-1.566758394241333,
-1.6758941411972046,
0.9695884585380554,
0.41612550616264343,
-0.7523404359817505,
0.19621984660625458,
-0.2855338752269745,
0.14958949387073517,
-0.0687125101685524,
1.0821377038955688,
1.2182968854904175,
0.7188827395439148,
-0.3344061076641083,
-0.9046634435653687,
0.24263329803943634,
-0.05080296844244003,
-0.7423807978630066,
-1.7946981191635132,
-0.35571950674057007,
0.14182108640670776,
0.6381474137306213,
-1.1119434833526611,
1.7928345203399658,
0.9268801808357239,
1.8585761785507202,
0.953530490398407,
-0.28371259570121765,
1.4933773279190063,
0.03694251552224159,
1.8833673000335693,
-0.4509250223636627,
0.7786769866943359,
-0.3622013032436371,
-1.1517997980117798,
0.8313338756561279,
-0.3125928044319153,
-2.0316965579986572,
-0.7751767635345459,
-0.8695074915885925,
-0.17189912497997284,
-0.7319788932800293,
1.048859715461731,
-0.22416506707668304,
-1.2593293190002441,
0.36822667717933655,
-0.6814250349998474,
0.14479570090770721,
-1.2721331119537354,
0.3863864243030548,
0.7186250686645508,
-0.6519103050231934,
0.09167822450399399,
-0.2719874083995819,
-1.270788311958313,
-0.45564761757850647,
0.1931431144475937,
1.8617384433746338,
-0.8089621067047119,
0.8391227126121521,
1.0120488405227661,
-0.6937285661697388,
-0.046687107533216476,
0.47959616780281067,
-0.32744237780570984,
0.8379112482070923,
-1.0347323417663574,
-0.37338075041770935,
1.3181653022766113,
-0.25549474358558655,
-0.5604152679443359,
1.4647135734558105,
0.6845998167991638,
-1.0218504667282104,
-0.07036125659942627,
-0.2119988054037094,
-0.8947485685348511,
0.0327121801674366,
-1.5767669677734375,
-0.0183822363615036,
0.36116909980773926,
-1.5055240392684937,
-0.4255150556564331,
-0.1457773745059967,
1.2780288457870483,
-0.1621193289756775,
1.521462082862854,
-0.3824124038219452,
-0.228702113032341,
-0.3789222836494446,
-0.33782926201820374,
0.13416945934295654,
-0.17973081767559052,
-0.636754035949707,
0.20749075710773468,
-0.7286916375160217,
0.3159673810005188,
1.4282441139221191,
0.33383917808532715,
0.06505261361598969,
0.5472452044487,
1.1041580438613892,
0.28992927074432373,
-0.09279771149158478,
-0.8798633217811584,
-1.5152817964553833,
2.074953556060791,
-1.419517993927002,
1.9581493139266968,
0.8152784705162048,
0.03243132308125496,
-1.7513025999069214,
-1.7953096628189087,
1.3540655374526978,
1.1660356521606445,
2.3708860874176025,
0.5560439229011536,
0.34220027923583984,
-0.8399753570556641,
-0.6340873837471008,
0.3612620532512665,
-1.0885241031646729,
-0.7992464900016785,
0.069449283182621,
2.3376851081848145,
1.869262456893921,
-0.436572790145874,
-0.18214961886405945,
-1.0890967845916748,
1.3535491228103638,
-0.23362086713314056,
0.10933830589056015,
1.9655779600143433,
-0.34922412037849426,
-1.0618536472320557,
1.198602318763733,
-2.3811113834381104,
0.0830439031124115,
1.944013237953186,
0.25801774859428406,
0.08400889486074448,
-1.4180415868759155,
-0.6215198040008545,
-0.18583598732948303,
-0.29840224981307983,
-1.2152986526489258,
0.5411236882209778,
-0.329340398311615,
-0.7016083598136902,
-1.4458006620407104,
0.2042982578277588,
-1.1110100746154785,
-1.6447596549987793,
0.23088420927524567,
1.7728283405303955,
2.029534101486206,
-0.7644979357719421,
1.5829498767852783,
-0.18603767454624176,
0.16649600863456726,
1.270015835762024,
1.1887764930725098,
3.1734097003936768,
1.902040719985962,
-1.4033303260803223,
0.5588818192481995,
-0.10821089893579483,
-0.47438469529151917,
1.159180760383606,
-1.1662863492965698,
1.3396430015563965,
-0.16537581384181976,
-1.2063080072402954,
-1.234887957572937,
0.9170153141021729,
0.4863913953304291,
0.12231450527906418,
-0.5158754587173462,
1.1923397779464722,
0.08039700984954834,
1.337647795677185,
0.47111713886260986,
-0.35994353890419006,
0.6234160661697388,
-0.4299217462539673,
-0.5507100820541382,
1.495165228843689,
0.2869257628917694,
-1.4190763235092163,
-2.2773988246917725,
-0.1911211907863617,
-0.836222767829895,
0.023898936808109283,
-0.6190084218978882,
-0.9362930059432983,
1.6337909698486328,
0.3876388370990753,
-1.2515430450439453,
-0.3440398573875427,
-0.2971961796283722,
-0.6846981048583984,
2.7089881896972656,
-1.4152745008468628,
-0.35194307565689087,
-1.0071338415145874,
-0.6388624310493469,
1.6507095098495483,
-1.2256991863250732,
-0.14136414229869843,
-1.089830994606018,
-0.5381546020507812,
-1.3441548347473145,
-0.5810400247573853,
-0.021734004840254784,
-0.9533765316009521,
0.8298693895339966,
0.24418114125728607,
-1.2386337518692017,
-0.37518346309661865,
-0.8215420246124268,
0.7587209343910217,
-0.0527164489030838,
0.3104953467845917,
1.8098987340927124,
0.4533279240131378,
-0.4597463309764862,
0.6958387494087219,
1.1508933305740356,
0.6280137300491333,
-0.6235249638557434,
0.2407015562057495,
-0.7031124234199524,
0.3039862811565399,
-1.3383967876434326,
0.33312663435935974,
-2.810023784637451,
0.5649282336235046,
-0.18439505994319916,
-0.07515273988246918,
-0.02525632455945015,
-1.2884747982025146,
1.0632424354553223,
2.654158592224121,
-1.1560553312301636,
0.4703526794910431,
0.23769068717956543,
1.2823814153671265,
-1.5990979671478271,
0.3756278157234192,
-0.38645678758621216,
2.1779215335845947,
0.1294063776731491,
1.120831847190857,
-0.44556695222854614,
-2.229248285293579,
0.624647319316864,
-1.2611441612243652,
-1.231942057609558,
0.8338336944580078,
-0.8073828220367432,
-0.05570387467741966,
-1.3759688138961792,
-0.14057797193527222,
-0.7754817008972168,
-1.2534725666046143,
0.8784152865409851,
0.14730291068553925,
0.49471256136894226,
-0.6275636553764343,
0.30098897218704224,
-2.168421983718872,
-1.317577838897705,
-0.337497353553772,
-0.8843762278556824,
0.37286320328712463,
-0.3111000955104828,
0.7653527855873108,
-0.27945950627326965,
-0.00007610488682985306,
0.35882413387298584,
1.4310766458511353,
3.4316017627716064,
0.24532996118068695,
0.43773043155670166,
-0.17539344727993011,
-0.8800033330917358,
1.4099104404449463,
0.9163144826889038,
-0.17666436731815338,
-0.5364173054695129,
-1.0154435634613037,
1.2480096817016602,
1.8506430387496948,
0.8882004618644714,
0.11076132953166962,
-0.7878323197364807,
-0.6652487516403198,
-0.10989148169755936,
0.12264098972082138,
0.4561309516429901,
0.886216938495636,
0.04567645862698555,
0.00908671598881483,
1.404646873474121,
1.2397302389144897,
-0.4408026933670044,
0.397235244512558,
-0.7547972202301025,
-0.46574103832244873,
0.5819090604782104,
0.4065501093864441,
-0.03149699792265892,
0.28745752573013306,
-0.9807028770446777,
-0.23788738250732422,
-0.42349812388420105,
-0.9659164547920227,
-0.7054723501205444,
-0.5203260183334351,
-0.34932374954223633,
1.7224754095077515,
0.1457429826259613,
-0.5289760828018188,
0.023673295974731445,
-0.85622638463974,
-0.03302498534321785,
-1.047782301902771,
0.23079913854599,
-0.08553650975227356,
-0.1794959157705307,
-0.021942712366580963,
1.8151127099990845,
-0.9825176000595093,
-2.1146068572998047,
0.2913801968097687,
0.21902640163898468,
-0.3240194618701935,
0.2071581482887268,
1.599591612815857,
0.4992380440235138,
1.4841724634170532,
1.3613686561584473,
0.9512898921966553,
-0.7622151970863342,
-1.3484368324279785,
0.717499852180481,
0.9809499382972717,
-1.5478284358978271,
0.8098786473274231,
0.11565185338258743,
-0.5075638294219971,
0.6541411280632019,
1.1721446514129639,
0.38104620575904846,
-1.9542603492736816,
0.8183040022850037,
-0.8754634261131287,
0.7421398758888245,
0.6651739478111267,
0.6681739687919617,
0.20427702367305756,
0.7438480257987976,
-1.2035841941833496,
-1.2449324131011963,
-0.8334798216819763,
-0.6987714767456055,
1.9087457656860352,
-0.2032548040151596,
0.5887144207954407,
-0.15178371965885162,
-1.3468906879425049,
-0.02659759670495987,
0.7286041378974915,
0.3239540159702301,
-0.36529260873794556,
0.7782217860221863,
-0.7564076781272888,
-1.125413179397583,
-1.4872642755508423,
-0.4656156897544861,
-1.0615696907043457,
-0.8956382870674133,
1.0812277793884277,
0.8451724052429199,
0.14272065460681915,
1.8836455345153809,
0.6689606308937073,
0.1962326616048813,
-2.57767391204834,
0.9125672578811646,
0.30718639492988586,
-0.05301281437277794,
0.8611699938774109,
0.3208862841129303,
0.9538210034370422,
0.0004965085536241531,
0.4491540193557739,
-2.5224416255950928,
2.3012325763702393,
-0.28035086393356323,
0.6656157374382019,
0.0198713019490242,
-0.2881055176258087,
1.1193559169769287,
0.5931775569915771,
0.5130329132080078,
-1.0234854221343994,
0.685040295124054,
-0.6185203194618225,
1.2618385553359985,
0.9356700778007507,
-0.8438931107521057,
-0.03610508143901825,
1.2894678115844727,
0.49959293007850647,
-0.4943506717681885,
-0.9216771125793457,
-0.9338692426681519,
0.9246141910552979,
1.7665274143218994,
-0.02199183963239193,
0.03031224012374878,
0.8113324046134949,
0.6572683453559875,
-1.2620108127593994,
0.11383045464754105,
-0.8282987475395203,
-0.8269932270050049,
1.597720742225647,
1.9886289834976196,
-0.08702822029590607,
-0.20406168699264526,
-0.8466054201126099,
-1.233365774154663,
0.8238487243652344,
0.012970213778316975,
0.11812197417020798,
0.6914064288139343,
-0.677130937576294,
1.0272138118743896,
0.9693331718444824,
0.8812592625617981,
0.24887986481189728,
0.2385159283876419,
0.45231330394744873,
-0.30501100420951843,
-1.0537424087524414,
-0.19339969754219055,
-1.177506446838379,
-2.590298652648926,
0.5138674378395081,
-0.19247664511203766,
-1.4665206670761108,
0.004340224899351597,
-0.9816555976867676,
0.9516566395759583,
-0.491213321685791,
-1.1122777462005615,
-1.5476826429367065,
0.1362980753183365,
-0.06858409941196442,
0.9217633605003357,
-1.5676146745681763,
-0.10013264417648315,
1.186997413635254,
0.948637843132019,
-0.6567370295524597,
0.9785972833633423,
0.22981609404087067,
1.1093991994857788,
0.8773679137229919,
-0.40504658222198486,
0.47833549976348877,
0.033199749886989594,
-1.4053184986114502,
0.437399685382843,
1.1195729970932007,
0.21715477108955383,
1.4314991235733032,
-0.4967373013496399,
0.03642834350466728,
0.33173808455467224,
-0.5095493197441101,
-0.5144370198249817,
-0.5264933109283447,
0.6924166679382324,
0.04865552484989166,
-0.8330683708190918,
0.0878705233335495,
-0.0656391829252243,
-0.29005393385887146,
0.15442217886447906,
-1.5151084661483765,
-0.15775611996650696,
-0.30766281485557556,
-0.5694371461868286,
-1.2209721803665161,
-0.06326362490653992,
1.3934224843978882,
-0.7821468114852905,
-0.20799246430397034,
0.547105073928833,
0.43142056465148926,
0.4912779629230499,
0.6192112565040588,
-0.6561148762702942,
-0.3518597483634949,
-0.26183825731277466,
-0.3192996084690094,
0.3557807505130768,
1.336146593093872,
-0.10651327669620514,
-0.9165452718734741,
0.7365587949752808,
-0.3146408200263977,
0.02339063212275505,
1.9190531969070435,
0.18477067351341248,
-0.8434205055236816,
0.30212849378585815,
-0.6778141260147095,
1.9533334970474243,
1.768349051475525,
1.2288469076156616,
-0.13299190998077393,
-1.0428980588912964,
0.6456094980239868,
-0.3658183217048645,
-0.3749943673610687,
0.9058342576026917,
0.46371155977249146,
-0.17489401996135712,
-1.4473249912261963,
0.5925732254981995,
1.150916576385498,
-0.8050550818443298,
-0.7955403327941895,
0.012396090663969517,
-0.8113414645195007,
1.0135397911071777,
0.7877689003944397,
0.48081040382385254,
0.2590147852897644,
1.6809601783752441,
0.8089820146560669,
-0.5228027105331421,
0.5576128959655762,
0.4939514696598053,
-0.15468576550483704,
-2.08449387550354,
-1.1327478885650635,
0.27045923471450806,
-0.47391393780708313,
-1.5325701236724854,
1.3621593713760376,
-1.1689380407333374,
-0.9204980134963989,
0.4835972487926483,
0.0947711244225502,
1.494726538658142,
0.323289692401886,
1.566393494606018,
2.0293126106262207,
0.9625442624092102,
0.3365481495857239,
1.3342764377593994,
-0.12689025700092316,
-0.4036480486392975,
1.8798654079437256,
-0.40357109904289246,
0.3895725607872009,
1.1119213104248047,
-0.34832918643951416,
-1.0717557668685913,
-0.7195606231689453,
-1.1285960674285889,
-0.67705237865448,
1.1942176818847656,
0.11327466368675232,
-1.0646133422851562,
0.2341541349887848,
1.5673052072525024,
0.06512690335512161,
-0.3582622706890106,
0.5119671821594238,
0.4954027831554413,
-0.786238968372345,
0.022261768579483032,
-0.8885847330093384,
0.5750848650932312,
-0.16485576331615448,
-0.3734196424484253,
0.46154895424842834,
0.455480694770813,
1.3416681289672852,
0.00850509013980627,
0.2307400405406952,
1.1729419231414795,
-1.4686847925186157,
1.4837191104888916,
-0.6788541674613953,
0.2185203582048416,
-2.305968999862671,
1.4222153425216675,
-0.8106471300125122,
1.8789739608764648,
-2.6408674716949463,
0.4263295531272888,
-0.6600242257118225,
-0.48756101727485657,
0.39560481905937195,
-0.4076840579509735,
0.15133307874202728,
-0.16277866065502167,
-1.1726888418197632,
-0.12296200543642044,
-0.5998777747154236,
0.603563666343689,
1.1152234077453613,
1.3436166048049927,
-1.0935051441192627,
-0.321090966463089,
-1.7096177339553833,
-0.18235555291175842,
-0.6927516460418701,
0.29207611083984375,
-1.9807476997375488,
-0.18363164365291595,
-1.9059559106826782,
-2.300537347793579,
-1.4149689674377441,
-0.7942845225334167,
1.136427879333496,
0.18462200462818146,
-0.9098215103149414,
1.1718506813049316,
-0.4468165338039398,
-1.8582085371017456,
1.0769635438919067,
-2.1755290031433105
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
Glad to see the feature could be of interest.
I'm sure there are many possible ways to implement this feature. I don't know enough about the datasets-server, but I guess that it is not instantaneous, in the sense that user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all), which could be cumbersome. Having optionally that information in the `dataset_infos.json` file would make it easier for users to control the skip process a bit.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 82 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Glad to see the feature could be of interest.
I'm sure there are many possible ways to implement this feature. I don't know enough about the datasets-server, but I guess that it is not instantaneous, in the sense that user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all), which could be cumbersome. Having optionally that information in the `dataset_infos.json` file would make it easier for users to control the skip process a bit.
|
[
-1.2383397817611694,
-0.9065281748771667,
-0.7987818121910095,
1.4999955892562866,
-0.13826140761375427,
-1.2874218225479126,
0.0928129106760025,
-1.1051973104476929,
1.7765353918075562,
-0.8670092821121216,
0.30463019013404846,
-1.7415071725845337,
0.09678739309310913,
-0.6170414686203003,
-0.8135625123977661,
-0.8939037322998047,
-0.4686805009841919,
-0.7642450332641602,
0.9244542717933655,
2.5343594551086426,
1.1195454597473145,
-1.459770917892456,
2.6428027153015137,
0.6864867806434631,
-0.13777029514312744,
-1.040480136871338,
0.5099920034408569,
-0.02025730162858963,
-1.2265855073928833,
-0.5136778354644775,
-0.9243159890174866,
-0.0763917863368988,
-0.5822072625160217,
-0.5997046232223511,
0.011722162365913391,
0.41088253259658813,
-0.3225848078727722,
-0.45331016182899475,
-0.4546012282371521,
-0.7737160921096802,
0.4136877655982971,
-0.3776535987854004,
0.9861724972724915,
-0.3957102596759796,
1.8914803266525269,
-0.4751774072647095,
0.43178173899650574,
0.7309238314628601,
1.4591186046600342,
0.18911710381507874,
-0.05158955976366997,
0.2766205072402954,
0.3840753138065338,
-0.06448999792337418,
0.4569830894470215,
1.0536364316940308,
0.6464718580245972,
0.5116384029388428,
0.7282381653785706,
-2.200528621673584,
1.3769384622573853,
-1.0648831129074097,
0.3453139662742615,
1.416268229484558,
-0.9462770223617554,
0.3951387107372284,
-1.7962749004364014,
-0.018953628838062286,
0.5627685189247131,
-2.238020658493042,
0.20731300115585327,
-1.1967041492462158,
-0.429764986038208,
1.0937663316726685,
0.3340412378311157,
-1.2671164274215698,
0.168038472533226,
-0.382856160402298,
1.0348482131958008,
0.4923275113105774,
1.1761019229888916,
-1.6698226928710938,
0.036285724490880966,
-0.2600002884864807,
0.07961666584014893,
-1.2622044086456299,
-1.481054663658142,
0.4857175350189209,
0.658093273639679,
0.49672698974609375,
-0.07348465919494629,
0.9199780821800232,
-0.9587034583091736,
0.7823209166526794,
-0.9010843634605408,
-1.6384252309799194,
-1.368192434310913,
-2.2877044677734375,
-2.3976211547851562,
0.7949082255363464,
-0.47352150082588196,
-0.49850600957870483,
2.114475965499878,
-1.0186177492141724,
-1.7120323181152344,
1.186482548713684,
0.24563990533351898,
-0.03156236186623573,
2.4111227989196777,
0.16843634843826294,
-0.7118592262268066,
0.4175952076911926,
-0.6559486985206604,
0.7387961745262146,
-0.5113800764083862,
1.3603051900863647,
0.4433375895023346,
-1.1297639608383179,
1.5538992881774902,
-0.47622451186180115,
0.5407166481018066,
-0.6373468041419983,
-0.46106138825416565,
-0.8021852374076843,
0.4642200767993927,
1.8417812585830688,
-0.24324330687522888,
1.5635467767715454,
-0.3049534857273102,
-1.585224986076355,
-1.6793712377548218,
0.9354374408721924,
0.44361892342567444,
-0.7650764584541321,
0.18340954184532166,
-0.33173686265945435,
0.1341116726398468,
-0.0015520378947257996,
1.1288994550704956,
1.243459939956665,
0.7011876106262207,
-0.3386039435863495,
-0.911300539970398,
0.27675825357437134,
-0.11209210753440857,
-0.7438952326774597,
-1.7511283159255981,
-0.3789118528366089,
0.12376415729522705,
0.6412511467933655,
-1.1170717477798462,
1.7577203512191772,
0.9278924465179443,
1.8267854452133179,
0.9895646572113037,
-0.3115997612476349,
1.4871082305908203,
0.028046254068613052,
1.89464271068573,
-0.4594414234161377,
0.742743194103241,
-0.3393002450466156,
-1.187422275543213,
0.8331272602081299,
-0.307864785194397,
-2.04023814201355,
-0.7820591330528259,
-0.8335263133049011,
-0.16235464811325073,
-0.6889800429344177,
0.9688806533813477,
-0.18049199879169464,
-1.3103187084197998,
0.3390266001224518,
-0.6555418372154236,
0.17759273946285248,
-1.2768404483795166,
0.40336334705352783,
0.7353708744049072,
-0.7022455930709839,
0.07181906700134277,
-0.32846859097480774,
-1.2832345962524414,
-0.4672573506832123,
0.2320556640625,
1.8338123559951782,
-0.8280255198478699,
0.8709219098091125,
1.0604932308197021,
-0.7063676118850708,
-0.04087233170866966,
0.4602329134941101,
-0.34306833148002625,
0.857322633266449,
-1.050451636314392,
-0.4195241630077362,
1.2922157049179077,
-0.2687712609767914,
-0.5678396224975586,
1.42864191532135,
0.6931545734405518,
-1.0361989736557007,
-0.08147595822811127,
-0.24743951857089996,
-0.8957874178886414,
0.0051315585151314735,
-1.5964621305465698,
-0.07141579687595367,
0.3396938741207123,
-1.5164542198181152,
-0.4706217050552368,
-0.17917132377624512,
1.2631663084030151,
-0.13900749385356903,
1.4933018684387207,
-0.33214402198791504,
-0.18664729595184326,
-0.39545267820358276,
-0.35717302560806274,
0.1683194488286972,
-0.19031763076782227,
-0.633579432964325,
0.2438410073518753,
-0.7568292021751404,
0.3355286419391632,
1.4147337675094604,
0.35869354009628296,
0.046508993953466415,
0.5167560577392578,
1.1219472885131836,
0.30798736214637756,
-0.061333999037742615,
-0.8496249914169312,
-1.5086549520492554,
2.0420567989349365,
-1.441817045211792,
1.9320005178451538,
0.8120893836021423,
0.01836356706917286,
-1.715188980102539,
-1.8101844787597656,
1.4019299745559692,
1.181917667388916,
2.3650975227355957,
0.5480049848556519,
0.34180307388305664,
-0.8272315263748169,
-0.6514349579811096,
0.3856659233570099,
-1.0632082223892212,
-0.8164466619491577,
0.044663988053798676,
2.3596224784851074,
1.8369860649108887,
-0.4804406464099884,
-0.1922096610069275,
-1.0565131902694702,
1.3620877265930176,
-0.20767417550086975,
0.10280805826187134,
2.0074124336242676,
-0.3085786998271942,
-1.0686395168304443,
1.271685004234314,
-2.405581474304199,
0.1060294657945633,
1.9462623596191406,
0.2499111443758011,
0.037484120577573776,
-1.4585384130477905,
-0.6181220412254333,
-0.17210058867931366,
-0.3051123321056366,
-1.2177009582519531,
0.5601147413253784,
-0.2888268828392029,
-0.6858204007148743,
-1.484243631362915,
0.23313619196414948,
-1.1429576873779297,
-1.6159778833389282,
0.22677503526210785,
1.7978731393814087,
2.033900499343872,
-0.7304052710533142,
1.570887565612793,
-0.19232147932052612,
0.18873384594917297,
1.2336491346359253,
1.2104216814041138,
3.205991268157959,
1.9079861640930176,
-1.35720694065094,
0.540248692035675,
-0.1301611065864563,
-0.5180962085723877,
1.128568410873413,
-1.1313947439193726,
1.3013511896133423,
-0.17228500545024872,
-1.2279844284057617,
-1.2696367502212524,
0.9154491424560547,
0.514610767364502,
0.09732979536056519,
-0.4927012324333191,
1.1642615795135498,
0.08610960841178894,
1.3399544954299927,
0.4473758637905121,
-0.35515597462654114,
0.6156107187271118,
-0.47113221883773804,
-0.5544474124908447,
1.510499119758606,
0.2557295560836792,
-1.4330110549926758,
-2.255380153656006,
-0.21193689107894897,
-0.8169549107551575,
0.0438784658908844,
-0.6258351802825928,
-0.9165999889373779,
1.5994757413864136,
0.4021841287612915,
-1.2664438486099243,
-0.3141956925392151,
-0.31266799569129944,
-0.6818978190422058,
2.628918409347534,
-1.3964060544967651,
-0.2735186517238617,
-0.9530463814735413,
-0.6500380039215088,
1.5970888137817383,
-1.2041620016098022,
-0.16781345009803772,
-1.0777106285095215,
-0.5911096334457397,
-1.3239694833755493,
-0.5741691589355469,
-0.03286458179354668,
-0.9671575427055359,
0.8140580654144287,
0.23055951297283173,
-1.2500953674316406,
-0.34268566966056824,
-0.8412988185882568,
0.7756644487380981,
-0.07974293828010559,
0.28534239530563354,
1.7637752294540405,
0.4480901062488556,
-0.45205023884773254,
0.7057167291641235,
1.169769287109375,
0.6360068917274475,
-0.581771194934845,
0.21672150492668152,
-0.7028743028640747,
0.28969594836235046,
-1.2833216190338135,
0.3201272487640381,
-2.844867706298828,
0.6217014193534851,
-0.13873827457427979,
-0.05197032913565636,
-0.015201237984001637,
-1.232597827911377,
1.0241841077804565,
2.6594839096069336,
-1.2054771184921265,
0.4795805811882019,
0.27901381254196167,
1.2612097263336182,
-1.5970150232315063,
0.3581993877887726,
-0.35827746987342834,
2.1866278648376465,
0.10102635622024536,
1.1796996593475342,
-0.46205946803092957,
-2.2670738697052,
0.5935544967651367,
-1.2717547416687012,
-1.1869540214538574,
0.867662787437439,
-0.7872389554977417,
-0.0800723284482956,
-1.3778870105743408,
-0.1571444720029831,
-0.7303489446640015,
-1.2579665184020996,
0.8558260202407837,
0.12174472212791443,
0.4679279029369354,
-0.6112262010574341,
0.32532477378845215,
-2.187265634536743,
-1.3092352151870728,
-0.28863072395324707,
-0.9254269003868103,
0.3987431526184082,
-0.30736473202705383,
0.731833279132843,
-0.2572421133518219,
0.00333526823669672,
0.3449654281139374,
1.4117060899734497,
3.39676833152771,
0.21046265959739685,
0.4517040252685547,
-0.16042013466358185,
-0.9199035167694092,
1.3894548416137695,
0.8994157910346985,
-0.20265711843967438,
-0.5579749345779419,
-1.0531997680664062,
1.2503823041915894,
1.8610498905181885,
0.9421889185905457,
0.11622799932956696,
-0.8051577210426331,
-0.6676970720291138,
-0.09377886354923248,
0.15256887674331665,
0.48356080055236816,
0.890792965888977,
0.007655497640371323,
0.04134877398610115,
1.40305495262146,
1.219220757484436,
-0.4480159878730774,
0.4081355631351471,
-0.738592267036438,
-0.5154828429222107,
0.5209712386131287,
0.3719399869441986,
-0.02575600892305374,
0.28847843408584595,
-0.9821339845657349,
-0.17250235378742218,
-0.3875173032283783,
-0.941697359085083,
-0.704795241355896,
-0.4953869581222534,
-0.33644577860832214,
1.6809660196304321,
0.15289604663848877,
-0.5563191175460815,
0.009974224492907524,
-0.8296760320663452,
-0.04084474593400955,
-1.0230547189712524,
0.23180469870567322,
-0.09123055636882782,
-0.1809276044368744,
-0.08992110192775726,
1.8040657043457031,
-0.9884417653083801,
-2.1450047492980957,
0.26228851079940796,
0.22681501507759094,
-0.31964200735092163,
0.17687363922595978,
1.6231578588485718,
0.5222724676132202,
1.4895646572113037,
1.3712867498397827,
1.0098134279251099,
-0.7639772295951843,
-1.3965317010879517,
0.7156881093978882,
0.9785376191139221,
-1.4773281812667847,
0.7886952757835388,
0.08767738938331604,
-0.4927540719509125,
0.6647346019744873,
1.2343038320541382,
0.379668265581131,
-1.987565279006958,
0.8373802900314331,
-0.910430371761322,
0.7177207469940186,
0.6575278639793396,
0.659526526927948,
0.15528139472007751,
0.7399892210960388,
-1.2469172477722168,
-1.2195641994476318,
-0.7939352989196777,
-0.7006956338882446,
1.9675346612930298,
-0.17900118231773376,
0.5703546404838562,
-0.12686938047409058,
-1.4077500104904175,
-0.09708121418952942,
0.7092819213867188,
0.3177141547203064,
-0.3731538951396942,
0.8048173189163208,
-0.7359622120857239,
-1.1255401372909546,
-1.5207252502441406,
-0.45657020807266235,
-1.0655335187911987,
-0.8563061356544495,
1.058077096939087,
0.8247108459472656,
0.16377469897270203,
1.8340250253677368,
0.6401591300964355,
0.2237890362739563,
-2.6061036586761475,
0.8734173774719238,
0.32666608691215515,
-0.06851826608181,
0.862640380859375,
0.3449820280075073,
0.9707145094871521,
0.002121896483004093,
0.49099552631378174,
-2.457303524017334,
2.314615488052368,
-0.2877616286277771,
0.7207547426223755,
0.04391249641776085,
-0.2644038498401642,
1.0871527194976807,
0.5714836716651917,
0.5939753651618958,
-1.0337094068527222,
0.7218993902206421,
-0.6143258213996887,
1.2353088855743408,
0.9661751389503479,
-0.8368661999702454,
-0.044291410595178604,
1.2900563478469849,
0.44923701882362366,
-0.4900137782096863,
-0.9517356157302856,
-0.9596589803695679,
0.9373549222946167,
1.7770737409591675,
-0.09417316317558289,
0.04214334860444069,
0.7766266465187073,
0.6775580644607544,
-1.294600486755371,
0.07260824739933014,
-0.7957208156585693,
-0.8304208517074585,
1.5701872110366821,
2.0336828231811523,
-0.09503014385700226,
-0.2230881303548813,
-0.8304785490036011,
-1.2265576124191284,
0.7522767782211304,
0.02774461731314659,
0.10160037875175476,
0.7181081771850586,
-0.6586317420005798,
1.0804589986801147,
0.9863815903663635,
0.8323929309844971,
0.2158149778842926,
0.19899871945381165,
0.42217308282852173,
-0.29642096161842346,
-1.0554850101470947,
-0.23338893055915833,
-1.145411491394043,
-2.5821659564971924,
0.47875720262527466,
-0.19375963509082794,
-1.4962011575698853,
-0.024211760610342026,
-0.9551377892494202,
0.9472792744636536,
-0.4752197861671448,
-1.1634910106658936,
-1.5371520519256592,
0.18176594376564026,
-0.07166226208209991,
0.8881484270095825,
-1.5757883787155151,
-0.08585023880004883,
1.2006990909576416,
0.9222182631492615,
-0.6648387908935547,
1.0067139863967896,
0.21777226030826569,
1.056802749633789,
0.894247829914093,
-0.37638816237449646,
0.48372045159339905,
0.06964254379272461,
-1.3605103492736816,
0.4151807129383087,
1.1049290895462036,
0.19620920717716217,
1.4051581621170044,
-0.5181041955947876,
0.03349308297038078,
0.3241349756717682,
-0.5227445363998413,
-0.5111933350563049,
-0.5174766778945923,
0.7149773240089417,
0.021292701363563538,
-0.8222772479057312,
0.10519585013389587,
-0.09143754839897156,
-0.26156118512153625,
0.1929381787776947,
-1.5196906328201294,
-0.1881880909204483,
-0.33558982610702515,
-0.5287922024726868,
-1.2245354652404785,
-0.07304614782333374,
1.410487413406372,
-0.7712039947509766,
-0.23745641112327576,
0.5678401589393616,
0.44990941882133484,
0.5125899314880371,
0.5816890597343445,
-0.6490612626075745,
-0.34911930561065674,
-0.26651257276535034,
-0.3246525526046753,
0.3030662536621094,
1.3466635942459106,
-0.09865443408489227,
-0.8938056230545044,
0.7592241168022156,
-0.2955179512500763,
0.035195060074329376,
1.8830561637878418,
0.16305871307849884,
-0.9079704880714417,
0.3254243731498718,
-0.6811016798019409,
1.9410767555236816,
1.753275752067566,
1.3121179342269897,
-0.1285845935344696,
-1.056177020072937,
0.6634401082992554,
-0.3396071791648865,
-0.35640498995780945,
0.9454721808433533,
0.45914363861083984,
-0.17993004620075226,
-1.4553765058517456,
0.5937782526016235,
1.1326971054077148,
-0.7763222455978394,
-0.8058927059173584,
0.04871119186282158,
-0.8391966819763184,
1.012662410736084,
0.7695160508155823,
0.5033447742462158,
0.19517335295677185,
1.69117271900177,
0.8082974553108215,
-0.5216629505157471,
0.5612268447875977,
0.5022954344749451,
-0.1818772256374359,
-2.0693142414093018,
-1.1433364152908325,
0.25587737560272217,
-0.4830954670906067,
-1.5496127605438232,
1.3425517082214355,
-1.1808862686157227,
-0.908356785774231,
0.4950680732727051,
0.024177003651857376,
1.4783724546432495,
0.3365689218044281,
1.5791363716125488,
2.048038959503174,
0.9921366572380066,
0.3424890339374542,
1.3497318029403687,
-0.13242916762828827,
-0.38900041580200195,
1.864672303199768,
-0.4002714157104492,
0.3625586926937103,
1.180303692817688,
-0.3412480652332306,
-1.0364989042282104,
-0.70920330286026,
-1.0798203945159912,
-0.682213544845581,
1.1591737270355225,
0.08523336052894592,
-1.0682785511016846,
0.25474217534065247,
1.5983163118362427,
0.05947314575314522,
-0.32411643862724304,
0.5420829057693481,
0.5204330682754517,
-0.7874811291694641,
0.014520687982439995,
-0.8990991115570068,
0.5156864523887634,
-0.21980039775371552,
-0.3626399040222168,
0.4324306547641754,
0.4247628450393677,
1.365906000137329,
0.04673107713460922,
0.225004181265831,
1.1581381559371948,
-1.4347761869430542,
1.463800072669983,
-0.6733592748641968,
0.2648352384567261,
-2.317415952682495,
1.4392088651657104,
-0.7714117169380188,
1.9247876405715942,
-2.6304662227630615,
0.4372279942035675,
-0.6626729369163513,
-0.47575142979621887,
0.3807181417942047,
-0.38881736993789673,
0.14442217350006104,
-0.131392240524292,
-1.147196888923645,
-0.16058224439620972,
-0.599583625793457,
0.6172940135002136,
1.1505916118621826,
1.3361388444900513,
-1.064347743988037,
-0.34548768401145935,
-1.7184605598449707,
-0.1902218759059906,
-0.6387751698493958,
0.3129906952381134,
-1.9284168481826782,
-0.20839834213256836,
-1.9088964462280273,
-2.314007043838501,
-1.4151690006256104,
-0.7951993942260742,
1.1412450075149536,
0.17416435480117798,
-0.9153359532356262,
1.1998709440231323,
-0.4098447561264038,
-1.82685124874115,
1.0900726318359375,
-2.14615797996521
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
re: statistics:
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.FileMetaData.html
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.RowGroupMetaData.html
```python
>>> import pyarrow.parquet as pq
>>> import hffs
>>> fs = hffs.HfFileSystem("glue", repo_type="dataset", revision="refs/convert/parquet")
>>> metadata = pq.read_metadata("ax/glue-test.parquet", filesystem=fs)
>>> metadata
<pyarrow._parquet.FileMetaData object at 0x7f4537cec400>
created_by: parquet-cpp-arrow version 7.0.0
num_columns: 4
num_rows: 1104
num_row_groups: 2
format_version: 1.0
serialized_size: 2902
>>> metadata.row_group(0)
<pyarrow._parquet.RowGroupMetaData object at 0x7f45564bcbd0>
num_columns: 4
num_rows: 1000
total_byte_size: 164474
>>> metadata.row_group(1)
<pyarrow._parquet.RowGroupMetaData object at 0x7f455005c400>
num_columns: 4
num_rows: 104
total_byte_size: 13064
```
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 71 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
re: statistics:
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.FileMetaData.html
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.RowGroupMetaData.html
```python
>>> import pyarrow.parquet as pq
>>> import hffs
>>> fs = hffs.HfFileSystem("glue", repo_type="dataset", revision="refs/convert/parquet")
>>> metadata = pq.read_metadata("ax/glue-test.parquet", filesystem=fs)
>>> metadata
<pyarrow._parquet.FileMetaData object at 0x7f4537cec400>
created_by: parquet-cpp-arrow version 7.0.0
num_columns: 4
num_rows: 1104
num_row_groups: 2
format_version: 1.0
serialized_size: 2902
>>> metadata.row_group(0)
<pyarrow._parquet.RowGroupMetaData object at 0x7f45564bcbd0>
num_columns: 4
num_rows: 1000
total_byte_size: 164474
>>> metadata.row_group(1)
<pyarrow._parquet.RowGroupMetaData object at 0x7f455005c400>
num_columns: 4
num_rows: 104
total_byte_size: 13064
```
|
[
-1.2170804738998413,
-0.8857828378677368,
-0.710685670375824,
1.513796329498291,
-0.18721462786197662,
-1.296402931213379,
0.10488943010568619,
-1.088772177696228,
1.6562261581420898,
-0.8069204092025757,
0.3440224528312683,
-1.677908182144165,
0.03769025579094887,
-0.4935606122016907,
-0.7797870635986328,
-0.8879206776618958,
-0.3930312395095825,
-0.8132367730140686,
1.0047023296356201,
2.513383150100708,
1.2669129371643066,
-1.4035778045654297,
2.671433925628662,
0.6943044066429138,
-0.21593381464481354,
-0.9713010787963867,
0.5223782658576965,
0.01634805276989937,
-1.2934738397598267,
-0.5239410996437073,
-0.9005448222160339,
-0.07103632390499115,
-0.5699406862258911,
-0.5273014307022095,
0.0008372059091925621,
0.43346282839775085,
-0.31041228771209717,
-0.38170507550239563,
-0.5546748638153076,
-0.7397783994674683,
0.3898184299468994,
-0.3523048758506775,
0.9117061495780945,
-0.4209778904914856,
1.723500370979309,
-0.5453701615333557,
0.5010144710540771,
0.7397664189338684,
1.3269574642181396,
0.18751965463161469,
-0.046692200005054474,
0.25253304839134216,
0.4133790135383606,
-0.07389835268259048,
0.5225244760513306,
1.1286811828613281,
0.666807234287262,
0.5057533979415894,
0.6908694505691528,
-2.2043306827545166,
1.3526066541671753,
-0.9763928055763245,
0.2991926670074463,
1.3271448612213135,
-0.896004319190979,
0.33187493681907654,
-1.7608288526535034,
-0.01486217137426138,
0.6598081588745117,
-2.296684503555298,
0.2664913237094879,
-1.3547015190124512,
-0.5054266452789307,
1.0060821771621704,
0.3521959185600281,
-1.2071353197097778,
0.06883183866739273,
-0.420285165309906,
1.0310609340667725,
0.4768736958503723,
1.1445987224578857,
-1.680338740348816,
-0.039857249706983566,
-0.2169281393289566,
0.10330445319414139,
-1.1985973119735718,
-1.5761171579360962,
0.5418539643287659,
0.6772454380989075,
0.5439368486404419,
-0.09315884858369827,
0.9633494019508362,
-0.9382411241531372,
0.7433028221130371,
-0.9076473712921143,
-1.6732254028320312,
-1.387195348739624,
-2.2824649810791016,
-2.276796340942383,
0.6716848611831665,
-0.5463669300079346,
-0.45391494035720825,
2.077171802520752,
-1.0523574352264404,
-1.7711528539657593,
1.0885224342346191,
0.2619082033634186,
0.012863987125456333,
2.381892204284668,
0.23886601626873016,
-0.7219950556755066,
0.44989749789237976,
-0.7140365839004517,
0.7186540365219116,
-0.4294694662094116,
1.3322107791900635,
0.39124035835266113,
-1.04378342628479,
1.5533276796340942,
-0.42806577682495117,
0.5786924362182617,
-0.6204320788383484,
-0.44813990592956543,
-0.7148814797401428,
0.3217906951904297,
1.910818338394165,
-0.31270599365234375,
1.5082604885101318,
-0.32057666778564453,
-1.5370837450027466,
-1.6569900512695312,
0.869633138179779,
0.4854694902896881,
-0.7792694568634033,
0.14907413721084595,
-0.4277379512786865,
0.14918434619903564,
-0.031097151339054108,
1.1116946935653687,
1.3079723119735718,
0.8353011608123779,
-0.39787960052490234,
-0.9089449644088745,
0.1770206242799759,
-0.01116427406668663,
-0.6855753660202026,
-1.8399202823638916,
-0.24997951090335846,
0.13480807840824127,
0.6657231450080872,
-1.125093698501587,
1.753943681716919,
0.9582465291023254,
1.931894063949585,
0.9604489803314209,
-0.373138964176178,
1.4970507621765137,
0.09170380234718323,
1.8710768222808838,
-0.4908495545387268,
0.67131507396698,
-0.4049428701400757,
-1.1256492137908936,
0.865050196647644,
-0.27295878529548645,
-1.9981180429458618,
-0.7071442604064941,
-0.7596193552017212,
-0.2059570997953415,
-0.7982430458068848,
0.9733230471611023,
-0.19554121792316437,
-1.3129913806915283,
0.29662537574768066,
-0.7286570072174072,
0.09195750206708908,
-1.233583927154541,
0.3304625451564789,
0.7440169453620911,
-0.5997975468635559,
0.05502044036984444,
-0.3255094587802887,
-1.2488893270492554,
-0.5206364989280701,
0.2473704069852829,
1.8733220100402832,
-0.6527912616729736,
0.8957361578941345,
1.103870153427124,
-0.6741873621940613,
0.03628364950418472,
0.3643012046813965,
-0.3280008137226105,
0.7975181937217712,
-1.1114896535873413,
-0.34584665298461914,
1.2656877040863037,
-0.26923084259033203,
-0.6093829870223999,
1.455345869064331,
0.7170836925506592,
-1.0491424798965454,
-0.12751899659633636,
-0.15926015377044678,
-0.7947005033493042,
0.052313171327114105,
-1.6213821172714233,
-0.03914636746048927,
0.4182117283344269,
-1.558923363685608,
-0.4831315279006958,
-0.16467520594596863,
1.3800069093704224,
-0.10636542737483978,
1.4471099376678467,
-0.30265605449676514,
-0.07318134605884552,
-0.39280134439468384,
-0.3183116912841797,
0.11941703408956528,
-0.24939146637916565,
-0.5433141589164734,
0.21080578863620758,
-0.8203082084655762,
0.22110269963741302,
1.5078576803207397,
0.31033164262771606,
0.011316248215734959,
0.47160810232162476,
1.071611762046814,
0.3965165317058563,
-0.11184753477573395,
-0.8319211006164551,
-1.5052003860473633,
2.041863203048706,
-1.4328105449676514,
2.0076375007629395,
0.7973666787147522,
0.04174214228987694,
-1.8052341938018799,
-1.927596092224121,
1.293643593788147,
1.0703389644622803,
2.393160820007324,
0.5422979593276978,
0.39122480154037476,
-0.7685651779174805,
-0.6673019528388977,
0.3586028516292572,
-1.0204156637191772,
-0.7934678792953491,
0.1312451809644699,
2.3732118606567383,
1.777016282081604,
-0.512587308883667,
-0.1771281510591507,
-0.9553242921829224,
1.3904613256454468,
-0.13954752683639526,
0.17357733845710754,
1.990627646446228,
-0.229031041264534,
-1.0165718793869019,
1.2472730875015259,
-2.368309259414673,
0.16994835436344147,
1.992388129234314,
0.18710051476955414,
0.15520994365215302,
-1.4127399921417236,
-0.6577876210212708,
-0.25698113441467285,
-0.39869460463523865,
-1.2242841720581055,
0.5637982487678528,
-0.2992015779018402,
-0.7709187865257263,
-1.4768328666687012,
0.22957496345043182,
-1.1103453636169434,
-1.7658555507659912,
0.23212173581123352,
1.8604601621627808,
2.0469324588775635,
-0.7874171733856201,
1.5980879068374634,
-0.35556504130363464,
0.03609239310026169,
1.2022521495819092,
1.257361888885498,
3.151510000228882,
1.9247000217437744,
-1.379691243171692,
0.6287886500358582,
-0.16490596532821655,
-0.42232513427734375,
1.0968073606491089,
-1.189129114151001,
1.2187556028366089,
-0.19250881671905518,
-1.203286051750183,
-1.2094422578811646,
0.9855146408081055,
0.5105869770050049,
0.0840267762541771,
-0.4802435636520386,
1.2128047943115234,
0.09593823552131653,
1.4050302505493164,
0.520908534526825,
-0.323421835899353,
0.6505208015441895,
-0.39224931597709656,
-0.5052978992462158,
1.5312875509262085,
0.25268837809562683,
-1.4405829906463623,
-2.2503347396850586,
-0.2294650822877884,
-0.8505544066429138,
0.0584428496658802,
-0.5999331474304199,
-1.0219134092330933,
1.6284760236740112,
0.4299587607383728,
-1.2275773286819458,
-0.3431220054626465,
-0.34791016578674316,
-0.5401785969734192,
2.625684976577759,
-1.3364278078079224,
-0.23682911694049835,
-0.9465800523757935,
-0.5832324624061584,
1.6223481893539429,
-1.2477232217788696,
-0.20593124628067017,
-1.0563852787017822,
-0.5298734307289124,
-1.2547950744628906,
-0.5363006591796875,
0.03228631243109703,
-0.933685839176178,
0.7683073282241821,
0.21042798459529877,
-1.2519170045852661,
-0.35716041922569275,
-0.8820464015007019,
0.8959082961082458,
-0.04947734624147415,
0.23058782517910004,
1.8563636541366577,
0.36106833815574646,
-0.45695212483406067,
0.7521061301231384,
1.1348001956939697,
0.5401050448417664,
-0.6462058424949646,
0.16639156639575958,
-0.6753239631652832,
0.34267550706863403,
-1.338869333267212,
0.23801907896995544,
-2.9105377197265625,
0.668407678604126,
-0.12869170308113098,
0.0033237244933843613,
-0.08777330070734024,
-1.2800564765930176,
1.1194469928741455,
2.6594369411468506,
-1.1645885705947876,
0.5478278994560242,
0.3126308023929596,
1.210598111152649,
-1.5575894117355347,
0.33210036158561707,
-0.3914078176021576,
2.190702199935913,
0.14600929617881775,
1.216477870941162,
-0.4228520691394806,
-2.3317182064056396,
0.6591920852661133,
-1.2020407915115356,
-1.1281358003616333,
0.7849241495132446,
-0.8225875496864319,
-0.04711160808801651,
-1.413652777671814,
-0.14326877892017365,
-0.8479019999504089,
-1.1931010484695435,
0.7694404125213623,
0.1040189191699028,
0.42180463671684265,
-0.6525697112083435,
0.3154623806476593,
-2.1661360263824463,
-1.30666983127594,
-0.2957306504249573,
-0.9387206435203552,
0.44764789938926697,
-0.343828409910202,
0.7722152471542358,
-0.20527710020542145,
0.01518817525357008,
0.3964032232761383,
1.4106069803237915,
3.410625457763672,
0.10009968280792236,
0.31280311942100525,
-0.2427094280719757,
-0.9661065936088562,
1.3741704225540161,
0.8943195343017578,
-0.20691758394241333,
-0.5585713386535645,
-1.0475276708602905,
1.2568544149398804,
1.9477208852767944,
0.9366161227226257,
0.08343781530857086,
-0.940000593662262,
-0.7376386523246765,
-0.04102989658713341,
0.18433614075183868,
0.5234060883522034,
0.9317819476127625,
0.024819470942020416,
0.044199276715517044,
1.395033597946167,
1.1945157051086426,
-0.3534284234046936,
0.4179735481739044,
-0.8586703538894653,
-0.4372478425502777,
0.5387060642242432,
0.3359232246875763,
-0.021234285086393356,
0.28888189792633057,
-0.9959993958473206,
-0.18505002558231354,
-0.3385621905326843,
-0.8854880332946777,
-0.7385244369506836,
-0.4736170172691345,
-0.28710854053497314,
1.6921395063400269,
0.11241069436073303,
-0.48991653323173523,
0.047394562512636185,
-0.7896625399589539,
-0.08909407258033752,
-1.1193766593933105,
0.29549914598464966,
-0.18931308388710022,
-0.06789323687553406,
-0.11633026599884033,
1.7134249210357666,
-0.92927086353302,
-2.0828397274017334,
0.28419220447540283,
0.2758534252643585,
-0.3655913770198822,
0.2797180712223053,
1.7537897825241089,
0.6466554403305054,
1.430031418800354,
1.3348361253738403,
1.018849492073059,
-0.697948157787323,
-1.2836711406707764,
0.703892707824707,
0.9537401795387268,
-1.4559255838394165,
0.8392370343208313,
0.009393629617989063,
-0.4939836263656616,
0.6453102231025696,
1.264265775680542,
0.44290226697921753,
-2.0574700832366943,
0.8792571425437927,
-0.8767859935760498,
0.8016351461410522,
0.6940113306045532,
0.7318179607391357,
0.1370883733034134,
0.7912352681159973,
-1.202197790145874,
-1.1453503370285034,
-0.7390174269676208,
-0.6992334723472595,
1.881848931312561,
-0.25315728783607483,
0.5386313199996948,
-0.19679729640483856,
-1.3476377725601196,
-0.09405658394098282,
0.7211964726448059,
0.29365628957748413,
-0.4256196916103363,
0.8396124839782715,
-0.6661134362220764,
-1.1446102857589722,
-1.3724602460861206,
-0.45361900329589844,
-1.044847011566162,
-0.9255152940750122,
1.0322726964950562,
0.7620042562484741,
0.3388429284095764,
1.8811668157577515,
0.5849546194076538,
0.22906999289989471,
-2.6395440101623535,
0.9375619292259216,
0.3155629336833954,
-0.09868938475847244,
0.9612185955047607,
0.3387795090675354,
1.0170190334320068,
-0.028510253876447678,
0.5402512550354004,
-2.449866771697998,
2.294422149658203,
-0.26449134945869446,
0.7026243209838867,
0.07853736728429794,
-0.23854319751262665,
1.0393750667572021,
0.5946676135063171,
0.5915261507034302,
-1.0990705490112305,
0.7453093528747559,
-0.627357542514801,
1.2046207189559937,
0.8765232563018799,
-0.8284374475479126,
-0.06829385459423065,
1.2612444162368774,
0.4242236018180847,
-0.5491591691970825,
-0.9300487041473389,
-0.9430210590362549,
0.9242615699768066,
1.7916756868362427,
-0.05765949934720993,
0.03458838909864426,
0.6998849511146545,
0.6487381458282471,
-1.304384708404541,
0.04146504029631615,
-0.7508953213691711,
-0.7335246801376343,
1.639039158821106,
1.981255054473877,
-0.09221991896629333,
-0.221792533993721,
-0.7790665626525879,
-1.3121217489242554,
0.8235493898391724,
-0.08464129269123077,
0.09658274799585342,
0.6288227438926697,
-0.6305512189865112,
1.0421842336654663,
0.8041365742683411,
0.9670689702033997,
0.13186006247997284,
0.3069756031036377,
0.4589216411113739,
-0.38000354170799255,
-1.0946755409240723,
-0.3133274018764496,
-1.152700424194336,
-2.5928046703338623,
0.5315847992897034,
-0.22256985306739807,
-1.408621072769165,
-0.0738440528512001,
-1.030978798866272,
0.9350177049636841,
-0.5295671820640564,
-1.066674828529358,
-1.4104937314987183,
0.1168849840760231,
-0.10275058448314667,
0.9299048781394958,
-1.5452531576156616,
-0.11866810917854309,
1.236090064048767,
0.9512841701507568,
-0.6753775477409363,
1.0477367639541626,
0.25602850317955017,
1.0961543321609497,
0.8358741402626038,
-0.40622246265411377,
0.516014814376831,
0.05075419694185257,
-1.3148812055587769,
0.39013463258743286,
1.225767731666565,
0.24203245341777802,
1.4057180881500244,
-0.54322350025177,
0.03943926468491554,
0.3596227467060089,
-0.5399490594863892,
-0.5327848792076111,
-0.4762132167816162,
0.7137332558631897,
-0.018603716045618057,
-0.9618901014328003,
-0.008326719515025616,
-0.09725962579250336,
-0.1954689770936966,
0.14915801584720612,
-1.4869980812072754,
-0.1931433528661728,
-0.33291828632354736,
-0.48081284761428833,
-1.287700891494751,
-0.06963534653186798,
1.4078387022018433,
-0.7549236416816711,
-0.20851795375347137,
0.45632103085517883,
0.3357298672199249,
0.5158707499504089,
0.6030498147010803,
-0.702434778213501,
-0.3794304430484772,
-0.31341832876205444,
-0.33641478419303894,
0.32221949100494385,
1.3358200788497925,
-0.054761603474617004,
-0.9356141686439514,
0.6609511375427246,
-0.4020114839076996,
0.06464535742998123,
1.946627140045166,
0.10071912407875061,
-0.8157574534416199,
0.2996939420700073,
-0.6383770108222961,
1.8937302827835083,
1.7564464807510376,
1.2976553440093994,
-0.20615005493164062,
-1.003804326057434,
0.6543511748313904,
-0.3908822238445282,
-0.43272653222084045,
0.8339902758598328,
0.4385002553462982,
-0.25911927223205566,
-1.4797576665878296,
0.5856925845146179,
1.1504689455032349,
-0.8693507313728333,
-0.7925877571105957,
0.06610774993896484,
-0.7382869124412537,
1.082533359527588,
0.7503718137741089,
0.42354074120521545,
0.2798211872577667,
1.6294198036193848,
0.7860652804374695,
-0.5464298129081726,
0.5454151630401611,
0.41960540413856506,
-0.216007798910141,
-2.047606945037842,
-1.1075607538223267,
0.28941085934638977,
-0.47865530848503113,
-1.5642980337142944,
1.4126524925231934,
-1.1861929893493652,
-1.0241150856018066,
0.4713912606239319,
0.07813066244125366,
1.4209333658218384,
0.34187331795692444,
1.6618223190307617,
2.058068037033081,
0.9643490314483643,
0.34701815247535706,
1.2937260866165161,
-0.16139134764671326,
-0.4683583974838257,
1.8544729948043823,
-0.44802579283714294,
0.4394416809082031,
1.1391524076461792,
-0.36806803941726685,
-1.0086164474487305,
-0.8279691338539124,
-1.1626051664352417,
-0.7554321885108948,
1.2095314264297485,
0.11581888049840927,
-1.087485909461975,
0.3021649718284607,
1.6297389268875122,
0.10422026365995407,
-0.34876003861427307,
0.6606618762016296,
0.44425544142723083,
-0.7775946855545044,
-0.04777714982628822,
-0.9168767929077148,
0.5407012701034546,
-0.24074794352054596,
-0.3992278575897217,
0.4147906005382538,
0.4088805913925171,
1.3639153242111206,
-0.0051670558750629425,
0.14660048484802246,
1.1576677560806274,
-1.399878740310669,
1.5275341272354126,
-0.6698046326637268,
0.28095710277557373,
-2.3208515644073486,
1.4330819845199585,
-0.8187498450279236,
1.9440250396728516,
-2.6320364475250244,
0.4648936688899994,
-0.5339157581329346,
-0.44968611001968384,
0.2965533435344696,
-0.368478924036026,
0.14463210105895996,
-0.16911861300468445,
-1.128483533859253,
-0.12239416688680649,
-0.6423407793045044,
0.6007459163665771,
1.1071332693099976,
1.3971869945526123,
-1.1284998655319214,
-0.22277513146400452,
-1.729531168937683,
-0.18813490867614746,
-0.7731108069419861,
0.27578645944595337,
-1.9642231464385986,
-0.22464895248413086,
-1.955930233001709,
-2.331569194793701,
-1.341497540473938,
-0.8216516375541687,
1.0386377573013306,
0.14493528008460999,
-0.8260697722434998,
1.173194169998169,
-0.38923782110214233,
-1.8583950996398926,
1.088602900505066,
-2.1629257202148438
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
> user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all)
private datasets are not supported yet (https://github.com/huggingface/datasets-server/issues/39)
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 26 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
> user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all)
private datasets are not supported yet (https://github.com/huggingface/datasets-server/issues/39)
|
[
-1.236828327178955,
-0.91953045129776,
-0.816565215587616,
1.4637548923492432,
-0.10846497863531113,
-1.304808497428894,
0.08491496741771698,
-1.1008682250976562,
1.742102861404419,
-0.8288906812667847,
0.31637775897979736,
-1.714299201965332,
0.08610109984874725,
-0.5974811911582947,
-0.8330824971199036,
-0.8750205039978027,
-0.44597327709198,
-0.742035984992981,
0.9199637770652771,
2.540862798690796,
1.1733821630477905,
-1.4220389127731323,
2.6687755584716797,
0.699242115020752,
-0.1479429304599762,
-1.0218559503555298,
0.4960934817790985,
-0.01568775624036789,
-1.203741192817688,
-0.5114536285400391,
-0.9269834756851196,
-0.05022479593753815,
-0.535605788230896,
-0.5991491079330444,
-0.004252779297530651,
0.4261138439178467,
-0.3366515040397644,
-0.4282464385032654,
-0.46352988481521606,
-0.8245922923088074,
0.4579183757305145,
-0.3719470798969269,
0.9626557230949402,
-0.4036127030849457,
1.8550877571105957,
-0.517491340637207,
0.474888414144516,
0.6709471344947815,
1.4254577159881592,
0.1857513189315796,
-0.08736597001552582,
0.2909422218799591,
0.3841485381126404,
-0.03378072381019592,
0.45182475447654724,
1.1099979877471924,
0.6407297849655151,
0.5199573040008545,
0.7064832448959351,
-2.2007038593292236,
1.3565771579742432,
-1.0247446298599243,
0.30783456563949585,
1.374465823173523,
-0.9559003710746765,
0.3765464723110199,
-1.7770566940307617,
-0.06688228994607925,
0.600304126739502,
-2.2683281898498535,
0.2197803258895874,
-1.2252660989761353,
-0.43587276339530945,
1.0909514427185059,
0.3467826545238495,
-1.2588335275650024,
0.13807323575019836,
-0.41047170758247375,
1.0101686716079712,
0.516581118106842,
1.1781291961669922,
-1.6798417568206787,
-0.002095387317240238,
-0.23529580235481262,
0.05454312264919281,
-1.300212025642395,
-1.4873474836349487,
0.5052260160446167,
0.6435360312461853,
0.546511173248291,
-0.07810085266828537,
0.8890244960784912,
-0.9327433109283447,
0.7955284714698792,
-0.9254230856895447,
-1.6264492273330688,
-1.3593697547912598,
-2.3033828735351562,
-2.39654278755188,
0.7824671268463135,
-0.4597379267215729,
-0.506007194519043,
2.0341334342956543,
-1.0068836212158203,
-1.7710177898406982,
1.1808040142059326,
0.2743366062641144,
-0.046605512499809265,
2.4074831008911133,
0.18856102228164673,
-0.7307429313659668,
0.47716328501701355,
-0.6635377407073975,
0.7046747803688049,
-0.5358872413635254,
1.3909573554992676,
0.4872642755508423,
-1.1595830917358398,
1.6293258666992188,
-0.5316054821014404,
0.5240703821182251,
-0.6802834272384644,
-0.4542907774448395,
-0.8088716268539429,
0.45155206322669983,
1.846500277519226,
-0.2811061143875122,
1.574047565460205,
-0.3226214051246643,
-1.5798685550689697,
-1.6478904485702515,
0.8985843658447266,
0.43772590160369873,
-0.7352162599563599,
0.2093813419342041,
-0.356781542301178,
0.1308559626340866,
-0.03207263723015785,
1.0802026987075806,
1.2036436796188354,
0.6999083757400513,
-0.3141472637653351,
-0.9086207151412964,
0.2920107841491699,
-0.05286381393671036,
-0.7325747609138489,
-1.78408682346344,
-0.3558005392551422,
0.16292862594127655,
0.6246752738952637,
-1.1037739515304565,
1.7829089164733887,
0.9119420647621155,
1.8720662593841553,
0.9743435978889465,
-0.29295438528060913,
1.460956335067749,
0.014723371714353561,
1.9180207252502441,
-0.4631439745426178,
0.7676618695259094,
-0.31499987840652466,
-1.1419718265533447,
0.8035956025123596,
-0.3430204689502716,
-2.0464634895324707,
-0.7852807641029358,
-0.8538251519203186,
-0.14606167376041412,
-0.7433821558952332,
1.051387071609497,
-0.18716762959957123,
-1.296792984008789,
0.3360386788845062,
-0.6983016729354858,
0.18261553347110748,
-1.2971707582473755,
0.3461557924747467,
0.7664734125137329,
-0.6582503318786621,
0.07131443917751312,
-0.2936086654663086,
-1.2727073431015015,
-0.4728943109512329,
0.22314117848873138,
1.9086309671401978,
-0.824390172958374,
0.898058295249939,
1.0126283168792725,
-0.6948618292808533,
0.005750707350671291,
0.45921480655670166,
-0.32802867889404297,
0.848349392414093,
-1.0495264530181885,
-0.35201627016067505,
1.3347047567367554,
-0.2730987071990967,
-0.5487170815467834,
1.461801528930664,
0.7029916644096375,
-1.0407254695892334,
-0.07708259671926498,
-0.23867426812648773,
-0.8811333179473877,
-0.015684207901358604,
-1.5885766744613647,
-0.03485900163650513,
0.32622817158699036,
-1.4685494899749756,
-0.4428173005580902,
-0.15876629948616028,
1.3002880811691284,
-0.15727272629737854,
1.4988937377929688,
-0.33628690242767334,
-0.173170268535614,
-0.4202023446559906,
-0.36064019799232483,
0.13084106147289276,
-0.20053017139434814,
-0.6296486854553223,
0.24154840409755707,
-0.7418006062507629,
0.31352323293685913,
1.4261386394500732,
0.3799665868282318,
0.07101120799779892,
0.5298622250556946,
1.136337399482727,
0.30246180295944214,
-0.1359424591064453,
-0.8258710503578186,
-1.5718029737472534,
2.0418248176574707,
-1.3976143598556519,
1.9159572124481201,
0.8189319968223572,
-0.0020206747576594353,
-1.7287063598632812,
-1.7930450439453125,
1.3793718814849854,
1.170444130897522,
2.4188954830169678,
0.5824639797210693,
0.3446836769580841,
-0.8437453508377075,
-0.6575644612312317,
0.3658662438392639,
-1.0771431922912598,
-0.8298599720001221,
0.04363703727722168,
2.3440346717834473,
1.8613126277923584,
-0.4862422049045563,
-0.20815809071063995,
-1.0803509950637817,
1.3163083791732788,
-0.24918581545352936,
0.10605821013450623,
1.9707849025726318,
-0.33647915720939636,
-1.0526937246322632,
1.246806263923645,
-2.3970072269439697,
0.12402450293302536,
1.959722638130188,
0.23904933035373688,
0.07183399796485901,
-1.4346411228179932,
-0.6094580292701721,
-0.17778266966342926,
-0.30531248450279236,
-1.2114198207855225,
0.5395842790603638,
-0.30752620100975037,
-0.7379229068756104,
-1.4661476612091064,
0.20410943031311035,
-1.1023792028427124,
-1.645686149597168,
0.2578362226486206,
1.7412952184677124,
2.036022424697876,
-0.7644245028495789,
1.5474482774734497,
-0.1638355851173401,
0.18659625947475433,
1.2805263996124268,
1.2587640285491943,
3.1776013374328613,
1.8698253631591797,
-1.4174481630325317,
0.6244844198226929,
-0.11064039170742035,
-0.4904836118221283,
1.1862550973892212,
-1.1505850553512573,
1.2988961935043335,
-0.19881068170070648,
-1.2712711095809937,
-1.2924165725708008,
0.923137366771698,
0.526203453540802,
0.11352133750915527,
-0.531997799873352,
1.200667142868042,
0.058434948325157166,
1.3312147855758667,
0.46883276104927063,
-0.3868713974952698,
0.6165309548377991,
-0.4327559173107147,
-0.5304238200187683,
1.4730174541473389,
0.27426576614379883,
-1.4507992267608643,
-2.2873387336730957,
-0.17522113025188446,
-0.8613581657409668,
-0.023119550198316574,
-0.6639682650566101,
-0.9574764966964722,
1.599330186843872,
0.41525501012802124,
-1.2369883060455322,
-0.33282670378685,
-0.2843637764453888,
-0.6565240621566772,
2.6477396488189697,
-1.3917877674102783,
-0.2893517315387726,
-0.989014744758606,
-0.6141528487205505,
1.62643563747406,
-1.2255862951278687,
-0.13779152929782867,
-1.0930873155593872,
-0.6317651867866516,
-1.3472436666488647,
-0.5970627069473267,
-0.016335714608430862,
-0.9436413049697876,
0.8213584423065186,
0.2307400405406952,
-1.249308705329895,
-0.34114858508110046,
-0.8399761319160461,
0.8037087917327881,
-0.10431691259145737,
0.31205689907073975,
1.7870440483093262,
0.4348509907722473,
-0.4621860086917877,
0.6951770782470703,
1.1786651611328125,
0.6291631460189819,
-0.6022264957427979,
0.21784670650959015,
-0.7055550217628479,
0.3133884370326996,
-1.3715877532958984,
0.3188124895095825,
-2.8506202697753906,
0.6050854921340942,
-0.16383332014083862,
-0.0792316123843193,
-0.05517972260713577,
-1.2892359495162964,
1.0532923936843872,
2.6335432529449463,
-1.195521354675293,
0.46845871210098267,
0.26983585953712463,
1.2598414421081543,
-1.595635175704956,
0.3180508613586426,
-0.3894617259502411,
2.186546802520752,
0.13009366393089294,
1.1570227146148682,
-0.44424155354499817,
-2.162764072418213,
0.6012753844261169,
-1.2610039710998535,
-1.1613507270812988,
0.8631880283355713,
-0.8026326894760132,
-0.028691265732049942,
-1.387571930885315,
-0.08905711024999619,
-0.774458646774292,
-1.2502570152282715,
0.8768300414085388,
0.11258026212453842,
0.49474790692329407,
-0.6020042896270752,
0.3485352694988251,
-2.153343677520752,
-1.2900235652923584,
-0.31162410974502563,
-0.9038528203964233,
0.40847063064575195,
-0.2958459258079529,
0.7445111870765686,
-0.27040895819664,
-0.022393561899662018,
0.3467112183570862,
1.3913873434066772,
3.4010090827941895,
0.2388681322336197,
0.4121287763118744,
-0.12281537055969238,
-0.917736291885376,
1.4199379682540894,
0.9121845364570618,
-0.20622362196445465,
-0.5244855880737305,
-0.9610190987586975,
1.2888376712799072,
1.8419265747070312,
0.9363459348678589,
0.1382385492324829,
-0.8443953990936279,
-0.6692054867744446,
-0.05663400888442993,
0.13662579655647278,
0.4746917188167572,
0.8722602128982544,
0.012313131242990494,
0.019116448238492012,
1.4113504886627197,
1.2228118181228638,
-0.43438559770584106,
0.47233155369758606,
-0.7572214007377625,
-0.49094730615615845,
0.5482840538024902,
0.35443830490112305,
0.018181132152676582,
0.3149317502975464,
-0.9806014895439148,
-0.18625280261039734,
-0.35226595401763916,
-0.9521288871765137,
-0.7382774949073792,
-0.5355103611946106,
-0.3699578642845154,
1.685320496559143,
0.10105784237384796,
-0.5133963227272034,
0.031126903370022774,
-0.8794522285461426,
-0.07112110406160355,
-1.0233045816421509,
0.25754454731941223,
-0.0774431973695755,
-0.1617666333913803,
-0.07174236327409744,
1.7878929376602173,
-0.9935706853866577,
-2.1468303203582764,
0.29046520590782166,
0.2471633404493332,
-0.4064330756664276,
0.16352300345897675,
1.6395947933197021,
0.5385842323303223,
1.4786189794540405,
1.3591545820236206,
0.9766828417778015,
-0.760766327381134,
-1.3237971067428589,
0.7402443289756775,
0.9417991638183594,
-1.501137137413025,
0.8445842266082764,
0.067764051258564,
-0.5020483732223511,
0.6637697815895081,
1.2372701168060303,
0.3775213956832886,
-1.923656702041626,
0.80439692735672,
-0.8673800826072693,
0.7484440207481384,
0.6504307985305786,
0.6793513298034668,
0.1516510546207428,
0.7268588542938232,
-1.2732253074645996,
-1.2296464443206787,
-0.7823233604431152,
-0.6741622686386108,
1.8894155025482178,
-0.13603080809116364,
0.5488943457603455,
-0.1559680998325348,
-1.388257384300232,
-0.05467401444911957,
0.7465538382530212,
0.31379276514053345,
-0.3638821244239807,
0.8133447766304016,
-0.6868430376052856,
-1.0784566402435303,
-1.4454652070999146,
-0.4507688581943512,
-1.0705921649932861,
-0.8481352925300598,
1.0758627653121948,
0.8101034760475159,
0.18701805174350739,
1.8613877296447754,
0.6230437159538269,
0.2201334685087204,
-2.587108850479126,
0.8974326252937317,
0.3127061426639557,
-0.06414031982421875,
0.8743028044700623,
0.3096693754196167,
1.0043087005615234,
-0.008031276986002922,
0.5053891539573669,
-2.4891974925994873,
2.255108118057251,
-0.24445928633213043,
0.6276134848594666,
0.032148659229278564,
-0.26357752084732056,
1.0988690853118896,
0.5862215757369995,
0.527798593044281,
-1.0683438777923584,
0.7248123288154602,
-0.6495587229728699,
1.2202485799789429,
0.9458832144737244,
-0.8936346173286438,
-0.018812326714396477,
1.2719788551330566,
0.4830866754055023,
-0.4646347165107727,
-0.9258776903152466,
-0.90949547290802,
0.9499249458312988,
1.7246958017349243,
-0.02522662654519081,
0.021937865763902664,
0.8299446702003479,
0.6607920527458191,
-1.2967668771743774,
0.10291165858507156,
-0.7847022414207458,
-0.7623426914215088,
1.621656894683838,
1.9897844791412354,
-0.057674966752529144,
-0.22562696039676666,
-0.8270495533943176,
-1.2178930044174194,
0.8058274388313293,
0.04312003403902054,
0.10853450000286102,
0.7677136659622192,
-0.6810640692710876,
1.0750099420547485,
0.9536712765693665,
0.8555170893669128,
0.18548963963985443,
0.19537986814975739,
0.42486876249313354,
-0.2928529679775238,
-1.0712467432022095,
-0.23184172809123993,
-1.1778532266616821,
-2.5763323307037354,
0.5137905478477478,
-0.20930621027946472,
-1.4509284496307373,
0.01314523071050644,
-1.000131607055664,
0.9592994451522827,
-0.5136207342147827,
-1.1474783420562744,
-1.5332763195037842,
0.18038859963417053,
-0.10127732157707214,
0.8797260522842407,
-1.5371074676513672,
-0.07390879094600677,
1.1861581802368164,
0.9144220948219299,
-0.6711706519126892,
0.9982442855834961,
0.23780567944049835,
1.0828689336776733,
0.8936333060264587,
-0.396103173494339,
0.4921164810657501,
0.06695912778377533,
-1.3913671970367432,
0.4351082742214203,
1.1336504220962524,
0.22137683629989624,
1.4382195472717285,
-0.513296365737915,
0.047449320554733276,
0.35082724690437317,
-0.5376490354537964,
-0.5735284686088562,
-0.5098501443862915,
0.688335120677948,
0.03674529492855072,
-0.8592777252197266,
0.07979737222194672,
-0.06090886890888214,
-0.26425305008888245,
0.18683961033821106,
-1.5378440618515015,
-0.17038176953792572,
-0.29491621255874634,
-0.5477421283721924,
-1.2240127325057983,
-0.06286900490522385,
1.3797606229782104,
-0.8296788930892944,
-0.23728801310062408,
0.5588431358337402,
0.3924953043460846,
0.5033466815948486,
0.6093388199806213,
-0.6330249309539795,
-0.3298388123512268,
-0.2812967896461487,
-0.32503944635391235,
0.31669530272483826,
1.324548602104187,
-0.08782513439655304,
-0.944783627986908,
0.7511234879493713,
-0.3500083088874817,
0.06806816160678864,
1.8886574506759644,
0.1571006178855896,
-0.8861340284347534,
0.30083051323890686,
-0.6810380220413208,
1.9302674531936646,
1.7429206371307373,
1.3132472038269043,
-0.11078600585460663,
-1.0153616666793823,
0.6098549365997314,
-0.33583998680114746,
-0.366840124130249,
0.9313212633132935,
0.4790654480457306,
-0.18152621388435364,
-1.4368512630462646,
0.5770921111106873,
1.1354974508285522,
-0.8211022019386292,
-0.7535433769226074,
0.01831354945898056,
-0.8612170219421387,
1.0329521894454956,
0.8014630675315857,
0.4749591052532196,
0.23555223643779755,
1.6312826871871948,
0.762401819229126,
-0.48520106077194214,
0.56727135181427,
0.4532763957977295,
-0.18739648163318634,
-2.0665524005889893,
-1.0814790725708008,
0.2655891478061676,
-0.42828986048698425,
-1.492583155632019,
1.3280175924301147,
-1.1902753114700317,
-0.9027798771858215,
0.4882919192314148,
0.10622237622737885,
1.4816123247146606,
0.3169651925563812,
1.6211551427841187,
2.035569190979004,
0.9860180616378784,
0.25941118597984314,
1.3357560634613037,
-0.12107517570257187,
-0.38009580969810486,
1.8261505365371704,
-0.38878127932548523,
0.46063852310180664,
1.0857762098312378,
-0.3759010434150696,
-1.0839855670928955,
-0.7291236519813538,
-1.1339612007141113,
-0.684918999671936,
1.186570644378662,
0.131939098238945,
-1.0799986124038696,
0.23899835348129272,
1.577754259109497,
0.0466732531785965,
-0.30388909578323364,
0.568367600440979,
0.5036615133285522,
-0.7845916152000427,
0.03491310775279999,
-0.8868467211723328,
0.5522554516792297,
-0.1747402399778366,
-0.35529375076293945,
0.3743910789489746,
0.4583423435688019,
1.3491919040679932,
0.038970984518527985,
0.22182413935661316,
1.2264877557754517,
-1.4035940170288086,
1.4779080152511597,
-0.7108052372932434,
0.2524511516094208,
-2.328331470489502,
1.4487764835357666,
-0.8361294865608215,
1.8682923316955566,
-2.6582870483398438,
0.4543601870536804,
-0.6203290224075317,
-0.49445781111717224,
0.3842015862464905,
-0.4140302538871765,
0.15071186423301697,
-0.1543739289045334,
-1.150527834892273,
-0.1600743979215622,
-0.6041139960289001,
0.5965374112129211,
1.1567174196243286,
1.337350845336914,
-1.092116355895996,
-0.34002262353897095,
-1.7533758878707886,
-0.2058272510766983,
-0.6900372505187988,
0.31454789638519287,
-1.9321757555007935,
-0.1643514633178711,
-1.9370232820510864,
-2.31449294090271,
-1.4369035959243774,
-0.7849889397621155,
1.121441125869751,
0.18360750377178192,
-0.9343268871307373,
1.159959077835083,
-0.45036837458610535,
-1.8249180316925049,
1.0710316896438599,
-2.222851276397705
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
@versae `Dataset.push_to_hub` writes shards in Parquet, so this solution would also work for such datasets (immediately after the push).
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 19 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@versae `Dataset.push_to_hub` writes shards in Parquet, so this solution would also work for such datasets (immediately after the push).
|
[
-1.246268391609192,
-0.8859814405441284,
-0.8050820827484131,
1.5180631875991821,
-0.1462196260690689,
-1.3354055881500244,
0.13288341462612152,
-1.1224117279052734,
1.7512195110321045,
-0.8549055457115173,
0.3242103159427643,
-1.6801427602767944,
0.1334267258644104,
-0.6327071189880371,
-0.8726653456687927,
-0.8980680108070374,
-0.4633502960205078,
-0.7233619093894958,
0.9113173484802246,
2.516026496887207,
1.1822599172592163,
-1.4021743535995483,
2.66146183013916,
0.6823312640190125,
-0.11531942337751389,
-1.030768632888794,
0.49109265208244324,
-0.030876081436872482,
-1.1897683143615723,
-0.5446693897247314,
-0.9155852794647217,
-0.08555950969457626,
-0.5594283938407898,
-0.6123842000961304,
-0.0014281095936894417,
0.43294814229011536,
-0.33741655945777893,
-0.44201451539993286,
-0.45522981882095337,
-0.8105152249336243,
0.4218999445438385,
-0.34729626774787903,
1.0015077590942383,
-0.42805320024490356,
1.9053962230682373,
-0.5592477321624756,
0.4711204767227173,
0.7077458500862122,
1.4368106126785278,
0.14257758855819702,
-0.09136876463890076,
0.27306294441223145,
0.4084491431713104,
-0.030173398554325104,
0.4479413628578186,
1.0561143159866333,
0.6530556678771973,
0.5552865266799927,
0.7015130519866943,
-2.1764893531799316,
1.3522858619689941,
-1.0875911712646484,
0.3372582197189331,
1.3663580417633057,
-0.9482259154319763,
0.3519041836261749,
-1.755210041999817,
-0.03014451265335083,
0.6255531311035156,
-2.217205762863159,
0.21714675426483154,
-1.2423912286758423,
-0.443820595741272,
1.0720057487487793,
0.3521747291088104,
-1.2632699012756348,
0.1588580161333084,
-0.38985905051231384,
1.0315061807632446,
0.4729892611503601,
1.1411138772964478,
-1.675785779953003,
0.0024898340925574303,
-0.2675290107727051,
0.04166800528764725,
-1.2796459197998047,
-1.4643782377243042,
0.5163482427597046,
0.6291308403015137,
0.5231981873512268,
-0.058995719999074936,
0.909202516078949,
-0.9222869277000427,
0.7882659435272217,
-0.9062598943710327,
-1.6072790622711182,
-1.3754576444625854,
-2.267292022705078,
-2.3794617652893066,
0.7262129783630371,
-0.447882741689682,
-0.5354425311088562,
2.055824041366577,
-1.031803846359253,
-1.7496150732040405,
1.192500352859497,
0.22403602302074432,
-0.06684587150812149,
2.3924763202667236,
0.1908886432647705,
-0.6906509399414062,
0.4427921772003174,
-0.6455106139183044,
0.7104650735855103,
-0.5553257465362549,
1.3850332498550415,
0.44563522934913635,
-1.1590861082077026,
1.5896308422088623,
-0.4980022609233856,
0.5460535287857056,
-0.6498278975486755,
-0.43376845121383667,
-0.8171182870864868,
0.44108274579048157,
1.852075457572937,
-0.24436765909194946,
1.523485779762268,
-0.301493763923645,
-1.5856943130493164,
-1.643176794052124,
0.963958203792572,
0.4075421392917633,
-0.7073745131492615,
0.17514705657958984,
-0.3366627097129822,
0.1467532515525818,
-0.04858094081282616,
1.1189724206924438,
1.209615707397461,
0.7329574227333069,
-0.3404364287853241,
-0.8951428532600403,
0.2673185169696808,
-0.043504633009433746,
-0.7608816623687744,
-1.7939039468765259,
-0.3405746519565582,
0.13895048201084137,
0.6470237374305725,
-1.075853943824768,
1.7687549591064453,
0.926354706287384,
1.851975679397583,
0.9833073616027832,
-0.2746966481208801,
1.458802580833435,
0.03786627575755119,
1.9137418270111084,
-0.4723155200481415,
0.7804879546165466,
-0.3482978641986847,
-1.155065894126892,
0.8256276845932007,
-0.3364855647087097,
-2.038259983062744,
-0.8031361699104309,
-0.8579137921333313,
-0.16259929537773132,
-0.7429895401000977,
1.0554407835006714,
-0.22573275864124298,
-1.2954533100128174,
0.36349672079086304,
-0.6962907314300537,
0.18532195687294006,
-1.2479979991912842,
0.37343376874923706,
0.7227981686592102,
-0.6408741474151611,
0.07675226777791977,
-0.2646684944629669,
-1.26653254032135,
-0.4416498839855194,
0.18907111883163452,
1.8918569087982178,
-0.8398050665855408,
0.8869356513023376,
1.0326482057571411,
-0.6780040860176086,
-0.06112982705235481,
0.4686388671398163,
-0.3340945243835449,
0.8249377608299255,
-1.0751739740371704,
-0.3714781701564789,
1.3438459634780884,
-0.254989892244339,
-0.5640560388565063,
1.478731393814087,
0.7149266600608826,
-1.022080898284912,
-0.031078297644853592,
-0.23836509883403778,
-0.8996497988700867,
0.020937222987413406,
-1.5792614221572876,
-0.014496524818241596,
0.38460126519203186,
-1.4827824831008911,
-0.43047940731048584,
-0.17092300951480865,
1.3077785968780518,
-0.12861834466457367,
1.5065183639526367,
-0.33010271191596985,
-0.2394740730524063,
-0.38698092103004456,
-0.3371383249759674,
0.13323237001895905,
-0.1406618058681488,
-0.5996069312095642,
0.20820645987987518,
-0.723585844039917,
0.3225487768650055,
1.4224560260772705,
0.29993122816085815,
0.05464969947934151,
0.5457543134689331,
1.1353377103805542,
0.3021318018436432,
-0.07004859298467636,
-0.8645666241645813,
-1.5359728336334229,
2.046379327774048,
-1.3926184177398682,
1.9496670961380005,
0.8063790202140808,
0.049350008368492126,
-1.7334320545196533,
-1.785524606704712,
1.3699363470077515,
1.1753249168395996,
2.403784990310669,
0.5819487571716309,
0.32531964778900146,
-0.8605210185050964,
-0.6364485025405884,
0.3546661138534546,
-1.1132174730300903,
-0.7814563512802124,
0.07536376267671585,
2.3590431213378906,
1.8799649477005005,
-0.46382367610931396,
-0.20754078030586243,
-1.1015040874481201,
1.370784044265747,
-0.2294839471578598,
0.0916651040315628,
1.9852983951568604,
-0.31218284368515015,
-1.0542994737625122,
1.2297793626785278,
-2.3797848224639893,
0.09832409024238586,
1.9605042934417725,
0.23356471955776215,
0.05223033204674721,
-1.4807994365692139,
-0.5937640070915222,
-0.1632477343082428,
-0.28924626111984253,
-1.2444791793823242,
0.5580536127090454,
-0.32032310962677,
-0.6882851719856262,
-1.470612645149231,
0.2409183531999588,
-1.1049267053604126,
-1.638529896736145,
0.21003343164920807,
1.754055380821228,
2.0149004459381104,
-0.7444605827331543,
1.5896751880645752,
-0.18478257954120636,
0.21136216819286346,
1.2852436304092407,
1.2149995565414429,
3.1847002506256104,
1.9159623384475708,
-1.4034186601638794,
0.5912627577781677,
-0.11952674388885498,
-0.48871174454689026,
1.1640408039093018,
-1.1775928735733032,
1.329733967781067,
-0.1907762885093689,
-1.2192264795303345,
-1.2885969877243042,
0.9192366003990173,
0.5108458399772644,
0.12902674078941345,
-0.4809843897819519,
1.2285937070846558,
0.041803255677223206,
1.3293739557266235,
0.48230990767478943,
-0.36627623438835144,
0.6116334795951843,
-0.43192580342292786,
-0.543465256690979,
1.4861907958984375,
0.3102749288082123,
-1.39615797996521,
-2.271071195602417,
-0.18312394618988037,
-0.8352294564247131,
-0.014161590486764908,
-0.6083092093467712,
-0.9190414547920227,
1.6271471977233887,
0.3753357529640198,
-1.2742094993591309,
-0.31918078660964966,
-0.2573513388633728,
-0.6464130282402039,
2.6943202018737793,
-1.3997819423675537,
-0.3110576570034027,
-0.9999547600746155,
-0.6405733823776245,
1.6389638185501099,
-1.228094458580017,
-0.15918004512786865,
-1.0842633247375488,
-0.5806332230567932,
-1.3281811475753784,
-0.6029894948005676,
-0.014687003567814827,
-0.9611039161682129,
0.8176811337471008,
0.2005614936351776,
-1.2650799751281738,
-0.3640846312046051,
-0.8265113830566406,
0.7892127633094788,
-0.06172815337777138,
0.3104131817817688,
1.785847783088684,
0.46158498525619507,
-0.4529692530632019,
0.6985953450202942,
1.1656907796859741,
0.6467226147651672,
-0.6238846778869629,
0.2526925802230835,
-0.7310558557510376,
0.2550979256629944,
-1.32377290725708,
0.34853774309158325,
-2.816171169281006,
0.5806301832199097,
-0.17856501042842865,
-0.09270638227462769,
-0.032913584262132645,
-1.2773056030273438,
1.0545510053634644,
2.6695668697357178,
-1.1913540363311768,
0.4400826394557953,
0.23954662680625916,
1.2606028318405151,
-1.6054458618164062,
0.40007302165031433,
-0.37537992000579834,
2.184696912765503,
0.133602574467659,
1.1460298299789429,
-0.4311622381210327,
-2.2406203746795654,
0.6086297035217285,
-1.2981038093566895,
-1.2374902963638306,
0.8656911849975586,
-0.7968704700469971,
-0.08556754142045975,
-1.3543586730957031,
-0.13510362803936005,
-0.8155970573425293,
-1.2805054187774658,
0.8777291774749756,
0.1528770923614502,
0.47370508313179016,
-0.6022305488586426,
0.31939148902893066,
-2.174569845199585,
-1.3060495853424072,
-0.3032591938972473,
-0.8939279317855835,
0.37423843145370483,
-0.3034530282020569,
0.7575324177742004,
-0.2993066906929016,
0.0037997467443346977,
0.36427003145217896,
1.415101408958435,
3.4329800605773926,
0.24712570011615753,
0.4172466993331909,
-0.14886383712291718,
-0.8953991532325745,
1.3902924060821533,
0.9039749503135681,
-0.16594038903713226,
-0.5284568667411804,
-0.9748839139938354,
1.21311354637146,
1.8706589937210083,
0.9104604125022888,
0.10618291050195694,
-0.8188880085945129,
-0.6468095779418945,
-0.0865684375166893,
0.1220482811331749,
0.47023147344589233,
0.863176167011261,
0.03705717623233795,
0.008057386614382267,
1.3644708395004272,
1.217812418937683,
-0.4261101484298706,
0.3984536826610565,
-0.7435519099235535,
-0.47026148438453674,
0.5778706669807434,
0.39650464057922363,
-0.030669432133436203,
0.26608648896217346,
-0.9620617628097534,
-0.20019666850566864,
-0.42523351311683655,
-0.9747874140739441,
-0.7441896796226501,
-0.5294013619422913,
-0.34585893154144287,
1.6595755815505981,
0.1364775151014328,
-0.5283269286155701,
0.016618099063634872,
-0.8661332726478577,
-0.054592881351709366,
-1.0089198350906372,
0.24193958938121796,
-0.10901256650686264,
-0.18491578102111816,
-0.03499916195869446,
1.7997227907180786,
-1.0143531560897827,
-2.096214771270752,
0.2811967432498932,
0.2304815948009491,
-0.3446640968322754,
0.19499404728412628,
1.5926976203918457,
0.5385960936546326,
1.472405195236206,
1.3703469038009644,
0.9848338961601257,
-0.7738544344902039,
-1.3952131271362305,
0.7454001903533936,
0.9279757142066956,
-1.537140965461731,
0.7962307929992676,
0.0981748104095459,
-0.497601181268692,
0.6984317898750305,
1.1948084831237793,
0.38687819242477417,
-1.9829790592193604,
0.760615885257721,
-0.8716591596603394,
0.7113106846809387,
0.6798606514930725,
0.6725126504898071,
0.20588724315166473,
0.7104026079177856,
-1.2378227710723877,
-1.2455902099609375,
-0.7800041437149048,
-0.6977506279945374,
1.8993892669677734,
-0.17125318944454193,
0.6174648404121399,
-0.12204941362142563,
-1.3857202529907227,
-0.06705982238054276,
0.7540141940116882,
0.3060441315174103,
-0.3886602222919464,
0.7985696196556091,
-0.7586802840232849,
-1.1016640663146973,
-1.4606375694274902,
-0.4834742248058319,
-1.0787912607192993,
-0.8790556192398071,
1.0795232057571411,
0.8433073163032532,
0.1741751730442047,
1.847868800163269,
0.6553424000740051,
0.21237227320671082,
-2.5902578830718994,
0.8770051002502441,
0.3047272562980652,
-0.03895227611064911,
0.8502565622329712,
0.3466154634952545,
0.9529942274093628,
0.0020690495148301125,
0.48854926228523254,
-2.5248026847839355,
2.2954893112182617,
-0.2716474235057831,
0.6170760989189148,
0.008093777112662792,
-0.3218478262424469,
1.1137014627456665,
0.5883091688156128,
0.5377134680747986,
-1.0353955030441284,
0.6919463872909546,
-0.6238113641738892,
1.2662957906723022,
0.9490818977355957,
-0.8509634137153625,
-0.04525389149785042,
1.302313208580017,
0.5007889866828918,
-0.491757869720459,
-0.9179788827896118,
-0.9695160984992981,
0.9066938161849976,
1.7096524238586426,
-0.04852869734168053,
0.0036326125264167786,
0.8153969645500183,
0.6465174555778503,
-1.2551029920578003,
0.12445881217718124,
-0.8099945783615112,
-0.8147368431091309,
1.5997769832611084,
1.9775763750076294,
-0.0917830839753151,
-0.2086506336927414,
-0.8581001162528992,
-1.1823093891143799,
0.8082622289657593,
0.039090320467948914,
0.0870024785399437,
0.6809399724006653,
-0.6549614071846008,
1.029296875,
0.9839076995849609,
0.888111412525177,
0.2150842547416687,
0.2628954350948334,
0.45624157786369324,
-0.3315730690956116,
-1.079667329788208,
-0.23734867572784424,
-1.154083490371704,
-2.5859320163726807,
0.5179018378257751,
-0.22554270923137665,
-1.4826200008392334,
0.03255975618958473,
-1.0018165111541748,
0.9460753798484802,
-0.5061544179916382,
-1.144113540649414,
-1.5253515243530273,
0.14392079412937164,
-0.07375556230545044,
0.9274758100509644,
-1.540645956993103,
-0.03640691936016083,
1.1612300872802734,
0.9102112650871277,
-0.6841899156570435,
1.0041338205337524,
0.23199674487113953,
1.1053375005722046,
0.89584881067276,
-0.40183478593826294,
0.48732322454452515,
0.06543134897947311,
-1.3921416997909546,
0.4416850805282593,
1.0968860387802124,
0.18736323714256287,
1.44504714012146,
-0.4937882125377655,
0.04204076901078224,
0.3483966886997223,
-0.559882640838623,
-0.5292466878890991,
-0.5043168663978577,
0.7058190703392029,
0.0862903743982315,
-0.7861619591712952,
0.1370713710784912,
-0.07533750683069229,
-0.27383723855018616,
0.18042199313640594,
-1.568663477897644,
-0.19663970172405243,
-0.30876898765563965,
-0.5704988837242126,
-1.205428957939148,
-0.05483463034033775,
1.419628381729126,
-0.7606931924819946,
-0.25400328636169434,
0.5641509294509888,
0.40783658623695374,
0.5015767216682434,
0.6130151152610779,
-0.6244760155677795,
-0.36093422770500183,
-0.28201550245285034,
-0.31923168897628784,
0.33045610785484314,
1.3615280389785767,
-0.10297457873821259,
-0.9204990267753601,
0.7810795307159424,
-0.3552698493003845,
-0.01223825290799141,
1.8801525831222534,
0.20280364155769348,
-0.8765978217124939,
0.3145202100276947,
-0.6808825135231018,
1.959629774093628,
1.7436033487319946,
1.2648121118545532,
-0.09943132847547531,
-1.041961908340454,
0.6413884162902832,
-0.3396129310131073,
-0.39233097434043884,
0.9339230060577393,
0.46619346737861633,
-0.1754814237356186,
-1.4084721803665161,
0.585013747215271,
1.1572551727294922,
-0.7821575999259949,
-0.8163091540336609,
0.022802159190177917,
-0.8449349403381348,
1.0153807401657104,
0.7566453814506531,
0.4986788332462311,
0.2260822206735611,
1.6441540718078613,
0.7787836194038391,
-0.5031507015228271,
0.5635218024253845,
0.4609295427799225,
-0.16793715953826904,
-2.0927894115448,
-1.10767662525177,
0.27569377422332764,
-0.46159490942955017,
-1.5649560689926147,
1.3199541568756104,
-1.1796917915344238,
-0.9133392572402954,
0.47639650106430054,
0.10014204680919647,
1.514495849609375,
0.34621649980545044,
1.5514216423034668,
2.053737163543701,
0.9579702615737915,
0.31981801986694336,
1.3600863218307495,
-0.11401167511940002,
-0.43418270349502563,
1.8639633655548096,
-0.4145947992801666,
0.443970263004303,
1.1032439470291138,
-0.3520256280899048,
-1.0696418285369873,
-0.7319154143333435,
-1.1224346160888672,
-0.6635260581970215,
1.1722739934921265,
0.12328489869832993,
-1.096642255783081,
0.24555759131908417,
1.5813205242156982,
0.06725215911865234,
-0.34274712204933167,
0.521942675113678,
0.47992363572120667,
-0.7692360281944275,
0.03818869963288307,
-0.8756615519523621,
0.5373205542564392,
-0.17020897567272186,
-0.3475470542907715,
0.4331672191619873,
0.4577380418777466,
1.3321318626403809,
-0.005159584805369377,
0.21721701323986053,
1.1749831438064575,
-1.4524964094161987,
1.4765502214431763,
-0.6319067478179932,
0.2353774905204773,
-2.324105978012085,
1.4016199111938477,
-0.7652022242546082,
1.8421001434326172,
-2.671010971069336,
0.40767282247543335,
-0.656231164932251,
-0.5105389356613159,
0.3991621732711792,
-0.4087110459804535,
0.1351999193429947,
-0.19456355273723602,
-1.1490561962127686,
-0.12295665591955185,
-0.6267589330673218,
0.6087847948074341,
1.1112563610076904,
1.366713523864746,
-1.0976308584213257,
-0.3002476692199707,
-1.7353456020355225,
-0.20586979389190674,
-0.6578705310821533,
0.289794921875,
-1.987650752067566,
-0.151309996843338,
-1.9142460823059082,
-2.301194429397583,
-1.4127613306045532,
-0.7798683643341064,
1.093577265739441,
0.1946900188922882,
-0.886175811290741,
1.153408169746399,
-0.4126448333263397,
-1.8422472476959229,
1.051592230796814,
-2.160632848739624
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
@mariosasko that is right. However, there are still a good amount of datasets for which the shards are created manually. In our very specific case, we create medium-sized datasets (rarely over 100-200GB) of both text and audio, we prepare the shards by hand and then upload then. It would be great to have immediate access to this download skipping feature for them too.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 63 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@mariosasko that is right. However, there are still a good amount of datasets for which the shards are created manually. In our very specific case, we create medium-sized datasets (rarely over 100-200GB) of both text and audio, we prepare the shards by hand and then upload then. It would be great to have immediate access to this download skipping feature for them too.
|
[
-1.2387419939041138,
-0.9189008474349976,
-0.7748364806175232,
1.4695217609405518,
-0.12237699329853058,
-1.3122913837432861,
0.09067177772521973,
-1.123357892036438,
1.7218047380447388,
-0.8738673329353333,
0.3279164731502533,
-1.703904390335083,
0.11273796856403351,
-0.5978707671165466,
-0.8268541693687439,
-0.8789007663726807,
-0.47445619106292725,
-0.7399746179580688,
0.9224213361740112,
2.539450168609619,
1.1488037109375,
-1.4430270195007324,
2.6111369132995605,
0.6908787488937378,
-0.14480261504650116,
-1.0469393730163574,
0.5136197209358215,
-0.01118244044482708,
-1.2376528978347778,
-0.5159102082252502,
-0.9370350241661072,
-0.06531018018722534,
-0.5783877968788147,
-0.5575516223907471,
-0.05179576575756073,
0.41092896461486816,
-0.3272096514701843,
-0.4174034893512726,
-0.4602436125278473,
-0.7918502688407898,
0.4316444993019104,
-0.3588338792324066,
0.9948821663856506,
-0.3595397472381592,
1.9101027250289917,
-0.5438860654830933,
0.4827789068222046,
0.6856769323348999,
1.4166769981384277,
0.17461803555488586,
-0.05497359856963158,
0.24365517497062683,
0.3799344003200531,
-0.05612393468618393,
0.4782298803329468,
1.1015563011169434,
0.6666022539138794,
0.4822601079940796,
0.7293630242347717,
-2.182365655899048,
1.323022723197937,
-1.0689547061920166,
0.3509202301502228,
1.368452548980713,
-0.9542984962463379,
0.36913689970970154,
-1.7775509357452393,
-0.05908925086259842,
0.5965109467506409,
-2.2384867668151855,
0.1784542053937912,
-1.2182401418685913,
-0.42248663306236267,
1.0820152759552002,
0.3263942003250122,
-1.2804585695266724,
0.16872946918010712,
-0.3827451467514038,
1.01832914352417,
0.4657107889652252,
1.1427576541900635,
-1.6462876796722412,
-0.0352163128554821,
-0.27207332849502563,
0.09669238328933716,
-1.287106990814209,
-1.4678303003311157,
0.4753023087978363,
0.6531959772109985,
0.5128481984138489,
-0.04809264466166496,
0.925269603729248,
-0.9730747938156128,
0.7858707308769226,
-0.9154590964317322,
-1.6343281269073486,
-1.3679336309432983,
-2.2784156799316406,
-2.376413345336914,
0.7577115297317505,
-0.4549207091331482,
-0.543770432472229,
2.0220251083374023,
-1.0494911670684814,
-1.7160593271255493,
1.2218897342681885,
0.23866529762744904,
-0.05999578908085823,
2.4285237789154053,
0.1471744030714035,
-0.7301115393638611,
0.42667126655578613,
-0.6764340400695801,
0.7030408978462219,
-0.5274654626846313,
1.3719230890274048,
0.43878570199012756,
-1.1341934204101562,
1.5890519618988037,
-0.4794008433818817,
0.5205250978469849,
-0.6728679537773132,
-0.45041701197624207,
-0.7850103974342346,
0.4684505760669708,
1.8384531736373901,
-0.2574852705001831,
1.5344655513763428,
-0.270639032125473,
-1.561353325843811,
-1.6519173383712769,
0.9414294362068176,
0.4002898633480072,
-0.7235422730445862,
0.17960773408412933,
-0.30157139897346497,
0.14394012093544006,
-0.024992121383547783,
1.087640643119812,
1.2336901426315308,
0.7030404806137085,
-0.29251036047935486,
-0.9264882802963257,
0.2590676546096802,
-0.12017284333705902,
-0.7275000810623169,
-1.7718404531478882,
-0.35484299063682556,
0.1298322230577469,
0.6324637532234192,
-1.078254222869873,
1.7796862125396729,
0.9246580004692078,
1.8568226099014282,
0.9769201278686523,
-0.30907753109931946,
1.5208879709243774,
0.04867442324757576,
1.900940179824829,
-0.4314686059951782,
0.7699576020240784,
-0.3515497148036957,
-1.1723016500473022,
0.7969650626182556,
-0.3379009962081909,
-2.0348289012908936,
-0.7807015180587769,
-0.8061316013336182,
-0.16172292828559875,
-0.73831707239151,
1.015363097190857,
-0.19380828738212585,
-1.3200786113739014,
0.3567708432674408,
-0.6644781827926636,
0.15518471598625183,
-1.2662874460220337,
0.3988974988460541,
0.769087553024292,
-0.6621191501617432,
0.05194105580449104,
-0.26916539669036865,
-1.2623450756072998,
-0.4639473557472229,
0.1692904680967331,
1.850983738899231,
-0.8407512307167053,
0.8529117703437805,
1.0674043893814087,
-0.6513273119926453,
-0.0061940401792526245,
0.47057512402534485,
-0.3249078392982483,
0.8434175252914429,
-1.0209392309188843,
-0.36367782950401306,
1.3134610652923584,
-0.2570142149925232,
-0.549771249294281,
1.4507031440734863,
0.7166957259178162,
-1.0076407194137573,
-0.05948980152606964,
-0.2307342141866684,
-0.8621841073036194,
0.038649216294288635,
-1.6119736433029175,
-0.007934973575174809,
0.33744731545448303,
-1.5206815004348755,
-0.4283837378025055,
-0.15780827403068542,
1.3072744607925415,
-0.13681936264038086,
1.5255986452102661,
-0.37038499116897583,
-0.17952102422714233,
-0.40309831500053406,
-0.3624306619167328,
0.16343826055526733,
-0.17873860895633698,
-0.5728546380996704,
0.2617572247982025,
-0.7548844218254089,
0.32176661491394043,
1.4104920625686646,
0.3472045660018921,
0.08250267803668976,
0.49667781591415405,
1.116648554801941,
0.3237714469432831,
-0.0973123162984848,
-0.8691290020942688,
-1.5254563093185425,
2.0643789768218994,
-1.4345338344573975,
1.996949315071106,
0.8522137999534607,
0.0347406230866909,
-1.69845712184906,
-1.8107966184616089,
1.3860466480255127,
1.1542309522628784,
2.433119773864746,
0.5553233623504639,
0.355868935585022,
-0.8576464056968689,
-0.5850105881690979,
0.38236281275749207,
-1.0766154527664185,
-0.8153744339942932,
0.0569276325404644,
2.3516883850097656,
1.830316424369812,
-0.4593386948108673,
-0.17484340071678162,
-1.0887517929077148,
1.3898295164108276,
-0.17938150465488434,
0.09589995443820953,
2.018465757369995,
-0.3144196569919586,
-1.05917227268219,
1.2561360597610474,
-2.41287899017334,
0.09910315275192261,
1.9644343852996826,
0.22860322892665863,
0.03035154938697815,
-1.4241594076156616,
-0.588333249092102,
-0.17399105429649353,
-0.3198341727256775,
-1.2342174053192139,
0.5420917272567749,
-0.28781378269195557,
-0.7095701098442078,
-1.4928374290466309,
0.1924828737974167,
-1.1348413228988647,
-1.6342469453811646,
0.23847365379333496,
1.7301933765411377,
2.0279831886291504,
-0.7850234508514404,
1.559244990348816,
-0.1314626932144165,
0.18373435735702515,
1.223422646522522,
1.2295100688934326,
3.1902916431427,
1.9244728088378906,
-1.4078704118728638,
0.5562022924423218,
-0.14828263223171234,
-0.48014429211616516,
1.1116366386413574,
-1.1730031967163086,
1.3283230066299438,
-0.16859710216522217,
-1.2559248208999634,
-1.273098349571228,
0.9303836226463318,
0.5025214552879333,
0.10967350006103516,
-0.5084945559501648,
1.1994670629501343,
0.06475158035755157,
1.328537940979004,
0.45614877343177795,
-0.3537255525588989,
0.5913954377174377,
-0.46887993812561035,
-0.5767861604690552,
1.5203208923339844,
0.30200445652008057,
-1.397564172744751,
-2.282386302947998,
-0.21283848583698273,
-0.8735515475273132,
-0.007440171670168638,
-0.6072167754173279,
-0.9364378452301025,
1.629143238067627,
0.3736133873462677,
-1.2688270807266235,
-0.32136163115501404,
-0.27613064646720886,
-0.6705499291419983,
2.6828160285949707,
-1.4314420223236084,
-0.3018498420715332,
-0.9994820952415466,
-0.63143390417099,
1.6092758178710938,
-1.2287412881851196,
-0.13968543708324432,
-1.0761966705322266,
-0.6254886388778687,
-1.2771422863006592,
-0.5779702663421631,
-0.01807275414466858,
-0.9544646739959717,
0.8146681785583496,
0.27616775035858154,
-1.2564544677734375,
-0.386056125164032,
-0.8718087077140808,
0.7830212712287903,
-0.06440828740596771,
0.3219439685344696,
1.751650333404541,
0.49147170782089233,
-0.4638260006904602,
0.6914732456207275,
1.1744585037231445,
0.6326493620872498,
-0.590223491191864,
0.2430923879146576,
-0.7430976629257202,
0.2942744195461273,
-1.3094394207000732,
0.3490128219127655,
-2.8166520595550537,
0.6206168532371521,
-0.15516671538352966,
-0.0600203201174736,
-0.03783706575632095,
-1.2491021156311035,
1.072798490524292,
2.685898542404175,
-1.1418015956878662,
0.46251773834228516,
0.2708793580532074,
1.2713395357131958,
-1.5758224725723267,
0.3877638876438141,
-0.3946039080619812,
2.1811294555664062,
0.11076302826404572,
1.1371400356292725,
-0.4533684253692627,
-2.2838997840881348,
0.5913534760475159,
-1.2884039878845215,
-1.1942106485366821,
0.8820921182632446,
-0.8536271452903748,
-0.10428628325462341,
-1.356764554977417,
-0.1113968938589096,
-0.7622532248497009,
-1.25236976146698,
0.8210351467132568,
0.10660974681377411,
0.4991137981414795,
-0.6177336573600769,
0.33628660440444946,
-2.183757781982422,
-1.3271371126174927,
-0.31218117475509644,
-0.9012776017189026,
0.36148396134376526,
-0.3030760586261749,
0.7601466774940491,
-0.28405484557151794,
0.016187408939003944,
0.3611559569835663,
1.3984798192977905,
3.388813018798828,
0.23569680750370026,
0.4573019742965698,
-0.12392912805080414,
-0.9146084785461426,
1.3798285722732544,
0.9023844003677368,
-0.16973577439785004,
-0.593039870262146,
-0.9970666170120239,
1.2448902130126953,
1.8392163515090942,
0.9425901174545288,
0.08871398866176605,
-0.755070686340332,
-0.666326105594635,
-0.07810597121715546,
0.15487560629844666,
0.5053980350494385,
0.9115680456161499,
-0.0004663923755288124,
0.04859419912099838,
1.3912713527679443,
1.2688922882080078,
-0.4596824645996094,
0.38502228260040283,
-0.7599942684173584,
-0.4815129041671753,
0.5300852060317993,
0.35375627875328064,
0.006401735357940197,
0.298884779214859,
-0.9821113348007202,
-0.2093629240989685,
-0.3749751150608063,
-0.9865759611129761,
-0.7273539304733276,
-0.5284339785575867,
-0.3283390700817108,
1.7121875286102295,
0.12623737752437592,
-0.502805233001709,
0.04671459645032883,
-0.856606125831604,
-0.0721825510263443,
-1.046569585800171,
0.2353142648935318,
-0.08800354599952698,
-0.16330265998840332,
-0.03824470192193985,
1.86043119430542,
-0.9703308939933777,
-2.1320698261260986,
0.2849409580230713,
0.21132585406303406,
-0.35049596428871155,
0.1866653859615326,
1.6271132230758667,
0.5061020851135254,
1.4822492599487305,
1.3726356029510498,
1.01112699508667,
-0.7690497636795044,
-1.3459739685058594,
0.7839221358299255,
0.9626099467277527,
-1.473731279373169,
0.8186788558959961,
0.09332486987113953,
-0.47971540689468384,
0.68137127161026,
1.2148956060409546,
0.3774462938308716,
-1.9725315570831299,
0.8211793899536133,
-0.935257077217102,
0.7167950868606567,
0.6612812876701355,
0.6363241672515869,
0.15388929843902588,
0.7105804085731506,
-1.2452698945999146,
-1.2324168682098389,
-0.7601466178894043,
-0.6881060600280762,
1.9324932098388672,
-0.15789048373699188,
0.588901698589325,
-0.08121490478515625,
-1.3752728700637817,
-0.05657380446791649,
0.7301191687583923,
0.297193318605423,
-0.38590431213378906,
0.8451022505760193,
-0.7301931977272034,
-1.1246445178985596,
-1.4834142923355103,
-0.4525138735771179,
-1.0934783220291138,
-0.8671321272850037,
1.0900318622589111,
0.8450413346290588,
0.15214020013809204,
1.8584024906158447,
0.658025324344635,
0.20034748315811157,
-2.600207567214966,
0.8886275291442871,
0.3089022636413574,
-0.08309350907802582,
0.8532995581626892,
0.2861514985561371,
0.9402194619178772,
0.025575723499059677,
0.4688500761985779,
-2.519935369491577,
2.322845697402954,
-0.25844183564186096,
0.6852541565895081,
0.006606781855225563,
-0.23561248183250427,
1.0476549863815308,
0.5750470161437988,
0.5327553153038025,
-1.034401535987854,
0.6819870471954346,
-0.6284322738647461,
1.2447429895401,
0.9466769695281982,
-0.8121231198310852,
-0.045103590935468674,
1.2498784065246582,
0.47522374987602234,
-0.48685261607170105,
-0.9318922758102417,
-0.9773898124694824,
0.8894802331924438,
1.7688299417495728,
-0.044838499277830124,
0.0551561675965786,
0.8173844814300537,
0.6633096933364868,
-1.2719752788543701,
0.058051783591508865,
-0.7906184792518616,
-0.8378763198852539,
1.5913006067276,
2.0187671184539795,
-0.0731084793806076,
-0.21127352118492126,
-0.8215945363044739,
-1.2282308340072632,
0.778669536113739,
0.01153351180255413,
0.15983659029006958,
0.7076266407966614,
-0.6649704575538635,
1.0314810276031494,
0.9940698742866516,
0.8535962104797363,
0.24174588918685913,
0.19542355835437775,
0.4375094473361969,
-0.3141326606273651,
-1.057841420173645,
-0.2390962839126587,
-1.1779625415802002,
-2.582226514816284,
0.5310919284820557,
-0.20610086619853973,
-1.4860731363296509,
0.014381574466824532,
-0.9644517302513123,
0.9316117167472839,
-0.5004389882087708,
-1.1446629762649536,
-1.504438877105713,
0.16667784750461578,
-0.08103474974632263,
0.908998429775238,
-1.5642095804214478,
-0.06806630641222,
1.145615577697754,
0.9330766797065735,
-0.670269787311554,
1.011609435081482,
0.2414054274559021,
1.0979506969451904,
0.8964099884033203,
-0.3843078911304474,
0.4928908348083496,
0.07073569297790527,
-1.409878134727478,
0.4021244943141937,
1.1129289865493774,
0.16798816621303558,
1.4168643951416016,
-0.5183250904083252,
0.02098858542740345,
0.32901838421821594,
-0.4945363998413086,
-0.5497381091117859,
-0.5114019513130188,
0.7070815563201904,
0.04667395353317261,
-0.8132408261299133,
0.11779582500457764,
-0.0798296332359314,
-0.25833314657211304,
0.15068380534648895,
-1.5222065448760986,
-0.1832323968410492,
-0.32448023557662964,
-0.53713059425354,
-1.2449419498443604,
-0.0455373153090477,
1.4209529161453247,
-0.7727101445198059,
-0.22549216449260712,
0.5326486825942993,
0.4191340208053589,
0.5188028216362,
0.6354478001594543,
-0.6061237454414368,
-0.37259867787361145,
-0.2710854411125183,
-0.3253726363182068,
0.3747580051422119,
1.3648526668548584,
-0.12533122301101685,
-0.9006200432777405,
0.7463487982749939,
-0.31466948986053467,
-0.0013646376319229603,
1.8875256776809692,
0.2086186707019806,
-0.8748041391372681,
0.31376728415489197,
-0.6827592849731445,
1.9031991958618164,
1.7699486017227173,
1.28936767578125,
-0.11533661186695099,
-1.0554696321487427,
0.6461051106452942,
-0.3394695520401001,
-0.3728356659412384,
0.9292306303977966,
0.4507196247577667,
-0.17132388055324554,
-1.4514374732971191,
0.5815480351448059,
1.1653008460998535,
-0.809728741645813,
-0.7686488628387451,
0.02633954957127571,
-0.84332674741745,
1.0154364109039307,
0.7551040053367615,
0.46067526936531067,
0.18303127586841583,
1.676450252532959,
0.8083797097206116,
-0.49229294061660767,
0.5443205237388611,
0.5065886974334717,
-0.19622886180877686,
-2.09787654876709,
-1.1351796388626099,
0.2355504035949707,
-0.46376878023147583,
-1.5296344757080078,
1.3153049945831299,
-1.1893091201782227,
-0.9177975654602051,
0.4677128195762634,
0.04339002072811127,
1.5004785060882568,
0.3785950243473053,
1.5548779964447021,
2.0720677375793457,
0.9822309017181396,
0.29021692276000977,
1.3617209196090698,
-0.15324532985687256,
-0.39367204904556274,
1.8572596311569214,
-0.42472654581069946,
0.3766976594924927,
1.140167474746704,
-0.32453063130378723,
-1.0489581823349,
-0.7254054546356201,
-1.1208101511001587,
-0.6606600284576416,
1.1819051504135132,
0.11552345752716064,
-1.079746961593628,
0.2659994065761566,
1.5909065008163452,
0.0323365218937397,
-0.3422645032405853,
0.5177889466285706,
0.4922993779182434,
-0.7773626446723938,
0.0009256443008780479,
-0.8829345107078552,
0.5440068244934082,
-0.20307904481887817,
-0.35303378105163574,
0.4367418587207794,
0.46763432025909424,
1.3189159631729126,
0.013962788507342339,
0.2238502949476242,
1.2050141096115112,
-1.4341881275177002,
1.456031084060669,
-0.6687703132629395,
0.244060218334198,
-2.2889645099639893,
1.4295082092285156,
-0.7744482755661011,
1.8716181516647339,
-2.6337318420410156,
0.4329301714897156,
-0.6272367835044861,
-0.5205703377723694,
0.386743426322937,
-0.4350254237651825,
0.13162849843502045,
-0.1521623581647873,
-1.156093955039978,
-0.15674586594104767,
-0.573476254940033,
0.580563485622406,
1.082562804222107,
1.306312084197998,
-1.042149305343628,
-0.34908127784729004,
-1.739111304283142,
-0.20040550827980042,
-0.6321935653686523,
0.25854119658470154,
-1.971673607826233,
-0.2051701843738556,
-1.9279799461364746,
-2.2932705879211426,
-1.437398076057434,
-0.8160267472267151,
1.1192638874053955,
0.1969253271818161,
-0.8832482099533081,
1.148261308670044,
-0.4164985120296478,
-1.855567216873169,
1.0757592916488647,
-2.1732230186462402
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this "limitation" and write metadata in a `_metadata`/`_common_metadata` file in `to_parquet`/`push_to_hub`, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 66 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this "limitation" and write metadata in a `_metadata`/`_common_metadata` file in `to_parquet`/`push_to_hub`, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files.
|
[
-1.2075860500335693,
-0.9106705784797668,
-0.7977585196495056,
1.576055645942688,
-0.13508634269237518,
-1.3018547296524048,
0.1560361087322235,
-1.1006830930709839,
1.7036341428756714,
-0.8785424828529358,
0.3370455801486969,
-1.6747663021087646,
0.08513769507408142,
-0.6540365219116211,
-0.8245798945426941,
-0.888381838798523,
-0.434429407119751,
-0.7637605667114258,
0.9445052146911621,
2.5032453536987305,
1.1592336893081665,
-1.442819595336914,
2.63700008392334,
0.6629074811935425,
-0.16578949987888336,
-1.0194929838180542,
0.4938361346721649,
0.012464284896850586,
-1.1704440116882324,
-0.5394424796104431,
-0.8860822916030884,
-0.12877793610095978,
-0.5959997177124023,
-0.5507819056510925,
0.007215617224574089,
0.45613187551498413,
-0.3382005989551544,
-0.47231829166412354,
-0.4706430435180664,
-0.7767034769058228,
0.43026262521743774,
-0.36523935198783875,
1.0096466541290283,
-0.3519592583179474,
1.8538179397583008,
-0.5547792911529541,
0.4904882609844208,
0.7364429831504822,
1.4539297819137573,
0.192048117518425,
-0.04805128276348114,
0.244375541806221,
0.3717009723186493,
-0.11437350511550903,
0.43858447670936584,
1.0662957429885864,
0.6411862969398499,
0.5379476547241211,
0.6982913017272949,
-2.2050626277923584,
1.3390774726867676,
-1.1248942613601685,
0.36531904339790344,
1.3442293405532837,
-0.9278760552406311,
0.3918098509311676,
-1.796636700630188,
-0.028688041493296623,
0.6325878500938416,
-2.22007417678833,
0.23821581900119781,
-1.2438491582870483,
-0.4563550353050232,
1.0488406419754028,
0.35905107855796814,
-1.244723916053772,
0.16380596160888672,
-0.3797501027584076,
1.0328450202941895,
0.4575200080871582,
1.1036349534988403,
-1.6978802680969238,
-0.010966461151838303,
-0.2592088580131531,
0.10460235178470612,
-1.2417007684707642,
-1.476269006729126,
0.47262153029441833,
0.6538689136505127,
0.4741009771823883,
-0.04845802113413811,
0.9780170321464539,
-0.9314683675765991,
0.7612314224243164,
-0.9606424570083618,
-1.6006672382354736,
-1.3661096096038818,
-2.2201242446899414,
-2.3526992797851562,
0.7020267248153687,
-0.4751588702201843,
-0.5264562964439392,
2.062084436416626,
-0.9787477254867554,
-1.7301985025405884,
1.1779669523239136,
0.2735407054424286,
-0.05470282956957817,
2.3941173553466797,
0.1687639206647873,
-0.7142380475997925,
0.4567173421382904,
-0.6812686920166016,
0.7159432768821716,
-0.563572883605957,
1.3719849586486816,
0.40677496790885925,
-1.184069275856018,
1.5524961948394775,
-0.458780437707901,
0.6094551682472229,
-0.6624873876571655,
-0.4486924111843109,
-0.7638528347015381,
0.4427165687084198,
1.8741422891616821,
-0.2119017392396927,
1.498079776763916,
-0.2917460799217224,
-1.5557011365890503,
-1.6235946416854858,
0.9820718169212341,
0.40342655777931213,
-0.7271347641944885,
0.18791738152503967,
-0.3560506999492645,
0.14905717968940735,
-0.06805358827114105,
1.1059190034866333,
1.2485488653182983,
0.7215800881385803,
-0.33693647384643555,
-0.8891175389289856,
0.23838521540164948,
-0.11079171299934387,
-0.7115648984909058,
-1.813317060470581,
-0.32365697622299194,
0.16137796640396118,
0.61149662733078,
-1.1143838167190552,
1.8109029531478882,
0.9287746548652649,
1.9112293720245361,
0.9622543454170227,
-0.32957926392555237,
1.5091814994812012,
0.05356159433722496,
1.8934193849563599,
-0.42060360312461853,
0.771753191947937,
-0.3782917857170105,
-1.1594617366790771,
0.863080620765686,
-0.32494473457336426,
-2.027614116668701,
-0.7881592512130737,
-0.8161741495132446,
-0.18061843514442444,
-0.7119812965393066,
0.9810677766799927,
-0.21535074710845947,
-1.3508156538009644,
0.31656286120414734,
-0.6742936372756958,
0.17948801815509796,
-1.2570983171463013,
0.4099099636077881,
0.7339816689491272,
-0.6363560557365417,
0.08948823809623718,
-0.2989017367362976,
-1.2624655961990356,
-0.44144758582115173,
0.28152620792388916,
1.8831720352172852,
-0.7391668558120728,
0.826278030872345,
1.0830714702606201,
-0.6858078241348267,
-0.023505233228206635,
0.41255754232406616,
-0.3161461353302002,
0.8357965350151062,
-1.0850099325180054,
-0.3925379812717438,
1.3291376829147339,
-0.26750966906547546,
-0.6023056507110596,
1.463280439376831,
0.7119277119636536,
-1.0144106149673462,
-0.08737598359584808,
-0.2382718175649643,
-0.8865397572517395,
0.043166253715753555,
-1.5737630128860474,
-0.023591352626681328,
0.38841450214385986,
-1.5119203329086304,
-0.4414440393447876,
-0.2164475917816162,
1.3060872554779053,
-0.15571920573711395,
1.5029935836791992,
-0.3357781171798706,
-0.18930678069591522,
-0.39390575885772705,
-0.37300553917884827,
0.09167784452438354,
-0.22736728191375732,
-0.6273736953735352,
0.1805860549211502,
-0.6824228763580322,
0.32753291726112366,
1.4292852878570557,
0.25625067949295044,
0.05383416637778282,
0.5027850866317749,
1.1178046464920044,
0.33148884773254395,
-0.050489891320466995,
-0.8550795316696167,
-1.4674134254455566,
2.008617639541626,
-1.4385051727294922,
1.9651851654052734,
0.8392783403396606,
0.06924857199192047,
-1.7272571325302124,
-1.7758700847625732,
1.3759926557540894,
1.150234341621399,
2.3714418411254883,
0.5460066199302673,
0.36748504638671875,
-0.8775728344917297,
-0.6307608485221863,
0.3236735761165619,
-1.041098713874817,
-0.7588096261024475,
0.14834965765476227,
2.3906054496765137,
1.8081130981445312,
-0.46337583661079407,
-0.18602468073368073,
-1.0527526140213013,
1.4149832725524902,
-0.2272009551525116,
0.12349602580070496,
2.0310943126678467,
-0.2540206015110016,
-1.0654057264328003,
1.2404778003692627,
-2.395185708999634,
0.09782162308692932,
1.9665498733520508,
0.24305249750614166,
0.10033659636974335,
-1.454278588294983,
-0.5835802555084229,
-0.1849011778831482,
-0.3008689284324646,
-1.2309727668762207,
0.542056143283844,
-0.25745803117752075,
-0.6512779593467712,
-1.49491286277771,
0.2622506618499756,
-1.1348601579666138,
-1.6423851251602173,
0.20599228143692017,
1.8035833835601807,
2.0108444690704346,
-0.759483277797699,
1.6104544401168823,
-0.23350630700588226,
0.12786364555358887,
1.2353334426879883,
1.2022203207015991,
3.180630922317505,
1.9117238521575928,
-1.3593014478683472,
0.5637608170509338,
-0.13413657248020172,
-0.5212587118148804,
1.1407496929168701,
-1.195875644683838,
1.3006646633148193,
-0.19805629551410675,
-1.1918944120407104,
-1.2642918825149536,
0.9230728149414062,
0.5067126750946045,
0.14484696090221405,
-0.5241290926933289,
1.167851209640503,
0.11644697189331055,
1.3122029304504395,
0.46563810110092163,
-0.3507271409034729,
0.5755175352096558,
-0.42919623851776123,
-0.5789433717727661,
1.5497004985809326,
0.2566976547241211,
-1.4066698551177979,
-2.2546348571777344,
-0.2089712917804718,
-0.8621311187744141,
0.023079287260770798,
-0.650834321975708,
-0.9198532700538635,
1.6316604614257812,
0.3671063780784607,
-1.2675859928131104,
-0.2935890853404999,
-0.29610854387283325,
-0.652157187461853,
2.6891584396362305,
-1.3850657939910889,
-0.3171755075454712,
-0.9709182977676392,
-0.6733627915382385,
1.6540964841842651,
-1.2208635807037354,
-0.184284046292305,
-1.0383206605911255,
-0.5332946181297302,
-1.2651557922363281,
-0.5396537184715271,
-0.017768237739801407,
-0.9714061617851257,
0.8123431205749512,
0.2518438398838043,
-1.3080991506576538,
-0.36894479393959045,
-0.8471612334251404,
0.8710952401161194,
-0.043476566672325134,
0.2720906734466553,
1.7919037342071533,
0.4429796040058136,
-0.46406811475753784,
0.7480605840682983,
1.1513704061508179,
0.6113817095756531,
-0.6201781630516052,
0.19935089349746704,
-0.6710010170936584,
0.25064173340797424,
-1.3190194368362427,
0.35405802726745605,
-2.8539531230926514,
0.6136252880096436,
-0.13977283239364624,
-0.08423115313053131,
-0.02572997845709324,
-1.261833906173706,
1.051800012588501,
2.673552989959717,
-1.167654275894165,
0.4664054811000824,
0.2850048243999481,
1.2671380043029785,
-1.576470136642456,
0.3841240406036377,
-0.36460691690444946,
2.179645538330078,
0.09398593008518219,
1.136936902999878,
-0.4604143798351288,
-2.306043863296509,
0.559892475605011,
-1.27138352394104,
-1.213531494140625,
0.8450125455856323,
-0.8227190971374512,
-0.0978616327047348,
-1.35386323928833,
-0.1930636465549469,
-0.7949050068855286,
-1.2564040422439575,
0.8313218951225281,
0.09890700876712799,
0.4586077630519867,
-0.6217430233955383,
0.312791109085083,
-2.1841421127319336,
-1.3574705123901367,
-0.34564855694770813,
-0.9183903932571411,
0.36170101165771484,
-0.3594762682914734,
0.7591816186904907,
-0.27151867747306824,
0.04055628925561905,
0.36509019136428833,
1.454780101776123,
3.375641107559204,
0.23739010095596313,
0.44136935472488403,
-0.19157108664512634,
-0.904013454914093,
1.3530467748641968,
0.9058727622032166,
-0.16100920736789703,
-0.5439974665641785,
-0.9624210000038147,
1.246982216835022,
1.9011905193328857,
0.9418546557426453,
0.05492660775780678,
-0.8543462753295898,
-0.6994821429252625,
-0.12682302296161652,
0.12739509344100952,
0.46931371092796326,
0.8506490588188171,
0.03400377929210663,
0.08991461992263794,
1.3655167818069458,
1.2057693004608154,
-0.4338130056858063,
0.38229286670684814,
-0.761326014995575,
-0.42533186078071594,
0.5386152863502502,
0.39564114809036255,
-0.06500275433063507,
0.2553142011165619,
-0.9925552010536194,
-0.2215363085269928,
-0.4384107291698456,
-0.9499815106391907,
-0.7501888275146484,
-0.5252680778503418,
-0.31192222237586975,
1.757124423980713,
0.16512525081634521,
-0.5045492649078369,
0.040982212871313095,
-0.7959915399551392,
-0.05569877848029137,
-1.0638108253479004,
0.19213299453258514,
-0.11307576298713684,
-0.17658214271068573,
-0.021939318627119064,
1.8136963844299316,
-0.9973897337913513,
-2.1090481281280518,
0.23833151161670685,
0.21467313170433044,
-0.3384155333042145,
0.2385636866092682,
1.6754682064056396,
0.5225696563720703,
1.4653841257095337,
1.3693020343780518,
1.0051679611206055,
-0.7682388424873352,
-1.3689903020858765,
0.7201839089393616,
0.9614176154136658,
-1.4666627645492554,
0.8310235738754272,
0.10191237926483154,
-0.4954041540622711,
0.655468225479126,
1.2295851707458496,
0.4298858642578125,
-2.0274553298950195,
0.7716048955917358,
-0.907243549823761,
0.7495054006576538,
0.7037273049354553,
0.6461092233657837,
0.1829359233379364,
0.7216248512268066,
-1.1715649366378784,
-1.2517882585525513,
-0.7580994963645935,
-0.7438184022903442,
1.915402889251709,
-0.22166472673416138,
0.5919142961502075,
-0.14319388568401337,
-1.3929431438446045,
-0.05353536084294319,
0.8111494779586792,
0.36801865696907043,
-0.46080976724624634,
0.802023708820343,
-0.7403694987297058,
-1.0920096635818481,
-1.40983247756958,
-0.4755688011646271,
-1.0956612825393677,
-0.9098283648490906,
1.0550013780593872,
0.8392599821090698,
0.20099757611751556,
1.8666478395462036,
0.7196512818336487,
0.24434275925159454,
-2.5677437782287598,
0.9140627980232239,
0.33998528122901917,
-0.10666878521442413,
0.8362953662872314,
0.373626708984375,
0.973910391330719,
0.04407156631350517,
0.525719404220581,
-2.4982693195343018,
2.3105885982513428,
-0.2523742914199829,
0.6751266717910767,
0.0045082708820700645,
-0.2774578034877777,
1.1052312850952148,
0.5548219084739685,
0.5091982483863831,
-1.067539095878601,
0.6746306419372559,
-0.6360152959823608,
1.2365576028823853,
0.8766776323318481,
-0.8143172264099121,
-0.06004323437809944,
1.3187518119812012,
0.4535794258117676,
-0.5820978283882141,
-0.9394547343254089,
-1.011254072189331,
0.9335096478462219,
1.7231838703155518,
-0.08571502566337585,
0.03713821992278099,
0.8240001797676086,
0.6182043552398682,
-1.2646114826202393,
0.11834117770195007,
-0.8129484057426453,
-0.8632108569145203,
1.5745850801467896,
1.954604983329773,
-0.13459773361682892,
-0.17378763854503632,
-0.8534970879554749,
-1.2269260883331299,
0.8119264841079712,
0.006762145087122917,
0.07509742677211761,
0.6220714449882507,
-0.6354416012763977,
1.0389811992645264,
0.9871025085449219,
0.9015392661094666,
0.23816901445388794,
0.2291780263185501,
0.4560781419277191,
-0.3675391972064972,
-1.0437250137329102,
-0.22348062694072723,
-1.151633620262146,
-2.552788734436035,
0.48681360483169556,
-0.17669172585010529,
-1.4632922410964966,
0.0037794113159179688,
-1.0142863988876343,
0.9287129044532776,
-0.5390583276748657,
-1.1150084733963013,
-1.5173934698104858,
0.1609116941690445,
-0.09232558310031891,
0.9277787804603577,
-1.5519596338272095,
-0.07326832413673401,
1.1204558610916138,
0.911920964717865,
-0.6925823092460632,
0.9864256978034973,
0.1952597051858902,
1.0847673416137695,
0.9140105247497559,
-0.4042295813560486,
0.5315390825271606,
0.05542035773396492,
-1.3104695081710815,
0.447305291891098,
1.1276330947875977,
0.22018644213676453,
1.4190354347229004,
-0.5027883648872375,
-0.04945638030767441,
0.2872811555862427,
-0.5220376253128052,
-0.543735146522522,
-0.5778425931930542,
0.6730649471282959,
0.03733127564191818,
-0.8419635891914368,
0.12752480804920197,
-0.08064617216587067,
-0.2621849775314331,
0.16046977043151855,
-1.569601058959961,
-0.15830908715724945,
-0.2742859721183777,
-0.558134138584137,
-1.2509942054748535,
-0.039634399116039276,
1.41366446018219,
-0.699867308139801,
-0.23839469254016876,
0.5389031767845154,
0.4616129696369171,
0.4529995322227478,
0.59566330909729,
-0.6695210337638855,
-0.3601002097129822,
-0.2788088023662567,
-0.29693320393562317,
0.36274608969688416,
1.360061526298523,
-0.09303492307662964,
-0.8869258165359497,
0.7196789383888245,
-0.36625728011131287,
0.03926127403974533,
1.8859182596206665,
0.1828823983669281,
-0.8645986318588257,
0.34057727456092834,
-0.6925813555717468,
1.9620696306228638,
1.7925572395324707,
1.28110671043396,
-0.13634178042411804,
-1.0394114255905151,
0.6955260038375854,
-0.4168361723423004,
-0.38983502984046936,
0.923795759677887,
0.416289746761322,
-0.2145024538040161,
-1.4583935737609863,
0.6093809008598328,
1.208542823791504,
-0.7157554626464844,
-0.8686261177062988,
0.052749454975128174,
-0.808951735496521,
1.0652552843093872,
0.7254006266593933,
0.4709983468055725,
0.2110610008239746,
1.6614471673965454,
0.8384391665458679,
-0.5074326395988464,
0.593344509601593,
0.48727211356163025,
-0.17127737402915955,
-2.071195125579834,
-1.2116025686264038,
0.257328063249588,
-0.4888186454772949,
-1.5683655738830566,
1.3949192762374878,
-1.1365337371826172,
-0.9888756275177002,
0.4715786576271057,
0.04606125131249428,
1.500461459159851,
0.3169228434562683,
1.4988324642181396,
2.0426108837127686,
0.9574941396713257,
0.40789368748664856,
1.3302594423294067,
-0.1778242290019989,
-0.44957756996154785,
1.9074572324752808,
-0.46253034472465515,
0.38645079731941223,
1.142463207244873,
-0.34120240807533264,
-1.0541892051696777,
-0.750724732875824,
-1.1388623714447021,
-0.7189726233482361,
1.1879982948303223,
0.12812015414237976,
-1.0576317310333252,
0.2960929572582245,
1.6267788410186768,
0.07814213633537292,
-0.3751368224620819,
0.5847855806350708,
0.471309632062912,
-0.8432596325874329,
0.0435265377163887,
-0.8824062943458557,
0.5335040092468262,
-0.16134004294872284,
-0.3136301338672638,
0.48345857858657837,
0.4405430853366852,
1.3149248361587524,
0.027505721896886826,
0.1719525009393692,
1.0898607969284058,
-1.484968662261963,
1.4898279905319214,
-0.6610299944877625,
0.30062568187713623,
-2.341810464859009,
1.3944153785705566,
-0.7608047127723694,
1.8800710439682007,
-2.6444027423858643,
0.39787837862968445,
-0.6206322908401489,
-0.5209234952926636,
0.41696953773498535,
-0.40887054800987244,
0.13561050593852997,
-0.16696205735206604,
-1.174360752105713,
-0.11293844878673553,
-0.6078737378120422,
0.5762939453125,
1.096270203590393,
1.3696974515914917,
-1.091965675354004,
-0.24487917125225067,
-1.7417975664138794,
-0.14351439476013184,
-0.5988742709159851,
0.26664990186691284,
-1.9629743099212646,
-0.18887940049171448,
-1.9176093339920044,
-2.2702038288116455,
-1.36471426486969,
-0.781509280204773,
1.0827172994613647,
0.19090594351291656,
-0.9054722785949707,
1.2190686464309692,
-0.40861305594444275,
-1.8566168546676636,
1.0713584423065186,
-2.122168779373169
] |
https://github.com/huggingface/datasets/issues/5380
|
Improve dataset `.skip()` speed in streaming mode
|
So if Parquet metadata needs to be in its own file anyway, why not implement this skipping feature by storing the example counts per shard in `dataset_infos.json`? That would allow:
- Support both private and public datasets
- Immediate access to the feature upon uploading of shards
- Use any dataset, not only those uploaded using `.push_to_hub()`
A proper Parquet metadata file could still be created and "overwrite" the `dataset_infos.json` info in the datasets-server.
|
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
| 367 | 74 |
Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
So if Parquet metadata needs to be in its own file anyway, why not implement this skipping feature by storing the example counts per shard in `dataset_infos.json`? That would allow:
- Support both private and public datasets
- Immediate access to the feature upon uploading of shards
- Use any dataset, not only those uploaded using `.push_to_hub()`
A proper Parquet metadata file could still be created and "overwrite" the `dataset_infos.json` info in the datasets-server.
|
[
-1.2239469289779663,
-0.9064879417419434,
-0.7884495258331299,
1.520706057548523,
-0.15377222001552582,
-1.3413708209991455,
0.12355312705039978,
-1.1004829406738281,
1.7480214834213257,
-0.8756932616233826,
0.34082502126693726,
-1.6941733360290527,
0.09066649526357651,
-0.6561979651451111,
-0.8009727001190186,
-0.9037707448005676,
-0.49526312947273254,
-0.7162067890167236,
0.9503944516181946,
2.5104880332946777,
1.1457241773605347,
-1.4439808130264282,
2.641085147857666,
0.6621417999267578,
-0.14695186913013458,
-0.9855621457099915,
0.47806987166404724,
0.00559502188116312,
-1.228297233581543,
-0.503372848033905,
-0.9158555269241333,
-0.09022756665945053,
-0.5804128050804138,
-0.5853517651557922,
0.013069462962448597,
0.4211815297603607,
-0.34225863218307495,
-0.45250847935676575,
-0.49600186944007874,
-0.7790816426277161,
0.40083321928977966,
-0.3506086766719818,
0.9722445011138916,
-0.43755507469177246,
1.889979362487793,
-0.5440180897712708,
0.4359033405780792,
0.7245801091194153,
1.4136077165603638,
0.21575386822223663,
-0.07708762586116791,
0.24334551393985748,
0.37219756841659546,
-0.08118147403001785,
0.4634488523006439,
1.0989091396331787,
0.6348840594291687,
0.5197310447692871,
0.7195367217063904,
-2.192692518234253,
1.353149175643921,
-1.068455457687378,
0.3448677957057953,
1.4056282043457031,
-0.9768739938735962,
0.3761143088340759,
-1.7927048206329346,
-0.028020787984132767,
0.5838980674743652,
-2.248908042907715,
0.16838985681533813,
-1.2076778411865234,
-0.44163060188293457,
1.1118656396865845,
0.3608781397342682,
-1.2513750791549683,
0.15190280973911285,
-0.35919806361198425,
1.0351300239562988,
0.4897114932537079,
1.1589890718460083,
-1.6587903499603271,
0.004180228337645531,
-0.2653356194496155,
0.10730890184640884,
-1.2751924991607666,
-1.4802019596099854,
0.4906039237976074,
0.6324958801269531,
0.5056461691856384,
-0.06571544706821442,
0.9233049750328064,
-0.9450072646141052,
0.7574718594551086,
-0.9218438267707825,
-1.6529337167739868,
-1.3791077136993408,
-2.2370078563690186,
-2.3802926540374756,
0.7655225396156311,
-0.4742112159729004,
-0.5058544278144836,
2.057487964630127,
-1.0079596042633057,
-1.739456057548523,
1.1963236331939697,
0.258393794298172,
-0.06558917462825775,
2.377431869506836,
0.20215360820293427,
-0.739697277545929,
0.42851802706718445,
-0.6404706239700317,
0.7071277499198914,
-0.48996150493621826,
1.3251070976257324,
0.42221003770828247,
-1.1707249879837036,
1.5303579568862915,
-0.4437963664531708,
0.5775236487388611,
-0.6485061645507812,
-0.457965224981308,
-0.7658718824386597,
0.40522056818008423,
1.8615652322769165,
-0.23679174482822418,
1.5311700105667114,
-0.2820059061050415,
-1.6177735328674316,
-1.6475701332092285,
0.9545831680297852,
0.4586375057697296,
-0.7218872904777527,
0.16553232073783875,
-0.33066168427467346,
0.13037820160388947,
-0.008847946301102638,
1.1183143854141235,
1.2297179698944092,
0.7580503821372986,
-0.3219609558582306,
-0.8570801019668579,
0.26098960638046265,
-0.03275047242641449,
-0.7091675996780396,
-1.761693000793457,
-0.30084094405174255,
0.1499672532081604,
0.6151487231254578,
-1.099515438079834,
1.7546240091323853,
0.8856585621833801,
1.8573862314224243,
0.986293613910675,
-0.297554075717926,
1.5289809703826904,
0.021050788462162018,
1.917606234550476,
-0.4411178529262543,
0.7256340384483337,
-0.3296545743942261,
-1.1809548139572144,
0.8464332818984985,
-0.34524011611938477,
-2.0627822875976562,
-0.7975855469703674,
-0.801014244556427,
-0.16073299944400787,
-0.7054933309555054,
1.0030920505523682,
-0.20001722872257233,
-1.323812484741211,
0.30557945370674133,
-0.6582250595092773,
0.15048830211162567,
-1.2755300998687744,
0.40608763694763184,
0.7563625574111938,
-0.6792879104614258,
0.047901034355163574,
-0.31914278864860535,
-1.2512699365615845,
-0.44577348232269287,
0.2186981588602066,
1.8744173049926758,
-0.8379376530647278,
0.8876848220825195,
1.0648328065872192,
-0.70066899061203,
-0.02674780786037445,
0.4361776113510132,
-0.33841753005981445,
0.8771302103996277,
-1.0536556243896484,
-0.3910488486289978,
1.2973278760910034,
-0.22985124588012695,
-0.5937796235084534,
1.4555931091308594,
0.7015544772148132,
-1.0366132259368896,
-0.05909617990255356,
-0.21827742457389832,
-0.9137059450149536,
0.00004490278661251068,
-1.6024771928787231,
-0.04586637392640114,
0.34374603629112244,
-1.5245290994644165,
-0.432680606842041,
-0.17745690047740936,
1.2990753650665283,
-0.12709711492061615,
1.4942833185195923,
-0.34977442026138306,
-0.19534681737422943,
-0.39812496304512024,
-0.37554800510406494,
0.12318408489227295,
-0.19640982151031494,
-0.6091657280921936,
0.24008899927139282,
-0.7264835834503174,
0.29364922642707825,
1.3924044370651245,
0.3233228027820587,
0.026077978312969208,
0.5671522617340088,
1.1293888092041016,
0.33094874024391174,
-0.08144602924585342,
-0.8405030965805054,
-1.5075492858886719,
2.053842782974243,
-1.4203481674194336,
1.9417028427124023,
0.7959640026092529,
0.039223384112119675,
-1.7137569189071655,
-1.8207306861877441,
1.4022910594940186,
1.1369050741195679,
2.3800084590911865,
0.5528436303138733,
0.37082555890083313,
-0.8487749099731445,
-0.6436806917190552,
0.3694429099559784,
-1.0500108003616333,
-0.7801282405853271,
0.0914197564125061,
2.3570449352264404,
1.8101768493652344,
-0.45993003249168396,
-0.19623863697052002,
-1.0608346462249756,
1.371323823928833,
-0.19564548134803772,
0.09943833947181702,
2.0244317054748535,
-0.30220460891723633,
-1.0556957721710205,
1.2391129732131958,
-2.3755276203155518,
0.08238736540079117,
1.9606214761734009,
0.2488507181406021,
0.05234617739915848,
-1.4350767135620117,
-0.6196569204330444,
-0.1695784330368042,
-0.31170621514320374,
-1.238476276397705,
0.536455512046814,
-0.27417951822280884,
-0.6904305815696716,
-1.4680529832839966,
0.2325800061225891,
-1.100146770477295,
-1.641726016998291,
0.20277146995067596,
1.8124107122421265,
2.00709867477417,
-0.7551595568656921,
1.6023719310760498,
-0.2392949014902115,
0.13496115803718567,
1.225732684135437,
1.2047269344329834,
3.2183289527893066,
1.9040172100067139,
-1.3816951513290405,
0.6125108003616333,
-0.12045131623744965,
-0.4605991840362549,
1.1357215642929077,
-1.165804147720337,
1.3225910663604736,
-0.21443653106689453,
-1.211999773979187,
-1.278832197189331,
0.9184018969535828,
0.5310876965522766,
0.10840928554534912,
-0.5185545086860657,
1.208152413368225,
0.05091174691915512,
1.3338168859481812,
0.45562246441841125,
-0.38186922669410706,
0.5967841744422913,
-0.459540992975235,
-0.5767948627471924,
1.5587087869644165,
0.25655946135520935,
-1.3636125326156616,
-2.2454752922058105,
-0.1976526975631714,
-0.8411886692047119,
0.053151801228523254,
-0.6231118440628052,
-0.9018634557723999,
1.6350010633468628,
0.40250876545906067,
-1.3055787086486816,
-0.32791170477867126,
-0.30855220556259155,
-0.6544790863990784,
2.685091018676758,
-1.4343128204345703,
-0.25670287013053894,
-0.961325466632843,
-0.6256559491157532,
1.6346384286880493,
-1.1773898601531982,
-0.20040827989578247,
-1.051297664642334,
-0.5787287354469299,
-1.295900583267212,
-0.5986148715019226,
-0.014135876670479774,
-0.9798182249069214,
0.8559812307357788,
0.1596759557723999,
-1.2796759605407715,
-0.3313997685909271,
-0.8517002463340759,
0.8272358775138855,
-0.07651342451572418,
0.28810909390449524,
1.795289397239685,
0.44584617018699646,
-0.44465240836143494,
0.7029943466186523,
1.1543446779251099,
0.6270631551742554,
-0.5936588644981384,
0.22805339097976685,
-0.7045454978942871,
0.3025728166103363,
-1.278943419456482,
0.3182539939880371,
-2.854551076889038,
0.5887781381607056,
-0.15231159329414368,
-0.03914989158511162,
-0.03971622511744499,
-1.2559332847595215,
1.04639732837677,
2.6620588302612305,
-1.201446533203125,
0.4680734872817993,
0.2716605067253113,
1.2507563829421997,
-1.5840694904327393,
0.3381509780883789,
-0.43249204754829407,
2.17305588722229,
0.09724193811416626,
1.1427949666976929,
-0.4464614987373352,
-2.236056327819824,
0.6083520650863647,
-1.3177392482757568,
-1.1967898607254028,
0.8804839253425598,
-0.7985953688621521,
-0.04774310439825058,
-1.342779517173767,
-0.1728273183107376,
-0.7644326090812683,
-1.256056308746338,
0.82964688539505,
0.12373800575733185,
0.4905419945716858,
-0.6104388236999512,
0.3273676931858063,
-2.1811039447784424,
-1.3174703121185303,
-0.3303094506263733,
-0.9221172332763672,
0.35239800810813904,
-0.3280255198478699,
0.764926552772522,
-0.26772457361221313,
0.02902067080140114,
0.3320412039756775,
1.3714845180511475,
3.404597282409668,
0.20185065269470215,
0.39327311515808105,
-0.18968288600444794,
-0.9164261817932129,
1.378852367401123,
0.9096307158470154,
-0.1524856835603714,
-0.5708221793174744,
-1.0308455228805542,
1.233988642692566,
1.8933258056640625,
1.0117791891098022,
0.09384014457464218,
-0.8386668562889099,
-0.701689600944519,
-0.06527695804834366,
0.1496320366859436,
0.5092320442199707,
0.8584741950035095,
0.009700513444840908,
0.074344202876091,
1.379172921180725,
1.183371663093567,
-0.3811633586883545,
0.41576871275901794,
-0.7572504281997681,
-0.47973132133483887,
0.5686560869216919,
0.3618159592151642,
-0.022202253341674805,
0.2751072943210602,
-0.9934688806533813,
-0.18623727560043335,
-0.40624627470970154,
-0.9484072923660278,
-0.715585470199585,
-0.49860912561416626,
-0.33375874161720276,
1.7192004919052124,
0.12138397991657257,
-0.5308093428611755,
-0.01567669026553631,
-0.8452451825141907,
-0.04512856900691986,
-1.043681025505066,
0.26446980237960815,
-0.12088839709758759,
-0.156126469373703,
-0.04920651391148567,
1.7924946546554565,
-0.9921972155570984,
-2.112886667251587,
0.28978344798088074,
0.22879791259765625,
-0.3291536569595337,
0.1963595151901245,
1.6315432786941528,
0.5443015694618225,
1.4573734998703003,
1.3905744552612305,
0.9864546656608582,
-0.7850717306137085,
-1.3957951068878174,
0.6920003890991211,
0.9739921689033508,
-1.4941298961639404,
0.8043200373649597,
0.06745503097772598,
-0.49162888526916504,
0.6711651682853699,
1.2518017292022705,
0.4136478900909424,
-1.9966115951538086,
0.810051441192627,
-0.9319652318954468,
0.6979139447212219,
0.6558082699775696,
0.6776428818702698,
0.16281723976135254,
0.7219416499137878,
-1.212904691696167,
-1.238128662109375,
-0.7551309466362,
-0.6995432376861572,
1.895141839981079,
-0.18298476934432983,
0.5518258810043335,
-0.11766654998064041,
-1.3776323795318604,
-0.07182726263999939,
0.7642295360565186,
0.32487979531288147,
-0.37567439675331116,
0.8012737035751343,
-0.7459895610809326,
-1.107334017753601,
-1.4573200941085815,
-0.44348010420799255,
-1.07744300365448,
-0.8496416807174683,
1.1003284454345703,
0.8522496819496155,
0.21395674347877502,
1.8061250448226929,
0.6718525886535645,
0.24382711946964264,
-2.591020107269287,
0.8696304559707642,
0.3570123016834259,
-0.07782907783985138,
0.8381959199905396,
0.35306698083877563,
0.9975557327270508,
0.0014415755867958069,
0.49429595470428467,
-2.505469799041748,
2.334003448486328,
-0.2594091296195984,
0.6967687606811523,
0.02381940186023712,
-0.24541941285133362,
1.0662544965744019,
0.5782208442687988,
0.5480685234069824,
-1.0532623529434204,
0.7284128665924072,
-0.6099345684051514,
1.2275006771087646,
0.9181828498840332,
-0.8100360035896301,
-0.0717630386352539,
1.2829207181930542,
0.47487616539001465,
-0.5165682435035706,
-0.9400416016578674,
-0.9805299043655396,
0.9320011734962463,
1.783742904663086,
-0.074038065969944,
0.06156177818775177,
0.8160392642021179,
0.6396411657333374,
-1.2677425146102905,
0.09694531559944153,
-0.7942938804626465,
-0.840166449546814,
1.5814554691314697,
1.9818928241729736,
-0.07934989035129547,
-0.19985681772232056,
-0.8644149899482727,
-1.223093032836914,
0.797691822052002,
0.02969237044453621,
0.09259778261184692,
0.685828685760498,
-0.6481525301933289,
1.0764304399490356,
1.0071260929107666,
0.8816795349121094,
0.22275400161743164,
0.21582737565040588,
0.4511381685733795,
-0.27415528893470764,
-1.0834013223648071,
-0.23746444284915924,
-1.105557918548584,
-2.5563459396362305,
0.4881947934627533,
-0.2460206001996994,
-1.434455394744873,
-0.012576606124639511,
-0.9681350588798523,
0.9232801795005798,
-0.49927863478660583,
-1.127411127090454,
-1.518070101737976,
0.1810762882232666,
-0.05884850397706032,
0.9198348522186279,
-1.5619240999221802,
-0.0840461254119873,
1.2045035362243652,
0.9277305603027344,
-0.7151667475700378,
0.9601444602012634,
0.20480182766914368,
1.008292317390442,
0.8768044114112854,
-0.3860633075237274,
0.4894712567329407,
0.07573467493057251,
-1.3493694067001343,
0.42471471428871155,
1.1293728351593018,
0.17223988473415375,
1.4337940216064453,
-0.5227154493331909,
-0.033165670931339264,
0.3120298981666565,
-0.494434654712677,
-0.5094866752624512,
-0.5559192895889282,
0.6849029660224915,
0.02735559642314911,
-0.8313532471656799,
0.15131142735481262,
-0.06032267212867737,
-0.2539723813533783,
0.17792269587516785,
-1.509584903717041,
-0.1767612099647522,
-0.30392149090766907,
-0.5470151901245117,
-1.2390285730361938,
-0.06949834525585175,
1.3940163850784302,
-0.7531857490539551,
-0.24284933507442474,
0.5871169567108154,
0.41749992966651917,
0.4971417188644409,
0.6204398274421692,
-0.6593914031982422,
-0.3277203142642975,
-0.2775287330150604,
-0.3270591199398041,
0.32257553935050964,
1.3623932600021362,
-0.0929756611585617,
-0.8956220746040344,
0.7682695388793945,
-0.3097114562988281,
-0.0007216623052954674,
1.923911690711975,
0.1718088835477829,
-0.8780292272567749,
0.329359769821167,
-0.7037878036499023,
1.913092017173767,
1.7870018482208252,
1.3109264373779297,
-0.12977634370326996,
-1.0884804725646973,
0.6428309082984924,
-0.3521353304386139,
-0.4136955440044403,
0.957457959651947,
0.4506368339061737,
-0.19222405552864075,
-1.47267746925354,
0.6082671284675598,
1.1589065790176392,
-0.7733814716339111,
-0.8309763669967651,
0.04419562220573425,
-0.8395829796791077,
0.97796231508255,
0.7484465837478638,
0.46600353717803955,
0.21464471518993378,
1.6498253345489502,
0.7977041006088257,
-0.5083845853805542,
0.5098796486854553,
0.47116217017173767,
-0.17972849309444427,
-2.062669038772583,
-1.1567634344100952,
0.3057224750518799,
-0.47119009494781494,
-1.5490525960922241,
1.370529055595398,
-1.169891357421875,
-0.9484450817108154,
0.4865420460700989,
0.02775603160262108,
1.504899263381958,
0.3207228481769562,
1.5868093967437744,
2.0618772506713867,
0.9783636331558228,
0.3488403856754303,
1.3674248456954956,
-0.16725434362888336,
-0.41308438777923584,
1.8491824865341187,
-0.43530046939849854,
0.37845075130462646,
1.1507987976074219,
-0.3625633120536804,
-1.0287786722183228,
-0.7226173281669617,
-1.1233844757080078,
-0.7210703492164612,
1.1415935754776,
0.10132687538862228,
-1.0569250583648682,
0.27581942081451416,
1.567456603050232,
0.08242708444595337,
-0.3023005723953247,
0.5688188672065735,
0.5054852962493896,
-0.8331766724586487,
0.007205433212220669,
-0.9096027612686157,
0.509245753288269,
-0.18434399366378784,
-0.381154865026474,
0.43812671303749084,
0.42429235577583313,
1.3583236932754517,
0.035084180533885956,
0.20897270739078522,
1.1829230785369873,
-1.4306585788726807,
1.4547439813613892,
-0.6810911893844604,
0.29119187593460083,
-2.34293270111084,
1.4264845848083496,
-0.7893255352973938,
1.892208456993103,
-2.641913652420044,
0.44101497530937195,
-0.6107785105705261,
-0.46836110949516296,
0.38634663820266724,
-0.38016951084136963,
0.15236128866672516,
-0.13949531316757202,
-1.183441400527954,
-0.16771145164966583,
-0.6094645261764526,
0.6124374270439148,
1.09541916847229,
1.3633661270141602,
-1.0677849054336548,
-0.3380501866340637,
-1.7216287851333618,
-0.22690163552761078,
-0.6070300340652466,
0.26891028881073,
-1.9336663484573364,
-0.18545064330101013,
-1.9213347434997559,
-2.3527591228485107,
-1.388086199760437,
-0.7978094816207886,
1.1546417474746704,
0.2039138674736023,
-0.9224110841751099,
1.1666901111602783,
-0.4204571843147278,
-1.870147705078125,
1.1029192209243774,
-2.153226613998413
] |
https://github.com/huggingface/datasets/issues/5378
|
The dataset "the_pile", subset "enron_emails" , load_dataset() failure
|
Thanks for reporting @shaoyuta. We are investigating it.
We are transferring the issue to "the_pile" Community tab on the Hub: https://huggingface.co/datasets/the_pile/discussions/4
|
### Describe the bug
When run
"datasets.load_dataset("the_pile","enron_emails")" failure

### Steps to reproduce the bug
Run below code in python cli:
>>> import datasets
>>> datasets.load_dataset("the_pile","enron_emails")
### Expected behavior
Load dataset "the_pile", "enron_emails" successfully.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.7.1
- Platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.0
- Pandas version: 1.4.3
| 368 | 21 |
The dataset "the_pile", subset "enron_emails" , load_dataset() failure
### Describe the bug
When run
"datasets.load_dataset("the_pile","enron_emails")" failure

### Steps to reproduce the bug
Run below code in python cli:
>>> import datasets
>>> datasets.load_dataset("the_pile","enron_emails")
### Expected behavior
Load dataset "the_pile", "enron_emails" successfully.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.7.1
- Platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.0
- Pandas version: 1.4.3
Thanks for reporting @shaoyuta. We are investigating it.
We are transferring the issue to "the_pile" Community tab on the Hub: https://huggingface.co/datasets/the_pile/discussions/4
|
[
-1.213745355606079,
-0.8449054956436157,
-0.714655339717865,
1.4032294750213623,
-0.16015246510505676,
-1.2523725032806396,
0.10127006471157074,
-1.0374091863632202,
1.578595519065857,
-0.7577510476112366,
0.278439998626709,
-1.5970723628997803,
0.010846962220966816,
-0.47150227427482605,
-0.6447452306747437,
-0.8671492338180542,
-0.4096042215824127,
-0.6921929717063904,
1.0510555505752563,
2.5403106212615967,
1.2361422777175903,
-1.301751971244812,
2.74794864654541,
0.6701450347900391,
-0.19358813762664795,
-0.9884815216064453,
0.6010176539421082,
-0.04150456190109253,
-1.3734118938446045,
-0.38901621103286743,
-0.9332829117774963,
-0.051119834184646606,
-0.5086795687675476,
-0.48926663398742676,
0.0596211701631546,
0.3643728196620941,
-0.3194188177585602,
-0.37313634157180786,
-0.520746111869812,
-0.8312649130821228,
0.40327370166778564,
-0.3630918562412262,
0.9339179992675781,
-0.4489738643169403,
1.7520837783813477,
-0.617415189743042,
0.6073383092880249,
0.7373915910720825,
1.258939266204834,
0.2751294672489166,
0.02655218541622162,
0.3364185392856598,
0.38919728994369507,
0.03557967394590378,
0.4838952124118805,
1.1318861246109009,
0.5684798955917358,
0.43439981341362,
0.666685163974762,
-2.1976397037506104,
1.3301701545715332,
-0.8944026827812195,
0.15613675117492676,
1.4864370822906494,
-0.8854568004608154,
0.3285929262638092,
-1.7704042196273804,
-0.08919694274663925,
0.5711119174957275,
-2.3719167709350586,
0.22316740453243256,
-1.374948263168335,
-0.6062530875205994,
1.0201342105865479,
0.4159730076789856,
-1.184910774230957,
0.031602371484041214,
-0.4230954647064209,
0.9469128847122192,
0.5384209752082825,
1.1117156744003296,
-1.6104891300201416,
-0.15280960500240326,
-0.20983755588531494,
0.08732262998819351,
-1.3318991661071777,
-1.6060305833816528,
0.553573727607727,
0.6450713276863098,
0.5922858715057373,
0.00716047827154398,
0.9009280204772949,
-0.9781379103660583,
0.8262410759925842,
-0.9042946696281433,
-1.7482033967971802,
-1.3864551782608032,
-2.3840346336364746,
-2.2944600582122803,
0.7898464798927307,
-0.5035787224769592,
-0.43422791361808777,
2.054668426513672,
-1.172084927558899,
-1.6686149835586548,
1.1606364250183105,
0.31510239839553833,
0.015858639031648636,
2.4987194538116455,
0.25394245982170105,
-0.7678665518760681,
0.5232024788856506,
-0.7755499482154846,
0.6821917295455933,
-0.34344416856765747,
1.2310320138931274,
0.45127585530281067,
-0.9741170406341553,
1.555326223373413,
-0.4225033223628998,
0.6088559031486511,
-0.5768596529960632,
-0.46266788244247437,
-0.8210657238960266,
0.27249348163604736,
1.8888280391693115,
-0.2555473744869232,
1.591054916381836,
-0.15364038944244385,
-1.577889084815979,
-1.577078938484192,
0.8119910359382629,
0.4733569025993347,
-0.8272536396980286,
0.12194462865591049,
-0.32442641258239746,
0.08674253523349762,
-0.015820026397705078,
1.0594816207885742,
1.3124330043792725,
0.7431484460830688,
-0.42148804664611816,
-0.9466279745101929,
0.15706180036067963,
-0.053214989602565765,
-0.7790428996086121,
-1.6860800981521606,
-0.3355715870857239,
0.17295566201210022,
0.6219121813774109,
-1.2526977062225342,
1.7746657133102417,
0.9069477319717407,
2.020298719406128,
0.9536432027816772,
-0.4209284782409668,
1.475819706916809,
0.11636940389871597,
1.8176017999649048,
-0.47391682863235474,
0.7056106328964233,
-0.37860819697380066,
-1.1383049488067627,
0.7783859968185425,
-0.3692055642604828,
-2.005690574645996,
-0.7385333776473999,
-0.8547902703285217,
-0.1905115842819214,
-0.7277963757514954,
0.9881369471549988,
-0.2641926407814026,
-1.3390264511108398,
0.20486323535442352,
-0.7432223558425903,
0.037922006100416183,
-1.3599028587341309,
0.3066209554672241,
0.7601231932640076,
-0.5978782773017883,
-0.06901100277900696,
-0.18856874108314514,
-1.3089399337768555,
-0.4328766167163849,
0.24803361296653748,
1.8658251762390137,
-0.6401951909065247,
1.0312362909317017,
0.9828022718429565,
-0.7120470404624939,
0.023795560002326965,
0.3150402307510376,
-0.36086714267730713,
0.8812606334686279,
-1.0702102184295654,
-0.36176908016204834,
1.2152999639511108,
-0.2940793037414551,
-0.6442272663116455,
1.4297120571136475,
0.7581292390823364,
-1.009759545326233,
-0.2729787230491638,
-0.11067309975624084,
-0.7925479412078857,
0.0812278687953949,
-1.6098887920379639,
-0.09166902303695679,
0.3284249007701874,
-1.4833447933197021,
-0.4627586305141449,
-0.1210695430636406,
1.3172045946121216,
-0.1647404432296753,
1.4139353036880493,
-0.36613646149635315,
-0.2197885662317276,
-0.4871363937854767,
-0.47364482283592224,
0.12395020574331284,
-0.22733424603939056,
-0.6071184277534485,
0.2558104693889618,
-0.8050486445426941,
0.2204616516828537,
1.4765760898590088,
0.39175835251808167,
0.11492741107940674,
0.5083858966827393,
1.0632851123809814,
0.3595324754714966,
-0.1966550499200821,
-0.9504784941673279,
-1.6418966054916382,
2.1082334518432617,
-1.4278901815414429,
2.0457942485809326,
0.712557852268219,
-0.17129085958003998,
-1.7924541234970093,
-2.029235363006592,
1.2969164848327637,
1.1256308555603027,
2.37507700920105,
0.45150259137153625,
0.497117817401886,
-0.8115561008453369,
-0.7689698338508606,
0.27441495656967163,
-0.9608337879180908,
-0.7111333608627319,
0.11836134642362595,
2.344428777694702,
1.7014096975326538,
-0.42850181460380554,
-0.1181039959192276,
-1.0103516578674316,
1.3094983100891113,
-0.12264533340930939,
0.22864142060279846,
1.985295057296753,
-0.2398729771375656,
-1.0344611406326294,
1.2737747430801392,
-2.217038869857788,
0.19637131690979004,
2.0006136894226074,
0.23197060823440552,
0.06388525664806366,
-1.3090401887893677,
-0.7471672892570496,
-0.3777545690536499,
-0.42612549662590027,
-1.2122081518173218,
0.5360278487205505,
-0.23034213483333588,
-0.8582795858383179,
-1.3882254362106323,
0.021994661539793015,
-1.1415330171585083,
-1.7330259084701538,
0.21445493400096893,
1.8564883470535278,
2.0332400798797607,
-0.7977495789527893,
1.417656421661377,
-0.20467044413089752,
0.026680320501327515,
1.1892837285995483,
1.2112255096435547,
3.1261074542999268,
1.8585846424102783,
-1.316194772720337,
0.7270064353942871,
-0.07988891005516052,
-0.3820752203464508,
1.2250759601593018,
-1.1755411624908447,
1.3336130380630493,
-0.18291738629341125,
-1.2551419734954834,
-1.1771081686019897,
0.9057209491729736,
0.42468106746673584,
0.029804926365613937,
-0.4638983905315399,
1.201917052268982,
0.09619405120611191,
1.4105875492095947,
0.5480927228927612,
-0.35894909501075745,
0.5815169215202332,
-0.4071706235408783,
-0.5279366970062256,
1.5721044540405273,
0.1584508717060089,
-1.580355167388916,
-2.370433807373047,
-0.33391696214675903,
-0.9375594258308411,
-0.03256983682513237,
-0.7153694033622742,
-1.0351381301879883,
1.6426775455474854,
0.46688956022262573,
-1.1230272054672241,
-0.3108605146408081,
-0.3742102086544037,
-0.5790188908576965,
2.784961462020874,
-1.3927769660949707,
-0.10031554847955704,
-1.0021538734436035,
-0.5774692296981812,
1.5420194864273071,
-1.2198542356491089,
-0.18446409702301025,
-1.0718185901641846,
-0.5737167000770569,
-1.2603819370269775,
-0.45143166184425354,
-0.0010545896366238594,
-0.9730565547943115,
0.7272103428840637,
0.1031416729092598,
-1.1465836763381958,
-0.26338428258895874,
-0.9981359839439392,
0.8791934251785278,
-0.04371289163827896,
0.14937368035316467,
1.8250000476837158,
0.360250860452652,
-0.31259462237358093,
0.7426193356513977,
1.166237473487854,
0.61434006690979,
-0.707958459854126,
0.08028668165206909,
-0.7146367430686951,
0.36780738830566406,
-1.2657270431518555,
0.23663006722927094,
-2.8891994953155518,
0.6132675409317017,
-0.1531146913766861,
-0.10552820563316345,
-0.006961624138057232,
-1.2965813875198364,
1.112818956375122,
2.556485414505005,
-1.182908058166504,
0.5721961259841919,
0.3510977625846863,
1.1538982391357422,
-1.6722863912582397,
0.2974584996700287,
-0.5037606954574585,
2.147710084915161,
0.16546986997127533,
1.1165491342544556,
-0.5242909789085388,
-2.2395408153533936,
0.7027907371520996,
-1.1974948644638062,
-1.1510217189788818,
0.8120465874671936,
-0.9697242379188538,
0.2409912347793579,
-1.3643527030944824,
-0.15994203090667725,
-0.7944148182868958,
-1.2172735929489136,
0.5696370005607605,
0.005398518405854702,
0.5339532494544983,
-0.4678381383419037,
0.3223801851272583,
-2.328583240509033,
-1.360835075378418,
-0.21537967026233673,
-0.9421181678771973,
0.5114088654518127,
-0.3767675757408142,
0.7345819473266602,
-0.12164266407489777,
0.019183773547410965,
0.35199999809265137,
1.4171086549758911,
3.399041175842285,
0.11064217239618301,
0.2371176928281784,
-0.16206996142864227,
-1.0177665948867798,
1.4664324522018433,
0.9483011960983276,
-0.1363944262266159,
-0.5894379615783691,
-0.9129374623298645,
1.338612675666809,
1.9958770275115967,
1.0974702835083008,
0.04943922907114029,
-0.8630363345146179,
-0.7031830549240112,
0.06723090261220932,
0.1800389587879181,
0.4733530879020691,
0.9378647804260254,
0.015012347139418125,
0.11074867844581604,
1.5313465595245361,
1.2073047161102295,
-0.29433295130729675,
0.37405624985694885,
-0.8904541730880737,
-0.4591650366783142,
0.5934851765632629,
0.3141099810600281,
0.03653278201818466,
0.47356316447257996,
-1.0376571416854858,
-0.22351080179214478,
-0.3850122094154358,
-0.8542965650558472,
-0.6837230920791626,
-0.457363486289978,
-0.40113207697868347,
1.6687363386154175,
0.005709410645067692,
-0.42329517006874084,
0.01646803319454193,
-0.8211326599121094,
-0.07582870870828629,
-1.1066362857818604,
0.326602965593338,
-0.14785981178283691,
-0.021577483043074608,
-0.20434466004371643,
1.7514292001724243,
-0.9907115697860718,
-2.1346747875213623,
0.1595482975244522,
0.2855188846588135,
-0.33427533507347107,
0.11163287609815598,
1.659039855003357,
0.5037052631378174,
1.487633466720581,
1.331364393234253,
0.995365560054779,
-0.7299677133560181,
-1.2843655347824097,
0.6291348934173584,
0.9962310194969177,
-1.3625272512435913,
0.8560694456100464,
-0.1628238409757614,
-0.5406785607337952,
0.5411070585250854,
1.250454306602478,
0.4094851315021515,
-1.9021047353744507,
0.9227739572525024,
-0.8879017233848572,
0.803655207157135,
0.6936631798744202,
0.7903537750244141,
0.10587147623300552,
0.8621474504470825,
-1.2324849367141724,
-1.0915729999542236,
-0.7051703333854675,
-0.587193489074707,
1.8642916679382324,
-0.2800452709197998,
0.5331990718841553,
-0.24026420712471008,
-1.1535508632659912,
0.02479342371225357,
0.6372470855712891,
0.3812958598136902,
-0.3312601149082184,
0.8980639576911926,
-0.6324415802955627,
-1.125306487083435,
-1.3706178665161133,
-0.3815423846244812,
-1.0387080907821655,
-0.9172618389129639,
1.05973482131958,
0.7368451952934265,
0.389157235622406,
1.897444248199463,
0.6171436905860901,
0.31335172057151794,
-2.624467372894287,
0.8954280018806458,
0.2592948377132416,
-0.02657175436615944,
0.8914748430252075,
0.29329219460487366,
1.2055538892745972,
-0.10410179942846298,
0.46307477355003357,
-2.3183295726776123,
2.2307851314544678,
-0.2883718013763428,
0.6643707156181335,
0.01738862693309784,
-0.09127092361450195,
0.9950405955314636,
0.6038334965705872,
0.5020338296890259,
-1.170383095741272,
0.7477931976318359,
-0.5160986185073853,
1.128580093383789,
0.8735377788543701,
-0.8592248558998108,
0.10524741560220718,
1.299111008644104,
0.5344539284706116,
-0.4910891056060791,
-0.9763245582580566,
-0.7789225578308105,
0.9034492373466492,
1.7107889652252197,
-0.0769968181848526,
0.0869465321302414,
0.8009999394416809,
0.6365368962287903,
-1.2983903884887695,
0.016174249351024628,
-0.7063325047492981,
-0.6921386122703552,
1.706970453262329,
2.078540802001953,
0.04515519738197327,
-0.16105090081691742,
-0.7248255014419556,
-1.296270489692688,
0.7673786878585815,
-0.024520959705114365,
0.16843067109584808,
0.6501848697662354,
-0.620803713798523,
1.0704811811447144,
0.7950911521911621,
1.0581889152526855,
0.12184291332960129,
0.18326784670352936,
0.35449862480163574,
-0.2670106887817383,
-1.197259545326233,
-0.2753060460090637,
-0.9968313574790955,
-2.644277334213257,
0.5202978253364563,
-0.3469538986682892,
-1.5366052389144897,
0.03843307122588158,
-0.9607214331626892,
0.9090924859046936,
-0.5723168849945068,
-1.0244114398956299,
-1.4488774538040161,
0.2297677844762802,
-0.17511630058288574,
0.9221898317337036,
-1.5727177858352661,
-0.2538728415966034,
1.3056378364562988,
0.9480639696121216,
-0.6386198401451111,
1.0195509195327759,
0.29731205105781555,
1.0363924503326416,
0.7820988893508911,
-0.39180612564086914,
0.5400677919387817,
0.16643214225769043,
-1.4412680864334106,
0.4272366762161255,
1.226815104484558,
0.2812363803386688,
1.434299111366272,
-0.5762394070625305,
0.07786446809768677,
0.3674350082874298,
-0.4513070583343506,
-0.5040304064750671,
-0.5432351231575012,
0.7323952317237854,
-0.0010158056393265724,
-1.036105751991272,
-0.090053029358387,
-0.18984787166118622,
-0.19327767193317413,
0.18333207070827484,
-1.4223169088363647,
-0.21629872918128967,
-0.38536331057548523,
-0.6005067825317383,
-1.2832690477371216,
-0.09730575978755951,
1.3098543882369995,
-0.9334666132926941,
-0.07834647595882416,
0.4845123291015625,
0.32534265518188477,
0.5509774088859558,
0.6739106178283691,
-0.6993876695632935,
-0.2387211173772812,
-0.3176465928554535,
-0.30349284410476685,
0.29344213008880615,
1.2738876342773438,
-0.06221999600529671,
-1.0001426935195923,
0.606271505355835,
-0.2330014556646347,
0.12339065223932266,
2.0696847438812256,
0.07205570489168167,
-0.7407103776931763,
0.2933447062969208,
-0.6530131697654724,
1.894399881362915,
1.6085206270217896,
1.3597807884216309,
-0.1894996166229248,
-0.9728764295578003,
0.6025099754333496,
-0.3046407103538513,
-0.3448140621185303,
0.8907586932182312,
0.4579898715019226,
-0.24036261439323425,
-1.4042309522628784,
0.6751545667648315,
1.1938785314559937,
-0.9298644661903381,
-0.7281506657600403,
0.13344436883926392,
-0.839585542678833,
1.1564582586288452,
0.6624079346656799,
0.37571027874946594,
0.306692898273468,
1.639719009399414,
0.7962504029273987,
-0.5742987990379333,
0.3766115605831146,
0.5212419033050537,
-0.17256300151348114,
-1.9796264171600342,
-1.0200588703155518,
0.37096503376960754,
-0.5283044576644897,
-1.4865459203720093,
1.4465059041976929,
-1.1758918762207031,
-0.9876590371131897,
0.515623152256012,
0.14614500105381012,
1.3640567064285278,
0.38904431462287903,
1.6604673862457275,
2.104583978652954,
0.975428581237793,
0.3846816420555115,
1.317359447479248,
-0.1027618795633316,
-0.33328118920326233,
1.7412537336349487,
-0.39357179403305054,
0.4575467109680176,
1.0768516063690186,
-0.48797816038131714,
-1.089476227760315,
-0.8264588117599487,
-1.1331478357315063,
-0.6628060936927795,
1.124392032623291,
0.11199530959129333,
-1.0356910228729248,
0.2357460856437683,
1.5968433618545532,
0.03853771463036537,
-0.30642691254615784,
0.7032880187034607,
0.40228894352912903,
-0.7220102548599243,
-0.0815148800611496,
-0.9582993984222412,
0.5459613800048828,
-0.1541157066822052,
-0.35997429490089417,
0.23509418964385986,
0.4633226990699768,
1.3792600631713867,
0.013755298219621181,
0.17412620782852173,
1.2715530395507812,
-1.3560218811035156,
1.4228463172912598,
-0.7809513211250305,
0.20051221549510956,
-2.2846591472625732,
1.3470594882965088,
-0.8013160824775696,
1.8689680099487305,
-2.6060667037963867,
0.48212841153144836,
-0.551199197769165,
-0.438034325838089,
0.21492888033390045,
-0.3959623873233795,
0.1597759872674942,
-0.12481085956096649,
-1.1115577220916748,
-0.15183834731578827,
-0.7886815071105957,
0.6397076845169067,
1.1160268783569336,
1.3944904804229736,
-1.065036654472351,
-0.32745692133903503,
-1.7405683994293213,
-0.17332227528095245,
-0.7403072118759155,
0.24811571836471558,
-1.8780317306518555,
-0.15541474521160126,
-1.9545695781707764,
-2.4488120079040527,
-1.3865516185760498,
-0.8759066462516785,
1.2579129934310913,
0.16271628439426422,
-0.9317946434020996,
1.205795168876648,
-0.3124936521053314,
-1.8299249410629272,
1.2222328186035156,
-2.231123208999634
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
The data files are hosted on HF at https://huggingface.co/datasets/allenai/c4/tree/main
You have 200 runs streaming the same files in parallel. So this is probably a Hub limitation. Maybe rate limiting ? cc @julien-c
Maybe you can also try to reduce the number of HTTP requests by increasing the block size of each request. This can be done by increasing `DEFAULT_BLOCK_SIZE` in `fsspec.implementations.http`. Default is `5 * 2**20` (5MiB)
Anyway maybe it's just better to save the dataset locally in that case ?
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 81 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
The data files are hosted on HF at https://huggingface.co/datasets/allenai/c4/tree/main
You have 200 runs streaming the same files in parallel. So this is probably a Hub limitation. Maybe rate limiting ? cc @julien-c
Maybe you can also try to reduce the number of HTTP requests by increasing the block size of each request. This can be done by increasing `DEFAULT_BLOCK_SIZE` in `fsspec.implementations.http`. Default is `5 * 2**20` (5MiB)
Anyway maybe it's just better to save the dataset locally in that case ?
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
you don't get an HTTP error code or something in your stack trace? Kinda hard to debug with this info
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 20 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
you don't get an HTTP error code or something in your stack trace? Kinda hard to debug with this info
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
You could try to re-run using this `datasets` branch: [raise-err-when-disconnect](https://github.com/huggingface/datasets/compare/raise-err-when-disconnect?expand=1)
It should raise the fsspec error
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 16 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
You could try to re-run using this `datasets` branch: [raise-err-when-disconnect](https://github.com/huggingface/datasets/compare/raise-err-when-disconnect?expand=1)
It should raise the fsspec error
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
The weird thing is that I already have it saved locally & it seems to indeed be using the cached one 🧐 ; I'm also using offline mode, so I don't think it has something to do with the Hub.
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
```
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 68 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
The weird thing is that I already have it saved locally & it seems to indeed be using the cached one 🧐 ; I'm also using offline mode, so I don't think it has something to do with the Hub.
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
```
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
No, you passed `streaming=True` so it streams the data from the Hub.
This message just shows that you use the cached version of the `c4` **module**, aka the python script that is run to generate the examples from the raw data files.
Maybe the offline mode should also disable `fsspec`/`aiohttp` HTTP calls in `datasets` and not just the `requests` ones.
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 60 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
No, you passed `streaming=True` so it streams the data from the Hub.
This message just shows that you use the cached version of the `c4` **module**, aka the python script that is run to generate the examples from the raw data files.
Maybe the offline mode should also disable `fsspec`/`aiohttp` HTTP calls in `datasets` and not just the `requests` ones.
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5374
|
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
|
> This message just shows that you use the cached version of the c4 module
Ah my bad you're right about the module, but it's also using the downloaded & cached c4 dataset. There's no internet during the runs so it wouldn't work otherwise
|
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
| 369 | 44 |
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
> This message just shows that you use the cached version of the c4 module
Ah my bad you're right about the module, but it's also using the downloaded & cached c4 dataset. There's no internet during the runs so it wouldn't work otherwise
|
[
-1.2248406410217285,
-0.8955921530723572,
-0.6917340159416199,
1.4215863943099976,
-0.19765296578407288,
-1.1916404962539673,
0.06477683037519455,
-1.129605770111084,
1.6703031063079834,
-0.7351623177528381,
0.20575542747974396,
-1.600921392440796,
-0.06676789373159409,
-0.5356887578964233,
-0.730277419090271,
-0.8398512005805969,
-0.4580324590206146,
-0.8814458250999451,
0.9226098656654358,
2.503593921661377,
1.2784132957458496,
-1.4177896976470947,
2.7635202407836914,
0.7233556509017944,
-0.27042311429977417,
-1.0546752214431763,
0.570446252822876,
0.12162642925977707,
-1.3778347969055176,
-0.34019872546195984,
-0.9614505171775818,
-0.024541089311242104,
-0.568294107913971,
-0.5029729008674622,
0.031950630247592926,
0.449382483959198,
-0.26278066635131836,
-0.411094069480896,
-0.47061780095100403,
-0.72126704454422,
0.43811577558517456,
-0.2625567615032196,
0.938326358795166,
-0.3494967520236969,
1.7051892280578613,
-0.633704662322998,
0.2961755096912384,
0.7041863203048706,
1.2230463027954102,
0.158113494515419,
0.011654865927994251,
0.27415817975997925,
0.34782126545906067,
0.005149515345692635,
0.5487620234489441,
1.2064937353134155,
0.5965539813041687,
0.3620874285697937,
0.6875619888305664,
-2.152176856994629,
1.2831850051879883,
-0.9330624938011169,
0.2996569573879242,
1.3875408172607422,
-0.95071941614151,
0.33369186520576477,
-1.8187994956970215,
-0.0868023931980133,
0.5518459677696228,
-2.2104244232177734,
0.3153444826602936,
-1.2766672372817993,
-0.5071454644203186,
1.0418778657913208,
0.2405225783586502,
-1.1919206380844116,
0.2335740178823471,
-0.5979235768318176,
1.1388965845108032,
0.4447646141052246,
1.1835451126098633,
-1.6542680263519287,
-0.018085528165102005,
-0.22125957906246185,
0.12168831378221512,
-1.3170537948608398,
-1.549586296081543,
0.5439879298210144,
0.6424974203109741,
0.6413440108299255,
-0.11937778443098068,
0.9972104430198669,
-1.0578477382659912,
0.7865306735038757,
-0.9467532634735107,
-1.7432175874710083,
-1.4296574592590332,
-2.2842564582824707,
-2.2387783527374268,
0.7679567933082581,
-0.45824819803237915,
-0.5229498744010925,
2.070335626602173,
-1.0081069469451904,
-1.8031126260757446,
1.1111409664154053,
0.32193079590797424,
0.006652354262769222,
2.2686288356781006,
0.2525886595249176,
-0.7565370202064514,
0.42655041813850403,
-0.6469957828521729,
0.7169056534767151,
-0.25039613246917725,
1.3513429164886475,
0.5208555459976196,
-0.9908905625343323,
1.6548091173171997,
-0.46260303258895874,
0.5831505060195923,
-0.697359025478363,
-0.5593634247779846,
-0.6887773871421814,
0.2528083920478821,
1.9020425081253052,
-0.40398842096328735,
1.605641484260559,
-0.376291424036026,
-1.5929385423660278,
-1.501683235168457,
0.8011271357536316,
0.6010152697563171,
-0.7662432789802551,
0.08825001865625381,
-0.5020135045051575,
0.04836280271410942,
-0.08127240091562271,
1.1025758981704712,
1.2637776136398315,
0.7499135732650757,
-0.3528078496456146,
-0.8971202373504639,
0.22895103693008423,
-0.03447026386857033,
-0.6945198178291321,
-1.8737560510635376,
-0.27505671977996826,
0.1866607517004013,
0.6561330556869507,
-1.2505446672439575,
1.663543701171875,
0.8926568627357483,
1.93733811378479,
1.0546685457229614,
-0.4147060215473175,
1.4578747749328613,
0.11555825918912888,
1.818681240081787,
-0.5005629658699036,
0.674808144569397,
-0.2546519935131073,
-1.175361156463623,
0.8798390030860901,
-0.3149009644985199,
-2.0704634189605713,
-0.7628078460693359,
-0.7546499371528625,
-0.09359262138605118,
-0.8188655972480774,
0.9219313859939575,
-0.23324599862098694,
-1.5305211544036865,
0.23282822966575623,
-0.7310513257980347,
0.1769343614578247,
-1.1351900100708008,
0.21961857378482819,
0.7526409029960632,
-0.5564359426498413,
0.1060512438416481,
-0.20063059031963348,
-1.3078281879425049,
-0.4518403708934784,
0.3894733190536499,
1.779532790184021,
-0.7598471641540527,
0.9361177086830139,
1.035952091217041,
-0.7564553022384644,
0.09454280883073807,
0.2671331763267517,
-0.3351627588272095,
0.9578242301940918,
-1.0836347341537476,
-0.42282605171203613,
1.0718683004379272,
-0.165239155292511,
-0.583660364151001,
1.4437799453735352,
0.7619814872741699,
-0.9931349754333496,
-0.22941415011882782,
-0.1874888837337494,
-0.8475490808486938,
-0.052397362887859344,
-1.523010492324829,
-0.20520995557308197,
0.3787945508956909,
-1.4981443881988525,
-0.4428253173828125,
-0.25097301602363586,
1.4082659482955933,
-0.2679832875728607,
1.495800495147705,
-0.2386951893568039,
-0.1827632039785385,
-0.4086437225341797,
-0.4301292300224304,
0.19331838190555573,
-0.13854239881038666,
-0.5495004057884216,
0.26961463689804077,
-0.8781228065490723,
0.33656588196754456,
1.3851369619369507,
0.4084758460521698,
-0.0006459662690758705,
0.5030654072761536,
1.0629291534423828,
0.3806668817996979,
-0.13695061206817627,
-0.861042857170105,
-1.5438618659973145,
2.0339996814727783,
-1.397592544555664,
1.9250069856643677,
0.7892377972602844,
-0.022179938852787018,
-1.8337548971176147,
-1.8956679105758667,
1.347383975982666,
1.1509724855422974,
2.3788461685180664,
0.5151157379150391,
0.3839757442474365,
-0.6946586966514587,
-0.6920344233512878,
0.29921820759773254,
-1.042528748512268,
-0.6733645796775818,
0.1971675157546997,
2.3869051933288574,
1.7667458057403564,
-0.4866580665111542,
-0.24255913496017456,
-0.9439316987991333,
1.335983395576477,
-0.14656563103199005,
0.12741519510746002,
2.0147883892059326,
-0.20081768929958344,
-1.0777240991592407,
1.3893431425094604,
-2.408268690109253,
0.23041832447052002,
1.9561775922775269,
0.2310646027326584,
0.0762064978480339,
-1.3726083040237427,
-0.6750243306159973,
-0.31589773297309875,
-0.49267342686653137,
-1.1571604013442993,
0.6624249815940857,
-0.2868596911430359,
-0.8384366035461426,
-1.558150291442871,
0.0802338719367981,
-1.1296921968460083,
-1.8158186674118042,
0.3436442017555237,
1.853144645690918,
1.9954850673675537,
-0.8325302600860596,
1.5259101390838623,
-0.31273746490478516,
0.11410164088010788,
1.234776496887207,
1.3029221296310425,
3.157867193222046,
1.826052188873291,
-1.31723153591156,
0.7626134157180786,
-0.08736274391412735,
-0.5193169713020325,
1.1164181232452393,
-1.242619514465332,
1.1962047815322876,
-0.22644826769828796,
-1.209378957748413,
-1.2301362752914429,
1.0410487651824951,
0.503640353679657,
0.13652990758419037,
-0.5378063321113586,
1.1503257751464844,
0.1427120715379715,
1.4471657276153564,
0.547939121723175,
-0.3133816421031952,
0.6383253335952759,
-0.4079955518245697,
-0.47044241428375244,
1.5590847730636597,
0.10832992941141129,
-1.377413034439087,
-2.3025145530700684,
-0.28196948766708374,
-0.7745762467384338,
-0.09117577224969864,
-0.589773416519165,
-1.011601448059082,
1.6671067476272583,
0.4071398079395294,
-1.3089020252227783,
-0.3565521836280823,
-0.34791797399520874,
-0.5440965294837952,
2.5244147777557373,
-1.3952831029891968,
-0.10771854221820831,
-0.9674535393714905,
-0.6132895946502686,
1.6409274339675903,
-1.1300489902496338,
-0.2745843827724457,
-1.0276148319244385,
-0.613155722618103,
-1.3778207302093506,
-0.6836801767349243,
0.0982166975736618,
-0.9643461108207703,
0.7425552010536194,
0.1527046114206314,
-1.1132549047470093,
-0.30822598934173584,
-0.8219208121299744,
0.9763101935386658,
-0.09374858438968658,
0.17896999418735504,
1.901365041732788,
0.4435858130455017,
-0.4461653232574463,
0.6259360909461975,
1.1827033758163452,
0.6141530275344849,
-0.6614935994148254,
0.13519835472106934,
-0.7811949849128723,
0.27395209670066833,
-1.4954760074615479,
0.2579685151576996,
-2.951829433441162,
0.7046179175376892,
-0.008886957541108131,
0.0055682482197880745,
-0.036568690091371536,
-1.2234339714050293,
1.1024507284164429,
2.666782855987549,
-1.155448079109192,
0.4369664192199707,
0.4476296603679657,
1.1429228782653809,
-1.5518981218338013,
0.25271177291870117,
-0.3777981698513031,
2.0780179500579834,
0.20200960338115692,
1.3932958841323853,
-0.4709359407424927,
-2.189314126968384,
0.6325842142105103,
-1.223006010055542,
-1.1443599462509155,
0.7939691543579102,
-0.8371195197105408,
0.19077134132385254,
-1.478417158126831,
-0.24434424936771393,
-0.9369435906410217,
-1.1893010139465332,
0.6082349419593811,
0.1615932434797287,
0.43273255228996277,
-0.6491283774375916,
0.37855106592178345,
-2.1083855628967285,
-1.226942539215088,
-0.13947845995426178,
-0.9963356852531433,
0.4639710783958435,
-0.309012770652771,
0.5942221879959106,
-0.11042366921901703,
-0.01736040785908699,
0.329875648021698,
1.3797138929367065,
3.3792312145233154,
0.1826813668012619,
0.24609942734241486,
-0.05534834787249565,
-1.0610718727111816,
1.4719922542572021,
1.0080395936965942,
-0.1279395967721939,
-0.5495001077651978,
-1.0022896528244019,
1.1328074932098389,
1.9824459552764893,
1.151677131652832,
0.030262429267168045,
-0.8741779923439026,
-0.8365800976753235,
0.035520780831575394,
0.1668655127286911,
0.47125527262687683,
0.8961790204048157,
0.03754375874996185,
0.0378936342895031,
1.4658530950546265,
1.214281678199768,
-0.393588125705719,
0.3346235454082489,
-0.9985794425010681,
-0.5284901857376099,
0.4159552752971649,
0.3113704323768616,
0.059007760137319565,
0.4051574170589447,
-1.163394808769226,
-0.2805456519126892,
-0.33353981375694275,
-0.887577474117279,
-0.6981024742126465,
-0.3935837149620056,
-0.334035724401474,
1.557753562927246,
0.0994115099310875,
-0.43316179513931274,
-0.07243326306343079,
-0.8165184259414673,
-0.1527826339006424,
-1.0259671211242676,
0.38126012682914734,
-0.1448356658220291,
-0.005283480975776911,
-0.14220306277275085,
1.7219737768173218,
-0.886276125907898,
-2.033397674560547,
0.22584033012390137,
0.1492612361907959,
-0.43844491243362427,
0.1813766062259674,
1.6481425762176514,
0.6217355728149414,
1.4070706367492676,
1.2706069946289062,
0.9049795269966125,
-0.5862042307853699,
-1.233941674232483,
0.7079902291297913,
0.9894726276397705,
-1.4306981563568115,
0.7992112040519714,
-0.06123550981283188,
-0.572598934173584,
0.7002091407775879,
1.3634145259857178,
0.4076772928237915,
-2.0731778144836426,
0.7608925104141235,
-0.8409690856933594,
0.6035767197608948,
0.6968780159950256,
0.7371629476547241,
0.18682065606117249,
0.84107905626297,
-1.3441545963287354,
-1.1091324090957642,
-0.7178746461868286,
-0.6743407845497131,
1.8844534158706665,
-0.2889004945755005,
0.5475368499755859,
-0.26895734667778015,
-1.2809861898422241,
-0.14846447110176086,
0.6945244073867798,
0.32546526193618774,
-0.5411180853843689,
0.7900865077972412,
-0.5641686320304871,
-1.1180778741836548,
-1.2943828105926514,
-0.41519924998283386,
-0.9177783727645874,
-0.8475441336631775,
0.9191948175430298,
0.7877797484397888,
0.36346837878227234,
1.9434434175491333,
0.5279341340065002,
0.21036113798618317,
-2.6566760540008545,
0.8913236856460571,
0.33061161637306213,
-0.04825497418642044,
0.9863767623901367,
0.20411838591098785,
1.0324831008911133,
-0.013386184349656105,
0.6577638983726501,
-2.3958518505096436,
2.192169666290283,
-0.14841268956661224,
0.6398574113845825,
-0.026363860815763474,
-0.18924860656261444,
1.1384949684143066,
0.5654063820838928,
0.6203206777572632,
-1.1346559524536133,
0.7802394032478333,
-0.6164820194244385,
1.1994352340698242,
0.9079174995422363,
-0.8063531517982483,
-0.060181375592947006,
1.371837854385376,
0.544922411441803,
-0.4605816602706909,
-0.8845857381820679,
-0.9088454246520996,
0.9918715357780457,
1.76371431350708,
-0.07860906422138214,
0.09041600674390793,
0.8589771389961243,
0.6888945698738098,
-1.3534512519836426,
0.0044201938435435295,
-0.7181174159049988,
-0.6880922913551331,
1.706299066543579,
2.1270337104797363,
-0.08454012125730515,
-0.18984034657478333,
-0.7879022359848022,
-1.2426207065582275,
0.7621070146560669,
-0.05722154304385185,
0.24307580292224884,
0.6511603593826294,
-0.6728739738464355,
1.1812056303024292,
0.7015947103500366,
0.9441707730293274,
0.15227624773979187,
0.39739513397216797,
0.33346763253211975,
-0.28725481033325195,
-1.2039340734481812,
-0.29827776551246643,
-1.0138416290283203,
-2.4333043098449707,
0.491834819316864,
-0.1296153962612152,
-1.444324016571045,
0.020136434584856033,
-1.0601390600204468,
0.8819082379341125,
-0.6417958736419678,
-1.1234995126724243,
-1.4967052936553955,
0.385257363319397,
-0.06502910703420639,
0.9752013683319092,
-1.5416386127471924,
-0.062467820942401886,
1.2893249988555908,
0.8908944129943848,
-0.620908260345459,
1.0597784519195557,
0.23363088071346283,
1.0559464693069458,
0.8353732228279114,
-0.3320833742618561,
0.5195604562759399,
0.18637171387672424,
-1.2981600761413574,
0.39921173453330994,
1.2230775356292725,
0.20820879936218262,
1.5193111896514893,
-0.563390851020813,
0.07156871259212494,
0.4764583110809326,
-0.5480550527572632,
-0.5047683715820312,
-0.49386128783226013,
0.6622198224067688,
0.08493622392416,
-0.9074727892875671,
-0.03955663740634918,
-0.1052650436758995,
-0.2691917419433594,
0.22091221809387207,
-1.4560827016830444,
-0.1843099594116211,
-0.32090768218040466,
-0.6093230843544006,
-1.1725157499313354,
0.07994002848863602,
1.3761029243469238,
-0.825863778591156,
-0.28170013427734375,
0.4286583364009857,
0.3529650568962097,
0.5262194871902466,
0.6986742615699768,
-0.7057237029075623,
-0.3510778248310089,
-0.2984701097011566,
-0.3871901333332062,
0.24873705208301544,
1.3282232284545898,
-0.04431780427694321,
-0.9717516303062439,
0.7115688323974609,
-0.48433446884155273,
0.061428312212228775,
2.0343449115753174,
0.06599827110767365,
-0.7851228713989258,
0.3096010982990265,
-0.6640538573265076,
1.9369025230407715,
1.6587533950805664,
1.3465912342071533,
-0.0792197436094284,
-0.9092183709144592,
0.5618117451667786,
-0.2830219268798828,
-0.38223719596862793,
0.9515734910964966,
0.4195103049278259,
-0.12259239703416824,
-1.4805079698562622,
0.564964771270752,
1.2979034185409546,
-1.0274358987808228,
-0.7084915637969971,
0.16825328767299652,
-0.8612907528877258,
1.046083688735962,
0.7477552890777588,
0.3125300109386444,
0.2471841424703598,
1.5383007526397705,
0.766553521156311,
-0.43107688426971436,
0.5307667851448059,
0.5247946381568909,
-0.1611158847808838,
-2.1042768955230713,
-1.027208685874939,
0.29903891682624817,
-0.4527479112148285,
-1.577484369277954,
1.3743160963058472,
-1.1634773015975952,
-0.9889848828315735,
0.42423215508461,
0.03953491896390915,
1.297196865081787,
0.2934706509113312,
1.663122534751892,
2.067262649536133,
0.9472469091415405,
0.2503719925880432,
1.2877509593963623,
-0.09562789648771286,
-0.4718942940235138,
1.8535441160202026,
-0.4979308247566223,
0.5550888776779175,
1.0810641050338745,
-0.3585629165172577,
-1.0639581680297852,
-0.8422864675521851,
-1.2305713891983032,
-0.6564950346946716,
1.1920503377914429,
0.14514876902103424,
-1.1572057008743286,
0.22370633482933044,
1.5327519178390503,
0.1466459184885025,
-0.315519779920578,
0.6965613961219788,
0.4119628369808197,
-0.7748258709907532,
-0.10809333622455597,
-0.8508318066596985,
0.506923258304596,
-0.14781075716018677,
-0.3681754767894745,
0.24225594103336334,
0.5207393169403076,
1.3200156688690186,
-0.004568258300423622,
0.07960663735866547,
1.1551871299743652,
-1.4098798036575317,
1.5327636003494263,
-0.626491904258728,
0.2714218199253082,
-2.4562041759490967,
1.4139955043792725,
-0.9031988382339478,
1.934999704360962,
-2.651031970977783,
0.4159543514251709,
-0.5134307146072388,
-0.38133588433265686,
0.232465460896492,
-0.418447345495224,
0.21069954335689545,
-0.1302620768547058,
-1.0481981039047241,
-0.13239547610282898,
-0.7054492235183716,
0.628262996673584,
1.182378888130188,
1.3957045078277588,
-1.1886608600616455,
-0.27076202630996704,
-1.6853352785110474,
-0.26429304480552673,
-0.7326825261116028,
0.37688347697257996,
-1.983026385307312,
-0.1330164074897766,
-1.9095096588134766,
-2.440957546234131,
-1.3038939237594604,
-0.8385727405548096,
0.9854114651679993,
0.08317381143569946,
-0.882196307182312,
1.1123228073120117,
-0.4612167775630951,
-1.7942062616348267,
1.1786904335021973,
-2.1705493927001953
] |
https://github.com/huggingface/datasets/issues/5362
|
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
|
Thanks for reporting, @shaoyuta.
We have checked and yes, apparently there is an issue with the server hosting the data of the "enron_emails" subset of "the_pile" dataset: http://eaidata.bmk.sh/data/enron_emails.jsonl.zst
It seems to be down: The connection has timed out.
Please note that at the Hugging Face Hub, we are not hosting their data for this dataset, but only a script that downloads the data from their servers. We are updating the data URL to one in another server.
In the meantime, please note that you can train your model in the entire "the_pile" dataset, by passing the "all" config (instead of the "enron_emails" one).
|
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
| 371 | 103 |
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
Thanks for reporting, @shaoyuta.
We have checked and yes, apparently there is an issue with the server hosting the data of the "enron_emails" subset of "the_pile" dataset: http://eaidata.bmk.sh/data/enron_emails.jsonl.zst
It seems to be down: The connection has timed out.
Please note that at the Hugging Face Hub, we are not hosting their data for this dataset, but only a script that downloads the data from their servers. We are updating the data URL to one in another server.
In the meantime, please note that you can train your model in the entire "the_pile" dataset, by passing the "all" config (instead of the "enron_emails" one).
|
[
-1.1628797054290771,
-0.9015190005302429,
-0.7053149938583374,
1.5262682437896729,
-0.12311656028032303,
-1.2984848022460938,
0.08681809902191162,
-0.9336346983909607,
1.5781147480010986,
-0.6814770102500916,
0.25199368596076965,
-1.686853289604187,
-0.0008656736463308334,
-0.5703164339065552,
-0.7321273684501648,
-0.7549481391906738,
-0.33375585079193115,
-0.7902195453643799,
1.041738748550415,
2.501612424850464,
1.1826140880584717,
-1.404233455657959,
2.7376549243927,
0.6823010444641113,
-0.26201656460762024,
-0.9618692994117737,
0.5018609762191772,
0.023929912596940994,
-1.3292518854141235,
-0.3683635890483856,
-0.9231210947036743,
0.016877856105566025,
-0.5319011211395264,
-0.46589383482933044,
0.02184038609266281,
0.42293721437454224,
-0.24410459399223328,
-0.4322190284729004,
-0.5756706595420837,
-0.7578676342964172,
0.5109626054763794,
-0.29996010661125183,
0.9126386046409607,
-0.32822906970977783,
1.7701579332351685,
-0.6227168440818787,
0.48739296197891235,
0.6834829449653625,
1.2838225364685059,
0.21406300365924835,
0.04375708848237991,
0.29294508695602417,
0.39729952812194824,
0.041041918098926544,
0.5256262421607971,
1.215379238128662,
0.6520538330078125,
0.4703991711139679,
0.6573730111122131,
-2.234097480773926,
1.3126835823059082,
-0.8762745261192322,
0.18239934742450714,
1.364172339439392,
-0.9217128753662109,
0.4378099739551544,
-1.8179965019226074,
-0.03683498129248619,
0.5844414830207825,
-2.2287685871124268,
0.28774356842041016,
-1.2973006963729858,
-0.5790502429008484,
1.0054643154144287,
0.28327053785324097,
-1.199681282043457,
0.11818983405828476,
-0.532185971736908,
1.0397274494171143,
0.45216190814971924,
1.1749167442321777,
-1.5523189306259155,
-0.09794633835554123,
-0.1920868456363678,
0.14577704668045044,
-1.2951830625534058,
-1.6142430305480957,
0.5620314478874207,
0.6709432601928711,
0.6083469390869141,
-0.10308720171451569,
0.8931630849838257,
-1.1161402463912964,
0.8339724540710449,
-0.9586526155471802,
-1.7515387535095215,
-1.4523446559906006,
-2.333573341369629,
-2.260718822479248,
0.76534503698349,
-0.4657832384109497,
-0.4359588623046875,
2.01813006401062,
-1.0749696493148804,
-1.7344722747802734,
1.1431598663330078,
0.24293476343154907,
0.0994802787899971,
2.405371904373169,
0.16813521087169647,
-0.8247266411781311,
0.5718873739242554,
-0.7390506267547607,
0.7100972533226013,
-0.3520672917366028,
1.2412070035934448,
0.47099870443344116,
-0.9782031178474426,
1.545996904373169,
-0.3854055404663086,
0.5552760362625122,
-0.6566612124443054,
-0.5092711448669434,
-0.6736698746681213,
0.23558613657951355,
1.9469404220581055,
-0.3489355444908142,
1.5616719722747803,
-0.21751762926578522,
-1.488002061843872,
-1.4905145168304443,
0.8304097652435303,
0.5625251531600952,
-0.9034080505371094,
0.15562571585178375,
-0.5054001212120056,
0.15894238650798798,
-0.08408821374177933,
1.0427957773208618,
1.3420509099960327,
0.7243173122406006,
-0.33633294701576233,
-0.8920400142669678,
0.1814989447593689,
-0.13079994916915894,
-0.6163399815559387,
-1.7772010564804077,
-0.24533259868621826,
0.22089315950870514,
0.6812055110931396,
-1.2466073036193848,
1.7196624279022217,
0.8665083646774292,
2.0269668102264404,
1.0308520793914795,
-0.41083404421806335,
1.4975677728652954,
0.020109210163354874,
1.8639153242111206,
-0.5037901401519775,
0.6235722899436951,
-0.3766268491744995,
-1.1411218643188477,
0.8178094029426575,
-0.3687663972377777,
-2.0519182682037354,
-0.7134835720062256,
-0.7752066254615784,
-0.1906949132680893,
-0.801496684551239,
0.901032567024231,
-0.25677213072776794,
-1.401053786277771,
0.23418638110160828,
-0.7485321164131165,
0.16486889123916626,
-1.2943158149719238,
0.20240306854248047,
0.7713187336921692,
-0.614417314529419,
0.035531628876924515,
-0.2625981569290161,
-1.2854870557785034,
-0.5312792062759399,
0.4203956127166748,
1.8630107641220093,
-0.6470848917961121,
0.9643673896789551,
1.0702409744262695,
-0.6509023308753967,
0.10367564111948013,
0.3768824338912964,
-0.37358570098876953,
0.8597058057785034,
-1.0991837978363037,
-0.4389166831970215,
1.1562962532043457,
-0.2945540249347687,
-0.6696227788925171,
1.413796067237854,
0.8031486868858337,
-1.0374248027801514,
-0.3579760193824768,
-0.09374524652957916,
-0.8636556267738342,
0.01718934252858162,
-1.5883632898330688,
-0.11486102640628815,
0.28302302956581116,
-1.5474390983581543,
-0.4063892960548401,
-0.22708560526371002,
1.3786606788635254,
-0.19158437848091125,
1.4549322128295898,
-0.31515073776245117,
-0.1293264925479889,
-0.3978731036186218,
-0.48469147086143494,
0.1572502851486206,
-0.24670647084712982,
-0.5285376906394958,
0.22431935369968414,
-0.8888552784919739,
0.27364763617515564,
1.4386941194534302,
0.3387496769428253,
0.030475694686174393,
0.5084362030029297,
1.0523765087127686,
0.43448564410209656,
-0.14194217324256897,
-0.9161639213562012,
-1.614597201347351,
1.9959654808044434,
-1.4708398580551147,
2.027143716812134,
0.817914605140686,
-0.09510612487792969,
-1.832051396369934,
-1.972357988357544,
1.271067500114441,
1.0557191371917725,
2.413970947265625,
0.5277499556541443,
0.42374539375305176,
-0.806252121925354,
-0.7222533822059631,
0.3795614540576935,
-0.975800633430481,
-0.7433889508247375,
0.13696275651454926,
2.407917022705078,
1.7119938135147095,
-0.39578765630722046,
-0.21984222531318665,
-0.9512014389038086,
1.362627625465393,
-0.10520376265048981,
0.2010965347290039,
2.0869715213775635,
-0.214657261967659,
-0.9676884412765503,
1.2919923067092896,
-2.3765816688537598,
0.32016631960868835,
2.022991418838501,
0.24339580535888672,
0.04206429794430733,
-1.35635507106781,
-0.6360798478126526,
-0.24839739501476288,
-0.3942117989063263,
-1.137626051902771,
0.5832948684692383,
-0.22884942591190338,
-0.8859733939170837,
-1.4582349061965942,
0.04680728539824486,
-1.1619170904159546,
-1.7227391004562378,
0.35610172152519226,
1.873713731765747,
2.1235530376434326,
-0.8573071956634521,
1.47428297996521,
-0.23824316263198853,
0.11458591371774673,
1.2360215187072754,
1.259890079498291,
3.135983467102051,
1.9486305713653564,
-1.2969900369644165,
0.7663134336471558,
-0.1766236424446106,
-0.43749740719795227,
1.0990915298461914,
-1.2499842643737793,
1.183841586112976,
-0.22436070442199707,
-1.205251932144165,
-1.1971980333328247,
1.0481550693511963,
0.4649796485900879,
-0.006329352036118507,
-0.5053481459617615,
1.1409612894058228,
0.1639896035194397,
1.3376526832580566,
0.549723207950592,
-0.29507774114608765,
0.5525559782981873,
-0.3976362347602844,
-0.51424640417099,
1.5316619873046875,
0.14393490552902222,
-1.5209300518035889,
-2.31223726272583,
-0.34385746717453003,
-0.8884080648422241,
-0.00861075147986412,
-0.687264084815979,
-1.0044629573822021,
1.5970654487609863,
0.38566210865974426,
-1.2506186962127686,
-0.2747972905635834,
-0.3101940155029297,
-0.5631859302520752,
2.641101598739624,
-1.4176474809646606,
-0.19229401648044586,
-1.0228217840194702,
-0.5724789500236511,
1.6251803636550903,
-1.2289302349090576,
-0.2902812361717224,
-1.0045640468597412,
-0.6514577269554138,
-1.2718956470489502,
-0.4749627113342285,
-0.003590458072721958,
-0.8600800633430481,
0.7725147008895874,
0.11034131050109863,
-1.1513630151748657,
-0.2816564738750458,
-0.8823020458221436,
0.9392259120941162,
-0.11670510470867157,
0.24153119325637817,
1.8876219987869263,
0.3116617202758789,
-0.3387230932712555,
0.6530534625053406,
1.1410531997680664,
0.6124042272567749,
-0.6738386750221252,
0.08967483043670654,
-0.6665933132171631,
0.3837198317050934,
-1.3313709497451782,
0.32079294323921204,
-2.819281578063965,
0.6949260830879211,
-0.07911615073680878,
-0.08799394220113754,
-0.0847502052783966,
-1.3107883930206299,
1.1597249507904053,
2.5829832553863525,
-1.1121790409088135,
0.4877474904060364,
0.39039406180381775,
1.1786645650863647,
-1.5922712087631226,
0.3196406066417694,
-0.4901209771633148,
2.138352394104004,
0.11893092840909958,
1.1984771490097046,
-0.45779210329055786,
-2.2820348739624023,
0.6569072008132935,
-1.1773245334625244,
-1.073927879333496,
0.7926155924797058,
-0.8646888732910156,
0.15044786036014557,
-1.46087646484375,
-0.20391122996807098,
-0.9571800827980042,
-1.263263463973999,
0.5918355584144592,
0.06540236622095108,
0.5022915005683899,
-0.6157426834106445,
0.2973690629005432,
-2.2448537349700928,
-1.4083884954452515,
-0.2633015811443329,
-0.9730574488639832,
0.4740900993347168,
-0.38224950432777405,
0.7072985172271729,
-0.120351642370224,
0.05816519632935524,
0.2537182569503784,
1.3974363803863525,
3.3998970985412598,
0.16365090012550354,
0.25772011280059814,
-0.21608805656433105,
-1.0182963609695435,
1.433963656425476,
0.9375247955322266,
-0.12684880197048187,
-0.6180790066719055,
-0.949350893497467,
1.2502905130386353,
2.070385456085205,
1.0697757005691528,
0.05710021033883095,
-0.895335853099823,
-0.7965064644813538,
0.057555440813302994,
0.19291318953037262,
0.5355076193809509,
1.0011274814605713,
0.023584317415952682,
0.10084615647792816,
1.4390604496002197,
1.1977113485336304,
-0.3622626066207886,
0.3615249693393707,
-0.8827127814292908,
-0.3572196960449219,
0.423431932926178,
0.2875106930732727,
0.029367849230766296,
0.3585061728954315,
-1.113545298576355,
-0.22331789135932922,
-0.3519292175769806,
-0.899650514125824,
-0.7628089189529419,
-0.42595580220222473,
-0.34155914187431335,
1.6039096117019653,
0.11778963357210159,
-0.45646414160728455,
-0.03718451038002968,
-0.7838940024375916,
-0.11901310086250305,
-1.0706485509872437,
0.25328728556632996,
-0.1726595014333725,
0.00888266321271658,
-0.11789993196725845,
1.773719310760498,
-0.9705413579940796,
-2.1364052295684814,
0.21797555685043335,
0.26814305782318115,
-0.32929563522338867,
0.1128356009721756,
1.7208229303359985,
0.536895751953125,
1.3971667289733887,
1.2944555282592773,
0.9626970887184143,
-0.6023443937301636,
-1.271454930305481,
0.655181348323822,
0.9964435696601868,
-1.4048810005187988,
0.8619298338890076,
-0.17601487040519714,
-0.45702534914016724,
0.6497025489807129,
1.3332241773605347,
0.3814544677734375,
-1.992363452911377,
0.8894993662834167,
-1.0040780305862427,
0.7605969905853271,
0.7430937886238098,
0.7315528988838196,
0.13168159127235413,
0.8276594877243042,
-1.2456543445587158,
-1.0343797206878662,
-0.789314329624176,
-0.6505988836288452,
1.8872504234313965,
-0.25720328092575073,
0.4952258765697479,
-0.09279564023017883,
-1.28851318359375,
-0.07188282907009125,
0.7680637836456299,
0.30151546001434326,
-0.42065176367759705,
0.8338920474052429,
-0.6498062610626221,
-1.0608851909637451,
-1.2375662326812744,
-0.45510298013687134,
-0.9004927277565002,
-0.9352095723152161,
1.0371432304382324,
0.7742723226547241,
0.4085143804550171,
1.944495439529419,
0.6497629284858704,
0.2506878674030304,
-2.7085344791412354,
0.8836702108383179,
0.34188172221183777,
-0.05050760880112648,
0.9973463416099548,
0.21649999916553497,
1.060267686843872,
-0.00982960406690836,
0.5316417217254639,
-2.3652846813201904,
2.2420523166656494,
-0.19574232399463654,
0.6938084959983826,
-0.0008928664028644562,
-0.08715175092220306,
1.074700951576233,
0.526421308517456,
0.5747009515762329,
-1.1032428741455078,
0.8180743455886841,
-0.5370450019836426,
1.1313848495483398,
0.8325425386428833,
-0.8478896617889404,
0.08420394361019135,
1.238792061805725,
0.44645920395851135,
-0.5233843326568604,
-0.8896196484565735,
-0.9321449398994446,
0.8874107599258423,
1.795363426208496,
-0.04959764704108238,
0.13131174445152283,
0.9285352230072021,
0.6813225746154785,
-1.2833291292190552,
0.019765358418226242,
-0.7007595300674438,
-0.6357367634773254,
1.7114776372909546,
2.0802931785583496,
-0.0223495252430439,
-0.1715262532234192,
-0.7582123279571533,
-1.349542260169983,
0.7166993021965027,
-0.06060950830578804,
0.11110008507966995,
0.6869173645973206,
-0.7110629081726074,
1.0848361253738403,
0.6540351510047913,
1.1161125898361206,
0.08482599258422852,
0.20945388078689575,
0.3386214077472687,
-0.3393370807170868,
-1.187281608581543,
-0.36556947231292725,
-1.0173161029815674,
-2.4686503410339355,
0.4365720748901367,
-0.19461186230182648,
-1.4502071142196655,
0.04263443127274513,
-1.005355715751648,
0.8452622890472412,
-0.5525084137916565,
-1.1322311162948608,
-1.4138538837432861,
0.25924229621887207,
-0.19824637472629547,
0.9265480637550354,
-1.5310286283493042,
-0.22144918143749237,
1.2065118551254272,
0.9129955768585205,
-0.6588375568389893,
1.002118706703186,
0.2596731185913086,
0.9966344237327576,
0.7962034344673157,
-0.29772838950157166,
0.4630642533302307,
0.22757315635681152,
-1.2996656894683838,
0.4685438275337219,
1.291530966758728,
0.23230768740177155,
1.4167999029159546,
-0.5897125601768494,
0.032454345375299454,
0.39321550726890564,
-0.5618920922279358,
-0.4937412440776825,
-0.5531835556030273,
0.751635730266571,
-0.02030497044324875,
-0.9958150386810303,
-0.026610713452100754,
-0.15791238844394684,
-0.13232819736003876,
0.14316511154174805,
-1.4603551626205444,
-0.17556115984916687,
-0.33555057644844055,
-0.6205644607543945,
-1.2735868692398071,
0.08122578263282776,
1.3450480699539185,
-0.9171909689903259,
-0.15921659767627716,
0.45416751503944397,
0.31743738055229187,
0.5666370987892151,
0.6232231855392456,
-0.6821371912956238,
-0.2882407009601593,
-0.1932799369096756,
-0.33240675926208496,
0.32443517446517944,
1.2717100381851196,
-0.007986107841134071,
-0.982970654964447,
0.7175647020339966,
-0.40884578227996826,
0.09287689626216888,
2.013073205947876,
0.0399591401219368,
-0.7481733560562134,
0.3588629961013794,
-0.7039390802383423,
1.9292759895324707,
1.608297348022461,
1.3273106813430786,
-0.17954134941101074,
-0.9059950113296509,
0.684488832950592,
-0.24528256058692932,
-0.3564242124557495,
0.9433972239494324,
0.43192431330680847,
-0.28409433364868164,
-1.4112772941589355,
0.5906925797462463,
1.2411346435546875,
-0.958160400390625,
-0.7369968891143799,
0.19439657032489777,
-0.8401105999946594,
1.1818549633026123,
0.6343356370925903,
0.3688232898712158,
0.25740811228752136,
1.5880430936813354,
0.703738272190094,
-0.5233737230300903,
0.46657314896583557,
0.5297048687934875,
-0.1686304658651352,
-2.0735483169555664,
-1.0135469436645508,
0.3641769289970398,
-0.39615947008132935,
-1.5283223390579224,
1.3796217441558838,
-1.2214508056640625,
-0.9865170121192932,
0.5168811678886414,
0.12023165076971054,
1.3376452922821045,
0.327759712934494,
1.6664457321166992,
2.0736281871795654,
0.9791207313537598,
0.38554587960243225,
1.2418922185897827,
-0.129619300365448,
-0.4697057008743286,
1.7971264123916626,
-0.5144913196563721,
0.5692633986473083,
1.0696641206741333,
-0.45103925466537476,
-1.1131212711334229,
-0.7838253378868103,
-1.1082032918930054,
-0.6463401913642883,
1.1881352663040161,
0.09955086559057236,
-1.0743104219436646,
0.2601047158241272,
1.6339091062545776,
0.1686740219593048,
-0.2099073976278305,
0.6256461143493652,
0.37409061193466187,
-0.7387682199478149,
-0.12945662438869476,
-0.8814307451248169,
0.5685040354728699,
-0.23942123353481293,
-0.3703756034374237,
0.22155272960662842,
0.4471674859523773,
1.2817987203598022,
-0.06777431815862656,
0.08424925804138184,
1.198481798171997,
-1.473523497581482,
1.5155870914459229,
-0.7024242281913757,
0.26244720816612244,
-2.3965089321136475,
1.3681362867355347,
-0.8394140005111694,
1.961069107055664,
-2.568589448928833,
0.39001595973968506,
-0.5934607982635498,
-0.5098734498023987,
0.19811585545539856,
-0.31158918142318726,
0.051941968500614166,
-0.14599041640758514,
-1.0467543601989746,
-0.1562597155570984,
-0.7834049463272095,
0.6020758748054504,
1.1801639795303345,
1.410239577293396,
-1.060470700263977,
-0.268002986907959,
-1.7301084995269775,
-0.2771022617816925,
-0.7196587324142456,
0.23571480810642242,
-1.9073110818862915,
-0.17787136137485504,
-2.048464059829712,
-2.32751727104187,
-1.4098219871520996,
-0.8871160745620728,
1.0833419561386108,
0.17546676099300385,
-0.9571655988693237,
1.1089788675308228,
-0.3802122473716736,
-1.7849560976028442,
1.2187353372573853,
-2.1286356449127197
] |
https://github.com/huggingface/datasets/issues/5362
|
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
|
We have transferred this issue to the corresponding dataset Community tab: https://huggingface.co/datasets/the_pile/discussions/2
Please, follow the updates there.
|
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
| 371 | 17 |
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
We have transferred this issue to the corresponding dataset Community tab: https://huggingface.co/datasets/the_pile/discussions/2
Please, follow the updates there.
|
[
-1.1628797054290771,
-0.9015190005302429,
-0.7053149938583374,
1.5262682437896729,
-0.12311656028032303,
-1.2984848022460938,
0.08681809902191162,
-0.9336346983909607,
1.5781147480010986,
-0.6814770102500916,
0.25199368596076965,
-1.686853289604187,
-0.0008656736463308334,
-0.5703164339065552,
-0.7321273684501648,
-0.7549481391906738,
-0.33375585079193115,
-0.7902195453643799,
1.041738748550415,
2.501612424850464,
1.1826140880584717,
-1.404233455657959,
2.7376549243927,
0.6823010444641113,
-0.26201656460762024,
-0.9618692994117737,
0.5018609762191772,
0.023929912596940994,
-1.3292518854141235,
-0.3683635890483856,
-0.9231210947036743,
0.016877856105566025,
-0.5319011211395264,
-0.46589383482933044,
0.02184038609266281,
0.42293721437454224,
-0.24410459399223328,
-0.4322190284729004,
-0.5756706595420837,
-0.7578676342964172,
0.5109626054763794,
-0.29996010661125183,
0.9126386046409607,
-0.32822906970977783,
1.7701579332351685,
-0.6227168440818787,
0.48739296197891235,
0.6834829449653625,
1.2838225364685059,
0.21406300365924835,
0.04375708848237991,
0.29294508695602417,
0.39729952812194824,
0.041041918098926544,
0.5256262421607971,
1.215379238128662,
0.6520538330078125,
0.4703991711139679,
0.6573730111122131,
-2.234097480773926,
1.3126835823059082,
-0.8762745261192322,
0.18239934742450714,
1.364172339439392,
-0.9217128753662109,
0.4378099739551544,
-1.8179965019226074,
-0.03683498129248619,
0.5844414830207825,
-2.2287685871124268,
0.28774356842041016,
-1.2973006963729858,
-0.5790502429008484,
1.0054643154144287,
0.28327053785324097,
-1.199681282043457,
0.11818983405828476,
-0.532185971736908,
1.0397274494171143,
0.45216190814971924,
1.1749167442321777,
-1.5523189306259155,
-0.09794633835554123,
-0.1920868456363678,
0.14577704668045044,
-1.2951830625534058,
-1.6142430305480957,
0.5620314478874207,
0.6709432601928711,
0.6083469390869141,
-0.10308720171451569,
0.8931630849838257,
-1.1161402463912964,
0.8339724540710449,
-0.9586526155471802,
-1.7515387535095215,
-1.4523446559906006,
-2.333573341369629,
-2.260718822479248,
0.76534503698349,
-0.4657832384109497,
-0.4359588623046875,
2.01813006401062,
-1.0749696493148804,
-1.7344722747802734,
1.1431598663330078,
0.24293476343154907,
0.0994802787899971,
2.405371904373169,
0.16813521087169647,
-0.8247266411781311,
0.5718873739242554,
-0.7390506267547607,
0.7100972533226013,
-0.3520672917366028,
1.2412070035934448,
0.47099870443344116,
-0.9782031178474426,
1.545996904373169,
-0.3854055404663086,
0.5552760362625122,
-0.6566612124443054,
-0.5092711448669434,
-0.6736698746681213,
0.23558613657951355,
1.9469404220581055,
-0.3489355444908142,
1.5616719722747803,
-0.21751762926578522,
-1.488002061843872,
-1.4905145168304443,
0.8304097652435303,
0.5625251531600952,
-0.9034080505371094,
0.15562571585178375,
-0.5054001212120056,
0.15894238650798798,
-0.08408821374177933,
1.0427957773208618,
1.3420509099960327,
0.7243173122406006,
-0.33633294701576233,
-0.8920400142669678,
0.1814989447593689,
-0.13079994916915894,
-0.6163399815559387,
-1.7772010564804077,
-0.24533259868621826,
0.22089315950870514,
0.6812055110931396,
-1.2466073036193848,
1.7196624279022217,
0.8665083646774292,
2.0269668102264404,
1.0308520793914795,
-0.41083404421806335,
1.4975677728652954,
0.020109210163354874,
1.8639153242111206,
-0.5037901401519775,
0.6235722899436951,
-0.3766268491744995,
-1.1411218643188477,
0.8178094029426575,
-0.3687663972377777,
-2.0519182682037354,
-0.7134835720062256,
-0.7752066254615784,
-0.1906949132680893,
-0.801496684551239,
0.901032567024231,
-0.25677213072776794,
-1.401053786277771,
0.23418638110160828,
-0.7485321164131165,
0.16486889123916626,
-1.2943158149719238,
0.20240306854248047,
0.7713187336921692,
-0.614417314529419,
0.035531628876924515,
-0.2625981569290161,
-1.2854870557785034,
-0.5312792062759399,
0.4203956127166748,
1.8630107641220093,
-0.6470848917961121,
0.9643673896789551,
1.0702409744262695,
-0.6509023308753967,
0.10367564111948013,
0.3768824338912964,
-0.37358570098876953,
0.8597058057785034,
-1.0991837978363037,
-0.4389166831970215,
1.1562962532043457,
-0.2945540249347687,
-0.6696227788925171,
1.413796067237854,
0.8031486868858337,
-1.0374248027801514,
-0.3579760193824768,
-0.09374524652957916,
-0.8636556267738342,
0.01718934252858162,
-1.5883632898330688,
-0.11486102640628815,
0.28302302956581116,
-1.5474390983581543,
-0.4063892960548401,
-0.22708560526371002,
1.3786606788635254,
-0.19158437848091125,
1.4549322128295898,
-0.31515073776245117,
-0.1293264925479889,
-0.3978731036186218,
-0.48469147086143494,
0.1572502851486206,
-0.24670647084712982,
-0.5285376906394958,
0.22431935369968414,
-0.8888552784919739,
0.27364763617515564,
1.4386941194534302,
0.3387496769428253,
0.030475694686174393,
0.5084362030029297,
1.0523765087127686,
0.43448564410209656,
-0.14194217324256897,
-0.9161639213562012,
-1.614597201347351,
1.9959654808044434,
-1.4708398580551147,
2.027143716812134,
0.817914605140686,
-0.09510612487792969,
-1.832051396369934,
-1.972357988357544,
1.271067500114441,
1.0557191371917725,
2.413970947265625,
0.5277499556541443,
0.42374539375305176,
-0.806252121925354,
-0.7222533822059631,
0.3795614540576935,
-0.975800633430481,
-0.7433889508247375,
0.13696275651454926,
2.407917022705078,
1.7119938135147095,
-0.39578765630722046,
-0.21984222531318665,
-0.9512014389038086,
1.362627625465393,
-0.10520376265048981,
0.2010965347290039,
2.0869715213775635,
-0.214657261967659,
-0.9676884412765503,
1.2919923067092896,
-2.3765816688537598,
0.32016631960868835,
2.022991418838501,
0.24339580535888672,
0.04206429794430733,
-1.35635507106781,
-0.6360798478126526,
-0.24839739501476288,
-0.3942117989063263,
-1.137626051902771,
0.5832948684692383,
-0.22884942591190338,
-0.8859733939170837,
-1.4582349061965942,
0.04680728539824486,
-1.1619170904159546,
-1.7227391004562378,
0.35610172152519226,
1.873713731765747,
2.1235530376434326,
-0.8573071956634521,
1.47428297996521,
-0.23824316263198853,
0.11458591371774673,
1.2360215187072754,
1.259890079498291,
3.135983467102051,
1.9486305713653564,
-1.2969900369644165,
0.7663134336471558,
-0.1766236424446106,
-0.43749740719795227,
1.0990915298461914,
-1.2499842643737793,
1.183841586112976,
-0.22436070442199707,
-1.205251932144165,
-1.1971980333328247,
1.0481550693511963,
0.4649796485900879,
-0.006329352036118507,
-0.5053481459617615,
1.1409612894058228,
0.1639896035194397,
1.3376526832580566,
0.549723207950592,
-0.29507774114608765,
0.5525559782981873,
-0.3976362347602844,
-0.51424640417099,
1.5316619873046875,
0.14393490552902222,
-1.5209300518035889,
-2.31223726272583,
-0.34385746717453003,
-0.8884080648422241,
-0.00861075147986412,
-0.687264084815979,
-1.0044629573822021,
1.5970654487609863,
0.38566210865974426,
-1.2506186962127686,
-0.2747972905635834,
-0.3101940155029297,
-0.5631859302520752,
2.641101598739624,
-1.4176474809646606,
-0.19229401648044586,
-1.0228217840194702,
-0.5724789500236511,
1.6251803636550903,
-1.2289302349090576,
-0.2902812361717224,
-1.0045640468597412,
-0.6514577269554138,
-1.2718956470489502,
-0.4749627113342285,
-0.003590458072721958,
-0.8600800633430481,
0.7725147008895874,
0.11034131050109863,
-1.1513630151748657,
-0.2816564738750458,
-0.8823020458221436,
0.9392259120941162,
-0.11670510470867157,
0.24153119325637817,
1.8876219987869263,
0.3116617202758789,
-0.3387230932712555,
0.6530534625053406,
1.1410531997680664,
0.6124042272567749,
-0.6738386750221252,
0.08967483043670654,
-0.6665933132171631,
0.3837198317050934,
-1.3313709497451782,
0.32079294323921204,
-2.819281578063965,
0.6949260830879211,
-0.07911615073680878,
-0.08799394220113754,
-0.0847502052783966,
-1.3107883930206299,
1.1597249507904053,
2.5829832553863525,
-1.1121790409088135,
0.4877474904060364,
0.39039406180381775,
1.1786645650863647,
-1.5922712087631226,
0.3196406066417694,
-0.4901209771633148,
2.138352394104004,
0.11893092840909958,
1.1984771490097046,
-0.45779210329055786,
-2.2820348739624023,
0.6569072008132935,
-1.1773245334625244,
-1.073927879333496,
0.7926155924797058,
-0.8646888732910156,
0.15044786036014557,
-1.46087646484375,
-0.20391122996807098,
-0.9571800827980042,
-1.263263463973999,
0.5918355584144592,
0.06540236622095108,
0.5022915005683899,
-0.6157426834106445,
0.2973690629005432,
-2.2448537349700928,
-1.4083884954452515,
-0.2633015811443329,
-0.9730574488639832,
0.4740900993347168,
-0.38224950432777405,
0.7072985172271729,
-0.120351642370224,
0.05816519632935524,
0.2537182569503784,
1.3974363803863525,
3.3998970985412598,
0.16365090012550354,
0.25772011280059814,
-0.21608805656433105,
-1.0182963609695435,
1.433963656425476,
0.9375247955322266,
-0.12684880197048187,
-0.6180790066719055,
-0.949350893497467,
1.2502905130386353,
2.070385456085205,
1.0697757005691528,
0.05710021033883095,
-0.895335853099823,
-0.7965064644813538,
0.057555440813302994,
0.19291318953037262,
0.5355076193809509,
1.0011274814605713,
0.023584317415952682,
0.10084615647792816,
1.4390604496002197,
1.1977113485336304,
-0.3622626066207886,
0.3615249693393707,
-0.8827127814292908,
-0.3572196960449219,
0.423431932926178,
0.2875106930732727,
0.029367849230766296,
0.3585061728954315,
-1.113545298576355,
-0.22331789135932922,
-0.3519292175769806,
-0.899650514125824,
-0.7628089189529419,
-0.42595580220222473,
-0.34155914187431335,
1.6039096117019653,
0.11778963357210159,
-0.45646414160728455,
-0.03718451038002968,
-0.7838940024375916,
-0.11901310086250305,
-1.0706485509872437,
0.25328728556632996,
-0.1726595014333725,
0.00888266321271658,
-0.11789993196725845,
1.773719310760498,
-0.9705413579940796,
-2.1364052295684814,
0.21797555685043335,
0.26814305782318115,
-0.32929563522338867,
0.1128356009721756,
1.7208229303359985,
0.536895751953125,
1.3971667289733887,
1.2944555282592773,
0.9626970887184143,
-0.6023443937301636,
-1.271454930305481,
0.655181348323822,
0.9964435696601868,
-1.4048810005187988,
0.8619298338890076,
-0.17601487040519714,
-0.45702534914016724,
0.6497025489807129,
1.3332241773605347,
0.3814544677734375,
-1.992363452911377,
0.8894993662834167,
-1.0040780305862427,
0.7605969905853271,
0.7430937886238098,
0.7315528988838196,
0.13168159127235413,
0.8276594877243042,
-1.2456543445587158,
-1.0343797206878662,
-0.789314329624176,
-0.6505988836288452,
1.8872504234313965,
-0.25720328092575073,
0.4952258765697479,
-0.09279564023017883,
-1.28851318359375,
-0.07188282907009125,
0.7680637836456299,
0.30151546001434326,
-0.42065176367759705,
0.8338920474052429,
-0.6498062610626221,
-1.0608851909637451,
-1.2375662326812744,
-0.45510298013687134,
-0.9004927277565002,
-0.9352095723152161,
1.0371432304382324,
0.7742723226547241,
0.4085143804550171,
1.944495439529419,
0.6497629284858704,
0.2506878674030304,
-2.7085344791412354,
0.8836702108383179,
0.34188172221183777,
-0.05050760880112648,
0.9973463416099548,
0.21649999916553497,
1.060267686843872,
-0.00982960406690836,
0.5316417217254639,
-2.3652846813201904,
2.2420523166656494,
-0.19574232399463654,
0.6938084959983826,
-0.0008928664028644562,
-0.08715175092220306,
1.074700951576233,
0.526421308517456,
0.5747009515762329,
-1.1032428741455078,
0.8180743455886841,
-0.5370450019836426,
1.1313848495483398,
0.8325425386428833,
-0.8478896617889404,
0.08420394361019135,
1.238792061805725,
0.44645920395851135,
-0.5233843326568604,
-0.8896196484565735,
-0.9321449398994446,
0.8874107599258423,
1.795363426208496,
-0.04959764704108238,
0.13131174445152283,
0.9285352230072021,
0.6813225746154785,
-1.2833291292190552,
0.019765358418226242,
-0.7007595300674438,
-0.6357367634773254,
1.7114776372909546,
2.0802931785583496,
-0.0223495252430439,
-0.1715262532234192,
-0.7582123279571533,
-1.349542260169983,
0.7166993021965027,
-0.06060950830578804,
0.11110008507966995,
0.6869173645973206,
-0.7110629081726074,
1.0848361253738403,
0.6540351510047913,
1.1161125898361206,
0.08482599258422852,
0.20945388078689575,
0.3386214077472687,
-0.3393370807170868,
-1.187281608581543,
-0.36556947231292725,
-1.0173161029815674,
-2.4686503410339355,
0.4365720748901367,
-0.19461186230182648,
-1.4502071142196655,
0.04263443127274513,
-1.005355715751648,
0.8452622890472412,
-0.5525084137916565,
-1.1322311162948608,
-1.4138538837432861,
0.25924229621887207,
-0.19824637472629547,
0.9265480637550354,
-1.5310286283493042,
-0.22144918143749237,
1.2065118551254272,
0.9129955768585205,
-0.6588375568389893,
1.002118706703186,
0.2596731185913086,
0.9966344237327576,
0.7962034344673157,
-0.29772838950157166,
0.4630642533302307,
0.22757315635681152,
-1.2996656894683838,
0.4685438275337219,
1.291530966758728,
0.23230768740177155,
1.4167999029159546,
-0.5897125601768494,
0.032454345375299454,
0.39321550726890564,
-0.5618920922279358,
-0.4937412440776825,
-0.5531835556030273,
0.751635730266571,
-0.02030497044324875,
-0.9958150386810303,
-0.026610713452100754,
-0.15791238844394684,
-0.13232819736003876,
0.14316511154174805,
-1.4603551626205444,
-0.17556115984916687,
-0.33555057644844055,
-0.6205644607543945,
-1.2735868692398071,
0.08122578263282776,
1.3450480699539185,
-0.9171909689903259,
-0.15921659767627716,
0.45416751503944397,
0.31743738055229187,
0.5666370987892151,
0.6232231855392456,
-0.6821371912956238,
-0.2882407009601593,
-0.1932799369096756,
-0.33240675926208496,
0.32443517446517944,
1.2717100381851196,
-0.007986107841134071,
-0.982970654964447,
0.7175647020339966,
-0.40884578227996826,
0.09287689626216888,
2.013073205947876,
0.0399591401219368,
-0.7481733560562134,
0.3588629961013794,
-0.7039390802383423,
1.9292759895324707,
1.608297348022461,
1.3273106813430786,
-0.17954134941101074,
-0.9059950113296509,
0.684488832950592,
-0.24528256058692932,
-0.3564242124557495,
0.9433972239494324,
0.43192431330680847,
-0.28409433364868164,
-1.4112772941589355,
0.5906925797462463,
1.2411346435546875,
-0.958160400390625,
-0.7369968891143799,
0.19439657032489777,
-0.8401105999946594,
1.1818549633026123,
0.6343356370925903,
0.3688232898712158,
0.25740811228752136,
1.5880430936813354,
0.703738272190094,
-0.5233737230300903,
0.46657314896583557,
0.5297048687934875,
-0.1686304658651352,
-2.0735483169555664,
-1.0135469436645508,
0.3641769289970398,
-0.39615947008132935,
-1.5283223390579224,
1.3796217441558838,
-1.2214508056640625,
-0.9865170121192932,
0.5168811678886414,
0.12023165076971054,
1.3376452922821045,
0.327759712934494,
1.6664457321166992,
2.0736281871795654,
0.9791207313537598,
0.38554587960243225,
1.2418922185897827,
-0.129619300365448,
-0.4697057008743286,
1.7971264123916626,
-0.5144913196563721,
0.5692633986473083,
1.0696641206741333,
-0.45103925466537476,
-1.1131212711334229,
-0.7838253378868103,
-1.1082032918930054,
-0.6463401913642883,
1.1881352663040161,
0.09955086559057236,
-1.0743104219436646,
0.2601047158241272,
1.6339091062545776,
0.1686740219593048,
-0.2099073976278305,
0.6256461143493652,
0.37409061193466187,
-0.7387682199478149,
-0.12945662438869476,
-0.8814307451248169,
0.5685040354728699,
-0.23942123353481293,
-0.3703756034374237,
0.22155272960662842,
0.4471674859523773,
1.2817987203598022,
-0.06777431815862656,
0.08424925804138184,
1.198481798171997,
-1.473523497581482,
1.5155870914459229,
-0.7024242281913757,
0.26244720816612244,
-2.3965089321136475,
1.3681362867355347,
-0.8394140005111694,
1.961069107055664,
-2.568589448928833,
0.39001595973968506,
-0.5934607982635498,
-0.5098734498023987,
0.19811585545539856,
-0.31158918142318726,
0.051941968500614166,
-0.14599041640758514,
-1.0467543601989746,
-0.1562597155570984,
-0.7834049463272095,
0.6020758748054504,
1.1801639795303345,
1.410239577293396,
-1.060470700263977,
-0.268002986907959,
-1.7301084995269775,
-0.2771022617816925,
-0.7196587324142456,
0.23571480810642242,
-1.9073110818862915,
-0.17787136137485504,
-2.048464059829712,
-2.32751727104187,
-1.4098219871520996,
-0.8871160745620728,
1.0833419561386108,
0.17546676099300385,
-0.9571655988693237,
1.1089788675308228,
-0.3802122473716736,
-1.7849560976028442,
1.2187353372573853,
-2.1286356449127197
] |
https://github.com/huggingface/datasets/issues/5361
|
How concatenate `Audio` elements using batch mapping
|
You can try something like this ?
```python
def mapper_function(batch):
return {"concatenated_audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset = dataset.map(
mapper_function,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
```
|
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
| 372 | 26 |
How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
You can try something like this ?
```python
def mapper_function(batch):
return {"concatenated_audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset = dataset.map(
mapper_function,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
```
|
[
-1.2300209999084473,
-0.908704400062561,
-0.7244388461112976,
1.4816561937332153,
-0.11995435506105423,
-1.188879132270813,
0.15715862810611725,
-1.067185878753662,
1.6922037601470947,
-0.8047590255737305,
0.3042461574077606,
-1.6780784130096436,
0.03688329458236694,
-0.6428915858268738,
-0.7587071061134338,
-0.821746289730072,
-0.4274666905403137,
-0.6560027599334717,
1.0863090753555298,
2.497169017791748,
1.150349497795105,
-1.3867145776748657,
2.7720541954040527,
0.7325525283813477,
-0.1729409545660019,
-0.9831796884536743,
0.530034065246582,
-0.01020905002951622,
-1.355449914932251,
-0.36293545365333557,
-0.9279618859291077,
-0.0848267674446106,
-0.5527481436729431,
-0.5585329532623291,
-0.058420561254024506,
0.43812984228134155,
-0.2850835919380188,
-0.5300161242485046,
-0.5360063314437866,
-0.8082888722419739,
0.4443761706352234,
-0.3238341808319092,
0.9507704973220825,
-0.28797438740730286,
1.7837618589401245,
-0.5569618940353394,
0.5007991194725037,
0.7162238359451294,
1.3146018981933594,
0.17763268947601318,
0.01080858614295721,
0.4368976950645447,
0.4797595143318176,
-0.03594758361577988,
0.5090746283531189,
1.138454556465149,
0.7160702347755432,
0.4672352969646454,
0.7765084505081177,
-2.200113296508789,
1.19625723361969,
-0.9823381900787354,
0.36627471446990967,
1.3549883365631104,
-0.9802254438400269,
0.33765313029289246,
-1.713728427886963,
-0.036884669214487076,
0.5662410855293274,
-2.1043190956115723,
0.28392282128334045,
-1.3229522705078125,
-0.4735049307346344,
1.0711420774459839,
0.417327880859375,
-1.2529067993164062,
0.06696344166994095,
-0.45535826683044434,
1.035630226135254,
0.3612653315067291,
1.1063568592071533,
-1.6972750425338745,
-0.018720990046858788,
-0.3746313154697418,
0.055441975593566895,
-1.189845085144043,
-1.5257359743118286,
0.5031352043151855,
0.6462371945381165,
0.541018009185791,
-0.13101157546043396,
0.9256695508956909,
-1.0347185134887695,
0.6665338277816772,
-0.9853640794754028,
-1.860213279724121,
-1.458532452583313,
-2.253673553466797,
-2.2434003353118896,
0.7234865427017212,
-0.4208064675331116,
-0.4459992051124573,
1.9968105554580688,
-0.9937189221382141,
-1.725783109664917,
1.2306901216506958,
0.27596333622932434,
-0.053472988307476044,
2.293531656265259,
0.2551419138908386,
-0.6852499842643738,
0.5460556149482727,
-0.7775822877883911,
0.7064852118492126,
-0.43557003140449524,
1.337841510772705,
0.3390011787414551,
-1.0398679971694946,
1.6150826215744019,
-0.377048522233963,
0.6026158332824707,
-0.6754041910171509,
-0.4299076795578003,
-0.7726540565490723,
0.3270701766014099,
1.9247143268585205,
-0.29955753684043884,
1.4873312711715698,
-0.34911656379699707,
-1.562313199043274,
-1.5446901321411133,
0.8646522760391235,
0.49691614508628845,
-0.6469030380249023,
0.15584920346736908,
-0.37837886810302734,
0.13096296787261963,
-0.08498150110244751,
1.1871882677078247,
1.3037041425704956,
0.7059040069580078,
-0.3234577178955078,
-0.9074497818946838,
0.21545594930648804,
-0.047116927802562714,
-0.7528395652770996,
-1.7261639833450317,
-0.2907184064388275,
0.10893288254737854,
0.6316888332366943,
-1.2301667928695679,
1.7400391101837158,
0.8638092279434204,
1.8958929777145386,
1.0719239711761475,
-0.3487095534801483,
1.4887441396713257,
0.1542690098285675,
1.8785488605499268,
-0.4275687336921692,
0.701714277267456,
-0.36175301671028137,
-1.1699185371398926,
0.8243169784545898,
-0.32419338822364807,
-2.1019699573516846,
-0.6997284889221191,
-0.8111013770103455,
-0.09978312253952026,
-0.8254175782203674,
0.9585269689559937,
-0.2980550527572632,
-1.4561384916305542,
0.2789815366268158,
-0.8417977690696716,
0.15758152306079865,
-1.2385587692260742,
0.24366945028305054,
0.6842399835586548,
-0.5874574780464172,
0.1493532955646515,
-0.2455831915140152,
-1.2968361377716064,
-0.3919697403907776,
0.34320664405822754,
1.795750379562378,
-0.8195769786834717,
0.92132568359375,
1.05703866481781,
-0.6220082640647888,
-0.06951548159122467,
0.32871386408805847,
-0.33993640542030334,
0.9675496816635132,
-1.0933281183242798,
-0.4489472508430481,
1.251602292060852,
-0.20494957268238068,
-0.5496191382408142,
1.5102903842926025,
0.6974145174026489,
-0.9583684802055359,
-0.23631344735622406,
-0.15009111166000366,
-0.914232075214386,
0.036902785301208496,
-1.6656336784362793,
-0.14206098020076752,
0.4434301257133484,
-1.5910465717315674,
-0.5224239230155945,
-0.18562442064285278,
1.2443698644638062,
-0.11161448061466217,
1.4351595640182495,
-0.3677673935890198,
-0.13471287488937378,
-0.4394136071205139,
-0.40039074420928955,
0.13029974699020386,
-0.21907585859298706,
-0.6245996356010437,
0.23299649357795715,
-0.7630606293678284,
0.438855916261673,
1.3970712423324585,
0.3001488745212555,
0.05638262629508972,
0.5658258199691772,
1.0307540893554688,
0.4065169095993042,
-0.1148018091917038,
-0.8527714014053345,
-1.591616153717041,
2.031949758529663,
-1.4180794954299927,
1.9660942554473877,
0.7477507591247559,
-0.031331826001405716,
-1.7955271005630493,
-1.901076078414917,
1.4174916744232178,
1.1182647943496704,
2.3164656162261963,
0.6184816360473633,
0.4878115952014923,
-0.8110184073448181,
-0.6636946201324463,
0.20617131888866425,
-0.9967257380485535,
-0.762473464012146,
0.19457922875881195,
2.466294527053833,
1.74430513381958,
-0.43277886509895325,
-0.15618965029716492,
-1.0785391330718994,
1.3944306373596191,
-0.16289545595645905,
0.20908868312835693,
1.9347424507141113,
-0.2555980086326599,
-1.0543345212936401,
1.290612816810608,
-2.355678081512451,
0.1830277442932129,
1.9796793460845947,
0.21692237257957458,
0.1315179020166397,
-1.3841753005981445,
-0.6369108557701111,
-0.29229575395584106,
-0.35426807403564453,
-1.23154878616333,
0.6083948612213135,
-0.13517197966575623,
-0.738523542881012,
-1.368424892425537,
0.20258402824401855,
-1.0613611936569214,
-1.695261001586914,
0.14329051971435547,
1.8788087368011475,
2.0469095706939697,
-0.8622706532478333,
1.5768111944198608,
-0.26621213555336,
0.30244123935699463,
1.2680065631866455,
1.216674566268921,
3.0882911682128906,
1.9397668838500977,
-1.364363193511963,
0.6695355772972107,
-0.12061846256256104,
-0.4795166850090027,
1.1691864728927612,
-1.1974477767944336,
1.3010298013687134,
-0.08482610434293747,
-1.2073290348052979,
-1.215182900428772,
0.9213995933532715,
0.5436738729476929,
0.014982852153480053,
-0.4801855981349945,
1.1717332601547241,
0.0169050432741642,
1.3276666402816772,
0.5889531373977661,
-0.30538851022720337,
0.6464459300041199,
-0.3173820674419403,
-0.3803793489933014,
1.5222887992858887,
0.1417478621006012,
-1.4230867624282837,
-2.2917165756225586,
-0.1953471451997757,
-0.8804339170455933,
-0.018460463732481003,
-0.6568508744239807,
-0.9677495956420898,
1.585263729095459,
0.41508015990257263,
-1.2067046165466309,
-0.2997891902923584,
-0.32684922218322754,
-0.5833468437194824,
2.717822313308716,
-1.3955391645431519,
-0.32740524411201477,
-1.0309481620788574,
-0.6437559723854065,
1.6388658285140991,
-1.211390733718872,
-0.22569143772125244,
-1.0013272762298584,
-0.5911667943000793,
-1.2439359426498413,
-0.5655305981636047,
0.020247511565685272,
-0.9473512768745422,
0.8773483633995056,
0.15127384662628174,
-1.2241792678833008,
-0.2959150969982147,
-0.9191315770149231,
0.8844727873802185,
-0.15089011192321777,
0.20175781846046448,
1.850844383239746,
0.42449039220809937,
-0.32934606075286865,
0.7651692032814026,
1.2125332355499268,
0.656380295753479,
-0.6232913732528687,
0.2359132468700409,
-0.666655421257019,
0.29521265625953674,
-1.3201104402542114,
0.2734489142894745,
-2.8257505893707275,
0.6293221712112427,
-0.031146761029958725,
-0.09189298748970032,
-0.015037233009934425,
-1.3070265054702759,
1.09163498878479,
2.5435612201690674,
-1.209010362625122,
0.49469706416130066,
0.3000809848308563,
1.2429232597351074,
-1.5686516761779785,
0.2976827025413513,
-0.4596767723560333,
2.0995938777923584,
0.21343180537223816,
1.1863296031951904,
-0.40161997079849243,
-2.2935736179351807,
0.5837131142616272,
-1.300102949142456,
-1.1370116472244263,
0.7069237232208252,
-0.8055317997932434,
0.13563919067382812,
-1.387075662612915,
-0.25269755721092224,
-0.8092322945594788,
-1.1727455854415894,
0.5787011981010437,
0.12573175132274628,
0.4144112467765808,
-0.6221039295196533,
0.30666300654411316,
-2.226656913757324,
-1.3360891342163086,
-0.20391635596752167,
-0.9513936638832092,
0.4462404251098633,
-0.36010587215423584,
0.7981658577919006,
-0.19838327169418335,
-0.07254914939403534,
0.3251853287220001,
1.3856701850891113,
3.4560070037841797,
0.22504118084907532,
0.37941452860832214,
-0.1865902841091156,
-0.9402793049812317,
1.4528656005859375,
0.9339198470115662,
-0.16569168865680695,
-0.5793105363845825,
-1.0889939069747925,
1.3038265705108643,
1.9247760772705078,
0.9630258083343506,
0.08490036427974701,
-0.789735734462738,
-0.7809188365936279,
-0.027877628803253174,
0.14331087470054626,
0.3997916281223297,
0.8628155589103699,
0.12271854281425476,
0.0526362806558609,
1.4714094400405884,
1.097128987312317,
-0.3966967463493347,
0.3573044538497925,
-0.8125638365745544,
-0.464769184589386,
0.5230974555015564,
0.3620019555091858,
0.031580183655023575,
0.2706504464149475,
-1.0922707319259644,
-0.24993745982646942,
-0.3753397464752197,
-0.9110115766525269,
-0.7932422757148743,
-0.3521997630596161,
-0.35282155871391296,
1.6265519857406616,
0.07861198484897614,
-0.5803444981575012,
-0.11860775947570801,
-0.7567739486694336,
-0.10419070720672607,
-1.0081621408462524,
0.3181937038898468,
-0.1543755680322647,
-0.07277041673660278,
-0.10089363902807236,
1.7643718719482422,
-0.9348357319831848,
-2.1231863498687744,
0.15111325681209564,
0.20866696536540985,
-0.3084792494773865,
0.1927877962589264,
1.6633079051971436,
0.6019493341445923,
1.4106594324111938,
1.3994982242584229,
0.9632697105407715,
-0.675875186920166,
-1.33175790309906,
0.7344241738319397,
0.9964694380760193,
-1.4118752479553223,
0.6634509563446045,
0.0227726511657238,
-0.582362174987793,
0.6452410817146301,
1.2771432399749756,
0.5040911436080933,
-2.0126564502716064,
0.7259693145751953,
-0.9401133060455322,
0.8021973967552185,
0.7745679616928101,
0.6815120577812195,
0.21146419644355774,
0.7301740646362305,
-1.3120657205581665,
-1.0954715013504028,
-0.7626562714576721,
-0.7241837382316589,
1.9853582382202148,
-0.3175709545612335,
0.559680700302124,
-0.2332514375448227,
-1.3836866617202759,
-0.033984676003456116,
0.6679453253746033,
0.2960679233074188,
-0.5536554455757141,
0.6879181861877441,
-0.6290379762649536,
-1.1201118230819702,
-1.36894690990448,
-0.4682552218437195,
-1.0701056718826294,
-0.9510924816131592,
1.0087130069732666,
0.8159359097480774,
0.35875269770622253,
1.8023457527160645,
0.7089443802833557,
0.21102771162986755,
-2.6164979934692383,
0.892368733882904,
0.30631840229034424,
-0.08311211317777634,
0.7626930475234985,
0.3679099678993225,
1.0130668878555298,
-0.004495436791330576,
0.6302125453948975,
-2.4551854133605957,
2.323753595352173,
-0.2727632224559784,
0.6529672741889954,
-0.03393908962607384,
-0.07097245007753372,
1.1525079011917114,
0.6095457673072815,
0.5929677486419678,
-1.049009919166565,
0.6347496509552002,
-0.5761653184890747,
1.2939417362213135,
0.8527424335479736,
-0.8698133230209351,
-0.08464450389146805,
1.3773918151855469,
0.47974899411201477,
-0.5571408271789551,
-0.9320005178451538,
-0.9488459229469299,
1.0061002969741821,
1.711437463760376,
-0.09434206783771515,
-0.0077509270049631596,
0.8463833332061768,
0.6110619902610779,
-1.3331786394119263,
0.0017968276515603065,
-0.7084399461746216,
-0.6381950378417969,
1.667794108390808,
2.0755677223205566,
-0.19996853172779083,
-0.1970808506011963,
-0.6922045946121216,
-1.3461723327636719,
0.8075534105300903,
-0.03759389743208885,
0.08633586764335632,
0.7303474545478821,
-0.6501858234405518,
1.0284333229064941,
0.8790347576141357,
0.8883776664733887,
0.24118414521217346,
0.15538273751735687,
0.29573842883110046,
-0.29760438203811646,
-1.1614333391189575,
-0.2930477261543274,
-1.0478451251983643,
-2.4501230716705322,
0.4195294678211212,
-0.16680701076984406,
-1.3678537607192993,
0.02229614183306694,
-1.0116186141967773,
0.9760393500328064,
-0.5584995746612549,
-1.0700114965438843,
-1.5232726335525513,
0.2682667374610901,
-0.02208612486720085,
0.8898815512657166,
-1.6001633405685425,
-0.12864376604557037,
1.2030186653137207,
0.9368374943733215,
-0.6896964311599731,
1.059490442276001,
0.22790199518203735,
0.9787641763687134,
0.8981221318244934,
-0.35473743081092834,
0.4975750148296356,
-0.008407874032855034,
-1.29803466796875,
0.5395607352256775,
1.1638896465301514,
0.17017187178134918,
1.5131129026412964,
-0.5664330720901489,
0.009859648533165455,
0.36980921030044556,
-0.448031485080719,
-0.4202231168746948,
-0.5701781511306763,
0.570388674736023,
0.08513014763593674,
-0.8898717164993286,
-0.06925086677074432,
0.02109360322356224,
-0.22380879521369934,
0.2323341965675354,
-1.4866752624511719,
-0.07931213080883026,
-0.33575311303138733,
-0.692937970161438,
-1.1728557348251343,
-0.0954265147447586,
1.4254539012908936,
-0.810322642326355,
-0.21415631473064423,
0.5550881028175354,
0.2965870201587677,
0.5010872483253479,
0.6579868793487549,
-0.6420642137527466,
-0.3486035466194153,
-0.26926445960998535,
-0.3223288357257843,
0.348972886800766,
1.4076849222183228,
-0.08979927748441696,
-0.977127194404602,
0.7097850441932678,
-0.4096001088619232,
0.10510175675153732,
1.871039628982544,
0.12396225333213806,
-0.8641387224197388,
0.2585805654525757,
-0.7873607873916626,
2.0599005222320557,
1.7140765190124512,
1.3483268022537231,
-0.06366503983736038,
-0.936208188533783,
0.6130722761154175,
-0.2995688319206238,
-0.43586987257003784,
0.9139938950538635,
0.38420751690864563,
-0.26939740777015686,
-1.4447307586669922,
0.7058039903640747,
1.3244497776031494,
-0.8070428371429443,
-0.8869358897209167,
0.1490861475467682,
-0.8368397355079651,
1.1431854963302612,
0.7232803106307983,
0.3928626775741577,
0.24763604998588562,
1.6220964193344116,
0.7966067790985107,
-0.47281986474990845,
0.5396276116371155,
0.5466757416725159,
-0.09990710765123367,
-2.143918514251709,
-1.2076491117477417,
0.35830801725387573,
-0.4946745038032532,
-1.6351596117019653,
1.3561946153640747,
-1.1416431665420532,
-0.9457897543907166,
0.5903103947639465,
0.07521912455558777,
1.4332613945007324,
0.401302695274353,
1.5217078924179077,
2.006196975708008,
0.8176012635231018,
0.3982594609260559,
1.2238843441009521,
-0.20101433992385864,
-0.4161565899848938,
1.7006810903549194,
-0.4285867512226105,
0.4787220358848572,
1.0431119203567505,
-0.4029371440410614,
-1.115470290184021,
-0.7912852168083191,
-1.2452361583709717,
-0.7409648895263672,
1.1277605295181274,
0.09336797893047333,
-1.1147116422653198,
0.2981060743331909,
1.5808888673782349,
0.06037650257349014,
-0.36437442898750305,
0.6413394808769226,
0.39193132519721985,
-0.8349693417549133,
-0.07749112695455551,
-0.9170616865158081,
0.5420851111412048,
-0.15543746948242188,
-0.3330056071281433,
0.3606312572956085,
0.4774877727031708,
1.3634072542190552,
0.018731363117694855,
0.10091312974691391,
1.1942975521087646,
-1.3937406539916992,
1.4586374759674072,
-0.6984620690345764,
0.3204666078090668,
-2.329393148422241,
1.3773905038833618,
-0.7503216862678528,
1.9137552976608276,
-2.713169574737549,
0.39423424005508423,
-0.5778653621673584,
-0.48032674193382263,
0.24425464868545532,
-0.29818612337112427,
0.1760527789592743,
-0.19622458517551422,
-1.214667558670044,
-0.12222586572170258,
-0.7100948095321655,
0.5923769474029541,
1.1702814102172852,
1.3291950225830078,
-1.0947046279907227,
-0.22060906887054443,
-1.680626392364502,
-0.08008529245853424,
-0.674025297164917,
0.3083896338939667,
-2.0344340801239014,
-0.17256100475788116,
-1.828346610069275,
-2.4104933738708496,
-1.2573603391647339,
-0.769347071647644,
1.1039010286331177,
0.08404990285634995,
-0.8903964161872864,
1.2832738161087036,
-0.44354963302612305,
-1.8535187244415283,
1.1096065044403076,
-2.2426376342773438
] |
https://github.com/huggingface/datasets/issues/5361
|
How concatenate `Audio` elements using batch mapping
|
Thanks for the snippet!
One more question. I wonder why those two mappers are working so different that one taking 4 sec while other taking over 1 min :
```python
%%time
def mapper_function1(batch):
# list_audio
return {
"audio": [
{
"array": np.concatenate([audio["array"] for audio in batch["audio"]]),
"sampling_rate": 16_000,
}
]
}
dataset.map(
mapper_function1,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [01:13<00:00, 1.93ba/s]
# CPU times: user 1min 10s, sys: 3.21 s, total: 1min 13s
# Wall time: 1min 13s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
# --------------------------------
%%time
def mapper_function2(batch):
# list_audio
return {"audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset.map(
mapper_function2,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [00:03<00:00, 40.69ba/s]
# CPU times: user 1.88 s, sys: 1.48 s, total: 3.36 s
# Wall time: 4.8 s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
```
|
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
| 372 | 144 |
How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
Thanks for the snippet!
One more question. I wonder why those two mappers are working so different that one taking 4 sec while other taking over 1 min :
```python
%%time
def mapper_function1(batch):
# list_audio
return {
"audio": [
{
"array": np.concatenate([audio["array"] for audio in batch["audio"]]),
"sampling_rate": 16_000,
}
]
}
dataset.map(
mapper_function1,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [01:13<00:00, 1.93ba/s]
# CPU times: user 1min 10s, sys: 3.21 s, total: 1min 13s
# Wall time: 1min 13s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
# --------------------------------
%%time
def mapper_function2(batch):
# list_audio
return {"audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset.map(
mapper_function2,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [00:03<00:00, 40.69ba/s]
# CPU times: user 1.88 s, sys: 1.48 s, total: 3.36 s
# Wall time: 4.8 s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
```
|
[
-1.242618203163147,
-0.8907074928283691,
-0.7427430152893066,
1.4521963596343994,
-0.14945264160633087,
-1.1915191411972046,
0.14419618248939514,
-1.0921580791473389,
1.6813335418701172,
-0.7954922318458557,
0.30321723222732544,
-1.6631571054458618,
0.01981276646256447,
-0.6217243075370789,
-0.7792865633964539,
-0.8290033936500549,
-0.44476935267448425,
-0.6661558151245117,
1.098323941230774,
2.5133020877838135,
1.1643527746200562,
-1.4051374197006226,
2.7452852725982666,
0.7431174516677856,
-0.1887340247631073,
-0.9657931923866272,
0.5432993173599243,
-0.00011846702545881271,
-1.3561745882034302,
-0.37830445170402527,
-0.9261788725852966,
-0.10199189931154251,
-0.5338688492774963,
-0.5266852378845215,
-0.05998251214623451,
0.43624410033226013,
-0.2807076573371887,
-0.504595160484314,
-0.5570809841156006,
-0.8035638928413391,
0.4312008321285248,
-0.32431045174598694,
0.97881680727005,
-0.30077624320983887,
1.783874750137329,
-0.5494065880775452,
0.508105993270874,
0.7431467771530151,
1.3368444442749023,
0.1734180748462677,
0.03900038078427315,
0.42205119132995605,
0.49720996618270874,
-0.057472486048936844,
0.49446403980255127,
1.125798225402832,
0.7134541869163513,
0.4451444447040558,
0.7861698269844055,
-2.1805596351623535,
1.1743007898330688,
-0.9569666981697083,
0.3451002240180969,
1.3812429904937744,
-0.9670732617378235,
0.3324640095233917,
-1.7144086360931396,
0.0040007540956139565,
0.6013067364692688,
-2.1088414192199707,
0.29432183504104614,
-1.2749193906784058,
-0.5006517767906189,
1.0437021255493164,
0.38832440972328186,
-1.232783555984497,
0.085591621696949,
-0.4602944254875183,
1.0306730270385742,
0.3728373944759369,
1.1203320026397705,
-1.6835814714431763,
-0.025041110813617706,
-0.33365529775619507,
0.05682197958230972,
-1.205067753791809,
-1.527841567993164,
0.49964040517807007,
0.6241260766983032,
0.5330328941345215,
-0.11720873415470123,
0.9136051535606384,
-1.0587178468704224,
0.6841115951538086,
-1.00405752658844,
-1.820771336555481,
-1.4553159475326538,
-2.284165143966675,
-2.2353174686431885,
0.7392394542694092,
-0.425235778093338,
-0.4452434480190277,
2.011193037033081,
-0.980209469795227,
-1.6874606609344482,
1.2163068056106567,
0.28791964054107666,
-0.022701319307088852,
2.3083367347717285,
0.2565164268016815,
-0.6856011152267456,
0.5437310338020325,
-0.7804614901542664,
0.7098454833030701,
-0.4500965476036072,
1.3239275217056274,
0.33430901169776917,
-1.0237536430358887,
1.6057140827178955,
-0.3868345022201538,
0.6203510761260986,
-0.648396909236908,
-0.4247104823589325,
-0.7831118702888489,
0.3526539206504822,
1.9035950899124146,
-0.29999807476997375,
1.4944721460342407,
-0.3579524755477905,
-1.586086392402649,
-1.5740479230880737,
0.8756358027458191,
0.5170782208442688,
-0.6461599469184875,
0.15536795556545258,
-0.3786303699016571,
0.13227416574954987,
-0.11936405301094055,
1.1625401973724365,
1.3181493282318115,
0.7109607458114624,
-0.313518762588501,
-0.9147292375564575,
0.2179645448923111,
-0.07735396921634674,
-0.787026584148407,
-1.717734932899475,
-0.30239301919937134,
0.10046836733818054,
0.6485608816146851,
-1.2517316341400146,
1.7487540245056152,
0.8536591529846191,
1.8991354703903198,
1.0397471189498901,
-0.3686307966709137,
1.5053988695144653,
0.16327349841594696,
1.8732846975326538,
-0.4482963979244232,
0.7071237564086914,
-0.3743429481983185,
-1.1869888305664062,
0.8082245588302612,
-0.35579705238342285,
-2.095684766769409,
-0.7150274515151978,
-0.8213425874710083,
-0.1177518293261528,
-0.8107711672782898,
0.9533247351646423,
-0.2841074764728546,
-1.419100046157837,
0.2778472602367401,
-0.833397626876831,
0.1435377597808838,
-1.2337846755981445,
0.24966351687908173,
0.6818588972091675,
-0.5726513862609863,
0.14215996861457825,
-0.20956428349018097,
-1.3051228523254395,
-0.40877553820610046,
0.3408159613609314,
1.803208351135254,
-0.7936496734619141,
0.9337849020957947,
1.0461915731430054,
-0.6163289546966553,
-0.055226441472768784,
0.33008894324302673,
-0.3435775339603424,
0.9430384039878845,
-1.0956977605819702,
-0.459603488445282,
1.2312204837799072,
-0.20041824877262115,
-0.5330948233604431,
1.4776346683502197,
0.6947791576385498,
-0.9733622074127197,
-0.24896623194217682,
-0.13444535434246063,
-0.8686493635177612,
0.0609222874045372,
-1.6467891931533813,
-0.14758792519569397,
0.4050913453102112,
-1.5862669944763184,
-0.5429295301437378,
-0.20209543406963348,
1.2515145540237427,
-0.12950091063976288,
1.454609751701355,
-0.36194875836372375,
-0.14782895147800446,
-0.4487963914871216,
-0.41520804166793823,
0.12100052833557129,
-0.24379226565361023,
-0.6207638382911682,
0.2098783701658249,
-0.7626391649246216,
0.43330955505371094,
1.3843789100646973,
0.3079322874546051,
0.06316471099853516,
0.5486544966697693,
1.0391591787338257,
0.41426268219947815,
-0.1053638681769371,
-0.8826363682746887,
-1.5766676664352417,
2.018927574157715,
-1.441559076309204,
2.0023715496063232,
0.7570748329162598,
-0.0312996432185173,
-1.7851089239120483,
-1.9057434797286987,
1.4053404331207275,
1.135594367980957,
2.311453104019165,
0.61539226770401,
0.46982502937316895,
-0.834337592124939,
-0.667399525642395,
0.19800756871700287,
-1.000992774963379,
-0.7420717477798462,
0.1834888905286789,
2.491487503051758,
1.7261145114898682,
-0.42932844161987305,
-0.16293857991695404,
-1.0512503385543823,
1.4023109674453735,
-0.1422928273677826,
0.22255775332450867,
1.936423420906067,
-0.2612512707710266,
-1.0140588283538818,
1.2689591646194458,
-2.3611719608306885,
0.18408529460430145,
1.9836647510528564,
0.22042837738990784,
0.12242458760738373,
-1.3765202760696411,
-0.643447756767273,
-0.3295913636684418,
-0.36644551157951355,
-1.2044978141784668,
0.6044564843177795,
-0.1384614259004593,
-0.7633131146430969,
-1.3838894367218018,
0.1934376060962677,
-1.0771584510803223,
-1.678902506828308,
0.13290458917617798,
1.8493928909301758,
2.0500497817993164,
-0.8648520112037659,
1.5751851797103882,
-0.2700652778148651,
0.2697204053401947,
1.2691468000411987,
1.2382245063781738,
3.1040024757385254,
1.9281589984893799,
-1.3452175855636597,
0.6541808843612671,
-0.13882695138454437,
-0.4427194595336914,
1.1223703622817993,
-1.1920769214630127,
1.3419036865234375,
-0.05317577347159386,
-1.203665852546692,
-1.1993497610092163,
0.9339505434036255,
0.5503079295158386,
0.016999978572130203,
-0.45679378509521484,
1.147915005683899,
0.026291560381650925,
1.3391822576522827,
0.5920608043670654,
-0.2959672212600708,
0.6562530994415283,
-0.32129010558128357,
-0.3777002692222595,
1.5542057752609253,
0.13778315484523773,
-1.4629707336425781,
-2.3079593181610107,
-0.22340960800647736,
-0.8958386182785034,
-0.04112832248210907,
-0.6535041332244873,
-1.0069817304611206,
1.585211157798767,
0.3843446969985962,
-1.1869913339614868,
-0.31004154682159424,
-0.34831511974334717,
-0.586131751537323,
2.721327066421509,
-1.4209129810333252,
-0.31662991642951965,
-1.0011811256408691,
-0.63772052526474,
1.6355493068695068,
-1.2125617265701294,
-0.2236522138118744,
-1.0256750583648682,
-0.5870575308799744,
-1.224290370941162,
-0.5594403743743896,
0.03382577747106552,
-0.9422696232795715,
0.8778634071350098,
0.17618541419506073,
-1.2212393283843994,
-0.28672242164611816,
-0.9231501817703247,
0.8765926361083984,
-0.12264940142631531,
0.22811445593833923,
1.8480092287063599,
0.42244797945022583,
-0.3048422634601593,
0.7523636817932129,
1.245231032371521,
0.6545037627220154,
-0.6482999920845032,
0.20540545880794525,
-0.658298909664154,
0.2813836634159088,
-1.3132582902908325,
0.26534828543663025,
-2.8097097873687744,
0.6362704634666443,
-0.04034500941634178,
-0.10557211190462112,
-0.0034214365296065807,
-1.3071610927581787,
1.1156173944473267,
2.5470733642578125,
-1.2132130861282349,
0.4942373037338257,
0.30598193407058716,
1.2351131439208984,
-1.559148907661438,
0.27790454030036926,
-0.43280524015426636,
2.105051279067993,
0.20068489015102386,
1.2036620378494263,
-0.4293895661830902,
-2.3075363636016846,
0.5820645093917847,
-1.279238224029541,
-1.1317064762115479,
0.70223468542099,
-0.805450439453125,
0.1627931147813797,
-1.4014294147491455,
-0.2521663308143616,
-0.7976782917976379,
-1.1819664239883423,
0.5573850870132446,
0.10400648415088654,
0.44597378373146057,
-0.6315261721611023,
0.31388425827026367,
-2.234105348587036,
-1.3632688522338867,
-0.19167223572731018,
-0.9337775111198425,
0.4600140452384949,
-0.3466625511646271,
0.7994841933250427,
-0.19213110208511353,
-0.07667732983827591,
0.3145888149738312,
1.4015958309173584,
3.4678590297698975,
0.1936870515346527,
0.38393092155456543,
-0.19914688169956207,
-0.939238429069519,
1.462180495262146,
0.9295884966850281,
-0.1286599040031433,
-0.5592949390411377,
-1.0804506540298462,
1.3030465841293335,
1.9375604391098022,
0.9881342649459839,
0.052729252725839615,
-0.7867735028266907,
-0.7554352879524231,
-0.03400927782058716,
0.1336730420589447,
0.4085227847099304,
0.8877217173576355,
0.06898436695337296,
0.03917093202471733,
1.4899694919586182,
1.1234009265899658,
-0.4115683138370514,
0.34720176458358765,
-0.8261639475822449,
-0.502585232257843,
0.5088974237442017,
0.38374948501586914,
0.03235196694731712,
0.3148021101951599,
-1.0824086666107178,
-0.24620787799358368,
-0.3850620985031128,
-0.9026347398757935,
-0.767467200756073,
-0.3755391240119934,
-0.3317832946777344,
1.6339939832687378,
0.09873823821544647,
-0.558455228805542,
-0.08791312575340271,
-0.7689514756202698,
-0.1033085286617279,
-1.0301295518875122,
0.2816087603569031,
-0.16439086198806763,
-0.08757104724645615,
-0.1266499161720276,
1.772052526473999,
-0.9347448945045471,
-2.108182668685913,
0.15453435480594635,
0.21410447359085083,
-0.32140791416168213,
0.1968214511871338,
1.6443663835525513,
0.6082805395126343,
1.4314134120941162,
1.3876253366470337,
0.9606066942214966,
-0.7006860375404358,
-1.3320010900497437,
0.7490985989570618,
1.0257781744003296,
-1.3822457790374756,
0.6696206331253052,
-0.001472274772822857,
-0.5928571224212646,
0.6350962519645691,
1.2780144214630127,
0.5030282735824585,
-2.010361671447754,
0.7471407055854797,
-0.934278666973114,
0.8200684189796448,
0.7488548159599304,
0.6873378157615662,
0.2258695363998413,
0.736502468585968,
-1.3125296831130981,
-1.0928715467453003,
-0.7769886255264282,
-0.7173515558242798,
2.009645700454712,
-0.3315699100494385,
0.5695721507072449,
-0.2467072308063507,
-1.3641014099121094,
-0.05316023901104927,
0.6624475717544556,
0.3354424238204956,
-0.5347002148628235,
0.6962356567382812,
-0.6614790558815002,
-1.1356537342071533,
-1.3827459812164307,
-0.45530202984809875,
-1.0551339387893677,
-0.963379979133606,
1.034043788909912,
0.8123844265937805,
0.36645758152008057,
1.8183164596557617,
0.7247307896614075,
0.2028736025094986,
-2.6137988567352295,
0.9031785130500793,
0.3081374764442444,
-0.06458212435245514,
0.7746940851211548,
0.3674665093421936,
1.0380772352218628,
0.004666408523917198,
0.6217510104179382,
-2.4596333503723145,
2.3045501708984375,
-0.2559410631656647,
0.6454401612281799,
-0.0458247996866703,
-0.07389871031045914,
1.1364878416061401,
0.6152055263519287,
0.5633289813995361,
-1.0623934268951416,
0.6289120316505432,
-0.5733665227890015,
1.3011239767074585,
0.8432183861732483,
-0.830220639705658,
-0.08002161234617233,
1.3760364055633545,
0.5065259337425232,
-0.5436756014823914,
-0.9466177225112915,
-0.9269886016845703,
0.9746717214584351,
1.7220102548599243,
-0.10230069607496262,
0.013180232606828213,
0.8266012072563171,
0.624385416507721,
-1.346917748451233,
-0.004789167549461126,
-0.7449358105659485,
-0.6469254493713379,
1.6555395126342773,
2.068506956100464,
-0.202186718583107,
-0.20210076868534088,
-0.6830289959907532,
-1.3552594184875488,
0.7927597761154175,
-0.0407874621450901,
0.1339181363582611,
0.692334771156311,
-0.6556390523910522,
1.0211025476455688,
0.8514878153800964,
0.8820208311080933,
0.24540607631206512,
0.15385420620441437,
0.3045387268066406,
-0.30515068769454956,
-1.133589267730713,
-0.3043093979358673,
-1.0500246286392212,
-2.452141523361206,
0.41578733921051025,
-0.1704956740140915,
-1.3779826164245605,
0.00533721037209034,
-0.9916111826896667,
0.9665593504905701,
-0.5539077520370483,
-1.0599747896194458,
-1.523594856262207,
0.2553519010543823,
-0.013960032723844051,
0.8958160281181335,
-1.6090540885925293,
-0.15881246328353882,
1.2088109254837036,
0.9135034084320068,
-0.6992602944374084,
1.064836025238037,
0.21972717344760895,
0.9889575839042664,
0.8742821216583252,
-0.3575892746448517,
0.48353785276412964,
-0.020728446543216705,
-1.3197345733642578,
0.5314258337020874,
1.1449981927871704,
0.17408323287963867,
1.526032567024231,
-0.5835320353507996,
0.015299607999622822,
0.39044857025146484,
-0.4298844039440155,
-0.4522987902164459,
-0.5411257743835449,
0.5691796541213989,
0.09007137268781662,
-0.9150177836418152,
-0.06411337852478027,
0.004980483092367649,
-0.25114643573760986,
0.21783940494060516,
-1.4573785066604614,
-0.07027379423379898,
-0.3517741560935974,
-0.6961966156959534,
-1.1824766397476196,
-0.07220800966024399,
1.4066624641418457,
-0.80381178855896,
-0.20507414638996124,
0.5278511643409729,
0.3047424256801605,
0.501029908657074,
0.6694321036338806,
-0.6508309245109558,
-0.3802374303340912,
-0.29067498445510864,
-0.3278758227825165,
0.3447599709033966,
1.3856501579284668,
-0.10026223957538605,
-0.993543803691864,
0.711696982383728,
-0.4098287522792816,
0.11630783975124359,
1.8905422687530518,
0.130070760846138,
-0.83807373046875,
0.26348382234573364,
-0.7888212203979492,
2.047546148300171,
1.6896605491638184,
1.357900619506836,
-0.0919828712940216,
-0.9258375763893127,
0.6350255608558655,
-0.30160731077194214,
-0.41943490505218506,
0.9123246073722839,
0.37056082487106323,
-0.27548766136169434,
-1.4477475881576538,
0.6793895959854126,
1.348901629447937,
-0.8336496353149414,
-0.8833442330360413,
0.19412195682525635,
-0.863615095615387,
1.1240445375442505,
0.7225790619850159,
0.40086472034454346,
0.2555600702762604,
1.6353137493133545,
0.8113763332366943,
-0.46168845891952515,
0.5473573803901672,
0.5592430830001831,
-0.11814460158348083,
-2.139526605606079,
-1.1823960542678833,
0.34782060980796814,
-0.4857787787914276,
-1.6350599527359009,
1.3615853786468506,
-1.1523988246917725,
-0.9485204815864563,
0.581993818283081,
0.061292752623558044,
1.4175176620483398,
0.3984644412994385,
1.5264862775802612,
2.01550555229187,
0.8296167850494385,
0.4153423011302948,
1.2170110940933228,
-0.17756329476833344,
-0.41443854570388794,
1.7232635021209717,
-0.4445452392101288,
0.46562615036964417,
1.0650067329406738,
-0.39910757541656494,
-1.1024913787841797,
-0.7915605306625366,
-1.237612009048462,
-0.7267149686813354,
1.144071340560913,
0.09314482659101486,
-1.1189090013504028,
0.3128664195537567,
1.5982282161712646,
0.05926038324832916,
-0.4022691249847412,
0.6439123749732971,
0.42337262630462646,
-0.8543404936790466,
-0.06568393856287003,
-0.9096176028251648,
0.5457187294960022,
-0.14110298454761505,
-0.34192535281181335,
0.3617405593395233,
0.4819689393043518,
1.3825334310531616,
-0.01396163646131754,
0.09853704273700714,
1.1557672023773193,
-1.4096920490264893,
1.4674116373062134,
-0.6795055270195007,
0.29055655002593994,
-2.311762571334839,
1.34800124168396,
-0.7405016422271729,
1.931190848350525,
-2.6888113021850586,
0.38685646653175354,
-0.5695551633834839,
-0.4607994258403778,
0.2548839747905731,
-0.3009287714958191,
0.17022819817066193,
-0.16934582591056824,
-1.2241754531860352,
-0.12671728432178497,
-0.7236874103546143,
0.6058925986289978,
1.171723484992981,
1.317120909690857,
-1.0769739151000977,
-0.2289206087589264,
-1.6656497716903687,
-0.049679551273584366,
-0.7195355892181396,
0.299213171005249,
-2.0367796421051025,
-0.1887882798910141,
-1.829675555229187,
-2.370955467224121,
-1.2657949924468994,
-0.787154495716095,
1.1164723634719849,
0.09720795601606369,
-0.9045222401618958,
1.2988461256027222,
-0.4349243938922882,
-1.836253046989441,
1.1018017530441284,
-2.2267966270446777
] |
https://github.com/huggingface/datasets/issues/5361
|
How concatenate `Audio` elements using batch mapping
|
In the first one you get a dataset with an Audio type, and in the second one you get a dataset with a sequence of floats type.
The Audio type encodes the data as WAV to save disk space, so it takes more time to create.
The Audio type is automatically inferred because you modify the column "audio" which was already an Audio type. If you name it to something else, type inference will use a type struct with array and sampling rate fields.
|
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
| 372 | 84 |
How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
In the first one you get a dataset with an Audio type, and in the second one you get a dataset with a sequence of floats type.
The Audio type encodes the data as WAV to save disk space, so it takes more time to create.
The Audio type is automatically inferred because you modify the column "audio" which was already an Audio type. If you name it to something else, type inference will use a type struct with array and sampling rate fields.
|
[
-1.2529680728912354,
-0.9348393678665161,
-0.7474684119224548,
1.4107993841171265,
-0.1689836084842682,
-1.1990835666656494,
0.11322429776191711,
-1.072511911392212,
1.6957645416259766,
-0.7959940433502197,
0.2705734372138977,
-1.6895568370819092,
0.05957791954278946,
-0.6231801509857178,
-0.7689828276634216,
-0.8262914419174194,
-0.4592643678188324,
-0.7194799780845642,
1.0441689491271973,
2.5321526527404785,
1.147850751876831,
-1.4344784021377563,
2.7229654788970947,
0.7407199740409851,
-0.17482975125312805,
-0.9689745903015137,
0.5324385166168213,
-0.03655492514371872,
-1.3781954050064087,
-0.3627361059188843,
-0.9115139842033386,
-0.0504436269402504,
-0.5458482503890991,
-0.5708280205726624,
-0.027420293539762497,
0.38620251417160034,
-0.24081206321716309,
-0.46731042861938477,
-0.5078431963920593,
-0.8206809759140015,
0.43897953629493713,
-0.3538615107536316,
0.9327297806739807,
-0.3008213937282562,
1.7930229902267456,
-0.4979880750179291,
0.5001362562179565,
0.7282123565673828,
1.3464609384536743,
0.1487189680337906,
0.013831431977450848,
0.4382818341255188,
0.4776533544063568,
-0.06319363415241241,
0.4677105247974396,
1.1476471424102783,
0.722811222076416,
0.4396839737892151,
0.7706503868103027,
-2.2068798542022705,
1.2298526763916016,
-0.9489920735359192,
0.3611968159675598,
1.362770438194275,
-0.9627151489257812,
0.34817442297935486,
-1.728471279144287,
-0.04794176295399666,
0.5703414082527161,
-2.1443915367126465,
0.25432780385017395,
-1.302667498588562,
-0.4967285394668579,
1.0342167615890503,
0.3702906370162964,
-1.2249269485473633,
0.09046690911054611,
-0.45946982502937317,
1.0025354623794556,
0.41335758566856384,
1.1615548133850098,
-1.6838501691818237,
-0.02714809775352478,
-0.34775733947753906,
0.04658921808004379,
-1.249268651008606,
-1.5482861995697021,
0.4751044809818268,
0.6482628583908081,
0.5145795941352844,
-0.07673443108797073,
0.8972622752189636,
-0.9879317879676819,
0.712969958782196,
-0.9751613736152649,
-1.8262550830841064,
-1.4599441289901733,
-2.2737231254577637,
-2.2771782875061035,
0.7462956309318542,
-0.43714210391044617,
-0.4260914623737335,
2.047452926635742,
-1.009397029876709,
-1.7449787855148315,
1.2433871030807495,
0.26469686627388,
-0.07029975950717926,
2.33303165435791,
0.21297110617160797,
-0.6974981427192688,
0.4964677691459656,
-0.7300647497177124,
0.7353126406669617,
-0.4708981513977051,
1.305729866027832,
0.35335564613342285,
-1.0250312089920044,
1.6094897985458374,
-0.411683589220047,
0.5857099890708923,
-0.6581282615661621,
-0.4305550754070282,
-0.7913813591003418,
0.35734549164772034,
1.8626188039779663,
-0.3277018964290619,
1.5076783895492554,
-0.38787636160850525,
-1.574188232421875,
-1.5852570533752441,
0.8656304478645325,
0.5219525098800659,
-0.6775999069213867,
0.14311176538467407,
-0.33486852049827576,
0.11998952180147171,
-0.03514236584305763,
1.0964081287384033,
1.306109070777893,
0.6810114979743958,
-0.2863886058330536,
-0.925334095954895,
0.2188730537891388,
-0.07828021794557571,
-0.6996361017227173,
-1.7540169954299927,
-0.3318382799625397,
0.12255338579416275,
0.6413599252700806,
-1.2514643669128418,
1.7271302938461304,
0.8847990036010742,
1.9466220140457153,
1.0418920516967773,
-0.33312368392944336,
1.5036358833312988,
0.1575588434934616,
1.875736117362976,
-0.43616825342178345,
0.7218851447105408,
-0.3931655287742615,
-1.1597836017608643,
0.8179061412811279,
-0.346156507730484,
-2.089688301086426,
-0.6702430844306946,
-0.8375465273857117,
-0.14837734401226044,
-0.7943832278251648,
0.9677599668502808,
-0.27719199657440186,
-1.3932467699050903,
0.2813897430896759,
-0.7986236810684204,
0.1543361097574234,
-1.2389578819274902,
0.25479426980018616,
0.6995936036109924,
-0.5895871520042419,
0.1213226392865181,
-0.2625749707221985,
-1.2832697629928589,
-0.4015327990055084,
0.37328675389289856,
1.7800477743148804,
-0.7911888957023621,
0.9554362893104553,
1.0265421867370605,
-0.6406971216201782,
-0.026045266538858414,
0.33763641119003296,
-0.31168097257614136,
0.9513629674911499,
-1.081993818283081,
-0.3949469327926636,
1.1979776620864868,
-0.2481682002544403,
-0.5523978471755981,
1.4558846950531006,
0.6621880531311035,
-0.9824809432029724,
-0.21584883332252502,
-0.19134211540222168,
-0.916081428527832,
0.030604001134634018,
-1.6620644330978394,
-0.1450802981853485,
0.38953787088394165,
-1.6011154651641846,
-0.4929763376712799,
-0.1694953739643097,
1.2473198175430298,
-0.08964399248361588,
1.4339576959609985,
-0.3786347210407257,
-0.15442600846290588,
-0.43840712308883667,
-0.40879228711128235,
0.16504742205142975,
-0.2025444209575653,
-0.5907447338104248,
0.2615779638290405,
-0.7993723750114441,
0.4117993116378784,
1.4121702909469604,
0.3574429750442505,
0.04667552933096886,
0.5454352498054504,
1.019238829612732,
0.4096013605594635,
-0.10211152583360672,
-0.8530057668685913,
-1.592912197113037,
2.067241668701172,
-1.4311972856521606,
1.9849270582199097,
0.7522714138031006,
-0.02874554693698883,
-1.795183539390564,
-1.909199595451355,
1.4092912673950195,
1.101884126663208,
2.349961757659912,
0.6178408265113831,
0.4828091263771057,
-0.8344603180885315,
-0.6684260964393616,
0.27575191855430603,
-1.0234687328338623,
-0.8106065392494202,
0.1516948640346527,
2.460324764251709,
1.7324804067611694,
-0.4119313657283783,
-0.14583539962768555,
-1.0887025594711304,
1.410843014717102,
-0.08975739777088165,
0.22537727653980255,
1.94469153881073,
-0.2742210328578949,
-1.0299209356307983,
1.2415809631347656,
-2.3504467010498047,
0.1855509728193283,
1.987532377243042,
0.18720249831676483,
0.16622476279735565,
-1.3608591556549072,
-0.633203387260437,
-0.2719985842704773,
-0.37607917189598083,
-1.2433528900146484,
0.604608952999115,
-0.19959916174411774,
-0.7223325967788696,
-1.394882321357727,
0.1780727654695511,
-1.092018485069275,
-1.665924072265625,
0.13174112141132355,
1.8945313692092896,
2.0594940185546875,
-0.833028256893158,
1.5472344160079956,
-0.2523728311061859,
0.26573196053504944,
1.2622795104980469,
1.2219685316085815,
3.075010061264038,
1.9745848178863525,
-1.348095178604126,
0.6519008278846741,
-0.09158340841531754,
-0.4442838728427887,
1.130061149597168,
-1.1570628881454468,
1.3328932523727417,
-0.09647736698389053,
-1.186676263809204,
-1.1885162591934204,
0.9287546277046204,
0.5303258895874023,
0.0037298565730452538,
-0.49369752407073975,
1.193155288696289,
0.035385750234127045,
1.3045448064804077,
0.5620618462562561,
-0.34188392758369446,
0.6574942469596863,
-0.33577367663383484,
-0.45062607526779175,
1.5462146997451782,
0.1698688417673111,
-1.4203132390975952,
-2.315826416015625,
-0.21953599154949188,
-0.8528289198875427,
-0.05372084304690361,
-0.650584876537323,
-0.9357279539108276,
1.5607450008392334,
0.40185868740081787,
-1.2014217376708984,
-0.298818439245224,
-0.3582298755645752,
-0.5779022574424744,
2.6776862144470215,
-1.4386738538742065,
-0.29575294256210327,
-0.9756752848625183,
-0.6178523302078247,
1.5624499320983887,
-1.2174386978149414,
-0.23071067035198212,
-1.030881404876709,
-0.6054629683494568,
-1.237222671508789,
-0.5726208090782166,
-0.018800044432282448,
-0.9294486045837402,
0.8596169352531433,
0.185529887676239,
-1.2237180471420288,
-0.27066168189048767,
-0.9279270768165588,
0.8597172498703003,
-0.1250605285167694,
0.21158325672149658,
1.8775553703308105,
0.39930829405784607,
-0.2978302538394928,
0.746383547782898,
1.1923742294311523,
0.6397302746772766,
-0.6168596148490906,
0.21932123601436615,
-0.680322527885437,
0.31608209013938904,
-1.302048683166504,
0.26116886734962463,
-2.8122522830963135,
0.623938798904419,
-0.02898116409778595,
-0.11895592510700226,
-0.035542961210012436,
-1.2877570390701294,
1.0893317461013794,
2.555206298828125,
-1.2077138423919678,
0.4830242097377777,
0.2990531623363495,
1.250218391418457,
-1.5869935750961304,
0.2816072404384613,
-0.45568621158599854,
2.1422431468963623,
0.210431307554245,
1.1916327476501465,
-0.4578512907028198,
-2.3176016807556152,
0.5401079654693604,
-1.2622066736221313,
-1.1228318214416504,
0.6988120079040527,
-0.8008710741996765,
0.10485408455133438,
-1.4220921993255615,
-0.23756913840770721,
-0.7873636484146118,
-1.1927815675735474,
0.5983753204345703,
0.11341004073619843,
0.4794161915779114,
-0.6459502577781677,
0.301058828830719,
-2.230217456817627,
-1.3668948411941528,
-0.2306089699268341,
-0.9151110053062439,
0.4441089332103729,
-0.3585829734802246,
0.7632359266281128,
-0.20759807527065277,
-0.03353733941912651,
0.3100232779979706,
1.3443902730941772,
3.450000047683716,
0.2312849462032318,
0.37694379687309265,
-0.18197260797023773,
-0.933614194393158,
1.4514225721359253,
0.9726678729057312,
-0.14887544512748718,
-0.5656172633171082,
-1.087275505065918,
1.312073826789856,
1.9610681533813477,
0.9732246994972229,
0.08239337801933289,
-0.7765486836433411,
-0.7942061424255371,
-0.0019678501412272453,
0.12213460355997086,
0.4240996837615967,
0.8651620745658875,
0.05632943660020828,
0.07556632906198502,
1.4997613430023193,
1.1487828493118286,
-0.408400297164917,
0.39973825216293335,
-0.8257359862327576,
-0.5042473673820496,
0.4556989371776581,
0.3998969793319702,
0.02589176595211029,
0.2921265959739685,
-1.0324898958206177,
-0.2278500199317932,
-0.409116268157959,
-0.9197967052459717,
-0.7717818021774292,
-0.33585503697395325,
-0.3573450744152069,
1.6530640125274658,
0.13249090313911438,
-0.5462331175804138,
-0.09353739768266678,
-0.7602574825286865,
-0.0951223224401474,
-0.9819186329841614,
0.3446499705314636,
-0.1544751226902008,
-0.06800525635480881,
-0.11358501762151718,
1.7592371702194214,
-0.9554784893989563,
-2.1432101726531982,
0.18532639741897583,
0.21588987112045288,
-0.3428179919719696,
0.17881940305233002,
1.6277217864990234,
0.5922578573226929,
1.4323017597198486,
1.4452400207519531,
0.9648553133010864,
-0.6865624785423279,
-1.343048334121704,
0.7660301923751831,
0.9827401638031006,
-1.4204447269439697,
0.6639757752418518,
0.004974053241312504,
-0.626250147819519,
0.6623250842094421,
1.2567951679229736,
0.47714686393737793,
-2.063594341278076,
0.8124203085899353,
-0.9271954298019409,
0.7826043367385864,
0.765277624130249,
0.7261466383934021,
0.22958998382091522,
0.7587745189666748,
-1.3165290355682373,
-1.1005784273147583,
-0.7533438801765442,
-0.7138651609420776,
2.007073402404785,
-0.3059306740760803,
0.5681332945823669,
-0.2162185162305832,
-1.3843460083007812,
-0.0719403475522995,
0.6543794870376587,
0.30939826369285583,
-0.5313835740089417,
0.7254334688186646,
-0.6027110815048218,
-1.1257716417312622,
-1.4265379905700684,
-0.48211050033569336,
-1.0781121253967285,
-0.9336090087890625,
0.9952754974365234,
0.8111537098884583,
0.33148881793022156,
1.8162461519241333,
0.669636070728302,
0.22011420130729675,
-2.6383912563323975,
0.924920380115509,
0.33234918117523193,
-0.08493418246507645,
0.7714893221855164,
0.3344314694404602,
0.9851361513137817,
0.012250120751559734,
0.625908613204956,
-2.4377267360687256,
2.3198676109313965,
-0.2880125045776367,
0.6985687613487244,
-0.023155368864536285,
-0.058118440210819244,
1.1266366243362427,
0.594982922077179,
0.6012988686561584,
-1.063363790512085,
0.6653108596801758,
-0.5850766897201538,
1.278978943824768,
0.8721250891685486,
-0.8663867712020874,
-0.08199086040258408,
1.359805941581726,
0.4397636950016022,
-0.5300261378288269,
-0.8995013236999512,
-0.9503549933433533,
0.9832630753517151,
1.7804754972457886,
-0.09182221442461014,
0.04270554333925247,
0.8383082747459412,
0.6240082383155823,
-1.3237415552139282,
0.024997852742671967,
-0.724503755569458,
-0.6807659864425659,
1.6457666158676147,
2.0384764671325684,
-0.17941348254680634,
-0.21108120679855347,
-0.6724833846092224,
-1.33063542842865,
0.7905266284942627,
0.0037934212014079094,
0.08159468322992325,
0.7450419664382935,
-0.6439895629882812,
1.051830530166626,
0.8816532492637634,
0.9164578914642334,
0.1929812729358673,
0.12231553345918655,
0.29891178011894226,
-0.3135266602039337,
-1.1051478385925293,
-0.28042131662368774,
-1.02731192111969,
-2.4290456771850586,
0.43104392290115356,
-0.12765946984291077,
-1.4057936668395996,
0.005596165545284748,
-0.9807085990905762,
0.9840450286865234,
-0.5317667722702026,
-1.0761692523956299,
-1.5394190549850464,
0.2691907286643982,
-0.08351987600326538,
0.862579345703125,
-1.638814926147461,
-0.14043965935707092,
1.189910650253296,
0.9228933453559875,
-0.6856929659843445,
1.0830960273742676,
0.22657565772533417,
0.9974441528320312,
0.8864044547080994,
-0.35276755690574646,
0.4513775706291199,
0.041264623403549194,
-1.298511028289795,
0.5090460777282715,
1.1421983242034912,
0.1514912098646164,
1.472967505455017,
-0.5845209956169128,
0.019610602408647537,
0.32759276032447815,
-0.4166974425315857,
-0.41253820061683655,
-0.5566896200180054,
0.6244028806686401,
0.07321638613939285,
-0.9076445698738098,
0.00032008159905672073,
-0.013986222445964813,
-0.20444363355636597,
0.20380347967147827,
-1.498822569847107,
-0.10797861963510513,
-0.3258267939090729,
-0.6546875238418579,
-1.1949957609176636,
-0.056531503796577454,
1.4312753677368164,
-0.7760838866233826,
-0.2207733541727066,
0.5917763113975525,
0.3499230742454529,
0.5010793209075928,
0.6526992321014404,
-0.6360650062561035,
-0.3411506116390228,
-0.252764493227005,
-0.3424304723739624,
0.32427436113357544,
1.3651931285858154,
-0.08946731686592102,
-0.9753028750419617,
0.7252960801124573,
-0.39591893553733826,
0.09060382097959518,
1.8824403285980225,
0.13201463222503662,
-0.8504677414894104,
0.24152135848999023,
-0.7630351185798645,
2.0186092853546143,
1.72690749168396,
1.3760350942611694,
-0.07218680530786514,
-0.9746221303939819,
0.6197264790534973,
-0.30429741740226746,
-0.41172006726264954,
0.9412439465522766,
0.4358022212982178,
-0.26632341742515564,
-1.4166847467422485,
0.6516311764717102,
1.2726930379867554,
-0.8302875757217407,
-0.8619289398193359,
0.13537150621414185,
-0.802489161491394,
1.1307741403579712,
0.7206786870956421,
0.39341869950294495,
0.1814401000738144,
1.6516996622085571,
0.7870224714279175,
-0.47261711955070496,
0.5596914291381836,
0.5271981954574585,
-0.14004811644554138,
-2.121786117553711,
-1.1811257600784302,
0.3539469540119171,
-0.4492945969104767,
-1.6236783266067505,
1.346500277519226,
-1.1463693380355835,
-0.9066082239151001,
0.5842791795730591,
0.07591438293457031,
1.4390895366668701,
0.38073834776878357,
1.5176572799682617,
2.035698175430298,
0.8809531331062317,
0.4361112415790558,
1.2848135232925415,
-0.18013621866703033,
-0.35438865423202515,
1.6985896825790405,
-0.4391920268535614,
0.4476091265678406,
1.0559731721878052,
-0.4304511845111847,
-1.089802861213684,
-0.7675619125366211,
-1.2407622337341309,
-0.6950086951255798,
1.127098798751831,
0.06060994416475296,
-1.1077206134796143,
0.30926287174224854,
1.6184179782867432,
0.05402243137359619,
-0.38880008459091187,
0.6002143025398254,
0.4251929223537445,
-0.8420937061309814,
-0.10869330167770386,
-0.9264205098152161,
0.5287877321243286,
-0.1620948314666748,
-0.3537817895412445,
0.38361304998397827,
0.4450330138206482,
1.373213529586792,
0.011194941587746143,
0.10706844925880432,
1.1959083080291748,
-1.377303123474121,
1.440921425819397,
-0.6819111108779907,
0.3021628260612488,
-2.3064560890197754,
1.390389084815979,
-0.6957910656929016,
1.913010597229004,
-2.692901849746704,
0.3813498318195343,
-0.6118081212043762,
-0.48014554381370544,
0.2925189435482025,
-0.2811765670776367,
0.16981947422027588,
-0.18315844237804413,
-1.1617202758789062,
-0.13003116846084595,
-0.7210416197776794,
0.5551460385322571,
1.168658971786499,
1.317075490951538,
-1.0738799571990967,
-0.23293505609035492,
-1.7078620195388794,
-0.12270938605070114,
-0.7028692364692688,
0.3507891893386841,
-2.0369932651519775,
-0.19995222985744476,
-1.8605748414993286,
-2.412112236022949,
-1.282102108001709,
-0.7905507683753967,
1.1047158241271973,
0.10713207721710205,
-0.880782425403595,
1.2670506238937378,
-0.3945421576499939,
-1.862608551979065,
1.1064479351043701,
-2.239100456237793
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
If you use huggingface trainer, you will find the trainer has wrapped a `IterableDatasetShard` to avoid duplication.
See:
https://github.com/huggingface/transformers/blob/dfd818420dcbad68e05a502495cf666d338b2bfb/src/transformers/trainer.py#L835
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 19 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
If you use huggingface trainer, you will find the trainer has wrapped a `IterableDatasetShard` to avoid duplication.
See:
https://github.com/huggingface/transformers/blob/dfd818420dcbad68e05a502495cf666d338b2bfb/src/transformers/trainer.py#L835
|
[
-1.266662359237671,
-0.872687816619873,
-0.7881004214286804,
1.5121513605117798,
-0.12996762990951538,
-1.277140498161316,
0.08665143698453903,
-1.1018645763397217,
1.6233916282653809,
-0.735805869102478,
0.4112835228443146,
-1.6999651193618774,
0.06509319692850113,
-0.4879054129123688,
-0.7715769410133362,
-0.8907908201217651,
-0.32519015669822693,
-0.8559366464614868,
0.9705983996391296,
2.554637908935547,
1.2477186918258667,
-1.2540369033813477,
2.684844493865967,
0.659329891204834,
-0.3713586926460266,
-1.0772464275360107,
0.5777681469917297,
0.031769171357154846,
-1.240870475769043,
-0.5202860832214355,
-0.9597654938697815,
-0.07910981774330139,
-0.46502846479415894,
-0.6059426665306091,
0.07976723462343216,
0.40437597036361694,
-0.16463598608970642,
-0.2917899191379547,
-0.474232017993927,
-0.7968962788581848,
0.4835905134677887,
-0.3381480872631073,
0.8693307042121887,
-0.36380407214164734,
1.7550232410430908,
-0.6254202127456665,
0.38358452916145325,
0.7026333808898926,
1.4720263481140137,
0.09302771091461182,
-0.07379838079214096,
0.2280624508857727,
0.3469668924808502,
-0.029652277007699013,
0.4367021918296814,
1.0711013078689575,
0.5657574534416199,
0.485114723443985,
0.5906317234039307,
-2.290891170501709,
1.2990566492080688,
-1.0510834455490112,
0.17513102293014526,
1.3711466789245605,
-1.0226918458938599,
0.24296218156814575,
-1.8532313108444214,
-0.07437378168106079,
0.4989253282546997,
-2.291849136352539,
0.2559254765510559,
-1.2751235961914062,
-0.5587208271026611,
0.9710261821746826,
0.27688610553741455,
-1.4131759405136108,
0.1408645212650299,
-0.49489349126815796,
1.0586040019989014,
0.5442285537719727,
1.1066879034042358,
-1.7194476127624512,
-0.05849282070994377,
-0.3061710596084595,
0.07029259949922562,
-1.3975560665130615,
-1.50753915309906,
0.5583758354187012,
0.6270667314529419,
0.5445560216903687,
0.08240137994289398,
0.9743489027023315,
-0.9630324840545654,
0.9033427238464355,
-0.9501508474349976,
-1.6145669221878052,
-1.388353705406189,
-2.3017778396606445,
-2.3241047859191895,
0.7682706713676453,
-0.5582498908042908,
-0.5316842198371887,
1.9942375421524048,
-1.1313096284866333,
-1.8318382501602173,
1.0807335376739502,
0.19580134749412537,
0.07488739490509033,
2.3904359340667725,
0.2441931962966919,
-0.6136718988418579,
0.35290783643722534,
-0.6751680970191956,
0.7133870124816895,
-0.4514130651950836,
1.3892414569854736,
0.5425635576248169,
-0.9883328080177307,
1.64219069480896,
-0.4740779995918274,
0.5468801856040955,
-0.7441676259040833,
-0.5385358333587646,
-0.8968601226806641,
0.3508948087692261,
1.962628722190857,
-0.4215072989463806,
1.5459438562393188,
-0.39869001507759094,
-1.5008952617645264,
-1.4560011625289917,
0.9048863649368286,
0.48955219984054565,
-0.819385290145874,
0.12000889331102371,
-0.43527206778526306,
0.0930495485663414,
-0.054338544607162476,
1.021475076675415,
1.1980069875717163,
0.70833420753479,
-0.33123695850372314,
-0.8924087285995483,
0.29934510588645935,
-0.0581090934574604,
-0.7118175625801086,
-1.8442388772964478,
-0.3190266489982605,
0.19507461786270142,
0.705784261226654,
-1.2846311330795288,
1.7291796207427979,
0.8746230602264404,
1.9490095376968384,
0.9290362596511841,
-0.35038670897483826,
1.4641121625900269,
-0.04829113930463791,
1.9558354616165161,
-0.5101209282875061,
0.7143397927284241,
-0.3940087854862213,
-1.225160002708435,
0.8580413460731506,
-0.33033910393714905,
-1.9776469469070435,
-0.8442549705505371,
-0.8314832448959351,
-0.2170734405517578,
-0.7995713353157043,
0.9823957085609436,
-0.38567739725112915,
-1.398236870765686,
0.2842569947242737,
-0.5670706629753113,
0.1883595585823059,
-1.273728847503662,
0.3126886785030365,
0.7396543622016907,
-0.6574928760528564,
-0.012884411960840225,
-0.2817164659500122,
-1.301453709602356,
-0.46467524766921997,
0.2019389569759369,
1.978785514831543,
-0.6852720975875854,
1.063599944114685,
0.9688596725463867,
-0.7042504549026489,
0.021440932527184486,
0.33485546708106995,
-0.33514562249183655,
0.8340743184089661,
-1.037671685218811,
-0.36814084649086,
1.2204464673995972,
-0.12383683025836945,
-0.7104150056838989,
1.445379614830017,
0.8510317206382751,
-0.9919762015342712,
-0.23517048358917236,
-0.24083197116851807,
-0.69559246301651,
0.08441897481679916,
-1.6149170398712158,
-0.03298141062259674,
0.2585574984550476,
-1.3619040250778198,
-0.4331861734390259,
-0.1409216821193695,
1.2759541273117065,
-0.2466748058795929,
1.4295451641082764,
-0.2648385465145111,
-0.2198493480682373,
-0.3406084477901459,
-0.3229914903640747,
0.13300803303718567,
-0.11517004668712616,
-0.6497600078582764,
0.2510535717010498,
-0.7934380769729614,
0.39842838048934937,
1.4295388460159302,
0.42712506651878357,
0.071922168135643,
0.46414291858673096,
1.0544708967208862,
0.25778698921203613,
-0.02998349815607071,
-0.9566774368286133,
-1.622276782989502,
2.0178656578063965,
-1.5241265296936035,
2.013413906097412,
0.7473203539848328,
-0.10755626112222672,
-1.8046797513961792,
-1.7970994710922241,
1.2611271142959595,
1.2157572507858276,
2.323599100112915,
0.6197435259819031,
0.3966357409954071,
-0.8124592304229736,
-0.6262295246124268,
0.40491148829460144,
-1.082892656326294,
-0.7201392650604248,
0.13636848330497742,
2.389267683029175,
1.7565436363220215,
-0.4970696270465851,
-0.2107987403869629,
-1.0340231657028198,
1.1842224597930908,
-0.15079697966575623,
0.24311822652816772,
1.996486783027649,
-0.2730166018009186,
-1.145113468170166,
1.2638987302780151,
-2.293799638748169,
0.21128666400909424,
2.015279769897461,
0.3616395890712738,
0.08083795011043549,
-1.4765886068344116,
-0.6024981737136841,
-0.2596737742424011,
-0.48667195439338684,
-1.2675726413726807,
0.611020028591156,
-0.3210773468017578,
-0.9007448554039001,
-1.4256815910339355,
0.03416606783866882,
-1.1759562492370605,
-1.748459815979004,
0.4183931052684784,
1.8047429323196411,
2.0664641857147217,
-0.7683426737785339,
1.4674180746078491,
-0.24819719791412354,
0.09516266733407974,
1.2765576839447021,
1.279667615890503,
3.0110220909118652,
1.846058964729309,
-1.2196711301803589,
0.8186519145965576,
-0.18356400728225708,
-0.4897283613681793,
1.3342492580413818,
-1.093375325202942,
1.2538046836853027,
-0.2658762037754059,
-1.177854061126709,
-1.2680922746658325,
0.9930486083030701,
0.442857027053833,
0.1387237310409546,
-0.5201859474182129,
1.2385337352752686,
0.1510663628578186,
1.2495136260986328,
0.5427571535110474,
-0.3207954168319702,
0.6432533860206604,
-0.43502774834632874,
-0.49190545082092285,
1.5556353330612183,
0.23091959953308105,
-1.490729808807373,
-2.3284175395965576,
-0.1813911497592926,
-0.7443445324897766,
-0.12997232377529144,
-0.6374762654304504,
-1.0569183826446533,
1.622685432434082,
0.43375179171562195,
-1.3129889965057373,
-0.2829555869102478,
-0.3148323595523834,
-0.6268430352210999,
2.634995937347412,
-1.4325190782546997,
-0.13853710889816284,
-1.083949327468872,
-0.5579643845558167,
1.6827549934387207,
-1.214191198348999,
-0.16029900312423706,
-0.981198251247406,
-0.6152788996696472,
-1.3735034465789795,
-0.5108637809753418,
-0.03809424489736557,
-0.9710662961006165,
0.6658380031585693,
0.22267508506774902,
-1.1298961639404297,
-0.40399909019470215,
-0.8015331625938416,
0.9236388802528381,
-0.0756477415561676,
0.26126185059547424,
1.8872809410095215,
0.466572105884552,
-0.3615984618663788,
0.712935209274292,
1.0866727828979492,
0.5164405107498169,
-0.6347838640213013,
0.14329156279563904,
-0.7724812626838684,
0.2987070381641388,
-1.3248473405838013,
0.2435230016708374,
-2.8662939071655273,
0.6546303033828735,
-0.09245692938566208,
-0.09820176661014557,
-0.08045196533203125,
-1.3143665790557861,
1.1561999320983887,
2.6786160469055176,
-1.2112070322036743,
0.4848634600639343,
0.30719107389450073,
1.1576542854309082,
-1.5697828531265259,
0.35146498680114746,
-0.432721883058548,
2.157693386077881,
0.2058229148387909,
1.2730512619018555,
-0.5524283647537231,
-2.094787120819092,
0.727749764919281,
-1.1887884140014648,
-1.2447470426559448,
0.7767238616943359,
-0.8052504062652588,
0.08447283506393433,
-1.3874136209487915,
-0.16960322856903076,
-0.948324978351593,
-1.3176798820495605,
0.9079113602638245,
0.21098846197128296,
0.4712960422039032,
-0.5377634167671204,
0.3852832615375519,
-2.1205053329467773,
-1.3839457035064697,
-0.13491961359977722,
-0.9817208647727966,
0.4457322955131531,
-0.2722683250904083,
0.5615388751029968,
-0.05907642841339111,
0.12739935517311096,
0.4275907278060913,
1.414193034172058,
3.5025506019592285,
0.26797881722450256,
0.33807089924812317,
-0.16434147953987122,
-1.03341543674469,
1.4687888622283936,
1.014424443244934,
-0.05410619452595711,
-0.5524764657020569,
-0.9119880199432373,
1.22395658493042,
1.9851397275924683,
1.0627981424331665,
0.10023906826972961,
-0.8961231708526611,
-0.6969836950302124,
-0.05062923580408096,
0.13734543323516846,
0.45482322573661804,
1.0340865850448608,
0.009680043905973434,
0.1104283481836319,
1.4691115617752075,
1.209993600845337,
-0.4746260344982147,
0.32259848713874817,
-0.9078736901283264,
-0.3281937539577484,
0.4874081611633301,
0.3293706774711609,
-0.016843680292367935,
0.46602508425712585,
-0.972741961479187,
-0.31068387627601624,
-0.30070656538009644,
-1.0104175806045532,
-0.7546017169952393,
-0.4055958092212677,
-0.325526624917984,
1.5934743881225586,
0.02657376602292061,
-0.38117915391921997,
-0.018297269940376282,
-0.8089501261711121,
-0.08890027552843094,
-1.0476356744766235,
0.20693206787109375,
-0.10927736759185791,
-0.11277880519628525,
-0.12146022915840149,
1.7865052223205566,
-1.021493911743164,
-2.1179425716400146,
0.29434338212013245,
0.2872123420238495,
-0.42604178190231323,
0.2810102105140686,
1.6274207830429077,
0.5275214314460754,
1.394471287727356,
1.232897162437439,
1.0414396524429321,
-0.5964064598083496,
-1.3322921991348267,
0.7240234017372131,
0.9220130443572998,
-1.4437260627746582,
0.8652094006538391,
-0.01472672913223505,
-0.40200263261795044,
0.7078210711479187,
1.2524927854537964,
0.46274375915527344,
-1.8819398880004883,
0.7285369634628296,
-0.850288987159729,
0.7505406141281128,
0.6237127184867859,
0.8389471173286438,
0.2327984869480133,
0.9259024858474731,
-1.2558976411819458,
-1.140830159187317,
-0.7805646061897278,
-0.6594903469085693,
1.8962658643722534,
-0.1831955909729004,
0.6530184149742126,
-0.17191028594970703,
-1.2296587228775024,
-0.19886866211891174,
0.8022615909576416,
0.279766321182251,
-0.33879491686820984,
0.8475261926651001,
-0.6330190896987915,
-1.0240232944488525,
-1.3358052968978882,
-0.4916372299194336,
-0.9361677765846252,
-0.9570872783660889,
1.047748327255249,
0.6965562701225281,
0.33443957567214966,
1.925799012184143,
0.48921439051628113,
0.23483625054359436,
-2.6542177200317383,
0.9042782783508301,
0.27444812655448914,
0.08510765433311462,
0.9616807103157043,
0.2579822242259979,
1.1000128984451294,
-0.036454617977142334,
0.47208985686302185,
-2.2974603176116943,
2.2648613452911377,
-0.2580231726169586,
0.6473929286003113,
0.03775874525308609,
-0.1626165509223938,
1.1203358173370361,
0.5037249326705933,
0.6008662581443787,
-1.1940038204193115,
0.8189467787742615,
-0.6290690898895264,
1.2228339910507202,
0.890056312084198,
-0.9502965807914734,
-0.03452068939805031,
1.3463871479034424,
0.4231831431388855,
-0.3704982399940491,
-0.9075575470924377,
-0.8567752838134766,
1.0506376028060913,
1.758310317993164,
-0.029554616659879684,
-0.041073303669691086,
0.7813842296600342,
0.5966789722442627,
-1.2582112550735474,
0.05154791474342346,
-0.8547064661979675,
-0.7846449017524719,
1.6935932636260986,
2.0518958568573,
-0.123612180352211,
-0.24505582451820374,
-0.7343991994857788,
-1.0728769302368164,
0.8059783577919006,
-0.04765951633453369,
0.1010974794626236,
0.6570860743522644,
-0.7050630450248718,
1.2094967365264893,
0.8529330492019653,
1.1054792404174805,
0.04521698132157326,
0.39049965143203735,
0.29893115162849426,
-0.3437768816947937,
-1.1148895025253296,
-0.31762397289276123,
-1.1328141689300537,
-2.7322914600372314,
0.42541027069091797,
-0.24342778325080872,
-1.4017865657806396,
0.10591136664152145,
-1.0666205883026123,
0.8631085753440857,
-0.5766545534133911,
-1.0655229091644287,
-1.3989973068237305,
0.1916484832763672,
-0.16920220851898193,
0.9089004397392273,
-1.6154574155807495,
-0.06056186184287071,
1.3350692987442017,
0.970411479473114,
-0.5190232992172241,
0.9948564171791077,
0.19385308027267456,
1.0297906398773193,
0.813050389289856,
-0.39772990345954895,
0.5061987638473511,
0.21178796887397766,
-1.3260878324508667,
0.4841670095920563,
1.2524150609970093,
0.23423784971237183,
1.4792530536651611,
-0.39003419876098633,
0.0754530131816864,
0.3979349136352539,
-0.6267779469490051,
-0.5257822871208191,
-0.4517013132572174,
0.8679850697517395,
0.21708357334136963,
-1.0542582273483276,
0.07213012874126434,
-0.21739354729652405,
-0.20577317476272583,
0.2543942332267761,
-1.4781341552734375,
-0.325359582901001,
-0.34025275707244873,
-0.5162208080291748,
-1.2584606409072876,
-0.051281340420246124,
1.3011481761932373,
-0.8011340498924255,
-0.12098340690135956,
0.4165903329849243,
0.3727840781211853,
0.5632322430610657,
0.5861544609069824,
-0.661176323890686,
-0.4190637469291687,
-0.3122906982898712,
-0.3795684576034546,
0.3767036497592926,
1.2086448669433594,
-0.10459129512310028,
-1.0004708766937256,
0.7918500900268555,
-0.26096111536026,
0.03387400507926941,
1.9070755243301392,
-0.04847085475921631,
-0.7404344081878662,
0.3083244860172272,
-0.5910245776176453,
1.9379411935806274,
1.5505894422531128,
1.254373550415039,
-0.13776159286499023,
-0.8601648211479187,
0.6063632369041443,
-0.25521329045295715,
-0.3177814483642578,
0.8715072870254517,
0.4642390310764313,
-0.21566864848136902,
-1.3500243425369263,
0.5233303308486938,
1.243126392364502,
-0.8635705709457397,
-0.7015248537063599,
-0.02405533567070961,
-0.8050957322120667,
1.0958274602890015,
0.6535313129425049,
0.38449299335479736,
0.2953251004219055,
1.5019807815551758,
0.6192330121994019,
-0.46468254923820496,
0.47304201126098633,
0.4237283170223236,
-0.12372171878814697,
-2.139460325241089,
-0.998921811580658,
0.36404019594192505,
-0.40920937061309814,
-1.4970102310180664,
1.2465887069702148,
-1.1995034217834473,
-0.9642364382743835,
0.5420148372650146,
0.2448822259902954,
1.4810906648635864,
0.24750009179115295,
1.5974467992782593,
2.0741477012634277,
0.8883883953094482,
0.2276839017868042,
1.3000530004501343,
-0.02767547219991684,
-0.4422087073326111,
1.8492083549499512,
-0.37053781747817993,
0.4813772439956665,
1.009364366531372,
-0.2864297330379486,
-1.0434716939926147,
-0.9022806286811829,
-1.2784643173217773,
-0.6176439523696899,
1.2090495824813843,
0.05187877640128136,
-1.201287031173706,
0.12388724833726883,
1.5838452577590942,
0.12372293323278427,
-0.16088736057281494,
0.6145733594894409,
0.462768018245697,
-0.749923050403595,
-0.008412951603531837,
-0.8385839462280273,
0.45326584577560425,
-0.10548486560583115,
-0.31128424406051636,
0.31299829483032227,
0.48735034465789795,
1.221318244934082,
-0.0669059008359909,
0.11507463455200195,
1.123420238494873,
-1.414120078086853,
1.539158821105957,
-0.614202618598938,
0.2495678961277008,
-2.447472333908081,
1.3844903707504272,
-0.8122697472572327,
1.8073375225067139,
-2.646064519882202,
0.36230096220970154,
-0.530202329158783,
-0.41286036372184753,
0.2735477089881897,
-0.4614606201648712,
0.1558588743209839,
-0.24420586228370667,
-0.912935733795166,
-0.09109479933977127,
-0.8683993816375732,
0.5535522103309631,
1.0904966592788696,
1.3218332529067993,
-1.0712840557098389,
-0.25781357288360596,
-1.857222557067871,
-0.11920329183340073,
-0.669559895992279,
0.3110327422618866,
-2.0601806640625,
-0.05379999428987503,
-2.079664707183838,
-2.320729970932007,
-1.3537815809249878,
-0.7356243133544922,
1.0670795440673828,
0.2169848382472992,
-0.8153009414672852,
1.0082464218139648,
-0.315584272146225,
-1.7325984239578247,
1.0279364585876465,
-2.141481876373291
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
If you want to support it by datasets natively, maybe we also need to change the code in `transformers` ?
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 20 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
If you want to support it by datasets natively, maybe we also need to change the code in `transformers` ?
|
[
-1.3557546138763428,
-0.850594699382782,
-0.7625929117202759,
1.5348939895629883,
-0.1815050095319748,
-1.3051652908325195,
0.18186256289482117,
-1.229117751121521,
1.7325905561447144,
-0.7724425196647644,
0.3544665575027466,
-1.683726191520691,
0.09307768940925598,
-0.5063937306404114,
-0.8071180582046509,
-0.8728448748588562,
-0.4563715159893036,
-0.777962327003479,
0.9921740889549255,
2.4375627040863037,
1.1944053173065186,
-1.286007285118103,
2.6322097778320312,
0.7535960078239441,
-0.3563512861728668,
-1.0007271766662598,
0.4776946008205414,
-0.014193080365657806,
-1.2427443265914917,
-0.48678091168403625,
-0.9905006289482117,
-0.19388115406036377,
-0.5332428812980652,
-0.6511653661727905,
0.01369134895503521,
0.39627760648727417,
-0.1678602695465088,
-0.4191156327724457,
-0.4057273268699646,
-0.720895528793335,
0.4386143088340759,
-0.28138425946235657,
0.8916326761245728,
-0.4357513189315796,
1.7324583530426025,
-0.5716134309768677,
0.43189185857772827,
0.6629494428634644,
1.5651657581329346,
0.2162257730960846,
-0.12663795053958893,
0.2445947825908661,
0.41382911801338196,
-0.023313451558351517,
0.48595550656318665,
1.019233226776123,
0.5421099066734314,
0.5411504507064819,
0.6521744132041931,
-2.3368470668792725,
1.1991808414459229,
-1.2031400203704834,
0.13355791568756104,
1.4415799379348755,
-0.9927031993865967,
0.223140686750412,
-1.869904637336731,
-0.0684434026479721,
0.5506083369255066,
-2.2308101654052734,
0.24770957231521606,
-1.1724352836608887,
-0.4932670593261719,
0.9508612751960754,
0.380167692899704,
-1.4003994464874268,
0.0647205114364624,
-0.3410438001155853,
0.9460048079490662,
0.5846152901649475,
1.1985212564468384,
-1.6562100648880005,
0.09554192423820496,
-0.4206651449203491,
0.08328047394752502,
-1.3902021646499634,
-1.3480348587036133,
0.5966446995735168,
0.6333415508270264,
0.5326350331306458,
0.006365912035107613,
0.9727559685707092,
-0.9204782843589783,
0.9086806178092957,
-0.9664077162742615,
-1.649231195449829,
-1.423115849494934,
-2.2450389862060547,
-2.394191026687622,
0.7841423749923706,
-0.5677045583724976,
-0.5460039377212524,
1.9606084823608398,
-1.105453372001648,
-1.8905541896820068,
1.120002031326294,
0.27595412731170654,
0.021748296916484833,
2.3621859550476074,
0.17531324923038483,
-0.5463805198669434,
0.4445072114467621,
-0.6659256219863892,
0.7738749384880066,
-0.4348716735839844,
1.3566433191299438,
0.48256468772888184,
-0.9776915311813354,
1.62272310256958,
-0.4310252070426941,
0.6909732222557068,
-0.6506259441375732,
-0.5639521479606628,
-0.8835954070091248,
0.3700588643550873,
2.039785623550415,
-0.3375178575515747,
1.5164541006088257,
-0.453481525182724,
-1.4418612718582153,
-1.4548364877700806,
0.9978381991386414,
0.46235787868499756,
-0.8247211575508118,
0.1201184093952179,
-0.4334290027618408,
0.10414256155490875,
-0.02588966302573681,
1.043163537979126,
1.2826353311538696,
0.7628688812255859,
-0.3442050516605377,
-0.8406491875648499,
0.20566552877426147,
-0.05387837812304497,
-0.8730912804603577,
-1.709062933921814,
-0.3109888732433319,
0.09091654419898987,
0.657315194606781,
-1.185725212097168,
1.7844161987304688,
0.8771300911903381,
2.003528118133545,
0.9010629653930664,
-0.3802529573440552,
1.3787007331848145,
-0.044407814741134644,
1.970011830329895,
-0.4979257881641388,
0.6791621446609497,
-0.369522362947464,
-1.2196561098098755,
0.8323848247528076,
-0.2636043131351471,
-2.0304067134857178,
-0.8784201145172119,
-0.8211702108383179,
-0.23316529393196106,
-0.7488236427307129,
1.0299766063690186,
-0.26883047819137573,
-1.3935656547546387,
0.20662717521190643,
-0.5555806159973145,
0.20259834825992584,
-1.3000690937042236,
0.40104052424430847,
0.7233483195304871,
-0.7280149459838867,
-0.029867220669984818,
-0.2510111331939697,
-1.3780440092086792,
-0.4505538046360016,
0.09468121826648712,
1.9736080169677734,
-0.8170055747032166,
1.005634069442749,
0.9442614912986755,
-0.8012337684631348,
0.005534020252525806,
0.2477768361568451,
-0.27708345651626587,
0.7654302716255188,
-0.9871433973312378,
-0.43951013684272766,
1.3175033330917358,
-0.14900468289852142,
-0.6796069145202637,
1.4943991899490356,
0.7269024848937988,
-1.0004442930221558,
-0.18919558823108673,
-0.2730869948863983,
-0.7620039582252502,
0.07103104889392853,
-1.5829689502716064,
-0.0396643728017807,
0.20388978719711304,
-1.3769018650054932,
-0.5659801363945007,
-0.13146114349365234,
1.248048186302185,
-0.19643634557724,
1.4543834924697876,
-0.278622567653656,
-0.1399536281824112,
-0.372538685798645,
-0.3236423134803772,
0.12918420135974884,
-0.08175818622112274,
-0.6304166913032532,
0.24921315908432007,
-0.7097115516662598,
0.44029733538627625,
1.3533918857574463,
0.3032592833042145,
0.11330223083496094,
0.5305888652801514,
1.018696904182434,
0.2973955571651459,
-0.060194794088602066,
-0.8933819532394409,
-1.5998096466064453,
2.021202802658081,
-1.4746394157409668,
1.9469647407531738,
0.5520315170288086,
-0.16935588419437408,
-1.7428675889968872,
-1.8459748029708862,
1.3096864223480225,
1.2341829538345337,
2.2741055488586426,
0.6405773162841797,
0.32172679901123047,
-0.7709460258483887,
-0.5280054211616516,
0.3601709306240082,
-0.9828583002090454,
-0.6684239506721497,
0.15457113087177277,
2.302227020263672,
1.6785136461257935,
-0.5446197390556335,
-0.15204690396785736,
-1.0319925546646118,
1.2434738874435425,
-0.2433495670557022,
0.4074530601501465,
1.9652132987976074,
-0.3270643651485443,
-1.1819939613342285,
1.354810118675232,
-2.355316162109375,
0.20266231894493103,
2.0142672061920166,
0.4107901155948639,
0.13894009590148926,
-1.4174962043762207,
-0.6492127180099487,
-0.23806117475032806,
-0.5289759039878845,
-1.2338247299194336,
0.6247687935829163,
-0.2764016389846802,
-0.8820818662643433,
-1.3277482986450195,
0.14823299646377563,
-1.1716569662094116,
-1.6318293809890747,
0.3811599910259247,
1.8661978244781494,
1.9918628931045532,
-0.748891294002533,
1.4568899869918823,
-0.25879693031311035,
0.09894035756587982,
1.2517989873886108,
1.2088617086410522,
3.009958028793335,
1.8682355880737305,
-1.1939369440078735,
0.8722376227378845,
-0.22307780385017395,
-0.5251982808113098,
1.3897408246994019,
-1.1339763402938843,
1.3048216104507446,
-0.19074100255966187,
-1.1309387683868408,
-1.3059320449829102,
0.9122803807258606,
0.44632837176322937,
0.19294995069503784,
-0.5319952964782715,
1.1887551546096802,
0.1215749979019165,
1.2072513103485107,
0.5086129307746887,
-0.3866528570652008,
0.5643385052680969,
-0.4470632076263428,
-0.44340232014656067,
1.5639768838882446,
0.2935158312320709,
-1.3734054565429688,
-2.3596608638763428,
-0.10091255605220795,
-0.7979152202606201,
-0.09827251732349396,
-0.6447150111198425,
-0.9520134925842285,
1.6747156381607056,
0.4583740532398224,
-1.2493727207183838,
-0.33594048023223877,
-0.34395158290863037,
-0.6224615573883057,
2.7742319107055664,
-1.447916030883789,
-0.18769219517707825,
-1.0352321863174438,
-0.5808038115501404,
1.8173326253890991,
-1.1451042890548706,
-0.18775077164173126,
-1.0640887022018433,
-0.6073257923126221,
-1.4149360656738281,
-0.5307295322418213,
0.040933746844530106,
-0.9399251341819763,
0.7923378348350525,
0.17118848860263824,
-1.193720817565918,
-0.4756615161895752,
-0.8105241060256958,
0.9473633170127869,
-0.11707964539527893,
0.28366026282310486,
1.9174582958221436,
0.42330941557884216,
-0.3530574440956116,
0.7662988901138306,
1.1271103620529175,
0.5688894987106323,
-0.5555248856544495,
0.1996566504240036,
-0.7403883337974548,
0.4760483503341675,
-1.2792741060256958,
0.26693519949913025,
-2.8873822689056396,
0.5791864991188049,
-0.08615030348300934,
-0.10567276179790497,
-0.11774957180023193,
-1.3669359683990479,
1.057002067565918,
2.709397554397583,
-1.2434626817703247,
0.465545117855072,
0.23217765986919403,
1.192713975906372,
-1.4829648733139038,
0.22471337020397186,
-0.5087018609046936,
2.1775028705596924,
0.2593150734901428,
1.210210919380188,
-0.5557905435562134,
-2.1175084114074707,
0.7541802525520325,
-1.164799690246582,
-1.3348639011383057,
0.8323175311088562,
-0.801103949546814,
-0.0027467161417007446,
-1.4319497346878052,
-0.14110873639583588,
-0.9187294244766235,
-1.291637897491455,
0.9083695411682129,
0.2683338522911072,
0.49497005343437195,
-0.6279712319374084,
0.39411166310310364,
-2.2478320598602295,
-1.3884785175323486,
-0.16446155309677124,
-1.009986400604248,
0.42200967669487,
-0.3350697159767151,
0.5384877324104309,
-0.013985973782837391,
0.061169859021902084,
0.4119309186935425,
1.436077356338501,
3.484278678894043,
0.20509985089302063,
0.33434924483299255,
-0.25396692752838135,
-1.012244462966919,
1.5258523225784302,
1.1263246536254883,
-0.09814675152301788,
-0.6107290387153625,
-0.799193799495697,
1.1499265432357788,
1.9231767654418945,
1.019385814666748,
-0.016226941719651222,
-0.9720830917358398,
-0.6070721745491028,
-0.07520829141139984,
0.16903796792030334,
0.44108501076698303,
1.042527198791504,
0.053659044206142426,
0.15177945792675018,
1.47320556640625,
1.1539335250854492,
-0.44485828280448914,
0.31739547848701477,
-0.8085634708404541,
-0.33344098925590515,
0.5558422207832336,
0.45752403140068054,
0.06669634580612183,
0.4511018991470337,
-0.9360917806625366,
-0.2427007108926773,
-0.3060813248157501,
-0.9779845476150513,
-0.7534165382385254,
-0.37011903524398804,
-0.4113031029701233,
1.6213041543960571,
-0.03741870075464249,
-0.4867781102657318,
-0.082587331533432,
-0.8900431394577026,
-0.049795620143413544,
-1.0326968431472778,
0.2591690421104431,
-0.08757276833057404,
-0.16233685612678528,
-0.134637713432312,
1.6918176412582397,
-1.0179117918014526,
-2.073066473007202,
0.345471054315567,
0.3581904470920563,
-0.39189085364341736,
0.2895471453666687,
1.5113211870193481,
0.5221812129020691,
1.4075905084609985,
1.3532220125198364,
0.9730429649353027,
-0.5561144351959229,
-1.40919828414917,
0.6959396600723267,
0.9173577427864075,
-1.518539547920227,
0.8289802670478821,
0.12303732335567474,
-0.4614870250225067,
0.5900333523750305,
1.163658618927002,
0.3706359565258026,
-1.8947255611419678,
0.7729964256286621,
-0.9402922987937927,
0.7960956692695618,
0.6045986413955688,
0.8078899383544922,
0.20972537994384766,
0.9329672455787659,
-1.1250555515289307,
-1.208924412727356,
-0.8048368692398071,
-0.7582988142967224,
1.927266240119934,
-0.20283599197864532,
0.6229560375213623,
-0.13201972842216492,
-1.2292897701263428,
-0.18285879492759705,
0.7200282216072083,
0.28478944301605225,
-0.35970500111579895,
0.8484385013580322,
-0.6321952939033508,
-1.0160034894943237,
-1.3802520036697388,
-0.5388095378875732,
-0.985248327255249,
-0.9484521746635437,
1.0773171186447144,
0.7318446636199951,
0.3298715054988861,
1.8089061975479126,
0.4657721221446991,
0.3036773204803467,
-2.6783580780029297,
0.9377423524856567,
0.3153553009033203,
-0.048608120530843735,
0.8506580591201782,
0.34963259100914,
1.0108745098114014,
-0.11299233138561249,
0.5475967526435852,
-2.285731077194214,
2.2686164379119873,
-0.28973525762557983,
0.5472618341445923,
0.013171941041946411,
-0.11088883876800537,
1.059555172920227,
0.6374205946922302,
0.5705128312110901,
-1.2101905345916748,
0.8491732478141785,
-0.6894938945770264,
1.3104480504989624,
0.8782944679260254,
-0.837984561920166,
-0.10437695682048798,
1.3643606901168823,
0.46622252464294434,
-0.34544798731803894,
-0.9340114593505859,
-0.8790760636329651,
1.0515475273132324,
1.6568927764892578,
-0.07986681163311005,
-0.0369863398373127,
0.7990416288375854,
0.5479804873466492,
-1.1726535558700562,
-0.011054953560233116,
-0.8641811013221741,
-0.7610577344894409,
1.653585433959961,
2.0295231342315674,
-0.1042395830154419,
-0.2108374536037445,
-0.7270777821540833,
-1.1552218198776245,
0.8110518455505371,
0.0043455734848976135,
0.12390188872814178,
0.6005029678344727,
-0.7208477258682251,
1.231472134590149,
0.9155978560447693,
0.9880560636520386,
-0.0055377790704369545,
0.3148074746131897,
0.2719937860965729,
-0.2152559608221054,
-1.079047441482544,
-0.26055455207824707,
-1.1046948432922363,
-2.6513094902038574,
0.39779794216156006,
-0.31952619552612305,
-1.401994228363037,
0.14730654656887054,
-1.049001932144165,
0.8300369381904602,
-0.5734691023826599,
-1.0793286561965942,
-1.422555685043335,
0.18701978027820587,
-0.004017455969005823,
0.8657324314117432,
-1.6321344375610352,
0.027511682361364365,
1.2780545949935913,
0.9279504418373108,
-0.6206638216972351,
1.034627914428711,
0.3245762288570404,
1.0583513975143433,
0.8366125226020813,
-0.40479570627212524,
0.4732545018196106,
0.0927858054637909,
-1.3122438192367554,
0.5557746291160583,
1.1766383647918701,
0.2219325453042984,
1.4687148332595825,
-0.4948624074459076,
0.0298343263566494,
0.35649579763412476,
-0.6642196774482727,
-0.48794299364089966,
-0.5802804231643677,
0.8701135516166687,
0.20667113363742828,
-1.0001945495605469,
0.016109589487314224,
-0.20507284998893738,
-0.224236860871315,
0.19819697737693787,
-1.4560216665267944,
-0.2885527014732361,
-0.38910964131355286,
-0.480175644159317,
-1.2090137004852295,
-0.017898082733154297,
1.264078140258789,
-0.8013940453529358,
-0.10779982805252075,
0.42760592699050903,
0.3942470848560333,
0.47921332716941833,
0.5700713992118835,
-0.5786298513412476,
-0.3159548342227936,
-0.3199304938316345,
-0.330406129360199,
0.2658814787864685,
1.342246651649475,
-0.10464361310005188,
-1.0415393114089966,
0.8243143558502197,
-0.26839175820350647,
-0.07098102569580078,
1.816785454750061,
0.014047250151634216,
-0.81145179271698,
0.33012938499450684,
-0.6821517944335938,
1.9335044622421265,
1.6023213863372803,
1.2594341039657593,
-0.12249745428562164,
-0.9263764023780823,
0.569928765296936,
-0.4426319897174835,
-0.2804415822029114,
0.7445232272148132,
0.43473711609840393,
-0.2780538499355316,
-1.3773579597473145,
0.6037815809249878,
1.2352105379104614,
-0.8369635343551636,
-0.7519361972808838,
0.004178149625658989,
-0.6685508489608765,
1.1182273626327515,
0.81072598695755,
0.36318057775497437,
0.3105546236038208,
1.5237840414047241,
0.6490312814712524,
-0.38493451476097107,
0.4389066696166992,
0.5292049646377563,
-0.045016076415777206,
-2.1059863567352295,
-1.1007329225540161,
0.4005761742591858,
-0.47578591108322144,
-1.4767237901687622,
1.2978980541229248,
-1.198502779006958,
-0.9610579013824463,
0.4953429400920868,
0.1842588633298874,
1.5676488876342773,
0.3588702380657196,
1.5610865354537964,
2.1205790042877197,
0.9667491912841797,
0.23827308416366577,
1.3122605085372925,
-0.08124014735221863,
-0.3155967593193054,
1.8637648820877075,
-0.3760203719139099,
0.44772040843963623,
1.0829073190689087,
-0.23622393608093262,
-0.8835914731025696,
-0.8705926537513733,
-1.4044764041900635,
-0.638014554977417,
1.1863245964050293,
0.07929332554340363,
-1.1700993776321411,
0.22977314889431,
1.6086357831954956,
0.0722348541021347,
-0.1760912984609604,
0.6190364956855774,
0.4619901776313782,
-0.9045814275741577,
-0.013368897140026093,
-0.848096489906311,
0.4317494332790375,
-0.15776771306991577,
-0.3966871201992035,
0.38119614124298096,
0.5270007252693176,
1.273658275604248,
0.0004955679178237915,
0.14958366751670837,
1.0238970518112183,
-1.4946134090423584,
1.56948721408844,
-0.6885522603988647,
0.23986177146434784,
-2.3699769973754883,
1.4118107557296753,
-0.7867476344108582,
1.8271538019180298,
-2.747560501098633,
0.40654852986335754,
-0.4930521249771118,
-0.500378429889679,
0.3540938198566437,
-0.43058034777641296,
0.09703248739242554,
-0.1566619724035263,
-1.0248360633850098,
0.06565223634243011,
-0.8030357956886292,
0.4938039481639862,
0.9717138409614563,
1.3295265436172485,
-1.1172144412994385,
-0.3633471429347992,
-1.8473036289215088,
-0.03798223286867142,
-0.5725653767585754,
0.46484673023223877,
-2.059431791305542,
-0.07590582966804504,
-2.05403208732605,
-2.251833438873291,
-1.299654245376587,
-0.7080844044685364,
1.1556106805801392,
0.09102582931518555,
-0.8232872486114502,
1.082751750946045,
-0.3866118788719177,
-1.8285390138626099,
0.9943936467170715,
-2.1513099670410156
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
Maybe something like this then ?
```python
from datasets.distributed import split_dataset_by_node
ds = split_dataset_by_node(ds, rank=rank, world_size=world_size)
```
For map-style datasets the implementation is trivial (it can simply use `.shard()`).
For iterable datasets we would need to implement a new ExamplesIterable that would only iterate on a subset of the (possibly shuffled and re-shuffled after each epoch) list of shards, based on the rank and world size.
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 66 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Maybe something like this then ?
```python
from datasets.distributed import split_dataset_by_node
ds = split_dataset_by_node(ds, rank=rank, world_size=world_size)
```
For map-style datasets the implementation is trivial (it can simply use `.shard()`).
For iterable datasets we would need to implement a new ExamplesIterable that would only iterate on a subset of the (possibly shuffled and re-shuffled after each epoch) list of shards, based on the rank and world size.
|
[
-1.3632258176803589,
-0.9250876307487488,
-0.7467833757400513,
1.4937503337860107,
-0.14968734979629517,
-1.3493001461029053,
0.12449230998754501,
-1.1274056434631348,
1.7735309600830078,
-0.913582444190979,
0.42215946316719055,
-1.6959872245788574,
0.11669615656137466,
-0.5556533932685852,
-0.777704656124115,
-0.8959665298461914,
-0.40447208285331726,
-0.8373531699180603,
0.9749686121940613,
2.4379732608795166,
1.2150360345840454,
-1.2881072759628296,
2.6507692337036133,
0.686782717704773,
-0.3093741834163666,
-1.0242313146591187,
0.5145174264907837,
-0.013264736160635948,
-1.253218412399292,
-0.4227858781814575,
-0.9670566916465759,
-0.11791538447141647,
-0.5939540863037109,
-0.6618738174438477,
0.025087373331189156,
0.4387024939060211,
-0.25103652477264404,
-0.3842334747314453,
-0.4160914421081543,
-0.7681645750999451,
0.5014179348945618,
-0.2963733673095703,
0.9702648520469666,
-0.4001663327217102,
1.8075138330459595,
-0.6258633136749268,
0.4739493429660797,
0.6559310555458069,
1.416308045387268,
0.2430819272994995,
-0.13582748174667358,
0.22101406753063202,
0.3608575463294983,
0.027304166927933693,
0.4659978747367859,
1.0245530605316162,
0.6122965216636658,
0.49663302302360535,
0.6724728345870972,
-2.3279566764831543,
1.3388948440551758,
-1.1555167436599731,
0.21149513125419617,
1.4212965965270996,
-0.9724183678627014,
0.2509204149246216,
-1.7685022354125977,
-0.09804345667362213,
0.5825756192207336,
-2.184730052947998,
0.20035141706466675,
-1.2391756772994995,
-0.48996877670288086,
1.0226601362228394,
0.4017530679702759,
-1.3084168434143066,
0.05395571142435074,
-0.4255386292934418,
0.9808610081672668,
0.5642412304878235,
1.0967847108840942,
-1.782030701637268,
-0.052889227867126465,
-0.35061219334602356,
0.11443930864334106,
-1.384682059288025,
-1.4959551095962524,
0.6302293539047241,
0.6553350687026978,
0.5576657056808472,
-0.04191236197948456,
1.0411138534545898,
-0.9278160333633423,
0.8754075169563293,
-1.0151560306549072,
-1.616409420967102,
-1.4287830591201782,
-2.232109308242798,
-2.3787684440612793,
0.7122238278388977,
-0.5006163120269775,
-0.5824242234230042,
2.020264148712158,
-1.1408617496490479,
-1.8103792667388916,
1.0685945749282837,
0.15497560799121857,
0.02761794440448284,
2.337674617767334,
0.154422327876091,
-0.6433936357498169,
0.4701383411884308,
-0.654642641544342,
0.736036479473114,
-0.34700334072113037,
1.3232295513153076,
0.5362227559089661,
-1.1053911447525024,
1.5554754734039307,
-0.46423104405403137,
0.5077117085456848,
-0.6435575485229492,
-0.543506920337677,
-0.8872656226158142,
0.349582701921463,
1.9477530717849731,
-0.30561235547065735,
1.561824917793274,
-0.3331912159919739,
-1.4909071922302246,
-1.5252598524093628,
0.9198753237724304,
0.47218993306159973,
-0.7752771973609924,
0.12661448121070862,
-0.41804200410842896,
0.11087200045585632,
-0.0533587783575058,
1.1434673070907593,
1.1693934202194214,
0.8013405203819275,
-0.3119793236255646,
-0.8765264749526978,
0.265076607465744,
-0.09538915753364563,
-0.7934719324111938,
-1.7480279207229614,
-0.3621751070022583,
0.09511872380971909,
0.6866816878318787,
-1.1152455806732178,
1.8392304182052612,
0.8539308309555054,
1.8919103145599365,
0.99615877866745,
-0.2746410071849823,
1.3979685306549072,
0.029196692630648613,
1.884080410003662,
-0.5043123364448547,
0.7435745000839233,
-0.36855852603912354,
-1.1936559677124023,
0.8102306723594666,
-0.300776869058609,
-2.026819944381714,
-0.800839900970459,
-0.7923439145088196,
-0.1954789161682129,
-0.8114222288131714,
0.9881077408790588,
-0.3524129390716553,
-1.4077203273773193,
0.2609849274158478,
-0.5747206211090088,
0.1583070009946823,
-1.200303077697754,
0.41684067249298096,
0.7171313762664795,
-0.7116867303848267,
0.022566435858607292,
-0.23258621990680695,
-1.2818517684936523,
-0.45960450172424316,
0.16368472576141357,
1.9939879179000854,
-0.7699074745178223,
1.0249444246292114,
0.9815437197685242,
-0.6955787539482117,
0.012764647603034973,
0.30752328038215637,
-0.26682138442993164,
0.8364760279655457,
-0.9755297303199768,
-0.3546704947948456,
1.3159021139144897,
-0.21187032759189606,
-0.6432958841323853,
1.5186883211135864,
0.7049120664596558,
-0.9485607743263245,
-0.19559818506240845,
-0.24516645073890686,
-0.7953598499298096,
0.08501053601503372,
-1.5247557163238525,
-0.007403266150504351,
0.39628124237060547,
-1.4257539510726929,
-0.4945516884326935,
-0.10728825628757477,
1.2887053489685059,
-0.24081668257713318,
1.3713568449020386,
-0.4301456809043884,
-0.24706967175006866,
-0.38391733169555664,
-0.3104444146156311,
0.09591781347990036,
-0.06974472850561142,
-0.6752249002456665,
0.18955476582050323,
-0.7291768789291382,
0.4014527201652527,
1.386191487312317,
0.36509475111961365,
0.04111618548631668,
0.5361985564231873,
1.1171534061431885,
0.24034109711647034,
-0.013303005136549473,
-0.8675902485847473,
-1.593511700630188,
2.035917282104492,
-1.4549407958984375,
1.960339903831482,
0.6863490343093872,
-0.10334086418151855,
-1.723240613937378,
-1.7694649696350098,
1.3120478391647339,
1.2180078029632568,
2.2829670906066895,
0.5969972014427185,
0.34210917353630066,
-0.8128045797348022,
-0.5554774403572083,
0.4260809123516083,
-0.9868645668029785,
-0.7094219326972961,
0.15143491327762604,
2.3304483890533447,
1.7776826620101929,
-0.45354345440864563,
-0.1941605508327484,
-1.0510997772216797,
1.3224655389785767,
-0.1995837390422821,
0.27184441685676575,
1.950161099433899,
-0.30852481722831726,
-1.1956501007080078,
1.3872761726379395,
-2.315282106399536,
0.1794859915971756,
2.0499298572540283,
0.4048354923725128,
0.05586590617895126,
-1.4001643657684326,
-0.635607123374939,
-0.27383434772491455,
-0.5231519937515259,
-1.2604068517684937,
0.5294164419174194,
-0.3597024083137512,
-0.7717242240905762,
-1.3157309293746948,
0.1389576941728592,
-1.158006191253662,
-1.6816960573196411,
0.30215176939964294,
1.8232077360153198,
2.041539430618286,
-0.6730442643165588,
1.4813226461410522,
-0.25477173924446106,
0.1951667219400406,
1.29117751121521,
1.273056149482727,
3.1350743770599365,
1.8274410963058472,
-1.2635631561279297,
0.7694957852363586,
-0.12366323173046112,
-0.4654337465763092,
1.3073341846466064,
-1.219140887260437,
1.2491443157196045,
-0.18476490676403046,
-1.2471575736999512,
-1.3200651407241821,
0.9603331685066223,
0.37504708766937256,
0.1362302154302597,
-0.5541002154350281,
1.2340681552886963,
0.007574219256639481,
1.2223753929138184,
0.541434109210968,
-0.3656982481479645,
0.548687219619751,
-0.47128334641456604,
-0.5617109537124634,
1.5255132913589478,
0.2471204400062561,
-1.3975573778152466,
-2.292473793029785,
-0.12785379588603973,
-0.7828856706619263,
-0.04252634942531586,
-0.6390125155448914,
-0.9271829128265381,
1.7477781772613525,
0.432416707277298,
-1.3761622905731201,
-0.28664517402648926,
-0.3747364580631256,
-0.6522568464279175,
2.751411199569702,
-1.356680154800415,
-0.1779492199420929,
-1.102476954460144,
-0.6453713178634644,
1.7433691024780273,
-1.2409532070159912,
-0.21535933017730713,
-1.0384225845336914,
-0.608200192451477,
-1.3904650211334229,
-0.5379186272621155,
-0.03250794857740402,
-0.8941047191619873,
0.795682430267334,
0.15647393465042114,
-1.1446055173873901,
-0.41414350271224976,
-0.8211042284965515,
0.9129678010940552,
-0.14633993804454803,
0.23345132172107697,
1.854219675064087,
0.42920732498168945,
-0.39760488271713257,
0.6927574276924133,
1.1570717096328735,
0.6655310988426208,
-0.6073500514030457,
0.1651763617992401,
-0.7558456063270569,
0.37326887249946594,
-1.2477517127990723,
0.3511025905609131,
-2.9110915660858154,
0.6282004117965698,
-0.054398953914642334,
-0.1514163315296173,
-0.0815693810582161,
-1.3346927165985107,
1.04195237159729,
2.680285930633545,
-1.2285971641540527,
0.4525480568408966,
0.2173805832862854,
1.147157073020935,
-1.6317543983459473,
0.2743012607097626,
-0.45363739132881165,
2.14494252204895,
0.2696109414100647,
1.2793716192245483,
-0.4977867901325226,
-2.1965036392211914,
0.7369037866592407,
-1.2244406938552856,
-1.2920869588851929,
0.847899317741394,
-0.8184072375297546,
0.07746201753616333,
-1.358080267906189,
-0.19847425818443298,
-0.8927121162414551,
-1.2405791282653809,
0.9495306611061096,
0.17908969521522522,
0.45269277691841125,
-0.5426859259605408,
0.3772434592247009,
-2.246032476425171,
-1.3454676866531372,
-0.14227141439914703,
-0.9746462106704712,
0.45669659972190857,
-0.30240598320961,
0.6017412543296814,
-0.09042082726955414,
0.06704230606555939,
0.4557611644268036,
1.4929773807525635,
3.448533058166504,
0.27394866943359375,
0.3917558789253235,
-0.19114601612091064,
-0.9641859531402588,
1.4579282999038696,
1.0007179975509644,
-0.12320848554372787,
-0.5528711080551147,
-0.9762434959411621,
1.2153831720352173,
1.867568016052246,
1.0304914712905884,
0.05623169243335724,
-0.8709843158721924,
-0.7220604419708252,
-0.051703810691833496,
0.13966459035873413,
0.5256513953208923,
0.9480366110801697,
0.09514269977807999,
0.15592096745967865,
1.5148545503616333,
1.1258795261383057,
-0.3860492408275604,
0.2810499966144562,
-0.7887672781944275,
-0.40702545642852783,
0.551045298576355,
0.3508340120315552,
0.0013552233576774597,
0.49367424845695496,
-1.007636547088623,
-0.24795761704444885,
-0.31704017519950867,
-0.9747828841209412,
-0.6845195293426514,
-0.48592835664749146,
-0.43075913190841675,
1.592368483543396,
0.006820319220423698,
-0.49164843559265137,
-0.07322408258914948,
-0.8972116708755493,
-0.2111544907093048,
-1.0753374099731445,
0.3026868999004364,
-0.09928327053785324,
-0.23259349167346954,
-0.17088201642036438,
1.724265694618225,
-0.9382063150405884,
-2.0239264965057373,
0.32078900933265686,
0.2777806222438812,
-0.384896844625473,
0.23890143632888794,
1.5386439561843872,
0.5219495296478271,
1.3303877115249634,
1.3745617866516113,
1.0044890642166138,
-0.5638412237167358,
-1.3843432664871216,
0.6956902146339417,
0.8774922490119934,
-1.5045158863067627,
0.9047352075576782,
0.005896933376789093,
-0.5175470113754272,
0.5873076319694519,
1.2233835458755493,
0.5221084356307983,
-1.8197752237319946,
0.7067950367927551,
-0.9462277293205261,
0.7489156723022461,
0.6812064051628113,
0.7753280997276306,
0.16643750667572021,
0.8819032311439514,
-1.2252881526947021,
-1.1911638975143433,
-0.7096025943756104,
-0.7535468339920044,
1.868449330329895,
-0.2009061872959137,
0.661555290222168,
-0.24879246950149536,
-1.232627034187317,
-0.16022813320159912,
0.7056646347045898,
0.30079948902130127,
-0.33236998319625854,
0.891928493976593,
-0.6664466261863708,
-1.0507915019989014,
-1.3514245748519897,
-0.4503623843193054,
-0.9946718215942383,
-0.9145950078964233,
1.1024597883224487,
0.7345631122589111,
0.2629907727241516,
1.848989725112915,
0.5641329288482666,
0.26574480533599854,
-2.6146368980407715,
0.8448929786682129,
0.19961747527122498,
0.01531372033059597,
0.8742574453353882,
0.32394471764564514,
1.0140057802200317,
-0.04300748556852341,
0.5702534914016724,
-2.3715133666992188,
2.2885403633117676,
-0.3253454864025116,
0.6032942533493042,
-0.04369518905878067,
-0.15650635957717896,
1.1364818811416626,
0.6530147194862366,
0.5397799015045166,
-1.1670717000961304,
0.7606045603752136,
-0.6727756261825562,
1.243821382522583,
0.8965592384338379,
-0.9277545809745789,
-0.07907990366220474,
1.4025297164916992,
0.4204457402229309,
-0.42519861459732056,
-0.9018530249595642,
-1.0342885255813599,
0.9984707236289978,
1.6873539686203003,
-0.04879702627658844,
-0.07278495281934738,
0.8478087782859802,
0.674318253993988,
-1.1831717491149902,
0.07291768491268158,
-0.8043254017829895,
-0.7761237025260925,
1.689435362815857,
2.037797451019287,
-0.08659648895263672,
-0.1858866959810257,
-0.6987816095352173,
-1.1056323051452637,
0.8483060598373413,
0.07341105490922928,
-0.0010396391153335571,
0.6151624917984009,
-0.6473375558853149,
1.0937345027923584,
1.0806163549423218,
1.009995460510254,
0.15827704966068268,
0.32384493947029114,
0.2624586820602417,
-0.23749865591526031,
-1.1853617429733276,
-0.2508397698402405,
-1.1205345392227173,
-2.676182508468628,
0.4252063035964966,
-0.3292970061302185,
-1.4443374872207642,
0.1105990782380104,
-1.0793498754501343,
0.7907983660697937,
-0.6326491236686707,
-1.0393527746200562,
-1.4278908967971802,
0.17980536818504333,
-0.04993193596601486,
0.9015636444091797,
-1.603868842124939,
0.032932840287685394,
1.2275480031967163,
0.8957341313362122,
-0.5957642197608948,
0.9819375276565552,
0.25498053431510925,
1.011957049369812,
0.8617643117904663,
-0.44758933782577515,
0.5204659700393677,
0.13446976244449615,
-1.3838995695114136,
0.4846633970737457,
1.112259030342102,
0.2664118707180023,
1.57688570022583,
-0.45367902517318726,
0.05890192091464996,
0.33354651927948,
-0.642848551273346,
-0.41346675157546997,
-0.6322675943374634,
0.8566454648971558,
0.14957262575626373,
-0.8382834196090698,
0.05401286482810974,
-0.14233580231666565,
-0.29075896739959717,
0.22670893371105194,
-1.5072351694107056,
-0.2077631801366806,
-0.327698677778244,
-0.5411177277565002,
-1.1934967041015625,
-0.1323733627796173,
1.3730720281600952,
-0.8372772336006165,
-0.0827583521604538,
0.4198951721191406,
0.3561764359474182,
0.5044727325439453,
0.6103161573410034,
-0.6155491471290588,
-0.3228338658809662,
-0.26513993740081787,
-0.3115810751914978,
0.2725648880004883,
1.294952154159546,
-0.11429082602262497,
-1.0410418510437012,
0.81418377161026,
-0.22733180224895477,
0.0681108757853508,
1.8006137609481812,
0.024803271517157555,
-0.7335637807846069,
0.3169102370738983,
-0.6712039113044739,
1.9565517902374268,
1.6439039707183838,
1.2898715734481812,
-0.13714227080345154,
-0.9260020852088928,
0.5792586803436279,
-0.35328856110572815,
-0.35277724266052246,
0.8211070895195007,
0.4061560034751892,
-0.23226679861545563,
-1.3200759887695312,
0.6901581883430481,
1.18109130859375,
-0.8490126132965088,
-0.7331798672676086,
0.033493369817733765,
-0.7314618229866028,
1.1114271879196167,
0.6145500540733337,
0.37985172867774963,
0.34060990810394287,
1.6648571491241455,
0.6547129154205322,
-0.3605203330516815,
0.4322598874568939,
0.4906318187713623,
-0.13746392726898193,
-2.1231789588928223,
-1.082715630531311,
0.36076292395591736,
-0.5381842851638794,
-1.5625089406967163,
1.2801244258880615,
-1.1575435400009155,
-0.928081750869751,
0.5840402841567993,
0.1283869594335556,
1.576432466506958,
0.331402450799942,
1.5519673824310303,
2.0946478843688965,
0.8476493954658508,
0.3065233528614044,
1.2868390083312988,
-0.0773460641503334,
-0.35171329975128174,
1.7855926752090454,
-0.37949132919311523,
0.508284330368042,
1.1415386199951172,
-0.22944557666778564,
-1.032627820968628,
-0.8116652369499207,
-1.3162821531295776,
-0.674187421798706,
1.1198489665985107,
0.09617942571640015,
-1.1856633424758911,
0.1710471212863922,
1.5158377885818481,
0.06483028084039688,
-0.09872011840343475,
0.5920988917350769,
0.38793477416038513,
-0.8117325901985168,
-0.018986046314239502,
-0.839794933795929,
0.4935208261013031,
-0.2037731260061264,
-0.39924901723861694,
0.3315682113170624,
0.49307242035865784,
1.2622871398925781,
0.0024073636159300804,
0.14773951470851898,
1.1607871055603027,
-1.4368375539779663,
1.503321647644043,
-0.631527841091156,
0.23859427869319916,
-2.357490062713623,
1.4142273664474487,
-0.8386080265045166,
1.8657406568527222,
-2.6783628463745117,
0.3880887031555176,
-0.5279324650764465,
-0.5411592125892639,
0.3675887882709503,
-0.4683060348033905,
0.11642063409090042,
-0.2102092057466507,
-1.0536854267120361,
0.008982528001070023,
-0.7516024708747864,
0.5235689878463745,
1.0454210042953491,
1.3630019426345825,
-1.1758179664611816,
-0.33227404952049255,
-1.8117549419403076,
-0.08345261961221695,
-0.6001482009887695,
0.3923548758029938,
-2.019829034805298,
-0.01704232394695282,
-2.011223793029785,
-2.3626251220703125,
-1.2608816623687744,
-0.7572118043899536,
1.1137158870697021,
0.0803600326180458,
-0.8486548066139221,
1.1304879188537598,
-0.3605707883834839,
-1.7809556722640991,
1.005886197090149,
-2.1532459259033203
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
My plan is to skip examples by default to not end up with duplicates.
And if a dataset has a number of shards that is a factor of the world size, then I'd make it more optimized by distributing the shards evenly across nodes instead.
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 45 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
My plan is to skip examples by default to not end up with duplicates.
And if a dataset has a number of shards that is a factor of the world size, then I'd make it more optimized by distributing the shards evenly across nodes instead.
|
[
-1.325636863708496,
-0.9164933562278748,
-0.8207869529724121,
1.4739124774932861,
-0.19144713878631592,
-1.3338234424591064,
0.09250319749116898,
-1.1914547681808472,
1.698036789894104,
-0.8442822098731995,
0.3746383786201477,
-1.744189739227295,
0.08582194894552231,
-0.49747714400291443,
-0.7776312828063965,
-0.9358640909194946,
-0.3820062279701233,
-0.8028241991996765,
1.006701111793518,
2.51578950881958,
1.1654558181762695,
-1.282930612564087,
2.688093900680542,
0.7250012159347534,
-0.32392802834510803,
-1.080289363861084,
0.5662844181060791,
0.04709223285317421,
-1.2409627437591553,
-0.43366706371307373,
-0.9729785919189453,
-0.08900941163301468,
-0.5593189001083374,
-0.5599420666694641,
0.011560237966477871,
0.3763829469680786,
-0.19255205988883972,
-0.37266668677330017,
-0.3964383602142334,
-0.7358093857765198,
0.44560331106185913,
-0.31797507405281067,
0.9329932332038879,
-0.4054143726825714,
1.748038411140442,
-0.5872799158096313,
0.3401610851287842,
0.6699216961860657,
1.5944596529006958,
0.25746023654937744,
-0.13352516293525696,
0.21175287663936615,
0.36319825053215027,
-0.04190584644675255,
0.3816220760345459,
0.984234631061554,
0.5342350006103516,
0.518868088722229,
0.6386770009994507,
-2.3021554946899414,
1.308279275894165,
-1.1739342212677002,
0.19622914493083954,
1.4209270477294922,
-0.9992939829826355,
0.2849850654602051,
-1.8227933645248413,
-0.05652301013469696,
0.5392608046531677,
-2.268568277359009,
0.22919365763664246,
-1.1650333404541016,
-0.5276555418968201,
0.994204044342041,
0.3503604829311371,
-1.3756754398345947,
0.10426729917526245,
-0.4428842067718506,
0.9850793480873108,
0.5354872941970825,
1.1654971837997437,
-1.715417742729187,
-0.032305777072906494,
-0.3834288418292999,
0.07968442142009735,
-1.412475347518921,
-1.4127516746520996,
0.6212590336799622,
0.689917266368866,
0.5529775023460388,
0.08298923075199127,
0.9086633920669556,
-0.9230886697769165,
0.8563181161880493,
-0.9236270189285278,
-1.6155128479003906,
-1.4871065616607666,
-2.2201085090637207,
-2.388240098953247,
0.7463657855987549,
-0.5512446165084839,
-0.6373305916786194,
1.9683730602264404,
-1.0869442224502563,
-1.8514891862869263,
1.0594481229782104,
0.19851261377334595,
0.02891949564218521,
2.456206798553467,
0.13770850002765656,
-0.5963736772537231,
0.4745255410671234,
-0.6743724942207336,
0.7624462842941284,
-0.4595036804676056,
1.3769147396087646,
0.453139066696167,
-1.0151607990264893,
1.6815385818481445,
-0.4500505030155182,
0.6279712319374084,
-0.6810804009437561,
-0.5486001372337341,
-0.9504752159118652,
0.4216003715991974,
1.9796222448349,
-0.29583749175071716,
1.5314140319824219,
-0.399538516998291,
-1.4376286268234253,
-1.5523769855499268,
0.9516151547431946,
0.4442509114742279,
-0.8152313232421875,
0.11747817695140839,
-0.3970220386981964,
0.11633380502462387,
-0.04265449568629265,
1.024449348449707,
1.202879786491394,
0.7661551237106323,
-0.28209567070007324,
-0.959458589553833,
0.2999677360057831,
-0.07552140206098557,
-0.7886633276939392,
-1.7976301908493042,
-0.3151143491268158,
0.06971832364797592,
0.6584105491638184,
-1.1188380718231201,
1.775191307067871,
0.8852860927581787,
1.989358901977539,
0.9099982976913452,
-0.3746156692504883,
1.378663420677185,
-0.0022239303216338158,
1.9150699377059937,
-0.5167850255966187,
0.7719436287879944,
-0.3410986363887787,
-1.1647205352783203,
0.7969769239425659,
-0.29055535793304443,
-2.0377185344696045,
-0.8507143259048462,
-0.7594532370567322,
-0.275482714176178,
-0.7891010046005249,
1.0496472120285034,
-0.31603801250457764,
-1.3599640130996704,
0.27947720885276794,
-0.5390406847000122,
0.1745494306087494,
-1.2676916122436523,
0.37889987230300903,
0.7663875818252563,
-0.6725308299064636,
0.011192322708666325,
-0.23693260550498962,
-1.375071406364441,
-0.4554038643836975,
0.14187805354595184,
1.9867020845413208,
-0.7783843874931335,
1.0073130130767822,
0.9145352244377136,
-0.6832109093666077,
0.04452122375369072,
0.283928245306015,
-0.2655240595340729,
0.8323667645454407,
-0.945362389087677,
-0.3858462870121002,
1.2954415082931519,
-0.23386646807193756,
-0.6091244220733643,
1.502985954284668,
0.7613270282745361,
-0.9496898055076599,
-0.1880224496126175,
-0.32252469658851624,
-0.7308411598205566,
0.09250269085168839,
-1.6014775037765503,
0.03014601394534111,
0.2459375113248825,
-1.3867243528366089,
-0.5029498338699341,
-0.12677772343158722,
1.2187678813934326,
-0.24892060458660126,
1.3923311233520508,
-0.3326526880264282,
-0.18271870911121368,
-0.43557387590408325,
-0.2981630265712738,
0.08584870398044586,
-0.14168883860111237,
-0.6369026899337769,
0.28847959637641907,
-0.7376370429992676,
0.4530462622642517,
1.3496090173721313,
0.37241607904434204,
0.12776917219161987,
0.5027722716331482,
1.0226294994354248,
0.2760002017021179,
-0.06097317487001419,
-0.906272292137146,
-1.586610198020935,
2.0630385875701904,
-1.4282203912734985,
1.9598251581192017,
0.6924325227737427,
-0.11308896541595459,
-1.7250505685806274,
-1.7954392433166504,
1.3221461772918701,
1.2592453956604004,
2.254981756210327,
0.6652566194534302,
0.3260192573070526,
-0.832118570804596,
-0.525803804397583,
0.4034501016139984,
-1.0091277360916138,
-0.7391306757926941,
0.13688474893569946,
2.3208136558532715,
1.745442509651184,
-0.472266286611557,
-0.13589562475681305,
-1.042749285697937,
1.260679006576538,
-0.1536964625120163,
0.27378809452056885,
2.004145622253418,
-0.3344583809375763,
-1.1835501194000244,
1.2925992012023926,
-2.332082509994507,
0.16760718822479248,
1.9918310642242432,
0.39631056785583496,
0.11382318288087845,
-1.4851596355438232,
-0.6271310448646545,
-0.24014204740524292,
-0.4472102224826813,
-1.2700227499008179,
0.5751948356628418,
-0.3010234236717224,
-0.8668460845947266,
-1.4432910680770874,
0.16834117472171783,
-1.2117090225219727,
-1.6006649732589722,
0.3635064363479614,
1.7890326976776123,
2.0726537704467773,
-0.7958726286888123,
1.438780426979065,
-0.17667177319526672,
0.1407572329044342,
1.196213960647583,
1.2026952505111694,
3.014561414718628,
1.8449820280075073,
-1.1773864030838013,
0.7609386444091797,
-0.19427454471588135,
-0.4677531123161316,
1.2882107496261597,
-1.1823145151138306,
1.2655991315841675,
-0.20104427635669708,
-1.162760853767395,
-1.3004603385925293,
0.9073087573051453,
0.4109092354774475,
0.1470562219619751,
-0.5460851788520813,
1.2046912908554077,
0.0734393522143364,
1.2195262908935547,
0.4637638032436371,
-0.3219931721687317,
0.48784059286117554,
-0.46841326355934143,
-0.48651018738746643,
1.5636509656906128,
0.28448235988616943,
-1.355594277381897,
-2.2848455905914307,
-0.1707654595375061,
-0.7608020901679993,
-0.10283580422401428,
-0.5941880345344543,
-0.9889830946922302,
1.7368136644363403,
0.38739103078842163,
-1.2976679801940918,
-0.3506028652191162,
-0.36084046959877014,
-0.6788678169250488,
2.7174723148345947,
-1.4511207342147827,
-0.21427828073501587,
-1.0606220960617065,
-0.5198268890380859,
1.7650799751281738,
-1.2587096691131592,
-0.11623713374137878,
-1.0560325384140015,
-0.6122437119483948,
-1.35238516330719,
-0.4752037525177002,
-0.0047447835095226765,
-0.948654294013977,
0.7755922675132751,
0.24088707566261292,
-1.1808205842971802,
-0.42872026562690735,
-0.8429757356643677,
0.8652222752571106,
-0.08986395597457886,
0.2820088565349579,
1.8548141717910767,
0.43650543689727783,
-0.37027984857559204,
0.7517983913421631,
1.11240816116333,
0.6078570485115051,
-0.6526475548744202,
0.19010867178440094,
-0.7837474942207336,
0.440264493227005,
-1.2290115356445312,
0.3462090492248535,
-2.9112908840179443,
0.5968344211578369,
-0.03704521432518959,
-0.11332997679710388,
-0.08215928077697754,
-1.2716103792190552,
1.1522512435913086,
2.707181930541992,
-1.2182296514511108,
0.5060737729072571,
0.18691791594028473,
1.231231927871704,
-1.5507415533065796,
0.24460838735103607,
-0.45627790689468384,
2.197726011276245,
0.2707720994949341,
1.189645528793335,
-0.5455876588821411,
-2.2281410694122314,
0.7755504846572876,
-1.2374907732009888,
-1.2609798908233643,
0.7591843605041504,
-0.8629561066627502,
-0.024886559695005417,
-1.4144200086593628,
-0.14285707473754883,
-0.9863909482955933,
-1.3032946586608887,
0.8885869383811951,
0.1903049647808075,
0.4973442256450653,
-0.6099154949188232,
0.3449353277683258,
-2.2590105533599854,
-1.4046754837036133,
-0.1996510624885559,
-1.0094172954559326,
0.39478448033332825,
-0.3075619339942932,
0.5729019641876221,
-0.07943214476108551,
0.07393046468496323,
0.4324115514755249,
1.519861102104187,
3.4944019317626953,
0.21658825874328613,
0.39007070660591125,
-0.198984295129776,
-0.9504349827766418,
1.5081207752227783,
1.097826600074768,
-0.0935179591178894,
-0.5694776773452759,
-0.8766092658042908,
1.246643304824829,
1.9619990587234497,
1.0201687812805176,
0.06526505202054977,
-0.9377312064170837,
-0.6604281663894653,
-0.0973053053021431,
0.1738564670085907,
0.5087249875068665,
1.0560235977172852,
0.0516328401863575,
0.15784868597984314,
1.5511518716812134,
1.228928804397583,
-0.4484591484069824,
0.2648852467536926,
-0.8127943873405457,
-0.36500176787376404,
0.5294457077980042,
0.3999916613101959,
0.012393609620630741,
0.48107072710990906,
-1.0034598112106323,
-0.2823731005191803,
-0.3462873697280884,
-0.9984889030456543,
-0.7319377064704895,
-0.39889222383499146,
-0.3493820130825043,
1.6151971817016602,
0.05015190318226814,
-0.5132194757461548,
-0.07342002540826797,
-0.8830452561378479,
-0.09535730630159378,
-1.015110969543457,
0.2596426010131836,
-0.11291239410638809,
-0.20807743072509766,
-0.1091802641749382,
1.7693032026290894,
-0.9827887415885925,
-2.078782081604004,
0.3421635627746582,
0.3161809742450714,
-0.40885934233665466,
0.29165345430374146,
1.4942452907562256,
0.53629070520401,
1.3388117551803589,
1.3737034797668457,
0.9751415848731995,
-0.5848746299743652,
-1.427619457244873,
0.6579814553260803,
0.9011379480361938,
-1.5028070211410522,
0.898834228515625,
0.07395630329847336,
-0.5003501176834106,
0.6154651641845703,
1.2104429006576538,
0.44342878460884094,
-1.8619565963745117,
0.7724838852882385,
-0.953151285648346,
0.8158769607543945,
0.6574346423149109,
0.7684062123298645,
0.19775494933128357,
0.8571856021881104,
-1.1528042554855347,
-1.140980839729309,
-0.8396287560462952,
-0.745600700378418,
1.8673813343048096,
-0.2637089788913727,
0.6491515040397644,
-0.14974413812160492,
-1.2204211950302124,
-0.2022044062614441,
0.7237907648086548,
0.2803964614868164,
-0.31398385763168335,
0.9325041174888611,
-0.6037194728851318,
-1.1163057088851929,
-1.3877631425857544,
-0.48736992478370667,
-0.9449235796928406,
-0.9343746304512024,
1.0866738557815552,
0.7766802906990051,
0.254126638174057,
1.8225657939910889,
0.5551925301551819,
0.24353168904781342,
-2.63896107673645,
0.8975934386253357,
0.31454625725746155,
0.06296294182538986,
0.8866819739341736,
0.29087844491004944,
1.0014898777008057,
-0.06317964196205139,
0.5630484819412231,
-2.2809205055236816,
2.3280253410339355,
-0.24357426166534424,
0.6599233150482178,
-0.019679635763168335,
-0.10286971926689148,
1.0919227600097656,
0.6175099611282349,
0.5663039684295654,
-1.2219383716583252,
0.827258288860321,
-0.6841296553611755,
1.2882106304168701,
0.8854190707206726,
-0.8104445338249207,
-0.04505511373281479,
1.3122745752334595,
0.4578709304332733,
-0.3790011703968048,
-0.9479762315750122,
-0.9465194344520569,
1.0470613241195679,
1.7295856475830078,
-0.04125286266207695,
-0.0593317374587059,
0.7535803318023682,
0.5929660201072693,
-1.1895545721054077,
-0.022838179022073746,
-0.829562246799469,
-0.7351688146591187,
1.6671627759933472,
2.0199551582336426,
-0.07784062623977661,
-0.221236914396286,
-0.6752265691757202,
-1.1796541213989258,
0.8065561652183533,
0.03912239149212837,
0.07490657269954681,
0.6501795053482056,
-0.7260875701904297,
1.212515950202942,
0.9696937203407288,
1.021437644958496,
0.02138996496796608,
0.3155379295349121,
0.289106547832489,
-0.32042109966278076,
-1.090863585472107,
-0.2565741240978241,
-1.1495743989944458,
-2.576519012451172,
0.3484033942222595,
-0.31110671162605286,
-1.3902934789657593,
0.08130786567926407,
-1.0870674848556519,
0.8393120169639587,
-0.5906338095664978,
-1.0133730173110962,
-1.3791903257369995,
0.14148661494255066,
-0.04974178969860077,
0.872956395149231,
-1.5856781005859375,
0.04899236932396889,
1.276586651802063,
0.9522273540496826,
-0.6064424514770508,
1.0103155374526978,
0.24925543367862701,
1.021108865737915,
0.8373204469680786,
-0.3988102078437805,
0.43544119596481323,
0.11452503502368927,
-1.3222588300704956,
0.4604647755622864,
1.12924325466156,
0.27301260828971863,
1.4956108331680298,
-0.5031941533088684,
0.04380757361650467,
0.33960527181625366,
-0.5902215242385864,
-0.38347944617271423,
-0.592113196849823,
0.8804177641868591,
0.17538079619407654,
-0.9320899844169617,
0.031505391001701355,
-0.17749342322349548,
-0.2363579124212265,
0.21739603579044342,
-1.486180305480957,
-0.32951438426971436,
-0.3655061721801758,
-0.47562211751937866,
-1.2077637910842896,
-0.040668733417987823,
1.3556866645812988,
-0.8014272451400757,
-0.11804641783237457,
0.46053868532180786,
0.40745025873184204,
0.515300989151001,
0.6106685400009155,
-0.5709476470947266,
-0.37742888927459717,
-0.2377457618713379,
-0.21968966722488403,
0.28737419843673706,
1.2378665208816528,
-0.16984261572360992,
-1.0110441446304321,
0.8308124542236328,
-0.2544441223144531,
0.009464995004236698,
1.8566124439239502,
0.007120565511286259,
-0.8364167213439941,
0.31902217864990234,
-0.5763464570045471,
1.969793677330017,
1.6048734188079834,
1.2727800607681274,
-0.1430496722459793,
-0.9359030723571777,
0.5955010652542114,
-0.3260367512702942,
-0.3154803216457367,
0.7136030197143555,
0.4609357714653015,
-0.2661728262901306,
-1.3670722246170044,
0.5482836365699768,
1.2023470401763916,
-0.8563153743743896,
-0.7589708566665649,
0.014559308998286724,
-0.7123509049415588,
1.089523196220398,
0.7366020679473877,
0.3947864770889282,
0.2978280484676361,
1.5949293375015259,
0.6344833374023438,
-0.41063132882118225,
0.3834262788295746,
0.48376744985580444,
-0.14350517094135284,
-2.0615124702453613,
-1.0979597568511963,
0.30604931712150574,
-0.4812416434288025,
-1.5002446174621582,
1.216242790222168,
-1.215973973274231,
-0.8807443976402283,
0.5368740558624268,
0.15905509889125824,
1.5599981546401978,
0.30705562233924866,
1.595528483390808,
2.084930896759033,
1.0026355981826782,
0.25761255621910095,
1.31782066822052,
-0.04562187194824219,
-0.3611590266227722,
1.8767143487930298,
-0.3486939072608948,
0.4320433735847473,
1.1254371404647827,
-0.29291385412216187,
-0.9457575082778931,
-0.8485321998596191,
-1.288757562637329,
-0.6035176515579224,
1.1864235401153564,
0.13674204051494598,
-1.2385127544403076,
0.18191146850585938,
1.5112996101379395,
0.07104163616895676,
-0.1539345532655716,
0.5649895668029785,
0.5027921795845032,
-0.8530833125114441,
0.025283709168434143,
-0.8305044770240784,
0.4726121127605438,
-0.17314556241035461,
-0.41062965989112854,
0.3956398665904999,
0.46645137667655945,
1.2506581544876099,
-0.028301257640123367,
0.1750599890947342,
1.1219981908798218,
-1.4721238613128662,
1.5004448890686035,
-0.665488600730896,
0.2103286236524582,
-2.3787741661071777,
1.4023581743240356,
-0.7550870776176453,
1.8601057529449463,
-2.6972832679748535,
0.3590133786201477,
-0.5905217528343201,
-0.46481838822364807,
0.37553727626800537,
-0.46642616391181946,
0.14402833580970764,
-0.16205355525016785,
-1.0656577348709106,
0.046141866594552994,
-0.8236551880836487,
0.4659183621406555,
1.0380719900131226,
1.219602346420288,
-1.042790412902832,
-0.3523390293121338,
-1.8216447830200195,
-0.10122330486774445,
-0.605132520198822,
0.4220140874385834,
-2.0640981197357178,
-0.07007617503404617,
-2.0706169605255127,
-2.2421629428863525,
-1.3536715507507324,
-0.8048807382583618,
1.0889862775802612,
0.0884471982717514,
-0.7908472418785095,
1.095472812652588,
-0.371805876493454,
-1.7464714050292969,
1.039533019065857,
-2.1645452976226807
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
Opened a PR here: https://github.com/huggingface/datasets/pull/5369
feel free to play with it and share your feedbacks :)
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 16 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Opened a PR here: https://github.com/huggingface/datasets/pull/5369
feel free to play with it and share your feedbacks :)
|
[
-1.318827509880066,
-0.9129341840744019,
-0.7674424648284912,
1.5067760944366455,
-0.1617230623960495,
-1.2709053754806519,
0.08908992260694504,
-1.1039825677871704,
1.6272544860839844,
-0.6929435729980469,
0.3575601875782013,
-1.7100776433944702,
0.030399253591895103,
-0.5237666964530945,
-0.7883247137069702,
-0.8681169748306274,
-0.45547547936439514,
-0.8131129741668701,
0.9677973389625549,
2.413094997406006,
1.2554374933242798,
-1.3441015481948853,
2.673820734024048,
0.7581871747970581,
-0.28697577118873596,
-1.0466374158859253,
0.5223827362060547,
0.08029460906982422,
-1.258629322052002,
-0.42217496037483215,
-0.9823639392852783,
-0.13758248090744019,
-0.5007373690605164,
-0.6059526801109314,
0.023899542167782784,
0.46984806656837463,
-0.14770567417144775,
-0.3173997104167938,
-0.45086905360221863,
-0.7531422972679138,
0.458368718624115,
-0.2751538157463074,
0.8655853867530823,
-0.4319036602973938,
1.7272101640701294,
-0.5528620481491089,
0.38074302673339844,
0.6170124411582947,
1.5452896356582642,
0.18286041915416718,
-0.10563042759895325,
0.2575730085372925,
0.35932302474975586,
-0.001952380407601595,
0.4480489492416382,
1.0873332023620605,
0.5956817865371704,
0.5201554298400879,
0.6339448094367981,
-2.302319288253784,
1.226758360862732,
-1.0882657766342163,
0.19487813115119934,
1.4775331020355225,
-1.0527137517929077,
0.23965030908584595,
-1.8384861946105957,
-0.12311050295829773,
0.5720417499542236,
-2.271232843399048,
0.21331451833248138,
-1.140016794204712,
-0.5232649445533752,
1.0393816232681274,
0.3296663463115692,
-1.368383526802063,
0.12156330049037933,
-0.4054981768131256,
1.0097336769104004,
0.5632816553115845,
1.1856297254562378,
-1.6668987274169922,
0.09375842660665512,
-0.29068854451179504,
0.016521133482456207,
-1.3926138877868652,
-1.4477434158325195,
0.5561956167221069,
0.6450270414352417,
0.6521417498588562,
-0.003398158587515354,
0.9255810976028442,
-0.9349911212921143,
0.9524304270744324,
-0.961199164390564,
-1.5883039236068726,
-1.4160932302474976,
-2.266993999481201,
-2.3923025131225586,
0.8295647501945496,
-0.532097578048706,
-0.5271826982498169,
1.9347259998321533,
-1.0092439651489258,
-1.8998900651931763,
1.023097276687622,
0.31059950590133667,
0.06087078899145126,
2.3486154079437256,
0.20773659646511078,
-0.574460506439209,
0.4432504177093506,
-0.6908278465270996,
0.7841475009918213,
-0.3864409923553467,
1.3930554389953613,
0.5326854586601257,
-0.9594200253486633,
1.6579573154449463,
-0.4907519519329071,
0.6061800122261047,
-0.6846216917037964,
-0.58326256275177,
-0.8672968149185181,
0.34960347414016724,
2.013225555419922,
-0.3692823350429535,
1.555618405342102,
-0.4403035044670105,
-1.518680453300476,
-1.4486578702926636,
0.9078850746154785,
0.47696778178215027,
-0.8730407357215881,
0.09323497861623764,
-0.41527464985847473,
0.07498543709516525,
-0.03558140993118286,
1.0686854124069214,
1.229974389076233,
0.7522177696228027,
-0.34219300746917725,
-0.9347029328346252,
0.22236433625221252,
-0.046786874532699585,
-0.7860549092292786,
-1.7416189908981323,
-0.3116007149219513,
0.1789744645357132,
0.6136634349822998,
-1.2435911893844604,
1.8049222230911255,
0.8585007190704346,
2.0342769622802734,
0.8581416010856628,
-0.40613028407096863,
1.394399881362915,
-0.10367307811975479,
1.9727882146835327,
-0.5761997103691101,
0.6770280003547668,
-0.3098222315311432,
-1.1902493238449097,
0.8403587341308594,
-0.3023326098918915,
-2.0205655097961426,
-0.8133100271224976,
-0.8315334320068359,
-0.21067053079605103,
-0.738558292388916,
1.0816701650619507,
-0.2743544280529022,
-1.4034901857376099,
0.17601966857910156,
-0.5835850238800049,
0.18590226769447327,
-1.2535881996154785,
0.24539414048194885,
0.8106036186218262,
-0.7251555919647217,
-0.04451993107795715,
-0.2518691420555115,
-1.3809798955917358,
-0.460618793964386,
0.2674388289451599,
1.9870026111602783,
-0.7179509401321411,
1.0393203496932983,
0.946072518825531,
-0.7735803127288818,
0.10153843462467194,
0.20799113810062408,
-0.28343629837036133,
0.7945364713668823,
-1.0520493984222412,
-0.4542728662490845,
1.324919581413269,
-0.15021151304244995,
-0.7150123119354248,
1.4529753923416138,
0.812376856803894,
-0.982761561870575,
-0.21816255152225494,
-0.24989183247089386,
-0.7062105536460876,
0.02886776067316532,
-1.5970056056976318,
-0.045044779777526855,
0.19162175059318542,
-1.3756036758422852,
-0.5297686457633972,
-0.13684675097465515,
1.2714983224868774,
-0.2581383287906647,
1.4016858339309692,
-0.27872753143310547,
-0.22607174515724182,
-0.43559011816978455,
-0.3979720175266266,
0.06163109093904495,
-0.14612719416618347,
-0.6198447942733765,
0.2703264355659485,
-0.8066713213920593,
0.43406230211257935,
1.4361988306045532,
0.3660341799259186,
0.12976622581481934,
0.564594566822052,
1.0338894128799438,
0.31864017248153687,
-0.08149680495262146,
-0.872780978679657,
-1.6084182262420654,
1.985394835472107,
-1.453997015953064,
1.9487661123275757,
0.6134046912193298,
-0.18471546471118927,
-1.7450968027114868,
-1.8314390182495117,
1.311657190322876,
1.2408052682876587,
2.3566577434539795,
0.6204173564910889,
0.36125025153160095,
-0.8310139179229736,
-0.5875470042228699,
0.39141783118247986,
-1.0308676958084106,
-0.6946122646331787,
0.15817375481128693,
2.3116800785064697,
1.7677829265594482,
-0.5407131910324097,
-0.1865874081850052,
-1.006067156791687,
1.191150188446045,
-0.19470201432704926,
0.3361181914806366,
1.9945948123931885,
-0.3146454393863678,
-1.1323164701461792,
1.2987436056137085,
-2.3995697498321533,
0.21211788058280945,
2.032550096511841,
0.4817787706851959,
0.1631675362586975,
-1.4531832933425903,
-0.6557896733283997,
-0.24045659601688385,
-0.5552365779876709,
-1.2087215185165405,
0.6009695529937744,
-0.30463454127311707,
-0.9569973349571228,
-1.319329857826233,
0.1267721951007843,
-1.1429688930511475,
-1.7417271137237549,
0.48382315039634705,
1.8586745262145996,
2.0140771865844727,
-0.7914707064628601,
1.441957950592041,
-0.22863619029521942,
0.07294614613056183,
1.244350790977478,
1.2475838661193848,
2.958552360534668,
1.9023056030273438,
-1.1619672775268555,
0.9086641669273376,
-0.17697733640670776,
-0.4361096918582916,
1.3230377435684204,
-1.1417686939239502,
1.2440760135650635,
-0.23855465650558472,
-1.2085072994232178,
-1.3050748109817505,
0.9638842940330505,
0.4328518807888031,
0.15924935042858124,
-0.5321316719055176,
1.2091569900512695,
0.12879684567451477,
1.1897194385528564,
0.5427882671356201,
-0.4097938537597656,
0.5422856211662292,
-0.4244506061077118,
-0.4872343838214874,
1.5900828838348389,
0.23354977369308472,
-1.404920220375061,
-2.277388572692871,
-0.14005433022975922,
-0.7685956954956055,
-0.19661572575569153,
-0.6860584616661072,
-0.9709950685501099,
1.7185198068618774,
0.4714144468307495,
-1.3112232685089111,
-0.3199598789215088,
-0.33732298016548157,
-0.565462052822113,
2.7166824340820312,
-1.435315728187561,
-0.17629475891590118,
-1.0391961336135864,
-0.5088555812835693,
1.788173794746399,
-1.148160457611084,
-0.19216080009937286,
-1.0080091953277588,
-0.6869785189628601,
-1.4226192235946655,
-0.5374921560287476,
0.05872451514005661,
-0.8538165092468262,
0.7310502529144287,
0.10886429250240326,
-1.1400896310806274,
-0.39357948303222656,
-0.8394330143928528,
0.9708400368690491,
-0.1425209641456604,
0.23322510719299316,
1.9110084772109985,
0.4157634973526001,
-0.3330177366733551,
0.8011828660964966,
1.1464570760726929,
0.5566846132278442,
-0.5981902480125427,
0.20674143731594086,
-0.7021456360816956,
0.4404712915420532,
-1.3456329107284546,
0.23440441489219666,
-2.9463388919830322,
0.6346538662910461,
-0.11718349158763885,
-0.08254094421863556,
-0.06460005789995193,
-1.3444329500198364,
1.1773279905319214,
2.670905590057373,
-1.263515591621399,
0.4968635141849518,
0.32213976979255676,
1.1303998231887817,
-1.517314076423645,
0.2689623236656189,
-0.48451754450798035,
2.1414120197296143,
0.19842611253261566,
1.2215744256973267,
-0.6291718482971191,
-2.0408523082733154,
0.766053318977356,
-1.1888000965118408,
-1.210079312324524,
0.7681763172149658,
-0.8112112283706665,
0.11829359829425812,
-1.4496670961380005,
-0.11869841814041138,
-0.9643930196762085,
-1.3164674043655396,
0.8755548596382141,
0.20729218423366547,
0.4092922508716583,
-0.5797807574272156,
0.4361356794834137,
-2.2258517742156982,
-1.3571126461029053,
-0.17080499231815338,
-1.0272667407989502,
0.4436160922050476,
-0.3730725347995758,
0.5275030732154846,
0.00008115451782941818,
0.05727801471948624,
0.3503090739250183,
1.3868228197097778,
3.4609463214874268,
0.2025245577096939,
0.25647056102752686,
-0.17086757719516754,
-1.0018023252487183,
1.5321002006530762,
1.094003438949585,
-0.08417025953531265,
-0.5731804966926575,
-0.8170474767684937,
1.251495122909546,
1.9763365983963013,
1.1205228567123413,
0.01078486442565918,
-0.988784909248352,
-0.6911752820014954,
-0.011327975429594517,
0.19094356894493103,
0.460223913192749,
1.059913158416748,
-0.052273064851760864,
0.08959368616342545,
1.5120322704315186,
1.1938124895095825,
-0.36314767599105835,
0.3033771216869354,
-0.9133309125900269,
-0.32145580649375916,
0.4942874014377594,
0.37728971242904663,
0.08100221306085587,
0.497087687253952,
-1.0121185779571533,
-0.23432935774326324,
-0.2924979329109192,
-0.9717998504638672,
-0.7203847169876099,
-0.39013633131980896,
-0.38859421014785767,
1.6387571096420288,
-0.032642439007759094,
-0.5166710615158081,
-0.009937151335179806,
-0.8316577076911926,
-0.11441885679960251,
-1.001465916633606,
0.286827951669693,
-0.05274130403995514,
-0.10840405523777008,
-0.18067659437656403,
1.6639782190322876,
-1.0252314805984497,
-2.1334187984466553,
0.3399766981601715,
0.336625337600708,
-0.46103426814079285,
0.27499932050704956,
1.5448834896087646,
0.5322033762931824,
1.325635313987732,
1.3468319177627563,
1.0098330974578857,
-0.5946964621543884,
-1.3846725225448608,
0.7109827399253845,
0.9484333992004395,
-1.4670207500457764,
0.8412382006645203,
0.006620816886425018,
-0.45592302083969116,
0.6661906838417053,
1.2072643041610718,
0.37983444333076477,
-1.8968510627746582,
0.7685904502868652,
-0.8860963582992554,
0.8301461935043335,
0.5528888702392578,
0.7889554500579834,
0.14223481714725494,
0.9596869349479675,
-1.2052834033966064,
-1.1295675039291382,
-0.7927390933036804,
-0.7377877235412598,
1.8810874223709106,
-0.154825359582901,
0.6083936095237732,
-0.15456289052963257,
-1.2276945114135742,
-0.19183537364006042,
0.7522416114807129,
0.26217105984687805,
-0.39632508158683777,
0.942785918712616,
-0.5643683671951294,
-0.998173177242279,
-1.3339141607284546,
-0.5392177104949951,
-0.9014232754707336,
-0.9328656196594238,
1.0598299503326416,
0.729957103729248,
0.3536173403263092,
1.887794852256775,
0.47344595193862915,
0.27669528126716614,
-2.703016757965088,
0.9333034157752991,
0.30279549956321716,
0.020931806415319443,
0.8971053957939148,
0.28672945499420166,
1.026915192604065,
-0.1634986251592636,
0.5198567509651184,
-2.265958786010742,
2.2455599308013916,
-0.2977164387702942,
0.5316455364227295,
0.05799833685159683,
-0.11462489515542984,
1.0958501100540161,
0.6091979146003723,
0.5725793242454529,
-1.273903489112854,
0.8237974047660828,
-0.6725441813468933,
1.1932103633880615,
0.862546980381012,
-0.8676297664642334,
-0.055009543895721436,
1.3124700784683228,
0.46081796288490295,
-0.3183439075946808,
-0.9470726251602173,
-0.8277643918991089,
1.0827292203903198,
1.6369304656982422,
-0.03244522958993912,
-0.027644580230116844,
0.8077394366264343,
0.5563039779663086,
-1.2222683429718018,
-0.01651127263903618,
-0.8573383688926697,
-0.6643557548522949,
1.724321722984314,
1.9977712631225586,
-0.07957139611244202,
-0.2589828372001648,
-0.6874150037765503,
-1.1876333951950073,
0.7348459959030151,
-0.012510372325778008,
0.1438952535390854,
0.693250298500061,
-0.701305091381073,
1.2835443019866943,
0.8330149054527283,
0.9691416025161743,
-0.09492113441228867,
0.3291992247104645,
0.2861396372318268,
-0.26703912019729614,
-1.1528812646865845,
-0.35034117102622986,
-1.1274101734161377,
-2.5925049781799316,
0.37741371989250183,
-0.25466856360435486,
-1.3808813095092773,
0.12927429378032684,
-1.0911015272140503,
0.8619001507759094,
-0.5873411297798157,
-1.0606697797775269,
-1.3693689107894897,
0.24803170561790466,
-0.08917441964149475,
0.8417811989784241,
-1.5868890285491943,
-0.009976170025765896,
1.3392043113708496,
0.8867211937904358,
-0.6002383828163147,
1.0215818881988525,
0.24643045663833618,
1.0521608591079712,
0.7621405124664307,
-0.3728008568286896,
0.48127713799476624,
0.1751578450202942,
-1.3632597923278809,
0.5158055424690247,
1.1606968641281128,
0.1940630078315735,
1.4821463823318481,
-0.45318421721458435,
0.0844806432723999,
0.37248897552490234,
-0.6984001994132996,
-0.5350774526596069,
-0.5312969088554382,
0.8873273730278015,
0.14680154621601105,
-1.0852954387664795,
-0.017673462629318237,
-0.18734736740589142,
-0.20664098858833313,
0.20498616993427277,
-1.5142823457717896,
-0.38264143466949463,
-0.3094499409198761,
-0.41364526748657227,
-1.2156440019607544,
0.03555531054735184,
1.2686468362808228,
-0.822867751121521,
-0.10806334018707275,
0.4873909652233124,
0.36226531863212585,
0.5036572813987732,
0.5812175869941711,
-0.6345352530479431,
-0.3040464520454407,
-0.28689107298851013,
-0.3368455469608307,
0.29557889699935913,
1.2250728607177734,
-0.10661592334508896,
-1.0228780508041382,
0.877030074596405,
-0.31809255480766296,
0.029001133516430855,
1.827593207359314,
-0.07697585225105286,
-0.8043829202651978,
0.3578844368457794,
-0.6414029002189636,
1.891298770904541,
1.5691088438034058,
1.2526642084121704,
-0.18521152436733246,
-0.8315520286560059,
0.5710541605949402,
-0.31898733973503113,
-0.29187580943107605,
0.7614514827728271,
0.48299142718315125,
-0.2481052726507187,
-1.3689671754837036,
0.5145397782325745,
1.1942533254623413,
-0.9245796203613281,
-0.7335141897201538,
0.010361956432461739,
-0.7098085880279541,
1.0965845584869385,
0.7667985558509827,
0.38275110721588135,
0.37156373262405396,
1.5145113468170166,
0.5742357969284058,
-0.33696088194847107,
0.3977394998073578,
0.5153678059577942,
-0.103743776679039,
-2.0533175468444824,
-1.0414036512374878,
0.3762703835964203,
-0.49488627910614014,
-1.478998064994812,
1.2522644996643066,
-1.1814510822296143,
-0.9605533480644226,
0.4667663872241974,
0.1895388513803482,
1.5346782207489014,
0.33381375670433044,
1.616471290588379,
2.080880641937256,
0.9439485669136047,
0.19895270466804504,
1.3257827758789062,
-0.014604114927351475,
-0.3370857238769531,
1.8724021911621094,
-0.37096425890922546,
0.5370900630950928,
0.9793482422828674,
-0.30581605434417725,
-0.9257025122642517,
-0.8716942667961121,
-1.3912765979766846,
-0.5923630595207214,
1.1938730478286743,
0.1240023821592331,
-1.2076611518859863,
0.17594505846500397,
1.522781491279602,
0.11253233253955841,
-0.14003190398216248,
0.6440597176551819,
0.39902016520500183,
-0.8726271986961365,
0.02403230406343937,
-0.7676100134849548,
0.429010272026062,
-0.0731092244386673,
-0.36828333139419556,
0.27553093433380127,
0.47531256079673767,
1.2669003009796143,
-0.027645926922559738,
0.14668287336826324,
1.0702221393585205,
-1.4782555103302002,
1.6166390180587769,
-0.6844412684440613,
0.3016417622566223,
-2.421015501022339,
1.3981810808181763,
-0.800506591796875,
1.8458185195922852,
-2.7332160472869873,
0.404979407787323,
-0.486692875623703,
-0.465105801820755,
0.34796157479286194,
-0.46573299169540405,
0.12160001695156097,
-0.13789555430412292,
-0.9773638844490051,
0.012147495523095131,
-0.7775092124938965,
0.5329123735427856,
1.0716742277145386,
1.2979756593704224,
-1.109569787979126,
-0.35005778074264526,
-1.8998680114746094,
-0.12850703299045563,
-0.630958616733551,
0.4579586386680603,
-2.1087470054626465,
-0.06897132098674774,
-2.0222599506378174,
-2.2863948345184326,
-1.2936692237854004,
-0.7574878334999084,
1.0851683616638184,
0.14003044366836548,
-0.8575962781906128,
1.109791874885559,
-0.41506427526474,
-1.7557551860809326,
1.0295745134353638,
-2.2054035663604736
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
@lhoestq I add shuffle after split_dataset_by_node, duplicated data still exist.
For example, we have a directory named `mock_pretraining_data`, which has three files, `part-00000`, `part-00002`,`part-00002`.
Text in `part-00000` is like this:
{"id": 0}
{"id": 1}
{"id": 2}
{"id": 3}
{"id": 4}
{"id": 5}
{"id": 6}
{"id": 7}
{"id": 8}
{"id": 9}
and `part-00001`
{"id": 10}
{"id": 11}
{"id": 12}
{"id": 13}
{"id": 14}
{"id": 15}
{"id": 16}
{"id": 17}
{"id": 18}
{"id": 19}
and `part-00002`
{"id": 20}
{"id": 21}
{"id": 22}
{"id": 23}
{"id": 24}
{"id": 25}
{"id": 26}
{"id": 27}
{"id": 28}
{"id": 29}
And code in `test_dist.py` like this,
```python
import torch
from torch.utils.data import Dataset, DataLoader
from datasets import load_dataset
import os
from transformers import AutoTokenizer, NezhaForPreTraining
from transformers import AdamW, get_linear_schedule_with_warmup
import torch.nn.functional as F
import torch.nn as nn
import torch.distributed as dist
from datasets.distributed import split_dataset_by_node
from torch.nn.parallel import DistributedDataParallel as DDP
os.environ["CUDA_VISIBLE_DEVICES"] = '5,6,7'
dist.init_process_group("nccl")
local_rank = int(os.environ['LOCAL_RANK'])
world_size = torch.distributed.get_world_size()
device = torch.device('cuda', local_rank)
data_dir = './'
def load_trainset(train_path):
dataset = load_dataset('json', data_dir=os.path.join(data_dir, train_path), split='train', streaming=True)
return dataset
def collate_fn(examples):
input_ids = []
for example in examples:
input_ids.append(example['id'])
return torch.LongTensor(input_ids).to(device)
dataset = load_trainset('mock_pretraining_data')
dataset = split_dataset_by_node(dataset, rank=local_rank, world_size=world_size).shuffle(buffer_size=512)
# train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)
batch_size = 3
print('batch_size: {}'.format(batch_size))
train_dataloader = DataLoader(dataset, batch_size=batch_size, collate_fn=collate_fn)
for x in train_dataloader:
print({'rank': local_rank, 'id': x})
```
run `python -m torch.distributed.launch --nproc_per_node=3 test_dist.py`
The output is
```
{'rank': 1, 'id': tensor([12, 15, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([16, 10, 18], device='cuda:1')}
{'rank': 1, 'id': tensor([17, 13, 19], device='cuda:1')}
{'rank': 1, 'id': tensor([11], device='cuda:1')}
{'rank': 0, 'id': tensor([0, 2, 9], device='cuda:0')}
{'rank': 0, 'id': tensor([4, 8, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([5, 3, 6], device='cuda:0')}
{'rank': 0, 'id': tensor([7], device='cuda:0')}
{'rank': 2, 'id': tensor([13, 15, 14], device='cuda:2')}
{'rank': 2, 'id': tensor([19, 17, 18], device='cuda:2')}
{'rank': 2, 'id': tensor([12, 16, 11], device='cuda:2')}
{'rank': 2, 'id': tensor([10], device='cuda:2')}
```
`part-00001` is loaded twice, `part-00002` isn't loaded.
If I run `python -m torch.distributed.launch --nproc_per_node=2 test_dist.py`
The output is weirder,many numbers appear twice
```
{'rank': 1, 'id': tensor([26, 8, 13], device='cuda:1')}
{'rank': 1, 'id': tensor([22, 19, 20], device='cuda:1')}
{'rank': 1, 'id': tensor([12, 28, 11], device='cuda:1')}
{'rank': 1, 'id': tensor([24, 2, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([ 6, 27, 3], device='cuda:1')}
{'rank': 0, 'id': tensor([ 8, 25, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([20, 4, 12], device='cuda:0')}
{'rank': 0, 'id': tensor([14, 29, 5], device='cuda:0')}
{'rank': 0, 'id': tensor([ 7, 18, 23], device='cuda:0')}
{'rank': 0, 'id': tensor([19, 17, 11], device='cuda:0')}
```
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 403 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
@lhoestq I add shuffle after split_dataset_by_node, duplicated data still exist.
For example, we have a directory named `mock_pretraining_data`, which has three files, `part-00000`, `part-00002`,`part-00002`.
Text in `part-00000` is like this:
{"id": 0}
{"id": 1}
{"id": 2}
{"id": 3}
{"id": 4}
{"id": 5}
{"id": 6}
{"id": 7}
{"id": 8}
{"id": 9}
and `part-00001`
{"id": 10}
{"id": 11}
{"id": 12}
{"id": 13}
{"id": 14}
{"id": 15}
{"id": 16}
{"id": 17}
{"id": 18}
{"id": 19}
and `part-00002`
{"id": 20}
{"id": 21}
{"id": 22}
{"id": 23}
{"id": 24}
{"id": 25}
{"id": 26}
{"id": 27}
{"id": 28}
{"id": 29}
And code in `test_dist.py` like this,
```python
import torch
from torch.utils.data import Dataset, DataLoader
from datasets import load_dataset
import os
from transformers import AutoTokenizer, NezhaForPreTraining
from transformers import AdamW, get_linear_schedule_with_warmup
import torch.nn.functional as F
import torch.nn as nn
import torch.distributed as dist
from datasets.distributed import split_dataset_by_node
from torch.nn.parallel import DistributedDataParallel as DDP
os.environ["CUDA_VISIBLE_DEVICES"] = '5,6,7'
dist.init_process_group("nccl")
local_rank = int(os.environ['LOCAL_RANK'])
world_size = torch.distributed.get_world_size()
device = torch.device('cuda', local_rank)
data_dir = './'
def load_trainset(train_path):
dataset = load_dataset('json', data_dir=os.path.join(data_dir, train_path), split='train', streaming=True)
return dataset
def collate_fn(examples):
input_ids = []
for example in examples:
input_ids.append(example['id'])
return torch.LongTensor(input_ids).to(device)
dataset = load_trainset('mock_pretraining_data')
dataset = split_dataset_by_node(dataset, rank=local_rank, world_size=world_size).shuffle(buffer_size=512)
# train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)
batch_size = 3
print('batch_size: {}'.format(batch_size))
train_dataloader = DataLoader(dataset, batch_size=batch_size, collate_fn=collate_fn)
for x in train_dataloader:
print({'rank': local_rank, 'id': x})
```
run `python -m torch.distributed.launch --nproc_per_node=3 test_dist.py`
The output is
```
{'rank': 1, 'id': tensor([12, 15, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([16, 10, 18], device='cuda:1')}
{'rank': 1, 'id': tensor([17, 13, 19], device='cuda:1')}
{'rank': 1, 'id': tensor([11], device='cuda:1')}
{'rank': 0, 'id': tensor([0, 2, 9], device='cuda:0')}
{'rank': 0, 'id': tensor([4, 8, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([5, 3, 6], device='cuda:0')}
{'rank': 0, 'id': tensor([7], device='cuda:0')}
{'rank': 2, 'id': tensor([13, 15, 14], device='cuda:2')}
{'rank': 2, 'id': tensor([19, 17, 18], device='cuda:2')}
{'rank': 2, 'id': tensor([12, 16, 11], device='cuda:2')}
{'rank': 2, 'id': tensor([10], device='cuda:2')}
```
`part-00001` is loaded twice, `part-00002` isn't loaded.
If I run `python -m torch.distributed.launch --nproc_per_node=2 test_dist.py`
The output is weirder,many numbers appear twice
```
{'rank': 1, 'id': tensor([26, 8, 13], device='cuda:1')}
{'rank': 1, 'id': tensor([22, 19, 20], device='cuda:1')}
{'rank': 1, 'id': tensor([12, 28, 11], device='cuda:1')}
{'rank': 1, 'id': tensor([24, 2, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([ 6, 27, 3], device='cuda:1')}
{'rank': 0, 'id': tensor([ 8, 25, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([20, 4, 12], device='cuda:0')}
{'rank': 0, 'id': tensor([14, 29, 5], device='cuda:0')}
{'rank': 0, 'id': tensor([ 7, 18, 23], device='cuda:0')}
{'rank': 0, 'id': tensor([19, 17, 11], device='cuda:0')}
```
|
[
-1.1243226528167725,
-0.811016857624054,
-0.8749836087226868,
1.5584391355514526,
-0.2119290977716446,
-1.1258975267410278,
0.2200663834810257,
-1.2918739318847656,
1.5447651147842407,
-0.6987407803535461,
0.4961589276790619,
-1.6239959001541138,
0.08669319748878479,
-0.5821733474731445,
-0.7423854470252991,
-0.8804212212562561,
-0.46296507120132446,
-0.656096875667572,
0.9162921905517578,
2.6033437252044678,
1.3037440776824951,
-1.356066107749939,
2.541581153869629,
0.823175311088562,
-0.2068256437778473,
-0.7937336564064026,
0.5849907994270325,
0.05521164834499359,
-1.1975637674331665,
-0.35135018825531006,
-0.7755298614501953,
-0.20781084895133972,
-0.33098167181015015,
-0.5966779589653015,
-0.18292050063610077,
0.6719191074371338,
-0.4176953434944153,
-0.5938611626625061,
-0.6757656335830688,
-1.0838205814361572,
0.4836520850658417,
-0.40426695346832275,
1.027203917503357,
-0.4543871283531189,
1.6544296741485596,
-0.5442222952842712,
0.3773205280303955,
0.7044454216957092,
1.2310631275177002,
0.3271479308605194,
0.051681242883205414,
0.2654891908168793,
0.4421612024307251,
-0.12784737348556519,
0.471912145614624,
1.0997991561889648,
0.7127434015274048,
0.4179091155529022,
0.8431578874588013,
-2.146909236907959,
1.0258246660232544,
-1.23554265499115,
0.25562167167663574,
1.4129178524017334,
-0.809569239616394,
0.3072691261768341,
-1.8075149059295654,
-0.06947352737188339,
0.5523983836174011,
-2.03652024269104,
0.44428420066833496,
-1.1678112745285034,
-0.5245934724807739,
1.0295134782791138,
0.30498525500297546,
-1.1262664794921875,
-0.013253058306872845,
-0.2756251096725464,
0.8272862434387207,
0.3775634765625,
1.1170684099197388,
-1.5901418924331665,
-0.015256304293870926,
-0.33733677864074707,
0.10986737906932831,
-1.3505291938781738,
-1.4931503534317017,
0.5116398334503174,
0.5141736268997192,
0.4061315953731537,
-0.1578168123960495,
1.0293534994125366,
-1.0324345827102661,
0.7623414993286133,
-1.1596202850341797,
-1.7165278196334839,
-1.4650899171829224,
-2.260460376739502,
-2.1104578971862793,
0.7389243841171265,
-0.5316687226295471,
-0.5804992318153381,
1.8454595804214478,
-0.8950617909431458,
-1.577571153640747,
1.081369400024414,
0.33347833156585693,
0.083503857254982,
2.3518261909484863,
0.15041041374206543,
-0.8076626062393188,
0.6271130442619324,
-0.8127255439758301,
0.5320949554443359,
-0.4138887822628021,
1.322596549987793,
0.4318220019340515,
-0.9425168037414551,
1.591065526008606,
-0.38848382234573364,
0.5842289924621582,
-0.6519649624824524,
-0.5137531757354736,
-0.6605303287506104,
0.3855054974555969,
1.8568707704544067,
-0.3601602613925934,
1.4891160726547241,
-0.1963820457458496,
-1.5176396369934082,
-1.621573567390442,
0.9308586120605469,
0.5462680459022522,
-0.6859008073806763,
0.13254496455192566,
-0.4235936105251312,
0.2148417979478836,
-0.42470598220825195,
1.1358658075332642,
1.2516671419143677,
0.9088060855865479,
-0.3124549090862274,
-0.8706739544868469,
0.19983667135238647,
0.011883467435836792,
-0.9287740588188171,
-1.5399785041809082,
-0.22390320897102356,
0.24397917091846466,
0.4786134660243988,
-1.259683609008789,
1.8837602138519287,
0.9106621742248535,
1.9002439975738525,
0.9246899485588074,
-0.3498702347278595,
1.5330320596694946,
0.15427732467651367,
1.8180880546569824,
-0.5071048140525818,
0.5780328512191772,
-0.3371290862560272,
-1.1629472970962524,
0.976934015750885,
-0.19105933606624603,
-2.0363852977752686,
-0.7880167365074158,
-0.9050149917602539,
-0.17054113745689392,
-0.761423647403717,
0.9253981709480286,
-0.18690280616283417,
-1.3180485963821411,
0.2533314526081085,
-0.7435952425003052,
-0.05248899757862091,
-1.22543466091156,
0.43722206354141235,
0.6506118178367615,
-0.6577684879302979,
0.08245788514614105,
-0.00022028107196092606,
-1.189832329750061,
-0.4083321988582611,
0.23175305128097534,
2.029015064239502,
-0.8855224251747131,
0.8298941850662231,
1.1199872493743896,
-0.7670453190803528,
0.13150598108768463,
0.27069005370140076,
-0.4844267964363098,
0.7174715399742126,
-1.0003612041473389,
-0.5257214307785034,
1.1892528533935547,
-0.18645241856575012,
-0.4874608516693115,
1.414881706237793,
0.6503967642784119,
-0.992816150188446,
-0.4239813983440399,
-0.11751168221235275,
-0.7161468267440796,
0.03399049490690231,
-1.4304090738296509,
-0.028318606317043304,
0.3098546862602234,
-1.4901200532913208,
-0.5582261681556702,
-0.2033473402261734,
1.233819603919983,
-0.34498462080955505,
1.2860198020935059,
-0.3158976435661316,
-0.15859732031822205,
-0.332375705242157,
-0.30455297231674194,
-0.05667240172624588,
-0.28304946422576904,
-0.6344241499900818,
0.18125776946544647,
-0.814900279045105,
0.4100381135940552,
1.2763615846633911,
0.3179318904876709,
0.08222018927335739,
0.49807241559028625,
1.072219967842102,
0.47175729274749756,
0.03633221238851547,
-0.8747408390045166,
-1.3708827495574951,
1.949310064315796,
-1.3948960304260254,
2.0146031379699707,
0.7239879369735718,
0.06677842885255814,
-1.7325608730316162,
-2.037299394607544,
1.3589997291564941,
1.098000407218933,
2.3640522956848145,
0.5587231516838074,
0.4456338584423065,
-0.7593238353729248,
-0.6088537573814392,
0.3218645453453064,
-1.0359512567520142,
-0.6466825604438782,
0.2668042480945587,
2.4481568336486816,
1.6598297357559204,
-0.4852384328842163,
-0.30473893880844116,
-1.0397136211395264,
1.4306282997131348,
-0.08867467939853668,
0.23407934606075287,
2.1684744358062744,
-0.18040581047534943,
-1.0679930448532104,
1.3304177522659302,
-2.402599334716797,
0.14440718293190002,
2.0043246746063232,
0.3269450068473816,
0.14150802791118622,
-1.2663943767547607,
-0.7126535177230835,
-0.308246374130249,
-0.5502660274505615,
-1.1107045412063599,
0.5536191463470459,
-0.12704014778137207,
-0.8134734034538269,
-1.3804715871810913,
0.23260089755058289,
-1.138206124305725,
-1.6115634441375732,
0.2819471061229706,
1.7319917678833008,
2.1358377933502197,
-0.9564191699028015,
1.6134344339370728,
-0.2361556887626648,
-0.03564445674419403,
1.2276448011398315,
1.2959522008895874,
3.106846570968628,
1.8338797092437744,
-1.341349720954895,
0.6029590964317322,
-0.2046971470117569,
-0.4337316155433655,
1.254650592803955,
-1.366266131401062,
1.2826372385025024,
-0.02779778279364109,
-1.0707015991210938,
-1.1599563360214233,
0.7761319279670715,
0.4167075753211975,
0.20562142133712769,
-0.42083418369293213,
0.9082416892051697,
0.13422891497612,
1.4059851169586182,
0.6248219013214111,
-0.14968270063400269,
0.6014278531074524,
-0.34872207045555115,
-0.35994839668273926,
1.4709391593933105,
0.1914525032043457,
-1.369430661201477,
-2.4230282306671143,
-0.1677248179912567,
-0.9469733238220215,
-0.0835692286491394,
-0.6086537837982178,
-1.0800272226333618,
1.778222918510437,
0.2898692786693573,
-1.2580490112304688,
-0.25099465250968933,
-0.48710334300994873,
-0.522085428237915,
2.8046419620513916,
-1.5053154230117798,
-0.1758393943309784,
-1.0636612176895142,
-0.808209240436554,
1.8241034746170044,
-1.211501121520996,
-0.2640802264213562,
-1.1260701417922974,
-0.4630337655544281,
-1.3936024904251099,
-0.7086301445960999,
0.09055256843566895,
-0.8613969683647156,
0.942360520362854,
0.3461555242538452,
-1.0543529987335205,
-0.44943562150001526,
-0.8974048495292664,
0.842095136642456,
-0.27320852875709534,
0.22839336097240448,
1.8940045833587646,
0.5065613389015198,
-0.11123135685920715,
0.7647913098335266,
1.1726373434066772,
0.6848286986351013,
-0.6168432831764221,
0.21531911194324493,
-0.7376857995986938,
0.21180380880832672,
-1.3344773054122925,
0.2303779125213623,
-2.6740448474884033,
0.48913800716400146,
0.004072251729667187,
-0.04278390854597092,
-0.00247980747371912,
-1.4064592123031616,
1.2373453378677368,
2.6906988620758057,
-1.1729105710983276,
0.484387069940567,
0.3292240798473358,
1.0389169454574585,
-1.7274049520492554,
0.17331930994987488,
-0.2439437061548233,
2.0948455333709717,
0.18903404474258423,
1.2082077264785767,
-0.41303566098213196,
-2.2698302268981934,
0.6777777075767517,
-1.3979698419570923,
-1.3061001300811768,
0.6295681595802307,
-0.9205618500709534,
0.28362852334976196,
-1.61692214012146,
-0.21300926804542542,
-0.8206731677055359,
-1.2450323104858398,
0.8013412356376648,
-0.02135445922613144,
0.43440935015678406,
-0.5877760648727417,
0.4746033549308777,
-2.3457562923431396,
-1.522360920906067,
-0.3494980037212372,
-0.949876606464386,
0.46527978777885437,
-0.3911931812763214,
0.8451712727546692,
-0.14424416422843933,
-0.051170237362384796,
0.4591944217681885,
1.4298696517944336,
3.4560940265655518,
0.3543321192264557,
0.348113089799881,
-0.16972216963768005,
-1.0565000772476196,
1.6152522563934326,
0.8511016964912415,
0.06152305006980896,
-0.5088648200035095,
-1.0115455389022827,
1.0543770790100098,
2.0485177040100098,
1.1251685619354248,
-0.12623330950737,
-0.9466685652732849,
-0.8080689907073975,
-0.16891953349113464,
0.23726753890514374,
0.29317498207092285,
0.995849609375,
-0.0636012852191925,
-0.0651562362909317,
1.5647777318954468,
1.139938473701477,
-0.3506530225276947,
0.15235835313796997,
-0.76141357421875,
-0.49255135655403137,
0.5883463621139526,
0.3223406672477722,
0.09238661080598831,
0.5028327703475952,
-0.997385561466217,
-0.3687645494937897,
-0.41408711671829224,
-0.8303008675575256,
-0.544971227645874,
-0.5849688649177551,
-0.30270883440971375,
1.5741093158721924,
0.08740224689245224,
-0.5858153700828552,
-0.13486981391906738,
-0.9286094903945923,
-0.09856130927801132,
-1.2449513673782349,
0.19804564118385315,
-0.1256822645664215,
-0.23080846667289734,
-0.21518971025943756,
1.7340009212493896,
-0.8779979944229126,
-2.0177924633026123,
0.21780456602573395,
0.34435051679611206,
-0.38861188292503357,
0.23093293607234955,
1.6173382997512817,
0.5486624836921692,
1.371654987335205,
1.2166948318481445,
0.9010663628578186,
-0.7283496856689453,
-1.3150745630264282,
0.6521643996238708,
1.0008095502853394,
-1.3158748149871826,
0.7440609335899353,
-0.028797011822462082,
-0.35196271538734436,
0.4016682505607605,
1.1245054006576538,
0.599230170249939,
-1.8687330484390259,
0.6561810970306396,
-0.9144108295440674,
0.8332233428955078,
0.7057796120643616,
0.651098370552063,
0.0448358952999115,
0.610986590385437,
-1.232208013534546,
-0.974480390548706,
-0.7595871686935425,
-0.6271898746490479,
1.891562819480896,
-0.3932740390300751,
0.859104573726654,
-0.26908209919929504,
-1.3433640003204346,
-0.07794704288244247,
0.7997239232063293,
0.3361849784851074,
-0.5066165328025818,
0.7412489056587219,
-0.5194304585456848,
-0.9606637954711914,
-1.1740552186965942,
-0.3037957549095154,
-1.1118290424346924,
-0.9605478048324585,
1.1769566535949707,
0.71233731508255,
0.33718204498291016,
1.964631199836731,
0.9429510831832886,
0.28590360283851624,
-2.5516273975372314,
0.9245607852935791,
0.39818188548088074,
-0.017800230532884598,
0.927409827709198,
0.3719245195388794,
0.9123893976211548,
-0.06389417499303818,
0.6453536152839661,
-2.609147787094116,
2.26432466506958,
-0.06013370305299759,
0.7046766877174377,
0.0037652291357517242,
-0.30867791175842285,
0.9535684585571289,
0.5231160521507263,
0.33482879400253296,
-1.164129376411438,
0.5067301392555237,
-0.6058300137519836,
1.187286138534546,
0.7064015865325928,
-0.7841150760650635,
-0.054232850670814514,
1.3307911157608032,
0.594569206237793,
-0.4094662368297577,
-0.9917519092559814,
-0.7266936898231506,
0.9866138100624084,
1.5911924839019775,
-0.0776694044470787,
-0.09510341286659241,
1.0050121545791626,
0.5853666067123413,
-1.3534865379333496,
-0.06745626777410507,
-0.8331737518310547,
-0.6625151634216309,
1.8770520687103271,
2.0251574516296387,
-0.13730721175670624,
-0.3111075758934021,
-0.7482423782348633,
-1.3066147565841675,
0.8982864022254944,
0.013318749144673347,
0.1568213254213333,
0.4953586161136627,
-0.6360208988189697,
1.1352379322052002,
0.9832286834716797,
0.971649706363678,
0.24087052047252655,
0.24397318065166473,
0.3627323508262634,
-0.40106016397476196,
-1.0011279582977295,
-0.2516324520111084,
-0.9997693300247192,
-2.5773062705993652,
0.5962138772010803,
-0.10571876913309097,
-1.3071472644805908,
-0.15079280734062195,
-1.045378565788269,
1.110552191734314,
-0.6289288997650146,
-0.9123375415802002,
-1.4953858852386475,
0.22978316247463226,
0.0007931431755423546,
1.0063303709030151,
-1.5359286069869995,
-0.31407105922698975,
1.25121009349823,
0.8875547647476196,
-0.7929864525794983,
0.8546180725097656,
0.09263046830892563,
1.1367138624191284,
0.6805722713470459,
-0.3525337278842926,
0.5664454102516174,
0.030243048444390297,
-1.3155837059020996,
0.4530907869338989,
1.152252197265625,
0.24579663574695587,
1.6264612674713135,
-0.4636135399341583,
0.14670148491859436,
0.40453171730041504,
-0.6730358004570007,
-0.5356448292732239,
-0.599309504032135,
0.7125243544578552,
0.13231490552425385,
-1.0070104598999023,
-0.13688400387763977,
-0.00911709014326334,
-0.25754666328430176,
0.14082010090351105,
-1.3223217725753784,
-0.14041048288345337,
-0.3337647318840027,
-0.6763445138931274,
-1.0874301195144653,
-0.12791353464126587,
1.259106159210205,
-0.8327939510345459,
-0.023432686924934387,
0.4754074811935425,
0.11537089943885803,
0.4248836636543274,
0.49465253949165344,
-0.6615456938743591,
-0.3683311939239502,
-0.2926011383533478,
-0.44541123509407043,
0.38870662450790405,
1.420920491218567,
0.008183414116501808,
-1.0807785987854004,
0.8421725034713745,
-0.22126835584640503,
0.11814515292644501,
1.9107586145401,
0.007623298093676567,
-0.7571670413017273,
0.3550272285938263,
-0.5692048668861389,
1.8690836429595947,
1.7020341157913208,
1.418570637702942,
-0.2521820068359375,
-0.9562310576438904,
0.6744260787963867,
-0.5721168518066406,
-0.3803749978542328,
0.7353634834289551,
0.2849378287792206,
-0.29750585556030273,
-1.489514708518982,
0.7263351082801819,
1.3361811637878418,
-0.9478743076324463,
-0.7493372559547424,
0.3333776593208313,
-0.8231698870658875,
1.057019829750061,
0.6018714308738708,
0.3668694496154785,
0.5978823304176331,
1.661604881286621,
0.8529701232910156,
-0.33630457520484924,
0.45833301544189453,
0.7281209230422974,
-0.037899501621723175,
-2.032729387283325,
-1.0787694454193115,
0.5315147042274475,
-0.6251952648162842,
-1.5534133911132812,
1.444330096244812,
-1.2372361421585083,
-1.151548981666565,
0.6257431507110596,
0.11593109369277954,
1.4930342435836792,
0.3996988534927368,
1.557430624961853,
1.9735709428787231,
0.8762385845184326,
0.3815179765224457,
1.0697107315063477,
-0.14018294215202332,
-0.47193029522895813,
1.7213473320007324,
-0.4155004322528839,
0.473224401473999,
1.120007038116455,
-0.12350845336914062,
-1.1417617797851562,
-0.8256349563598633,
-1.3905621767044067,
-0.8099398612976074,
1.3773833513259888,
0.08602816611528397,
-1.1952470541000366,
0.29709380865097046,
1.7445793151855469,
-0.032883450388908386,
-0.4640519618988037,
0.5172885060310364,
0.4289577603340149,
-1.0039830207824707,
-0.014743391424417496,
-0.7884405851364136,
0.664637565612793,
-0.09830361604690552,
-0.30715981125831604,
0.3038642406463623,
0.6034949421882629,
1.4817590713500977,
-0.1014711931347847,
0.1913572996854782,
0.8664549589157104,
-1.5310261249542236,
1.7487497329711914,
-0.8108558654785156,
0.2113010436296463,
-2.3045971393585205,
1.2831624746322632,
-0.884238064289093,
2.0193543434143066,
-2.662001132965088,
0.429695188999176,
-0.3966459035873413,
-0.35490137338638306,
0.22116899490356445,
-0.6327001452445984,
0.07034893333911896,
-0.040629103779792786,
-1.0645971298217773,
-0.04862426966428757,
-0.7087692618370056,
0.6814804077148438,
1.154410481452942,
1.4075207710266113,
-1.0842379331588745,
-0.5532199144363403,
-1.6806403398513794,
-0.08947823196649551,
-0.7715002298355103,
0.20860861241817474,
-1.8919190168380737,
-0.10236039012670517,
-1.9466660022735596,
-2.112591505050659,
-1.2612420320510864,
-0.7748851180076599,
1.0749306678771973,
-0.02844267524778843,
-0.9380432963371277,
1.0980039834976196,
-0.4437501132488251,
-1.8774404525756836,
1.3333500623703003,
-2.147433280944824
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
Hi ! Thanks for reporting, you need to pass `seed=` to `shuffle()` or the processes won't use the same seed to shuffle the shards order before assigning each shard to a node.
The issue is that the workers are not using the same seed to shuffle the shards before splitting the shards list by node.
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 55 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Hi ! Thanks for reporting, you need to pass `seed=` to `shuffle()` or the processes won't use the same seed to shuffle the shards order before assigning each shard to a node.
The issue is that the workers are not using the same seed to shuffle the shards before splitting the shards list by node.
|
[
-1.316110610961914,
-0.8762099742889404,
-0.8423028588294983,
1.4903324842453003,
-0.1469218134880066,
-1.317747712135315,
0.1321864128112793,
-1.2471261024475098,
1.6973176002502441,
-0.8230382204055786,
0.38144439458847046,
-1.5872833728790283,
0.11481374502182007,
-0.5468330383300781,
-0.7788447737693787,
-0.9112218022346497,
-0.3787771463394165,
-0.7509276270866394,
0.9465329051017761,
2.450488567352295,
1.137014389038086,
-1.289555311203003,
2.6309657096862793,
0.7169292569160461,
-0.28204500675201416,
-1.081308126449585,
0.5944963693618774,
-0.003730663564056158,
-1.2106775045394897,
-0.5124792456626892,
-0.9697833061218262,
-0.11821434646844864,
-0.6354880928993225,
-0.5927659869194031,
0.09616927057504654,
0.3696954846382141,
-0.22040554881095886,
-0.34323111176490784,
-0.507594108581543,
-0.7948343753814697,
0.5142731070518494,
-0.3522941470146179,
0.920205295085907,
-0.42888781428337097,
1.7562674283981323,
-0.5507851839065552,
0.4752342402935028,
0.7375076413154602,
1.5960873365402222,
0.14490394294261932,
-0.14158014953136444,
0.22390180826187134,
0.39549586176872253,
0.04787115752696991,
0.4028293490409851,
1.0078908205032349,
0.5842636823654175,
0.5700803995132446,
0.64521723985672,
-2.2774791717529297,
1.2363476753234863,
-1.1894272565841675,
0.1821729689836502,
1.395516037940979,
-1.0274828672409058,
0.3235284388065338,
-1.8334577083587646,
-0.10597553849220276,
0.4865248501300812,
-2.258371353149414,
0.19205623865127563,
-1.2021968364715576,
-0.46731480956077576,
1.0185672044754028,
0.30858129262924194,
-1.3936491012573242,
0.0628703311085701,
-0.41517531871795654,
1.0127400159835815,
0.5941484570503235,
1.135830283164978,
-1.622401475906372,
0.05115273967385292,
-0.3359227478504181,
0.08251740038394928,
-1.3746362924575806,
-1.4365400075912476,
0.5867630243301392,
0.7102620601654053,
0.48607295751571655,
0.035756275057792664,
0.999336302280426,
-0.8609005808830261,
0.948586642742157,
-0.9394461512565613,
-1.5862171649932861,
-1.4219826459884644,
-2.228062629699707,
-2.3342552185058594,
0.7920737862586975,
-0.5464129447937012,
-0.5380202531814575,
2.0548007488250732,
-1.1109857559204102,
-1.8303200006484985,
1.0327242612838745,
0.16151078045368195,
0.07110805064439774,
2.357469081878662,
0.11700580269098282,
-0.5366646647453308,
0.3754872679710388,
-0.6046454906463623,
0.8035410046577454,
-0.44997796416282654,
1.3317190408706665,
0.46820589900016785,
-1.0482152700424194,
1.672126054763794,
-0.38393154740333557,
0.5357787609100342,
-0.6848093867301941,
-0.5525544881820679,
-0.9314684867858887,
0.38506990671157837,
1.969526767730713,
-0.3849828839302063,
1.6031237840652466,
-0.34745514392852783,
-1.405980110168457,
-1.5325227975845337,
0.9444915652275085,
0.5140981674194336,
-0.8102279901504517,
0.09405085444450378,
-0.2776792347431183,
0.1379850059747696,
-0.05197320505976677,
1.1037944555282593,
1.2351819276809692,
0.7708959579467773,
-0.3063362240791321,
-0.8946024179458618,
0.24195796251296997,
-0.012878458015620708,
-0.8036050796508789,
-1.7476986646652222,
-0.44088926911354065,
0.03885438293218613,
0.6686718463897705,
-1.1547214984893799,
1.810723066329956,
0.8630682826042175,
1.8916544914245605,
0.9432932138442993,
-0.38759955763816833,
1.4437342882156372,
0.015038254670798779,
1.9228485822677612,
-0.5154874324798584,
0.6659606099128723,
-0.32927367091178894,
-1.1657134294509888,
0.7724965810775757,
-0.17466853559017181,
-2.034724473953247,
-0.7630797028541565,
-0.8239925503730774,
-0.2515076696872711,
-0.6879622340202332,
1.0306442975997925,
-0.3629301190376282,
-1.2495436668395996,
0.21456950902938843,
-0.5483310222625732,
0.13337744772434235,
-1.2614718675613403,
0.43651282787323,
0.751379132270813,
-0.7337703704833984,
0.0587940514087677,
-0.3042278289794922,
-1.3255318403244019,
-0.49282121658325195,
0.15170548856258392,
2.017301559448242,
-0.7797315716743469,
0.9602375030517578,
0.8673025369644165,
-0.8283382058143616,
-0.043373167514801025,
0.36070889234542847,
-0.3338114023208618,
0.8373461961746216,
-0.9935658574104309,
-0.5041016340255737,
1.26118803024292,
-0.23950856924057007,
-0.6589999794960022,
1.4425384998321533,
0.7173486948013306,
-0.9983059763908386,
-0.25943925976753235,
-0.3134170472621918,
-0.7948477268218994,
0.09191982448101044,
-1.5844720602035522,
-0.060784339904785156,
0.210527703166008,
-1.4089404344558716,
-0.5625677108764648,
-0.13241615891456604,
1.2503082752227783,
-0.19470711052417755,
1.4192308187484741,
-0.27894848585128784,
-0.31615370512008667,
-0.3773902654647827,
-0.3602931499481201,
0.0666755959391594,
-0.03232346847653389,
-0.7392475008964539,
0.24820831418037415,
-0.7591452598571777,
0.39972174167633057,
1.3308886289596558,
0.36389070749282837,
0.029907815158367157,
0.6255694627761841,
0.9920786023139954,
0.3200306296348572,
-0.07903679460287094,
-0.9819082617759705,
-1.5439159870147705,
2.03115177154541,
-1.4197133779525757,
1.9620802402496338,
0.6848142743110657,
-0.05237555876374245,
-1.8112537860870361,
-1.7394742965698242,
1.355162262916565,
1.2498557567596436,
2.289079189300537,
0.6701309084892273,
0.42952170968055725,
-0.836549699306488,
-0.5956876277923584,
0.43026989698410034,
-1.0209437608718872,
-0.7574688196182251,
0.0761428102850914,
2.312117099761963,
1.7723828554153442,
-0.4177771508693695,
-0.2203853875398636,
-1.0416702032089233,
1.253659963607788,
-0.15102535486221313,
0.2970982789993286,
1.9361010789871216,
-0.3430938422679901,
-1.1696995496749878,
1.226586937904358,
-2.3089041709899902,
0.12474583834409714,
2.021268367767334,
0.3643300533294678,
0.08356846868991852,
-1.4861085414886475,
-0.5725837349891663,
-0.1653219610452652,
-0.49489063024520874,
-1.2888188362121582,
0.5657095313072205,
-0.31560513377189636,
-0.819900631904602,
-1.359879493713379,
0.13293465971946716,
-1.2699251174926758,
-1.610487461090088,
0.3503130376338959,
1.8539546728134155,
1.9642279148101807,
-0.6991941332817078,
1.5067815780639648,
-0.27981409430503845,
0.09346268326044083,
1.1987334489822388,
1.2030199766159058,
3.10772705078125,
1.900861144065857,
-1.2149720191955566,
0.7186710834503174,
-0.1974412500858307,
-0.4701966345310211,
1.2633652687072754,
-1.0744922161102295,
1.2774155139923096,
-0.2594587802886963,
-1.1754511594772339,
-1.2895681858062744,
0.8999308943748474,
0.4124264419078827,
0.1264534294605255,
-0.47817856073379517,
1.3440715074539185,
0.12158597260713577,
1.1953065395355225,
0.4854307472705841,
-0.44562000036239624,
0.5771560072898865,
-0.4262484610080719,
-0.5125848054885864,
1.5773993730545044,
0.2366732805967331,
-1.3717595338821411,
-2.3700952529907227,
-0.12663669884204865,
-0.7789440155029297,
-0.0037741842679679394,
-0.6106951832771301,
-0.8906867504119873,
1.7370127439498901,
0.45446330308914185,
-1.3765064477920532,
-0.3992995619773865,
-0.38660165667533875,
-0.7047805190086365,
2.699540376663208,
-1.4418425559997559,
-0.21332542598247528,
-1.0685272216796875,
-0.5419818758964539,
1.72700834274292,
-1.2261581420898438,
-0.22562150657176971,
-1.028996467590332,
-0.596832275390625,
-1.3838800191879272,
-0.5830724239349365,
-0.0380278155207634,
-0.9387028217315674,
0.7903146743774414,
0.18464575707912445,
-1.0970265865325928,
-0.3703230917453766,
-0.7437800765037537,
0.8715789318084717,
-0.09583001583814621,
0.1810300201177597,
1.9398273229599,
0.468946635723114,
-0.40015801787376404,
0.7657573223114014,
1.1251428127288818,
0.5796666145324707,
-0.6008316278457642,
0.26147565245628357,
-0.7358333468437195,
0.35802316665649414,
-1.294049620628357,
0.2575550973415375,
-2.953777551651001,
0.6093548536300659,
-0.0863945260643959,
-0.023924238979816437,
-0.030830062925815582,
-1.271895408630371,
0.9702765345573425,
2.7624354362487793,
-1.2189918756484985,
0.44811081886291504,
0.19278079271316528,
1.192205786705017,
-1.560623288154602,
0.2844090461730957,
-0.4357355833053589,
2.1729233264923096,
0.289008229970932,
1.1940237283706665,
-0.5599364042282104,
-2.1533865928649902,
0.6920621991157532,
-1.1712820529937744,
-1.3645612001419067,
0.7994788885116577,
-0.7327249050140381,
-0.034806057810783386,
-1.3988763093948364,
-0.15855742990970612,
-0.8407033681869507,
-1.3620989322662354,
0.9635767936706543,
0.2573006749153137,
0.5328854918479919,
-0.6149134039878845,
0.27891305088996887,
-2.1720030307769775,
-1.3622443675994873,
-0.19542144238948822,
-0.9760580062866211,
0.3863593339920044,
-0.3248363137245178,
0.6375236511230469,
-0.12573939561843872,
0.14401625096797943,
0.31162214279174805,
1.4655680656433105,
3.4681622982025146,
0.24082693457603455,
0.34389570355415344,
-0.2971358001232147,
-0.9457387924194336,
1.5617467164993286,
1.048418402671814,
-0.08296630531549454,
-0.5857663154602051,
-0.9137873649597168,
1.1667038202285767,
1.8525238037109375,
0.9009369611740112,
0.11791116744279861,
-0.9847084283828735,
-0.6388665437698364,
-0.11258254945278168,
0.185186967253685,
0.4999999403953552,
0.9976442456245422,
0.11330254375934601,
0.12549450993537903,
1.5146081447601318,
1.2509156465530396,
-0.3815046548843384,
0.2439601719379425,
-0.8388293981552124,
-0.39067167043685913,
0.5706289410591125,
0.4690600633621216,
-0.048826102167367935,
0.3686773180961609,
-0.9125633835792542,
-0.25523945689201355,
-0.35294607281684875,
-1.045735478401184,
-0.6905726790428162,
-0.3933001160621643,
-0.35419952869415283,
1.6105594635009766,
0.053497783839702606,
-0.5012224316596985,
-0.07200011610984802,
-0.8912626504898071,
-0.11065039783716202,
-1.0460526943206787,
0.24979090690612793,
-0.09429490566253662,
-0.22316287457942963,
-0.15511764585971832,
1.7540944814682007,
-0.9496517181396484,
-2.065847873687744,
0.34132611751556396,
0.2828580439090729,
-0.39470764994621277,
0.2790054380893707,
1.5760016441345215,
0.501254141330719,
1.3398380279541016,
1.3655891418457031,
0.9795398712158203,
-0.6332637071609497,
-1.3288308382034302,
0.6598077416419983,
0.9204599261283875,
-1.5390673875808716,
0.7964672446250916,
0.10791625827550888,
-0.45651519298553467,
0.6787415146827698,
1.1630016565322876,
0.45383816957473755,
-1.9110746383666992,
0.7745406031608582,
-0.8116625547409058,
0.7428498864173889,
0.7548539638519287,
0.755564272403717,
0.2389710545539856,
0.8865889310836792,
-1.169864535331726,
-1.2165226936340332,
-0.7363378405570984,
-0.6612451672554016,
1.9679780006408691,
-0.259196937084198,
0.6805518865585327,
-0.1488427221775055,
-1.299074649810791,
-0.26791274547576904,
0.7121403217315674,
0.30589449405670166,
-0.3054577708244324,
0.8943297266960144,
-0.6471821665763855,
-1.0532464981079102,
-1.4083449840545654,
-0.4606253206729889,
-0.9921576976776123,
-0.9413869380950928,
1.128251552581787,
0.771903395652771,
0.30526670813560486,
1.896491289138794,
0.4862445890903473,
0.2553918957710266,
-2.679610013961792,
0.906190812587738,
0.30920255184173584,
-0.032959919422864914,
0.9463092088699341,
0.29938843846321106,
1.0627202987670898,
-0.0743919387459755,
0.5147109627723694,
-2.2896740436553955,
2.3479955196380615,
-0.2475033700466156,
0.6221379637718201,
0.035006411373615265,
-0.17978748679161072,
1.1179603338241577,
0.6030989289283752,
0.6554465889930725,
-1.1373395919799805,
0.7675030827522278,
-0.7395334839820862,
1.2203047275543213,
0.983347475528717,
-0.857988178730011,
-0.08847209811210632,
1.3662432432174683,
0.5035359263420105,
-0.4497907757759094,
-0.9517890810966492,
-0.9838573932647705,
1.0154374837875366,
1.7918657064437866,
-0.04621194675564766,
-0.022116195410490036,
0.7717069387435913,
0.5761170983314514,
-1.217431902885437,
0.15285120904445648,
-0.8595824241638184,
-0.7049086093902588,
1.62165105342865,
1.9120557308197021,
-0.08207397907972336,
-0.2274642437696457,
-0.7280190587043762,
-1.1383663415908813,
0.7832360863685608,
0.039888568222522736,
0.10955183953046799,
0.6329824924468994,
-0.7410103678703308,
1.2310713529586792,
1.0559413433074951,
0.9921649098396301,
0.06671386957168579,
0.37863782048225403,
0.2526412308216095,
-0.29850950837135315,
-1.1438478231430054,
-0.20631283521652222,
-1.1163190603256226,
-2.633028507232666,
0.43598672747612,
-0.31005778908729553,
-1.3447840213775635,
0.08351583033800125,
-1.048427700996399,
0.8455080389976501,
-0.583030104637146,
-1.108517050743103,
-1.4818756580352783,
0.1433255523443222,
-0.08562704175710678,
0.8645454049110413,
-1.5984967947006226,
0.09824057668447495,
1.2510945796966553,
0.9814857244491577,
-0.6325836181640625,
1.029527187347412,
0.3213576376438141,
1.0712438821792603,
0.8078978657722473,
-0.41823163628578186,
0.48939988017082214,
0.05781024694442749,
-1.3758649826049805,
0.4333280324935913,
1.0542675256729126,
0.2606690227985382,
1.473809003829956,
-0.5408964157104492,
0.07778869569301605,
0.357242226600647,
-0.622599720954895,
-0.46853119134902954,
-0.5770852565765381,
0.8408122062683105,
0.11128246039152145,
-0.9356173276901245,
0.04182170704007149,
-0.20171746611595154,
-0.301599383354187,
0.17219023406505585,
-1.4994767904281616,
-0.29028597474098206,
-0.38557764887809753,
-0.4674488306045532,
-1.2689167261123657,
0.012898284010589123,
1.277431845664978,
-0.785133421421051,
-0.16565366089344025,
0.48229822516441345,
0.4017055630683899,
0.5023978352546692,
0.5557746887207031,
-0.5660061836242676,
-0.3496173918247223,
-0.26282426714897156,
-0.32581889629364014,
0.2828933298587799,
1.3182858228683472,
-0.23955479264259338,
-0.93206387758255,
0.7894634008407593,
-0.2553293704986572,
-0.03329943120479584,
1.814254641532898,
0.0246739499270916,
-0.7992039322853088,
0.3214304745197296,
-0.6180046200752258,
1.8950623273849487,
1.6253080368041992,
1.2738778591156006,
-0.12815597653388977,
-0.8651018738746643,
0.6048057675361633,
-0.4000950753688812,
-0.2699054479598999,
0.8076621890068054,
0.5169535875320435,
-0.16675212979316711,
-1.349225640296936,
0.5702568888664246,
1.1828266382217407,
-0.841463029384613,
-0.798774003982544,
0.03422925993800163,
-0.733559250831604,
1.0337454080581665,
0.7879877686500549,
0.44820353388786316,
0.24068912863731384,
1.6023248434066772,
0.6686245799064636,
-0.4222646951675415,
0.4862675070762634,
0.46204280853271484,
-0.15588010847568512,
-2.099443197250366,
-1.1351441144943237,
0.3535674214363098,
-0.4302608072757721,
-1.611993670463562,
1.334961175918579,
-1.2232998609542847,
-0.9163185358047485,
0.5135374665260315,
0.1641405075788498,
1.5563290119171143,
0.3178763687610626,
1.5428386926651,
2.0028185844421387,
0.8880271315574646,
0.32405373454093933,
1.3677891492843628,
-0.051223862916231155,
-0.3432290554046631,
1.9044535160064697,
-0.4766930937767029,
0.4352540969848633,
1.10788893699646,
-0.23567233979701996,
-0.9388152956962585,
-0.7973588109016418,
-1.3014894723892212,
-0.6597772240638733,
1.1908012628555298,
0.037713490426540375,
-1.1914304494857788,
0.2069665491580963,
1.527233600616455,
0.05863993614912033,
-0.1445465087890625,
0.5944187641143799,
0.46785566210746765,
-0.7069594264030457,
0.02085423469543457,
-0.7690873742103577,
0.5245605707168579,
-0.2591663599014282,
-0.37992075085639954,
0.3544621467590332,
0.3866768479347229,
1.2971022129058838,
-0.0776822492480278,
0.13207624852657318,
1.1834826469421387,
-1.473798155784607,
1.560765027999878,
-0.589561939239502,
0.25865438580513,
-2.4308552742004395,
1.4303985834121704,
-0.7970262169837952,
1.8447157144546509,
-2.68537974357605,
0.3686884641647339,
-0.5586749911308289,
-0.37438076734542847,
0.40742263197898865,
-0.4418526887893677,
0.09199046343564987,
-0.185235396027565,
-1.0329928398132324,
0.11612772196531296,
-0.7583995461463928,
0.47504618763923645,
1.0911380052566528,
1.3107980489730835,
-1.1234054565429688,
-0.32442066073417664,
-1.8751771450042725,
-0.01913970150053501,
-0.5641810894012451,
0.47571098804473877,
-2.098299264907837,
-0.12914960086345673,
-2.013118267059326,
-2.326305866241455,
-1.3303751945495605,
-0.6701529622077942,
1.0824987888336182,
0.07980583608150482,
-0.7704843878746033,
1.147268533706665,
-0.34925636649131775,
-1.7981970310211182,
0.9748387336730957,
-2.1632883548736572
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
I have the same issue
```
ds['train'] = load_dataset(streaming=True)
ds['train'] = split_dataset_by_node(ds['train'], rank=int(os.environ["RANK"]), world_size=int(os.environ["WORLD_SIZE"]))
vectorized_datasets = ds.map(
prepare_dataset,
remove_columns=raw_datasets_features,
).with_format("torch")
vectorized_datasets["train"] = vectorized_datasets["train"].shuffle(
buffer_size=500,
seed=42,
)
def prepare_dataset(batch):
....
print(f"sentence: {batch['sentence']}, target_text: {batch['target_text']}")
return batch
```
When using split_dataset_by_node(), the data being read is indeed different for each GPU ID.
```
trainer = Trainer(
model=model,
data_collator=data_collator,
args=training_args,
compute_metrics=compute_metrics,
train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
tokenizer=processor,
callbacks=[ShuffleCallback()],
)
...
train_result = trainer.train(resume_from_checkpoint=checkpoint)
```
However, when I execute trainer.train(), the data being read is different from what I expected.
Because I print the batch value in prepare_dataset() , I observe that the data is the same for each GPU ID.
How should I handle this issue?
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 118 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
I have the same issue
```
ds['train'] = load_dataset(streaming=True)
ds['train'] = split_dataset_by_node(ds['train'], rank=int(os.environ["RANK"]), world_size=int(os.environ["WORLD_SIZE"]))
vectorized_datasets = ds.map(
prepare_dataset,
remove_columns=raw_datasets_features,
).with_format("torch")
vectorized_datasets["train"] = vectorized_datasets["train"].shuffle(
buffer_size=500,
seed=42,
)
def prepare_dataset(batch):
....
print(f"sentence: {batch['sentence']}, target_text: {batch['target_text']}")
return batch
```
When using split_dataset_by_node(), the data being read is indeed different for each GPU ID.
```
trainer = Trainer(
model=model,
data_collator=data_collator,
args=training_args,
compute_metrics=compute_metrics,
train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
tokenizer=processor,
callbacks=[ShuffleCallback()],
)
...
train_result = trainer.train(resume_from_checkpoint=checkpoint)
```
However, when I execute trainer.train(), the data being read is different from what I expected.
Because I print the batch value in prepare_dataset() , I observe that the data is the same for each GPU ID.
How should I handle this issue?
|
[
-1.3350664377212524,
-0.9291308522224426,
-0.6569652557373047,
1.5620737075805664,
-0.2202267199754715,
-1.1483135223388672,
0.2004573792219162,
-1.1747883558273315,
1.6732017993927002,
-0.8242869973182678,
0.3046208620071411,
-1.5980899333953857,
0.05460178107023239,
-0.6136983633041382,
-0.7422682642936707,
-0.8734046220779419,
-0.3513695299625397,
-0.7280778288841248,
1.1099388599395752,
2.423701047897339,
1.2635682821273804,
-1.302699089050293,
2.755265712738037,
0.7288110852241516,
-0.1595187485218048,
-1.0698322057724,
0.5709702968597412,
0.02144056186079979,
-1.2398484945297241,
-0.4572594165802002,
-0.9684800505638123,
-0.1238977387547493,
-0.6270048022270203,
-0.4597747027873993,
-0.028717413544654846,
0.4499441385269165,
-0.3105827271938324,
-0.4296574592590332,
-0.5614256262779236,
-0.7418477535247803,
0.45062655210494995,
-0.3350817561149597,
0.9030978083610535,
-0.32113876938819885,
1.78568434715271,
-0.6641718745231628,
0.454293429851532,
0.6863740682601929,
1.293660044670105,
0.24611803889274597,
-0.018227960914373398,
0.3456452786922455,
0.3949296772480011,
0.012732448987662792,
0.6123275756835938,
1.147231936454773,
0.668915867805481,
0.484777569770813,
0.7752853631973267,
-2.2580645084381104,
1.197467565536499,
-1.1089035272598267,
0.2826870083808899,
1.3674006462097168,
-0.8916618824005127,
0.3388884663581848,
-1.722615361213684,
-0.07511365413665771,
0.7183879017829895,
-2.2083897590637207,
0.2652808427810669,
-1.4044235944747925,
-0.5518115162849426,
0.953356146812439,
0.4197707176208496,
-1.229156494140625,
0.14873258769512177,
-0.4833316206932068,
1.0907816886901855,
0.44832897186279297,
0.9996513724327087,
-1.7031452655792236,
-0.0368681401014328,
-0.25453996658325195,
0.182840034365654,
-1.302337408065796,
-1.5399397611618042,
0.6287855505943298,
0.5895625948905945,
0.5650671720504761,
-0.14244864881038666,
1.1439125537872314,
-1.129194974899292,
0.7739959359169006,
-1.1566402912139893,
-1.6848922967910767,
-1.4817726612091064,
-2.2998907566070557,
-2.2659807205200195,
0.6962990760803223,
-0.4793064594268799,
-0.5765674710273743,
2.107945203781128,
-0.9818748831748962,
-1.6866629123687744,
1.108609914779663,
0.19639672338962555,
0.09728221595287323,
2.432492256164551,
0.17405737936496735,
-0.6945123672485352,
0.46796149015426636,
-0.7679091691970825,
0.7097432613372803,
-0.15852269530296326,
1.2946609258651733,
0.4205962121486664,
-1.019768238067627,
1.632690191268921,
-0.3168300986289978,
0.613109827041626,
-0.5813367962837219,
-0.5197597742080688,
-0.757148265838623,
0.2122792750597,
1.9608142375946045,
-0.1982613354921341,
1.547507405281067,
-0.40710484981536865,
-1.5381444692611694,
-1.6591094732284546,
0.9253703355789185,
0.3623633086681366,
-0.8129010200500488,
0.050489071756601334,
-0.42909321188926697,
0.1994139850139618,
-0.08502136170864105,
1.2933149337768555,
1.3030855655670166,
0.7768533229827881,
-0.44917893409729004,
-0.812295138835907,
0.08541110157966614,
-0.09232484549283981,
-0.8247413635253906,
-1.7819514274597168,
-0.36978453397750854,
0.07311301678419113,
0.6916171908378601,
-1.1402595043182373,
1.7689613103866577,
0.8869611024856567,
1.802118182182312,
1.0746995210647583,
-0.40645185112953186,
1.405504822731018,
0.05397643893957138,
1.8057847023010254,
-0.6121256351470947,
0.6129926443099976,
-0.37282755970954895,
-1.159422516822815,
0.8685303330421448,
-0.22659797966480255,
-1.998843789100647,
-0.8534796237945557,
-0.6570467948913574,
-0.18587544560432434,
-0.7626821994781494,
0.8635371923446655,
-0.39941421151161194,
-1.5127094984054565,
0.2533361315727234,
-0.6960856914520264,
0.14990627765655518,
-1.10908842086792,
0.32610249519348145,
0.6674503684043884,
-0.6119605302810669,
0.1224173977971077,
-0.24051596224308014,
-1.2628175020217896,
-0.47438639402389526,
0.2903102934360504,
1.924567461013794,
-0.7513484358787537,
0.8528085350990295,
1.0841498374938965,
-0.758414626121521,
-0.032651230692863464,
0.22791990637779236,
-0.26544421911239624,
0.7782996296882629,
-1.0106382369995117,
-0.5461218357086182,
1.2102540731430054,
-0.23014764487743378,
-0.664114236831665,
1.489567518234253,
0.7402108311653137,
-1.006365418434143,
-0.22601750493049622,
-0.1769983172416687,
-0.8555448651313782,
0.0666782408952713,
-1.5277172327041626,
-0.16978251934051514,
0.5265432000160217,
-1.5580958127975464,
-0.48047149181365967,
-0.12410528212785721,
1.3648960590362549,
-0.20992808043956757,
1.3963137865066528,
-0.3667481243610382,
-0.18819721043109894,
-0.2379869967699051,
-0.3284856379032135,
0.18309858441352844,
-0.12698887288570404,
-0.6528280973434448,
0.1499926596879959,
-0.8508614301681519,
0.3514210879802704,
1.3793652057647705,
0.3590156137943268,
0.0854310467839241,
0.4244934320449829,
1.1404898166656494,
0.400447815656662,
-0.008821718394756317,
-0.8709549903869629,
-1.5530424118041992,
1.9821431636810303,
-1.461932897567749,
2.007283926010132,
0.6597449779510498,
-0.11659729480743408,
-1.7793467044830322,
-1.7854832410812378,
1.314396858215332,
1.1782629489898682,
2.2831058502197266,
0.4585212469100952,
0.33235859870910645,
-0.7767714262008667,
-0.6706025004386902,
0.26191943883895874,
-1.000068187713623,
-0.6483795642852783,
0.22150534391403198,
2.4049978256225586,
1.8145222663879395,
-0.4098605513572693,
-0.1375139206647873,
-0.9423769116401672,
1.4084712266921997,
-0.2718983292579651,
0.3483007252216339,
1.9870305061340332,
-0.25150376558303833,
-1.073541522026062,
1.4175877571105957,
-2.384981632232666,
0.16685467958450317,
2.0889194011688232,
0.30889299511909485,
0.10904813557863235,
-1.3372098207473755,
-0.6220558285713196,
-0.4152090847492218,
-0.5317903757095337,
-1.2848174571990967,
0.5312557816505432,
-0.2866767346858978,
-0.8063696622848511,
-1.3642427921295166,
0.09889156371355057,
-1.1865564584732056,
-1.6669578552246094,
0.26396092772483826,
1.9362767934799194,
2.0643422603607178,
-0.676067590713501,
1.5905554294586182,
-0.35457712411880493,
0.11633587628602982,
1.210932970046997,
1.3598849773406982,
3.0594615936279297,
1.8563940525054932,
-1.2340373992919922,
0.6779417395591736,
-0.17610712349414825,
-0.47797173261642456,
1.1522235870361328,
-1.24481201171875,
1.2900956869125366,
-0.12917432188987732,
-1.217979073524475,
-1.284546136856079,
1.0247318744659424,
0.45257872343063354,
0.00974272470921278,
-0.4995381534099579,
1.2154104709625244,
0.06498567014932632,
1.3258345127105713,
0.6020024418830872,
-0.35838332772254944,
0.5919890999794006,
-0.44375041127204895,
-0.5399224162101746,
1.508758783340454,
0.1606125384569168,
-1.431175947189331,
-2.2493274211883545,
-0.15309619903564453,
-0.826558530330658,
0.04404125362634659,
-0.624710738658905,
-1.026014804840088,
1.7021046876907349,
0.2912498712539673,
-1.3046592473983765,
-0.24544551968574524,
-0.3183397948741913,
-0.5751354694366455,
2.786834239959717,
-1.278721570968628,
-0.22902974486351013,
-1.0354923009872437,
-0.7232983112335205,
1.715262770652771,
-1.1460317373275757,
-0.2187097817659378,
-1.0192710161209106,
-0.5649790167808533,
-1.33600914478302,
-0.4609551429748535,
0.07155177742242813,
-1.0033376216888428,
0.8249402642250061,
0.14244090020656586,
-1.173001766204834,
-0.4336569905281067,
-0.8463486433029175,
0.994894802570343,
-0.14220014214515686,
0.135520800948143,
1.9211084842681885,
0.2484416961669922,
-0.39774781465530396,
0.7901878356933594,
1.1671829223632812,
0.6955925226211548,
-0.6434459686279297,
0.17102865874767303,
-0.6623290777206421,
0.3928317725658417,
-1.3088494539260864,
0.26750653982162476,
-2.9065699577331543,
0.6472837924957275,
-0.008558431640267372,
-0.06946469843387604,
-0.015208441764116287,
-1.3293488025665283,
1.0850872993469238,
2.613422393798828,
-1.2225512266159058,
0.45877015590667725,
0.3324221074581146,
1.1674972772598267,
-1.6077191829681396,
0.3081827163696289,
-0.4519149959087372,
2.019868850708008,
0.3113399147987366,
1.3010859489440918,
-0.44630756974220276,
-2.2481231689453125,
0.7189242839813232,
-1.2282994985580444,
-1.2169519662857056,
0.781961977481842,
-0.9608221054077148,
0.2649522125720978,
-1.4532246589660645,
-0.2881115972995758,
-0.9309285879135132,
-1.122188925743103,
0.7008715271949768,
0.2410634458065033,
0.3009020686149597,
-0.5231243371963501,
0.32595619559288025,
-2.2166025638580322,
-1.3727649450302124,
-0.08891061693429947,
-0.9762448072433472,
0.5819294452667236,
-0.4249589145183563,
0.5698276162147522,
-0.09319251030683517,
-0.03351522237062454,
0.39967218041419983,
1.5568329095840454,
3.3769984245300293,
0.20193538069725037,
0.2228940725326538,
-0.21840660274028778,
-0.9685937166213989,
1.4963436126708984,
0.9254129528999329,
-0.11308042705059052,
-0.5125467777252197,
-1.0593910217285156,
1.223055362701416,
1.913335919380188,
0.9525707364082336,
-0.020055580884218216,
-0.8587786555290222,
-0.6607913374900818,
-0.051306404173374176,
0.18547946214675903,
0.4480087459087372,
0.9499238729476929,
0.0922003760933876,
0.04443630948662758,
1.487720012664795,
1.0870717763900757,
-0.4306114912033081,
0.2481975555419922,
-0.9217367172241211,
-0.5006879568099976,
0.5231235027313232,
0.23232759535312653,
-0.04946640878915787,
0.4123333990573883,
-1.0200512409210205,
-0.18304847180843353,
-0.3767491579055786,
-0.816511869430542,
-0.6662519574165344,
-0.36120927333831787,
-0.37160810828208923,
1.5043106079101562,
0.10177180171012878,
-0.5308482050895691,
-0.051150668412446976,
-0.8102108240127563,
-0.16729652881622314,
-1.0930811166763306,
0.2942436933517456,
-0.13095436990261078,
-0.24167190492153168,
-0.2751511335372925,
1.6509214639663696,
-0.865380048751831,
-1.9734805822372437,
0.1411219984292984,
0.2678704857826233,
-0.15783357620239258,
0.3160453140735626,
1.662548303604126,
0.5073211193084717,
1.3982243537902832,
1.288133978843689,
0.8885135650634766,
-0.525480329990387,
-1.3388034105300903,
0.672497570514679,
0.9603873491287231,
-1.360851764678955,
0.8787158131599426,
-0.0936589390039444,
-0.49282923340797424,
0.6083462834358215,
1.243854284286499,
0.49202150106430054,
-1.9937537908554077,
0.826105535030365,
-1.0654172897338867,
0.7929266095161438,
0.7274346351623535,
0.6559192538261414,
0.22385652363300323,
0.9070287346839905,
-1.1401152610778809,
-1.1746658086776733,
-0.6877622604370117,
-0.7405197024345398,
1.9636987447738647,
-0.321859210729599,
0.6875846982002258,
-0.21089647710323334,
-1.2333742380142212,
-0.10853520780801773,
0.6625987887382507,
0.34320324659347534,
-0.5281091928482056,
0.8985725045204163,
-0.6857999563217163,
-1.0471301078796387,
-1.2928643226623535,
-0.43200573325157166,
-1.0530496835708618,
-0.9778568148612976,
1.0843807458877563,
0.7124268412590027,
0.30421173572540283,
1.888042688369751,
0.5598427057266235,
0.3045935034751892,
-2.555633783340454,
0.9114975333213806,
0.2467677891254425,
-0.08318105340003967,
0.7972005009651184,
0.3713023364543915,
1.0218479633331299,
-0.0004409290850162506,
0.5671117305755615,
-2.40122127532959,
2.2965800762176514,
-0.2075297087430954,
0.6514703631401062,
-0.04387753829360008,
-0.14930032193660736,
1.1111913919448853,
0.6614962220191956,
0.5635299682617188,
-0.9752792716026306,
0.6483224034309387,
-0.5585153698921204,
1.2831799983978271,
0.9221654534339905,
-0.7540351748466492,
-0.06897731125354767,
1.451025366783142,
0.4478049874305725,
-0.550365686416626,
-0.9758945107460022,
-0.9312668442726135,
0.9528229236602783,
1.638257622718811,
-0.03686477243900299,
-0.13172778487205505,
0.7654593586921692,
0.6559780240058899,
-1.207900047302246,
0.050307393074035645,
-0.7009474039077759,
-0.7054026126861572,
1.6579644680023193,
2.130702495574951,
-0.2747168242931366,
-0.16630315780639648,
-0.6317710876464844,
-1.2387489080429077,
0.7971152067184448,
-0.11008806526660919,
0.10084513574838638,
0.6234831213951111,
-0.5997167825698853,
0.9904715418815613,
0.8738889694213867,
0.9244773983955383,
0.21888819336891174,
0.34995412826538086,
0.3699098229408264,
-0.3485170900821686,
-1.2211761474609375,
-0.2575843632221222,
-1.0374867916107178,
-2.5633530616760254,
0.32635554671287537,
-0.2468128204345703,
-1.3681024312973022,
0.10073874145746231,
-1.0460124015808105,
0.9346445798873901,
-0.5772152543067932,
-1.0510660409927368,
-1.4556061029434204,
0.23531675338745117,
0.06676199287176132,
0.9420246481895447,
-1.629677176475525,
-0.07845520973205566,
1.1955897808074951,
0.8450299501419067,
-0.6576056480407715,
0.970141589641571,
0.2890840768814087,
1.0625895261764526,
0.8033950328826904,
-0.3983364701271057,
0.5525657534599304,
-0.042639635503292084,
-1.3375779390335083,
0.4836311936378479,
1.1679710149765015,
0.16466905176639557,
1.527158260345459,
-0.4385185241699219,
0.003866703249514103,
0.37628597021102905,
-0.7347539067268372,
-0.4088697135448456,
-0.43187251687049866,
0.6348133087158203,
0.06435690820217133,
-0.868827223777771,
-0.13518738746643066,
-0.087832011282444,
-0.3531608283519745,
0.18156950175762177,
-1.4293944835662842,
-0.1305694729089737,
-0.4286610186100006,
-0.5760893821716309,
-1.2391481399536133,
-0.04524463415145874,
1.3823390007019043,
-0.7832009196281433,
-0.2412285953760147,
0.4197723865509033,
0.3506481349468231,
0.5502442121505737,
0.6877570748329163,
-0.7309654951095581,
-0.2633307874202728,
-0.235043466091156,
-0.31383341550827026,
0.2656833827495575,
1.4190794229507446,
-0.10867421329021454,
-0.9751091003417969,
0.7149533033370972,
-0.28118953108787537,
0.021817103028297424,
1.8777636289596558,
0.041847843676805496,
-0.7147326469421387,
0.27097973227500916,
-0.7605433464050293,
1.956462025642395,
1.6805191040039062,
1.2971097230911255,
-0.2456328570842743,
-0.8360081911087036,
0.5932344198226929,
-0.4515703320503235,
-0.4146496057510376,
0.7569116353988647,
0.34616267681121826,
-0.25466251373291016,
-1.3612462282180786,
0.8298118114471436,
1.2314484119415283,
-0.8592919111251831,
-0.7430652379989624,
0.17339542508125305,
-0.7228654026985168,
1.1111990213394165,
0.6250947713851929,
0.33204469084739685,
0.34885507822036743,
1.587203025817871,
0.838168740272522,
-0.4191734492778778,
0.45075440406799316,
0.5691754221916199,
-0.14321796596050262,
-2.191671848297119,
-1.193981647491455,
0.3551461696624756,
-0.6244872212409973,
-1.6722272634506226,
1.393770456314087,
-1.109771728515625,
-1.0264352560043335,
0.5983132123947144,
0.05050114542245865,
1.317075252532959,
0.4058244526386261,
1.5545244216918945,
2.03932785987854,
0.8267800807952881,
0.4936450719833374,
1.2559010982513428,
-0.09339895844459534,
-0.46934834122657776,
1.7925792932510376,
-0.4203413128852844,
0.5121252536773682,
1.0981754064559937,
-0.1837760955095291,
-1.042366862297058,
-0.7730031609535217,
-1.3406542539596558,
-0.6737577319145203,
1.1569119691848755,
0.08257976919412613,
-1.1158024072647095,
0.2250414788722992,
1.5369203090667725,
0.05214674025774002,
-0.29179850220680237,
0.7008460164070129,
0.3570924699306488,
-0.7861929535865784,
-0.10584024339914322,
-0.8734358549118042,
0.5633529424667358,
-0.27314603328704834,
-0.34547311067581177,
0.2949267327785492,
0.3957046568393707,
1.4441715478897095,
-0.04775626212358475,
0.17517253756523132,
1.0617766380310059,
-1.4364149570465088,
1.5019854307174683,
-0.6938301920890808,
0.3519289195537567,
-2.3957738876342773,
1.397325038909912,
-0.7559621334075928,
2.0004472732543945,
-2.7110395431518555,
0.4845551550388336,
-0.5700631737709045,
-0.4634275436401367,
0.24185532331466675,
-0.36112794280052185,
0.07610155642032623,
-0.04849864915013313,
-1.1250314712524414,
0.10141479223966599,
-0.6799823641777039,
0.5627507567405701,
1.0444399118423462,
1.3853733539581299,
-1.2038975954055786,
-0.3189640939235687,
-1.7595196962356567,
-0.11976011842489243,
-0.7469605803489685,
0.34037309885025024,
-1.9890556335449219,
-0.15967024862766266,
-1.915777564048767,
-2.4117772579193115,
-1.1659108400344849,
-0.7466530799865723,
1.1347001791000366,
0.0893111303448677,
-0.8360235095024109,
1.3221426010131836,
-0.3638729155063629,
-1.8728468418121338,
1.0636688470840454,
-2.095548629760742
] |
https://github.com/huggingface/datasets/issues/5360
|
IterableDataset returns duplicated data using PyTorch DDP
|
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
|
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
| 373 | 111 |
IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
|
[
-1.3229150772094727,
-0.954928994178772,
-0.834199070930481,
1.5285686254501343,
-0.26840588450431824,
-1.2820279598236084,
0.06130075454711914,
-1.1555571556091309,
1.7199827432632446,
-0.9163379669189453,
0.3741273581981659,
-1.6826754808425903,
0.1528691202402115,
-0.5496371388435364,
-0.8431889414787292,
-0.9291916489601135,
-0.3759465515613556,
-0.8393990397453308,
0.9173946380615234,
2.453707218170166,
1.1620211601257324,
-1.2893152236938477,
2.633901596069336,
0.6755744814872742,
-0.27380719780921936,
-1.0341776609420776,
0.5884497761726379,
-0.0032860194332897663,
-1.2094463109970093,
-0.4781685769557953,
-0.9435093402862549,
-0.07541239261627197,
-0.5634605884552002,
-0.5639708638191223,
0.06141616404056549,
0.3751157522201538,
-0.2189120650291443,
-0.31852710247039795,
-0.3585239052772522,
-0.805149257183075,
0.4873247444629669,
-0.3453848361968994,
0.9826305508613586,
-0.34197816252708435,
1.8389159440994263,
-0.5272104144096375,
0.37763747572898865,
0.7046632766723633,
1.4592472314834595,
0.23433633148670197,
-0.11281908303499222,
0.11536180973052979,
0.3904370963573456,
-0.0022490047849714756,
0.4024970233440399,
1.0676695108413696,
0.5881919264793396,
0.47174257040023804,
0.6678369045257568,
-2.3045945167541504,
1.3462108373641968,
-1.1558105945587158,
0.22929710149765015,
1.4245532751083374,
-1.0077415704727173,
0.3313281536102295,
-1.7725588083267212,
-0.059995196759700775,
0.5766579508781433,
-2.2199907302856445,
0.20736828446388245,
-1.2563884258270264,
-0.4895752966403961,
0.978772759437561,
0.2766589820384979,
-1.2888613939285278,
0.19853760302066803,
-0.3872339427471161,
1.0428599119186401,
0.5451071262359619,
1.1651726961135864,
-1.6926634311676025,
-0.06985267996788025,
-0.28457191586494446,
0.15675680339336395,
-1.408970832824707,
-1.4857245683670044,
0.615631103515625,
0.6892396807670593,
0.4571603238582611,
-0.028664860874414444,
0.9474691152572632,
-0.9169639348983765,
0.8859836459159851,
-0.9335100054740906,
-1.5835646390914917,
-1.3965418338775635,
-2.208293914794922,
-2.2996699810028076,
0.7082236409187317,
-0.5571438670158386,
-0.5747667551040649,
2.0086686611175537,
-1.118887186050415,
-1.8069305419921875,
1.155473232269287,
0.19789835810661316,
0.10957062989473343,
2.3889176845550537,
0.160324826836586,
-0.633499801158905,
0.3842725455760956,
-0.682513415813446,
0.7934276461601257,
-0.44297781586647034,
1.3859599828720093,
0.5103100538253784,
-1.0033320188522339,
1.5339235067367554,
-0.5168418884277344,
0.4814169704914093,
-0.6122167110443115,
-0.5209041237831116,
-0.8539247512817383,
0.41872847080230713,
1.8948171138763428,
-0.36827436089515686,
1.5586464405059814,
-0.3371567726135254,
-1.48175847530365,
-1.5676721334457397,
0.9333245158195496,
0.47229334712028503,
-0.8062904477119446,
0.10797353088855743,
-0.3480167090892792,
0.1669624298810959,
-0.0889185294508934,
1.047842025756836,
1.238466501235962,
0.7238698601722717,
-0.33456411957740784,
-0.8877493143081665,
0.2551562786102295,
-0.12688004970550537,
-0.6893488168716431,
-1.8213870525360107,
-0.3707699775695801,
0.1438068151473999,
0.7334036827087402,
-1.1925065517425537,
1.7364310026168823,
0.928350031375885,
1.8893321752548218,
0.965381920337677,
-0.32007282972335815,
1.4822885990142822,
0.023527046665549278,
1.8596171140670776,
-0.5111707448959351,
0.7433074116706848,
-0.40714231133461,
-1.1372319459915161,
0.8260036706924438,
-0.32131654024124146,
-1.9799273014068604,
-0.7986400127410889,
-0.8572745323181152,
-0.25705182552337646,
-0.792695939540863,
0.9855731129646301,
-0.2903996407985687,
-1.4006905555725098,
0.3363136053085327,
-0.5927261114120483,
0.15719236433506012,
-1.153677225112915,
0.4269276261329651,
0.769748330116272,
-0.6723870038986206,
0.0033175935968756676,
-0.22097480297088623,
-1.2946308851242065,
-0.4523492157459259,
0.14870978891849518,
1.9310578107833862,
-0.8393405675888062,
0.9727814793586731,
0.9208661913871765,
-0.7149916291236877,
0.04356146603822708,
0.3370455801486969,
-0.32391443848609924,
0.819300651550293,
-0.9775327444076538,
-0.42142361402511597,
1.2468090057373047,
-0.233489990234375,
-0.610937774181366,
1.4934122562408447,
0.75346440076828,
-0.9485797882080078,
-0.17362162470817566,
-0.25936299562454224,
-0.7556055188179016,
0.031917035579681396,
-1.5860997438430786,
-0.11364942044019699,
0.2155691534280777,
-1.3857890367507935,
-0.511704683303833,
-0.19706495106220245,
1.2825924158096313,
-0.19293245673179626,
1.4720311164855957,
-0.4079262614250183,
-0.22554582357406616,
-0.355904221534729,
-0.3670276999473572,
0.15037469565868378,
-0.1569938063621521,
-0.6870587468147278,
0.26218244433403015,
-0.8279455900192261,
0.3654416501522064,
1.327301025390625,
0.455802857875824,
0.06483867764472961,
0.5431187152862549,
1.1133012771606445,
0.3490839898586273,
0.04145434498786926,
-0.8942124247550964,
-1.5464881658554077,
2.0731747150421143,
-1.5262254476547241,
2.0213491916656494,
0.7702675461769104,
-0.05845436453819275,
-1.7099316120147705,
-1.8057467937469482,
1.2526830434799194,
1.167901635169983,
2.3318610191345215,
0.658348560333252,
0.3260840177536011,
-0.798835813999176,
-0.5296346545219421,
0.4864656627178192,
-1.071923017501831,
-0.7092117667198181,
0.08119300752878189,
2.3138599395751953,
1.741733431816101,
-0.46230554580688477,
-0.1916622817516327,
-0.9725070595741272,
1.3379014730453491,
-0.14684778451919556,
0.22543948888778687,
2.040011405944824,
-0.24475978314876556,
-1.1912480592727661,
1.3206804990768433,
-2.3498427867889404,
0.12899020314216614,
1.9982469081878662,
0.3610546290874481,
0.007987963035702705,
-1.4816077947616577,
-0.6436730027198792,
-0.22233189642429352,
-0.4845605492591858,
-1.2529712915420532,
0.5811142921447754,
-0.35132065415382385,
-0.8258416056632996,
-1.4366042613983154,
0.1886204183101654,
-1.2240004539489746,
-1.6547881364822388,
0.34642598032951355,
1.8106591701507568,
2.1142373085021973,
-0.7352522015571594,
1.5292845964431763,
-0.24386470019817352,
0.16747796535491943,
1.2664018869400024,
1.2289597988128662,
3.153290033340454,
1.8903433084487915,
-1.2346020936965942,
0.5961594581604004,
-0.2420400232076645,
-0.501777708530426,
1.2259353399276733,
-1.1607214212417603,
1.2455235719680786,
-0.1918872594833374,
-1.2485696077346802,
-1.2547463178634644,
0.986750602722168,
0.39937302470207214,
0.12257198244333267,
-0.5194479823112488,
1.2039124965667725,
0.046417996287345886,
1.2913999557495117,
0.5578882694244385,
-0.30851811170578003,
0.49995163083076477,
-0.5318094491958618,
-0.5407335162162781,
1.5337458848953247,
0.2748328149318695,
-1.291319489479065,
-2.2995898723602295,
-0.17667357623577118,
-0.7334828972816467,
-0.10616447776556015,
-0.5676615834236145,
-0.9832813739776611,
1.642196774482727,
0.40095648169517517,
-1.3614726066589355,
-0.34143251180648804,
-0.4044567346572876,
-0.6976844072341919,
2.631520986557007,
-1.4935096502304077,
-0.1961590200662613,
-1.0451971292495728,
-0.6061621308326721,
1.6885569095611572,
-1.2489488124847412,
-0.179258331656456,
-0.9916234016418457,
-0.6265784502029419,
-1.4285918474197388,
-0.5590173006057739,
-0.03202643245458603,
-0.9086827635765076,
0.79417484998703,
0.2143644094467163,
-1.1495741605758667,
-0.41301190853118896,
-0.817854642868042,
0.798773467540741,
-0.08773290365934372,
0.3465040326118469,
1.9162085056304932,
0.43125733733177185,
-0.4123963415622711,
0.6749831438064575,
1.0357260704040527,
0.6491634249687195,
-0.6200213432312012,
0.17912507057189941,
-0.7856012582778931,
0.37618765234947205,
-1.289884090423584,
0.34187808632850647,
-2.905323028564453,
0.6891739368438721,
0.003756818361580372,
-0.15854309499263763,
-0.09081899374723434,
-1.2624067068099976,
1.1169207096099854,
2.7035109996795654,
-1.1911700963974,
0.40721240639686584,
0.22878342866897583,
1.2802016735076904,
-1.6407814025878906,
0.3408202826976776,
-0.3904154300689697,
2.17472243309021,
0.22248061001300812,
1.320833444595337,
-0.46575844287872314,
-2.2761480808258057,
0.7297771573066711,
-1.2261191606521606,
-1.2288017272949219,
0.797322154045105,
-0.7734114527702332,
-0.09392872452735901,
-1.4499170780181885,
-0.22365741431713104,
-0.9034134149551392,
-1.2786091566085815,
0.9088079929351807,
0.16176196932792664,
0.47207462787628174,
-0.582690417766571,
0.3404671251773834,
-2.2161660194396973,
-1.3998452425003052,
-0.20906074345111847,
-0.9260396361351013,
0.4709746539592743,
-0.3460024297237396,
0.6721402406692505,
-0.09249184280633926,
0.04684358835220337,
0.3903682827949524,
1.415659785270691,
3.45735239982605,
0.29308104515075684,
0.45189327001571655,
-0.1758510172367096,
-0.966342031955719,
1.4338922500610352,
0.9782478213310242,
-0.1968022882938385,
-0.5491167902946472,
-0.9105111360549927,
1.1878854036331177,
1.926307201385498,
0.9472916722297668,
0.01983356662094593,
-0.8149102330207825,
-0.7023480534553528,
-0.08419276773929596,
0.11085881292819977,
0.5504767298698425,
0.9478940367698669,
0.005564603954553604,
0.17556944489479065,
1.534063696861267,
1.2356798648834229,
-0.43162885308265686,
0.26496365666389465,
-0.7508299946784973,
-0.3946830928325653,
0.5183252096176147,
0.3988853991031647,
-0.048799701035022736,
0.44889119267463684,
-1.0134656429290771,
-0.2938823699951172,
-0.34245309233665466,
-1.0171905755996704,
-0.673955500125885,
-0.4934678375720978,
-0.3382585346698761,
1.6149219274520874,
0.137637659907341,
-0.4600135087966919,
-0.11371316760778427,
-0.8848347663879395,
-0.13997222483158112,
-1.0975453853607178,
0.24346353113651276,
-0.11055938154459,
-0.17968639731407166,
-0.1389653980731964,
1.792339563369751,
-0.8777586221694946,
-2.0501391887664795,
0.3303048014640808,
0.2675398290157318,
-0.42163681983947754,
0.2114175707101822,
1.5737661123275757,
0.4759638011455536,
1.349416732788086,
1.318803310394287,
1.0065327882766724,
-0.6228398680686951,
-1.3713126182556152,
0.7118054032325745,
0.8441497683525085,
-1.5101675987243652,
0.8701878786087036,
0.053643785417079926,
-0.4811304211616516,
0.6640190482139587,
1.2165964841842651,
0.4135805070400238,
-1.9324424266815186,
0.7576678395271301,
-0.9218323230743408,
0.7183343172073364,
0.6939908862113953,
0.7388734221458435,
0.16097812354564667,
0.8413909077644348,
-1.2429473400115967,
-1.1758038997650146,
-0.7539862990379333,
-0.7620111107826233,
1.9282406568527222,
-0.20703627169132233,
0.6017844080924988,
-0.15347103774547577,
-1.272769570350647,
-0.18519970774650574,
0.6660215258598328,
0.2682165801525116,
-0.28064608573913574,
0.8884652256965637,
-0.7154363393783569,
-1.131430983543396,
-1.4378730058670044,
-0.42434751987457275,
-0.902529239654541,
-0.9371387362480164,
1.035489559173584,
0.8802357316017151,
0.23066174983978271,
1.8718862533569336,
0.5361066460609436,
0.19467011094093323,
-2.673351764678955,
0.8667807579040527,
0.3063500225543976,
-0.044356025755405426,
0.9089654088020325,
0.2422584444284439,
1.0080983638763428,
0.0071191564202308655,
0.51125168800354,
-2.3869712352752686,
2.2516376972198486,
-0.2996162474155426,
0.6889281272888184,
-0.05411597341299057,
-0.1643027365207672,
1.1486552953720093,
0.5932156443595886,
0.6316028833389282,
-1.160454511642456,
0.8061389327049255,
-0.6964680552482605,
1.2161539793014526,
0.9695244431495667,
-0.8497693538665771,
-0.024352597072720528,
1.344936728477478,
0.4422905445098877,
-0.49898815155029297,
-0.8841373920440674,
-0.9484410881996155,
0.8830637335777283,
1.8204810619354248,
-0.0032473537139594555,
0.000017330050468444824,
0.8053423166275024,
0.5960286855697632,
-1.1989614963531494,
0.08654510229825974,
-0.8303734660148621,
-0.8037642240524292,
1.6250923871994019,
2.0442161560058594,
-0.10712766647338867,
-0.194536492228508,
-0.7242655754089355,
-1.1731656789779663,
0.7710610032081604,
0.0946718379855156,
0.13351888954639435,
0.6560631394386292,
-0.7184687256813049,
1.1579761505126953,
1.0125640630722046,
1.0320966243743896,
0.1291133314371109,
0.3102061152458191,
0.3096456825733185,
-0.35504093766212463,
-1.0540659427642822,
-0.2696537375450134,
-1.1281192302703857,
-2.5821688175201416,
0.4509621560573578,
-0.2764313519001007,
-1.3869421482086182,
0.06953021138906479,
-0.9968018531799316,
0.8481311798095703,
-0.5813887715339661,
-1.114967942237854,
-1.4772186279296875,
0.20721326768398285,
-0.08183936774730682,
0.8837028741836548,
-1.6300359964370728,
-0.0049527608789503574,
1.274822473526001,
0.9675057530403137,
-0.5372200012207031,
1.050895094871521,
0.24652327597141266,
1.0228195190429688,
0.873227596282959,
-0.41864389181137085,
0.47984835505485535,
0.1834135502576828,
-1.3566182851791382,
0.4775640070438385,
1.1153974533081055,
0.1719365417957306,
1.488317847251892,
-0.516128420829773,
0.08786529302597046,
0.3594871759414673,
-0.6206255555152893,
-0.4391307234764099,
-0.5497205257415771,
0.8958492875099182,
0.13425160944461823,
-0.8229295611381531,
0.09309668838977814,
-0.166556254029274,
-0.27577731013298035,
0.16867321729660034,
-1.4916030168533325,
-0.2628750503063202,
-0.3051486313343048,
-0.5057496428489685,
-1.2521337270736694,
-0.03548422455787659,
1.3838475942611694,
-0.8167232275009155,
-0.11017579585313797,
0.4644993841648102,
0.4311928153038025,
0.5491166710853577,
0.5796288251876831,
-0.5699656009674072,
-0.40783655643463135,
-0.24048583209514618,
-0.2786265015602112,
0.27683818340301514,
1.3095890283584595,
-0.15404066443443298,
-0.9670276641845703,
0.786147952079773,
-0.23115284740924835,
-0.05130648612976074,
1.8449689149856567,
0.04393426328897476,
-0.7404507398605347,
0.3286161422729492,
-0.6743998527526855,
1.9291340112686157,
1.627929449081421,
1.2993122339248657,
-0.10098211467266083,
-0.9611156582832336,
0.6101786494255066,
-0.374916672706604,
-0.29833972454071045,
0.8015404343605042,
0.5068703889846802,
-0.20744213461875916,
-1.3457428216934204,
0.5700557231903076,
1.1607904434204102,
-0.961259126663208,
-0.7177707552909851,
0.04068373888731003,
-0.7288258075714111,
1.1303354501724243,
0.6686930656433105,
0.4672287404537201,
0.2713763117790222,
1.6615755558013916,
0.6738525629043579,
-0.4928950071334839,
0.41795119643211365,
0.47565358877182007,
-0.0642978772521019,
-2.143789291381836,
-1.0714783668518066,
0.37328991293907166,
-0.410002201795578,
-1.5318440198898315,
1.265373945236206,
-1.1735975742340088,
-0.9225425124168396,
0.5563565492630005,
0.10824742168188095,
1.5126538276672363,
0.2976130545139313,
1.5945873260498047,
2.0980427265167236,
0.8863765001296997,
0.2865443229675293,
1.3351961374282837,
-0.1159086748957634,
-0.4040263295173645,
1.861302137374878,
-0.39759382605552673,
0.499560683965683,
1.1169884204864502,
-0.2636532485485077,
-0.9720186591148376,
-0.7801876664161682,
-1.2637876272201538,
-0.5514180064201355,
1.1535347700119019,
0.12241194397211075,
-1.1231341361999512,
0.20698381960391998,
1.574175477027893,
0.021497098729014397,
-0.22839932143688202,
0.5767074823379517,
0.4878845512866974,
-0.7351914048194885,
-0.010697096586227417,
-0.8112216591835022,
0.48259106278419495,
-0.21164660155773163,
-0.35015153884887695,
0.3820938467979431,
0.41814982891082764,
1.278074026107788,
-0.0610596239566803,
0.09215933829545975,
1.2282770872116089,
-1.4328835010528564,
1.5467647314071655,
-0.6245845556259155,
0.17873865365982056,
-2.3827879428863525,
1.4064502716064453,
-0.8428213000297546,
1.9359123706817627,
-2.629108428955078,
0.32937636971473694,
-0.5782982707023621,
-0.45713913440704346,
0.3779100179672241,
-0.4407949149608612,
0.09357254207134247,
-0.19721278548240662,
-0.9856172800064087,
0.009558403864502907,
-0.7602658867835999,
0.4929041564464569,
1.1289955377578735,
1.3380475044250488,
-1.1623237133026123,
-0.3099639117717743,
-1.8081977367401123,
-0.12993097305297852,
-0.6704965233802795,
0.3643433749675751,
-1.9896397590637207,
-0.10476378351449966,
-2.0479869842529297,
-2.258517026901245,
-1.40554940700531,
-0.8144242763519287,
0.9928312301635742,
0.11362247914075851,
-0.8465303182601929,
1.0585072040557861,
-0.3303699791431427,
-1.7836569547653198,
1.0014880895614624,
-2.0417098999023438
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.