html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
⌀ | comment_length
int64 16
1.45k
| text
stringlengths 159
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | For now it's required to have a number of shards that is a factor of the number of GPUs to not have all the workers process the same data (and then skip the right ones to not end up training on duplicate data).
It would be quite complex to implement a strategy that would utilize all the GPUs with an arbitrary number of shards even at the end of training | 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 ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 70 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
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 ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
For now it's required to have a number of shards that is a factor of the number of GPUs to not have all the workers process the same data (and then skip the right ones to not end up training on duplicate data).
It would be quite complex to implement a strategy that would utilize all the GPUs with an arbitrary number of shards even at the end of training | [
0.005828578025102615,
0.03027656301856041,
-0.10593225061893463,
-0.051292918622493744,
0.09429320693016052,
0.049255531281232834,
0.21231137216091156,
-0.00392999779433012,
-0.021827533841133118,
0.19846254587173462,
-0.0006032550591044128,
-0.02877327799797058,
-0.05180812254548073,
-0.0335482582449913,
-0.09454786777496338,
-0.2759537696838379,
0.009094874374568462,
-0.016697339713573456,
-0.09863604605197906,
-0.0660967007279396,
-0.1611347198486328,
0.15650293231010437,
0.12240740656852722,
-0.11978117376565933,
0.03772631660103798,
-0.12128912657499313,
-0.08381341397762299,
-0.044800326228141785,
0.0668264701962471,
0.024924620985984802,
0.024990517646074295,
0.08345866948366165,
-0.17864297330379486,
0.059720177203416824,
0.000004832350896322168,
0.18669649958610535,
0.09321720153093338,
-0.031674403697252274,
-0.021479656919836998,
0.09431014209985733,
0.05191294103860855,
0.012770905159413815,
0.024853108450770378,
-0.010045379400253296,
-0.11135940253734589,
-0.08946425467729568,
-0.12774920463562012,
-0.07427561283111572,
0.12862814962863922,
-0.15248911082744598,
-0.046701785176992416,
0.2104213982820511,
-0.12452301383018494,
-0.17570413649082184,
-0.012471252121031284,
-0.07783447951078415,
0.03497029095888138,
-0.021712705492973328,
-0.012003731913864613,
0.045848578214645386,
-0.04883771762251854,
0.08314751833677292,
0.1337614804506302,
0.09247856587171555,
0.03568993881344795,
0.10629493743181229,
-0.12944290041923523,
-0.11395607143640518,
0.03977816551923752,
0.01737499050796032,
-0.16534443199634552,
-0.058097220957279205,
-0.029712993651628494,
0.03140418604016304,
-0.05436559021472931,
-0.10707966983318329,
-0.10036318004131317,
0.10993611812591553,
-0.177879199385643,
0.10301177948713303,
-0.06204633414745331,
0.06380287557840347,
0.049847979098558426,
-0.04599244147539139,
-0.12852148711681366,
-0.028171829879283905,
-0.08294430375099182,
0.17620639503002167,
0.013388821855187416,
0.12181316316127777,
-0.057469554245471954,
-0.03350027650594711,
-0.10676255822181702,
-0.10819755494594574,
-0.20149074494838715,
0.01762562245130539,
-0.08165900409221649,
-0.18658380210399628,
-0.01064410712569952,
0.040544189512729645,
0.14916621148586273,
-0.07116828113794327,
0.10296680778265,
0.05961790680885315,
0.10174685716629028,
-0.29328304529190063,
0.028071247041225433,
-0.07692873477935791,
-0.10309094935655594,
-0.08071473240852356,
0.12373527139425278,
-0.004618372768163681,
0.08339115232229233,
0.03786087781190872,
-0.0778287723660469,
-0.07873182743787766,
0.13224543631076813,
0.14329911768436432,
-0.21547625958919525,
0.006385747343301773,
0.10658200085163116,
-0.07503630965948105,
0.0037726641166955233,
0.0044332584366202354,
0.22257830202579498,
-0.0947638675570488,
-0.24634762108325958,
0.0888783261179924,
-0.07819174975156784,
-0.09687239676713943,
-0.11000533401966095,
0.013569080270826817,
0.0036162594333291054,
0.07749247550964355,
0.08377885818481445,
-0.12708359956741333,
0.09602230042219162,
-0.16530829668045044,
-0.018757428973913193,
-0.08079229295253754,
0.17390607297420502,
0.0433063767850399,
0.1129293367266655,
0.006959231570363045,
0.19361230731010437,
0.008123151957988739,
0.05587319657206535,
0.053710535168647766,
-0.05659634992480278,
0.03878393396735191,
-0.10515514761209488,
0.20952436327934265,
-0.07489034533500671,
0.12136282026767731,
-0.10872968286275864,
0.17533273994922638,
-0.039972804486751556,
-0.033793844282627106,
-0.14957290887832642,
0.05099301040172577,
0.06488361954689026,
-0.005929866340011358,
-0.1819862723350525,
-0.08539649099111557,
0.03940478339791298,
0.020729055628180504,
0.10027188062667847,
-0.04525250568985939,
0.028039738535881042,
-0.13125081360340118,
0.0895947590470314,
-0.09715588390827179,
-0.04873238131403923,
-0.1737159788608551,
-0.13444849848747253,
0.33256781101226807,
-0.20792235434055328,
0.19538578391075134,
-0.1263347715139389,
0.0009554718271829188,
0.06051957234740257,
0.04252738133072853,
0.055288344621658325,
-0.293513685464859,
0.10270508378744125,
-0.27940842509269714,
0.014417950995266438,
-0.0015924560138955712,
-0.17961597442626953,
0.09309595078229904,
0.010192520916461945,
-0.04027846083045006,
-0.0830487385392189,
0.03826651722192764,
-0.03778235614299774,
0.003029222134500742,
-0.01687830500304699,
-0.1726352721452713,
0.22413142025470734,
-0.1915641874074936,
-0.08080276101827621,
0.201382115483284,
0.15514695644378662,
-0.013965435326099396,
0.01936362311244011,
-0.1227656900882721,
-0.14522285759449005,
0.22623102366924286,
0.1541040688753128,
-0.22712422907352448,
-0.13380232453346252,
0.003317233407869935,
0.070088692009449,
-0.012329934164881706,
-0.1001497432589531,
0.1249973326921463,
-0.11896148324012756,
0.005877414718270302,
0.06415460258722305,
0.0014795541064813733,
-0.1800207942724228,
0.04831607639789581,
-0.0894598439335823,
0.02272244356572628,
-0.0019863294437527657,
-0.007616901304572821,
-0.015160541981458664,
0.0034687439911067486,
0.1431034505367279,
-0.021497704088687897,
-0.01062143687158823,
-0.14127404987812042,
0.24182842671871185,
0.019024310633540154,
0.005991910118609667,
0.048830337822437286,
0.04486987739801407,
-0.17059366405010223,
0.050901975482702255,
0.008947000838816166,
-0.14843584597110748,
-0.058287378400564194,
-0.22423155605793,
-0.05210062116384506,
-0.06212926656007767,
0.09869305789470673,
-0.10476835817098618,
0.1527378112077713,
0.006015053950250149,
0.02630813606083393,
0.19882403314113617,
0.04893924668431282,
-0.10808980464935303,
-0.07825595885515213,
-0.16448867321014404,
-0.11945991218090057,
0.08738630264997482,
0.08437912166118622,
0.134243905544281,
0.1589529663324356,
0.21186433732509613,
0.07650092244148254,
-0.10998182743787766,
-0.0038973335176706314,
0.001091834157705307,
0.002404929371550679,
0.1123356893658638,
0.0271220114082098,
-0.02841518260538578,
0.0020094546489417553,
0.21649734675884247,
0.05847416818141937,
0.01796872913837433,
-0.045008398592472076,
-0.08183373510837555,
-0.03511707857251167,
0.03722100704908371,
0.09079494327306747,
-0.040063586086034775,
-0.19304907321929932,
-0.10141941905021667,
0.14251594245433807,
0.2280498743057251,
-0.2557697892189026,
0.03283742070198059,
0.12437798082828522,
0.004601646214723587,
-0.015605281107127666,
-0.12281006574630737,
-0.0009682333329692483,
0.015990136191248894,
0.002686436753720045,
-0.005471839103847742,
0.03790498897433281,
0.1974671483039856,
0.01857486367225647,
0.026814192533493042,
0.04807521775364876,
-0.021564049646258354,
0.03022713027894497,
-0.10574540495872498,
-0.05105037987232208,
-0.011636573821306229,
-0.02523362636566162,
0.04392441362142563,
0.07046615332365036,
-0.02901993878185749,
0.0472356416285038,
-0.21789471805095673,
-0.08396152406930923,
-0.08196227997541428,
-0.057305458933115005,
-0.08093155175447464,
0.08921029418706894,
-0.03776014596223831,
-0.22063153982162476,
-0.07711297273635864,
-0.10894393920898438,
0.00034235327620990574,
0.011765130795538425,
0.04755043983459473,
0.09363599121570587,
-0.08413643389940262,
-0.10465827584266663,
0.0467982180416584,
-0.1388518363237381,
-0.024884402751922607,
-0.090374656021595,
0.10045642405748367,
-0.07721703499555588,
-0.049018777906894684,
-0.006514791399240494,
0.047501854598522186,
-0.012523317709565163,
0.13317419588565826,
-0.10391176491975784,
-0.06959692388772964,
-0.06643743813037872,
0.1680378019809723,
0.022699151188135147,
0.023043327033519745,
-0.1479405164718628,
-0.05036034435033798,
0.002008784795179963,
0.13275811076164246,
0.01220005750656128,
-0.03473307192325592,
-0.034783825278282166,
-0.07618195563554764,
0.06137414276599884,
-0.11872157454490662,
0.1478607952594757,
-0.10022861510515213,
-0.07587260007858276,
-0.06526061147451401,
-0.02142869122326374,
-0.028660159558057785,
-0.010053364560008049,
-0.16586226224899292,
0.16777339577674866,
-0.030203206464648247,
0.19726331532001495,
0.29820477962493896,
0.0012984705390408635,
-0.07044640928506851,
0.05256647989153862,
0.2668486535549164,
-0.06231454014778137,
-0.0012535868445411325,
-0.30606356263160706,
0.024368761107325554,
-0.06065389886498451,
0.04786209762096405,
-0.03309806063771248,
-0.05947761982679367,
-0.15027393400669098,
0.006283023860305548,
-0.006757442839443684,
0.17614202201366425,
-0.1571464091539383,
0.15074191987514496,
-0.050948843359947205,
0.03972071781754494,
0.14461423456668854,
0.20756754279136658,
0.1979423463344574,
0.029264064505696297,
0.047398947179317474,
-0.039040643721818924,
0.3046707808971405,
0.021449388936161995,
-0.09045982360839844,
-0.01914285682141781,
-0.21051505208015442,
-0.06540682911872864,
0.010790501721203327,
0.14303326606750488,
0.026916462928056717,
-0.04586371034383774,
0.21915598213672638,
0.23326674103736877,
0.20571698248386383,
-0.0696604922413826,
0.16537117958068848,
0.014369084499776363,
-0.025060152634978294,
0.005210523027926683,
-0.055530574172735214,
0.07939717173576355,
0.061710257083177567,
0.09794080257415771,
0.012994478456676006,
-0.013475042767822742,
-0.13721980154514313,
0.14159660041332245,
-0.17843583226203918,
-0.14487548172473907,
0.010694775730371475,
0.1002017930150032,
-0.024369018152356148,
-0.04226987808942795,
-0.021376701071858406,
0.16885393857955933,
0.09801330417394638,
0.07886127382516861,
-0.13347123563289642,
-0.12621551752090454,
0.06698311120271683,
0.07105541229248047,
0.08483386784791946,
-0.022861529141664505,
0.03664012998342514,
0.19179296493530273,
0.054792601615190506,
0.15740548074245453,
-0.006577691063284874,
0.09312424808740616,
0.046981725841760635,
0.006840407848358154,
0.08138768374919891,
-0.37766167521476746,
0.08927439898252487,
0.4455583989620209,
-0.14658203721046448,
0.05617266893386841,
-0.09139057993888855,
-0.036603379994630814,
-0.06529281288385391,
0.16154198348522186,
0.007668974343687296,
-0.09820820391178131,
0.043326668441295624,
-0.013093865476548672,
-0.12980034947395325,
0.16029928624629974,
-0.10546864569187164,
0.06491311639547348,
-0.04613489285111427,
0.03128979727625847,
0.15186448395252228,
-0.0037388643249869347,
-0.028438115492463112,
0.13794046640396118,
-0.05690797045826912,
-0.17730672657489777,
0.21873041987419128,
0.08022797852754593,
-0.0028678500093519688,
-0.024126654490828514,
0.08892729133367538,
-0.13542506098747253,
0.10675345361232758,
0.021389290690422058,
0.1107020378112793,
0.18995420634746552,
0.13341833651065826,
0.04714082553982735,
-0.027215059846639633,
-0.020448829978704453,
-0.06212637573480606,
0.2128993570804596,
-0.023022301495075226,
-0.01829974539577961,
0.12802165746688843,
-0.02987026236951351,
0.15645582973957062,
0.06890957057476044,
0.09898410737514496,
-0.24168023467063904,
0.15576623380184174,
0.07149595022201538,
-0.10637003928422928,
-0.13418197631835938,
0.08302796632051468,
0.07032869011163712,
-0.054077524691820145,
-0.10861986875534058,
0.1361830234527588,
0.05604277178645134,
0.14127284288406372,
-0.09468287974596024,
-0.12722720205783844,
-0.092087022960186,
-0.02103627845644951,
-0.09214594215154648,
-0.09847874939441681,
0.03220713511109352,
-0.03009330853819847,
0.0996360033750534,
-0.007106909994035959,
-0.15399326384067535,
0.1460219919681549,
-0.08244432508945465,
-0.2024812549352646,
0.0865875780582428,
-0.08439576625823975,
-0.24245372414588928,
0.059435829520225525,
0.11902713030576706,
-0.05315468832850456,
0.051222484558820724,
0.06094156950712204,
-0.09640222042798996,
-0.17766380310058594,
0.08963967114686966,
0.08394730091094971,
0.08804847300052643,
0.09968630969524384,
0.058568790555000305,
0.06358934938907623,
0.02947543002665043,
-0.08195460587739944,
0.011689765378832817,
0.00509544275701046,
-0.02998691238462925,
-0.10623494535684586,
0.09712181985378265,
-0.06578199565410614,
-0.013259440660476685,
-0.0856403112411499,
0.05526221916079521,
-0.14292244613170624,
-0.0911501869559288,
-0.09641793370246887,
0.0003158087201882154,
-0.0009855137905105948,
-0.11185110360383987,
-0.0311919953674078,
-0.056190937757492065,
0.00016271429194603115,
0.0954509750008583,
0.14973898231983185,
0.0438837856054306,
-0.13176272809505463,
0.07643938064575195,
-2.549983144444289e-32,
0.05101650208234787,
0.04886288940906525,
0.07757920026779175,
-0.015745162963867188,
-0.04897535592317581,
0.027862491086125374,
-0.03322923928499222,
-0.1338546872138977,
0.010436858981847763,
-0.07331449538469315,
-0.28393375873565674,
0.16241367161273956,
0.13902151584625244,
-0.06491900980472565,
0.039394479244947433,
-0.021857019513845444,
0.22902856767177582,
-0.02624751441180706,
-0.10365813225507736,
0.2245779186487198,
-0.06566879898309708,
0.15289412438869476,
0.031234638765454292,
0.06383753567934036,
-0.08519688248634338,
0.003721398999914527,
-0.007278838660567999,
-0.023942774161696434,
-0.11077848821878433,
-0.21085478365421295,
-0.1368125081062317,
0.09726505726575851,
-0.06301150470972061,
-0.05882437527179718,
-0.18587130308151245,
0.001296004862524569,
-0.231953963637352,
-0.1623479723930359,
0.01899009570479393,
0.13533206284046173,
-0.1429089903831482,
0.16193009912967682,
-0.00971278827637434,
-0.04400166869163513,
0.13385526835918427,
0.013220098800957203,
-0.009389343671500683,
0.17108958959579468,
-0.16534656286239624,
0.08274266123771667,
0.16668576002120972,
0.15681365132331848,
0.24846294522285461,
0.20016317069530487,
0.15158890187740326,
-0.0705571398139,
0.1830511838197708,
0.11244826018810272,
-0.3043050169944763,
0.11972333490848541,
0.05317866802215576,
-0.12406150996685028,
0.04955499619245529,
0.04476003348827362,
0.21745413541793823,
0.04074002057313919,
0.19147194921970367,
0.039048247039318085,
0.15390026569366455,
-0.10751865804195404,
-0.008206948637962341,
-0.15368789434432983,
-0.20986227691173553,
-0.14543835818767548,
-0.08679653704166412,
0.020125746726989746,
-0.062161482870578766,
-0.11914688348770142,
-0.07008472084999084,
-0.043255988508462906,
0.05645717307925224,
-0.11993418633937836,
0.020368395373225212,
-0.08124212175607681,
-0.04075421020388603,
-0.21643641591072083,
0.08565899729728699,
0.09173715114593506,
0.03352223336696625,
0.01749342866241932,
-0.19949020445346832,
0.26802006363868713,
-0.09171924740076065,
-0.061179619282484055,
-0.010854307562112808,
0.1570257693529129,
-0.026051856577396393,
0.18583565950393677,
-0.03400572016835213,
-0.08256323635578156,
-0.14021053910255432,
-0.005421312525868416,
-0.054657574743032455,
-0.027467088773846626,
0.07164259254932404,
-0.002130613662302494,
0.1273023784160614,
0.08665365725755692,
-0.06711233407258987,
-0.02241951785981655,
-0.03618641197681427,
0.07669153809547424,
-0.0136147141456604,
0.21809032559394836,
0.16656765341758728,
-0.17036041617393494,
0.18980053067207336,
-0.06103281304240227,
0.20393715798854828,
0.21870063245296478,
-0.04291157424449921,
-0.068640798330307,
-0.16113251447677612,
-0.03370802477002144,
0.1799900382757187,
0.06512316316366196,
-0.02794421836733818,
-0.07008163630962372,
0.04336470365524292,
-0.20222270488739014,
0.12104281783103943,
0.1131463572382927,
6.662998544015863e-7,
-0.0802207961678505,
0.05561933293938637,
-0.09380892664194107,
-0.10398665815591812,
-0.07349269092082977,
-0.005687261465936899,
0.10105116665363312,
0.05818566307425499,
-0.013129588216543198,
0.24723568558692932,
0.2350931614637375,
-0.02452065609395504,
-0.05831187590956688,
0.008075677789747715,
-0.0179632268846035,
-0.06475074589252472,
-0.1337047517299652,
0.12329405546188354,
-0.17116287350654602,
-0.12758538126945496,
-0.0819765105843544,
0.14581361413002014,
0.08458805829286575,
-0.14216569066047668,
0.07806266099214554,
0.05685023218393326,
-0.19537684321403503,
0.061124373227357864,
0.14007079601287842,
0.07835767418146133,
0.1249525249004364,
-0.0770273357629776,
0.040040723979473114,
0.08332445472478867,
0.08988456428050995,
0.17355865240097046,
-0.07761141657829285,
-0.02035471610724926,
-0.06841117143630981,
0.08133620768785477,
0.1027798056602478,
-0.15720127522945404,
0.016593685373663902,
-0.08810340613126755,
0.14278966188430786,
0.08933433890342712,
-0.09028521925210953,
0.055350691080093384,
-0.0046708169393241405,
0.013207140378654003,
0.04259009659290314,
0.15369637310504913,
0.24932101368904114,
0.3005973696708679,
0.0215954277664423,
-0.16404572129249573,
-0.006275254767388105,
-0.13544967770576477,
0.0966801717877388,
-0.08929531276226044,
-0.15352506935596466,
-0.04966254159808159,
-0.01794932410120964,
0.08664418011903763,
-0.03960956633090973,
-0.016291501000523567,
-0.2209545522928238,
5.556417155430504e-35,
0.1041354313492775,
0.02255435846745968,
-0.025986291468143463,
-0.055531151592731476,
-0.15880921483039856,
-0.17754797637462616,
-0.021514542400836945,
0.13217058777809143,
-0.12601780891418457,
-0.2783605456352234,
-0.2301379293203354
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | This is the actual error:
```
Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
```
Which means some samples are incorrectly formatted.
PyArrow, a storage backend that we use under the hood, requires that all the list elements have the same level of nesting (same number of dimensions) or are `None`.
```python
import pyarrow as pa
pa.array([[1, 2, 3], 2]) # ArrowInvalid: cannot mix list and non-list, non-null values
pa.array([[1, 2, 3], [2]]) # works
``` | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 84 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
This is the actual error:
```
Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
```
Which means some samples are incorrectly formatted.
PyArrow, a storage backend that we use under the hood, requires that all the list elements have the same level of nesting (same number of dimensions) or are `None`.
```python
import pyarrow as pa
pa.array([[1, 2, 3], 2]) # ArrowInvalid: cannot mix list and non-list, non-null values
pa.array([[1, 2, 3], [2]]) # works
``` | [
0.12158413231372833,
0.09572990238666534,
-0.03419060260057449,
0.06406231969594955,
0.2810746431350708,
-0.10272638499736786,
0.003484567394480109,
-0.04275978356599808,
-0.07062482088804245,
0.08074185997247696,
0.03808010742068291,
-0.2081207036972046,
0.0005349003477022052,
-0.094467394053936,
0.001770412316545844,
0.0684051662683487,
0.1133982464671135,
-0.08294535428285599,
-0.046467628329992294,
-0.04825664311647415,
-0.2323916107416153,
-0.09009072184562683,
0.008742576465010643,
-0.1250523328781128,
0.005453628022223711,
0.014624267816543579,
-0.0776016041636467,
0.07851841300725937,
0.060967765748500824,
-0.12270817160606384,
-0.003217759309336543,
-0.174092635512352,
-0.09133927524089813,
0.279139906167984,
0.0000056557078096375335,
0.00654627475887537,
0.28819623589515686,
0.011619620956480503,
-0.1825563609600067,
-0.12260131537914276,
0.1427690088748932,
-0.19905436038970947,
0.0052156089805066586,
-0.0239460077136755,
0.03481875732541084,
-0.20239850878715515,
-0.10003887116909027,
-0.07926727086305618,
-0.0014077164232730865,
-0.025836829096078873,
-0.06344769895076752,
0.0017326822271570563,
0.02348199486732483,
-0.17361435294151306,
0.10555671155452728,
0.09005793184041977,
0.09188622981309891,
0.12631860375404358,
-0.07143794745206833,
-0.012094809673726559,
-0.015163913369178772,
-0.17567755281925201,
0.02166953682899475,
0.048615507781505585,
-0.22211366891860962,
-0.026882875710725784,
-0.15181538462638855,
-0.09632550925016403,
0.02885245718061924,
0.17750416696071625,
0.010668408125638962,
0.14060597121715546,
-0.13581296801567078,
0.06338895112276077,
0.00470764422789216,
-0.1104852706193924,
0.08926505595445633,
0.13861431181430817,
-0.09156559407711029,
-0.017125830054283142,
-0.07720676064491272,
0.1294962763786316,
-0.059790194034576416,
-0.0036078649573028088,
-0.32493653893470764,
0.07357529550790787,
-0.18695609271526337,
0.07173523306846619,
-0.07922398298978806,
-0.05192664638161659,
-0.0003084772324655205,
0.02734772302210331,
-0.17254981398582458,
-0.18862809240818024,
0.10717792809009552,
0.06425624340772629,
0.05863996222615242,
-0.12257950752973557,
0.10539520531892776,
-0.006551743019372225,
-0.06564753502607346,
-0.07684294134378433,
-0.1308581382036209,
-0.01139922346919775,
0.1716059446334839,
-0.0823647528886795,
-0.08170539140701294,
-0.17979122698307037,
0.14667797088623047,
-0.059656474739313126,
-0.04980859532952309,
0.14747489988803864,
-0.036589495837688446,
-0.07340335100889206,
0.07946525514125824,
-0.1667303591966629,
0.09281360357999802,
0.051316529512405396,
0.19112296402454376,
0.1388908326625824,
-0.0871707946062088,
0.02149858884513378,
-0.08697440475225449,
0.11364531517028809,
-0.07846031337976456,
0.09496389329433441,
-0.05899788439273834,
0.0704311728477478,
-0.11562323570251465,
0.023443553596735,
0.07767247408628464,
-0.11298063397407532,
0.020214134827256203,
-0.0774538666009903,
0.1296742856502533,
0.032257504761219025,
0.07843156158924103,
0.01059994287788868,
0.041234955191612244,
-0.06339459866285324,
-0.005846043117344379,
-0.04973471164703369,
0.13577651977539062,
0.16523323953151703,
0.02472248673439026,
0.017428947612643242,
0.0178496353328228,
0.013798490166664124,
0.05144817754626274,
0.12208320200443268,
-0.30711790919303894,
0.165639266371727,
-0.11931180953979492,
0.01722854934632778,
-0.1681334525346756,
-0.08866552263498306,
-0.03102678805589676,
-0.19832520186901093,
-0.18377812206745148,
-0.06827062368392944,
0.01938830316066742,
0.04587561637163162,
0.014698673970997334,
-0.11307033151388168,
0.08902542293071747,
0.11436356604099274,
-0.10049158334732056,
0.03128466010093689,
-0.08194092661142349,
-0.005386737175285816,
0.18050679564476013,
0.10431098937988281,
0.008971036411821842,
0.030098412185907364,
-0.0687941387295723,
0.1487903743982315,
-0.06245194748044014,
0.05500354990363121,
-0.3064592778682709,
0.17548790574073792,
-0.006215014029294252,
-0.03156080096960068,
-0.10130394250154495,
-0.14954745769500732,
0.036509230732917786,
-0.0083658117800951,
0.10113640874624252,
0.04847359284758568,
0.09251616150140762,
-0.07486695796251297,
-0.1506965607404709,
0.05816708132624626,
0.018267594277858734,
-0.07948209345340729,
-0.1009826734662056,
-0.15250754356384277,
0.018282422795891762,
-0.04407503828406334,
0.08930039405822754,
-0.06794364750385284,
-0.007068033795803785,
0.0946357324719429,
0.0026960766408592463,
0.10315645486116409,
0.035829126834869385,
0.03099866956472397,
-0.21971149742603302,
0.05292057991027832,
-0.022820426151156425,
-0.13783587515354156,
-0.07503033429384232,
0.13481250405311584,
-0.07866193354129791,
0.14031818509101868,
-0.1716921031475067,
0.004771057981997728,
-0.031490448862314224,
0.06956189125776291,
-0.15879325568675995,
0.2124277502298355,
-0.01913018338382244,
-0.030768686905503273,
-0.006587986834347248,
0.01964437961578369,
-0.03293127194046974,
0.07016734033823013,
-0.061691395938396454,
0.036678578704595566,
-0.12871748208999634,
0.09693623334169388,
0.047240886837244034,
-0.11839131265878677,
0.03107881359755993,
0.06038833037018776,
0.03939923271536827,
-0.01067670900374651,
-0.11993595957756042,
-0.07304350286722183,
0.06097003445029259,
0.06273379176855087,
-0.019701676443219185,
0.24736423790454865,
0.1273806244134903,
-0.13860495388507843,
0.04307808354496956,
-0.02444819174706936,
-0.04194358363747597,
0.2135089784860611,
-0.10369136929512024,
-0.050119709223508835,
0.2791089117527008,
0.2354845404624939,
-0.15202057361602783,
0.06568270921707153,
0.002808573190122843,
-0.04893343150615692,
0.048780567944049835,
0.1786309778690338,
0.018639402464032173,
-0.23785285651683807,
0.30971723794937134,
-0.010260336101055145,
-0.051231659948825836,
0.03609029948711395,
-0.053718727082014084,
-0.044199325144290924,
-0.08171569555997849,
0.0033521235454827547,
0.08351067453622818,
0.07084597647190094,
0.08501441031694412,
-0.16835936903953552,
-0.11392923444509506,
-0.12559093534946442,
-0.07522858679294586,
-0.06534983217716217,
-0.07202549278736115,
-0.013454650528728962,
0.06825003027915955,
0.10873039811849594,
0.08216942101716995,
0.008085780777037144,
-0.011563049629330635,
-0.05412881076335907,
0.07686693966388702,
0.13184013962745667,
-0.049107279628515244,
0.014097715727984905,
-0.0796293243765831,
0.16336025297641754,
-0.01482137106359005,
0.024771535769104958,
-0.07243433594703674,
-0.12491863965988159,
-0.09175573289394379,
-0.07935205101966858,
0.16023039817810059,
-0.005691978614777327,
0.07494976371526718,
-0.1043686494231224,
0.029016193002462387,
0.07581695914268494,
0.05961449816823006,
0.006970731541514397,
0.09205277264118195,
-0.07137586921453476,
0.05003870651125908,
0.11778682470321655,
-0.20761841535568237,
0.004723286256194115,
-0.11971995234489441,
-0.0027051828801631927,
0.12942302227020264,
0.12688058614730835,
-0.00005215172132011503,
0.21924792230129242,
0.02765805460512638,
-0.07568743824958801,
0.11014003306627274,
0.0607760027050972,
0.01811133325099945,
0.24013376235961914,
-0.13066352903842926,
-0.07353067398071289,
0.0937320739030838,
0.09268546849489212,
-0.07282710075378418,
-0.12116682529449463,
0.08702505379915237,
0.12164004892110825,
-0.045395784080028534,
0.061357058584690094,
-0.06423697620630264,
-0.10449130833148956,
0.03018053062260151,
-0.11214841902256012,
-0.19949816167354584,
0.016333462670445442,
0.3043420910835266,
0.022136608138680458,
-0.13862735033035278,
-0.03500257432460785,
-0.0904010757803917,
-0.09856949001550674,
0.03699396923184395,
-0.15951742231845856,
0.04712950438261032,
-0.138475701212883,
-0.04566120356321335,
-0.10175783932209015,
0.025762762874364853,
0.11534099280834198,
-0.033773023635149,
-0.03929746150970459,
-0.14079026877880096,
-0.050404250621795654,
-0.037503432482481,
0.13111059367656708,
-0.035078857094049454,
0.06966357678174973,
0.0490732379257679,
-0.15722651779651642,
-0.15683335065841675,
0.16692060232162476,
-0.04400418698787689,
0.06951291114091873,
0.14139367640018463,
0.0387364998459816,
-0.23772874474525452,
-0.10612993687391281,
0.04616571590304375,
-0.10883671045303345,
0.01601550728082657,
-0.012440524064004421,
0.020032675936818123,
-0.08560352772474289,
0.09020182490348816,
-0.17722484469413757,
-0.027035336941480637,
0.05086805298924446,
0.06417835503816605,
-0.08260998129844666,
-0.1157623752951622,
0.1446411907672882,
0.12072452902793884,
-0.0033045972231775522,
-0.01877894438803196,
0.0019199841190129519,
-0.18480618298053741,
0.17211350798606873,
0.052823808044195175,
0.10878279060125351,
-0.013749035075306892,
0.1289360672235489,
0.020554939284920692,
-0.10820028930902481,
0.27921348810195923,
0.13317090272903442,
-0.060734640806913376,
0.07286526262760162,
0.03372402861714363,
0.11510226130485535,
-0.009026114828884602,
0.24315252900123596,
0.1457328349351883,
0.14883144199848175,
-0.005775928031653166,
-0.05823550000786781,
0.044418785721063614,
-0.005130663979798555,
0.16775459051132202,
0.14183127880096436,
0.06404715776443481,
0.10054481029510498,
0.16319675743579865,
0.12629961967468262,
-0.02662166766822338,
-0.011240930296480656,
-0.012796330265700817,
-0.12999752163887024,
-0.15326835215091705,
-0.20164471864700317,
0.04753434658050537,
0.21564331650733948,
0.0333450511097908,
0.03694996237754822,
-0.04231857880949974,
-0.05804623290896416,
0.12030491232872009,
0.009798974730074406,
0.014725779183208942,
-0.10357300192117691,
0.09494674950838089,
-0.13049355149269104,
0.13471341133117676,
-0.06219301372766495,
0.39373230934143066,
0.11283744871616364,
0.06745295971632004,
0.13891473412513733,
-0.29387277364730835,
-0.11651483923196793,
-0.15408889949321747,
-0.014476603828370571,
0.029203206300735474,
-0.09410044550895691,
-0.02763717994093895,
-0.027948839589953423,
-0.006379846017807722,
-0.041669465601444244,
-0.0687997043132782,
-0.04747571051120758,
0.05643123760819435,
-0.042791467159986496,
0.058711446821689606,
0.004193118307739496,
0.15275849401950836,
-0.17106910049915314,
0.1244279146194458,
0.1970585286617279,
-0.23820564150810242,
-0.05340863764286041,
0.06301898509263992,
0.06226625293493271,
0.003830147674307227,
0.060629941523075104,
0.13952167332172394,
-0.24048766493797302,
0.037540458142757416,
0.1116710752248764,
-0.040139246731996536,
0.17478221654891968,
-0.10167642682790756,
-0.055771514773368835,
0.10169602185487747,
0.07232300937175751,
-0.09160462021827698,
-0.025379743427038193,
0.019351698458194733,
-0.0018346583237871528,
0.249860480427742,
-0.02506205253303051,
0.013525581918656826,
-0.13367852568626404,
0.009125147946178913,
0.24565687775611877,
-0.02229519933462143,
0.00002414948721707333,
-0.14604896306991577,
-0.06813337653875351,
0.16016897559165955,
0.012922378256917,
0.02419920824468136,
0.10643413662910461,
0.18548338115215302,
0.022575264796614647,
-0.1129515990614891,
0.16550108790397644,
-0.03556651622056961,
-0.02281257137656212,
0.039942968636751175,
-0.022998016327619553,
0.0074804737232625484,
-0.09927181899547577,
-0.006072188727557659,
0.012014114297926426,
0.10456910729408264,
0.032882142812013626,
0.002397905569523573,
-0.12472504377365112,
-0.12142075598239899,
-0.015314849093556404,
-0.09182453900575638,
-0.004519348498433828,
0.09170981496572495,
0.008760505355894566,
-0.07489176094532013,
-0.045934997498989105,
0.1054694876074791,
-0.016923557966947556,
0.13575883209705353,
-0.05953069403767586,
0.07015866786241531,
-0.11977587640285492,
0.012060762383043766,
0.019938766956329346,
-0.04635899141430855,
-0.10808141529560089,
0.2172384113073349,
0.10408420860767365,
0.12384940683841705,
0.1192488968372345,
0.18260042369365692,
-0.0015802162233740091,
-0.055057819932699203,
0.2546357214450836,
0.15213565528392792,
-0.11736180633306503,
-0.026098797097802162,
0.13735364377498627,
-0.13039276003837585,
-0.29498231410980225,
-0.08193746954202652,
0.020752552896738052,
0.07291700690984726,
0.10882820188999176,
-0.07406795769929886,
-0.016987768933176994,
-0.06162135675549507,
-0.038418762385845184,
-0.0712447538971901,
0.1251518279314041,
-0.008574914187192917,
-0.026339314877986908,
-0.1191616803407669,
-2.1473487051704113e-32,
0.04982329532504082,
0.07914614677429199,
-0.011644711717963219,
-0.08039122074842453,
-0.12647052109241486,
0.1211644783616066,
-0.09051346778869629,
-0.08604069799184799,
-0.04536145552992821,
0.04999775439500809,
-0.16605988144874573,
-0.1386081576347351,
0.026966840028762817,
0.061399415135383606,
-0.11998756974935532,
-0.17222625017166138,
-0.014172290451824665,
0.00036215802538208663,
0.023890525102615356,
-0.02428133226931095,
0.01865476369857788,
0.08805268257856369,
-0.09876786172389984,
0.09828811138868332,
0.0760340541601181,
0.008532760664820671,
0.08138705790042877,
-0.02876124531030655,
0.2413518726825714,
-0.035175323486328125,
-0.04792381823062897,
0.07730972021818161,
-0.00021238486806396395,
-0.12858127057552338,
-0.09573313593864441,
-0.1455516815185547,
-0.0795782208442688,
0.05814103037118912,
-0.023276902735233307,
0.07864131033420563,
-0.046001289039850235,
0.08891576528549194,
0.13565954566001892,
-0.07845340669155121,
-0.0200396329164505,
-0.014195255935192108,
-0.020481782034039497,
-0.007794895675033331,
-0.2484828233718872,
-0.029001319780945778,
0.0980776771903038,
0.011268394999206066,
0.013417843729257584,
0.010847508907318115,
-0.011614486575126648,
-0.17293940484523773,
0.08819828182458878,
0.06582929193973541,
-0.03651928901672363,
-0.07292526215314865,
0.11267454922199249,
-0.07252885401248932,
0.026725316420197487,
-0.13275949656963348,
0.014766765758395195,
0.15566261112689972,
0.38945457339286804,
0.1464073657989502,
0.027719374746084213,
-0.016680102795362473,
-0.059104155749082565,
0.0532367005944252,
-0.24861778318881989,
0.07261930406093597,
0.04214993491768837,
-0.04140792414546013,
-0.02180650271475315,
-0.058768440037965775,
-0.17854437232017517,
-0.01563558168709278,
0.0827566385269165,
-0.023072881624102592,
-0.06449544429779053,
0.07213220000267029,
-0.21483732759952545,
-0.0490674190223217,
-0.022990964353084564,
0.08635573089122772,
-0.01878511719405651,
-0.0963483676314354,
0.0634339228272438,
0.030888769775629044,
-0.10097822546958923,
-0.11703509837388992,
-0.08082481473684311,
0.12462873011827469,
-0.16951823234558105,
0.011613757349550724,
-0.19626125693321228,
0.021655816584825516,
0.0499843955039978,
-0.12889614701271057,
-0.009151503443717957,
-0.08300011605024338,
0.1524709016084671,
0.20796740055084229,
0.1262521594762802,
0.011144239455461502,
-0.07928450405597687,
-0.09958943724632263,
-0.11485730856657028,
0.08161435276269913,
-0.02096581645309925,
0.0256651621311903,
0.27017340064048767,
0.037493351846933365,
-0.03162654489278793,
-0.04173661395907402,
0.16337209939956665,
0.12964971363544464,
-0.04061521589756012,
-0.11198838800191879,
-0.05731520056724548,
0.07419760525226593,
0.007295896764844656,
-0.0721069872379303,
-0.11993364989757538,
-0.05457669869065285,
0.0295993834733963,
-0.06024949997663498,
0.0784517452120781,
-0.10527951270341873,
7.851680834392027e-7,
-0.17918431758880615,
0.14025573432445526,
-0.03369400277733803,
0.08976789563894272,
-0.003276744857430458,
0.0790921226143837,
-0.2213544398546219,
0.10728617012500763,
-0.16839268803596497,
0.12358156591653824,
0.12462657690048218,
0.020294487476348877,
-0.05833829194307327,
0.027322202920913696,
0.07357233017683029,
-0.016151469200849533,
-0.03132031112909317,
0.02467557229101658,
-0.17826205492019653,
-0.10251836478710175,
0.1455007642507553,
0.13415300846099854,
-0.010000050067901611,
-0.08167701214551926,
0.08616895973682404,
-0.19284850358963013,
-0.009353089146316051,
-0.058599818497896194,
-0.0036060530692338943,
-0.08017847687005997,
-0.013102606870234013,
-0.07816092669963837,
0.11665965616703033,
0.06128127872943878,
0.06734886020421982,
-0.02353632263839245,
-0.24378693103790283,
-0.004643246065825224,
0.14060261845588684,
0.05412812903523445,
-0.01788068190217018,
-0.01556652132421732,
0.007641578558832407,
0.02406993880867958,
0.12042061239480972,
0.030873993411660194,
-0.048869069665670395,
0.13371460139751434,
-0.0054512326605618,
0.13953858613967896,
-0.12617330253124237,
0.1923600137233734,
0.17290255427360535,
0.14160548150539398,
-0.033149316906929016,
-0.1322820782661438,
0.1063774973154068,
-0.11845257878303528,
0.003606280777603388,
-0.15366725623607635,
-0.13164645433425903,
-0.015719901770353317,
0.02909020148217678,
-0.14958235621452332,
0.04538090527057648,
0.014597938396036625,
-0.01285487599670887,
1.7161382966934062e-34,
-0.02856036275625229,
-0.10289516299962997,
0.09561183303594589,
-0.30975720286369324,
-0.04144363850355148,
-0.08297520130872726,
0.1726549118757248,
0.07500230520963669,
0.00521748885512352,
-0.009928044863045216,
-0.09915556013584137
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | @mariosasko
I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
thank you for your reply. | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 72 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
@mariosasko
I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
thank you for your reply. | [
0.12158413231372833,
0.09572990238666534,
-0.03419060260057449,
0.06406231969594955,
0.2810746431350708,
-0.10272638499736786,
0.003484567394480109,
-0.04275978356599808,
-0.07062482088804245,
0.08074185997247696,
0.03808010742068291,
-0.2081207036972046,
0.0005349003477022052,
-0.094467394053936,
0.001770412316545844,
0.0684051662683487,
0.1133982464671135,
-0.08294535428285599,
-0.046467628329992294,
-0.04825664311647415,
-0.2323916107416153,
-0.09009072184562683,
0.008742576465010643,
-0.1250523328781128,
0.005453628022223711,
0.014624267816543579,
-0.0776016041636467,
0.07851841300725937,
0.060967765748500824,
-0.12270817160606384,
-0.003217759309336543,
-0.174092635512352,
-0.09133927524089813,
0.279139906167984,
0.0000056557078096375335,
0.00654627475887537,
0.28819623589515686,
0.011619620956480503,
-0.1825563609600067,
-0.12260131537914276,
0.1427690088748932,
-0.19905436038970947,
0.0052156089805066586,
-0.0239460077136755,
0.03481875732541084,
-0.20239850878715515,
-0.10003887116909027,
-0.07926727086305618,
-0.0014077164232730865,
-0.025836829096078873,
-0.06344769895076752,
0.0017326822271570563,
0.02348199486732483,
-0.17361435294151306,
0.10555671155452728,
0.09005793184041977,
0.09188622981309891,
0.12631860375404358,
-0.07143794745206833,
-0.012094809673726559,
-0.015163913369178772,
-0.17567755281925201,
0.02166953682899475,
0.048615507781505585,
-0.22211366891860962,
-0.026882875710725784,
-0.15181538462638855,
-0.09632550925016403,
0.02885245718061924,
0.17750416696071625,
0.010668408125638962,
0.14060597121715546,
-0.13581296801567078,
0.06338895112276077,
0.00470764422789216,
-0.1104852706193924,
0.08926505595445633,
0.13861431181430817,
-0.09156559407711029,
-0.017125830054283142,
-0.07720676064491272,
0.1294962763786316,
-0.059790194034576416,
-0.0036078649573028088,
-0.32493653893470764,
0.07357529550790787,
-0.18695609271526337,
0.07173523306846619,
-0.07922398298978806,
-0.05192664638161659,
-0.0003084772324655205,
0.02734772302210331,
-0.17254981398582458,
-0.18862809240818024,
0.10717792809009552,
0.06425624340772629,
0.05863996222615242,
-0.12257950752973557,
0.10539520531892776,
-0.006551743019372225,
-0.06564753502607346,
-0.07684294134378433,
-0.1308581382036209,
-0.01139922346919775,
0.1716059446334839,
-0.0823647528886795,
-0.08170539140701294,
-0.17979122698307037,
0.14667797088623047,
-0.059656474739313126,
-0.04980859532952309,
0.14747489988803864,
-0.036589495837688446,
-0.07340335100889206,
0.07946525514125824,
-0.1667303591966629,
0.09281360357999802,
0.051316529512405396,
0.19112296402454376,
0.1388908326625824,
-0.0871707946062088,
0.02149858884513378,
-0.08697440475225449,
0.11364531517028809,
-0.07846031337976456,
0.09496389329433441,
-0.05899788439273834,
0.0704311728477478,
-0.11562323570251465,
0.023443553596735,
0.07767247408628464,
-0.11298063397407532,
0.020214134827256203,
-0.0774538666009903,
0.1296742856502533,
0.032257504761219025,
0.07843156158924103,
0.01059994287788868,
0.041234955191612244,
-0.06339459866285324,
-0.005846043117344379,
-0.04973471164703369,
0.13577651977539062,
0.16523323953151703,
0.02472248673439026,
0.017428947612643242,
0.0178496353328228,
0.013798490166664124,
0.05144817754626274,
0.12208320200443268,
-0.30711790919303894,
0.165639266371727,
-0.11931180953979492,
0.01722854934632778,
-0.1681334525346756,
-0.08866552263498306,
-0.03102678805589676,
-0.19832520186901093,
-0.18377812206745148,
-0.06827062368392944,
0.01938830316066742,
0.04587561637163162,
0.014698673970997334,
-0.11307033151388168,
0.08902542293071747,
0.11436356604099274,
-0.10049158334732056,
0.03128466010093689,
-0.08194092661142349,
-0.005386737175285816,
0.18050679564476013,
0.10431098937988281,
0.008971036411821842,
0.030098412185907364,
-0.0687941387295723,
0.1487903743982315,
-0.06245194748044014,
0.05500354990363121,
-0.3064592778682709,
0.17548790574073792,
-0.006215014029294252,
-0.03156080096960068,
-0.10130394250154495,
-0.14954745769500732,
0.036509230732917786,
-0.0083658117800951,
0.10113640874624252,
0.04847359284758568,
0.09251616150140762,
-0.07486695796251297,
-0.1506965607404709,
0.05816708132624626,
0.018267594277858734,
-0.07948209345340729,
-0.1009826734662056,
-0.15250754356384277,
0.018282422795891762,
-0.04407503828406334,
0.08930039405822754,
-0.06794364750385284,
-0.007068033795803785,
0.0946357324719429,
0.0026960766408592463,
0.10315645486116409,
0.035829126834869385,
0.03099866956472397,
-0.21971149742603302,
0.05292057991027832,
-0.022820426151156425,
-0.13783587515354156,
-0.07503033429384232,
0.13481250405311584,
-0.07866193354129791,
0.14031818509101868,
-0.1716921031475067,
0.004771057981997728,
-0.031490448862314224,
0.06956189125776291,
-0.15879325568675995,
0.2124277502298355,
-0.01913018338382244,
-0.030768686905503273,
-0.006587986834347248,
0.01964437961578369,
-0.03293127194046974,
0.07016734033823013,
-0.061691395938396454,
0.036678578704595566,
-0.12871748208999634,
0.09693623334169388,
0.047240886837244034,
-0.11839131265878677,
0.03107881359755993,
0.06038833037018776,
0.03939923271536827,
-0.01067670900374651,
-0.11993595957756042,
-0.07304350286722183,
0.06097003445029259,
0.06273379176855087,
-0.019701676443219185,
0.24736423790454865,
0.1273806244134903,
-0.13860495388507843,
0.04307808354496956,
-0.02444819174706936,
-0.04194358363747597,
0.2135089784860611,
-0.10369136929512024,
-0.050119709223508835,
0.2791089117527008,
0.2354845404624939,
-0.15202057361602783,
0.06568270921707153,
0.002808573190122843,
-0.04893343150615692,
0.048780567944049835,
0.1786309778690338,
0.018639402464032173,
-0.23785285651683807,
0.30971723794937134,
-0.010260336101055145,
-0.051231659948825836,
0.03609029948711395,
-0.053718727082014084,
-0.044199325144290924,
-0.08171569555997849,
0.0033521235454827547,
0.08351067453622818,
0.07084597647190094,
0.08501441031694412,
-0.16835936903953552,
-0.11392923444509506,
-0.12559093534946442,
-0.07522858679294586,
-0.06534983217716217,
-0.07202549278736115,
-0.013454650528728962,
0.06825003027915955,
0.10873039811849594,
0.08216942101716995,
0.008085780777037144,
-0.011563049629330635,
-0.05412881076335907,
0.07686693966388702,
0.13184013962745667,
-0.049107279628515244,
0.014097715727984905,
-0.0796293243765831,
0.16336025297641754,
-0.01482137106359005,
0.024771535769104958,
-0.07243433594703674,
-0.12491863965988159,
-0.09175573289394379,
-0.07935205101966858,
0.16023039817810059,
-0.005691978614777327,
0.07494976371526718,
-0.1043686494231224,
0.029016193002462387,
0.07581695914268494,
0.05961449816823006,
0.006970731541514397,
0.09205277264118195,
-0.07137586921453476,
0.05003870651125908,
0.11778682470321655,
-0.20761841535568237,
0.004723286256194115,
-0.11971995234489441,
-0.0027051828801631927,
0.12942302227020264,
0.12688058614730835,
-0.00005215172132011503,
0.21924792230129242,
0.02765805460512638,
-0.07568743824958801,
0.11014003306627274,
0.0607760027050972,
0.01811133325099945,
0.24013376235961914,
-0.13066352903842926,
-0.07353067398071289,
0.0937320739030838,
0.09268546849489212,
-0.07282710075378418,
-0.12116682529449463,
0.08702505379915237,
0.12164004892110825,
-0.045395784080028534,
0.061357058584690094,
-0.06423697620630264,
-0.10449130833148956,
0.03018053062260151,
-0.11214841902256012,
-0.19949816167354584,
0.016333462670445442,
0.3043420910835266,
0.022136608138680458,
-0.13862735033035278,
-0.03500257432460785,
-0.0904010757803917,
-0.09856949001550674,
0.03699396923184395,
-0.15951742231845856,
0.04712950438261032,
-0.138475701212883,
-0.04566120356321335,
-0.10175783932209015,
0.025762762874364853,
0.11534099280834198,
-0.033773023635149,
-0.03929746150970459,
-0.14079026877880096,
-0.050404250621795654,
-0.037503432482481,
0.13111059367656708,
-0.035078857094049454,
0.06966357678174973,
0.0490732379257679,
-0.15722651779651642,
-0.15683335065841675,
0.16692060232162476,
-0.04400418698787689,
0.06951291114091873,
0.14139367640018463,
0.0387364998459816,
-0.23772874474525452,
-0.10612993687391281,
0.04616571590304375,
-0.10883671045303345,
0.01601550728082657,
-0.012440524064004421,
0.020032675936818123,
-0.08560352772474289,
0.09020182490348816,
-0.17722484469413757,
-0.027035336941480637,
0.05086805298924446,
0.06417835503816605,
-0.08260998129844666,
-0.1157623752951622,
0.1446411907672882,
0.12072452902793884,
-0.0033045972231775522,
-0.01877894438803196,
0.0019199841190129519,
-0.18480618298053741,
0.17211350798606873,
0.052823808044195175,
0.10878279060125351,
-0.013749035075306892,
0.1289360672235489,
0.020554939284920692,
-0.10820028930902481,
0.27921348810195923,
0.13317090272903442,
-0.060734640806913376,
0.07286526262760162,
0.03372402861714363,
0.11510226130485535,
-0.009026114828884602,
0.24315252900123596,
0.1457328349351883,
0.14883144199848175,
-0.005775928031653166,
-0.05823550000786781,
0.044418785721063614,
-0.005130663979798555,
0.16775459051132202,
0.14183127880096436,
0.06404715776443481,
0.10054481029510498,
0.16319675743579865,
0.12629961967468262,
-0.02662166766822338,
-0.011240930296480656,
-0.012796330265700817,
-0.12999752163887024,
-0.15326835215091705,
-0.20164471864700317,
0.04753434658050537,
0.21564331650733948,
0.0333450511097908,
0.03694996237754822,
-0.04231857880949974,
-0.05804623290896416,
0.12030491232872009,
0.009798974730074406,
0.014725779183208942,
-0.10357300192117691,
0.09494674950838089,
-0.13049355149269104,
0.13471341133117676,
-0.06219301372766495,
0.39373230934143066,
0.11283744871616364,
0.06745295971632004,
0.13891473412513733,
-0.29387277364730835,
-0.11651483923196793,
-0.15408889949321747,
-0.014476603828370571,
0.029203206300735474,
-0.09410044550895691,
-0.02763717994093895,
-0.027948839589953423,
-0.006379846017807722,
-0.041669465601444244,
-0.0687997043132782,
-0.04747571051120758,
0.05643123760819435,
-0.042791467159986496,
0.058711446821689606,
0.004193118307739496,
0.15275849401950836,
-0.17106910049915314,
0.1244279146194458,
0.1970585286617279,
-0.23820564150810242,
-0.05340863764286041,
0.06301898509263992,
0.06226625293493271,
0.003830147674307227,
0.060629941523075104,
0.13952167332172394,
-0.24048766493797302,
0.037540458142757416,
0.1116710752248764,
-0.040139246731996536,
0.17478221654891968,
-0.10167642682790756,
-0.055771514773368835,
0.10169602185487747,
0.07232300937175751,
-0.09160462021827698,
-0.025379743427038193,
0.019351698458194733,
-0.0018346583237871528,
0.249860480427742,
-0.02506205253303051,
0.013525581918656826,
-0.13367852568626404,
0.009125147946178913,
0.24565687775611877,
-0.02229519933462143,
0.00002414948721707333,
-0.14604896306991577,
-0.06813337653875351,
0.16016897559165955,
0.012922378256917,
0.02419920824468136,
0.10643413662910461,
0.18548338115215302,
0.022575264796614647,
-0.1129515990614891,
0.16550108790397644,
-0.03556651622056961,
-0.02281257137656212,
0.039942968636751175,
-0.022998016327619553,
0.0074804737232625484,
-0.09927181899547577,
-0.006072188727557659,
0.012014114297926426,
0.10456910729408264,
0.032882142812013626,
0.002397905569523573,
-0.12472504377365112,
-0.12142075598239899,
-0.015314849093556404,
-0.09182453900575638,
-0.004519348498433828,
0.09170981496572495,
0.008760505355894566,
-0.07489176094532013,
-0.045934997498989105,
0.1054694876074791,
-0.016923557966947556,
0.13575883209705353,
-0.05953069403767586,
0.07015866786241531,
-0.11977587640285492,
0.012060762383043766,
0.019938766956329346,
-0.04635899141430855,
-0.10808141529560089,
0.2172384113073349,
0.10408420860767365,
0.12384940683841705,
0.1192488968372345,
0.18260042369365692,
-0.0015802162233740091,
-0.055057819932699203,
0.2546357214450836,
0.15213565528392792,
-0.11736180633306503,
-0.026098797097802162,
0.13735364377498627,
-0.13039276003837585,
-0.29498231410980225,
-0.08193746954202652,
0.020752552896738052,
0.07291700690984726,
0.10882820188999176,
-0.07406795769929886,
-0.016987768933176994,
-0.06162135675549507,
-0.038418762385845184,
-0.0712447538971901,
0.1251518279314041,
-0.008574914187192917,
-0.026339314877986908,
-0.1191616803407669,
-2.1473487051704113e-32,
0.04982329532504082,
0.07914614677429199,
-0.011644711717963219,
-0.08039122074842453,
-0.12647052109241486,
0.1211644783616066,
-0.09051346778869629,
-0.08604069799184799,
-0.04536145552992821,
0.04999775439500809,
-0.16605988144874573,
-0.1386081576347351,
0.026966840028762817,
0.061399415135383606,
-0.11998756974935532,
-0.17222625017166138,
-0.014172290451824665,
0.00036215802538208663,
0.023890525102615356,
-0.02428133226931095,
0.01865476369857788,
0.08805268257856369,
-0.09876786172389984,
0.09828811138868332,
0.0760340541601181,
0.008532760664820671,
0.08138705790042877,
-0.02876124531030655,
0.2413518726825714,
-0.035175323486328125,
-0.04792381823062897,
0.07730972021818161,
-0.00021238486806396395,
-0.12858127057552338,
-0.09573313593864441,
-0.1455516815185547,
-0.0795782208442688,
0.05814103037118912,
-0.023276902735233307,
0.07864131033420563,
-0.046001289039850235,
0.08891576528549194,
0.13565954566001892,
-0.07845340669155121,
-0.0200396329164505,
-0.014195255935192108,
-0.020481782034039497,
-0.007794895675033331,
-0.2484828233718872,
-0.029001319780945778,
0.0980776771903038,
0.011268394999206066,
0.013417843729257584,
0.010847508907318115,
-0.011614486575126648,
-0.17293940484523773,
0.08819828182458878,
0.06582929193973541,
-0.03651928901672363,
-0.07292526215314865,
0.11267454922199249,
-0.07252885401248932,
0.026725316420197487,
-0.13275949656963348,
0.014766765758395195,
0.15566261112689972,
0.38945457339286804,
0.1464073657989502,
0.027719374746084213,
-0.016680102795362473,
-0.059104155749082565,
0.0532367005944252,
-0.24861778318881989,
0.07261930406093597,
0.04214993491768837,
-0.04140792414546013,
-0.02180650271475315,
-0.058768440037965775,
-0.17854437232017517,
-0.01563558168709278,
0.0827566385269165,
-0.023072881624102592,
-0.06449544429779053,
0.07213220000267029,
-0.21483732759952545,
-0.0490674190223217,
-0.022990964353084564,
0.08635573089122772,
-0.01878511719405651,
-0.0963483676314354,
0.0634339228272438,
0.030888769775629044,
-0.10097822546958923,
-0.11703509837388992,
-0.08082481473684311,
0.12462873011827469,
-0.16951823234558105,
0.011613757349550724,
-0.19626125693321228,
0.021655816584825516,
0.0499843955039978,
-0.12889614701271057,
-0.009151503443717957,
-0.08300011605024338,
0.1524709016084671,
0.20796740055084229,
0.1262521594762802,
0.011144239455461502,
-0.07928450405597687,
-0.09958943724632263,
-0.11485730856657028,
0.08161435276269913,
-0.02096581645309925,
0.0256651621311903,
0.27017340064048767,
0.037493351846933365,
-0.03162654489278793,
-0.04173661395907402,
0.16337209939956665,
0.12964971363544464,
-0.04061521589756012,
-0.11198838800191879,
-0.05731520056724548,
0.07419760525226593,
0.007295896764844656,
-0.0721069872379303,
-0.11993364989757538,
-0.05457669869065285,
0.0295993834733963,
-0.06024949997663498,
0.0784517452120781,
-0.10527951270341873,
7.851680834392027e-7,
-0.17918431758880615,
0.14025573432445526,
-0.03369400277733803,
0.08976789563894272,
-0.003276744857430458,
0.0790921226143837,
-0.2213544398546219,
0.10728617012500763,
-0.16839268803596497,
0.12358156591653824,
0.12462657690048218,
0.020294487476348877,
-0.05833829194307327,
0.027322202920913696,
0.07357233017683029,
-0.016151469200849533,
-0.03132031112909317,
0.02467557229101658,
-0.17826205492019653,
-0.10251836478710175,
0.1455007642507553,
0.13415300846099854,
-0.010000050067901611,
-0.08167701214551926,
0.08616895973682404,
-0.19284850358963013,
-0.009353089146316051,
-0.058599818497896194,
-0.0036060530692338943,
-0.08017847687005997,
-0.013102606870234013,
-0.07816092669963837,
0.11665965616703033,
0.06128127872943878,
0.06734886020421982,
-0.02353632263839245,
-0.24378693103790283,
-0.004643246065825224,
0.14060261845588684,
0.05412812903523445,
-0.01788068190217018,
-0.01556652132421732,
0.007641578558832407,
0.02406993880867958,
0.12042061239480972,
0.030873993411660194,
-0.048869069665670395,
0.13371460139751434,
-0.0054512326605618,
0.13953858613967896,
-0.12617330253124237,
0.1923600137233734,
0.17290255427360535,
0.14160548150539398,
-0.033149316906929016,
-0.1322820782661438,
0.1063774973154068,
-0.11845257878303528,
0.003606280777603388,
-0.15366725623607635,
-0.13164645433425903,
-0.015719901770353317,
0.02909020148217678,
-0.14958235621452332,
0.04538090527057648,
0.014597938396036625,
-0.01285487599670887,
1.7161382966934062e-34,
-0.02856036275625229,
-0.10289516299962997,
0.09561183303594589,
-0.30975720286369324,
-0.04144363850355148,
-0.08297520130872726,
0.1726549118757248,
0.07500230520963669,
0.00521748885512352,
-0.009928044863045216,
-0.09915556013584137
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | Our JSON loader does the following in your case:
```python
import json
import pyarrow as pa
with open(file, encoding="utf-8") as f:
dataset = json.load(f)
keys = set().union(*[row.keys() for row in dataset])
mapping = {col: [row.get(col) for row in dataset] for col in keys}
pa_table = pa.Table.from_pydict(mapping) # the ArrowInvalid error comes from here
```
So if this code throws an error with correctly-formatted JSON, then this is an Arrow bug and should be reported in their repo.
> I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
You should shuffle the data to make sure that's not the case | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 156 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, 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
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
Our JSON loader does the following in your case:
```python
import json
import pyarrow as pa
with open(file, encoding="utf-8") as f:
dataset = json.load(f)
keys = set().union(*[row.keys() for row in dataset])
mapping = {col: [row.get(col) for row in dataset] for col in keys}
pa_table = pa.Table.from_pydict(mapping) # the ArrowInvalid error comes from here
```
So if this code throws an error with correctly-formatted JSON, then this is an Arrow bug and should be reported in their repo.
> I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
You should shuffle the data to make sure that's not the case | [
0.12158413231372833,
0.09572990238666534,
-0.03419060260057449,
0.06406231969594955,
0.2810746431350708,
-0.10272638499736786,
0.003484567394480109,
-0.04275978356599808,
-0.07062482088804245,
0.08074185997247696,
0.03808010742068291,
-0.2081207036972046,
0.0005349003477022052,
-0.094467394053936,
0.001770412316545844,
0.0684051662683487,
0.1133982464671135,
-0.08294535428285599,
-0.046467628329992294,
-0.04825664311647415,
-0.2323916107416153,
-0.09009072184562683,
0.008742576465010643,
-0.1250523328781128,
0.005453628022223711,
0.014624267816543579,
-0.0776016041636467,
0.07851841300725937,
0.060967765748500824,
-0.12270817160606384,
-0.003217759309336543,
-0.174092635512352,
-0.09133927524089813,
0.279139906167984,
0.0000056557078096375335,
0.00654627475887537,
0.28819623589515686,
0.011619620956480503,
-0.1825563609600067,
-0.12260131537914276,
0.1427690088748932,
-0.19905436038970947,
0.0052156089805066586,
-0.0239460077136755,
0.03481875732541084,
-0.20239850878715515,
-0.10003887116909027,
-0.07926727086305618,
-0.0014077164232730865,
-0.025836829096078873,
-0.06344769895076752,
0.0017326822271570563,
0.02348199486732483,
-0.17361435294151306,
0.10555671155452728,
0.09005793184041977,
0.09188622981309891,
0.12631860375404358,
-0.07143794745206833,
-0.012094809673726559,
-0.015163913369178772,
-0.17567755281925201,
0.02166953682899475,
0.048615507781505585,
-0.22211366891860962,
-0.026882875710725784,
-0.15181538462638855,
-0.09632550925016403,
0.02885245718061924,
0.17750416696071625,
0.010668408125638962,
0.14060597121715546,
-0.13581296801567078,
0.06338895112276077,
0.00470764422789216,
-0.1104852706193924,
0.08926505595445633,
0.13861431181430817,
-0.09156559407711029,
-0.017125830054283142,
-0.07720676064491272,
0.1294962763786316,
-0.059790194034576416,
-0.0036078649573028088,
-0.32493653893470764,
0.07357529550790787,
-0.18695609271526337,
0.07173523306846619,
-0.07922398298978806,
-0.05192664638161659,
-0.0003084772324655205,
0.02734772302210331,
-0.17254981398582458,
-0.18862809240818024,
0.10717792809009552,
0.06425624340772629,
0.05863996222615242,
-0.12257950752973557,
0.10539520531892776,
-0.006551743019372225,
-0.06564753502607346,
-0.07684294134378433,
-0.1308581382036209,
-0.01139922346919775,
0.1716059446334839,
-0.0823647528886795,
-0.08170539140701294,
-0.17979122698307037,
0.14667797088623047,
-0.059656474739313126,
-0.04980859532952309,
0.14747489988803864,
-0.036589495837688446,
-0.07340335100889206,
0.07946525514125824,
-0.1667303591966629,
0.09281360357999802,
0.051316529512405396,
0.19112296402454376,
0.1388908326625824,
-0.0871707946062088,
0.02149858884513378,
-0.08697440475225449,
0.11364531517028809,
-0.07846031337976456,
0.09496389329433441,
-0.05899788439273834,
0.0704311728477478,
-0.11562323570251465,
0.023443553596735,
0.07767247408628464,
-0.11298063397407532,
0.020214134827256203,
-0.0774538666009903,
0.1296742856502533,
0.032257504761219025,
0.07843156158924103,
0.01059994287788868,
0.041234955191612244,
-0.06339459866285324,
-0.005846043117344379,
-0.04973471164703369,
0.13577651977539062,
0.16523323953151703,
0.02472248673439026,
0.017428947612643242,
0.0178496353328228,
0.013798490166664124,
0.05144817754626274,
0.12208320200443268,
-0.30711790919303894,
0.165639266371727,
-0.11931180953979492,
0.01722854934632778,
-0.1681334525346756,
-0.08866552263498306,
-0.03102678805589676,
-0.19832520186901093,
-0.18377812206745148,
-0.06827062368392944,
0.01938830316066742,
0.04587561637163162,
0.014698673970997334,
-0.11307033151388168,
0.08902542293071747,
0.11436356604099274,
-0.10049158334732056,
0.03128466010093689,
-0.08194092661142349,
-0.005386737175285816,
0.18050679564476013,
0.10431098937988281,
0.008971036411821842,
0.030098412185907364,
-0.0687941387295723,
0.1487903743982315,
-0.06245194748044014,
0.05500354990363121,
-0.3064592778682709,
0.17548790574073792,
-0.006215014029294252,
-0.03156080096960068,
-0.10130394250154495,
-0.14954745769500732,
0.036509230732917786,
-0.0083658117800951,
0.10113640874624252,
0.04847359284758568,
0.09251616150140762,
-0.07486695796251297,
-0.1506965607404709,
0.05816708132624626,
0.018267594277858734,
-0.07948209345340729,
-0.1009826734662056,
-0.15250754356384277,
0.018282422795891762,
-0.04407503828406334,
0.08930039405822754,
-0.06794364750385284,
-0.007068033795803785,
0.0946357324719429,
0.0026960766408592463,
0.10315645486116409,
0.035829126834869385,
0.03099866956472397,
-0.21971149742603302,
0.05292057991027832,
-0.022820426151156425,
-0.13783587515354156,
-0.07503033429384232,
0.13481250405311584,
-0.07866193354129791,
0.14031818509101868,
-0.1716921031475067,
0.004771057981997728,
-0.031490448862314224,
0.06956189125776291,
-0.15879325568675995,
0.2124277502298355,
-0.01913018338382244,
-0.030768686905503273,
-0.006587986834347248,
0.01964437961578369,
-0.03293127194046974,
0.07016734033823013,
-0.061691395938396454,
0.036678578704595566,
-0.12871748208999634,
0.09693623334169388,
0.047240886837244034,
-0.11839131265878677,
0.03107881359755993,
0.06038833037018776,
0.03939923271536827,
-0.01067670900374651,
-0.11993595957756042,
-0.07304350286722183,
0.06097003445029259,
0.06273379176855087,
-0.019701676443219185,
0.24736423790454865,
0.1273806244134903,
-0.13860495388507843,
0.04307808354496956,
-0.02444819174706936,
-0.04194358363747597,
0.2135089784860611,
-0.10369136929512024,
-0.050119709223508835,
0.2791089117527008,
0.2354845404624939,
-0.15202057361602783,
0.06568270921707153,
0.002808573190122843,
-0.04893343150615692,
0.048780567944049835,
0.1786309778690338,
0.018639402464032173,
-0.23785285651683807,
0.30971723794937134,
-0.010260336101055145,
-0.051231659948825836,
0.03609029948711395,
-0.053718727082014084,
-0.044199325144290924,
-0.08171569555997849,
0.0033521235454827547,
0.08351067453622818,
0.07084597647190094,
0.08501441031694412,
-0.16835936903953552,
-0.11392923444509506,
-0.12559093534946442,
-0.07522858679294586,
-0.06534983217716217,
-0.07202549278736115,
-0.013454650528728962,
0.06825003027915955,
0.10873039811849594,
0.08216942101716995,
0.008085780777037144,
-0.011563049629330635,
-0.05412881076335907,
0.07686693966388702,
0.13184013962745667,
-0.049107279628515244,
0.014097715727984905,
-0.0796293243765831,
0.16336025297641754,
-0.01482137106359005,
0.024771535769104958,
-0.07243433594703674,
-0.12491863965988159,
-0.09175573289394379,
-0.07935205101966858,
0.16023039817810059,
-0.005691978614777327,
0.07494976371526718,
-0.1043686494231224,
0.029016193002462387,
0.07581695914268494,
0.05961449816823006,
0.006970731541514397,
0.09205277264118195,
-0.07137586921453476,
0.05003870651125908,
0.11778682470321655,
-0.20761841535568237,
0.004723286256194115,
-0.11971995234489441,
-0.0027051828801631927,
0.12942302227020264,
0.12688058614730835,
-0.00005215172132011503,
0.21924792230129242,
0.02765805460512638,
-0.07568743824958801,
0.11014003306627274,
0.0607760027050972,
0.01811133325099945,
0.24013376235961914,
-0.13066352903842926,
-0.07353067398071289,
0.0937320739030838,
0.09268546849489212,
-0.07282710075378418,
-0.12116682529449463,
0.08702505379915237,
0.12164004892110825,
-0.045395784080028534,
0.061357058584690094,
-0.06423697620630264,
-0.10449130833148956,
0.03018053062260151,
-0.11214841902256012,
-0.19949816167354584,
0.016333462670445442,
0.3043420910835266,
0.022136608138680458,
-0.13862735033035278,
-0.03500257432460785,
-0.0904010757803917,
-0.09856949001550674,
0.03699396923184395,
-0.15951742231845856,
0.04712950438261032,
-0.138475701212883,
-0.04566120356321335,
-0.10175783932209015,
0.025762762874364853,
0.11534099280834198,
-0.033773023635149,
-0.03929746150970459,
-0.14079026877880096,
-0.050404250621795654,
-0.037503432482481,
0.13111059367656708,
-0.035078857094049454,
0.06966357678174973,
0.0490732379257679,
-0.15722651779651642,
-0.15683335065841675,
0.16692060232162476,
-0.04400418698787689,
0.06951291114091873,
0.14139367640018463,
0.0387364998459816,
-0.23772874474525452,
-0.10612993687391281,
0.04616571590304375,
-0.10883671045303345,
0.01601550728082657,
-0.012440524064004421,
0.020032675936818123,
-0.08560352772474289,
0.09020182490348816,
-0.17722484469413757,
-0.027035336941480637,
0.05086805298924446,
0.06417835503816605,
-0.08260998129844666,
-0.1157623752951622,
0.1446411907672882,
0.12072452902793884,
-0.0033045972231775522,
-0.01877894438803196,
0.0019199841190129519,
-0.18480618298053741,
0.17211350798606873,
0.052823808044195175,
0.10878279060125351,
-0.013749035075306892,
0.1289360672235489,
0.020554939284920692,
-0.10820028930902481,
0.27921348810195923,
0.13317090272903442,
-0.060734640806913376,
0.07286526262760162,
0.03372402861714363,
0.11510226130485535,
-0.009026114828884602,
0.24315252900123596,
0.1457328349351883,
0.14883144199848175,
-0.005775928031653166,
-0.05823550000786781,
0.044418785721063614,
-0.005130663979798555,
0.16775459051132202,
0.14183127880096436,
0.06404715776443481,
0.10054481029510498,
0.16319675743579865,
0.12629961967468262,
-0.02662166766822338,
-0.011240930296480656,
-0.012796330265700817,
-0.12999752163887024,
-0.15326835215091705,
-0.20164471864700317,
0.04753434658050537,
0.21564331650733948,
0.0333450511097908,
0.03694996237754822,
-0.04231857880949974,
-0.05804623290896416,
0.12030491232872009,
0.009798974730074406,
0.014725779183208942,
-0.10357300192117691,
0.09494674950838089,
-0.13049355149269104,
0.13471341133117676,
-0.06219301372766495,
0.39373230934143066,
0.11283744871616364,
0.06745295971632004,
0.13891473412513733,
-0.29387277364730835,
-0.11651483923196793,
-0.15408889949321747,
-0.014476603828370571,
0.029203206300735474,
-0.09410044550895691,
-0.02763717994093895,
-0.027948839589953423,
-0.006379846017807722,
-0.041669465601444244,
-0.0687997043132782,
-0.04747571051120758,
0.05643123760819435,
-0.042791467159986496,
0.058711446821689606,
0.004193118307739496,
0.15275849401950836,
-0.17106910049915314,
0.1244279146194458,
0.1970585286617279,
-0.23820564150810242,
-0.05340863764286041,
0.06301898509263992,
0.06226625293493271,
0.003830147674307227,
0.060629941523075104,
0.13952167332172394,
-0.24048766493797302,
0.037540458142757416,
0.1116710752248764,
-0.040139246731996536,
0.17478221654891968,
-0.10167642682790756,
-0.055771514773368835,
0.10169602185487747,
0.07232300937175751,
-0.09160462021827698,
-0.025379743427038193,
0.019351698458194733,
-0.0018346583237871528,
0.249860480427742,
-0.02506205253303051,
0.013525581918656826,
-0.13367852568626404,
0.009125147946178913,
0.24565687775611877,
-0.02229519933462143,
0.00002414948721707333,
-0.14604896306991577,
-0.06813337653875351,
0.16016897559165955,
0.012922378256917,
0.02419920824468136,
0.10643413662910461,
0.18548338115215302,
0.022575264796614647,
-0.1129515990614891,
0.16550108790397644,
-0.03556651622056961,
-0.02281257137656212,
0.039942968636751175,
-0.022998016327619553,
0.0074804737232625484,
-0.09927181899547577,
-0.006072188727557659,
0.012014114297926426,
0.10456910729408264,
0.032882142812013626,
0.002397905569523573,
-0.12472504377365112,
-0.12142075598239899,
-0.015314849093556404,
-0.09182453900575638,
-0.004519348498433828,
0.09170981496572495,
0.008760505355894566,
-0.07489176094532013,
-0.045934997498989105,
0.1054694876074791,
-0.016923557966947556,
0.13575883209705353,
-0.05953069403767586,
0.07015866786241531,
-0.11977587640285492,
0.012060762383043766,
0.019938766956329346,
-0.04635899141430855,
-0.10808141529560089,
0.2172384113073349,
0.10408420860767365,
0.12384940683841705,
0.1192488968372345,
0.18260042369365692,
-0.0015802162233740091,
-0.055057819932699203,
0.2546357214450836,
0.15213565528392792,
-0.11736180633306503,
-0.026098797097802162,
0.13735364377498627,
-0.13039276003837585,
-0.29498231410980225,
-0.08193746954202652,
0.020752552896738052,
0.07291700690984726,
0.10882820188999176,
-0.07406795769929886,
-0.016987768933176994,
-0.06162135675549507,
-0.038418762385845184,
-0.0712447538971901,
0.1251518279314041,
-0.008574914187192917,
-0.026339314877986908,
-0.1191616803407669,
-2.1473487051704113e-32,
0.04982329532504082,
0.07914614677429199,
-0.011644711717963219,
-0.08039122074842453,
-0.12647052109241486,
0.1211644783616066,
-0.09051346778869629,
-0.08604069799184799,
-0.04536145552992821,
0.04999775439500809,
-0.16605988144874573,
-0.1386081576347351,
0.026966840028762817,
0.061399415135383606,
-0.11998756974935532,
-0.17222625017166138,
-0.014172290451824665,
0.00036215802538208663,
0.023890525102615356,
-0.02428133226931095,
0.01865476369857788,
0.08805268257856369,
-0.09876786172389984,
0.09828811138868332,
0.0760340541601181,
0.008532760664820671,
0.08138705790042877,
-0.02876124531030655,
0.2413518726825714,
-0.035175323486328125,
-0.04792381823062897,
0.07730972021818161,
-0.00021238486806396395,
-0.12858127057552338,
-0.09573313593864441,
-0.1455516815185547,
-0.0795782208442688,
0.05814103037118912,
-0.023276902735233307,
0.07864131033420563,
-0.046001289039850235,
0.08891576528549194,
0.13565954566001892,
-0.07845340669155121,
-0.0200396329164505,
-0.014195255935192108,
-0.020481782034039497,
-0.007794895675033331,
-0.2484828233718872,
-0.029001319780945778,
0.0980776771903038,
0.011268394999206066,
0.013417843729257584,
0.010847508907318115,
-0.011614486575126648,
-0.17293940484523773,
0.08819828182458878,
0.06582929193973541,
-0.03651928901672363,
-0.07292526215314865,
0.11267454922199249,
-0.07252885401248932,
0.026725316420197487,
-0.13275949656963348,
0.014766765758395195,
0.15566261112689972,
0.38945457339286804,
0.1464073657989502,
0.027719374746084213,
-0.016680102795362473,
-0.059104155749082565,
0.0532367005944252,
-0.24861778318881989,
0.07261930406093597,
0.04214993491768837,
-0.04140792414546013,
-0.02180650271475315,
-0.058768440037965775,
-0.17854437232017517,
-0.01563558168709278,
0.0827566385269165,
-0.023072881624102592,
-0.06449544429779053,
0.07213220000267029,
-0.21483732759952545,
-0.0490674190223217,
-0.022990964353084564,
0.08635573089122772,
-0.01878511719405651,
-0.0963483676314354,
0.0634339228272438,
0.030888769775629044,
-0.10097822546958923,
-0.11703509837388992,
-0.08082481473684311,
0.12462873011827469,
-0.16951823234558105,
0.011613757349550724,
-0.19626125693321228,
0.021655816584825516,
0.0499843955039978,
-0.12889614701271057,
-0.009151503443717957,
-0.08300011605024338,
0.1524709016084671,
0.20796740055084229,
0.1262521594762802,
0.011144239455461502,
-0.07928450405597687,
-0.09958943724632263,
-0.11485730856657028,
0.08161435276269913,
-0.02096581645309925,
0.0256651621311903,
0.27017340064048767,
0.037493351846933365,
-0.03162654489278793,
-0.04173661395907402,
0.16337209939956665,
0.12964971363544464,
-0.04061521589756012,
-0.11198838800191879,
-0.05731520056724548,
0.07419760525226593,
0.007295896764844656,
-0.0721069872379303,
-0.11993364989757538,
-0.05457669869065285,
0.0295993834733963,
-0.06024949997663498,
0.0784517452120781,
-0.10527951270341873,
7.851680834392027e-7,
-0.17918431758880615,
0.14025573432445526,
-0.03369400277733803,
0.08976789563894272,
-0.003276744857430458,
0.0790921226143837,
-0.2213544398546219,
0.10728617012500763,
-0.16839268803596497,
0.12358156591653824,
0.12462657690048218,
0.020294487476348877,
-0.05833829194307327,
0.027322202920913696,
0.07357233017683029,
-0.016151469200849533,
-0.03132031112909317,
0.02467557229101658,
-0.17826205492019653,
-0.10251836478710175,
0.1455007642507553,
0.13415300846099854,
-0.010000050067901611,
-0.08167701214551926,
0.08616895973682404,
-0.19284850358963013,
-0.009353089146316051,
-0.058599818497896194,
-0.0036060530692338943,
-0.08017847687005997,
-0.013102606870234013,
-0.07816092669963837,
0.11665965616703033,
0.06128127872943878,
0.06734886020421982,
-0.02353632263839245,
-0.24378693103790283,
-0.004643246065825224,
0.14060261845588684,
0.05412812903523445,
-0.01788068190217018,
-0.01556652132421732,
0.007641578558832407,
0.02406993880867958,
0.12042061239480972,
0.030873993411660194,
-0.048869069665670395,
0.13371460139751434,
-0.0054512326605618,
0.13953858613967896,
-0.12617330253124237,
0.1923600137233734,
0.17290255427360535,
0.14160548150539398,
-0.033149316906929016,
-0.1322820782661438,
0.1063774973154068,
-0.11845257878303528,
0.003606280777603388,
-0.15366725623607635,
-0.13164645433425903,
-0.015719901770353317,
0.02909020148217678,
-0.14958235621452332,
0.04538090527057648,
0.014597938396036625,
-0.01285487599670887,
1.7161382966934062e-34,
-0.02856036275625229,
-0.10289516299962997,
0.09561183303594589,
-0.30975720286369324,
-0.04144363850355148,
-0.08297520130872726,
0.1726549118757248,
0.07500230520963669,
0.00521748885512352,
-0.009928044863045216,
-0.09915556013584137
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | cc @sanchit-gandhi @Vaibhavs10 @lhoestq - this is mainly for demos that use Common Voice datasets as done here: https://github.com/facebookresearch/fairseq/tree/main/examples/mms#-transformers
| ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 19 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
cc @sanchit-gandhi @Vaibhavs10 @lhoestq - this is mainly for demos that use Common Voice datasets as done here: https://github.com/facebookresearch/fairseq/tree/main/examples/mms#-transformers
| [
0.12552006542682648,
0.13571147620677948,
0.008982510305941105,
-0.0242952648550272,
0.3408251106739044,
0.07202763855457306,
0.11061174422502518,
0.08560646325349808,
0.14547741413116455,
0.22996725142002106,
-0.1202273741364479,
-0.1095869392156601,
-0.02342640981078148,
0.031510453671216965,
0.003533065551891923,
0.009370622225105762,
-0.007014262489974499,
-0.18501484394073486,
0.1101430281996727,
-0.03958429768681526,
-0.09049788862466812,
0.19411924481391907,
0.09820760786533356,
0.018924396485090256,
-0.13104023039340973,
-0.1378277689218521,
0.00815221481025219,
0.1263868361711502,
-0.09732769429683685,
-0.15078243613243103,
0.36100849509239197,
0.0892733633518219,
-0.037230413407087326,
0.26642894744873047,
0.000004591481683746679,
0.05849346145987511,
0.0734884962439537,
0.11160741746425629,
-0.10524944216012955,
-0.06474406272172928,
-0.10798827558755875,
0.058836981654167175,
-0.11568497866392136,
-0.02101774513721466,
-0.03706477954983711,
-0.07458504289388657,
-0.05898430570960045,
0.008917870931327343,
0.021355509757995605,
0.16654114425182343,
-0.03228016942739487,
0.027913765981793404,
0.056028254330158234,
-0.08892893046140671,
0.027576617896556854,
0.05470168963074684,
0.050073299556970596,
0.11059737205505371,
-0.27014389634132385,
-0.013668094761669636,
-0.06059989333152771,
0.07904869318008423,
-0.009236469864845276,
0.06297452747821808,
0.04720105230808258,
0.041094519197940826,
-0.12867024540901184,
-0.13413915038108826,
-0.03525721654295921,
0.2792273759841919,
-0.05017100274562836,
0.14267946779727936,
-0.16750958561897278,
0.04348739981651306,
0.0023500900715589523,
-0.12629415094852448,
0.006708225235342979,
0.11431881040334702,
-0.13590222597122192,
0.12511564791202545,
-0.15176637470722198,
0.018995506688952446,
-0.11143282055854797,
0.032413698732852936,
0.100918710231781,
-0.06266369670629501,
-0.13683362305164337,
0.05284811183810234,
-0.015573802404105663,
-0.17049145698547363,
0.10436010360717773,
-0.10034541040658951,
-0.17237043380737305,
-0.04328986257314682,
-0.026577265933156013,
0.043797969818115234,
-0.054049301892519,
-0.034125953912734985,
-0.0197981558740139,
0.08831620961427689,
-0.1792989820241928,
-0.1871654987335205,
-0.10629228502511978,
0.14391708374023438,
0.11162937432527542,
0.08312925696372986,
0.03252481669187546,
0.0092714698985219,
0.22237499058246613,
0.21822482347488403,
0.08878172188997269,
0.009261513128876686,
-0.06291902810335159,
-0.014338803477585316,
-0.01650002785027027,
0.03578988462686539,
0.21942263841629028,
-0.00014682722394354641,
0.017480066046118736,
0.15728263556957245,
0.037049949169158936,
0.09576363861560822,
-0.0837053433060646,
0.14786335825920105,
-0.10649241507053375,
-0.035997211933135986,
-0.05566016212105751,
0.1318177729845047,
-0.07935238629579544,
-0.061871860176324844,
-0.02914286218583584,
0.04686075076460838,
-0.06549680233001709,
-0.041946861892938614,
0.1553671509027481,
0.03773359954357147,
0.02627861499786377,
-0.1492239534854889,
0.13562022149562836,
-0.04396083950996399,
0.012061010114848614,
-0.14015842974185944,
-0.14675042033195496,
0.08662799000740051,
0.30718106031417847,
0.021263200789690018,
0.11617209762334824,
-0.07900966703891754,
0.051266495138406754,
-0.15362703800201416,
-0.041423071175813675,
-0.09252413362264633,
-0.18966934084892273,
-0.04605161398649216,
-0.1546003520488739,
0.08940437436103821,
0.08659970760345459,
0.044138845056295395,
-0.19121688604354858,
-0.13196836411952972,
0.11308585852384567,
0.06973422318696976,
0.01977935992181301,
-0.13924984633922577,
0.20292778313159943,
0.03966817632317543,
0.21347981691360474,
0.022137949243187904,
-0.01654219999909401,
-0.10777734965085983,
0.18132735788822174,
0.19648991525173187,
0.03185037523508072,
0.10466278344392776,
-0.21115872263908386,
0.2756194472312927,
-0.14558430016040802,
-0.07822910696268082,
-0.37061113119125366,
0.17624922096729279,
0.07983002066612244,
-0.1242196187376976,
0.06340844929218292,
-0.13667228817939758,
0.054168906062841415,
-0.06296174973249435,
-0.038824982941150665,
0.11039991676807404,
-0.074977345764637,
-0.02069312520325184,
0.09666244685649872,
-0.04945758730173111,
-0.0033847878221422434,
-0.17357037961483002,
0.06696205586194992,
-0.11012114584445953,
-0.032801445573568344,
0.017492519691586494,
0.09310943633317947,
-0.137590229511261,
-0.01892823353409767,
-0.060021284967660904,
0.08670821040868759,
0.026364225894212723,
0.0057945242151618,
-0.10218987613916397,
0.04902912303805351,
0.1172155886888504,
-0.08681435137987137,
-0.05279304459691048,
-0.3142334222793579,
-0.05591669678688049,
-0.12193357944488525,
0.10197774320840836,
-0.14964401721954346,
-0.005821180995553732,
0.00684003671631217,
0.0995703786611557,
0.02105526439845562,
0.10639543831348419,
-0.024643905460834503,
0.28216540813446045,
-0.004019895568490028,
-0.16606059670448303,
-0.09998860210180283,
-0.0924903005361557,
-0.07786254584789276,
0.07932634651660919,
0.17587310075759888,
0.08393218368291855,
-0.10766058415174484,
-0.031342022120952606,
-0.03307273983955383,
0.11247559636831284,
-0.1356188803911209,
0.06795169413089752,
-0.015819966793060303,
-0.11616259813308716,
0.013042561709880829,
-0.05036969482898712,
-0.1318821758031845,
0.07062381505966187,
-0.08159258216619492,
0.02789023518562317,
0.08523333817720413,
-0.2040955275297165,
0.07664377987384796,
0.17298279702663422,
-0.08019738644361496,
-0.06460828334093094,
0.1994234174489975,
0.05048516392707825,
-0.10311897099018097,
0.11646220088005066,
0.08482842892408371,
-0.040088336914777756,
-0.16367073357105255,
-0.05608271434903145,
-0.2802819609642029,
-0.22632385790348053,
0.224366694688797,
-0.04955790564417839,
-0.0057030729949474335,
0.004594139289110899,
0.11143384128808975,
-0.1255209743976593,
0.08107796311378479,
0.14088347554206848,
-0.08344881981611252,
-0.046418339014053345,
-0.12698814272880554,
0.007345253136008978,
-0.13396725058555603,
-0.14176173508167267,
0.10416015982627869,
-0.0811789259314537,
0.0033348870929330587,
-0.02605927735567093,
-0.05534471571445465,
0.011120900511741638,
-0.2252265065908432,
0.06857174634933472,
0.18317387998104095,
-0.12000816315412521,
0.02472660504281521,
0.06367725133895874,
-0.04754690080881119,
-0.03363054618239403,
-0.09235084056854248,
-0.06017182767391205,
0.00854097492992878,
0.028305644169449806,
-0.015684684738516808,
-0.04236266389489174,
-0.07993105053901672,
0.007179133128374815,
0.059729114174842834,
-0.014920798130333424,
0.10191702842712402,
0.13849446177482605,
-0.019800476729869843,
0.03021460771560669,
0.08421368151903152,
-0.09414918720722198,
0.139393612742424,
-0.13512487709522247,
0.19749966263771057,
0.06349106132984161,
0.011904796585440636,
-0.2023877501487732,
0.2288934737443924,
-0.20810365676879883,
0.04778099060058594,
0.2337280660867691,
0.09255814552307129,
0.005547537002712488,
0.013891580514609814,
-0.059987470507621765,
0.16984030604362488,
0.17528186738491058,
0.0399998277425766,
0.1462218463420868,
-0.07028111070394516,
0.09553901851177216,
-0.030587878078222275,
0.07522942870855331,
-0.21466968953609467,
-0.1711472123861313,
-0.046882789582014084,
-0.1593562811613083,
0.060221221297979355,
0.21896274387836456,
-0.14655572175979614,
-0.041896868497133255,
-0.033499859273433685,
-0.082074373960495,
-0.19822312891483307,
-0.13178345561027527,
0.3127627968788147,
-0.0963454321026802,
-0.11365892738103867,
0.013149685226380825,
-0.09514348953962326,
0.008625371381640434,
0.08746493607759476,
-0.06774000078439713,
-0.06242431327700615,
0.004707236308604479,
0.057659346610307693,
-0.12164914608001709,
0.11502896994352341,
-0.052897077053785324,
-0.06982485204935074,
-0.09709380567073822,
-0.047540124505758286,
-0.053572166711091995,
-0.027519242838025093,
0.1223338320851326,
-0.012773781083524227,
0.007168570999056101,
0.24052786827087402,
0.04694627597928047,
0.08284902572631836,
0.027988068759441376,
-0.05692165344953537,
0.08089981973171234,
0.0815410390496254,
0.032410040497779846,
-0.007271668408066034,
-0.08014822751283646,
0.07295668870210648,
-0.0696897879242897,
0.0001657743996474892,
0.046954963356256485,
0.09015141427516937,
0.04498744010925293,
-0.07267877459526062,
-0.15082329511642456,
0.1286010891199112,
-0.08488865941762924,
-0.10300473868846893,
-0.045119836926460266,
0.027174295857548714,
0.2554595470428467,
0.26921993494033813,
0.008482160978019238,
-0.041519660502672195,
0.10360164940357208,
0.04118560627102852,
0.09055715799331665,
0.23299017548561096,
-0.0749010220170021,
-0.10752751678228378,
-0.14722894132137299,
0.17197991907596588,
-0.1389315277338028,
0.10177689045667648,
0.018664918839931488,
0.04391992464661598,
-0.06967789679765701,
-0.0002326681715203449,
0.19943439960479736,
-0.07394563406705856,
0.29931122064590454,
-0.09884919971227646,
0.07949415594339371,
0.017763551324605942,
-0.08060119301080704,
0.129472017288208,
-0.13861766457557678,
-0.02395614981651306,
-0.027296165004372597,
-0.05599234253168106,
0.008793402463197708,
-0.0019176609348505735,
-0.11755608767271042,
0.07404635101556778,
-0.07166032493114471,
-0.07104317098855972,
-0.2961820662021637,
-0.2042892426252365,
-0.1242949441075325,
0.10558241605758667,
0.26667293906211853,
0.06898681819438934,
-0.04063672199845314,
0.22496052086353302,
0.03913397341966629,
0.06668795645236969,
-0.10835141688585281,
-0.06157198175787926,
0.00981686357408762,
0.12546111643314362,
0.14131273329257965,
0.1481960415840149,
-0.16216279566287994,
0.3672794997692108,
0.013422900810837746,
-0.13489659130573273,
0.12353168427944183,
-0.18061918020248413,
-0.1406608670949936,
0.12275201082229614,
-0.08872536569833755,
0.020333992317318916,
0.08068965375423431,
-0.13559260964393616,
0.017596784979104996,
0.16497591137886047,
-0.0924711599946022,
-0.10012345761060715,
-0.14618827402591705,
-0.029030730947852135,
-0.2565814256668091,
0.06096841022372246,
0.03227905184030533,
0.12586545944213867,
0.10924943536520004,
0.010810745880007744,
0.04384273663163185,
-0.023725617676973343,
-0.09467992186546326,
-0.09393861889839172,
-0.041162192821502686,
0.09871771931648254,
0.0037184571847319603,
0.18262800574302673,
-0.17233629524707794,
0.07711717486381531,
0.24790817499160767,
-0.05604143440723419,
0.05927526205778122,
-0.06969256699085236,
-0.11766883730888367,
0.08407409489154816,
0.033146217465400696,
0.1756150871515274,
-0.17388078570365906,
-0.07037654519081116,
-0.06681058555841446,
0.16204126179218292,
-0.17975851893424988,
0.06729497015476227,
-0.11297190189361572,
0.02156030386686325,
0.08083514869213104,
0.14743925631046295,
-0.0468696691095829,
-0.036362189799547195,
-0.06877753883600235,
0.16651861369609833,
-0.19173738360404968,
0.09640597552061081,
0.0422847680747509,
0.08428869396448135,
-0.0015981807373464108,
0.19082902371883392,
0.11383288353681564,
0.009396793320775032,
-0.061417728662490845,
0.06460939347743988,
-0.1284683793783188,
-0.018673742190003395,
0.013115358538925648,
-0.06329774111509323,
-0.15717080235481262,
0.19946184754371643,
-0.18058893084526062,
-0.09262305498123169,
-0.16897429525852203,
-0.06348413228988647,
0.02251625247299671,
-0.17095120251178741,
-0.11856663972139359,
0.015811337158083916,
-0.06791459023952484,
-0.018331509083509445,
-0.005945606157183647,
-0.08270090073347092,
-0.033569250255823135,
0.09580086916685104,
-0.071064293384552,
0.022287921980023384,
-0.06674429029226303,
-0.10179850459098816,
0.2624760568141937,
0.019794853404164314,
0.1315852701663971,
0.14411266148090363,
0.019153742119669914,
0.10520373284816742,
0.15080028772354126,
0.1896355003118515,
-0.11549679189920425,
-0.1454886496067047,
0.03806353732943535,
0.09412511438131332,
-0.1333160698413849,
-0.05760867893695831,
-0.033632852137088776,
0.014133051969110966,
-0.1999940574169159,
-0.0738653913140297,
0.1504516452550888,
0.24540160596370697,
0.27604055404663086,
0.002299422863870859,
-0.0825330838561058,
-0.1872902810573578,
-0.1808202862739563,
0.04000679403543472,
0.16826313734054565,
0.0312633253633976,
0.0497131422162056,
0.01135722454637289,
-2.354738528623698e-32,
-0.12243188172578812,
0.06456469744443893,
-0.131228506565094,
0.04971569404006004,
-0.298203706741333,
0.12065857648849487,
-0.05012731999158859,
-0.010192496702075005,
-0.07416106760501862,
-0.10886907577514648,
0.00847255066037178,
-0.030979661270976067,
0.05695125088095665,
0.16042183339595795,
-0.015114136040210724,
-0.0413125678896904,
-0.027959438040852547,
0.0011053106281906366,
0.08029814064502716,
0.14325782656669617,
0.08143839240074158,
0.012432875111699104,
-0.1588149070739746,
-0.024735480546951294,
0.07657402753829956,
-0.06532474607229233,
-0.07417881488800049,
-0.05369396507740021,
0.06431262940168381,
-0.03498995304107666,
-0.10167653858661652,
0.16255530714988708,
-0.07162942737340927,
-0.08103109896183014,
-0.2404252141714096,
0.003920749295502901,
-0.24156273901462555,
0.012894959188997746,
-0.12520991265773773,
0.15305715799331665,
0.11632619053125381,
0.14520899951457977,
-0.07907235622406006,
-0.17174506187438965,
-0.015923533588647842,
0.046016521751880646,
0.11759663373231888,
0.1348535418510437,
0.03331825137138367,
-0.11665545403957367,
0.00752550084143877,
-0.02885710634291172,
-0.09925173223018646,
0.17097733914852142,
0.14728553593158722,
-0.017288371920585632,
0.036553144454956055,
0.14590348303318024,
0.020605791360139847,
-0.11350171267986298,
0.04245186597108841,
-0.2691417932510376,
0.11211425065994263,
0.034677207469940186,
-0.07484123855829239,
-0.02341781184077263,
0.243451327085495,
-0.09387271851301193,
-0.12446857988834381,
-0.09405583888292313,
0.11329466104507446,
-0.024532174691557884,
-0.08091143518686295,
-0.029462648555636406,
-0.21345724165439606,
-0.04255061224102974,
-0.08302635699510574,
-0.029044996947050095,
-0.10179905593395233,
-0.010755372233688831,
0.2368467152118683,
-0.017862336710095406,
0.07354050129652023,
-0.010538709349930286,
-0.04130643606185913,
-0.014322728849947453,
0.05692560598254204,
-0.013785172253847122,
-0.1801149696111679,
-0.15631769597530365,
0.030178191140294075,
-0.10289417952299118,
-0.14366215467453003,
-0.11816306412220001,
-0.02535821869969368,
0.06782963871955872,
0.10036636888980865,
0.15196262300014496,
-0.113599993288517,
0.01815158873796463,
-0.16639651358127594,
0.015624869614839554,
0.1475459188222885,
0.11097180098295212,
0.09124579280614853,
0.03003689832985401,
0.04112750291824341,
0.13757643103599548,
-0.11243049055337906,
0.03178247809410095,
0.11871469765901566,
0.11265622824430466,
0.23195268213748932,
0.16383320093154907,
0.22642692923545837,
-0.022350160405039787,
-0.005633336026221514,
-0.025280969217419624,
0.0804050862789154,
0.10082880407571793,
-0.10394111275672913,
0.04110099375247955,
-0.21591304242610931,
0.13865846395492554,
0.11841126531362534,
-0.04041202366352081,
-0.09871745109558105,
0.03572167828679085,
0.0038409242406487465,
-0.07160427421331406,
0.0022765202447772026,
-0.24656236171722412,
6.704345878461027e-7,
-0.3043158948421478,
0.16446419060230255,
0.001508675399236381,
-0.09135803580284119,
-0.027397839352488518,
-0.0026391935534775257,
-0.23193921148777008,
0.22570252418518066,
-0.18876908719539642,
0.17847110331058502,
0.09100203216075897,
0.1203918606042862,
-0.06055305898189545,
0.09906037151813507,
0.046431392431259155,
-0.1669168472290039,
-0.23959487676620483,
0.02640439383685589,
-0.11273124814033508,
0.03921518102288246,
0.06339804083108902,
0.10484886914491653,
0.14665287733078003,
-0.02783624455332756,
0.2279438078403473,
0.03270416334271431,
-0.07137621939182281,
0.09207504242658615,
0.13094349205493927,
-0.03359344229102135,
0.026932500302791595,
0.042952124029397964,
-0.08745372295379639,
0.21354879438877106,
0.09379889816045761,
-0.08395615965127945,
-0.16969163715839386,
-0.040191859006881714,
0.06780203431844711,
-0.05361839011311531,
-0.1426326185464859,
0.18304958939552307,
-0.00765236746519804,
-0.1316429227590561,
0.0392385870218277,
0.22153455018997192,
-0.09066282212734222,
0.03392130509018898,
-0.12440741062164307,
-0.02332981675863266,
0.11956940591335297,
0.10074298083782196,
-0.11483803391456604,
-0.05486105754971504,
-0.07290375232696533,
-0.07393362373113632,
-0.013971660286188126,
-0.10749764740467072,
0.3226166367530823,
-0.04016299918293953,
-0.0098972637206316,
-0.022147027775645256,
0.05000336095690727,
0.11334020644426346,
-0.0927920714020729,
-0.001936189248226583,
-0.13819850981235504,
1.952290634793166e-35,
0.014316601678729057,
0.02828105352818966,
-0.05696239322423935,
-0.26326167583465576,
-0.062200725078582764,
-0.12911804020404816,
0.06321702152490616,
-0.0032753562554717064,
0.02576535940170288,
-0.15905675292015076,
-0.07235513627529144
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Hi ! the error for me is
```
FileNotFoundError: Couldn't find a dataset script at /content/mozilla-foundation/common_voice_13_0/common_voice_13_0.py or any data file in the same directory. Couldn't find 'mozilla-foundation/common_voice_13_0' on the Hugging Face Hub either: FileNotFoundError: Dataset 'mozilla-foundation/common_voice_13_0' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
And tbh idk how you managed to get your error. "n_shards.json" is not even a thing in `datasets` | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 75 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi ! the error for me is
```
FileNotFoundError: Couldn't find a dataset script at /content/mozilla-foundation/common_voice_13_0/common_voice_13_0.py or any data file in the same directory. Couldn't find 'mozilla-foundation/common_voice_13_0' on the Hugging Face Hub either: FileNotFoundError: Dataset 'mozilla-foundation/common_voice_13_0' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
And tbh idk how you managed to get your error. "n_shards.json" is not even a thing in `datasets` | [
0.12552006542682648,
0.13571147620677948,
0.008982510305941105,
-0.0242952648550272,
0.3408251106739044,
0.07202763855457306,
0.11061174422502518,
0.08560646325349808,
0.14547741413116455,
0.22996725142002106,
-0.1202273741364479,
-0.1095869392156601,
-0.02342640981078148,
0.031510453671216965,
0.003533065551891923,
0.009370622225105762,
-0.007014262489974499,
-0.18501484394073486,
0.1101430281996727,
-0.03958429768681526,
-0.09049788862466812,
0.19411924481391907,
0.09820760786533356,
0.018924396485090256,
-0.13104023039340973,
-0.1378277689218521,
0.00815221481025219,
0.1263868361711502,
-0.09732769429683685,
-0.15078243613243103,
0.36100849509239197,
0.0892733633518219,
-0.037230413407087326,
0.26642894744873047,
0.000004591481683746679,
0.05849346145987511,
0.0734884962439537,
0.11160741746425629,
-0.10524944216012955,
-0.06474406272172928,
-0.10798827558755875,
0.058836981654167175,
-0.11568497866392136,
-0.02101774513721466,
-0.03706477954983711,
-0.07458504289388657,
-0.05898430570960045,
0.008917870931327343,
0.021355509757995605,
0.16654114425182343,
-0.03228016942739487,
0.027913765981793404,
0.056028254330158234,
-0.08892893046140671,
0.027576617896556854,
0.05470168963074684,
0.050073299556970596,
0.11059737205505371,
-0.27014389634132385,
-0.013668094761669636,
-0.06059989333152771,
0.07904869318008423,
-0.009236469864845276,
0.06297452747821808,
0.04720105230808258,
0.041094519197940826,
-0.12867024540901184,
-0.13413915038108826,
-0.03525721654295921,
0.2792273759841919,
-0.05017100274562836,
0.14267946779727936,
-0.16750958561897278,
0.04348739981651306,
0.0023500900715589523,
-0.12629415094852448,
0.006708225235342979,
0.11431881040334702,
-0.13590222597122192,
0.12511564791202545,
-0.15176637470722198,
0.018995506688952446,
-0.11143282055854797,
0.032413698732852936,
0.100918710231781,
-0.06266369670629501,
-0.13683362305164337,
0.05284811183810234,
-0.015573802404105663,
-0.17049145698547363,
0.10436010360717773,
-0.10034541040658951,
-0.17237043380737305,
-0.04328986257314682,
-0.026577265933156013,
0.043797969818115234,
-0.054049301892519,
-0.034125953912734985,
-0.0197981558740139,
0.08831620961427689,
-0.1792989820241928,
-0.1871654987335205,
-0.10629228502511978,
0.14391708374023438,
0.11162937432527542,
0.08312925696372986,
0.03252481669187546,
0.0092714698985219,
0.22237499058246613,
0.21822482347488403,
0.08878172188997269,
0.009261513128876686,
-0.06291902810335159,
-0.014338803477585316,
-0.01650002785027027,
0.03578988462686539,
0.21942263841629028,
-0.00014682722394354641,
0.017480066046118736,
0.15728263556957245,
0.037049949169158936,
0.09576363861560822,
-0.0837053433060646,
0.14786335825920105,
-0.10649241507053375,
-0.035997211933135986,
-0.05566016212105751,
0.1318177729845047,
-0.07935238629579544,
-0.061871860176324844,
-0.02914286218583584,
0.04686075076460838,
-0.06549680233001709,
-0.041946861892938614,
0.1553671509027481,
0.03773359954357147,
0.02627861499786377,
-0.1492239534854889,
0.13562022149562836,
-0.04396083950996399,
0.012061010114848614,
-0.14015842974185944,
-0.14675042033195496,
0.08662799000740051,
0.30718106031417847,
0.021263200789690018,
0.11617209762334824,
-0.07900966703891754,
0.051266495138406754,
-0.15362703800201416,
-0.041423071175813675,
-0.09252413362264633,
-0.18966934084892273,
-0.04605161398649216,
-0.1546003520488739,
0.08940437436103821,
0.08659970760345459,
0.044138845056295395,
-0.19121688604354858,
-0.13196836411952972,
0.11308585852384567,
0.06973422318696976,
0.01977935992181301,
-0.13924984633922577,
0.20292778313159943,
0.03966817632317543,
0.21347981691360474,
0.022137949243187904,
-0.01654219999909401,
-0.10777734965085983,
0.18132735788822174,
0.19648991525173187,
0.03185037523508072,
0.10466278344392776,
-0.21115872263908386,
0.2756194472312927,
-0.14558430016040802,
-0.07822910696268082,
-0.37061113119125366,
0.17624922096729279,
0.07983002066612244,
-0.1242196187376976,
0.06340844929218292,
-0.13667228817939758,
0.054168906062841415,
-0.06296174973249435,
-0.038824982941150665,
0.11039991676807404,
-0.074977345764637,
-0.02069312520325184,
0.09666244685649872,
-0.04945758730173111,
-0.0033847878221422434,
-0.17357037961483002,
0.06696205586194992,
-0.11012114584445953,
-0.032801445573568344,
0.017492519691586494,
0.09310943633317947,
-0.137590229511261,
-0.01892823353409767,
-0.060021284967660904,
0.08670821040868759,
0.026364225894212723,
0.0057945242151618,
-0.10218987613916397,
0.04902912303805351,
0.1172155886888504,
-0.08681435137987137,
-0.05279304459691048,
-0.3142334222793579,
-0.05591669678688049,
-0.12193357944488525,
0.10197774320840836,
-0.14964401721954346,
-0.005821180995553732,
0.00684003671631217,
0.0995703786611557,
0.02105526439845562,
0.10639543831348419,
-0.024643905460834503,
0.28216540813446045,
-0.004019895568490028,
-0.16606059670448303,
-0.09998860210180283,
-0.0924903005361557,
-0.07786254584789276,
0.07932634651660919,
0.17587310075759888,
0.08393218368291855,
-0.10766058415174484,
-0.031342022120952606,
-0.03307273983955383,
0.11247559636831284,
-0.1356188803911209,
0.06795169413089752,
-0.015819966793060303,
-0.11616259813308716,
0.013042561709880829,
-0.05036969482898712,
-0.1318821758031845,
0.07062381505966187,
-0.08159258216619492,
0.02789023518562317,
0.08523333817720413,
-0.2040955275297165,
0.07664377987384796,
0.17298279702663422,
-0.08019738644361496,
-0.06460828334093094,
0.1994234174489975,
0.05048516392707825,
-0.10311897099018097,
0.11646220088005066,
0.08482842892408371,
-0.040088336914777756,
-0.16367073357105255,
-0.05608271434903145,
-0.2802819609642029,
-0.22632385790348053,
0.224366694688797,
-0.04955790564417839,
-0.0057030729949474335,
0.004594139289110899,
0.11143384128808975,
-0.1255209743976593,
0.08107796311378479,
0.14088347554206848,
-0.08344881981611252,
-0.046418339014053345,
-0.12698814272880554,
0.007345253136008978,
-0.13396725058555603,
-0.14176173508167267,
0.10416015982627869,
-0.0811789259314537,
0.0033348870929330587,
-0.02605927735567093,
-0.05534471571445465,
0.011120900511741638,
-0.2252265065908432,
0.06857174634933472,
0.18317387998104095,
-0.12000816315412521,
0.02472660504281521,
0.06367725133895874,
-0.04754690080881119,
-0.03363054618239403,
-0.09235084056854248,
-0.06017182767391205,
0.00854097492992878,
0.028305644169449806,
-0.015684684738516808,
-0.04236266389489174,
-0.07993105053901672,
0.007179133128374815,
0.059729114174842834,
-0.014920798130333424,
0.10191702842712402,
0.13849446177482605,
-0.019800476729869843,
0.03021460771560669,
0.08421368151903152,
-0.09414918720722198,
0.139393612742424,
-0.13512487709522247,
0.19749966263771057,
0.06349106132984161,
0.011904796585440636,
-0.2023877501487732,
0.2288934737443924,
-0.20810365676879883,
0.04778099060058594,
0.2337280660867691,
0.09255814552307129,
0.005547537002712488,
0.013891580514609814,
-0.059987470507621765,
0.16984030604362488,
0.17528186738491058,
0.0399998277425766,
0.1462218463420868,
-0.07028111070394516,
0.09553901851177216,
-0.030587878078222275,
0.07522942870855331,
-0.21466968953609467,
-0.1711472123861313,
-0.046882789582014084,
-0.1593562811613083,
0.060221221297979355,
0.21896274387836456,
-0.14655572175979614,
-0.041896868497133255,
-0.033499859273433685,
-0.082074373960495,
-0.19822312891483307,
-0.13178345561027527,
0.3127627968788147,
-0.0963454321026802,
-0.11365892738103867,
0.013149685226380825,
-0.09514348953962326,
0.008625371381640434,
0.08746493607759476,
-0.06774000078439713,
-0.06242431327700615,
0.004707236308604479,
0.057659346610307693,
-0.12164914608001709,
0.11502896994352341,
-0.052897077053785324,
-0.06982485204935074,
-0.09709380567073822,
-0.047540124505758286,
-0.053572166711091995,
-0.027519242838025093,
0.1223338320851326,
-0.012773781083524227,
0.007168570999056101,
0.24052786827087402,
0.04694627597928047,
0.08284902572631836,
0.027988068759441376,
-0.05692165344953537,
0.08089981973171234,
0.0815410390496254,
0.032410040497779846,
-0.007271668408066034,
-0.08014822751283646,
0.07295668870210648,
-0.0696897879242897,
0.0001657743996474892,
0.046954963356256485,
0.09015141427516937,
0.04498744010925293,
-0.07267877459526062,
-0.15082329511642456,
0.1286010891199112,
-0.08488865941762924,
-0.10300473868846893,
-0.045119836926460266,
0.027174295857548714,
0.2554595470428467,
0.26921993494033813,
0.008482160978019238,
-0.041519660502672195,
0.10360164940357208,
0.04118560627102852,
0.09055715799331665,
0.23299017548561096,
-0.0749010220170021,
-0.10752751678228378,
-0.14722894132137299,
0.17197991907596588,
-0.1389315277338028,
0.10177689045667648,
0.018664918839931488,
0.04391992464661598,
-0.06967789679765701,
-0.0002326681715203449,
0.19943439960479736,
-0.07394563406705856,
0.29931122064590454,
-0.09884919971227646,
0.07949415594339371,
0.017763551324605942,
-0.08060119301080704,
0.129472017288208,
-0.13861766457557678,
-0.02395614981651306,
-0.027296165004372597,
-0.05599234253168106,
0.008793402463197708,
-0.0019176609348505735,
-0.11755608767271042,
0.07404635101556778,
-0.07166032493114471,
-0.07104317098855972,
-0.2961820662021637,
-0.2042892426252365,
-0.1242949441075325,
0.10558241605758667,
0.26667293906211853,
0.06898681819438934,
-0.04063672199845314,
0.22496052086353302,
0.03913397341966629,
0.06668795645236969,
-0.10835141688585281,
-0.06157198175787926,
0.00981686357408762,
0.12546111643314362,
0.14131273329257965,
0.1481960415840149,
-0.16216279566287994,
0.3672794997692108,
0.013422900810837746,
-0.13489659130573273,
0.12353168427944183,
-0.18061918020248413,
-0.1406608670949936,
0.12275201082229614,
-0.08872536569833755,
0.020333992317318916,
0.08068965375423431,
-0.13559260964393616,
0.017596784979104996,
0.16497591137886047,
-0.0924711599946022,
-0.10012345761060715,
-0.14618827402591705,
-0.029030730947852135,
-0.2565814256668091,
0.06096841022372246,
0.03227905184030533,
0.12586545944213867,
0.10924943536520004,
0.010810745880007744,
0.04384273663163185,
-0.023725617676973343,
-0.09467992186546326,
-0.09393861889839172,
-0.041162192821502686,
0.09871771931648254,
0.0037184571847319603,
0.18262800574302673,
-0.17233629524707794,
0.07711717486381531,
0.24790817499160767,
-0.05604143440723419,
0.05927526205778122,
-0.06969256699085236,
-0.11766883730888367,
0.08407409489154816,
0.033146217465400696,
0.1756150871515274,
-0.17388078570365906,
-0.07037654519081116,
-0.06681058555841446,
0.16204126179218292,
-0.17975851893424988,
0.06729497015476227,
-0.11297190189361572,
0.02156030386686325,
0.08083514869213104,
0.14743925631046295,
-0.0468696691095829,
-0.036362189799547195,
-0.06877753883600235,
0.16651861369609833,
-0.19173738360404968,
0.09640597552061081,
0.0422847680747509,
0.08428869396448135,
-0.0015981807373464108,
0.19082902371883392,
0.11383288353681564,
0.009396793320775032,
-0.061417728662490845,
0.06460939347743988,
-0.1284683793783188,
-0.018673742190003395,
0.013115358538925648,
-0.06329774111509323,
-0.15717080235481262,
0.19946184754371643,
-0.18058893084526062,
-0.09262305498123169,
-0.16897429525852203,
-0.06348413228988647,
0.02251625247299671,
-0.17095120251178741,
-0.11856663972139359,
0.015811337158083916,
-0.06791459023952484,
-0.018331509083509445,
-0.005945606157183647,
-0.08270090073347092,
-0.033569250255823135,
0.09580086916685104,
-0.071064293384552,
0.022287921980023384,
-0.06674429029226303,
-0.10179850459098816,
0.2624760568141937,
0.019794853404164314,
0.1315852701663971,
0.14411266148090363,
0.019153742119669914,
0.10520373284816742,
0.15080028772354126,
0.1896355003118515,
-0.11549679189920425,
-0.1454886496067047,
0.03806353732943535,
0.09412511438131332,
-0.1333160698413849,
-0.05760867893695831,
-0.033632852137088776,
0.014133051969110966,
-0.1999940574169159,
-0.0738653913140297,
0.1504516452550888,
0.24540160596370697,
0.27604055404663086,
0.002299422863870859,
-0.0825330838561058,
-0.1872902810573578,
-0.1808202862739563,
0.04000679403543472,
0.16826313734054565,
0.0312633253633976,
0.0497131422162056,
0.01135722454637289,
-2.354738528623698e-32,
-0.12243188172578812,
0.06456469744443893,
-0.131228506565094,
0.04971569404006004,
-0.298203706741333,
0.12065857648849487,
-0.05012731999158859,
-0.010192496702075005,
-0.07416106760501862,
-0.10886907577514648,
0.00847255066037178,
-0.030979661270976067,
0.05695125088095665,
0.16042183339595795,
-0.015114136040210724,
-0.0413125678896904,
-0.027959438040852547,
0.0011053106281906366,
0.08029814064502716,
0.14325782656669617,
0.08143839240074158,
0.012432875111699104,
-0.1588149070739746,
-0.024735480546951294,
0.07657402753829956,
-0.06532474607229233,
-0.07417881488800049,
-0.05369396507740021,
0.06431262940168381,
-0.03498995304107666,
-0.10167653858661652,
0.16255530714988708,
-0.07162942737340927,
-0.08103109896183014,
-0.2404252141714096,
0.003920749295502901,
-0.24156273901462555,
0.012894959188997746,
-0.12520991265773773,
0.15305715799331665,
0.11632619053125381,
0.14520899951457977,
-0.07907235622406006,
-0.17174506187438965,
-0.015923533588647842,
0.046016521751880646,
0.11759663373231888,
0.1348535418510437,
0.03331825137138367,
-0.11665545403957367,
0.00752550084143877,
-0.02885710634291172,
-0.09925173223018646,
0.17097733914852142,
0.14728553593158722,
-0.017288371920585632,
0.036553144454956055,
0.14590348303318024,
0.020605791360139847,
-0.11350171267986298,
0.04245186597108841,
-0.2691417932510376,
0.11211425065994263,
0.034677207469940186,
-0.07484123855829239,
-0.02341781184077263,
0.243451327085495,
-0.09387271851301193,
-0.12446857988834381,
-0.09405583888292313,
0.11329466104507446,
-0.024532174691557884,
-0.08091143518686295,
-0.029462648555636406,
-0.21345724165439606,
-0.04255061224102974,
-0.08302635699510574,
-0.029044996947050095,
-0.10179905593395233,
-0.010755372233688831,
0.2368467152118683,
-0.017862336710095406,
0.07354050129652023,
-0.010538709349930286,
-0.04130643606185913,
-0.014322728849947453,
0.05692560598254204,
-0.013785172253847122,
-0.1801149696111679,
-0.15631769597530365,
0.030178191140294075,
-0.10289417952299118,
-0.14366215467453003,
-0.11816306412220001,
-0.02535821869969368,
0.06782963871955872,
0.10036636888980865,
0.15196262300014496,
-0.113599993288517,
0.01815158873796463,
-0.16639651358127594,
0.015624869614839554,
0.1475459188222885,
0.11097180098295212,
0.09124579280614853,
0.03003689832985401,
0.04112750291824341,
0.13757643103599548,
-0.11243049055337906,
0.03178247809410095,
0.11871469765901566,
0.11265622824430466,
0.23195268213748932,
0.16383320093154907,
0.22642692923545837,
-0.022350160405039787,
-0.005633336026221514,
-0.025280969217419624,
0.0804050862789154,
0.10082880407571793,
-0.10394111275672913,
0.04110099375247955,
-0.21591304242610931,
0.13865846395492554,
0.11841126531362534,
-0.04041202366352081,
-0.09871745109558105,
0.03572167828679085,
0.0038409242406487465,
-0.07160427421331406,
0.0022765202447772026,
-0.24656236171722412,
6.704345878461027e-7,
-0.3043158948421478,
0.16446419060230255,
0.001508675399236381,
-0.09135803580284119,
-0.027397839352488518,
-0.0026391935534775257,
-0.23193921148777008,
0.22570252418518066,
-0.18876908719539642,
0.17847110331058502,
0.09100203216075897,
0.1203918606042862,
-0.06055305898189545,
0.09906037151813507,
0.046431392431259155,
-0.1669168472290039,
-0.23959487676620483,
0.02640439383685589,
-0.11273124814033508,
0.03921518102288246,
0.06339804083108902,
0.10484886914491653,
0.14665287733078003,
-0.02783624455332756,
0.2279438078403473,
0.03270416334271431,
-0.07137621939182281,
0.09207504242658615,
0.13094349205493927,
-0.03359344229102135,
0.026932500302791595,
0.042952124029397964,
-0.08745372295379639,
0.21354879438877106,
0.09379889816045761,
-0.08395615965127945,
-0.16969163715839386,
-0.040191859006881714,
0.06780203431844711,
-0.05361839011311531,
-0.1426326185464859,
0.18304958939552307,
-0.00765236746519804,
-0.1316429227590561,
0.0392385870218277,
0.22153455018997192,
-0.09066282212734222,
0.03392130509018898,
-0.12440741062164307,
-0.02332981675863266,
0.11956940591335297,
0.10074298083782196,
-0.11483803391456604,
-0.05486105754971504,
-0.07290375232696533,
-0.07393362373113632,
-0.013971660286188126,
-0.10749764740467072,
0.3226166367530823,
-0.04016299918293953,
-0.0098972637206316,
-0.022147027775645256,
0.05000336095690727,
0.11334020644426346,
-0.0927920714020729,
-0.001936189248226583,
-0.13819850981235504,
1.952290634793166e-35,
0.014316601678729057,
0.02828105352818966,
-0.05696239322423935,
-0.26326167583465576,
-0.062200725078582764,
-0.12911804020404816,
0.06321702152490616,
-0.0032753562554717064,
0.02576535940170288,
-0.15905675292015076,
-0.07235513627529144
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Okay, I am able to reproduce @patrickvonplaten's original error: https://github.com/Vaibhavs10/scratchpad/blob/main/cv13_datasets_test.ipynb
Also not sure why it looks for `n_shards.json` | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 18 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Okay, I am able to reproduce @patrickvonplaten's original error: https://github.com/Vaibhavs10/scratchpad/blob/main/cv13_datasets_test.ipynb
Also not sure why it looks for `n_shards.json` | [
0.12552006542682648,
0.13571147620677948,
0.008982510305941105,
-0.0242952648550272,
0.3408251106739044,
0.07202763855457306,
0.11061174422502518,
0.08560646325349808,
0.14547741413116455,
0.22996725142002106,
-0.1202273741364479,
-0.1095869392156601,
-0.02342640981078148,
0.031510453671216965,
0.003533065551891923,
0.009370622225105762,
-0.007014262489974499,
-0.18501484394073486,
0.1101430281996727,
-0.03958429768681526,
-0.09049788862466812,
0.19411924481391907,
0.09820760786533356,
0.018924396485090256,
-0.13104023039340973,
-0.1378277689218521,
0.00815221481025219,
0.1263868361711502,
-0.09732769429683685,
-0.15078243613243103,
0.36100849509239197,
0.0892733633518219,
-0.037230413407087326,
0.26642894744873047,
0.000004591481683746679,
0.05849346145987511,
0.0734884962439537,
0.11160741746425629,
-0.10524944216012955,
-0.06474406272172928,
-0.10798827558755875,
0.058836981654167175,
-0.11568497866392136,
-0.02101774513721466,
-0.03706477954983711,
-0.07458504289388657,
-0.05898430570960045,
0.008917870931327343,
0.021355509757995605,
0.16654114425182343,
-0.03228016942739487,
0.027913765981793404,
0.056028254330158234,
-0.08892893046140671,
0.027576617896556854,
0.05470168963074684,
0.050073299556970596,
0.11059737205505371,
-0.27014389634132385,
-0.013668094761669636,
-0.06059989333152771,
0.07904869318008423,
-0.009236469864845276,
0.06297452747821808,
0.04720105230808258,
0.041094519197940826,
-0.12867024540901184,
-0.13413915038108826,
-0.03525721654295921,
0.2792273759841919,
-0.05017100274562836,
0.14267946779727936,
-0.16750958561897278,
0.04348739981651306,
0.0023500900715589523,
-0.12629415094852448,
0.006708225235342979,
0.11431881040334702,
-0.13590222597122192,
0.12511564791202545,
-0.15176637470722198,
0.018995506688952446,
-0.11143282055854797,
0.032413698732852936,
0.100918710231781,
-0.06266369670629501,
-0.13683362305164337,
0.05284811183810234,
-0.015573802404105663,
-0.17049145698547363,
0.10436010360717773,
-0.10034541040658951,
-0.17237043380737305,
-0.04328986257314682,
-0.026577265933156013,
0.043797969818115234,
-0.054049301892519,
-0.034125953912734985,
-0.0197981558740139,
0.08831620961427689,
-0.1792989820241928,
-0.1871654987335205,
-0.10629228502511978,
0.14391708374023438,
0.11162937432527542,
0.08312925696372986,
0.03252481669187546,
0.0092714698985219,
0.22237499058246613,
0.21822482347488403,
0.08878172188997269,
0.009261513128876686,
-0.06291902810335159,
-0.014338803477585316,
-0.01650002785027027,
0.03578988462686539,
0.21942263841629028,
-0.00014682722394354641,
0.017480066046118736,
0.15728263556957245,
0.037049949169158936,
0.09576363861560822,
-0.0837053433060646,
0.14786335825920105,
-0.10649241507053375,
-0.035997211933135986,
-0.05566016212105751,
0.1318177729845047,
-0.07935238629579544,
-0.061871860176324844,
-0.02914286218583584,
0.04686075076460838,
-0.06549680233001709,
-0.041946861892938614,
0.1553671509027481,
0.03773359954357147,
0.02627861499786377,
-0.1492239534854889,
0.13562022149562836,
-0.04396083950996399,
0.012061010114848614,
-0.14015842974185944,
-0.14675042033195496,
0.08662799000740051,
0.30718106031417847,
0.021263200789690018,
0.11617209762334824,
-0.07900966703891754,
0.051266495138406754,
-0.15362703800201416,
-0.041423071175813675,
-0.09252413362264633,
-0.18966934084892273,
-0.04605161398649216,
-0.1546003520488739,
0.08940437436103821,
0.08659970760345459,
0.044138845056295395,
-0.19121688604354858,
-0.13196836411952972,
0.11308585852384567,
0.06973422318696976,
0.01977935992181301,
-0.13924984633922577,
0.20292778313159943,
0.03966817632317543,
0.21347981691360474,
0.022137949243187904,
-0.01654219999909401,
-0.10777734965085983,
0.18132735788822174,
0.19648991525173187,
0.03185037523508072,
0.10466278344392776,
-0.21115872263908386,
0.2756194472312927,
-0.14558430016040802,
-0.07822910696268082,
-0.37061113119125366,
0.17624922096729279,
0.07983002066612244,
-0.1242196187376976,
0.06340844929218292,
-0.13667228817939758,
0.054168906062841415,
-0.06296174973249435,
-0.038824982941150665,
0.11039991676807404,
-0.074977345764637,
-0.02069312520325184,
0.09666244685649872,
-0.04945758730173111,
-0.0033847878221422434,
-0.17357037961483002,
0.06696205586194992,
-0.11012114584445953,
-0.032801445573568344,
0.017492519691586494,
0.09310943633317947,
-0.137590229511261,
-0.01892823353409767,
-0.060021284967660904,
0.08670821040868759,
0.026364225894212723,
0.0057945242151618,
-0.10218987613916397,
0.04902912303805351,
0.1172155886888504,
-0.08681435137987137,
-0.05279304459691048,
-0.3142334222793579,
-0.05591669678688049,
-0.12193357944488525,
0.10197774320840836,
-0.14964401721954346,
-0.005821180995553732,
0.00684003671631217,
0.0995703786611557,
0.02105526439845562,
0.10639543831348419,
-0.024643905460834503,
0.28216540813446045,
-0.004019895568490028,
-0.16606059670448303,
-0.09998860210180283,
-0.0924903005361557,
-0.07786254584789276,
0.07932634651660919,
0.17587310075759888,
0.08393218368291855,
-0.10766058415174484,
-0.031342022120952606,
-0.03307273983955383,
0.11247559636831284,
-0.1356188803911209,
0.06795169413089752,
-0.015819966793060303,
-0.11616259813308716,
0.013042561709880829,
-0.05036969482898712,
-0.1318821758031845,
0.07062381505966187,
-0.08159258216619492,
0.02789023518562317,
0.08523333817720413,
-0.2040955275297165,
0.07664377987384796,
0.17298279702663422,
-0.08019738644361496,
-0.06460828334093094,
0.1994234174489975,
0.05048516392707825,
-0.10311897099018097,
0.11646220088005066,
0.08482842892408371,
-0.040088336914777756,
-0.16367073357105255,
-0.05608271434903145,
-0.2802819609642029,
-0.22632385790348053,
0.224366694688797,
-0.04955790564417839,
-0.0057030729949474335,
0.004594139289110899,
0.11143384128808975,
-0.1255209743976593,
0.08107796311378479,
0.14088347554206848,
-0.08344881981611252,
-0.046418339014053345,
-0.12698814272880554,
0.007345253136008978,
-0.13396725058555603,
-0.14176173508167267,
0.10416015982627869,
-0.0811789259314537,
0.0033348870929330587,
-0.02605927735567093,
-0.05534471571445465,
0.011120900511741638,
-0.2252265065908432,
0.06857174634933472,
0.18317387998104095,
-0.12000816315412521,
0.02472660504281521,
0.06367725133895874,
-0.04754690080881119,
-0.03363054618239403,
-0.09235084056854248,
-0.06017182767391205,
0.00854097492992878,
0.028305644169449806,
-0.015684684738516808,
-0.04236266389489174,
-0.07993105053901672,
0.007179133128374815,
0.059729114174842834,
-0.014920798130333424,
0.10191702842712402,
0.13849446177482605,
-0.019800476729869843,
0.03021460771560669,
0.08421368151903152,
-0.09414918720722198,
0.139393612742424,
-0.13512487709522247,
0.19749966263771057,
0.06349106132984161,
0.011904796585440636,
-0.2023877501487732,
0.2288934737443924,
-0.20810365676879883,
0.04778099060058594,
0.2337280660867691,
0.09255814552307129,
0.005547537002712488,
0.013891580514609814,
-0.059987470507621765,
0.16984030604362488,
0.17528186738491058,
0.0399998277425766,
0.1462218463420868,
-0.07028111070394516,
0.09553901851177216,
-0.030587878078222275,
0.07522942870855331,
-0.21466968953609467,
-0.1711472123861313,
-0.046882789582014084,
-0.1593562811613083,
0.060221221297979355,
0.21896274387836456,
-0.14655572175979614,
-0.041896868497133255,
-0.033499859273433685,
-0.082074373960495,
-0.19822312891483307,
-0.13178345561027527,
0.3127627968788147,
-0.0963454321026802,
-0.11365892738103867,
0.013149685226380825,
-0.09514348953962326,
0.008625371381640434,
0.08746493607759476,
-0.06774000078439713,
-0.06242431327700615,
0.004707236308604479,
0.057659346610307693,
-0.12164914608001709,
0.11502896994352341,
-0.052897077053785324,
-0.06982485204935074,
-0.09709380567073822,
-0.047540124505758286,
-0.053572166711091995,
-0.027519242838025093,
0.1223338320851326,
-0.012773781083524227,
0.007168570999056101,
0.24052786827087402,
0.04694627597928047,
0.08284902572631836,
0.027988068759441376,
-0.05692165344953537,
0.08089981973171234,
0.0815410390496254,
0.032410040497779846,
-0.007271668408066034,
-0.08014822751283646,
0.07295668870210648,
-0.0696897879242897,
0.0001657743996474892,
0.046954963356256485,
0.09015141427516937,
0.04498744010925293,
-0.07267877459526062,
-0.15082329511642456,
0.1286010891199112,
-0.08488865941762924,
-0.10300473868846893,
-0.045119836926460266,
0.027174295857548714,
0.2554595470428467,
0.26921993494033813,
0.008482160978019238,
-0.041519660502672195,
0.10360164940357208,
0.04118560627102852,
0.09055715799331665,
0.23299017548561096,
-0.0749010220170021,
-0.10752751678228378,
-0.14722894132137299,
0.17197991907596588,
-0.1389315277338028,
0.10177689045667648,
0.018664918839931488,
0.04391992464661598,
-0.06967789679765701,
-0.0002326681715203449,
0.19943439960479736,
-0.07394563406705856,
0.29931122064590454,
-0.09884919971227646,
0.07949415594339371,
0.017763551324605942,
-0.08060119301080704,
0.129472017288208,
-0.13861766457557678,
-0.02395614981651306,
-0.027296165004372597,
-0.05599234253168106,
0.008793402463197708,
-0.0019176609348505735,
-0.11755608767271042,
0.07404635101556778,
-0.07166032493114471,
-0.07104317098855972,
-0.2961820662021637,
-0.2042892426252365,
-0.1242949441075325,
0.10558241605758667,
0.26667293906211853,
0.06898681819438934,
-0.04063672199845314,
0.22496052086353302,
0.03913397341966629,
0.06668795645236969,
-0.10835141688585281,
-0.06157198175787926,
0.00981686357408762,
0.12546111643314362,
0.14131273329257965,
0.1481960415840149,
-0.16216279566287994,
0.3672794997692108,
0.013422900810837746,
-0.13489659130573273,
0.12353168427944183,
-0.18061918020248413,
-0.1406608670949936,
0.12275201082229614,
-0.08872536569833755,
0.020333992317318916,
0.08068965375423431,
-0.13559260964393616,
0.017596784979104996,
0.16497591137886047,
-0.0924711599946022,
-0.10012345761060715,
-0.14618827402591705,
-0.029030730947852135,
-0.2565814256668091,
0.06096841022372246,
0.03227905184030533,
0.12586545944213867,
0.10924943536520004,
0.010810745880007744,
0.04384273663163185,
-0.023725617676973343,
-0.09467992186546326,
-0.09393861889839172,
-0.041162192821502686,
0.09871771931648254,
0.0037184571847319603,
0.18262800574302673,
-0.17233629524707794,
0.07711717486381531,
0.24790817499160767,
-0.05604143440723419,
0.05927526205778122,
-0.06969256699085236,
-0.11766883730888367,
0.08407409489154816,
0.033146217465400696,
0.1756150871515274,
-0.17388078570365906,
-0.07037654519081116,
-0.06681058555841446,
0.16204126179218292,
-0.17975851893424988,
0.06729497015476227,
-0.11297190189361572,
0.02156030386686325,
0.08083514869213104,
0.14743925631046295,
-0.0468696691095829,
-0.036362189799547195,
-0.06877753883600235,
0.16651861369609833,
-0.19173738360404968,
0.09640597552061081,
0.0422847680747509,
0.08428869396448135,
-0.0015981807373464108,
0.19082902371883392,
0.11383288353681564,
0.009396793320775032,
-0.061417728662490845,
0.06460939347743988,
-0.1284683793783188,
-0.018673742190003395,
0.013115358538925648,
-0.06329774111509323,
-0.15717080235481262,
0.19946184754371643,
-0.18058893084526062,
-0.09262305498123169,
-0.16897429525852203,
-0.06348413228988647,
0.02251625247299671,
-0.17095120251178741,
-0.11856663972139359,
0.015811337158083916,
-0.06791459023952484,
-0.018331509083509445,
-0.005945606157183647,
-0.08270090073347092,
-0.033569250255823135,
0.09580086916685104,
-0.071064293384552,
0.022287921980023384,
-0.06674429029226303,
-0.10179850459098816,
0.2624760568141937,
0.019794853404164314,
0.1315852701663971,
0.14411266148090363,
0.019153742119669914,
0.10520373284816742,
0.15080028772354126,
0.1896355003118515,
-0.11549679189920425,
-0.1454886496067047,
0.03806353732943535,
0.09412511438131332,
-0.1333160698413849,
-0.05760867893695831,
-0.033632852137088776,
0.014133051969110966,
-0.1999940574169159,
-0.0738653913140297,
0.1504516452550888,
0.24540160596370697,
0.27604055404663086,
0.002299422863870859,
-0.0825330838561058,
-0.1872902810573578,
-0.1808202862739563,
0.04000679403543472,
0.16826313734054565,
0.0312633253633976,
0.0497131422162056,
0.01135722454637289,
-2.354738528623698e-32,
-0.12243188172578812,
0.06456469744443893,
-0.131228506565094,
0.04971569404006004,
-0.298203706741333,
0.12065857648849487,
-0.05012731999158859,
-0.010192496702075005,
-0.07416106760501862,
-0.10886907577514648,
0.00847255066037178,
-0.030979661270976067,
0.05695125088095665,
0.16042183339595795,
-0.015114136040210724,
-0.0413125678896904,
-0.027959438040852547,
0.0011053106281906366,
0.08029814064502716,
0.14325782656669617,
0.08143839240074158,
0.012432875111699104,
-0.1588149070739746,
-0.024735480546951294,
0.07657402753829956,
-0.06532474607229233,
-0.07417881488800049,
-0.05369396507740021,
0.06431262940168381,
-0.03498995304107666,
-0.10167653858661652,
0.16255530714988708,
-0.07162942737340927,
-0.08103109896183014,
-0.2404252141714096,
0.003920749295502901,
-0.24156273901462555,
0.012894959188997746,
-0.12520991265773773,
0.15305715799331665,
0.11632619053125381,
0.14520899951457977,
-0.07907235622406006,
-0.17174506187438965,
-0.015923533588647842,
0.046016521751880646,
0.11759663373231888,
0.1348535418510437,
0.03331825137138367,
-0.11665545403957367,
0.00752550084143877,
-0.02885710634291172,
-0.09925173223018646,
0.17097733914852142,
0.14728553593158722,
-0.017288371920585632,
0.036553144454956055,
0.14590348303318024,
0.020605791360139847,
-0.11350171267986298,
0.04245186597108841,
-0.2691417932510376,
0.11211425065994263,
0.034677207469940186,
-0.07484123855829239,
-0.02341781184077263,
0.243451327085495,
-0.09387271851301193,
-0.12446857988834381,
-0.09405583888292313,
0.11329466104507446,
-0.024532174691557884,
-0.08091143518686295,
-0.029462648555636406,
-0.21345724165439606,
-0.04255061224102974,
-0.08302635699510574,
-0.029044996947050095,
-0.10179905593395233,
-0.010755372233688831,
0.2368467152118683,
-0.017862336710095406,
0.07354050129652023,
-0.010538709349930286,
-0.04130643606185913,
-0.014322728849947453,
0.05692560598254204,
-0.013785172253847122,
-0.1801149696111679,
-0.15631769597530365,
0.030178191140294075,
-0.10289417952299118,
-0.14366215467453003,
-0.11816306412220001,
-0.02535821869969368,
0.06782963871955872,
0.10036636888980865,
0.15196262300014496,
-0.113599993288517,
0.01815158873796463,
-0.16639651358127594,
0.015624869614839554,
0.1475459188222885,
0.11097180098295212,
0.09124579280614853,
0.03003689832985401,
0.04112750291824341,
0.13757643103599548,
-0.11243049055337906,
0.03178247809410095,
0.11871469765901566,
0.11265622824430466,
0.23195268213748932,
0.16383320093154907,
0.22642692923545837,
-0.022350160405039787,
-0.005633336026221514,
-0.025280969217419624,
0.0804050862789154,
0.10082880407571793,
-0.10394111275672913,
0.04110099375247955,
-0.21591304242610931,
0.13865846395492554,
0.11841126531362534,
-0.04041202366352081,
-0.09871745109558105,
0.03572167828679085,
0.0038409242406487465,
-0.07160427421331406,
0.0022765202447772026,
-0.24656236171722412,
6.704345878461027e-7,
-0.3043158948421478,
0.16446419060230255,
0.001508675399236381,
-0.09135803580284119,
-0.027397839352488518,
-0.0026391935534775257,
-0.23193921148777008,
0.22570252418518066,
-0.18876908719539642,
0.17847110331058502,
0.09100203216075897,
0.1203918606042862,
-0.06055305898189545,
0.09906037151813507,
0.046431392431259155,
-0.1669168472290039,
-0.23959487676620483,
0.02640439383685589,
-0.11273124814033508,
0.03921518102288246,
0.06339804083108902,
0.10484886914491653,
0.14665287733078003,
-0.02783624455332756,
0.2279438078403473,
0.03270416334271431,
-0.07137621939182281,
0.09207504242658615,
0.13094349205493927,
-0.03359344229102135,
0.026932500302791595,
0.042952124029397964,
-0.08745372295379639,
0.21354879438877106,
0.09379889816045761,
-0.08395615965127945,
-0.16969163715839386,
-0.040191859006881714,
0.06780203431844711,
-0.05361839011311531,
-0.1426326185464859,
0.18304958939552307,
-0.00765236746519804,
-0.1316429227590561,
0.0392385870218277,
0.22153455018997192,
-0.09066282212734222,
0.03392130509018898,
-0.12440741062164307,
-0.02332981675863266,
0.11956940591335297,
0.10074298083782196,
-0.11483803391456604,
-0.05486105754971504,
-0.07290375232696533,
-0.07393362373113632,
-0.013971660286188126,
-0.10749764740467072,
0.3226166367530823,
-0.04016299918293953,
-0.0098972637206316,
-0.022147027775645256,
0.05000336095690727,
0.11334020644426346,
-0.0927920714020729,
-0.001936189248226583,
-0.13819850981235504,
1.952290634793166e-35,
0.014316601678729057,
0.02828105352818966,
-0.05696239322423935,
-0.26326167583465576,
-0.062200725078582764,
-0.12911804020404816,
0.06321702152490616,
-0.0032753562554717064,
0.02576535940170288,
-0.15905675292015076,
-0.07235513627529144
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Ok I see, this file is downloaded from the CV dataset script - let me investigate | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 16 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Ok I see, this file is downloaded from the CV dataset script - let me investigate | [
0.12552006542682648,
0.13571147620677948,
0.008982510305941105,
-0.0242952648550272,
0.3408251106739044,
0.07202763855457306,
0.11061174422502518,
0.08560646325349808,
0.14547741413116455,
0.22996725142002106,
-0.1202273741364479,
-0.1095869392156601,
-0.02342640981078148,
0.031510453671216965,
0.003533065551891923,
0.009370622225105762,
-0.007014262489974499,
-0.18501484394073486,
0.1101430281996727,
-0.03958429768681526,
-0.09049788862466812,
0.19411924481391907,
0.09820760786533356,
0.018924396485090256,
-0.13104023039340973,
-0.1378277689218521,
0.00815221481025219,
0.1263868361711502,
-0.09732769429683685,
-0.15078243613243103,
0.36100849509239197,
0.0892733633518219,
-0.037230413407087326,
0.26642894744873047,
0.000004591481683746679,
0.05849346145987511,
0.0734884962439537,
0.11160741746425629,
-0.10524944216012955,
-0.06474406272172928,
-0.10798827558755875,
0.058836981654167175,
-0.11568497866392136,
-0.02101774513721466,
-0.03706477954983711,
-0.07458504289388657,
-0.05898430570960045,
0.008917870931327343,
0.021355509757995605,
0.16654114425182343,
-0.03228016942739487,
0.027913765981793404,
0.056028254330158234,
-0.08892893046140671,
0.027576617896556854,
0.05470168963074684,
0.050073299556970596,
0.11059737205505371,
-0.27014389634132385,
-0.013668094761669636,
-0.06059989333152771,
0.07904869318008423,
-0.009236469864845276,
0.06297452747821808,
0.04720105230808258,
0.041094519197940826,
-0.12867024540901184,
-0.13413915038108826,
-0.03525721654295921,
0.2792273759841919,
-0.05017100274562836,
0.14267946779727936,
-0.16750958561897278,
0.04348739981651306,
0.0023500900715589523,
-0.12629415094852448,
0.006708225235342979,
0.11431881040334702,
-0.13590222597122192,
0.12511564791202545,
-0.15176637470722198,
0.018995506688952446,
-0.11143282055854797,
0.032413698732852936,
0.100918710231781,
-0.06266369670629501,
-0.13683362305164337,
0.05284811183810234,
-0.015573802404105663,
-0.17049145698547363,
0.10436010360717773,
-0.10034541040658951,
-0.17237043380737305,
-0.04328986257314682,
-0.026577265933156013,
0.043797969818115234,
-0.054049301892519,
-0.034125953912734985,
-0.0197981558740139,
0.08831620961427689,
-0.1792989820241928,
-0.1871654987335205,
-0.10629228502511978,
0.14391708374023438,
0.11162937432527542,
0.08312925696372986,
0.03252481669187546,
0.0092714698985219,
0.22237499058246613,
0.21822482347488403,
0.08878172188997269,
0.009261513128876686,
-0.06291902810335159,
-0.014338803477585316,
-0.01650002785027027,
0.03578988462686539,
0.21942263841629028,
-0.00014682722394354641,
0.017480066046118736,
0.15728263556957245,
0.037049949169158936,
0.09576363861560822,
-0.0837053433060646,
0.14786335825920105,
-0.10649241507053375,
-0.035997211933135986,
-0.05566016212105751,
0.1318177729845047,
-0.07935238629579544,
-0.061871860176324844,
-0.02914286218583584,
0.04686075076460838,
-0.06549680233001709,
-0.041946861892938614,
0.1553671509027481,
0.03773359954357147,
0.02627861499786377,
-0.1492239534854889,
0.13562022149562836,
-0.04396083950996399,
0.012061010114848614,
-0.14015842974185944,
-0.14675042033195496,
0.08662799000740051,
0.30718106031417847,
0.021263200789690018,
0.11617209762334824,
-0.07900966703891754,
0.051266495138406754,
-0.15362703800201416,
-0.041423071175813675,
-0.09252413362264633,
-0.18966934084892273,
-0.04605161398649216,
-0.1546003520488739,
0.08940437436103821,
0.08659970760345459,
0.044138845056295395,
-0.19121688604354858,
-0.13196836411952972,
0.11308585852384567,
0.06973422318696976,
0.01977935992181301,
-0.13924984633922577,
0.20292778313159943,
0.03966817632317543,
0.21347981691360474,
0.022137949243187904,
-0.01654219999909401,
-0.10777734965085983,
0.18132735788822174,
0.19648991525173187,
0.03185037523508072,
0.10466278344392776,
-0.21115872263908386,
0.2756194472312927,
-0.14558430016040802,
-0.07822910696268082,
-0.37061113119125366,
0.17624922096729279,
0.07983002066612244,
-0.1242196187376976,
0.06340844929218292,
-0.13667228817939758,
0.054168906062841415,
-0.06296174973249435,
-0.038824982941150665,
0.11039991676807404,
-0.074977345764637,
-0.02069312520325184,
0.09666244685649872,
-0.04945758730173111,
-0.0033847878221422434,
-0.17357037961483002,
0.06696205586194992,
-0.11012114584445953,
-0.032801445573568344,
0.017492519691586494,
0.09310943633317947,
-0.137590229511261,
-0.01892823353409767,
-0.060021284967660904,
0.08670821040868759,
0.026364225894212723,
0.0057945242151618,
-0.10218987613916397,
0.04902912303805351,
0.1172155886888504,
-0.08681435137987137,
-0.05279304459691048,
-0.3142334222793579,
-0.05591669678688049,
-0.12193357944488525,
0.10197774320840836,
-0.14964401721954346,
-0.005821180995553732,
0.00684003671631217,
0.0995703786611557,
0.02105526439845562,
0.10639543831348419,
-0.024643905460834503,
0.28216540813446045,
-0.004019895568490028,
-0.16606059670448303,
-0.09998860210180283,
-0.0924903005361557,
-0.07786254584789276,
0.07932634651660919,
0.17587310075759888,
0.08393218368291855,
-0.10766058415174484,
-0.031342022120952606,
-0.03307273983955383,
0.11247559636831284,
-0.1356188803911209,
0.06795169413089752,
-0.015819966793060303,
-0.11616259813308716,
0.013042561709880829,
-0.05036969482898712,
-0.1318821758031845,
0.07062381505966187,
-0.08159258216619492,
0.02789023518562317,
0.08523333817720413,
-0.2040955275297165,
0.07664377987384796,
0.17298279702663422,
-0.08019738644361496,
-0.06460828334093094,
0.1994234174489975,
0.05048516392707825,
-0.10311897099018097,
0.11646220088005066,
0.08482842892408371,
-0.040088336914777756,
-0.16367073357105255,
-0.05608271434903145,
-0.2802819609642029,
-0.22632385790348053,
0.224366694688797,
-0.04955790564417839,
-0.0057030729949474335,
0.004594139289110899,
0.11143384128808975,
-0.1255209743976593,
0.08107796311378479,
0.14088347554206848,
-0.08344881981611252,
-0.046418339014053345,
-0.12698814272880554,
0.007345253136008978,
-0.13396725058555603,
-0.14176173508167267,
0.10416015982627869,
-0.0811789259314537,
0.0033348870929330587,
-0.02605927735567093,
-0.05534471571445465,
0.011120900511741638,
-0.2252265065908432,
0.06857174634933472,
0.18317387998104095,
-0.12000816315412521,
0.02472660504281521,
0.06367725133895874,
-0.04754690080881119,
-0.03363054618239403,
-0.09235084056854248,
-0.06017182767391205,
0.00854097492992878,
0.028305644169449806,
-0.015684684738516808,
-0.04236266389489174,
-0.07993105053901672,
0.007179133128374815,
0.059729114174842834,
-0.014920798130333424,
0.10191702842712402,
0.13849446177482605,
-0.019800476729869843,
0.03021460771560669,
0.08421368151903152,
-0.09414918720722198,
0.139393612742424,
-0.13512487709522247,
0.19749966263771057,
0.06349106132984161,
0.011904796585440636,
-0.2023877501487732,
0.2288934737443924,
-0.20810365676879883,
0.04778099060058594,
0.2337280660867691,
0.09255814552307129,
0.005547537002712488,
0.013891580514609814,
-0.059987470507621765,
0.16984030604362488,
0.17528186738491058,
0.0399998277425766,
0.1462218463420868,
-0.07028111070394516,
0.09553901851177216,
-0.030587878078222275,
0.07522942870855331,
-0.21466968953609467,
-0.1711472123861313,
-0.046882789582014084,
-0.1593562811613083,
0.060221221297979355,
0.21896274387836456,
-0.14655572175979614,
-0.041896868497133255,
-0.033499859273433685,
-0.082074373960495,
-0.19822312891483307,
-0.13178345561027527,
0.3127627968788147,
-0.0963454321026802,
-0.11365892738103867,
0.013149685226380825,
-0.09514348953962326,
0.008625371381640434,
0.08746493607759476,
-0.06774000078439713,
-0.06242431327700615,
0.004707236308604479,
0.057659346610307693,
-0.12164914608001709,
0.11502896994352341,
-0.052897077053785324,
-0.06982485204935074,
-0.09709380567073822,
-0.047540124505758286,
-0.053572166711091995,
-0.027519242838025093,
0.1223338320851326,
-0.012773781083524227,
0.007168570999056101,
0.24052786827087402,
0.04694627597928047,
0.08284902572631836,
0.027988068759441376,
-0.05692165344953537,
0.08089981973171234,
0.0815410390496254,
0.032410040497779846,
-0.007271668408066034,
-0.08014822751283646,
0.07295668870210648,
-0.0696897879242897,
0.0001657743996474892,
0.046954963356256485,
0.09015141427516937,
0.04498744010925293,
-0.07267877459526062,
-0.15082329511642456,
0.1286010891199112,
-0.08488865941762924,
-0.10300473868846893,
-0.045119836926460266,
0.027174295857548714,
0.2554595470428467,
0.26921993494033813,
0.008482160978019238,
-0.041519660502672195,
0.10360164940357208,
0.04118560627102852,
0.09055715799331665,
0.23299017548561096,
-0.0749010220170021,
-0.10752751678228378,
-0.14722894132137299,
0.17197991907596588,
-0.1389315277338028,
0.10177689045667648,
0.018664918839931488,
0.04391992464661598,
-0.06967789679765701,
-0.0002326681715203449,
0.19943439960479736,
-0.07394563406705856,
0.29931122064590454,
-0.09884919971227646,
0.07949415594339371,
0.017763551324605942,
-0.08060119301080704,
0.129472017288208,
-0.13861766457557678,
-0.02395614981651306,
-0.027296165004372597,
-0.05599234253168106,
0.008793402463197708,
-0.0019176609348505735,
-0.11755608767271042,
0.07404635101556778,
-0.07166032493114471,
-0.07104317098855972,
-0.2961820662021637,
-0.2042892426252365,
-0.1242949441075325,
0.10558241605758667,
0.26667293906211853,
0.06898681819438934,
-0.04063672199845314,
0.22496052086353302,
0.03913397341966629,
0.06668795645236969,
-0.10835141688585281,
-0.06157198175787926,
0.00981686357408762,
0.12546111643314362,
0.14131273329257965,
0.1481960415840149,
-0.16216279566287994,
0.3672794997692108,
0.013422900810837746,
-0.13489659130573273,
0.12353168427944183,
-0.18061918020248413,
-0.1406608670949936,
0.12275201082229614,
-0.08872536569833755,
0.020333992317318916,
0.08068965375423431,
-0.13559260964393616,
0.017596784979104996,
0.16497591137886047,
-0.0924711599946022,
-0.10012345761060715,
-0.14618827402591705,
-0.029030730947852135,
-0.2565814256668091,
0.06096841022372246,
0.03227905184030533,
0.12586545944213867,
0.10924943536520004,
0.010810745880007744,
0.04384273663163185,
-0.023725617676973343,
-0.09467992186546326,
-0.09393861889839172,
-0.041162192821502686,
0.09871771931648254,
0.0037184571847319603,
0.18262800574302673,
-0.17233629524707794,
0.07711717486381531,
0.24790817499160767,
-0.05604143440723419,
0.05927526205778122,
-0.06969256699085236,
-0.11766883730888367,
0.08407409489154816,
0.033146217465400696,
0.1756150871515274,
-0.17388078570365906,
-0.07037654519081116,
-0.06681058555841446,
0.16204126179218292,
-0.17975851893424988,
0.06729497015476227,
-0.11297190189361572,
0.02156030386686325,
0.08083514869213104,
0.14743925631046295,
-0.0468696691095829,
-0.036362189799547195,
-0.06877753883600235,
0.16651861369609833,
-0.19173738360404968,
0.09640597552061081,
0.0422847680747509,
0.08428869396448135,
-0.0015981807373464108,
0.19082902371883392,
0.11383288353681564,
0.009396793320775032,
-0.061417728662490845,
0.06460939347743988,
-0.1284683793783188,
-0.018673742190003395,
0.013115358538925648,
-0.06329774111509323,
-0.15717080235481262,
0.19946184754371643,
-0.18058893084526062,
-0.09262305498123169,
-0.16897429525852203,
-0.06348413228988647,
0.02251625247299671,
-0.17095120251178741,
-0.11856663972139359,
0.015811337158083916,
-0.06791459023952484,
-0.018331509083509445,
-0.005945606157183647,
-0.08270090073347092,
-0.033569250255823135,
0.09580086916685104,
-0.071064293384552,
0.022287921980023384,
-0.06674429029226303,
-0.10179850459098816,
0.2624760568141937,
0.019794853404164314,
0.1315852701663971,
0.14411266148090363,
0.019153742119669914,
0.10520373284816742,
0.15080028772354126,
0.1896355003118515,
-0.11549679189920425,
-0.1454886496067047,
0.03806353732943535,
0.09412511438131332,
-0.1333160698413849,
-0.05760867893695831,
-0.033632852137088776,
0.014133051969110966,
-0.1999940574169159,
-0.0738653913140297,
0.1504516452550888,
0.24540160596370697,
0.27604055404663086,
0.002299422863870859,
-0.0825330838561058,
-0.1872902810573578,
-0.1808202862739563,
0.04000679403543472,
0.16826313734054565,
0.0312633253633976,
0.0497131422162056,
0.01135722454637289,
-2.354738528623698e-32,
-0.12243188172578812,
0.06456469744443893,
-0.131228506565094,
0.04971569404006004,
-0.298203706741333,
0.12065857648849487,
-0.05012731999158859,
-0.010192496702075005,
-0.07416106760501862,
-0.10886907577514648,
0.00847255066037178,
-0.030979661270976067,
0.05695125088095665,
0.16042183339595795,
-0.015114136040210724,
-0.0413125678896904,
-0.027959438040852547,
0.0011053106281906366,
0.08029814064502716,
0.14325782656669617,
0.08143839240074158,
0.012432875111699104,
-0.1588149070739746,
-0.024735480546951294,
0.07657402753829956,
-0.06532474607229233,
-0.07417881488800049,
-0.05369396507740021,
0.06431262940168381,
-0.03498995304107666,
-0.10167653858661652,
0.16255530714988708,
-0.07162942737340927,
-0.08103109896183014,
-0.2404252141714096,
0.003920749295502901,
-0.24156273901462555,
0.012894959188997746,
-0.12520991265773773,
0.15305715799331665,
0.11632619053125381,
0.14520899951457977,
-0.07907235622406006,
-0.17174506187438965,
-0.015923533588647842,
0.046016521751880646,
0.11759663373231888,
0.1348535418510437,
0.03331825137138367,
-0.11665545403957367,
0.00752550084143877,
-0.02885710634291172,
-0.09925173223018646,
0.17097733914852142,
0.14728553593158722,
-0.017288371920585632,
0.036553144454956055,
0.14590348303318024,
0.020605791360139847,
-0.11350171267986298,
0.04245186597108841,
-0.2691417932510376,
0.11211425065994263,
0.034677207469940186,
-0.07484123855829239,
-0.02341781184077263,
0.243451327085495,
-0.09387271851301193,
-0.12446857988834381,
-0.09405583888292313,
0.11329466104507446,
-0.024532174691557884,
-0.08091143518686295,
-0.029462648555636406,
-0.21345724165439606,
-0.04255061224102974,
-0.08302635699510574,
-0.029044996947050095,
-0.10179905593395233,
-0.010755372233688831,
0.2368467152118683,
-0.017862336710095406,
0.07354050129652023,
-0.010538709349930286,
-0.04130643606185913,
-0.014322728849947453,
0.05692560598254204,
-0.013785172253847122,
-0.1801149696111679,
-0.15631769597530365,
0.030178191140294075,
-0.10289417952299118,
-0.14366215467453003,
-0.11816306412220001,
-0.02535821869969368,
0.06782963871955872,
0.10036636888980865,
0.15196262300014496,
-0.113599993288517,
0.01815158873796463,
-0.16639651358127594,
0.015624869614839554,
0.1475459188222885,
0.11097180098295212,
0.09124579280614853,
0.03003689832985401,
0.04112750291824341,
0.13757643103599548,
-0.11243049055337906,
0.03178247809410095,
0.11871469765901566,
0.11265622824430466,
0.23195268213748932,
0.16383320093154907,
0.22642692923545837,
-0.022350160405039787,
-0.005633336026221514,
-0.025280969217419624,
0.0804050862789154,
0.10082880407571793,
-0.10394111275672913,
0.04110099375247955,
-0.21591304242610931,
0.13865846395492554,
0.11841126531362534,
-0.04041202366352081,
-0.09871745109558105,
0.03572167828679085,
0.0038409242406487465,
-0.07160427421331406,
0.0022765202447772026,
-0.24656236171722412,
6.704345878461027e-7,
-0.3043158948421478,
0.16446419060230255,
0.001508675399236381,
-0.09135803580284119,
-0.027397839352488518,
-0.0026391935534775257,
-0.23193921148777008,
0.22570252418518066,
-0.18876908719539642,
0.17847110331058502,
0.09100203216075897,
0.1203918606042862,
-0.06055305898189545,
0.09906037151813507,
0.046431392431259155,
-0.1669168472290039,
-0.23959487676620483,
0.02640439383685589,
-0.11273124814033508,
0.03921518102288246,
0.06339804083108902,
0.10484886914491653,
0.14665287733078003,
-0.02783624455332756,
0.2279438078403473,
0.03270416334271431,
-0.07137621939182281,
0.09207504242658615,
0.13094349205493927,
-0.03359344229102135,
0.026932500302791595,
0.042952124029397964,
-0.08745372295379639,
0.21354879438877106,
0.09379889816045761,
-0.08395615965127945,
-0.16969163715839386,
-0.040191859006881714,
0.06780203431844711,
-0.05361839011311531,
-0.1426326185464859,
0.18304958939552307,
-0.00765236746519804,
-0.1316429227590561,
0.0392385870218277,
0.22153455018997192,
-0.09066282212734222,
0.03392130509018898,
-0.12440741062164307,
-0.02332981675863266,
0.11956940591335297,
0.10074298083782196,
-0.11483803391456604,
-0.05486105754971504,
-0.07290375232696533,
-0.07393362373113632,
-0.013971660286188126,
-0.10749764740467072,
0.3226166367530823,
-0.04016299918293953,
-0.0098972637206316,
-0.022147027775645256,
0.05000336095690727,
0.11334020644426346,
-0.0927920714020729,
-0.001936189248226583,
-0.13819850981235504,
1.952290634793166e-35,
0.014316601678729057,
0.02828105352818966,
-0.05696239322423935,
-0.26326167583465576,
-0.062200725078582764,
-0.12911804020404816,
0.06321702152490616,
-0.0032753562554717064,
0.02576535940170288,
-0.15905675292015076,
-0.07235513627529144
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Ok I see: when you log out you no longer have access to the repository.
Therefore the dataset script is loaded from cache:
```
WARNING:datasets.load:Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_13_0/22809012aac1fc9803eaffc44122e4149043748e93933935d5ea19898587e4d7 (last modified on Wed Jun 14 10:13:17 2023) since it couldn't be found locally at mozilla-foundation/common_voice_13_0., or remotely on the Hugging Face Hub.
```
and the script tries to download the n_shards.json but fails | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 68 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Ok I see: when you log out you no longer have access to the repository.
Therefore the dataset script is loaded from cache:
```
WARNING:datasets.load:Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_13_0/22809012aac1fc9803eaffc44122e4149043748e93933935d5ea19898587e4d7 (last modified on Wed Jun 14 10:13:17 2023) since it couldn't be found locally at mozilla-foundation/common_voice_13_0., or remotely on the Hugging Face Hub.
```
and the script tries to download the n_shards.json but fails | [
0.12552006542682648,
0.13571147620677948,
0.008982510305941105,
-0.0242952648550272,
0.3408251106739044,
0.07202763855457306,
0.11061174422502518,
0.08560646325349808,
0.14547741413116455,
0.22996725142002106,
-0.1202273741364479,
-0.1095869392156601,
-0.02342640981078148,
0.031510453671216965,
0.003533065551891923,
0.009370622225105762,
-0.007014262489974499,
-0.18501484394073486,
0.1101430281996727,
-0.03958429768681526,
-0.09049788862466812,
0.19411924481391907,
0.09820760786533356,
0.018924396485090256,
-0.13104023039340973,
-0.1378277689218521,
0.00815221481025219,
0.1263868361711502,
-0.09732769429683685,
-0.15078243613243103,
0.36100849509239197,
0.0892733633518219,
-0.037230413407087326,
0.26642894744873047,
0.000004591481683746679,
0.05849346145987511,
0.0734884962439537,
0.11160741746425629,
-0.10524944216012955,
-0.06474406272172928,
-0.10798827558755875,
0.058836981654167175,
-0.11568497866392136,
-0.02101774513721466,
-0.03706477954983711,
-0.07458504289388657,
-0.05898430570960045,
0.008917870931327343,
0.021355509757995605,
0.16654114425182343,
-0.03228016942739487,
0.027913765981793404,
0.056028254330158234,
-0.08892893046140671,
0.027576617896556854,
0.05470168963074684,
0.050073299556970596,
0.11059737205505371,
-0.27014389634132385,
-0.013668094761669636,
-0.06059989333152771,
0.07904869318008423,
-0.009236469864845276,
0.06297452747821808,
0.04720105230808258,
0.041094519197940826,
-0.12867024540901184,
-0.13413915038108826,
-0.03525721654295921,
0.2792273759841919,
-0.05017100274562836,
0.14267946779727936,
-0.16750958561897278,
0.04348739981651306,
0.0023500900715589523,
-0.12629415094852448,
0.006708225235342979,
0.11431881040334702,
-0.13590222597122192,
0.12511564791202545,
-0.15176637470722198,
0.018995506688952446,
-0.11143282055854797,
0.032413698732852936,
0.100918710231781,
-0.06266369670629501,
-0.13683362305164337,
0.05284811183810234,
-0.015573802404105663,
-0.17049145698547363,
0.10436010360717773,
-0.10034541040658951,
-0.17237043380737305,
-0.04328986257314682,
-0.026577265933156013,
0.043797969818115234,
-0.054049301892519,
-0.034125953912734985,
-0.0197981558740139,
0.08831620961427689,
-0.1792989820241928,
-0.1871654987335205,
-0.10629228502511978,
0.14391708374023438,
0.11162937432527542,
0.08312925696372986,
0.03252481669187546,
0.0092714698985219,
0.22237499058246613,
0.21822482347488403,
0.08878172188997269,
0.009261513128876686,
-0.06291902810335159,
-0.014338803477585316,
-0.01650002785027027,
0.03578988462686539,
0.21942263841629028,
-0.00014682722394354641,
0.017480066046118736,
0.15728263556957245,
0.037049949169158936,
0.09576363861560822,
-0.0837053433060646,
0.14786335825920105,
-0.10649241507053375,
-0.035997211933135986,
-0.05566016212105751,
0.1318177729845047,
-0.07935238629579544,
-0.061871860176324844,
-0.02914286218583584,
0.04686075076460838,
-0.06549680233001709,
-0.041946861892938614,
0.1553671509027481,
0.03773359954357147,
0.02627861499786377,
-0.1492239534854889,
0.13562022149562836,
-0.04396083950996399,
0.012061010114848614,
-0.14015842974185944,
-0.14675042033195496,
0.08662799000740051,
0.30718106031417847,
0.021263200789690018,
0.11617209762334824,
-0.07900966703891754,
0.051266495138406754,
-0.15362703800201416,
-0.041423071175813675,
-0.09252413362264633,
-0.18966934084892273,
-0.04605161398649216,
-0.1546003520488739,
0.08940437436103821,
0.08659970760345459,
0.044138845056295395,
-0.19121688604354858,
-0.13196836411952972,
0.11308585852384567,
0.06973422318696976,
0.01977935992181301,
-0.13924984633922577,
0.20292778313159943,
0.03966817632317543,
0.21347981691360474,
0.022137949243187904,
-0.01654219999909401,
-0.10777734965085983,
0.18132735788822174,
0.19648991525173187,
0.03185037523508072,
0.10466278344392776,
-0.21115872263908386,
0.2756194472312927,
-0.14558430016040802,
-0.07822910696268082,
-0.37061113119125366,
0.17624922096729279,
0.07983002066612244,
-0.1242196187376976,
0.06340844929218292,
-0.13667228817939758,
0.054168906062841415,
-0.06296174973249435,
-0.038824982941150665,
0.11039991676807404,
-0.074977345764637,
-0.02069312520325184,
0.09666244685649872,
-0.04945758730173111,
-0.0033847878221422434,
-0.17357037961483002,
0.06696205586194992,
-0.11012114584445953,
-0.032801445573568344,
0.017492519691586494,
0.09310943633317947,
-0.137590229511261,
-0.01892823353409767,
-0.060021284967660904,
0.08670821040868759,
0.026364225894212723,
0.0057945242151618,
-0.10218987613916397,
0.04902912303805351,
0.1172155886888504,
-0.08681435137987137,
-0.05279304459691048,
-0.3142334222793579,
-0.05591669678688049,
-0.12193357944488525,
0.10197774320840836,
-0.14964401721954346,
-0.005821180995553732,
0.00684003671631217,
0.0995703786611557,
0.02105526439845562,
0.10639543831348419,
-0.024643905460834503,
0.28216540813446045,
-0.004019895568490028,
-0.16606059670448303,
-0.09998860210180283,
-0.0924903005361557,
-0.07786254584789276,
0.07932634651660919,
0.17587310075759888,
0.08393218368291855,
-0.10766058415174484,
-0.031342022120952606,
-0.03307273983955383,
0.11247559636831284,
-0.1356188803911209,
0.06795169413089752,
-0.015819966793060303,
-0.11616259813308716,
0.013042561709880829,
-0.05036969482898712,
-0.1318821758031845,
0.07062381505966187,
-0.08159258216619492,
0.02789023518562317,
0.08523333817720413,
-0.2040955275297165,
0.07664377987384796,
0.17298279702663422,
-0.08019738644361496,
-0.06460828334093094,
0.1994234174489975,
0.05048516392707825,
-0.10311897099018097,
0.11646220088005066,
0.08482842892408371,
-0.040088336914777756,
-0.16367073357105255,
-0.05608271434903145,
-0.2802819609642029,
-0.22632385790348053,
0.224366694688797,
-0.04955790564417839,
-0.0057030729949474335,
0.004594139289110899,
0.11143384128808975,
-0.1255209743976593,
0.08107796311378479,
0.14088347554206848,
-0.08344881981611252,
-0.046418339014053345,
-0.12698814272880554,
0.007345253136008978,
-0.13396725058555603,
-0.14176173508167267,
0.10416015982627869,
-0.0811789259314537,
0.0033348870929330587,
-0.02605927735567093,
-0.05534471571445465,
0.011120900511741638,
-0.2252265065908432,
0.06857174634933472,
0.18317387998104095,
-0.12000816315412521,
0.02472660504281521,
0.06367725133895874,
-0.04754690080881119,
-0.03363054618239403,
-0.09235084056854248,
-0.06017182767391205,
0.00854097492992878,
0.028305644169449806,
-0.015684684738516808,
-0.04236266389489174,
-0.07993105053901672,
0.007179133128374815,
0.059729114174842834,
-0.014920798130333424,
0.10191702842712402,
0.13849446177482605,
-0.019800476729869843,
0.03021460771560669,
0.08421368151903152,
-0.09414918720722198,
0.139393612742424,
-0.13512487709522247,
0.19749966263771057,
0.06349106132984161,
0.011904796585440636,
-0.2023877501487732,
0.2288934737443924,
-0.20810365676879883,
0.04778099060058594,
0.2337280660867691,
0.09255814552307129,
0.005547537002712488,
0.013891580514609814,
-0.059987470507621765,
0.16984030604362488,
0.17528186738491058,
0.0399998277425766,
0.1462218463420868,
-0.07028111070394516,
0.09553901851177216,
-0.030587878078222275,
0.07522942870855331,
-0.21466968953609467,
-0.1711472123861313,
-0.046882789582014084,
-0.1593562811613083,
0.060221221297979355,
0.21896274387836456,
-0.14655572175979614,
-0.041896868497133255,
-0.033499859273433685,
-0.082074373960495,
-0.19822312891483307,
-0.13178345561027527,
0.3127627968788147,
-0.0963454321026802,
-0.11365892738103867,
0.013149685226380825,
-0.09514348953962326,
0.008625371381640434,
0.08746493607759476,
-0.06774000078439713,
-0.06242431327700615,
0.004707236308604479,
0.057659346610307693,
-0.12164914608001709,
0.11502896994352341,
-0.052897077053785324,
-0.06982485204935074,
-0.09709380567073822,
-0.047540124505758286,
-0.053572166711091995,
-0.027519242838025093,
0.1223338320851326,
-0.012773781083524227,
0.007168570999056101,
0.24052786827087402,
0.04694627597928047,
0.08284902572631836,
0.027988068759441376,
-0.05692165344953537,
0.08089981973171234,
0.0815410390496254,
0.032410040497779846,
-0.007271668408066034,
-0.08014822751283646,
0.07295668870210648,
-0.0696897879242897,
0.0001657743996474892,
0.046954963356256485,
0.09015141427516937,
0.04498744010925293,
-0.07267877459526062,
-0.15082329511642456,
0.1286010891199112,
-0.08488865941762924,
-0.10300473868846893,
-0.045119836926460266,
0.027174295857548714,
0.2554595470428467,
0.26921993494033813,
0.008482160978019238,
-0.041519660502672195,
0.10360164940357208,
0.04118560627102852,
0.09055715799331665,
0.23299017548561096,
-0.0749010220170021,
-0.10752751678228378,
-0.14722894132137299,
0.17197991907596588,
-0.1389315277338028,
0.10177689045667648,
0.018664918839931488,
0.04391992464661598,
-0.06967789679765701,
-0.0002326681715203449,
0.19943439960479736,
-0.07394563406705856,
0.29931122064590454,
-0.09884919971227646,
0.07949415594339371,
0.017763551324605942,
-0.08060119301080704,
0.129472017288208,
-0.13861766457557678,
-0.02395614981651306,
-0.027296165004372597,
-0.05599234253168106,
0.008793402463197708,
-0.0019176609348505735,
-0.11755608767271042,
0.07404635101556778,
-0.07166032493114471,
-0.07104317098855972,
-0.2961820662021637,
-0.2042892426252365,
-0.1242949441075325,
0.10558241605758667,
0.26667293906211853,
0.06898681819438934,
-0.04063672199845314,
0.22496052086353302,
0.03913397341966629,
0.06668795645236969,
-0.10835141688585281,
-0.06157198175787926,
0.00981686357408762,
0.12546111643314362,
0.14131273329257965,
0.1481960415840149,
-0.16216279566287994,
0.3672794997692108,
0.013422900810837746,
-0.13489659130573273,
0.12353168427944183,
-0.18061918020248413,
-0.1406608670949936,
0.12275201082229614,
-0.08872536569833755,
0.020333992317318916,
0.08068965375423431,
-0.13559260964393616,
0.017596784979104996,
0.16497591137886047,
-0.0924711599946022,
-0.10012345761060715,
-0.14618827402591705,
-0.029030730947852135,
-0.2565814256668091,
0.06096841022372246,
0.03227905184030533,
0.12586545944213867,
0.10924943536520004,
0.010810745880007744,
0.04384273663163185,
-0.023725617676973343,
-0.09467992186546326,
-0.09393861889839172,
-0.041162192821502686,
0.09871771931648254,
0.0037184571847319603,
0.18262800574302673,
-0.17233629524707794,
0.07711717486381531,
0.24790817499160767,
-0.05604143440723419,
0.05927526205778122,
-0.06969256699085236,
-0.11766883730888367,
0.08407409489154816,
0.033146217465400696,
0.1756150871515274,
-0.17388078570365906,
-0.07037654519081116,
-0.06681058555841446,
0.16204126179218292,
-0.17975851893424988,
0.06729497015476227,
-0.11297190189361572,
0.02156030386686325,
0.08083514869213104,
0.14743925631046295,
-0.0468696691095829,
-0.036362189799547195,
-0.06877753883600235,
0.16651861369609833,
-0.19173738360404968,
0.09640597552061081,
0.0422847680747509,
0.08428869396448135,
-0.0015981807373464108,
0.19082902371883392,
0.11383288353681564,
0.009396793320775032,
-0.061417728662490845,
0.06460939347743988,
-0.1284683793783188,
-0.018673742190003395,
0.013115358538925648,
-0.06329774111509323,
-0.15717080235481262,
0.19946184754371643,
-0.18058893084526062,
-0.09262305498123169,
-0.16897429525852203,
-0.06348413228988647,
0.02251625247299671,
-0.17095120251178741,
-0.11856663972139359,
0.015811337158083916,
-0.06791459023952484,
-0.018331509083509445,
-0.005945606157183647,
-0.08270090073347092,
-0.033569250255823135,
0.09580086916685104,
-0.071064293384552,
0.022287921980023384,
-0.06674429029226303,
-0.10179850459098816,
0.2624760568141937,
0.019794853404164314,
0.1315852701663971,
0.14411266148090363,
0.019153742119669914,
0.10520373284816742,
0.15080028772354126,
0.1896355003118515,
-0.11549679189920425,
-0.1454886496067047,
0.03806353732943535,
0.09412511438131332,
-0.1333160698413849,
-0.05760867893695831,
-0.033632852137088776,
0.014133051969110966,
-0.1999940574169159,
-0.0738653913140297,
0.1504516452550888,
0.24540160596370697,
0.27604055404663086,
0.002299422863870859,
-0.0825330838561058,
-0.1872902810573578,
-0.1808202862739563,
0.04000679403543472,
0.16826313734054565,
0.0312633253633976,
0.0497131422162056,
0.01135722454637289,
-2.354738528623698e-32,
-0.12243188172578812,
0.06456469744443893,
-0.131228506565094,
0.04971569404006004,
-0.298203706741333,
0.12065857648849487,
-0.05012731999158859,
-0.010192496702075005,
-0.07416106760501862,
-0.10886907577514648,
0.00847255066037178,
-0.030979661270976067,
0.05695125088095665,
0.16042183339595795,
-0.015114136040210724,
-0.0413125678896904,
-0.027959438040852547,
0.0011053106281906366,
0.08029814064502716,
0.14325782656669617,
0.08143839240074158,
0.012432875111699104,
-0.1588149070739746,
-0.024735480546951294,
0.07657402753829956,
-0.06532474607229233,
-0.07417881488800049,
-0.05369396507740021,
0.06431262940168381,
-0.03498995304107666,
-0.10167653858661652,
0.16255530714988708,
-0.07162942737340927,
-0.08103109896183014,
-0.2404252141714096,
0.003920749295502901,
-0.24156273901462555,
0.012894959188997746,
-0.12520991265773773,
0.15305715799331665,
0.11632619053125381,
0.14520899951457977,
-0.07907235622406006,
-0.17174506187438965,
-0.015923533588647842,
0.046016521751880646,
0.11759663373231888,
0.1348535418510437,
0.03331825137138367,
-0.11665545403957367,
0.00752550084143877,
-0.02885710634291172,
-0.09925173223018646,
0.17097733914852142,
0.14728553593158722,
-0.017288371920585632,
0.036553144454956055,
0.14590348303318024,
0.020605791360139847,
-0.11350171267986298,
0.04245186597108841,
-0.2691417932510376,
0.11211425065994263,
0.034677207469940186,
-0.07484123855829239,
-0.02341781184077263,
0.243451327085495,
-0.09387271851301193,
-0.12446857988834381,
-0.09405583888292313,
0.11329466104507446,
-0.024532174691557884,
-0.08091143518686295,
-0.029462648555636406,
-0.21345724165439606,
-0.04255061224102974,
-0.08302635699510574,
-0.029044996947050095,
-0.10179905593395233,
-0.010755372233688831,
0.2368467152118683,
-0.017862336710095406,
0.07354050129652023,
-0.010538709349930286,
-0.04130643606185913,
-0.014322728849947453,
0.05692560598254204,
-0.013785172253847122,
-0.1801149696111679,
-0.15631769597530365,
0.030178191140294075,
-0.10289417952299118,
-0.14366215467453003,
-0.11816306412220001,
-0.02535821869969368,
0.06782963871955872,
0.10036636888980865,
0.15196262300014496,
-0.113599993288517,
0.01815158873796463,
-0.16639651358127594,
0.015624869614839554,
0.1475459188222885,
0.11097180098295212,
0.09124579280614853,
0.03003689832985401,
0.04112750291824341,
0.13757643103599548,
-0.11243049055337906,
0.03178247809410095,
0.11871469765901566,
0.11265622824430466,
0.23195268213748932,
0.16383320093154907,
0.22642692923545837,
-0.022350160405039787,
-0.005633336026221514,
-0.025280969217419624,
0.0804050862789154,
0.10082880407571793,
-0.10394111275672913,
0.04110099375247955,
-0.21591304242610931,
0.13865846395492554,
0.11841126531362534,
-0.04041202366352081,
-0.09871745109558105,
0.03572167828679085,
0.0038409242406487465,
-0.07160427421331406,
0.0022765202447772026,
-0.24656236171722412,
6.704345878461027e-7,
-0.3043158948421478,
0.16446419060230255,
0.001508675399236381,
-0.09135803580284119,
-0.027397839352488518,
-0.0026391935534775257,
-0.23193921148777008,
0.22570252418518066,
-0.18876908719539642,
0.17847110331058502,
0.09100203216075897,
0.1203918606042862,
-0.06055305898189545,
0.09906037151813507,
0.046431392431259155,
-0.1669168472290039,
-0.23959487676620483,
0.02640439383685589,
-0.11273124814033508,
0.03921518102288246,
0.06339804083108902,
0.10484886914491653,
0.14665287733078003,
-0.02783624455332756,
0.2279438078403473,
0.03270416334271431,
-0.07137621939182281,
0.09207504242658615,
0.13094349205493927,
-0.03359344229102135,
0.026932500302791595,
0.042952124029397964,
-0.08745372295379639,
0.21354879438877106,
0.09379889816045761,
-0.08395615965127945,
-0.16969163715839386,
-0.040191859006881714,
0.06780203431844711,
-0.05361839011311531,
-0.1426326185464859,
0.18304958939552307,
-0.00765236746519804,
-0.1316429227590561,
0.0392385870218277,
0.22153455018997192,
-0.09066282212734222,
0.03392130509018898,
-0.12440741062164307,
-0.02332981675863266,
0.11956940591335297,
0.10074298083782196,
-0.11483803391456604,
-0.05486105754971504,
-0.07290375232696533,
-0.07393362373113632,
-0.013971660286188126,
-0.10749764740467072,
0.3226166367530823,
-0.04016299918293953,
-0.0098972637206316,
-0.022147027775645256,
0.05000336095690727,
0.11334020644426346,
-0.0927920714020729,
-0.001936189248226583,
-0.13819850981235504,
1.952290634793166e-35,
0.014316601678729057,
0.02828105352818966,
-0.05696239322423935,
-0.26326167583465576,
-0.062200725078582764,
-0.12911804020404816,
0.06321702152490616,
-0.0032753562554717064,
0.02576535940170288,
-0.15905675292015076,
-0.07235513627529144
] |
https://github.com/huggingface/datasets/issues/5950 | Support for data with instance-wise dictionary as features | Hi ! We use the Arrow columnar format under the hood, which doesn't support such dictionaries: each field must have a fixed type and exist in each sample.
Instead you can restructure your data like
```
{
"index": 0,
"keys": ["2 * x + y >= 3"],
"values": [["2 * x + y >= 3", "4 * x + 2 * y >= 6"]],
}
},
...
{
"index": 9999,
"keys": ["x >= 6"],
"values": [["x >= 6", "x >= 0", "x >= -1"]],
},
...
``` | ### Feature request
I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section.
It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized).
### Motivation
I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
}
},
...
{
"index": 9999,
"feature": {
"x >= 6": ["x >= 6", "x >= 0", "x >= -1"],
...
}
},
...
```
When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
"x >= 6": None, # keys from other instances
...
}
},
```
This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys.
A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets.
### Your contribution
N/A | 87 | Support for data with instance-wise dictionary as features
### Feature request
I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section.
It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized).
### Motivation
I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
}
},
...
{
"index": 9999,
"feature": {
"x >= 6": ["x >= 6", "x >= 0", "x >= -1"],
...
}
},
...
```
When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
"x >= 6": None, # keys from other instances
...
}
},
```
This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys.
A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets.
### Your contribution
N/A
Hi ! We use the Arrow columnar format under the hood, which doesn't support such dictionaries: each field must have a fixed type and exist in each sample.
Instead you can restructure your data like
```
{
"index": 0,
"keys": ["2 * x + y >= 3"],
"values": [["2 * x + y >= 3", "4 * x + 2 * y >= 6"]],
}
},
...
{
"index": 9999,
"keys": ["x >= 6"],
"values": [["x >= 6", "x >= 0", "x >= -1"]],
},
...
``` | [
-0.05228986591100693,
0.3634777367115021,
-0.012293769977986813,
0.017512237653136253,
0.08827979862689972,
-0.06438151746988297,
0.24888832867145538,
0.005773611832410097,
-0.027716070413589478,
-0.08715936541557312,
0.1049102246761322,
-0.03399144858121872,
-0.1407696008682251,
0.32128727436065674,
0.10309121757745743,
-0.15073265135288239,
-0.0010297643020749092,
-0.04564692825078964,
0.01368709746748209,
0.07500535249710083,
-0.06960011273622513,
-0.006320662796497345,
0.03203326836228371,
-0.11033075302839279,
-0.043169040232896805,
-0.009421763010323048,
-0.11328349262475967,
-0.04874170571565628,
-0.013440861366689205,
-0.22654344141483307,
-0.025255111977458,
0.20912966132164001,
-0.0749654695391655,
-0.06054508313536644,
0.000005979283287160797,
0.17826199531555176,
0.11772888153791428,
-0.07732459902763367,
-0.06341470032930374,
-0.014932148158550262,
0.12726199626922607,
-0.01781909354031086,
0.12888537347316742,
-0.16331695020198822,
-0.08695793151855469,
-0.1725178062915802,
0.02594420500099659,
-0.0030139621812850237,
0.20743967592716217,
-0.08372960984706879,
-0.054407306015491486,
-0.0482296384871006,
-0.09322480857372284,
-0.050324853509664536,
0.14235374331474304,
0.1320718228816986,
0.0018382775597274303,
0.014461594633758068,
-0.10146304965019226,
-0.06728989630937576,
0.08732963353395462,
-0.05130019411444664,
-0.03884052485227585,
0.055691592395305634,
0.1429852396249771,
-0.11516455560922623,
-0.22461546957492828,
-0.1721019744873047,
-0.06809360533952713,
0.051466815173625946,
0.11020602285861969,
-0.08682319521903992,
-0.051148295402526855,
-0.010816285386681557,
0.004502451047301292,
-0.08852163702249527,
-0.04602404311299324,
-0.12220868468284607,
-0.03353721275925636,
-0.044820357114076614,
-0.012151729315519333,
-0.06859131902456284,
0.014445580542087555,
0.010606967844069004,
-0.23908117413520813,
0.01714872568845749,
-0.07156765460968018,
0.0019127369159832597,
-0.07478373497724533,
-0.051976315677165985,
-0.016610801219940186,
-0.05170058086514473,
-0.007925047539174557,
-0.006090890150517225,
0.06825176626443863,
-0.06457841396331787,
-0.14011728763580322,
-0.20339122414588928,
0.06175334006547928,
-0.1464332938194275,
0.054980743676424026,
0.09055538475513458,
-0.13153192400932312,
-0.07465651631355286,
0.04428873583674431,
-0.03124394081532955,
-0.04101436212658882,
-0.03273651748895645,
-0.04198295250535011,
-0.0403728187084198,
-0.05308803170919418,
0.0710233524441719,
-0.04149399325251579,
0.10498512536287308,
0.045627061277627945,
0.052383627742528915,
0.00887029804289341,
0.2776874601840973,
-0.12605328857898712,
-0.07666540890932083,
-0.03971918299794197,
0.07770853489637375,
0.06384167075157166,
0.14274315536022186,
0.11329856514930725,
0.016405271366238594,
0.09369602799415588,
-0.089065320789814,
0.014321002177894115,
0.060820478945970535,
0.04992183670401573,
0.039621997624635696,
0.1496303528547287,
0.07163457572460175,
0.10486799478530884,
0.010286049917340279,
0.15348976850509644,
-0.13376058638095856,
0.21313253045082092,
-0.024538833647966385,
0.03025990165770054,
0.25265783071517944,
-0.038867007941007614,
-0.03992178663611412,
-0.05006137490272522,
0.022395282983779907,
0.01063020434230566,
-0.10572093725204468,
-0.1845441460609436,
0.06722778081893921,
-0.13369885087013245,
0.12003787606954575,
-0.07053384184837341,
0.05728958547115326,
-0.1908072531223297,
-0.13041472434997559,
-0.017166707664728165,
-0.14275504648685455,
-0.2813587486743927,
-0.08295486867427826,
-0.02026662603020668,
-0.05053510144352913,
-0.06214025244116783,
-0.15427877008914948,
0.08730404078960419,
0.06635403633117676,
-0.082929328083992,
-0.12537197768688202,
0.000954648363403976,
-0.056016866117715836,
-0.107376828789711,
-0.035525910556316376,
0.07222674787044525,
-0.07851159572601318,
0.09186122566461563,
0.24557308852672577,
-0.02275467850267887,
0.014906881377100945,
-0.04565667361021042,
0.018556255847215652,
-0.03829982504248619,
0.006871446501463652,
-0.003466957248747349,
-0.07886695861816406,
0.22947198152542114,
-0.0011638818541541696,
0.07880593091249466,
0.10042811930179596,
-0.002696441952139139,
-0.01355565432459116,
-0.12599623203277588,
0.05552666261792183,
0.2049235701560974,
0.14447221159934998,
-0.052894216030836105,
-0.07404866814613342,
0.0678320825099945,
-0.04907721281051636,
0.13605216145515442,
-0.06019221991300583,
-0.17107217013835907,
-0.025576159358024597,
0.032975051552057266,
0.07201593369245529,
0.007439057808369398,
0.10177355259656906,
-0.16715550422668457,
0.10013182461261749,
0.05206683650612831,
0.05804473161697388,
0.05253444239497185,
-0.0515754334628582,
0.0522092804312706,
0.02386670745909214,
-0.19483621418476105,
-0.07329142838716507,
-0.0172173622995615,
0.022808024659752846,
-0.12845993041992188,
0.07951000332832336,
-0.03758871555328369,
0.055153340101242065,
0.07175828516483307,
-0.03224102780222893,
0.20745332539081573,
0.060585685074329376,
0.1007508784532547,
0.10705498605966568,
0.007616809103637934,
0.16186659038066864,
-0.11119817197322845,
0.012927060015499592,
0.1702248752117157,
0.06950079649686813,
-0.0014229576336219907,
-0.13415725529193878,
-0.09762334078550339,
0.09240060299634933,
0.14201220870018005,
0.14810171723365784,
-0.03532027453184128,
-0.06967625766992569,
0.028392646461725235,
-0.05007079243659973,
0.015621252357959747,
0.09820618480443954,
0.09958488494157791,
0.025137828662991524,
-0.107700414955616,
0.008028567768633366,
0.23121552169322968,
0.1286628246307373,
-0.17044539749622345,
0.04998011142015457,
-0.06917553395032883,
-0.14713284373283386,
-0.1036267876625061,
-0.04741475731134415,
0.044139258563518524,
-0.1257169246673584,
0.10248801112174988,
0.050048068165779114,
0.11742347478866577,
-0.03565537929534912,
0.0664641484618187,
0.10643210262060165,
0.0357806459069252,
-0.00022064041695557535,
-0.08114845305681229,
0.03549109399318695,
0.02504350058734417,
0.00745832035318017,
0.009453954175114632,
-0.043351203203201294,
0.08543314039707184,
-0.10191168636083603,
0.023655740544199944,
0.09462875127792358,
0.09362512081861496,
0.020126044750213623,
-0.10761205106973648,
0.017168892547488213,
0.0941486582159996,
-0.08356501907110214,
0.048509132117033005,
0.06913682818412781,
-0.22433088719844818,
-0.0986202210187912,
0.09300709515810013,
-0.056712985038757324,
-0.09960812330245972,
0.04974931851029396,
0.1717042326927185,
0.010509377345442772,
0.06968206912279129,
-0.07327143847942352,
0.014474676921963692,
-0.010942731983959675,
-0.06520329415798187,
-0.29011598229408264,
-0.02737554907798767,
-0.17118509113788605,
0.0729934498667717,
0.11009999364614487,
0.07923519611358643,
-0.0037723726127296686,
0.125311017036438,
0.20441985130310059,
-0.23818820714950562,
-0.21090616285800934,
-0.05766933411359787,
-0.02368549071252346,
-0.018843874335289,
0.005066868383437395,
-0.022662486881017685,
-0.06020133197307587,
-0.21587112545967102,
-0.16668884456157684,
0.08069703727960587,
0.13262230157852173,
0.04366118460893631,
0.011353598907589912,
0.10992081463336945,
0.11606646329164505,
0.04687110707163811,
0.08620407432317734,
-0.1364453285932541,
-0.2623140513896942,
0.1007346585392952,
-0.06965874135494232,
-0.11317829042673111,
0.16229788959026337,
0.06672945618629456,
-0.017436586320400238,
-0.0059637525118887424,
-0.0699782520532608,
-0.10437767207622528,
0.19134022295475006,
0.11935322731733322,
0.004413599148392677,
0.09485235810279846,
-0.08209213614463806,
-0.02993152290582657,
-0.11018513143062592,
0.10176794230937958,
-0.12269295752048492,
0.012678838334977627,
-0.02943134307861328,
0.08903554826974869,
0.16995862126350403,
-0.07879581302404404,
0.0888483077287674,
0.01825924590229988,
0.046579934656620026,
0.010607761330902576,
-0.02768993191421032,
-0.12994715571403503,
0.16694043576717377,
-0.2671554684638977,
0.10594492405653,
0.016031399369239807,
-0.05490822717547417,
0.0630260482430458,
-0.023044109344482422,
-0.10724112391471863,
0.15515325963497162,
0.16321110725402832,
0.02918686345219612,
-0.23281653225421906,
-0.028016576543450356,
-0.09439470618963242,
-0.28269413113594055,
0.04317834600806236,
0.04253719747066498,
-0.04866299405694008,
-0.13819488883018494,
-0.06287240982055664,
-0.2156146764755249,
0.10897249728441238,
0.03478408604860306,
0.005588373634964228,
-0.22668790817260742,
-0.03517661616206169,
-0.05360187962651253,
0.12010267376899719,
0.01211203821003437,
-0.0341656319797039,
-0.03836727887392044,
-0.039647459983825684,
0.13024666905403137,
0.005433656740933657,
0.08820020407438278,
0.09570283442735672,
-0.21732620894908905,
-0.06642251461744308,
-0.1188502237200737,
0.021625399589538574,
-0.019709596410393715,
-0.012997370213270187,
0.012760390527546406,
-0.023924704641103745,
0.07815546542406082,
-0.004040238913148642,
-0.07544184476137161,
0.06058695167303085,
-0.13616551458835602,
0.1092899888753891,
0.007784591056406498,
-0.007536773569881916,
0.04596138000488281,
-0.16027890145778656,
0.19841542840003967,
-0.008435016497969627,
-0.04899889975786209,
0.02156367152929306,
-0.08232647180557251,
-0.05063575878739357,
-0.047010645270347595,
0.05674668774008751,
0.007126304786652327,
-0.11307093501091003,
-0.0887243002653122,
0.3094669580459595,
0.1535777747631073,
0.08466506749391556,
-0.11252632737159729,
-0.22287023067474365,
0.03528788685798645,
0.10037065297365189,
-0.0048690983094275,
0.04756332188844681,
0.03205170854926109,
0.06421859562397003,
0.007598523050546646,
0.09979014843702316,
-0.11904338002204895,
0.20155173540115356,
0.030295003205537796,
-0.11520157009363174,
-0.0865398496389389,
-0.07799216359853745,
0.16732443869113922,
0.12281159311532974,
-0.06588057428598404,
0.10565726459026337,
-0.09805873036384583,
-0.17671294510364532,
-0.18435965478420258,
-0.16572237014770508,
0.10324891656637192,
-0.22568771243095398,
-0.09928157925605774,
-0.07486116141080856,
0.0798339694738388,
0.045521799474954605,
0.01144822034984827,
0.07547713071107864,
-0.02504713274538517,
-0.07930298894643784,
0.3418583869934082,
0.024567868560552597,
-0.08448054641485214,
0.03765009343624115,
0.10296496003866196,
-0.05848695710301399,
0.2672916352748871,
0.28173336386680603,
-0.06976085156202316,
0.07213941961526871,
-0.08203347027301788,
0.011764233000576496,
0.1308155208826065,
-0.06312491744756699,
-0.12478780746459961,
0.11166118830442429,
-0.16918806731700897,
-0.06978517025709152,
-0.16343605518341064,
-0.19808022677898407,
0.12106332182884216,
0.12491796910762787,
0.007948516868054867,
0.1128377616405487,
-0.10361763089895248,
0.04454030469059944,
0.1621863692998886,
-0.13537314534187317,
-0.01964465342462063,
-0.1438414454460144,
0.10950879007577896,
-0.11514715850353241,
-0.11641477048397064,
0.0797000378370285,
0.11735405772924423,
0.1881166696548462,
0.05027232691645622,
0.09815536439418793,
0.20490913093090057,
-0.03799794614315033,
-0.045547597110271454,
-0.005668215919286013,
-0.035434041172266006,
0.0541011244058609,
-0.06203630566596985,
-0.09045877307653427,
-0.03901481255888939,
-0.04363316297531128,
0.01739916019141674,
0.007700418587774038,
-0.07601338624954224,
-0.07760453969240189,
-0.009655318222939968,
-0.031543415039777756,
-0.21015393733978271,
0.011948461644351482,
-0.05175076425075531,
-0.07029490917921066,
0.018415657803416252,
0.08264889568090439,
-0.19718743860721588,
-0.06849874556064606,
-0.0160543043166399,
-0.04240455478429794,
-0.010608706623315811,
-0.01892157644033432,
-0.16342075169086456,
0.026247326284646988,
-0.1515904814004898,
0.0605199821293354,
-0.004512915387749672,
0.0724572166800499,
0.06757207959890366,
0.0292865801602602,
-0.04655452072620392,
-0.037285417318344116,
0.18173132836818695,
0.07337698340415955,
0.03682975098490715,
0.09556494653224945,
0.13121601939201355,
-0.17105944454669952,
-0.13529545068740845,
0.00144965760409832,
-0.002997439354658127,
0.040130581706762314,
-0.18578529357910156,
-0.14651262760162354,
0.011035921052098274,
0.07595055550336838,
-0.01472023781388998,
0.04589875042438507,
0.09228336811065674,
0.02020307444036007,
-0.23435679078102112,
-0.12681233882904053,
-2.6450174546044554e-32,
-0.015195582062005997,
0.042952876538038254,
-0.12006118148565292,
0.02468269132077694,
-0.015953531488776207,
-0.022377902641892433,
0.10681966692209244,
-0.040314193814992905,
-0.04762181639671326,
-0.035028696060180664,
-0.07662560790777206,
0.029653847217559814,
0.05345609411597252,
0.032752927392721176,
0.05482499673962593,
-0.0031657470390200615,
0.06837261468172073,
-0.08030451089143753,
0.0650789812207222,
-0.013569096103310585,
0.2571561336517334,
-0.004921209067106247,
0.14864195883274078,
0.12983593344688416,
-0.05297062546014786,
0.00939876213669777,
0.09446919709444046,
-0.014736512675881386,
0.07410120964050293,
-0.01745309866964817,
-0.053180985152721405,
-0.013415996916592121,
0.05053699016571045,
0.002397955162450671,
-0.07559112459421158,
-0.14996689558029175,
-0.15171077847480774,
0.04992980882525444,
-0.08681455254554749,
-0.10532934963703156,
0.03925308585166931,
0.02214527130126953,
0.21245941519737244,
0.04754193499684334,
0.11612685024738312,
0.1337086260318756,
-0.09629455953836441,
-0.020684383809566498,
-0.1391480714082718,
0.1365000605583191,
0.04475129023194313,
0.09110722690820694,
-0.03601003438234329,
0.023128964006900787,
0.06389473378658295,
-0.0666414424777031,
0.040484193712472916,
-0.1668926328420639,
-0.08175265789031982,
0.03106536716222763,
0.03331742435693741,
0.041594985872507095,
0.10817922651767731,
0.007687559351325035,
0.08962524682283401,
0.17502461373806,
0.21986672282218933,
-0.022292230278253555,
0.024480249732732773,
0.07688035070896149,
0.020614080131053925,
0.048703841865062714,
0.008110824972391129,
0.11569910496473312,
0.012527509592473507,
-0.12099263072013855,
-0.16879768669605255,
-0.012927897274494171,
-0.08342238515615463,
0.018187519162893295,
-0.05482424795627594,
0.015909800305962563,
-0.09974471479654312,
0.013930355198681355,
-0.02797546051442623,
0.1463749259710312,
-0.054079312831163406,
-0.08321762830018997,
-0.022999132052063942,
-0.14875911176204681,
-0.14228370785713196,
0.20701612532138824,
-0.008147242479026318,
0.15725819766521454,
0.06610002368688583,
0.2346370369195938,
-0.038388632237911224,
0.16888923943042755,
-0.05907066911458969,
-0.04546928405761719,
0.1290605217218399,
-0.04059424623847008,
-0.061991363763809204,
0.04250740259885788,
0.20163577795028687,
0.012297983281314373,
-0.04552534967660904,
0.1197795644402504,
-0.21235746145248413,
-0.015923503786325455,
-0.021615436300635338,
-0.08831505477428436,
0.05176407843828201,
-0.07319456338882446,
0.29780733585357666,
0.006390389055013657,
0.08851908892393112,
0.06663083285093307,
0.11925782263278961,
-0.00366393756121397,
-0.1464167684316635,
-0.15394172072410583,
0.10113997757434845,
0.07916462421417236,
0.12250038981437683,
-0.029212702065706253,
-0.11956115812063217,
-0.17591844499111176,
0.04105932265520096,
0.12147102504968643,
0.03332756087183952,
0.09084111452102661,
7.738058229733724e-7,
-0.14419600367546082,
0.07413838058710098,
0.03428444266319275,
0.11025352776050568,
-0.05874813720583916,
0.1503606140613556,
0.0851605162024498,
-0.041589703410863876,
-0.042545899748802185,
0.009013550356030464,
-0.0011890552705153823,
-0.0769699215888977,
-0.12451920658349991,
0.14364275336265564,
-0.15609735250473022,
0.0300042275339365,
-0.10035420954227448,
0.03050057590007782,
-0.11231046169996262,
-0.07639429718255997,
0.2200663834810257,
0.20089049637317657,
0.061064593493938446,
-0.09615673869848251,
0.056176818907260895,
-0.026606325060129166,
-0.05370580404996872,
0.16552935540676117,
-0.034338243305683136,
-0.01901073008775711,
-0.10000617057085037,
-0.05724741891026497,
0.07414841651916504,
0.05592940002679825,
-0.04372108727693558,
-0.024677623063325882,
-0.08463765680789948,
0.04500540718436241,
0.007097745314240456,
0.02552069164812565,
0.013572707772254944,
-0.11523797363042831,
0.01443100068718195,
0.11336210370063782,
0.2172013372182846,
0.06477300077676773,
-0.040950119495391846,
-0.091590516269207,
-0.12421107292175293,
0.17030452191829681,
-0.15195398032665253,
0.06010656803846359,
0.054463811218738556,
0.16731074452400208,
-0.13235948979854584,
-0.07233207672834396,
0.07692629098892212,
0.014814654365181923,
0.0054487972520291805,
0.029158951714634895,
-0.03245234116911888,
0.03375836834311485,
-0.06478404998779297,
-0.12949024140834808,
0.06556498259305954,
0.08303948491811752,
0.05734863877296448,
1.5926845279744398e-34,
-0.04902351647615433,
0.008482679724693298,
0.06614658236503601,
0.1328396499156952,
-0.141143336892128,
-0.06178664043545723,
-0.18004164099693298,
-0.007459661457687616,
0.08331058919429779,
0.034478623420000076,
-0.14617134630680084
] |
https://github.com/huggingface/datasets/issues/5947 | Return the audio filename when decoding fails due to corrupt files | Hi ! The audio data don't always exist as files on disk - the blobs are often stored in the Arrow files. For now I'd suggest disabling decoding with `.cast_column("audio", Audio(decode=False))` and apply your own decoding that handles corrupted files (maybe to filter them out ?)
cc @sanchit-gandhi since it's related to our discussion about allowing users to make decoding return `None` and show a warning when there are corrupted files | ### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails. | 71 | Return the audio filename when decoding fails due to corrupt files
### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
Hi ! The audio data don't always exist as files on disk - the blobs are often stored in the Arrow files. For now I'd suggest disabling decoding with `.cast_column("audio", Audio(decode=False))` and apply your own decoding that handles corrupted files (maybe to filter them out ?)
cc @sanchit-gandhi since it's related to our discussion about allowing users to make decoding return `None` and show a warning when there are corrupted files | [
-0.040076300501823425,
0.2916167676448822,
-0.007823108695447445,
0.0663202777504921,
0.16696065664291382,
-0.04161633551120758,
-0.0638485923409462,
0.06774132698774338,
-0.2208789587020874,
0.1724894642829895,
0.03964315727353096,
0.1286264955997467,
-0.09551133960485458,
-0.021720070391893387,
0.0030973374377936125,
0.012018470093607903,
-0.15509013831615448,
-0.03663142770528793,
0.04665122181177139,
0.020384538918733597,
-0.10259375721216202,
0.19470132887363434,
0.1258423626422882,
0.06936285644769669,
0.07145451754331589,
0.15777204930782318,
0.10721290111541748,
0.1757201999425888,
-0.114973284304142,
-0.12179923802614212,
0.03363928571343422,
-0.04745832458138466,
-0.023895785212516785,
0.15958000719547272,
0.00000552045094082132,
0.04023996740579605,
0.09832755476236343,
-0.005877671763300896,
-0.11372318118810654,
-0.1989145129919052,
-0.04517732560634613,
-0.1628997027873993,
-0.12395104765892029,
-0.015851959586143494,
0.08035945892333984,
-0.0040475414134562016,
0.11918587982654572,
-0.10907876491546631,
-0.13336801528930664,
-0.026961643248796463,
0.07567520439624786,
-0.004369848407804966,
0.020068731158971786,
-0.05255069211125374,
0.06427742540836334,
-0.012008336372673512,
-0.017016883939504623,
0.10360141098499298,
-0.06711839884519577,
0.0862610787153244,
-0.16054458916187286,
0.08091586828231812,
-0.09288428723812103,
-0.06556757539510727,
-0.16080358624458313,
0.038519345223903656,
-0.039295099675655365,
-0.05661066621541977,
-0.024190032854676247,
0.16538840532302856,
0.1368415355682373,
-0.04330984130501747,
-0.06472756713628769,
0.009648463688790798,
0.07668478786945343,
-0.16973012685775757,
0.011417868547141552,
0.06066029146313667,
-0.047338876873254776,
0.08159413188695908,
-0.016202827915549278,
0.29320040345191956,
0.14038123190402985,
-0.04273797571659088,
-0.06119212880730629,
-0.11387952417135239,
-0.10249731689691544,
0.028270931914448738,
0.20013058185577393,
-0.16312988102436066,
-0.058704521507024765,
0.06761190295219421,
-0.08997927606105804,
-0.19473299384117126,
0.05560750886797905,
0.039081770926713943,
0.05576150491833687,
-0.17568784952163696,
0.011053270660340786,
-0.10404711961746216,
-0.06128072366118431,
-0.07360966503620148,
-0.13938891887664795,
0.1361846774816513,
0.08376816660165787,
-0.18912126123905182,
-0.0018821830162778497,
-0.1574873924255371,
0.09668157994747162,
-0.10823450982570648,
0.022968675941228867,
-0.0772528424859047,
0.015066629275679588,
0.029862280935049057,
0.15851816534996033,
0.05599433556199074,
0.11078433692455292,
-0.0006660412182100117,
-0.16482043266296387,
0.2707079350948334,
0.011591247282922268,
0.04405944049358368,
-0.16752909123897552,
-0.050985101610422134,
0.057028599083423615,
0.1305551677942276,
-0.0026767952367663383,
-0.08111871778964996,
-0.11939133703708649,
0.07280042767524719,
0.0695660412311554,
0.03741040080785751,
-0.03890971094369888,
0.11784757673740387,
0.2605644166469574,
0.10449016839265823,
0.1602632850408554,
-0.19828101992607117,
0.02497977577149868,
-0.16340138018131256,
0.04469335824251175,
-0.10515297204256058,
0.015193723142147064,
-0.08001162111759186,
-0.000749388535041362,
-0.08114523440599442,
-0.004451848566532135,
-0.13829420506954193,
-0.06357324123382568,
-0.07411739230155945,
-0.06556827574968338,
0.15221427381038666,
-0.1347595453262329,
0.22005994617938995,
-0.08854331076145172,
0.0832509994506836,
-0.06616593152284622,
0.007061919197440147,
-0.1634741872549057,
-0.19056449830532074,
0.10952311754226685,
-0.04966117814183235,
0.11561296880245209,
0.1369798630475998,
-0.0004842229827772826,
-0.0672113224864006,
-0.0011509864125400782,
-0.17411071062088013,
-0.11126275360584259,
-0.029360201209783554,
-0.0841073989868164,
-0.15631282329559326,
-0.009597834199666977,
-0.08860493451356888,
-0.3007621765136719,
0.05743303522467613,
-0.0047115180641412735,
-0.0006498922593891621,
-0.05430353805422783,
-0.10634604096412659,
-0.10151909291744232,
0.13273276388645172,
0.04595199227333069,
0.09674446284770966,
0.01443102490156889,
0.07990030199289322,
0.06038706377148628,
0.06571699678897858,
0.05456459894776344,
-0.07710454612970352,
-0.03835734352469444,
-0.08921945095062256,
-0.0009760925313457847,
0.10305365175008774,
0.14682605862617493,
-0.0029733909759670496,
-0.06327003985643387,
-0.05273379385471344,
0.09717187285423279,
0.05730189010500908,
-0.04060796648263931,
-0.1762569099664688,
0.22103376686573029,
-0.06478962302207947,
0.12364988029003143,
-0.18957729637622833,
0.018331756815314293,
0.016867153346538544,
-0.017223166301846504,
-0.1764698028564453,
-0.18746870756149292,
-0.016891971230506897,
-0.006701406091451645,
0.019467424601316452,
-0.07120774686336517,
0.1207255944609642,
0.20227457582950592,
0.1484040915966034,
-0.04802214354276657,
0.02829844132065773,
-0.06901805102825165,
-0.1509290188550949,
-0.0321638360619545,
-0.13241152465343475,
0.1487552672624588,
0.0647081658244133,
0.12085404247045517,
-0.013553492724895477,
-0.06921134889125824,
0.1431177258491516,
-0.05513664707541466,
0.017095930874347687,
0.11893777549266815,
0.22161707282066345,
-0.036702562123537064,
0.1278926581144333,
-0.08228755742311478,
-0.07106783241033554,
0.06387518346309662,
-0.005200478248298168,
-0.1603977382183075,
0.005539355333894491,
-0.05732525885105133,
-0.010685048997402191,
-0.025701820850372314,
-0.0861191377043724,
-0.01894478127360344,
0.03440896049141884,
0.047936756163835526,
-0.08444003015756607,
0.01517481915652752,
0.06126295030117035,
-0.2564866840839386,
0.00015623388753738254,
0.10026603192090988,
-0.02601245604455471,
0.033479273319244385,
0.05010135471820831,
-0.15601451694965363,
-0.25300881266593933,
0.3581028878688812,
-0.056891828775405884,
-0.07000218331813812,
0.04155883938074112,
0.18372242152690887,
0.08924891799688339,
-0.06849974393844604,
0.17448236048221588,
0.026302466168999672,
0.060714319348335266,
0.15288738906383514,
-0.17812097072601318,
-0.0535648912191391,
0.12000583857297897,
-0.19628334045410156,
-0.02448694407939911,
-0.031144842505455017,
0.22926051914691925,
-0.12835979461669922,
-0.11054234951734543,
-0.10825788974761963,
-0.14669504761695862,
0.03543143346905708,
-0.08609724789857864,
0.0800204947590828,
-0.06303300708532333,
-0.1057468131184578,
-0.06431479752063751,
-0.26138588786125183,
-0.08542339503765106,
0.10640643537044525,
0.0858202874660492,
0.03410195931792259,
-0.02074357680976391,
0.005938803311437368,
0.01324719563126564,
-0.05440472438931465,
-0.0949511006474495,
-0.0625627264380455,
0.052717555314302444,
0.0641879066824913,
0.15935420989990234,
-0.036151763051748276,
0.016623351722955704,
-0.011440710164606571,
-0.16753895580768585,
0.003496199380606413,
-0.06796076893806458,
-0.08687455207109451,
-0.13267594575881958,
0.012627706862986088,
-0.001878193812444806,
0.015612448565661907,
-0.058044616132974625,
0.017593353986740112,
-0.0340324267745018,
0.08797867596149445,
-0.4277537167072296,
0.08082765340805054,
0.059580057859420776,
0.1931648850440979,
0.1455346643924713,
0.1648731529712677,
-0.08877821266651154,
-0.06794518977403641,
0.04815597087144852,
-0.2082034796476364,
-0.08378489315509796,
0.10150299966335297,
-0.09905730932950974,
-0.07042817026376724,
0.14965413510799408,
-0.1696525365114212,
0.017998015508055687,
-0.0362398624420166,
0.02196420542895794,
-0.07706891000270844,
-0.1255551427602768,
0.06293973326683044,
-0.001103061600588262,
0.12495436519384384,
-0.05101925879716873,
-0.0589018277823925,
-0.007103566080331802,
0.0038406052626669407,
-0.0012314490741118789,
-0.25588172674179077,
0.16158252954483032,
-0.19853171706199646,
0.031248098239302635,
0.09095454961061478,
-0.04313989356160164,
0.05870255455374718,
-0.06438443064689636,
-0.06945730000734329,
0.1435205489397049,
-0.1865857094526291,
0.122403584420681,
-0.031219959259033203,
-0.0007374833803623915,
-0.0007232716307044029,
0.03214383125305176,
-0.08195111155509949,
0.026620781049132347,
-0.11185305565595627,
-0.016127051785588264,
0.19246934354305267,
0.14871908724308014,
0.07693728804588318,
0.1135474443435669,
-0.07452375441789627,
-0.06529781967401505,
-0.18177150189876556,
0.0915599912405014,
0.05170253664255142,
0.020763268694281578,
-0.07190094888210297,
0.06639768183231354,
-0.12768307328224182,
0.005930562037974596,
-0.08312931656837463,
-0.014280266128480434,
-0.11183410882949829,
0.1211034283041954,
0.2449657917022705,
0.22177857160568237,
0.17241926491260529,
0.183752179145813,
-0.04069437086582184,
0.2919119894504547,
0.09470411390066147,
0.1032353937625885,
-0.22048629820346832,
0.08616437017917633,
-0.16383853554725647,
-0.051019806414842606,
0.1630038619041443,
-0.04302041605114937,
0.047153979539871216,
-0.10912894457578659,
0.09908872842788696,
-0.005889099556952715,
0.0638607069849968,
0.05452769249677658,
-0.1433311104774475,
0.15553104877471924,
0.39912012219429016,
-0.022801127284765244,
0.051871467381715775,
0.06913599371910095,
-0.16044026613235474,
0.04123607277870178,
-0.08770817518234253,
0.0783153623342514,
0.1272834986448288,
0.09580857306718826,
0.049178365617990494,
-0.029423408210277557,
0.09639322757720947,
0.08577009290456772,
0.0038784665521234274,
-0.13870000839233398,
0.08441682159900665,
0.13538381457328796,
-0.044493041932582855,
-0.10525897890329361,
0.05395503342151642,
-0.02007841132581234,
0.12890826165676117,
-0.06609771400690079,
0.14390450716018677,
0.05085811764001846,
0.06933335959911346,
0.03593248873949051,
0.039705462753772736,
-0.032777778804302216,
0.15966568887233734,
-0.0571061372756958,
-0.0651240423321724,
-0.001441721455194056,
-0.0026419954374432564,
-0.05397431179881096,
0.010967274196445942,
-0.08063182234764099,
-0.08504733443260193,
-0.0691160261631012,
-0.10998127609491348,
-0.09239467233419418,
0.06546958535909653,
-0.09004045277833939,
-0.005115756299346685,
-0.16749368607997894,
-0.0868980661034584,
0.05492173507809639,
-0.012857218272984028,
-0.059338390827178955,
0.13052025437355042,
0.01668807864189148,
0.0033599550370126963,
0.1200539767742157,
-0.03152339532971382,
-0.07001761347055435,
-0.06407038867473602,
-0.019806107506155968,
-0.12273232638835907,
-0.07409247756004333,
0.14555831253528595,
-0.2707254886627197,
0.03529169410467148,
0.06936214864253998,
-0.0843871608376503,
-0.06797239929437637,
0.12100739777088165,
0.008309775032103062,
0.12498030811548233,
0.08186058700084686,
0.07310725748538971,
0.0719250813126564,
-0.07833503186702728,
-0.09709718078374863,
0.033086471259593964,
0.01347954198718071,
-0.012175116688013077,
-0.09819063544273376,
-0.07975756376981735,
0.024591714143753052,
0.16583655774593353,
0.03948055952787399,
-0.02020389214158058,
0.20664016902446747,
0.09755964577198029,
-0.18599647283554077,
0.039888110011816025,
0.004144514445215464,
-0.14382503926753998,
-0.06607493758201599,
-0.06940097361803055,
-0.12347377836704254,
0.09063830971717834,
-0.23800913989543915,
0.062283799052238464,
0.04525944963097572,
0.15098613500595093,
-0.02768784388899803,
0.20905080437660217,
0.010847206227481365,
-0.0689513310790062,
0.04577611759305,
-0.003257532138377428,
-0.01914420910179615,
0.1183299720287323,
0.034924931824207306,
0.009550495073199272,
0.11912466585636139,
-0.09016267210245132,
0.18280042707920074,
0.1076265498995781,
-0.03567548096179962,
0.18355248868465424,
0.041754476726055145,
0.032179418951272964,
0.08653618395328522,
0.031776122748851776,
-0.1545792669057846,
-0.024723712354898453,
0.050929851830005646,
-0.019555799663066864,
-0.05737891048192978,
0.020343031734228134,
0.014137963764369488,
-0.05961182340979576,
-0.16510382294654846,
-0.07580734044313431,
-0.012105141766369343,
0.13913777470588684,
0.08910476416349411,
-0.10623762756586075,
0.04381005838513374,
-0.14569634199142456,
0.14993616938591003,
-0.025174764916300774,
-0.19373129308223724,
-0.18150056898593903,
0.09136752784252167,
0.050305064767599106,
-0.05440389737486839,
-0.12560637295246124,
-0.01733814738690853,
0.05996635928750038,
0.1331070065498352,
0.10113433748483658,
0.08431084454059601,
0.0018139851745218039,
-0.08329104632139206,
-0.25904861092567444,
-2.4454836068345078e-32,
-0.07274234294891357,
-0.2124326080083847,
-0.04896937310695648,
-0.14137578010559082,
0.048882316797971725,
-0.019659006968140602,
-0.02215050347149372,
-0.021575022488832474,
0.11605270206928253,
-0.02649739384651184,
0.1322956681251526,
-0.09394123405218124,
0.05880031734704971,
0.007570403628051281,
0.17395766079425812,
-0.04911474883556366,
0.1070379987359047,
0.20812179148197174,
-0.17558486759662628,
-0.09752583503723145,
0.13789738714694977,
0.0337456576526165,
0.13350696861743927,
-0.11465850472450256,
-0.08815060555934906,
0.05814101919531822,
-0.026572268456220627,
-0.06765196472406387,
0.0005604088073596358,
0.023364752531051636,
0.11330778151750565,
0.04133404418826103,
0.03291131928563118,
-0.004516114480793476,
-0.08212685585021973,
-0.018930641934275627,
-0.3897673487663269,
0.18600070476531982,
0.14136317372322083,
-0.032149363309144974,
0.2247709035873413,
0.18331530690193176,
-0.011646841652691364,
-0.04479140043258667,
0.13762164115905762,
-0.008188161998987198,
-0.02929735742509365,
0.02989904023706913,
0.0954265147447586,
-0.10989960283041,
-0.0110931983217597,
0.031082207337021828,
-0.1569220870733261,
-0.037750471383333206,
0.21815133094787598,
0.09955384582281113,
0.15046367049217224,
0.02361873723566532,
-0.100191131234169,
-0.024263767525553703,
0.025173980742692947,
-0.008992327377200127,
0.06879759579896927,
-0.03128650411963463,
-0.16082146763801575,
-0.021214287728071213,
0.1707741767168045,
-0.19252434372901917,
-0.006516266148537397,
-0.03249950334429741,
-0.0520479753613472,
-0.16027669608592987,
0.12508590519428253,
0.10519778728485107,
-0.09432020038366318,
0.015694083645939827,
0.02990570105612278,
0.07342654466629028,
-0.055022723972797394,
-0.10459700971841812,
0.07967270910739899,
0.1649063229560852,
-0.23280169069766998,
0.10640867054462433,
-0.04003242775797844,
0.055828019976615906,
0.043050989508628845,
-0.0171284731477499,
0.00623399717733264,
-0.04656171798706055,
0.09710213541984558,
-0.07215645164251328,
0.06798233836889267,
0.022208547219634056,
0.21044184267520905,
-0.1843627691268921,
-0.025105822831392288,
0.13952043652534485,
-0.1315957009792328,
0.10079193860292435,
0.3563915491104126,
-0.013678784482181072,
0.28479644656181335,
-0.1582796573638916,
-0.06702513247728348,
-0.08439195901155472,
0.09073697775602341,
0.015089212916791439,
-0.10556206852197647,
-0.06888776272535324,
0.1096642017364502,
0.03343468904495239,
0.12392979860305786,
0.10325923562049866,
0.07568534463644028,
0.2818355858325958,
-0.037686169147491455,
-0.04399809613823891,
0.10507292300462723,
0.21051307022571564,
-0.21022380888462067,
-0.026519905775785446,
-0.06400631368160248,
0.028039423748850822,
-0.07778934389352798,
0.21900159120559692,
0.005395596846938133,
-0.1353864222764969,
-0.008383755572140217,
0.051269207149744034,
-0.17499348521232605,
-0.015438580885529518,
7.042690981506894e-7,
0.019274046644568443,
-0.21831399202346802,
0.09708689898252487,
0.11678393930196762,
-0.21126878261566162,
0.1079007238149643,
-0.18573039770126343,
-0.10177024453878403,
-0.03683978691697121,
-0.08205275237560272,
0.09625501930713654,
-0.34309691190719604,
0.2645653784275055,
0.06347387284040451,
-0.23026423156261444,
0.045444004237651825,
-0.13073457777500153,
-0.038963593542575836,
-0.06445084512233734,
-0.21334180235862732,
0.06495261937379837,
0.07296235859394073,
-0.09837997704744339,
-0.0659267008304596,
0.009500776417553425,
0.038485314697027206,
-0.12733864784240723,
-0.008042913861572742,
0.07607010006904602,
-0.2025735080242157,
-0.042785804718732834,
0.016352904960513115,
-0.033286165446043015,
-0.08315163850784302,
-0.1096886694431305,
0.006799079943448305,
-0.023027481511235237,
0.06850163638591766,
0.13378377258777618,
-0.07604802399873734,
-0.14383253455162048,
0.12576164305210114,
-0.027114512398838997,
0.11089373379945755,
-0.004277068190276623,
0.15693838894367218,
-0.13573208451271057,
0.14798064529895782,
-0.1547037959098816,
0.03004586137831211,
-0.17140497267246246,
-0.030790450051426888,
0.11720356345176697,
0.06114888936281204,
-0.08095888048410416,
-0.024813717231154442,
0.04576931893825531,
-0.013563505373895168,
0.26612231135368347,
-0.013982230797410011,
-0.006951139308512211,
-0.05656479671597481,
0.12062736600637436,
-0.06466391682624817,
-0.02475873939692974,
-0.2710755169391632,
0.04680708795785904,
1.3339711931222866e-34,
0.07938987016677856,
0.020864212885499,
-0.0006759938551113009,
0.002699549775570631,
0.05434713512659073,
0.005062247160822153,
0.033428795635700226,
0.15063917636871338,
-0.12537389993667603,
0.09356367588043213,
-0.15870217978954315
] |
https://github.com/huggingface/datasets/issues/5947 | Return the audio filename when decoding fails due to corrupt files | Thanks @lhoestq, I wasn't aware of the decode flag. It makes more sense as you say to show a warning when there are corrupted files together with some metadata of the file that allows to filter them from the dataset.
My workaround was to catch the LibsndfileError and generate a dummy audio with an unsual sample rate to filter it later. However returning `None` seems better.
`try:
array, sampling_rate = sf.read(file)
except sf.LibsndfileError:
print("bad file")
array = np.array([0.0])
sampling_rate = 99.000`
| ### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails. | 81 | Return the audio filename when decoding fails due to corrupt files
### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
Thanks @lhoestq, I wasn't aware of the decode flag. It makes more sense as you say to show a warning when there are corrupted files together with some metadata of the file that allows to filter them from the dataset.
My workaround was to catch the LibsndfileError and generate a dummy audio with an unsual sample rate to filter it later. However returning `None` seems better.
`try:
array, sampling_rate = sf.read(file)
except sf.LibsndfileError:
print("bad file")
array = np.array([0.0])
sampling_rate = 99.000`
| [
0.007386672310531139,
0.29572707414627075,
-0.03387003391981125,
0.01073241513222456,
0.16564302146434784,
-0.034561142325401306,
-0.04658496752381325,
0.07511404156684875,
-0.1817062348127365,
0.19582782685756683,
0.06812098622322083,
0.14676783978939056,
-0.1278538852930069,
0.04215002804994583,
-0.00974082201719284,
0.046824175864458084,
-0.15747302770614624,
-0.0013736943947151303,
0.07591725885868073,
0.02253061905503273,
-0.1512819528579712,
0.18502849340438843,
0.12240053713321686,
0.05776406452059746,
0.02607446350157261,
0.09650374948978424,
0.11592952907085419,
0.18579217791557312,
-0.11671760678291321,
-0.12304803729057312,
0.043068476021289825,
-0.07829395681619644,
0.005778448656201363,
0.14006763696670532,
0.0000057936308621719945,
0.08334901183843613,
0.1346842348575592,
-0.056653790175914764,
-0.12467988580465317,
-0.1493452489376068,
0.023726802319288254,
-0.1516881287097931,
-0.12956427037715912,
-0.022900572046637535,
0.0705244317650795,
-0.033911384642124176,
0.11049171537160873,
-0.14754198491573334,
-0.1260223686695099,
-0.017964592203497887,
0.07942037284374237,
0.060047492384910583,
-0.04505481943488121,
-0.07347539067268372,
0.03962227702140808,
0.020492246374487877,
-0.020968550816178322,
0.07092057913541794,
-0.07043882459402084,
0.008755800314247608,
-0.14258204400539398,
0.10855870693922043,
-0.06980613619089127,
-0.05363672971725464,
-0.15858983993530273,
-0.010898061096668243,
-0.043773163110017776,
-0.05925277993083,
-0.03919322043657303,
0.1503249704837799,
0.0696370080113411,
-0.007756577804684639,
-0.07945187389850616,
-0.008966888301074505,
0.048738982528448105,
-0.08254865556955338,
-0.014643652364611626,
0.10491397976875305,
-0.0344635434448719,
0.04871318116784096,
0.019732745364308357,
0.27075669169425964,
0.0932285264134407,
-0.010457423515617847,
-0.07609522342681885,
-0.07453002035617828,
-0.08278872072696686,
0.05193469300866127,
0.2236231416463852,
-0.12462332099676132,
-0.032151270657777786,
0.07868723571300507,
-0.020693691447377205,
-0.19887526333332062,
0.04289492964744568,
0.007187705021351576,
0.06585697829723358,
-0.21612073481082916,
0.04757383093237877,
-0.14167296886444092,
-0.09055840224027634,
-0.08737601339817047,
-0.09207315742969513,
0.1495569348335266,
0.08295375853776932,
-0.2165726125240326,
0.04414490610361099,
-0.07924184203147888,
0.039800502359867096,
-0.10215575993061066,
0.07507465779781342,
-0.06802459806203842,
0.039708416908979416,
-0.019803376868367195,
0.11186852306127548,
0.055681489408016205,
0.16847307980060577,
-0.009691182523965836,
-0.18833723664283752,
0.25044727325439453,
-0.043405186384916306,
0.06913065910339355,
-0.2085762768983841,
-0.02664511278271675,
0.046885404735803604,
0.13648226857185364,
-0.012890197336673737,
-0.07608445733785629,
-0.10766718536615372,
0.02487538941204548,
0.04775853082537651,
0.02346084453165531,
-0.051215071231126785,
0.03994141146540642,
0.30536213517189026,
0.04429229721426964,
0.15763220191001892,
-0.20325900614261627,
0.01582915522158146,
-0.13778825104236603,
0.07023054361343384,
-0.10485062003135681,
0.03613676875829697,
-0.06707247346639633,
-0.02085263282060623,
-0.07106538861989975,
0.03232324495911598,
-0.11282534897327423,
-0.06759428232908249,
-0.02829655073583126,
-0.04405445605516434,
0.10433697700500488,
-0.10239973664283752,
0.1829662322998047,
-0.11793315410614014,
0.06454713642597198,
-0.06971551477909088,
0.009750016033649445,
-0.18787385523319244,
-0.12293524295091629,
0.14784090220928192,
-0.03307262063026428,
0.055979158729314804,
0.1549924910068512,
-0.027387695387005806,
-0.017451157793402672,
-0.016215814277529716,
-0.21344171464443207,
-0.11723668873310089,
-0.02605322375893593,
-0.0034923478960990906,
-0.14607228338718414,
0.006853127386420965,
-0.11087596416473389,
-0.2612353563308716,
0.06458181142807007,
-0.07395539432764053,
-0.0004106926789972931,
0.012811020016670227,
-0.035361398011446,
-0.08765744417905807,
0.11940871179103851,
0.08482344448566437,
0.12642791867256165,
0.044850170612335205,
0.11005654186010361,
0.03536739945411682,
0.1054772213101387,
0.03445030376315117,
-0.06190122291445732,
-0.03800049051642418,
-0.09426344186067581,
0.038991279900074005,
0.16077719628810883,
0.19398610293865204,
-0.031396448612213135,
-0.047870978713035583,
-0.06293557584285736,
0.12945318222045898,
0.05313532054424286,
0.002066186163574457,
-0.13778407871723175,
0.25350818037986755,
-0.017041310667991638,
0.10609155893325806,
-0.22474944591522217,
0.08201383799314499,
0.02335270121693611,
-0.1382627934217453,
-0.207827627658844,
-0.18144288659095764,
-0.05649704486131668,
0.009407890029251575,
0.007011271547526121,
-0.031129630282521248,
0.07114186137914658,
0.20088109374046326,
0.10416394472122192,
-0.07438680529594421,
0.01841580495238304,
-0.06970536708831787,
-0.09034092724323273,
-0.10708611458539963,
-0.10518696159124374,
0.13396859169006348,
0.05831434577703476,
0.10424438863992691,
-0.028847109526395798,
-0.028179951012134552,
0.13423214852809906,
-0.04636796936392784,
-0.0036299661733210087,
0.11146251112222672,
0.20679211616516113,
-0.02967502363026142,
0.05708570033311844,
-0.042431917041540146,
-0.15553982555866241,
0.04793930426239967,
-0.010709230788052082,
-0.19068196415901184,
0.13508856296539307,
-0.07588925212621689,
0.030461343005299568,
-0.028201913461089134,
-0.01668854057788849,
-0.11364486068487167,
0.031984735280275345,
-0.009410874918103218,
-0.05105844885110855,
0.001183602144010365,
0.05812351405620575,
-0.2750808596611023,
0.016750914976000786,
0.11598069965839386,
-0.033874526619911194,
0.02158750407397747,
0.07035326957702637,
-0.18278121948242188,
-0.290035605430603,
0.33965015411376953,
-0.09618345648050308,
-0.09242941439151764,
0.014367945492267609,
0.19299101829528809,
0.07862399518489838,
-0.0707007572054863,
0.15272557735443115,
-0.011851326562464237,
0.05642952397465706,
0.06556318700313568,
-0.17010430991649628,
-0.04772140830755234,
0.08942319452762604,
-0.16133753955364227,
0.02900177426636219,
-0.025692569091916084,
0.1716841459274292,
-0.10264679789543152,
-0.15067601203918457,
-0.12610884010791779,
-0.14302591979503632,
0.04042796790599823,
-0.0911480188369751,
0.08890979737043381,
-0.007434127852320671,
-0.06501729041337967,
-0.09645313769578934,
-0.22046037018299103,
-0.08312302827835083,
0.08543150126934052,
0.07110042870044708,
0.017412791028618813,
-0.030247975140810013,
0.0389287993311882,
-0.0349702462553978,
-0.09492774307727814,
-0.09104493260383606,
-0.0422886461019516,
0.04551294073462486,
0.07313935458660126,
0.17936864495277405,
0.009488696232438087,
0.01371144037693739,
-0.048284415155649185,
-0.11446081846952438,
0.08564753085374832,
-0.06280416995286942,
-0.11207012832164764,
-0.14207851886749268,
0.04477017745375633,
-0.04835288226604462,
0.010000614449381828,
-0.00890906061977148,
0.04357448220252991,
-0.026646358892321587,
0.06628931313753128,
-0.4016817808151245,
0.06456506997346878,
-0.01106348168104887,
0.20065566897392273,
0.12697049975395203,
0.14803631603717804,
-0.05477723851799965,
-0.0805722028017044,
0.03840785473585129,
-0.2090984582901001,
-0.09430310130119324,
0.03849584981799126,
-0.07027268409729004,
-0.05775497481226921,
0.2309194654226303,
-0.14181211590766907,
0.044450972229242325,
-0.007622480392456055,
0.01354999840259552,
-0.09722969681024551,
-0.11982812732458115,
0.08264987170696259,
0.013513189740478992,
0.10539975017309189,
-0.027518007904291153,
-0.031041424721479416,
-0.06425318866968155,
-0.02421560510993004,
0.030113225802779198,
-0.28630855679512024,
0.13496500253677368,
-0.14849931001663208,
-0.026946736499667168,
0.09277405589818954,
-0.002474167151376605,
0.04647544398903847,
-0.05036903917789459,
-0.060934051871299744,
0.12157848477363586,
-0.1563991904258728,
0.10836553573608398,
-0.0031984527595341206,
-0.0359690822660923,
-0.06317755579948425,
0.06358343362808228,
-0.027875147759914398,
0.10718876123428345,
-0.1003139391541481,
0.023011935874819756,
0.21172623336315155,
0.1802676022052765,
0.12487578392028809,
0.12724578380584717,
-0.028031762689352036,
-0.04678181931376457,
-0.2008746862411499,
0.09764505922794342,
0.05109550803899765,
0.04601830244064331,
-0.03496509790420532,
0.062006864696741104,
-0.11163792014122009,
0.023185713216662407,
-0.10370628535747528,
0.001376943662762642,
-0.1150154173374176,
0.11630968749523163,
0.23017117381095886,
0.18049073219299316,
0.17867600917816162,
0.15663257241249084,
0.041418083012104034,
0.3464393615722656,
0.15165552496910095,
0.0800190418958664,
-0.22632652521133423,
0.1220560222864151,
-0.18320579826831818,
-0.043643880635499954,
0.1709619015455246,
-0.08361045271158218,
0.06385325640439987,
-0.05340970680117607,
0.09564526379108429,
0.04470300301909447,
0.028857897967100143,
0.05549061298370361,
-0.11814727634191513,
0.13518285751342773,
0.31850960850715637,
-0.06718288362026215,
0.06774936616420746,
0.10974352806806564,
-0.16773861646652222,
-0.015996212139725685,
-0.044904470443725586,
0.03697362169623375,
0.11739207059144974,
0.11556428670883179,
0.05293631553649902,
0.01343067828565836,
0.09759245067834854,
0.0021526103373616934,
-0.00954120047390461,
-0.13986636698246002,
0.09088646620512009,
0.1427803486585617,
-0.029038989916443825,
-0.09607362002134323,
0.06866715103387833,
0.042899347841739655,
0.13900643587112427,
-0.017808081582188606,
0.15022975206375122,
0.11875030398368835,
0.05989030748605728,
0.022358862683176994,
0.038394249975681305,
0.03348367661237717,
0.10090378671884537,
-0.05656099319458008,
-0.03972707688808441,
0.01676470972597599,
-0.003373141633346677,
-0.03912415727972984,
0.04099468141794205,
-0.09229511767625809,
-0.08549699932336807,
-0.010377618484199047,
-0.16377006471157074,
-0.06443073600530624,
0.09158971905708313,
-0.09600494056940079,
0.002808732446283102,
-0.11420296132564545,
-0.06793610006570816,
-0.03273400291800499,
0.017575208097696304,
-0.05389605462551117,
0.11947428435087204,
0.0005648614605888724,
0.006260300986468792,
0.12197213619947433,
-0.03883729130029678,
-0.06893812865018845,
-0.09534069150686264,
-0.023513007909059525,
-0.11411020159721375,
-0.04517924413084984,
0.16780881583690643,
-0.2396336942911148,
0.04959260672330856,
0.08594515919685364,
-0.13789738714694977,
-0.036244966089725494,
0.11205416172742844,
0.07983633130788803,
0.06758865714073181,
0.09241238236427307,
0.12533307075500488,
0.11027831584215164,
-0.1301220804452896,
-0.09056693315505981,
0.05981139466166496,
0.004789276979863644,
0.003202090971171856,
-0.11226868629455566,
-0.09781746566295624,
0.00035410982673056424,
0.21141427755355835,
0.05301278829574585,
-0.041185230016708374,
0.18277521431446075,
0.13350628316402435,
-0.18088549375534058,
0.0051336949691176414,
-0.004910241346806288,
-0.13792768120765686,
0.002876937622204423,
-0.07294526696205139,
-0.16362084448337555,
0.028320953249931335,
-0.22155830264091492,
0.09188908338546753,
-0.002909750211983919,
0.11957214027643204,
-0.07672516256570816,
0.1599498838186264,
0.01480269618332386,
-0.021774301305413246,
0.06357389688491821,
-0.009442820213735104,
0.004390643443912268,
0.12426921725273132,
-0.0024758747313171625,
-0.0017891492461785674,
0.04458632692694664,
-0.13355137407779694,
0.09277571737766266,
0.09867565333843231,
-0.07808106392621994,
0.13626691699028015,
0.02509380131959915,
0.04972849786281586,
0.03712529316544533,
0.05334753543138504,
-0.11587803810834885,
-0.010909073986113071,
0.08489962667226791,
-0.03429868444800377,
-0.06956447660923004,
0.033252064138650894,
0.009853712283074856,
-0.057689398527145386,
-0.1599196046590805,
-0.10899896174669266,
-0.025919804349541664,
0.1398554891347885,
0.08411825448274612,
-0.172628715634346,
0.09611240774393082,
-0.15407873690128326,
0.14061468839645386,
-0.04057403653860092,
-0.18785779178142548,
-0.14892348647117615,
0.12898685038089752,
0.07831874489784241,
-0.04287467524409294,
-0.13068123161792755,
-0.05436673387885094,
-0.020765887573361397,
0.14459434151649475,
0.086057148873806,
0.12240012735128403,
0.09938028454780579,
-0.08127414435148239,
-0.2671840786933899,
-2.5613863212680284e-32,
-0.04692160710692406,
-0.1899048238992691,
-0.03356649726629257,
-0.1280556470155716,
-0.0017544031143188477,
-0.04069758206605911,
-0.07920552790164948,
-0.03842092305421829,
0.07924345880746841,
0.010219089686870575,
0.11263495683670044,
-0.10051906108856201,
0.0682549700140953,
0.03087853640317917,
0.12090984731912613,
-0.041427381336688995,
0.07043355703353882,
0.18085409700870514,
-0.19014239311218262,
-0.12651735544204712,
0.18692997097969055,
0.015176740474998951,
0.1628725826740265,
-0.18785426020622253,
-0.13099819421768188,
0.07018985599279404,
-0.003846706822514534,
-0.09799863398075104,
-0.054307613521814346,
-0.05382062867283821,
0.1347440779209137,
0.07599705457687378,
0.03130650520324707,
-0.044127270579338074,
-0.0726277232170105,
-0.04093187302350998,
-0.3250458538532257,
0.16472409665584564,
0.11899679154157639,
-0.06577131897211075,
0.2662883400917053,
0.15279866755008698,
0.017952119931578636,
-0.025450654327869415,
0.13459903001785278,
-0.02725210227072239,
-0.02333538793027401,
0.005389955826103687,
0.060395438224077225,
-0.16509421169757843,
0.016932779923081398,
0.04433612525463104,
-0.157848060131073,
-0.03710395097732544,
0.12479908764362335,
0.1311943084001541,
0.15884801745414734,
-0.005646576639264822,
-0.024449851363897324,
-0.01447952538728714,
0.04361363872885704,
0.013249763287603855,
0.06305699050426483,
-0.06683631241321564,
-0.16634418070316315,
-0.008018527179956436,
0.13684199750423431,
-0.1739245057106018,
0.07285453379154205,
-0.08350864052772522,
-0.04816285893321037,
-0.20811527967453003,
0.11013314872980118,
0.07601512223482132,
-0.06259319931268692,
0.015989454463124275,
0.03384576365351677,
0.08176577836275101,
0.018392225727438927,
-0.14242903888225555,
0.09094247221946716,
0.1754467636346817,
-0.2140435129404068,
0.058128681033849716,
-0.04546595737338066,
0.012529538944363594,
0.04818224534392357,
0.008704490959644318,
-0.021971244364976883,
0.0003920060698874295,
0.08258068561553955,
-0.02876005880534649,
0.048482149839401245,
-0.01746944710612297,
0.2132105529308319,
-0.17923054099082947,
-0.021109985187649727,
0.1739445924758911,
-0.12617158889770508,
0.015089046210050583,
0.26699358224868774,
-0.013207233510911465,
0.28815892338752747,
-0.1364986002445221,
-0.04727775976061821,
-0.11567411571741104,
0.08251263946294785,
0.03809544816613197,
-0.04547964036464691,
-0.06972620636224747,
0.04513560235500336,
0.02586379460990429,
0.13247953355312347,
0.058821629732847214,
0.061605751514434814,
0.2580567002296448,
-0.0493406280875206,
-0.0356275700032711,
0.05672230198979378,
0.17891183495521545,
-0.18097013235092163,
-0.026267163455486298,
-0.005971889477223158,
0.015998927876353264,
-0.06434277445077896,
0.17754203081130981,
-0.003067394718527794,
-0.17521904408931732,
-0.015991415828466415,
0.04703889787197113,
-0.1377699077129364,
-0.027204932644963264,
7.132272799026396e-7,
-0.02419983223080635,
-0.24186772108078003,
0.05648205056786537,
0.0740017294883728,
-0.17416422069072723,
0.15459729731082916,
-0.1864953637123108,
-0.10540364682674408,
-0.06389623135328293,
-0.006654685828834772,
0.07181280106306076,
-0.3156448006629944,
0.21831203997135162,
0.0338476188480854,
-0.18972714245319366,
0.0861140787601471,
-0.12058405578136444,
-0.03441469743847847,
-0.011652457527816296,
-0.23903334140777588,
-0.02641509473323822,
0.020900167524814606,
-0.05984250828623772,
-0.10707235336303711,
0.06770996749401093,
0.018748348578810692,
-0.1021328940987587,
-0.0015266587724909186,
0.042477380484342575,
-0.16379567980766296,
0.010060511529445648,
0.0017294533317908645,
0.000458434980828315,
-0.055670544505119324,
-0.14584389328956604,
-0.036399904638528824,
-0.013265279121696949,
0.08396870642900467,
0.18174833059310913,
-0.0999632403254509,
-0.09096038341522217,
0.12314996868371964,
0.02386053279042244,
0.09461452811956406,
0.026194846257567406,
0.2072257101535797,
-0.16273832321166992,
0.14889156818389893,
-0.1253691464662552,
0.03489942103624344,
-0.22086654603481293,
-0.0065569342114031315,
0.08170032501220703,
0.08141441643238068,
-0.08084404468536377,
0.013126377016305923,
0.013211694546043873,
-0.014192039147019386,
0.24843978881835938,
-0.04878150671720505,
-0.006319308653473854,
-0.0610443577170372,
0.10029222816228867,
-0.06511081755161285,
-0.05479290336370468,
-0.25935098528862,
0.017292307689785957,
1.4241973870044792e-34,
0.05202680826187134,
0.06376908719539642,
-0.007584819570183754,
-0.013919882476329803,
0.0005731775891035795,
-0.005652771331369877,
-0.018475990742444992,
0.1677471101284027,
-0.11620437353849411,
0.10934489965438843,
-0.1565985381603241
] |
https://github.com/huggingface/datasets/issues/5946 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ?? | > Looks related to https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/4?u=lhoestq
The problem has not been solved, I have tried this before, but the problem is the same | ### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
| 22 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??
### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
> Looks related to https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/4?u=lhoestq
The problem has not been solved, I have tried this before, but the problem is the same | [
0.13105428218841553,
-0.037753596901893616,
0.026495639234781265,
-0.054582856595516205,
0.2981007397174835,
0.042323414236307144,
0.16524796187877655,
0.10388129949569702,
-0.025519227609038353,
-0.05570737272500992,
-0.14321133494377136,
-0.07407248765230179,
-0.1552603542804718,
0.002424326492473483,
-0.11720909923315048,
-0.03905058279633522,
0.02346089296042919,
-0.0463651679456234,
-0.00007886702951509506,
0.06318499147891998,
-0.1591310352087021,
0.03880925849080086,
0.009356058202683926,
-0.05276811122894287,
0.004239675588905811,
-0.1313450038433075,
-0.22460590302944183,
-0.003927688580006361,
-0.052815843373537064,
-0.14442086219787598,
0.05912062153220177,
-0.17193086445331573,
0.129477858543396,
0.2042556256055832,
0.000005160462933417875,
0.12175377458333969,
-0.0012922795722261071,
0.032319191843271255,
-0.096659354865551,
-0.062241364270448685,
0.17390158772468567,
-0.050111331045627594,
-0.018124807626008987,
-0.10937396436929703,
0.03418130800127983,
-0.1115477979183197,
-0.20416884124279022,
0.21497377753257751,
0.0864909291267395,
0.1489519476890564,
0.039212681353092194,
0.13467484712600708,
0.1678863912820816,
-0.20393496751785278,
0.008164217695593834,
-0.20143982768058777,
-0.0010288010817021132,
-0.05186673626303673,
-0.04499790817499161,
-0.1260398030281067,
-0.011313275434076786,
0.022362861782312393,
0.05067506805062294,
-0.011591438204050064,
-0.012466499581933022,
0.03218068554997444,
0.016455400735139847,
-0.13533298671245575,
-0.054885383695364,
0.08668198436498642,
0.04252205416560173,
0.1390853375196457,
-0.2363719344139099,
-0.02293923869729042,
0.01754896529018879,
-0.22712589800357819,
-0.13806283473968506,
0.11221230775117874,
-0.17027349770069122,
0.1121082454919815,
-0.01583440601825714,
0.10653917491436005,
0.04416480287909508,
0.06290066987276077,
-0.17891022562980652,
0.05318158119916916,
-0.18667666614055634,
0.024251747876405716,
0.19359366595745087,
-0.12441893666982651,
0.2569819390773773,
0.03049044869840145,
0.01637408696115017,
-0.06916944682598114,
-0.1401626169681549,
-0.13091526925563812,
-0.004801755305379629,
-0.26494571566581726,
-0.04558595269918442,
0.008546973578631878,
-0.08425729721784592,
-0.23468412458896637,
0.07193862646818161,
0.04309140890836716,
0.056063517928123474,
0.11794870346784592,
-0.08373533189296722,
0.10256803780794144,
-0.007934724912047386,
-0.003966629505157471,
0.07135357707738876,
-0.030415408313274384,
-0.4124196171760559,
-0.15755124390125275,
0.08081608265638351,
0.09999871999025345,
0.11479903012514114,
0.10824795067310333,
-0.003630975494161248,
0.04601961746811867,
0.027193447574973106,
0.15056493878364563,
-0.05385587364435196,
0.03364512324333191,
0.09367458522319794,
0.02781868167221546,
-0.04079541191458702,
0.04216339811682701,
-0.09256149083375931,
-0.03645246475934982,
-0.06071735918521881,
0.06912010163068771,
0.07910282164812088,
-0.17185190320014954,
0.06075853109359741,
-0.24511262774467468,
-0.10198144614696503,
-0.08690472692251205,
0.05053139850497246,
0.016860371455550194,
0.002387621207162738,
-0.17422503232955933,
-0.18393057584762573,
0.0030631304252892733,
-0.07295291870832443,
-0.01057290006428957,
0.159917414188385,
-0.01774994656443596,
0.010260338895022869,
-0.10334733873605728,
-0.2851044833660126,
0.02103925682604313,
-0.24171985685825348,
-0.05438486859202385,
0.04268983006477356,
0.0699494257569313,
0.005295050796121359,
-0.24809326231479645,
-0.10522681474685669,
-0.012743423692882061,
0.027404246851801872,
-0.011644141748547554,
0.058834467083215714,
-0.24611075222492218,
0.08653038740158081,
-0.04829656332731247,
0.18047478795051575,
0.07757432758808136,
0.016747668385505676,
0.14201796054840088,
0.07845868915319443,
0.11131276190280914,
-0.11405616998672485,
0.04304039850831032,
-0.1420738250017166,
0.11288471519947052,
-0.0741194561123848,
0.07462604343891144,
-0.29074159264564514,
0.010853906162083149,
0.015448594465851784,
-0.1742228865623474,
0.17979370057582855,
-0.03774736821651459,
0.056044138967990875,
-0.07677266001701355,
0.07184749841690063,
-0.03951317071914673,
-0.22175201773643494,
-0.10028008371591568,
0.08098296821117401,
-0.03655897453427315,
-0.015112889930605888,
-0.2008156180381775,
0.27662259340286255,
-0.10164879262447357,
-0.20466521382331848,
-0.13456860184669495,
-0.10677208751440048,
-0.14601854979991913,
-0.0017725336365401745,
0.09003365784883499,
-0.04496466740965843,
-0.0803012102842331,
0.043101586401462555,
-0.12648408114910126,
-0.09556920826435089,
0.12924359738826752,
-0.07937674224376678,
-0.07427902519702911,
-0.1636608988046646,
0.07785486429929733,
0.024616459384560585,
-0.08050674200057983,
-0.0909171998500824,
-0.1032051369547844,
0.07048507779836655,
-0.12274647504091263,
-0.007541715633124113,
-0.00919204019010067,
-0.009369510225951672,
0.01321978960186243,
0.09420335292816162,
-0.06050838157534599,
-0.01853358931839466,
-0.036778952926397324,
-0.16029289364814758,
0.006299788597971201,
-0.016627036035060883,
0.09703352302312851,
-0.12003553658723831,
-0.09959588199853897,
0.0845496878027916,
0.010973308235406876,
-0.08081991225481033,
-0.13980497419834137,
0.07030164450407028,
-0.16754285991191864,
0.025117304176092148,
-0.07822572439908981,
-0.1949184685945511,
0.12506359815597534,
0.10291646420955658,
0.027770964428782463,
0.04689262807369232,
0.13098952174186707,
0.05920586362481117,
0.1338716298341751,
-0.02314748428761959,
-0.1314602941274643,
0.0309144277125597,
0.0637568011879921,
-0.09391559660434723,
0.19864468276500702,
0.027705637738108635,
-0.04902486130595207,
-0.08754526078701019,
0.051918309181928635,
-0.09372019022703171,
-0.1807088404893875,
0.005119433160871267,
-0.12998421490192413,
-0.0548577718436718,
0.02821490541100502,
0.032883331179618835,
-0.045885536819696426,
0.008857312612235546,
-0.13552866876125336,
0.052299369126558304,
0.0838008001446724,
-0.0735207349061966,
-0.12144766747951508,
-0.013466755859553814,
-0.056559525430202484,
-0.10338067263364792,
-0.002828149823471904,
0.03811028227210045,
-0.04875184968113899,
0.021735474467277527,
-0.05086512118577957,
-0.020824545994400978,
0.06372261792421341,
-0.010048617608845234,
0.07369711995124817,
-0.011854367330670357,
0.0978352278470993,
0.0649239644408226,
-0.15158726274967194,
0.05092380568385124,
-0.024661917239427567,
0.1053914725780487,
0.010805509053170681,
0.03773881494998932,
-0.04695635661482811,
0.014232070185244083,
0.02748238295316696,
0.08376604318618774,
-0.05420520529150963,
0.02322443760931492,
0.1916826218366623,
0.00276577053591609,
-0.08078698813915253,
-0.008065881207585335,
0.08443741500377655,
0.15343718230724335,
-0.10956505686044693,
0.21530979871749878,
0.23965704441070557,
-0.022952312603592873,
-0.05212278291583061,
-0.02470574900507927,
-0.01995203085243702,
-0.07175131887197495,
0.059697795659303665,
0.1477436125278473,
-0.04245356097817421,
-0.04188515618443489,
-0.003473682329058647,
0.012986603192985058,
0.0419573150575161,
0.08448369801044464,
0.02806028351187706,
-0.06831678003072739,
0.10848868638277054,
0.04141748696565628,
0.018145740032196045,
-0.23097287118434906,
-0.02707611955702305,
-0.05197281390428543,
-0.15644054114818573,
0.0717245489358902,
0.17778554558753967,
-0.13886164128780365,
-0.0030169507954269648,
0.08739874511957169,
-0.12223152071237564,
-0.0034025670029222965,
-0.07772036641836166,
0.23995670676231384,
0.08669211715459824,
0.0002576350816525519,
-0.12971605360507965,
-0.1321335732936859,
-0.08442522585391998,
-0.039060141891241074,
-0.22095590829849243,
-0.02192826010286808,
0.09238775074481964,
-0.07902878522872925,
-0.05129941925406456,
0.05395663529634476,
0.10442185401916504,
0.016506703570485115,
-0.16197095811367035,
-0.014623850584030151,
0.0975930318236351,
-0.1245163306593895,
0.036869507282972336,
0.04446124657988548,
-0.0834459587931633,
0.22228236496448517,
0.0525321289896965,
0.19355309009552002,
0.14866389334201813,
-0.09637097269296646,
0.1633339673280716,
0.09030015766620636,
-0.07238782942295074,
-0.12011925131082535,
-0.20154841244220734,
0.02709103561937809,
0.15261991322040558,
-0.09868281334638596,
0.09128531813621521,
0.05838559940457344,
-0.09008216857910156,
-0.01857580989599228,
-0.19509287178516388,
-0.03708476200699806,
0.05555370822548866,
0.16521567106246948,
-0.027073286473751068,
-0.1195780411362648,
0.011380468495190144,
0.09814183413982391,
-0.030781498178839684,
0.0017911948962137103,
-0.05301910266280174,
-0.05435766652226448,
0.07281744480133057,
0.1470005214214325,
0.09689212590456009,
-0.197444885969162,
-0.05591846629977226,
-0.0645451545715332,
-0.07480069994926453,
0.23876842856407166,
0.23315072059631348,
-0.022963687777519226,
0.0008955975063145161,
0.018331751227378845,
0.2529433071613312,
-0.044173479080200195,
-0.12230576574802399,
-0.017184467986226082,
-0.0692635029554367,
-0.13417162001132965,
-0.1681467443704605,
0.038012828677892685,
0.07202952355146408,
0.14052502810955048,
0.11807625740766525,
0.08931664377450943,
0.10486534982919693,
0.14716055989265442,
0.04421886429190636,
0.0019781312439590693,
-0.2182348519563675,
-0.09775350987911224,
-0.2428290992975235,
-0.2043847143650055,
-0.11120163649320602,
0.19696718454360962,
0.11757788062095642,
0.08509412407875061,
-0.019354907795786858,
0.09308651834726334,
-0.1394900232553482,
0.04955383762717247,
0.10936484485864639,
-0.012702408246695995,
0.021708879619836807,
0.09888971596956253,
0.14477166533470154,
0.13666601479053497,
0.1469487100839615,
0.28618407249450684,
0.11272736638784409,
0.25808000564575195,
0.07653089612722397,
-0.16696782410144806,
-0.15314821898937225,
0.20620860159397125,
-0.0769164115190506,
0.020854024216532707,
-0.11810040473937988,
0.04363245889544487,
-0.004728355444967747,
0.07756204903125763,
0.08683682978153229,
-0.1814042627811432,
-0.34310224652290344,
-0.09809988737106323,
-0.1578471064567566,
0.08548107743263245,
0.17153334617614746,
0.17189602553844452,
-0.11657470464706421,
0.14146505296230316,
0.09492412954568863,
0.0488421656191349,
-0.016479484736919403,
-0.043286874890327454,
0.10428985953330994,
0.12390675395727158,
0.030301716178655624,
0.09623347967863083,
-0.03226848691701889,
0.1727515608072281,
0.12674736976623535,
-0.1402052640914917,
0.033562447875738144,
-0.02104455605149269,
-0.07850285619497299,
0.012647941708564758,
-0.14167121052742004,
0.19977480173110962,
-0.10590258240699768,
-0.1255972981452942,
-0.045412175357341766,
0.020550567656755447,
0.051588550209999084,
0.15508593618869781,
-0.10633447766304016,
-0.07121425122022629,
0.039797086268663406,
0.11819674074649811,
0.02481215074658394,
-0.0019469864200800657,
0.024878615513443947,
0.1362820267677307,
-0.08609087765216827,
-0.009153814055025578,
-0.005795231554657221,
0.08974773436784744,
-0.10074056684970856,
-0.1316363662481308,
0.11769657582044601,
0.005793713498860598,
0.10386644303798676,
0.03568531200289726,
-0.11784505844116211,
-0.049515336751937866,
-0.054636240005493164,
-0.0027152535039931536,
-0.08885505050420761,
0.11544114351272583,
-0.03750484436750412,
-0.047750074416399,
-0.12677793204784393,
-0.07741469144821167,
0.008619669824838638,
-0.14992080628871918,
-0.04549004137516022,
-0.020911775529384613,
-0.024454906582832336,
0.0010589784942567348,
-0.031672362238168716,
-0.10686155408620834,
0.05393361300230026,
0.05966456979513168,
0.06561735272407532,
-0.013170427642762661,
-0.002127857180312276,
-0.10940805822610855,
0.058420147746801376,
0.017653927206993103,
0.08757883310317993,
0.3308074474334717,
0.14610743522644043,
0.0121983103454113,
0.27555081248283386,
0.22126935422420502,
-0.06693091243505478,
-0.15769968926906586,
0.2026980221271515,
0.12347394973039627,
0.005934844724833965,
-0.018689624965190887,
-0.060745127499103546,
0.07931248843669891,
-0.03477491810917854,
0.01710125058889389,
0.14671063423156738,
0.04721592366695404,
-0.003284304868429899,
-0.09960094839334488,
-0.16250711679458618,
-0.045623213052749634,
-0.0879531055688858,
-0.016123350709676743,
0.0934789702296257,
0.008215628564357758,
0.021152278408408165,
0.10135076940059662,
-2.4975217131878535e-32,
-0.03571617603302002,
-0.12755723297595978,
-0.046001262962818146,
-0.05955183878540993,
-0.19818849861621857,
0.16384506225585938,
-0.03796422481536865,
0.007251346949487925,
-0.03182346373796463,
-0.03896242752671242,
-0.18747951090335846,
-0.08909829705953598,
0.017232190817594528,
-0.06222858279943466,
-0.030640779063105583,
0.11061321943998337,
-0.020426925271749496,
0.2341415286064148,
-0.024985898286104202,
0.07054993510246277,
0.04384813457727432,
0.23948122560977936,
0.089397132396698,
0.10173627734184265,
-0.12033054232597351,
0.13468383252620697,
-0.09815485030412674,
0.014287961646914482,
0.07062707096338272,
0.014097781851887703,
-0.088797926902771,
0.12768729031085968,
-0.030506324023008347,
-0.2640487849712372,
-0.030207660049200058,
-0.025163499638438225,
-0.1554151177406311,
-0.1793159544467926,
-0.11845893412828445,
0.16719351708889008,
0.1866135448217392,
0.027545826509594917,
0.030574094504117966,
-0.22963352501392365,
-0.09397288411855698,
0.15745121240615845,
0.09641837328672409,
0.01797625795006752,
-0.01572415791451931,
-0.14009331166744232,
0.06258010864257812,
0.17278847098350525,
-0.02695399336516857,
0.06260596960783005,
0.024855151772499084,
-0.03425612300634384,
0.005471934098750353,
0.04106391221284866,
-0.053560979664325714,
-0.15095920860767365,
0.26505082845687866,
-0.015300165861845016,
0.03811433166265488,
0.016869280487298965,
0.07710550725460052,
0.14413711428642273,
0.17803125083446503,
0.12070054560899734,
0.08503536134958267,
-0.04931788146495819,
-0.049964647740125656,
-0.09037791937589645,
-0.07779563963413239,
-0.06868582218885422,
-0.08418720215559006,
0.1532275676727295,
-0.07523352652788162,
0.01801309548318386,
0.04557616636157036,
-0.02889840491116047,
0.09507914632558823,
0.22391819953918457,
0.04817726090550423,
-0.005188578274101019,
0.049455106258392334,
0.08768942207098007,
0.08399395644664764,
0.028700407594442368,
-0.12375986576080322,
0.0916876494884491,
-0.024349099025130272,
0.0631575807929039,
-0.15211884677410126,
-0.0005747919785790145,
0.10422048717737198,
0.06453171372413635,
0.15920889377593994,
0.03482535108923912,
-0.1659635305404663,
-0.05824043229222298,
-0.029047967866063118,
0.03690365329384804,
0.026733634993433952,
-0.01263818796724081,
0.27485713362693787,
0.04019622132182121,
-0.1017831414937973,
0.061539869755506516,
-0.05605647712945938,
-0.09994854032993317,
0.018420618027448654,
-0.15135221183300018,
0.17571189999580383,
0.21866194903850555,
0.1412559449672699,
-0.16728748381137848,
0.0900328978896141,
0.05467531085014343,
0.04979174956679344,
0.09541415423154831,
0.06853046268224716,
0.04436372593045235,
-0.12729512155056,
-0.2386453002691269,
-0.0797944962978363,
-0.026530517265200615,
-0.16184812784194946,
0.049761418253183365,
-0.13484913110733032,
-0.0729704424738884,
-0.04848327860236168,
0.22197020053863525,
7.286880645551719e-7,
-0.2729494869709015,
0.2521384060382843,
0.17896735668182373,
-0.13138414919376373,
-0.2451799362897873,
0.10516094416379929,
-0.06053457781672478,
0.00028320177807472646,
-0.16994419693946838,
0.1804242879152298,
0.22638475894927979,
-0.05763550475239754,
0.017276709899306297,
0.036126356571912766,
0.13672451674938202,
-0.06581372767686844,
-0.09257720410823822,
0.15638001263141632,
-0.018984846770763397,
0.009229674935340881,
-0.013322433456778526,
0.10772771388292313,
0.22560030221939087,
-0.04926066845655441,
0.10539610683917999,
0.010349931195378304,
-0.0917128473520279,
-0.12419066578149796,
0.0820019468665123,
0.06811053305864334,
-0.06843967735767365,
-0.057139646261930466,
-0.08301170915365219,
0.024894079193472862,
0.026456383988261223,
0.12393764406442642,
-0.1923268884420395,
-0.09385557472705841,
0.03296308219432831,
-0.015331915579736233,
0.18771213293075562,
0.0687180906534195,
0.0017568119801580906,
-0.212357297539711,
0.02291429415345192,
0.04153561592102051,
0.01291774120181799,
0.07538163661956787,
-0.14875377714633942,
0.006451179273426533,
-0.06077742204070091,
0.05258521810173988,
0.12925302982330322,
0.21361970901489258,
-0.02900310605764389,
-0.006308563984930515,
-0.009327743202447891,
-0.03812142461538315,
0.3177509307861328,
-0.07697903364896774,
-0.09917067736387253,
0.11703149229288101,
0.06599997729063034,
0.1023620218038559,
0.1638205647468567,
-0.07256896048784256,
0.04413521662354469,
7.496456361064343e-35,
0.05694105476140976,
-0.0495075099170208,
0.047304995357990265,
-0.12666602432727814,
0.12174107879400253,
0.054539795964956284,
0.053744956851005554,
-0.04588083177804947,
0.09369726479053497,
-0.26122790575027466,
-0.08760391920804977
] |
https://github.com/huggingface/datasets/issues/5946 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ?? | data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False) # change this line to -
data["train"] = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
After doing this change you code should run fine. | ### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
| 27 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??
### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False) # change this line to -
data["train"] = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
After doing this change you code should run fine. | [
0.13105428218841553,
-0.037753596901893616,
0.026495639234781265,
-0.054582856595516205,
0.2981007397174835,
0.042323414236307144,
0.16524796187877655,
0.10388129949569702,
-0.025519227609038353,
-0.05570737272500992,
-0.14321133494377136,
-0.07407248765230179,
-0.1552603542804718,
0.002424326492473483,
-0.11720909923315048,
-0.03905058279633522,
0.02346089296042919,
-0.0463651679456234,
-0.00007886702951509506,
0.06318499147891998,
-0.1591310352087021,
0.03880925849080086,
0.009356058202683926,
-0.05276811122894287,
0.004239675588905811,
-0.1313450038433075,
-0.22460590302944183,
-0.003927688580006361,
-0.052815843373537064,
-0.14442086219787598,
0.05912062153220177,
-0.17193086445331573,
0.129477858543396,
0.2042556256055832,
0.000005160462933417875,
0.12175377458333969,
-0.0012922795722261071,
0.032319191843271255,
-0.096659354865551,
-0.062241364270448685,
0.17390158772468567,
-0.050111331045627594,
-0.018124807626008987,
-0.10937396436929703,
0.03418130800127983,
-0.1115477979183197,
-0.20416884124279022,
0.21497377753257751,
0.0864909291267395,
0.1489519476890564,
0.039212681353092194,
0.13467484712600708,
0.1678863912820816,
-0.20393496751785278,
0.008164217695593834,
-0.20143982768058777,
-0.0010288010817021132,
-0.05186673626303673,
-0.04499790817499161,
-0.1260398030281067,
-0.011313275434076786,
0.022362861782312393,
0.05067506805062294,
-0.011591438204050064,
-0.012466499581933022,
0.03218068554997444,
0.016455400735139847,
-0.13533298671245575,
-0.054885383695364,
0.08668198436498642,
0.04252205416560173,
0.1390853375196457,
-0.2363719344139099,
-0.02293923869729042,
0.01754896529018879,
-0.22712589800357819,
-0.13806283473968506,
0.11221230775117874,
-0.17027349770069122,
0.1121082454919815,
-0.01583440601825714,
0.10653917491436005,
0.04416480287909508,
0.06290066987276077,
-0.17891022562980652,
0.05318158119916916,
-0.18667666614055634,
0.024251747876405716,
0.19359366595745087,
-0.12441893666982651,
0.2569819390773773,
0.03049044869840145,
0.01637408696115017,
-0.06916944682598114,
-0.1401626169681549,
-0.13091526925563812,
-0.004801755305379629,
-0.26494571566581726,
-0.04558595269918442,
0.008546973578631878,
-0.08425729721784592,
-0.23468412458896637,
0.07193862646818161,
0.04309140890836716,
0.056063517928123474,
0.11794870346784592,
-0.08373533189296722,
0.10256803780794144,
-0.007934724912047386,
-0.003966629505157471,
0.07135357707738876,
-0.030415408313274384,
-0.4124196171760559,
-0.15755124390125275,
0.08081608265638351,
0.09999871999025345,
0.11479903012514114,
0.10824795067310333,
-0.003630975494161248,
0.04601961746811867,
0.027193447574973106,
0.15056493878364563,
-0.05385587364435196,
0.03364512324333191,
0.09367458522319794,
0.02781868167221546,
-0.04079541191458702,
0.04216339811682701,
-0.09256149083375931,
-0.03645246475934982,
-0.06071735918521881,
0.06912010163068771,
0.07910282164812088,
-0.17185190320014954,
0.06075853109359741,
-0.24511262774467468,
-0.10198144614696503,
-0.08690472692251205,
0.05053139850497246,
0.016860371455550194,
0.002387621207162738,
-0.17422503232955933,
-0.18393057584762573,
0.0030631304252892733,
-0.07295291870832443,
-0.01057290006428957,
0.159917414188385,
-0.01774994656443596,
0.010260338895022869,
-0.10334733873605728,
-0.2851044833660126,
0.02103925682604313,
-0.24171985685825348,
-0.05438486859202385,
0.04268983006477356,
0.0699494257569313,
0.005295050796121359,
-0.24809326231479645,
-0.10522681474685669,
-0.012743423692882061,
0.027404246851801872,
-0.011644141748547554,
0.058834467083215714,
-0.24611075222492218,
0.08653038740158081,
-0.04829656332731247,
0.18047478795051575,
0.07757432758808136,
0.016747668385505676,
0.14201796054840088,
0.07845868915319443,
0.11131276190280914,
-0.11405616998672485,
0.04304039850831032,
-0.1420738250017166,
0.11288471519947052,
-0.0741194561123848,
0.07462604343891144,
-0.29074159264564514,
0.010853906162083149,
0.015448594465851784,
-0.1742228865623474,
0.17979370057582855,
-0.03774736821651459,
0.056044138967990875,
-0.07677266001701355,
0.07184749841690063,
-0.03951317071914673,
-0.22175201773643494,
-0.10028008371591568,
0.08098296821117401,
-0.03655897453427315,
-0.015112889930605888,
-0.2008156180381775,
0.27662259340286255,
-0.10164879262447357,
-0.20466521382331848,
-0.13456860184669495,
-0.10677208751440048,
-0.14601854979991913,
-0.0017725336365401745,
0.09003365784883499,
-0.04496466740965843,
-0.0803012102842331,
0.043101586401462555,
-0.12648408114910126,
-0.09556920826435089,
0.12924359738826752,
-0.07937674224376678,
-0.07427902519702911,
-0.1636608988046646,
0.07785486429929733,
0.024616459384560585,
-0.08050674200057983,
-0.0909171998500824,
-0.1032051369547844,
0.07048507779836655,
-0.12274647504091263,
-0.007541715633124113,
-0.00919204019010067,
-0.009369510225951672,
0.01321978960186243,
0.09420335292816162,
-0.06050838157534599,
-0.01853358931839466,
-0.036778952926397324,
-0.16029289364814758,
0.006299788597971201,
-0.016627036035060883,
0.09703352302312851,
-0.12003553658723831,
-0.09959588199853897,
0.0845496878027916,
0.010973308235406876,
-0.08081991225481033,
-0.13980497419834137,
0.07030164450407028,
-0.16754285991191864,
0.025117304176092148,
-0.07822572439908981,
-0.1949184685945511,
0.12506359815597534,
0.10291646420955658,
0.027770964428782463,
0.04689262807369232,
0.13098952174186707,
0.05920586362481117,
0.1338716298341751,
-0.02314748428761959,
-0.1314602941274643,
0.0309144277125597,
0.0637568011879921,
-0.09391559660434723,
0.19864468276500702,
0.027705637738108635,
-0.04902486130595207,
-0.08754526078701019,
0.051918309181928635,
-0.09372019022703171,
-0.1807088404893875,
0.005119433160871267,
-0.12998421490192413,
-0.0548577718436718,
0.02821490541100502,
0.032883331179618835,
-0.045885536819696426,
0.008857312612235546,
-0.13552866876125336,
0.052299369126558304,
0.0838008001446724,
-0.0735207349061966,
-0.12144766747951508,
-0.013466755859553814,
-0.056559525430202484,
-0.10338067263364792,
-0.002828149823471904,
0.03811028227210045,
-0.04875184968113899,
0.021735474467277527,
-0.05086512118577957,
-0.020824545994400978,
0.06372261792421341,
-0.010048617608845234,
0.07369711995124817,
-0.011854367330670357,
0.0978352278470993,
0.0649239644408226,
-0.15158726274967194,
0.05092380568385124,
-0.024661917239427567,
0.1053914725780487,
0.010805509053170681,
0.03773881494998932,
-0.04695635661482811,
0.014232070185244083,
0.02748238295316696,
0.08376604318618774,
-0.05420520529150963,
0.02322443760931492,
0.1916826218366623,
0.00276577053591609,
-0.08078698813915253,
-0.008065881207585335,
0.08443741500377655,
0.15343718230724335,
-0.10956505686044693,
0.21530979871749878,
0.23965704441070557,
-0.022952312603592873,
-0.05212278291583061,
-0.02470574900507927,
-0.01995203085243702,
-0.07175131887197495,
0.059697795659303665,
0.1477436125278473,
-0.04245356097817421,
-0.04188515618443489,
-0.003473682329058647,
0.012986603192985058,
0.0419573150575161,
0.08448369801044464,
0.02806028351187706,
-0.06831678003072739,
0.10848868638277054,
0.04141748696565628,
0.018145740032196045,
-0.23097287118434906,
-0.02707611955702305,
-0.05197281390428543,
-0.15644054114818573,
0.0717245489358902,
0.17778554558753967,
-0.13886164128780365,
-0.0030169507954269648,
0.08739874511957169,
-0.12223152071237564,
-0.0034025670029222965,
-0.07772036641836166,
0.23995670676231384,
0.08669211715459824,
0.0002576350816525519,
-0.12971605360507965,
-0.1321335732936859,
-0.08442522585391998,
-0.039060141891241074,
-0.22095590829849243,
-0.02192826010286808,
0.09238775074481964,
-0.07902878522872925,
-0.05129941925406456,
0.05395663529634476,
0.10442185401916504,
0.016506703570485115,
-0.16197095811367035,
-0.014623850584030151,
0.0975930318236351,
-0.1245163306593895,
0.036869507282972336,
0.04446124657988548,
-0.0834459587931633,
0.22228236496448517,
0.0525321289896965,
0.19355309009552002,
0.14866389334201813,
-0.09637097269296646,
0.1633339673280716,
0.09030015766620636,
-0.07238782942295074,
-0.12011925131082535,
-0.20154841244220734,
0.02709103561937809,
0.15261991322040558,
-0.09868281334638596,
0.09128531813621521,
0.05838559940457344,
-0.09008216857910156,
-0.01857580989599228,
-0.19509287178516388,
-0.03708476200699806,
0.05555370822548866,
0.16521567106246948,
-0.027073286473751068,
-0.1195780411362648,
0.011380468495190144,
0.09814183413982391,
-0.030781498178839684,
0.0017911948962137103,
-0.05301910266280174,
-0.05435766652226448,
0.07281744480133057,
0.1470005214214325,
0.09689212590456009,
-0.197444885969162,
-0.05591846629977226,
-0.0645451545715332,
-0.07480069994926453,
0.23876842856407166,
0.23315072059631348,
-0.022963687777519226,
0.0008955975063145161,
0.018331751227378845,
0.2529433071613312,
-0.044173479080200195,
-0.12230576574802399,
-0.017184467986226082,
-0.0692635029554367,
-0.13417162001132965,
-0.1681467443704605,
0.038012828677892685,
0.07202952355146408,
0.14052502810955048,
0.11807625740766525,
0.08931664377450943,
0.10486534982919693,
0.14716055989265442,
0.04421886429190636,
0.0019781312439590693,
-0.2182348519563675,
-0.09775350987911224,
-0.2428290992975235,
-0.2043847143650055,
-0.11120163649320602,
0.19696718454360962,
0.11757788062095642,
0.08509412407875061,
-0.019354907795786858,
0.09308651834726334,
-0.1394900232553482,
0.04955383762717247,
0.10936484485864639,
-0.012702408246695995,
0.021708879619836807,
0.09888971596956253,
0.14477166533470154,
0.13666601479053497,
0.1469487100839615,
0.28618407249450684,
0.11272736638784409,
0.25808000564575195,
0.07653089612722397,
-0.16696782410144806,
-0.15314821898937225,
0.20620860159397125,
-0.0769164115190506,
0.020854024216532707,
-0.11810040473937988,
0.04363245889544487,
-0.004728355444967747,
0.07756204903125763,
0.08683682978153229,
-0.1814042627811432,
-0.34310224652290344,
-0.09809988737106323,
-0.1578471064567566,
0.08548107743263245,
0.17153334617614746,
0.17189602553844452,
-0.11657470464706421,
0.14146505296230316,
0.09492412954568863,
0.0488421656191349,
-0.016479484736919403,
-0.043286874890327454,
0.10428985953330994,
0.12390675395727158,
0.030301716178655624,
0.09623347967863083,
-0.03226848691701889,
0.1727515608072281,
0.12674736976623535,
-0.1402052640914917,
0.033562447875738144,
-0.02104455605149269,
-0.07850285619497299,
0.012647941708564758,
-0.14167121052742004,
0.19977480173110962,
-0.10590258240699768,
-0.1255972981452942,
-0.045412175357341766,
0.020550567656755447,
0.051588550209999084,
0.15508593618869781,
-0.10633447766304016,
-0.07121425122022629,
0.039797086268663406,
0.11819674074649811,
0.02481215074658394,
-0.0019469864200800657,
0.024878615513443947,
0.1362820267677307,
-0.08609087765216827,
-0.009153814055025578,
-0.005795231554657221,
0.08974773436784744,
-0.10074056684970856,
-0.1316363662481308,
0.11769657582044601,
0.005793713498860598,
0.10386644303798676,
0.03568531200289726,
-0.11784505844116211,
-0.049515336751937866,
-0.054636240005493164,
-0.0027152535039931536,
-0.08885505050420761,
0.11544114351272583,
-0.03750484436750412,
-0.047750074416399,
-0.12677793204784393,
-0.07741469144821167,
0.008619669824838638,
-0.14992080628871918,
-0.04549004137516022,
-0.020911775529384613,
-0.024454906582832336,
0.0010589784942567348,
-0.031672362238168716,
-0.10686155408620834,
0.05393361300230026,
0.05966456979513168,
0.06561735272407532,
-0.013170427642762661,
-0.002127857180312276,
-0.10940805822610855,
0.058420147746801376,
0.017653927206993103,
0.08757883310317993,
0.3308074474334717,
0.14610743522644043,
0.0121983103454113,
0.27555081248283386,
0.22126935422420502,
-0.06693091243505478,
-0.15769968926906586,
0.2026980221271515,
0.12347394973039627,
0.005934844724833965,
-0.018689624965190887,
-0.060745127499103546,
0.07931248843669891,
-0.03477491810917854,
0.01710125058889389,
0.14671063423156738,
0.04721592366695404,
-0.003284304868429899,
-0.09960094839334488,
-0.16250711679458618,
-0.045623213052749634,
-0.0879531055688858,
-0.016123350709676743,
0.0934789702296257,
0.008215628564357758,
0.021152278408408165,
0.10135076940059662,
-2.4975217131878535e-32,
-0.03571617603302002,
-0.12755723297595978,
-0.046001262962818146,
-0.05955183878540993,
-0.19818849861621857,
0.16384506225585938,
-0.03796422481536865,
0.007251346949487925,
-0.03182346373796463,
-0.03896242752671242,
-0.18747951090335846,
-0.08909829705953598,
0.017232190817594528,
-0.06222858279943466,
-0.030640779063105583,
0.11061321943998337,
-0.020426925271749496,
0.2341415286064148,
-0.024985898286104202,
0.07054993510246277,
0.04384813457727432,
0.23948122560977936,
0.089397132396698,
0.10173627734184265,
-0.12033054232597351,
0.13468383252620697,
-0.09815485030412674,
0.014287961646914482,
0.07062707096338272,
0.014097781851887703,
-0.088797926902771,
0.12768729031085968,
-0.030506324023008347,
-0.2640487849712372,
-0.030207660049200058,
-0.025163499638438225,
-0.1554151177406311,
-0.1793159544467926,
-0.11845893412828445,
0.16719351708889008,
0.1866135448217392,
0.027545826509594917,
0.030574094504117966,
-0.22963352501392365,
-0.09397288411855698,
0.15745121240615845,
0.09641837328672409,
0.01797625795006752,
-0.01572415791451931,
-0.14009331166744232,
0.06258010864257812,
0.17278847098350525,
-0.02695399336516857,
0.06260596960783005,
0.024855151772499084,
-0.03425612300634384,
0.005471934098750353,
0.04106391221284866,
-0.053560979664325714,
-0.15095920860767365,
0.26505082845687866,
-0.015300165861845016,
0.03811433166265488,
0.016869280487298965,
0.07710550725460052,
0.14413711428642273,
0.17803125083446503,
0.12070054560899734,
0.08503536134958267,
-0.04931788146495819,
-0.049964647740125656,
-0.09037791937589645,
-0.07779563963413239,
-0.06868582218885422,
-0.08418720215559006,
0.1532275676727295,
-0.07523352652788162,
0.01801309548318386,
0.04557616636157036,
-0.02889840491116047,
0.09507914632558823,
0.22391819953918457,
0.04817726090550423,
-0.005188578274101019,
0.049455106258392334,
0.08768942207098007,
0.08399395644664764,
0.028700407594442368,
-0.12375986576080322,
0.0916876494884491,
-0.024349099025130272,
0.0631575807929039,
-0.15211884677410126,
-0.0005747919785790145,
0.10422048717737198,
0.06453171372413635,
0.15920889377593994,
0.03482535108923912,
-0.1659635305404663,
-0.05824043229222298,
-0.029047967866063118,
0.03690365329384804,
0.026733634993433952,
-0.01263818796724081,
0.27485713362693787,
0.04019622132182121,
-0.1017831414937973,
0.061539869755506516,
-0.05605647712945938,
-0.09994854032993317,
0.018420618027448654,
-0.15135221183300018,
0.17571189999580383,
0.21866194903850555,
0.1412559449672699,
-0.16728748381137848,
0.0900328978896141,
0.05467531085014343,
0.04979174956679344,
0.09541415423154831,
0.06853046268224716,
0.04436372593045235,
-0.12729512155056,
-0.2386453002691269,
-0.0797944962978363,
-0.026530517265200615,
-0.16184812784194946,
0.049761418253183365,
-0.13484913110733032,
-0.0729704424738884,
-0.04848327860236168,
0.22197020053863525,
7.286880645551719e-7,
-0.2729494869709015,
0.2521384060382843,
0.17896735668182373,
-0.13138414919376373,
-0.2451799362897873,
0.10516094416379929,
-0.06053457781672478,
0.00028320177807472646,
-0.16994419693946838,
0.1804242879152298,
0.22638475894927979,
-0.05763550475239754,
0.017276709899306297,
0.036126356571912766,
0.13672451674938202,
-0.06581372767686844,
-0.09257720410823822,
0.15638001263141632,
-0.018984846770763397,
0.009229674935340881,
-0.013322433456778526,
0.10772771388292313,
0.22560030221939087,
-0.04926066845655441,
0.10539610683917999,
0.010349931195378304,
-0.0917128473520279,
-0.12419066578149796,
0.0820019468665123,
0.06811053305864334,
-0.06843967735767365,
-0.057139646261930466,
-0.08301170915365219,
0.024894079193472862,
0.026456383988261223,
0.12393764406442642,
-0.1923268884420395,
-0.09385557472705841,
0.03296308219432831,
-0.015331915579736233,
0.18771213293075562,
0.0687180906534195,
0.0017568119801580906,
-0.212357297539711,
0.02291429415345192,
0.04153561592102051,
0.01291774120181799,
0.07538163661956787,
-0.14875377714633942,
0.006451179273426533,
-0.06077742204070091,
0.05258521810173988,
0.12925302982330322,
0.21361970901489258,
-0.02900310605764389,
-0.006308563984930515,
-0.009327743202447891,
-0.03812142461538315,
0.3177509307861328,
-0.07697903364896774,
-0.09917067736387253,
0.11703149229288101,
0.06599997729063034,
0.1023620218038559,
0.1638205647468567,
-0.07256896048784256,
0.04413521662354469,
7.496456361064343e-35,
0.05694105476140976,
-0.0495075099170208,
0.047304995357990265,
-0.12666602432727814,
0.12174107879400253,
0.054539795964956284,
0.053744956851005554,
-0.04588083177804947,
0.09369726479053497,
-0.26122790575027466,
-0.08760391920804977
] |
https://github.com/huggingface/datasets/issues/5946 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ?? | > >
>
> @syngokhan did u solve it? I am desperate
refer to my earlier comment. you will find the solution. | ### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
| 22 | IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??
### Describe the bug
in <cell line: 1>:1 │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train │
│ │
│ 1534 │ │ inner_training_loop = find_executable_batch_size( │
│ 1535 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │
│ 1536 │ │ ) │
│ ❱ 1537 │ │ return inner_training_loop( │
│ 1538 │ │ │ args=args, │
│ 1539 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │
│ 1540 │ │ │ trial=trial, │
│ │
│ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop │
│ │
│ 1786 │ │ │ │ rng_to_sync = True │
│ 1787 │ │ │ │
│ 1788 │ │ │ step = -1 │
│ ❱ 1789 │ │ │ for step, inputs in enumerate(epoch_iterator): │
│ 1790 │ │ │ │ total_batched_samples += 1 │
│ 1791 │ │ │ │ if rng_to_sync: │
│ 1792 │ │ │ │ │ self._load_rng_state(resume_from_checkpoint) │
│ │
│ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ │
│ │
│ 374 │ │ dataloader_iter = super().__iter__() │
│ 375 │ │ # We iterate one batch ahead to check when we are at the end │
│ 376 │ │ try: │
│ ❱ 377 │ │ │ current_batch = next(dataloader_iter) │
│ 378 │ │ except StopIteration: │
│ 379 │ │ │ yield │
│ 380 │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ │
│ │
│ 630 │ │ │ if self._sampler_iter is None: │
│ 631 │ │ │ │ # TODO(https://github.com/pytorch/pytorch/issues/76750) │
│ 632 │ │ │ │ self._reset() # type: ignore[call-arg] │
│ ❱ 633 │ │ │ data = self._next_data() │
│ 634 │ │ │ self._num_yielded += 1 │
│ 635 │ │ │ if self._dataset_kind == _DatasetKind.Iterable and \ │
│ 636 │ │ │ │ │ self._IterableDataset_len_called is not None and \ │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data │
│ │
│ 674 │ │
│ 675 │ def _next_data(self): │
│ 676 │ │ index = self._next_index() # may raise StopIteration │
│ ❱ 677 │ │ data = self._dataset_fetcher.fetch(index) # may raise StopIteration │
│ 678 │ │ if self._pin_memory: │
│ 679 │ │ │ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) │
│ 680 │ │ return data │
│ │
│ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch │
│ │
│ 46 │ def fetch(self, possibly_batched_index): │
│ 47 │ │ if self.auto_collation: │
│ 48 │ │ │ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: │
│ ❱ 49 │ │ │ │ data = self.dataset.__getitems__(possibly_batched_index) │
│ 50 │ │ │ else: │
│ 51 │ │ │ │ data = [self.dataset[idx] for idx in possibly_batched_index] │
│ 52 │ │ else: │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ │
│ │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ ❱ 2782 │ │ batch = self.__getitem__(keys) │
│ 2783 │ │ n_examples = len(batch[next(iter(batch))]) │
│ 2784 │ │ return [{col: array[i] for col, array in batch.items()} for i in range(n_example │
│ 2785 │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ │
│ │
│ 2775 │ │
│ 2776 │ def __getitem__(self, key): # noqa: F811 │
│ 2777 │ │ """Can be used to index columns (by string names) or rows (by integer index or i │
│ ❱ 2778 │ │ return self._getitem(key) │
│ 2779 │ │
│ 2780 │ def __getitems__(self, keys: List) -> List: │
│ 2781 │ │ """Can be used to get a batch using a list of integers indices.""" │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem │
│ │
│ 2759 │ │ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ │
│ 2760 │ │ format_kwargs = format_kwargs if format_kwargs is not None else {} │
│ 2761 │ │ formatter = get_formatter(format_type, features=self._info.features, **format_kw │
│ ❱ 2762 │ │ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice │
│ 2763 │ │ formatted_output = format_table( │
│ 2764 │ │ │ pa_subtable, key, formatter=formatter, format_columns=format_columns, output │
│ 2765 │ │ ) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table │
│ │
│ 575 │ │ _check_valid_column_key(key, table.column_names) │
│ 576 │ else: │
│ 577 │ │ size = indices.num_rows if indices is not None else table.num_rows │
│ ❱ 578 │ │ _check_valid_index_key(key, size) │
│ 579 │ # Query the main table │
│ 580 │ if indices is None: │
│ 581 │ │ pa_subtable = _query_table(table, key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in │
│ _check_valid_index_key │
│ │
│ 528 │ │ │ _check_valid_index_key(min(key), size=size) │
│ 529 │ elif isinstance(key, Iterable): │
│ 530 │ │ if len(key) > 0: │
│ ❱ 531 │ │ │ _check_valid_index_key(int(max(key)), size=size) │
│ 532 │ │ │ _check_valid_index_key(int(min(key)), size=size) │
│ 533 │ else: │
│ 534 │ │ _raise_bad_key_type(key) │
│ │
│ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in │
│ _check_valid_index_key │
│ │
│ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: │
│ 519 │ if isinstance(key, int): │
│ 520 │ │ if (key < 0 and key + size < 0) or (key >= size): │
│ ❱ 521 │ │ │ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") │
│ 522 │ │ return │
│ 523 │ elif isinstance(key, slice): │
│ 524 │ │ pass
### Steps to reproduce the bug
``
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def print_trainable_parameters(model):
"""
Prints the number of trainable parameters in the model.
"""
trainable_params = 0
all_param = 0
for _, param in model.named_parameters():
all_param += param.numel()
if param.requires_grad:
trainable_params += param.numel()
print(
f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
)
MODEL_NAME = "tiiuae/falcon-7b"
bnb_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map = "auto",
trust_remote_code = True,
quantization_config = bnb_config
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
tokenizer.pad_token = tokenizer.eos_token
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
config = LoraConfig(
r = 16,
lora_alpha = 32,
target_modules = ["query_key_value"],
lora_dropout = 0.05,
bias = "none",
task_type = "CASUAL_LM"
)
model = get_peft_model(model,config)
print_trainable_parameters(model)
def generate_prompt(data_point):
return f"""
<human>: {data_point["question"]}
<assistant>: {data_point["answer"]}
""".strip()
def generate_and_tokenize_prompt(data_point):
full_prompt = generate_prompt(data_point)
tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None)
return dict({
"input_ids" : tokenized_full_prompt["input_ids"],
"attention_mask" : tokenized_full_prompt["attention_mask"]
})
data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False)
OUTPUT_DIR = "experiments"
trainings_args = transformers.TrainingArguments(
per_device_train_batch_size = 1,
gradient_accumulation_steps = 4,
num_train_epochs = 1,
learning_rate = 2e-4,
fp16 = True,
save_total_limit = 3,
logging_steps = 1,
output_dir = OUTPUT_DIR,
max_steps = 80,
optim = "paged_adamw_8bit",
lr_scheduler_type = "cosine",
warmup_ratio = 0.05,
#remove_unused_columns=True
)
trainer = transformers.Trainer(
model = model,
train_dataset = data,
args = trainings_args,
data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False),
)
model.config.use_cache = False
trainer.train()
IndexError: Invalid key: 32 is out of bounds for size 0
DataSet Format is like :
[{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ]
### Expected behavior
-
### Environment info
!pip install -q pip
!pip install -q bitsandbytes==0.39.0
!pip install -q torch==2.0.1
!pip install -q git+https://github.com/huggingface/transformers.git
!pip install -q git+https://github.com/huggingface/peft.git
!pip install -q git+https://github.com/huggingface/accelerate.git
!pip install -q datasets
!pip install -q loralib==0.1.1
!pip install -q einops==0.6.1
import json
import os
from pprint import pprint
import bitsandbytes as bnb
import pandas as pd
import torch
import torch.nn as nn
import transformers
from datasets import Dataset,load_dataset
from peft import (
LoraConfig,
PeftConfig,
PeftModel,
get_peft_model,
prepare_model_for_kbit_training
)
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
> >
>
> @syngokhan did u solve it? I am desperate
refer to my earlier comment. you will find the solution. | [
0.13105428218841553,
-0.037753596901893616,
0.026495639234781265,
-0.054582856595516205,
0.2981007397174835,
0.042323414236307144,
0.16524796187877655,
0.10388129949569702,
-0.025519227609038353,
-0.05570737272500992,
-0.14321133494377136,
-0.07407248765230179,
-0.1552603542804718,
0.002424326492473483,
-0.11720909923315048,
-0.03905058279633522,
0.02346089296042919,
-0.0463651679456234,
-0.00007886702951509506,
0.06318499147891998,
-0.1591310352087021,
0.03880925849080086,
0.009356058202683926,
-0.05276811122894287,
0.004239675588905811,
-0.1313450038433075,
-0.22460590302944183,
-0.003927688580006361,
-0.052815843373537064,
-0.14442086219787598,
0.05912062153220177,
-0.17193086445331573,
0.129477858543396,
0.2042556256055832,
0.000005160462933417875,
0.12175377458333969,
-0.0012922795722261071,
0.032319191843271255,
-0.096659354865551,
-0.062241364270448685,
0.17390158772468567,
-0.050111331045627594,
-0.018124807626008987,
-0.10937396436929703,
0.03418130800127983,
-0.1115477979183197,
-0.20416884124279022,
0.21497377753257751,
0.0864909291267395,
0.1489519476890564,
0.039212681353092194,
0.13467484712600708,
0.1678863912820816,
-0.20393496751785278,
0.008164217695593834,
-0.20143982768058777,
-0.0010288010817021132,
-0.05186673626303673,
-0.04499790817499161,
-0.1260398030281067,
-0.011313275434076786,
0.022362861782312393,
0.05067506805062294,
-0.011591438204050064,
-0.012466499581933022,
0.03218068554997444,
0.016455400735139847,
-0.13533298671245575,
-0.054885383695364,
0.08668198436498642,
0.04252205416560173,
0.1390853375196457,
-0.2363719344139099,
-0.02293923869729042,
0.01754896529018879,
-0.22712589800357819,
-0.13806283473968506,
0.11221230775117874,
-0.17027349770069122,
0.1121082454919815,
-0.01583440601825714,
0.10653917491436005,
0.04416480287909508,
0.06290066987276077,
-0.17891022562980652,
0.05318158119916916,
-0.18667666614055634,
0.024251747876405716,
0.19359366595745087,
-0.12441893666982651,
0.2569819390773773,
0.03049044869840145,
0.01637408696115017,
-0.06916944682598114,
-0.1401626169681549,
-0.13091526925563812,
-0.004801755305379629,
-0.26494571566581726,
-0.04558595269918442,
0.008546973578631878,
-0.08425729721784592,
-0.23468412458896637,
0.07193862646818161,
0.04309140890836716,
0.056063517928123474,
0.11794870346784592,
-0.08373533189296722,
0.10256803780794144,
-0.007934724912047386,
-0.003966629505157471,
0.07135357707738876,
-0.030415408313274384,
-0.4124196171760559,
-0.15755124390125275,
0.08081608265638351,
0.09999871999025345,
0.11479903012514114,
0.10824795067310333,
-0.003630975494161248,
0.04601961746811867,
0.027193447574973106,
0.15056493878364563,
-0.05385587364435196,
0.03364512324333191,
0.09367458522319794,
0.02781868167221546,
-0.04079541191458702,
0.04216339811682701,
-0.09256149083375931,
-0.03645246475934982,
-0.06071735918521881,
0.06912010163068771,
0.07910282164812088,
-0.17185190320014954,
0.06075853109359741,
-0.24511262774467468,
-0.10198144614696503,
-0.08690472692251205,
0.05053139850497246,
0.016860371455550194,
0.002387621207162738,
-0.17422503232955933,
-0.18393057584762573,
0.0030631304252892733,
-0.07295291870832443,
-0.01057290006428957,
0.159917414188385,
-0.01774994656443596,
0.010260338895022869,
-0.10334733873605728,
-0.2851044833660126,
0.02103925682604313,
-0.24171985685825348,
-0.05438486859202385,
0.04268983006477356,
0.0699494257569313,
0.005295050796121359,
-0.24809326231479645,
-0.10522681474685669,
-0.012743423692882061,
0.027404246851801872,
-0.011644141748547554,
0.058834467083215714,
-0.24611075222492218,
0.08653038740158081,
-0.04829656332731247,
0.18047478795051575,
0.07757432758808136,
0.016747668385505676,
0.14201796054840088,
0.07845868915319443,
0.11131276190280914,
-0.11405616998672485,
0.04304039850831032,
-0.1420738250017166,
0.11288471519947052,
-0.0741194561123848,
0.07462604343891144,
-0.29074159264564514,
0.010853906162083149,
0.015448594465851784,
-0.1742228865623474,
0.17979370057582855,
-0.03774736821651459,
0.056044138967990875,
-0.07677266001701355,
0.07184749841690063,
-0.03951317071914673,
-0.22175201773643494,
-0.10028008371591568,
0.08098296821117401,
-0.03655897453427315,
-0.015112889930605888,
-0.2008156180381775,
0.27662259340286255,
-0.10164879262447357,
-0.20466521382331848,
-0.13456860184669495,
-0.10677208751440048,
-0.14601854979991913,
-0.0017725336365401745,
0.09003365784883499,
-0.04496466740965843,
-0.0803012102842331,
0.043101586401462555,
-0.12648408114910126,
-0.09556920826435089,
0.12924359738826752,
-0.07937674224376678,
-0.07427902519702911,
-0.1636608988046646,
0.07785486429929733,
0.024616459384560585,
-0.08050674200057983,
-0.0909171998500824,
-0.1032051369547844,
0.07048507779836655,
-0.12274647504091263,
-0.007541715633124113,
-0.00919204019010067,
-0.009369510225951672,
0.01321978960186243,
0.09420335292816162,
-0.06050838157534599,
-0.01853358931839466,
-0.036778952926397324,
-0.16029289364814758,
0.006299788597971201,
-0.016627036035060883,
0.09703352302312851,
-0.12003553658723831,
-0.09959588199853897,
0.0845496878027916,
0.010973308235406876,
-0.08081991225481033,
-0.13980497419834137,
0.07030164450407028,
-0.16754285991191864,
0.025117304176092148,
-0.07822572439908981,
-0.1949184685945511,
0.12506359815597534,
0.10291646420955658,
0.027770964428782463,
0.04689262807369232,
0.13098952174186707,
0.05920586362481117,
0.1338716298341751,
-0.02314748428761959,
-0.1314602941274643,
0.0309144277125597,
0.0637568011879921,
-0.09391559660434723,
0.19864468276500702,
0.027705637738108635,
-0.04902486130595207,
-0.08754526078701019,
0.051918309181928635,
-0.09372019022703171,
-0.1807088404893875,
0.005119433160871267,
-0.12998421490192413,
-0.0548577718436718,
0.02821490541100502,
0.032883331179618835,
-0.045885536819696426,
0.008857312612235546,
-0.13552866876125336,
0.052299369126558304,
0.0838008001446724,
-0.0735207349061966,
-0.12144766747951508,
-0.013466755859553814,
-0.056559525430202484,
-0.10338067263364792,
-0.002828149823471904,
0.03811028227210045,
-0.04875184968113899,
0.021735474467277527,
-0.05086512118577957,
-0.020824545994400978,
0.06372261792421341,
-0.010048617608845234,
0.07369711995124817,
-0.011854367330670357,
0.0978352278470993,
0.0649239644408226,
-0.15158726274967194,
0.05092380568385124,
-0.024661917239427567,
0.1053914725780487,
0.010805509053170681,
0.03773881494998932,
-0.04695635661482811,
0.014232070185244083,
0.02748238295316696,
0.08376604318618774,
-0.05420520529150963,
0.02322443760931492,
0.1916826218366623,
0.00276577053591609,
-0.08078698813915253,
-0.008065881207585335,
0.08443741500377655,
0.15343718230724335,
-0.10956505686044693,
0.21530979871749878,
0.23965704441070557,
-0.022952312603592873,
-0.05212278291583061,
-0.02470574900507927,
-0.01995203085243702,
-0.07175131887197495,
0.059697795659303665,
0.1477436125278473,
-0.04245356097817421,
-0.04188515618443489,
-0.003473682329058647,
0.012986603192985058,
0.0419573150575161,
0.08448369801044464,
0.02806028351187706,
-0.06831678003072739,
0.10848868638277054,
0.04141748696565628,
0.018145740032196045,
-0.23097287118434906,
-0.02707611955702305,
-0.05197281390428543,
-0.15644054114818573,
0.0717245489358902,
0.17778554558753967,
-0.13886164128780365,
-0.0030169507954269648,
0.08739874511957169,
-0.12223152071237564,
-0.0034025670029222965,
-0.07772036641836166,
0.23995670676231384,
0.08669211715459824,
0.0002576350816525519,
-0.12971605360507965,
-0.1321335732936859,
-0.08442522585391998,
-0.039060141891241074,
-0.22095590829849243,
-0.02192826010286808,
0.09238775074481964,
-0.07902878522872925,
-0.05129941925406456,
0.05395663529634476,
0.10442185401916504,
0.016506703570485115,
-0.16197095811367035,
-0.014623850584030151,
0.0975930318236351,
-0.1245163306593895,
0.036869507282972336,
0.04446124657988548,
-0.0834459587931633,
0.22228236496448517,
0.0525321289896965,
0.19355309009552002,
0.14866389334201813,
-0.09637097269296646,
0.1633339673280716,
0.09030015766620636,
-0.07238782942295074,
-0.12011925131082535,
-0.20154841244220734,
0.02709103561937809,
0.15261991322040558,
-0.09868281334638596,
0.09128531813621521,
0.05838559940457344,
-0.09008216857910156,
-0.01857580989599228,
-0.19509287178516388,
-0.03708476200699806,
0.05555370822548866,
0.16521567106246948,
-0.027073286473751068,
-0.1195780411362648,
0.011380468495190144,
0.09814183413982391,
-0.030781498178839684,
0.0017911948962137103,
-0.05301910266280174,
-0.05435766652226448,
0.07281744480133057,
0.1470005214214325,
0.09689212590456009,
-0.197444885969162,
-0.05591846629977226,
-0.0645451545715332,
-0.07480069994926453,
0.23876842856407166,
0.23315072059631348,
-0.022963687777519226,
0.0008955975063145161,
0.018331751227378845,
0.2529433071613312,
-0.044173479080200195,
-0.12230576574802399,
-0.017184467986226082,
-0.0692635029554367,
-0.13417162001132965,
-0.1681467443704605,
0.038012828677892685,
0.07202952355146408,
0.14052502810955048,
0.11807625740766525,
0.08931664377450943,
0.10486534982919693,
0.14716055989265442,
0.04421886429190636,
0.0019781312439590693,
-0.2182348519563675,
-0.09775350987911224,
-0.2428290992975235,
-0.2043847143650055,
-0.11120163649320602,
0.19696718454360962,
0.11757788062095642,
0.08509412407875061,
-0.019354907795786858,
0.09308651834726334,
-0.1394900232553482,
0.04955383762717247,
0.10936484485864639,
-0.012702408246695995,
0.021708879619836807,
0.09888971596956253,
0.14477166533470154,
0.13666601479053497,
0.1469487100839615,
0.28618407249450684,
0.11272736638784409,
0.25808000564575195,
0.07653089612722397,
-0.16696782410144806,
-0.15314821898937225,
0.20620860159397125,
-0.0769164115190506,
0.020854024216532707,
-0.11810040473937988,
0.04363245889544487,
-0.004728355444967747,
0.07756204903125763,
0.08683682978153229,
-0.1814042627811432,
-0.34310224652290344,
-0.09809988737106323,
-0.1578471064567566,
0.08548107743263245,
0.17153334617614746,
0.17189602553844452,
-0.11657470464706421,
0.14146505296230316,
0.09492412954568863,
0.0488421656191349,
-0.016479484736919403,
-0.043286874890327454,
0.10428985953330994,
0.12390675395727158,
0.030301716178655624,
0.09623347967863083,
-0.03226848691701889,
0.1727515608072281,
0.12674736976623535,
-0.1402052640914917,
0.033562447875738144,
-0.02104455605149269,
-0.07850285619497299,
0.012647941708564758,
-0.14167121052742004,
0.19977480173110962,
-0.10590258240699768,
-0.1255972981452942,
-0.045412175357341766,
0.020550567656755447,
0.051588550209999084,
0.15508593618869781,
-0.10633447766304016,
-0.07121425122022629,
0.039797086268663406,
0.11819674074649811,
0.02481215074658394,
-0.0019469864200800657,
0.024878615513443947,
0.1362820267677307,
-0.08609087765216827,
-0.009153814055025578,
-0.005795231554657221,
0.08974773436784744,
-0.10074056684970856,
-0.1316363662481308,
0.11769657582044601,
0.005793713498860598,
0.10386644303798676,
0.03568531200289726,
-0.11784505844116211,
-0.049515336751937866,
-0.054636240005493164,
-0.0027152535039931536,
-0.08885505050420761,
0.11544114351272583,
-0.03750484436750412,
-0.047750074416399,
-0.12677793204784393,
-0.07741469144821167,
0.008619669824838638,
-0.14992080628871918,
-0.04549004137516022,
-0.020911775529384613,
-0.024454906582832336,
0.0010589784942567348,
-0.031672362238168716,
-0.10686155408620834,
0.05393361300230026,
0.05966456979513168,
0.06561735272407532,
-0.013170427642762661,
-0.002127857180312276,
-0.10940805822610855,
0.058420147746801376,
0.017653927206993103,
0.08757883310317993,
0.3308074474334717,
0.14610743522644043,
0.0121983103454113,
0.27555081248283386,
0.22126935422420502,
-0.06693091243505478,
-0.15769968926906586,
0.2026980221271515,
0.12347394973039627,
0.005934844724833965,
-0.018689624965190887,
-0.060745127499103546,
0.07931248843669891,
-0.03477491810917854,
0.01710125058889389,
0.14671063423156738,
0.04721592366695404,
-0.003284304868429899,
-0.09960094839334488,
-0.16250711679458618,
-0.045623213052749634,
-0.0879531055688858,
-0.016123350709676743,
0.0934789702296257,
0.008215628564357758,
0.021152278408408165,
0.10135076940059662,
-2.4975217131878535e-32,
-0.03571617603302002,
-0.12755723297595978,
-0.046001262962818146,
-0.05955183878540993,
-0.19818849861621857,
0.16384506225585938,
-0.03796422481536865,
0.007251346949487925,
-0.03182346373796463,
-0.03896242752671242,
-0.18747951090335846,
-0.08909829705953598,
0.017232190817594528,
-0.06222858279943466,
-0.030640779063105583,
0.11061321943998337,
-0.020426925271749496,
0.2341415286064148,
-0.024985898286104202,
0.07054993510246277,
0.04384813457727432,
0.23948122560977936,
0.089397132396698,
0.10173627734184265,
-0.12033054232597351,
0.13468383252620697,
-0.09815485030412674,
0.014287961646914482,
0.07062707096338272,
0.014097781851887703,
-0.088797926902771,
0.12768729031085968,
-0.030506324023008347,
-0.2640487849712372,
-0.030207660049200058,
-0.025163499638438225,
-0.1554151177406311,
-0.1793159544467926,
-0.11845893412828445,
0.16719351708889008,
0.1866135448217392,
0.027545826509594917,
0.030574094504117966,
-0.22963352501392365,
-0.09397288411855698,
0.15745121240615845,
0.09641837328672409,
0.01797625795006752,
-0.01572415791451931,
-0.14009331166744232,
0.06258010864257812,
0.17278847098350525,
-0.02695399336516857,
0.06260596960783005,
0.024855151772499084,
-0.03425612300634384,
0.005471934098750353,
0.04106391221284866,
-0.053560979664325714,
-0.15095920860767365,
0.26505082845687866,
-0.015300165861845016,
0.03811433166265488,
0.016869280487298965,
0.07710550725460052,
0.14413711428642273,
0.17803125083446503,
0.12070054560899734,
0.08503536134958267,
-0.04931788146495819,
-0.049964647740125656,
-0.09037791937589645,
-0.07779563963413239,
-0.06868582218885422,
-0.08418720215559006,
0.1532275676727295,
-0.07523352652788162,
0.01801309548318386,
0.04557616636157036,
-0.02889840491116047,
0.09507914632558823,
0.22391819953918457,
0.04817726090550423,
-0.005188578274101019,
0.049455106258392334,
0.08768942207098007,
0.08399395644664764,
0.028700407594442368,
-0.12375986576080322,
0.0916876494884491,
-0.024349099025130272,
0.0631575807929039,
-0.15211884677410126,
-0.0005747919785790145,
0.10422048717737198,
0.06453171372413635,
0.15920889377593994,
0.03482535108923912,
-0.1659635305404663,
-0.05824043229222298,
-0.029047967866063118,
0.03690365329384804,
0.026733634993433952,
-0.01263818796724081,
0.27485713362693787,
0.04019622132182121,
-0.1017831414937973,
0.061539869755506516,
-0.05605647712945938,
-0.09994854032993317,
0.018420618027448654,
-0.15135221183300018,
0.17571189999580383,
0.21866194903850555,
0.1412559449672699,
-0.16728748381137848,
0.0900328978896141,
0.05467531085014343,
0.04979174956679344,
0.09541415423154831,
0.06853046268224716,
0.04436372593045235,
-0.12729512155056,
-0.2386453002691269,
-0.0797944962978363,
-0.026530517265200615,
-0.16184812784194946,
0.049761418253183365,
-0.13484913110733032,
-0.0729704424738884,
-0.04848327860236168,
0.22197020053863525,
7.286880645551719e-7,
-0.2729494869709015,
0.2521384060382843,
0.17896735668182373,
-0.13138414919376373,
-0.2451799362897873,
0.10516094416379929,
-0.06053457781672478,
0.00028320177807472646,
-0.16994419693946838,
0.1804242879152298,
0.22638475894927979,
-0.05763550475239754,
0.017276709899306297,
0.036126356571912766,
0.13672451674938202,
-0.06581372767686844,
-0.09257720410823822,
0.15638001263141632,
-0.018984846770763397,
0.009229674935340881,
-0.013322433456778526,
0.10772771388292313,
0.22560030221939087,
-0.04926066845655441,
0.10539610683917999,
0.010349931195378304,
-0.0917128473520279,
-0.12419066578149796,
0.0820019468665123,
0.06811053305864334,
-0.06843967735767365,
-0.057139646261930466,
-0.08301170915365219,
0.024894079193472862,
0.026456383988261223,
0.12393764406442642,
-0.1923268884420395,
-0.09385557472705841,
0.03296308219432831,
-0.015331915579736233,
0.18771213293075562,
0.0687180906534195,
0.0017568119801580906,
-0.212357297539711,
0.02291429415345192,
0.04153561592102051,
0.01291774120181799,
0.07538163661956787,
-0.14875377714633942,
0.006451179273426533,
-0.06077742204070091,
0.05258521810173988,
0.12925302982330322,
0.21361970901489258,
-0.02900310605764389,
-0.006308563984930515,
-0.009327743202447891,
-0.03812142461538315,
0.3177509307861328,
-0.07697903364896774,
-0.09917067736387253,
0.11703149229288101,
0.06599997729063034,
0.1023620218038559,
0.1638205647468567,
-0.07256896048784256,
0.04413521662354469,
7.496456361064343e-35,
0.05694105476140976,
-0.0495075099170208,
0.047304995357990265,
-0.12666602432727814,
0.12174107879400253,
0.054539795964956284,
0.053744956851005554,
-0.04588083177804947,
0.09369726479053497,
-0.26122790575027466,
-0.08760391920804977
] |
https://github.com/huggingface/datasets/issues/5945 | Failing to upload dataset to the hub | Hi ! Feel free to re-run your code later, it will resume automatically where you left | ### Describe the bug
Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work.
From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable.
Please help.
I'm trying to upload the dataset for almost a week.
Thanks
### Steps to reproduce the bug
not relevant
### Expected behavior
Be able to upload thedataset
### Environment info
python: 3.9 | 16 | Failing to upload dataset to the hub
### Describe the bug
Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work.
From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable.
Please help.
I'm trying to upload the dataset for almost a week.
Thanks
### Steps to reproduce the bug
not relevant
### Expected behavior
Be able to upload thedataset
### Environment info
python: 3.9
Hi ! Feel free to re-run your code later, it will resume automatically where you left | [
-0.023518551141023636,
-0.08773443847894669,
-0.048410698771476746,
-0.21435129642486572,
0.08323656022548676,
0.04341689869761467,
-0.0010077860206365585,
-0.025181174278259277,
-0.09325410425662994,
0.1450537145137787,
0.16096246242523193,
0.1110038161277771,
-0.10921178758144379,
0.045404937118291855,
-0.09411248564720154,
0.1229563057422638,
0.008285519666969776,
-0.005190515425056219,
0.14101560413837433,
-0.1358470469713211,
-0.07097475975751877,
0.12841668725013733,
0.0911547839641571,
-0.042747970670461655,
-0.22139741480350494,
-0.1912248432636261,
-0.07865453511476517,
0.14107641577720642,
-0.23611249029636383,
-0.11133631318807602,
0.025936881080269814,
0.09606631845235825,
-0.025893185287714005,
0.24020251631736755,
0.000004204167908028467,
-0.053932011127471924,
0.09801845252513885,
-0.022648971527814865,
-0.014875715598464012,
-0.11083619296550751,
-0.008922029286623001,
-0.16455984115600586,
-0.027488527819514275,
-0.033080216497182846,
0.10868001729249954,
-0.007670581806451082,
0.0026604272425174713,
0.09883328527212143,
0.17966464161872864,
0.09246334433555603,
-0.02263662777841091,
0.17107301950454712,
0.05261389911174774,
-0.05069749802350998,
0.11223743110895157,
0.08454117923974991,
0.05910069867968559,
0.1130279004573822,
-0.021257638931274414,
-0.07308568805456161,
-0.07473766803741455,
-0.1097085028886795,
0.03651940077543259,
-0.01288461685180664,
0.006079177837818861,
0.019828662276268005,
-0.2645612955093384,
-0.24465179443359375,
0.04006664827466011,
0.17144304513931274,
-0.0488426499068737,
-0.08259812742471695,
-0.14614540338516235,
-0.03801331669092178,
-0.03841681033372879,
-0.004252250771969557,
0.05767977610230446,
-0.0018212910508736968,
-0.23774942755699158,
0.10030002892017365,
-0.08134475350379944,
-0.07148346304893494,
-0.026488933712244034,
-0.017065787687897682,
-0.0170929916203022,
0.132224440574646,
-0.1425333172082901,
-0.050490569323301315,
-0.07920031994581223,
-0.02725856564939022,
0.09866736829280853,
-0.05986292287707329,
-0.07383901625871658,
-0.12362503260374069,
-0.17710565030574799,
0.00717389490455389,
0.05038170516490936,
-0.0665116012096405,
-0.06467266380786896,
0.025052528828382492,
-0.24347221851348877,
-0.09503476321697235,
-0.12949799001216888,
0.06444431096315384,
0.030528241768479347,
-0.09373892098665237,
-0.06918523460626602,
-0.13142791390419006,
0.1328437477350235,
0.12368830293416977,
-0.10318052023649216,
0.10104627162218094,
-0.15387527644634247,
0.09603011608123779,
0.19120590388774872,
-0.036421868950128555,
0.24992115795612335,
0.05060938000679016,
0.053101297467947006,
0.3040350675582886,
-0.01187072228640318,
0.18745842576026917,
-0.05807642266154289,
0.03731813654303551,
0.1073543056845665,
0.08945655077695847,
-0.12753227353096008,
0.10618837177753448,
-0.11687988042831421,
0.21153205633163452,
-0.04832238331437111,
0.062092375010252,
-0.046508919447660446,
-0.20241156220436096,
0.27659323811531067,
-0.18240635097026825,
-0.01902798004448414,
-0.06811464577913284,
0.2566491663455963,
-0.07605011016130447,
-0.03521404415369034,
-0.178305983543396,
-0.09779586642980576,
0.07730863988399506,
0.053562577813863754,
0.13971395790576935,
0.027752313762903214,
-0.0710003450512886,
-0.011012287810444832,
-0.1259823590517044,
-0.15490691363811493,
0.09927251189947128,
-0.06415463238954544,
0.020041679963469505,
-0.036781471222639084,
0.08250466734170914,
-0.0954272523522377,
0.010966641828417778,
-0.1806744933128357,
-0.02550560049712658,
0.09835891425609589,
-0.017661014571785927,
-0.004754888825118542,
-0.027641545981168747,
0.16040457785129547,
0.01829305663704872,
0.08039192855358124,
0.14298269152641296,
0.05503006651997566,
0.22477467358112335,
0.11051536351442337,
0.10633622854948044,
0.057218413800001144,
0.07161924242973328,
-0.1085747703909874,
0.15280325710773468,
-0.16342352330684662,
-0.18923555314540863,
-0.3266308307647705,
0.06395800411701202,
-0.10700638592243195,
-0.147825226187706,
-0.06592223048210144,
-0.21431195735931396,
0.2797486186027527,
-0.08564301580190659,
0.17271117866039276,
0.1030196100473404,
-0.04045740142464638,
0.12340810149908066,
-0.01376108918339014,
0.03876534849405289,
-0.11954981088638306,
-0.01332447025924921,
0.08609744906425476,
-0.20403677225112915,
-0.00808427669107914,
0.20204566419124603,
0.15766848623752594,
-0.1667260378599167,
0.1532534956932068,
-0.010598722845315933,
0.09276575595140457,
-0.054289810359478,
0.048424478620290756,
-0.13596400618553162,
-0.018224399536848068,
0.042925234884023666,
0.2049395889043808,
-0.12993356585502625,
-0.17982347309589386,
0.1508340686559677,
-0.14814335107803345,
0.1417485922574997,
-0.1451711803674698,
-0.009258664213120937,
-0.02566087432205677,
-0.0609353668987751,
-0.1497832089662552,
0.08317012339830399,
-0.04086260497570038,
0.19668830931186676,
0.04485776647925377,
-0.05553334951400757,
-0.10522304475307465,
0.11866230517625809,
0.05801701545715332,
-0.11522115767002106,
0.19688940048217773,
-0.006954701151698828,
-0.072667196393013,
-0.06046958267688751,
0.0515851192176342,
-0.10317327827215195,
0.02453138679265976,
0.07685726135969162,
0.03480786085128784,
-0.14812566339969635,
0.04028632491827011,
-0.024315932765603065,
-0.0493711493909359,
0.003757266327738762,
-0.15211433172225952,
-0.17939622700214386,
-0.10950937867164612,
-0.11850542575120926,
0.06008123233914375,
0.25349098443984985,
-0.1014133095741272,
-0.09816151857376099,
0.13207851350307465,
0.10116232186555862,
0.008049936033785343,
0.20336762070655823,
0.018994318321347237,
-0.0998038575053215,
0.05382484197616577,
0.024487709626555443,
-0.16737578809261322,
-0.06586438417434692,
0.25454482436180115,
-0.011990184895694256,
0.0011400311486795545,
0.04467855766415596,
-0.018476130440831184,
-0.13419926166534424,
0.017963308840990067,
0.061705656349658966,
-0.10681214928627014,
-0.04235897585749626,
-0.07932735234498978,
-0.11529558151960373,
-0.12993749976158142,
-0.10634574294090271,
-0.08767929673194885,
-0.044219374656677246,
-0.03958439826965332,
0.03116101212799549,
-0.022450169548392296,
0.02110469713807106,
-0.0744326040148735,
0.05880426988005638,
0.17213013768196106,
-0.1216103658080101,
0.0791337713599205,
0.04531298577785492,
-0.018882885575294495,
0.18728934228420258,
0.039463818073272705,
-0.06700148433446884,
-0.11163856834173203,
-0.08111834526062012,
0.17707408964633942,
0.04915273189544678,
-0.12334226071834564,
-0.0520542748272419,
0.06649281829595566,
-0.1577821969985962,
0.024562900885939598,
-0.013106762431561947,
-0.12117870151996613,
0.0577576644718647,
0.15840299427509308,
-0.02833729237318039,
-0.10872561484575272,
0.1220843493938446,
0.19462820887565613,
0.22683043777942657,
-0.04609427973628044,
-0.04783029109239578,
0.10266073793172836,
-0.06743446737527847,
0.11256968975067139,
0.06877423822879791,
0.07495281845331192,
0.002864687005057931,
-0.09694666415452957,
-0.16523240506649017,
0.07061246037483215,
0.05520183965563774,
-0.0261370986700058,
0.10736284404993057,
-0.028084099292755127,
0.001824083155952394,
0.06206870079040527,
0.15606872737407684,
-0.2923721373081207,
-0.09186629205942154,
-0.07556967437267303,
-0.015612341463565826,
-0.04773892089724541,
0.013693880289793015,
-0.1464531123638153,
-0.06887300312519073,
0.010031578131020069,
-0.14657197892665863,
-0.09711994975805283,
-0.007953476160764694,
0.20608389377593994,
-0.03212343156337738,
0.050851162523031235,
-0.05548538267612457,
-0.045062027871608734,
-0.07753944396972656,
0.13154710829257965,
-0.011329828761518002,
-0.07535753399133682,
-0.09557615965604782,
0.03671012446284294,
0.05150356516242027,
-0.1365610659122467,
0.13473257422447205,
-0.05974365770816803,
-0.07399585098028183,
-0.12237978726625443,
0.03802110254764557,
-0.20625436305999756,
0.37799862027168274,
-0.1013960987329483,
0.015640830621123314,
0.10137840360403061,
-0.045450545847415924,
0.009837358258664608,
0.07687589526176453,
-0.11242436617612839,
0.27879753708839417,
0.04178951680660248,
-0.13370785117149353,
-0.2069813311100006,
-0.21103288233280182,
0.044631604105234146,
-0.08278923481702805,
-0.22078168392181396,
0.03446244075894356,
0.0632353276014328,
-0.07623002678155899,
0.07799465954303741,
-0.09729041904211044,
0.17174740135669708,
-0.058684684336185455,
-0.046004991978406906,
0.03241059184074402,
-0.058782223612070084,
0.14918838441371918,
0.12958167493343353,
0.016558073461055756,
-0.102086640894413,
0.02686351351439953,
0.020139401778578758,
0.0394057035446167,
0.05302309989929199,
-0.043798819184303284,
-0.049412332475185394,
-0.12845739722251892,
-0.058037444949150085,
-0.12988987565040588,
0.4260759651660919,
-0.01190885342657566,
0.09477484226226807,
0.010112249292433262,
0.091210275888443,
0.02591715194284916,
-0.1868208348751068,
0.27584803104400635,
0.017961494624614716,
0.08465246111154556,
-0.07511525601148605,
-0.07331578433513641,
-0.04364354908466339,
0.006723656319081783,
0.040230199694633484,
0.2502356171607971,
-0.04322179779410362,
0.1522764414548874,
-0.08194822072982788,
0.017119530588388443,
0.07007212936878204,
0.07961665838956833,
-0.09085723757743835,
-0.30954477190971375,
-0.297882080078125,
0.01084810309112072,
0.18283383548259735,
0.18261636793613434,
0.0578954815864563,
-0.024719998240470886,
0.21236644685268402,
-0.02954982779920101,
0.12382404506206512,
-0.15559858083724976,
0.0743749663233757,
0.04167391359806061,
0.16196484863758087,
0.026604915037751198,
0.09662390500307083,
-0.025370726361870766,
0.2791385352611542,
0.03504021093249321,
0.01662236824631691,
0.14177873730659485,
-0.07089174538850784,
0.04644150286912918,
0.1192464753985405,
0.049245987087488174,
0.09973873198032379,
-0.1935274302959442,
-0.12634968757629395,
-0.06911405920982361,
0.1402132511138916,
0.08882206678390503,
-0.12469502538442612,
-0.03969278559088707,
0.16122756898403168,
-0.279119074344635,
0.003197994315996766,
0.052179496735334396,
0.13560937345027924,
-0.019597044214606285,
0.16242367029190063,
0.1902126967906952,
-0.25086644291877747,
-0.029490316286683083,
-0.018434667959809303,
0.06570275872945786,
-0.06943947821855545,
0.017807668074965477,
0.2560185492038727,
-0.19787897169589996,
0.10379580408334732,
0.085384301841259,
-0.04079507291316986,
0.14214706420898438,
-0.05958221107721329,
-0.20644345879554749,
0.09872991591691971,
-0.09524140506982803,
0.17918936908245087,
-0.023294512182474136,
0.12402012944221497,
-0.05278334021568298,
0.05749004706740379,
-0.03771958500146866,
-0.09942267090082169,
-0.13789525628089905,
0.04522443190217018,
0.15541768074035645,
0.10804127901792526,
-0.032806407660245895,
-0.0027748197317123413,
-0.04796481877565384,
-0.008453873917460442,
-0.1176798939704895,
-0.06748077273368835,
0.1817476451396942,
0.13678714632987976,
0.0021146428771317005,
-0.03857071325182915,
0.04570591077208519,
-0.1418260782957077,
0.1172153502702713,
0.047208212316036224,
-0.24090354144573212,
0.06641852855682373,
-0.15673735737800598,
0.02162211202085018,
-0.1795039176940918,
0.07401580363512039,
-0.12105056643486023,
0.004453946836292744,
-0.03248877078294754,
0.059481970965862274,
0.004598683677613735,
-0.07629992067813873,
-0.024998970329761505,
0.03654191642999649,
-0.09880845248699188,
-0.08856041729450226,
0.1126219853758812,
-0.019175395369529724,
0.04931436479091644,
-0.007392469793558121,
0.048697054386138916,
0.2031034380197525,
-0.024692488834261894,
0.02979838103055954,
0.08345143496990204,
0.05456950142979622,
0.05879848077893257,
0.21018743515014648,
-0.03572800010442734,
0.059609778225421906,
-0.0032608830370008945,
0.17502520978450775,
0.009389174170792103,
-0.07700806111097336,
0.13397930562496185,
0.03682125732302666,
0.016141777858138084,
0.023709174245595932,
-0.02055644989013672,
-0.0777505487203598,
-0.04966325685381889,
-0.19406422972679138,
0.1923661231994629,
0.143887460231781,
0.167055144906044,
0.15183338522911072,
-0.08020436763763428,
-0.040881454944610596,
-0.10741377621889114,
0.004303582012653351,
-0.051952801644802094,
-0.09891194105148315,
0.12875600159168243,
0.04077543690800667,
-2.3259355374822935e-32,
-0.0005104496376588941,
-0.19542595744132996,
-0.09440267831087112,
-0.0658707246184349,
-0.25389111042022705,
-0.09572345018386841,
-0.11383435875177383,
-0.22011466324329376,
0.06902127712965012,
-0.06428457796573639,
0.06382472068071365,
0.10702775418758392,
0.011758732609450817,
0.1869657188653946,
0.19334284961223602,
-0.07844851911067963,
0.041971925646066666,
0.04638635739684105,
-0.09687259048223495,
0.1443982869386673,
0.08584453910589218,
-0.0800303965806961,
-0.30799025297164917,
0.32114067673683167,
0.0631941705942154,
-0.011015387251973152,
-0.14716115593910217,
-0.02237171307206154,
0.10280813276767731,
-0.040813736617565155,
-0.007767697796225548,
0.22682903707027435,
-0.06426512449979782,
-0.12322875112295151,
-0.10296790301799774,
-0.02154449187219143,
-0.07146894931793213,
0.0472426563501358,
-0.04539331793785095,
-0.037308212369680405,
-0.044801730662584305,
0.061225321143865585,
0.15806834399700165,
0.027521129697561264,
-0.12126888334751129,
0.042563293129205704,
0.20256203413009644,
0.10492805391550064,
-0.17452211678028107,
0.03689226135611534,
0.004632133524864912,
0.050253819674253464,
-0.06684553623199463,
0.1064869835972786,
0.03777995705604553,
-0.06334463506937027,
-0.021770253777503967,
0.2463020384311676,
-0.023464156314730644,
-0.13952261209487915,
-0.14972944557666779,
-0.19527365267276764,
0.03104275092482567,
-0.09882906079292297,
-0.06552988290786743,
-0.09074651449918747,
0.38127461075782776,
-0.03229575604200363,
0.10518688708543777,
0.005179249215871096,
-0.04033588245511055,
0.22661831974983215,
-0.05158053711056709,
-0.029198193922638893,
-0.045203421264886856,
0.07651335000991821,
0.008718397468328476,
-0.11764077842235565,
0.0015914983814582229,
-0.15801145136356354,
0.0993858054280281,
-0.14603038132190704,
0.05514783039689064,
-0.029372399672865868,
-0.032315753400325775,
0.04272349923849106,
-0.01784026250243187,
-0.08439913392066956,
-0.14965534210205078,
-0.09929869323968887,
0.09186460822820663,
0.0627700611948967,
-0.03439556807279587,
-0.008691766299307346,
-0.052712492644786835,
-0.08448898792266846,
-0.09176826477050781,
0.11569531261920929,
-0.002229048404842615,
-0.06269794702529907,
-0.15125378966331482,
-0.1548939198255539,
-0.08895525336265564,
0.04599212482571602,
0.1824580281972885,
-0.038818784058094025,
0.0168708935379982,
0.24437037110328674,
0.005473703611642122,
-0.0545242540538311,
0.059027526527643204,
0.06860669702291489,
0.008331822231411934,
0.14683333039283752,
0.22365273535251617,
0.05750492960214615,
-0.005002295598387718,
-0.013045614585280418,
0.16857700049877167,
0.005835715215653181,
0.03711793199181557,
-0.08900775760412216,
-0.11295802891254425,
0.036488503217697144,
0.042604077607393265,
-0.051024653017520905,
-0.16301225125789642,
0.07418844103813171,
0.011990628205239773,
-0.11433884501457214,
-0.024220464751124382,
-0.20030736923217773,
7.191640634118812e-7,
-0.21970631182193756,
0.20453579723834991,
-0.07824738323688507,
-0.03488260880112648,
0.0059129116125404835,
-0.07903445512056351,
-0.39136645197868347,
0.25246161222457886,
-0.07127240300178528,
0.07551275193691254,
0.2006511390209198,
0.005186719354242086,
0.06439846009016037,
0.07441534847021103,
-0.07670684903860092,
-0.06763172894716263,
-0.26123061776161194,
0.15741194784641266,
-0.10517392307519913,
0.06099235266447067,
0.12562446296215057,
-0.011227541603147984,
0.14763298630714417,
-0.052165187895298004,
0.21638303995132446,
-0.029283037409186363,
0.03917369991540909,
0.029029441997408867,
-0.026790587231516838,
-0.19462263584136963,
-0.02813420630991459,
-0.003062007948756218,
-0.07342176139354706,
0.220364049077034,
-0.0015511498786509037,
0.010899793356657028,
-0.08046095818281174,
-0.1473185271024704,
0.05296611413359642,
-0.1790740042924881,
-0.22914333641529083,
0.1461857259273529,
0.1516846865415573,
-0.07387681305408478,
0.05019304156303406,
-0.0595969595015049,
-0.08185239136219025,
0.2750987112522125,
0.04792732745409012,
-0.01582367531955242,
0.12930089235305786,
0.22647923231124878,
0.010447279550135136,
-0.008414633572101593,
-0.057587381452322006,
0.055477481335401535,
0.015976829454302788,
-0.20172148942947388,
0.10983540862798691,
0.08807927370071411,
-0.06418855488300323,
-0.16921953856945038,
0.07402273267507553,
0.003871368244290352,
0.01596713997423649,
-0.0032385389786213636,
-0.14378494024276733,
8.37650845911231e-35,
0.06465937197208405,
-0.003110155463218689,
0.0563698373734951,
-0.17854051291942596,
-0.17375816404819489,
-0.06964979320764542,
0.13451799750328064,
0.03211145102977753,
0.19253884255886078,
0.0006985596846789122,
-0.05266324803233147
] |
https://github.com/huggingface/datasets/issues/5945 | Failing to upload dataset to the hub | Alternatively you can save your dataset in parquet files locally and upload them to the hub manually
```python
from tqdm import tqdm
num_shards = 60
for index in tqdm(range(num_shards)):
ds.shard(num_shards=num_shards, index=index, contiguous=True).to_parquet(f"{index:05d}.parquet")
```` | ### Describe the bug
Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work.
From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable.
Please help.
I'm trying to upload the dataset for almost a week.
Thanks
### Steps to reproduce the bug
not relevant
### Expected behavior
Be able to upload thedataset
### Environment info
python: 3.9 | 33 | Failing to upload dataset to the hub
### Describe the bug
Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work.
From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable.
Please help.
I'm trying to upload the dataset for almost a week.
Thanks
### Steps to reproduce the bug
not relevant
### Expected behavior
Be able to upload thedataset
### Environment info
python: 3.9
Alternatively you can save your dataset in parquet files locally and upload them to the hub manually
```python
from tqdm import tqdm
num_shards = 60
for index in tqdm(range(num_shards)):
ds.shard(num_shards=num_shards, index=index, contiguous=True).to_parquet(f"{index:05d}.parquet")
```` | [
-0.00444961991161108,
-0.06404434889554977,
-0.06454663723707199,
-0.18671339750289917,
0.09388736635446548,
-0.014929132536053658,
0.03051714599132538,
0.0076977224089205265,
-0.13746865093708038,
0.15589746832847595,
0.11183016002178192,
0.07009835541248322,
-0.09956862777471542,
0.08078854531049728,
-0.09023064374923706,
0.10765672475099564,
-0.02243729680776596,
-0.01081126183271408,
0.06566315144300461,
-0.17600171267986298,
-0.08528531342744827,
0.10859470069408417,
0.12672044336795807,
-0.06325662136077881,
-0.24149535596370697,
-0.17155714333057404,
-0.10475707799196243,
0.11086630821228027,
-0.1577107161283493,
-0.13918814063072205,
0.0017986076418310404,
0.10263202339410782,
-0.09002822637557983,
0.2097504585981369,
0.000004111286671104608,
-0.0382508784532547,
0.12256675213575363,
-0.03796256333589554,
0.004641519393771887,
-0.06857230514287949,
-0.019211627542972565,
-0.1775713711977005,
-0.0008361949003301561,
-0.053461749106645584,
0.10484593361616135,
0.04923956096172333,
-0.018603306263685226,
0.13963547348976135,
0.21662674844264984,
0.06497909128665924,
-0.029285389930009842,
0.20289526879787445,
0.09918082505464554,
-0.03057154268026352,
0.06618651747703552,
0.008461418561637402,
0.015656014904379845,
0.06558587402105331,
-0.01483894232660532,
-0.06352204084396362,
-0.06245455518364906,
-0.11270023137331009,
0.03004341945052147,
0.017279040068387985,
0.04273124784231186,
0.030300168320536613,
-0.18848015367984772,
-0.2666430175304413,
0.04272805154323578,
0.1864243894815445,
-0.08226601779460907,
-0.09171285480260849,
-0.140681654214859,
-0.03674231097102165,
-0.03993954136967659,
-0.03394070640206337,
0.05510084331035614,
-0.005780522711575031,
-0.22570066154003143,
0.12865526974201202,
-0.04368901625275612,
-0.08473807573318481,
0.002679909346625209,
-0.002501404145732522,
-0.102968730032444,
0.08002989739179611,
-0.1219891905784607,
-0.06319933384656906,
-0.1245625838637352,
-0.04832017421722412,
0.09882063418626785,
-0.03404649719595909,
-0.06594648957252502,
-0.11530539393424988,
-0.21772046387195587,
0.0002470952458679676,
0.08286349475383759,
-0.08686694502830505,
-0.056850191205739975,
-0.001608311547897756,
-0.252016544342041,
-0.06280627846717834,
-0.06184739992022514,
0.030397603288292885,
-0.0077204653061926365,
-0.0785498172044754,
-0.022283272817730904,
-0.15028369426727295,
0.10975326597690582,
0.08191678673028946,
-0.16424605250358582,
0.1378823071718216,
-0.14446097612380981,
0.10908287018537521,
0.23758192360401154,
-0.09100199490785599,
0.2685348093509674,
0.04931691661477089,
0.04869620501995087,
0.2958050072193146,
0.02805507183074951,
0.21234771609306335,
-0.07518424093723297,
0.05977369472384453,
0.17208687961101532,
0.10725053399801254,
-0.16816473007202148,
0.09621382504701614,
-0.11633556336164474,
0.1573444902896881,
-0.0569189079105854,
0.03208250179886818,
0.015379238873720169,
-0.1696164757013321,
0.2499643713235855,
-0.16094234585762024,
-0.020122960209846497,
-0.07186625152826309,
0.2930142879486084,
-0.07958196848630905,
-0.08032942563295364,
-0.14547285437583923,
-0.05965844541788101,
0.10942305624485016,
0.024187184870243073,
0.14976051449775696,
0.02987712435424328,
-0.08134771138429642,
0.02939506247639656,
-0.14649654924869537,
-0.14184069633483887,
0.08486698567867279,
-0.06115749105811119,
0.037782493978738785,
-0.07096173614263535,
0.062186408787965775,
-0.045465148985385895,
0.013305485248565674,
-0.14955374598503113,
-0.03135000541806221,
0.07738518714904785,
-0.002770841121673584,
-0.03241286426782608,
-0.03930806368589401,
0.09458225965499878,
0.03901306539773941,
0.07476150244474411,
0.15089917182922363,
0.010052300989627838,
0.2508789598941803,
0.10043098032474518,
0.10907775163650513,
0.0564802810549736,
0.05278094857931137,
-0.07992712408304214,
0.21797962486743927,
-0.16335387527942657,
-0.15132088959217072,
-0.34663164615631104,
0.07407332211732864,
-0.08776934444904327,
-0.19347050786018372,
-0.10030508041381836,
-0.23080624639987946,
0.31957176327705383,
-0.11442583054304123,
0.16634058952331543,
0.12323907762765884,
-0.04020824655890465,
0.11973540484905243,
-0.024423599243164062,
0.06070535257458687,
-0.17143473029136658,
0.004193601664155722,
0.11129544675350189,
-0.15319927036762238,
0.05684076249599457,
0.1637277901172638,
0.11731190979480743,
-0.1356666088104248,
0.13010741770267487,
0.01808636263012886,
0.12140148133039474,
-0.0551765002310276,
0.038800060749053955,
-0.08760294318199158,
-0.056900497525930405,
0.09236367791891098,
0.12929920852184296,
-0.17539151012897491,
-0.1561824530363083,
0.1535923331975937,
-0.16029199957847595,
0.17160387337207794,
-0.17071905732154846,
-0.02994971163570881,
-0.0018305254634469748,
-0.08005419373512268,
-0.15016677975654602,
0.11509088426828384,
-0.05736742168664932,
0.13124780356884003,
0.05416874960064888,
-0.06143554672598839,
-0.01566515676677227,
0.1383119523525238,
0.0897446945309639,
-0.14672785997390747,
0.21180590987205505,
0.007082038093358278,
-0.05447547882795334,
-0.09108512848615646,
0.06820103526115417,
-0.055210359394550323,
-0.004603095352649689,
0.07583978027105331,
0.010547176003456116,
-0.1645900458097458,
0.05446470156311989,
-0.01617673970758915,
-0.03147421032190323,
0.016695579513907433,
-0.14410366117954254,
-0.18335402011871338,
-0.05505126342177391,
-0.12946107983589172,
-0.005191463511437178,
0.23482181131839752,
-0.11748211830854416,
-0.08334723860025406,
0.11956460773944855,
0.06838291138410568,
0.043573252856731415,
0.18585336208343506,
0.018111275508999825,
-0.141182079911232,
0.02950945310294628,
0.037219129502773285,
-0.1444745808839798,
0.0033467900939285755,
0.2832213044166565,
-0.010586424730718136,
-0.010395669378340244,
0.009502746164798737,
-0.04036254808306694,
-0.10445155203342438,
-0.008805911988019943,
0.08618523180484772,
-0.10084850341081619,
-0.03098844364285469,
-0.027615003287792206,
-0.17670752108097076,
-0.18473993241786957,
-0.0884166806936264,
-0.10289639234542847,
-0.048462968319654465,
-0.056311141699552536,
0.10594446957111359,
-0.03351495414972305,
0.009738387539982796,
-0.055072247982025146,
0.08547846972942352,
0.19170339405536652,
-0.10300354659557343,
0.042448874562978745,
0.029875563457608223,
-0.034664053469896317,
0.18149147927761078,
0.04638459160923958,
-0.07759293913841248,
-0.1159757673740387,
-0.14334070682525635,
0.16445773839950562,
0.03184940665960312,
-0.07227042317390442,
-0.07599247246980667,
0.07558701932430267,
-0.15451684594154358,
0.02787754498422146,
0.005627291277050972,
-0.13372793793678284,
0.07004380971193314,
0.12796993553638458,
-0.05433221161365509,
-0.0836009532213211,
0.14411190152168274,
0.1396847665309906,
0.11691974103450775,
-0.04789668321609497,
0.005890390370041132,
0.09417027235031128,
-0.0627673864364624,
0.10539815574884415,
0.0924299880862236,
0.07813595980405807,
0.013252895325422287,
-0.1068640872836113,
-0.16352781653404236,
0.04592568799853325,
0.0624731220304966,
-0.003757748520001769,
0.12489438056945801,
-0.016675487160682678,
-0.012076184153556824,
0.07238175719976425,
0.1544060856103897,
-0.2749449908733368,
-0.07010677456855774,
-0.10732410848140717,
-0.030338104814291,
-0.00892709195613861,
-0.005052509717643261,
-0.15427030622959137,
-0.05078575387597084,
-0.009692010469734669,
-0.1332465261220932,
-0.06927503645420074,
-0.00951380655169487,
0.2635371685028076,
-0.08078976720571518,
0.015588728711009026,
-0.045267146080732346,
-0.06890612840652466,
-0.0337706059217453,
0.15755239129066467,
-0.007759412284940481,
-0.04854745417833328,
-0.1483333706855774,
0.02410021796822548,
0.09744655340909958,
-0.17981880903244019,
0.15093280375003815,
-0.10078341513872147,
-0.09896588325500488,
-0.1262100785970688,
0.07051202654838562,
-0.20400866866111755,
0.3914489150047302,
-0.07082962244749069,
0.0009323981939814985,
0.09185975044965744,
-0.017828159034252167,
0.0766323134303093,
0.08409962058067322,
-0.07487931102514267,
0.24708686769008636,
0.04289955273270607,
-0.13336533308029175,
-0.18885783851146698,
-0.19209794700145721,
0.023605674505233765,
-0.028545591980218887,
-0.2459520846605301,
0.020383263006806374,
0.04356320574879646,
-0.08208318799734116,
0.09036507457494736,
-0.11507359147071838,
0.12789835035800934,
-0.053535331040620804,
-0.029738225042819977,
0.007096519228070974,
-0.02467947266995907,
0.16033969819545746,
0.14909575879573822,
0.09885068237781525,
-0.06687227636575699,
0.035612691193819046,
0.06938067823648453,
0.037783559411764145,
0.049282535910606384,
-0.0005922645214013755,
-0.0003873341192957014,
-0.0987115353345871,
-0.09074482321739197,
-0.14140355587005615,
0.38682952523231506,
-0.02819807454943657,
0.11387772113084793,
0.025104789063334465,
0.10394307971000671,
0.03146403655409813,
-0.2022951990365982,
0.3134380877017975,
0.06371641904115677,
0.0928054079413414,
-0.09037784487009048,
-0.07209135591983795,
0.028010057285428047,
-0.030233927071094513,
-0.017360864207148552,
0.2410438060760498,
-0.035070937126874924,
0.1189589574933052,
-0.07932793349027634,
-0.04539688676595688,
0.040105435997247696,
0.047074027359485626,
-0.061956118792295456,
-0.2770736813545227,
-0.27038314938545227,
-0.008214222267270088,
0.2054121494293213,
0.14481137692928314,
0.037506844848394394,
-0.005709581542760134,
0.13745105266571045,
-0.08508201688528061,
0.12893369793891907,
-0.17169053852558136,
0.07546888291835785,
0.017167486250400543,
0.194267138838768,
0.044195644557476044,
0.09032242745161057,
-0.043999381363391876,
0.2087787687778473,
-0.015552512370049953,
0.019952524453401566,
0.13396213948726654,
-0.07244652509689331,
0.04062971472740173,
0.16278664767742157,
0.07385078817605972,
0.08413777500391006,
-0.23118987679481506,
-0.13325640559196472,
-0.020191971212625504,
0.19196446239948273,
0.059527695178985596,
-0.11847913265228271,
-0.03378075733780861,
0.24432168900966644,
-0.2741461396217346,
-0.014286447316408157,
0.03798901289701462,
0.07928705215454102,
-0.0025879880413413048,
0.16925272345542908,
0.20298156142234802,
-0.24911202490329742,
-0.031160831451416016,
-0.01449350081384182,
0.05157503858208656,
-0.07723629474639893,
0.03400200232863426,
0.2060282975435257,
-0.15117496252059937,
0.072670578956604,
0.07345732301473618,
-0.09440725296735764,
0.11216525733470917,
-0.0330885574221611,
-0.20116885006427765,
0.13604378700256348,
-0.06875010579824448,
0.17887431383132935,
-0.022666534408926964,
0.13156680762767792,
-0.06399721652269363,
0.05460159480571747,
-0.03979204595088959,
-0.1053764820098877,
-0.13331660628318787,
0.041477132588624954,
0.18552440404891968,
0.09256870299577713,
-0.0003273265028838068,
-0.027815157547593117,
-0.008003615774214268,
0.02754770591855049,
-0.07716726511716843,
-0.0979565680027008,
0.21092656254768372,
0.16773782670497894,
-0.013193241320550442,
-0.029816564172506332,
0.023667922243475914,
-0.13613735139369965,
0.0950290858745575,
0.07393543422222137,
-0.20938743650913239,
0.090799979865551,
-0.1577504426240921,
0.0022439032327383757,
-0.1642501950263977,
0.06818202137947083,
-0.13585950434207916,
0.038776371628046036,
-0.05136154592037201,
0.033506736159324646,
-0.017603963613510132,
-0.06262218952178955,
-0.055094677954912186,
0.034837063401937485,
-0.09345704317092896,
-0.042867906391620636,
0.1525074690580368,
-0.04825210943818092,
0.011095077730715275,
-0.010419192723929882,
0.08763255178928375,
0.15207740664482117,
-0.02053295448422432,
0.049091268330812454,
0.07269973307847977,
0.05238096043467522,
0.07819806039333344,
0.18848219513893127,
-0.0671418234705925,
0.09634370356798172,
-0.016324395313858986,
0.17172859609127045,
-0.025772446766495705,
-0.08217310160398483,
0.14830659329891205,
0.0627504512667656,
0.0493854284286499,
0.03174273297190666,
-0.03986484929919243,
-0.019389204680919647,
-0.06279397010803223,
-0.14257033169269562,
0.213486909866333,
0.08734705299139023,
0.09094267338514328,
0.1466556042432785,
-0.07228424400091171,
-0.05593815818428993,
-0.12076178938150406,
0.020465901121497154,
-0.0676063671708107,
-0.07411346584558487,
0.11799370497465134,
0.03872334584593773,
-2.3716153948920414e-32,
-0.00425232108682394,
-0.20426291227340698,
-0.10165917873382568,
-0.04237495735287666,
-0.27141693234443665,
-0.1478988081216812,
-0.17803359031677246,
-0.22812332212924957,
0.09990336745977402,
-0.024247001856565475,
0.07702263444662094,
0.08232845366001129,
0.034878313541412354,
0.16141058504581451,
0.1873498409986496,
-0.05893224850296974,
0.06702309846878052,
0.03029140643775463,
-0.09392666071653366,
0.11709277331829071,
0.07516030222177505,
-0.10646582394838333,
-0.28792816400527954,
0.42285728454589844,
0.0748879685997963,
-0.021848373115062714,
-0.13200169801712036,
-0.023892851546406746,
0.06429602205753326,
-0.08997006714344025,
-0.033315517008304596,
0.22561831772327423,
-0.09214208275079727,
-0.08944791555404663,
-0.0989203006029129,
-0.10981391370296478,
-0.06889668107032776,
0.11152198165655136,
-0.028141263872385025,
0.008317620493471622,
0.006994544994086027,
0.04528949782252312,
0.1292576789855957,
0.025328557938337326,
-0.17022308707237244,
0.063474640250206,
0.19673722982406616,
0.12373454868793488,
-0.17749999463558197,
-0.02810501493513584,
0.014083233661949635,
0.04317428544163704,
-0.03818964958190918,
0.10471762716770172,
0.009028344415128231,
-0.09455572813749313,
0.027247635647654533,
0.17915977537631989,
-0.06518922746181488,
-0.1801649034023285,
-0.10851646959781647,
-0.18138214945793152,
0.030308213084936142,
-0.05883323773741722,
-0.058093830943107605,
-0.11413220316171646,
0.36938899755477905,
-0.023189309984445572,
0.14314493536949158,
-0.025379689410328865,
-0.04178629443049431,
0.2464754432439804,
-0.02863231860101223,
-0.07834812253713608,
-0.03332039341330528,
0.08184829354286194,
0.07337331026792526,
-0.0933036282658577,
-0.023707972839474678,
-0.08983437716960907,
0.10178335756063461,
-0.1379016935825348,
0.07470978796482086,
0.019579583778977394,
-0.05286724865436554,
0.08669612556695938,
0.00041253145900554955,
-0.07483337819576263,
-0.11042105406522751,
-0.09139122813940048,
0.08391130715608597,
0.10141751170158386,
-0.016403963789343834,
-0.026218751445412636,
-0.05616651102900505,
-0.08282091468572617,
-0.09972905367612839,
0.12883512675762177,
-0.01911882869899273,
-0.0363260954618454,
-0.13710898160934448,
-0.1406829059123993,
-0.10634654015302658,
0.021920055150985718,
0.14992007613182068,
-0.050778113305568695,
0.02634650282561779,
0.21284209191799164,
-0.006567697506397963,
-0.04761772230267525,
0.07347065210342407,
0.0629381313920021,
-0.017580214887857437,
0.1399613916873932,
0.22595520317554474,
0.03502668812870979,
0.020950380712747574,
-0.0881185531616211,
0.16359706223011017,
0.05143164098262787,
0.07536329329013824,
-0.05773346498608589,
-0.10125494003295898,
0.0394371896982193,
0.044259414076805115,
-0.04824408143758774,
-0.1884615123271942,
0.01791338436305523,
-0.03786740452051163,
-0.144028902053833,
-0.018106568604707718,
-0.22712016105651855,
7.178223313530907e-7,
-0.2268504798412323,
0.21729245781898499,
-0.08992310613393784,
-0.06642815470695496,
0.0054888310842216015,
-0.0922817587852478,
-0.3848642408847809,
0.2675696909427643,
-0.06372889131307602,
0.10948300361633301,
0.20679105818271637,
0.05761265754699707,
0.05416101962327957,
0.07597354799509048,
-0.05899834632873535,
-0.09083901345729828,
-0.27210742235183716,
0.18754513561725616,
-0.11864811927080154,
0.10405708104372025,
0.0483555905520916,
-0.022627467289566994,
0.1032223254442215,
-0.049059029668569565,
0.2398759126663208,
-0.028306683525443077,
0.05120835080742836,
0.05882749706506729,
-0.026365024968981743,
-0.14484372735023499,
-0.01995520479977131,
-0.08112022280693054,
-0.04654085263609886,
0.1740044504404068,
-0.008876476436853409,
0.034985221922397614,
-0.07326555252075195,
-0.14552973210811615,
0.05739817023277283,
-0.16796015202999115,
-0.2541031539440155,
0.09905030578374863,
0.1840742975473404,
-0.06696946173906326,
0.06163562461733818,
-0.05209759622812271,
-0.08175669610500336,
0.27087298035621643,
0.03189842030405998,
-0.03958560898900032,
0.12904512882232666,
0.2131694108247757,
0.013785612769424915,
0.011677281931042671,
-0.037685152143239975,
0.0343460738658905,
0.0442819781601429,
-0.20741990208625793,
0.08739548176527023,
0.12698900699615479,
-0.06724191457033157,
-0.1736196130514145,
0.042150381952524185,
0.03106067329645157,
0.04010611027479172,
0.0025637317448854446,
-0.1655709594488144,
6.954750911652008e-35,
0.10040728002786636,
0.02145054191350937,
0.021561753004789352,
-0.1373516321182251,
-0.16430334746837616,
-0.09586820751428604,
0.06656817346811295,
0.038232311606407166,
0.19397366046905518,
-0.03172597661614418,
-0.07459072023630142
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | already did,but not useful for step Generating train split,it works in step "Resolving data files" & "Downloading data files" | ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 19 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
already did,but not useful for step Generating train split,it works in step "Resolving data files" & "Downloading data files" | [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | We need more info about the issue to provide help.
Can you interrupt the process (with `num_proc=None`) after the `load_dataset` call when the slowdown occurs? So we can know what part of the code is causing it.
The `audiofolder` \ `imagefolder` with metadata is not performant for large datasets. Luckily, we can make them much faster if drop the nested metadata files feature (not that useful). I plan to work on this soon.
In the meantime, it's better to use `Dataset.from_generator` (requires replacing the `load_dataset` calls in the transformers script with `Dataset.from_generator`) or write a dataset loading script for large datasets. | ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 101 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
We need more info about the issue to provide help.
Can you interrupt the process (with `num_proc=None`) after the `load_dataset` call when the slowdown occurs? So we can know what part of the code is causing it.
The `audiofolder` \ `imagefolder` with metadata is not performant for large datasets. Luckily, we can make them much faster if drop the nested metadata files feature (not that useful). I plan to work on this soon.
In the meantime, it's better to use `Dataset.from_generator` (requires replacing the `load_dataset` calls in the transformers script with `Dataset.from_generator`) or write a dataset loading script for large datasets. | [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | Can you interrupt the process (with num_proc=None) after the load_dataset call when the slowdown occurs? So we can know what part of the code is causing it.
(I'll try this operation)
The audiofolder \ imagefolder with metadata is not performant for large datasets. Luckily, we can make them much faster if drop the nested metadata files feature (not that useful). I plan to work on this soon.
(My data is indeed a bit large, exceeding 10000 hours of audio data. Looking forward to your improvement work very much)
In the meantime, it's better to use Dataset.from_generator (requires replacing the load_dataset calls in the transformers script with Dataset.from_generator) or write a dataset loading script for large datasets.
(I want to use Dataset.from_generator instead of load_dataset ,where can i found sample code to load audio&label dataset, I was to do asr task) | ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 140 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
Can you interrupt the process (with num_proc=None) after the load_dataset call when the slowdown occurs? So we can know what part of the code is causing it.
(I'll try this operation)
The audiofolder \ imagefolder with metadata is not performant for large datasets. Luckily, we can make them much faster if drop the nested metadata files feature (not that useful). I plan to work on this soon.
(My data is indeed a bit large, exceeding 10000 hours of audio data. Looking forward to your improvement work very much)
In the meantime, it's better to use Dataset.from_generator (requires replacing the load_dataset calls in the transformers script with Dataset.from_generator) or write a dataset loading script for large datasets.
(I want to use Dataset.from_generator instead of load_dataset ,where can i found sample code to load audio&label dataset, I was to do asr task) | [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | Can you interrupt the process (with num_proc=None) after the load_dataset call when the slowdown occurs? So we can know what part of the code is causing it.
================================================================================
Here is the log:
[load_dataset.log](https://github.com/huggingface/datasets/files/12169362/load_dataset.log)
(The larger my training data, the slower it loads)
![image](https://github.com/huggingface/datasets/assets/19569322/381b73e4-0a54-4240-b95e-cb8164584047)
| ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 43 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
Can you interrupt the process (with num_proc=None) after the load_dataset call when the slowdown occurs? So we can know what part of the code is causing it.
================================================================================
Here is the log:
[load_dataset.log](https://github.com/huggingface/datasets/files/12169362/load_dataset.log)
(The larger my training data, the slower it loads)
![image](https://github.com/huggingface/datasets/assets/19569322/381b73e4-0a54-4240-b95e-cb8164584047)
| [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | In the meantime, it's better to use Dataset.from_generator (requires replacing the load_dataset calls in the transformers script with Dataset.from_generator) or write a dataset loading script for large datasets.
================================================================================
I tried ‘Dataset. from_generator’ implements data loading, but the testing results show no improvement | ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 43 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
In the meantime, it's better to use Dataset.from_generator (requires replacing the load_dataset calls in the transformers script with Dataset.from_generator) or write a dataset loading script for large datasets.
================================================================================
I tried ‘Dataset. from_generator’ implements data loading, but the testing results show no improvement | [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5941 | Load Data Sets Too Slow In Train Seq2seq Model | I have already solved this problem, referring to #5990 : read audio frist, then use data_generator to change format . | ### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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> | 20 | Load Data Sets Too Slow In Train Seq2seq Model
### Describe the bug
step 'Generating train split' in load_dataset is too slow:
![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8)
### Steps to reproduce the bug
Data: own data,16K16B Mono wav
Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py)
Add Code:
if data_args.data_path is not None:
print(data_args.data_path)
raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir)
raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000))
raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True)
(change cache_dir to other path ,ex:/DATA/cache)
### Expected behavior
load data fast,at least 1000+
`Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]`
### Environment info
- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.13.2
- PyTorch version (GPU?): 1.13.1+cu116 (True)
- Tensorflow version (GPU?): not installed (NA)
- 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>
I have already solved this problem, referring to #5990 : read audio frist, then use data_generator to change format . | [
-0.14175881445407867,
0.09649435430765152,
-0.11269989609718323,
0.07562988251447678,
0.13361607491970062,
-0.07232619822025299,
0.02327379584312439,
0.08839714527130127,
0.0029209440108388662,
0.0427539087831974,
-0.07073092460632324,
-0.08128385990858078,
-0.0988607257604599,
-0.009142580442130566,
-0.06845802813768387,
-0.02550737001001835,
-0.02646825462579727,
0.05451608821749687,
0.008746069855988026,
-0.06005331501364708,
-0.05439666286110878,
-0.050294745713472366,
0.08725731074810028,
-0.1201377660036087,
0.005210986826568842,
-0.031206103041768074,
-0.062474895268678665,
0.08949002623558044,
-0.014420973137021065,
-0.01758394204080105,
-0.029371337965130806,
0.13611267507076263,
-0.16555675864219666,
0.257122278213501,
0.000005524776042875601,
-0.01388406753540039,
0.12485261261463165,
-0.014035556465387344,
-0.10093095898628235,
0.044153470546007156,
0.12084541469812393,
-0.07268890738487244,
-0.10018415749073029,
0.06725319474935532,
-0.0772254541516304,
-0.08990751206874847,
-0.12153904885053635,
-0.051463477313518524,
0.042556487023830414,
0.053672514855861664,
-0.07798326760530472,
0.027659351006150246,
-0.20995977520942688,
-0.06389449536800385,
0.018340976908802986,
-0.10671456903219223,
0.02487948164343834,
-0.032795898616313934,
0.006489341147243977,
-0.0006225322722457349,
-0.09317519515752792,
-0.012335803359746933,
0.06976688653230667,
0.11238650232553482,
0.04093453660607338,
0.04659564793109894,
-0.1618303656578064,
-0.025471076369285583,
0.03599712625145912,
0.2797580361366272,
-0.05346113070845604,
0.15112218260765076,
-0.08151379227638245,
-0.0048518613912165165,
-0.16878928244113922,
-0.16365304589271545,
0.015771247446537018,
0.11682882159948349,
-0.18946795165538788,
-0.08829081058502197,
-0.20033007860183716,
-0.018392741680145264,
0.04919802024960518,
0.002139309886842966,
-0.16113905608654022,
-0.14052714407444,
-0.06502346694469452,
0.026784097775816917,
0.1345246583223343,
0.06262172013521194,
0.07317234575748444,
-0.030844280496239662,
-0.14435453712940216,
-0.047580789774656296,
-0.14380773901939392,
0.10187531262636185,
-0.0075394157320261,
-0.22511151432991028,
-0.1359630823135376,
-0.058966752141714096,
0.08246549963951111,
0.16118107736110687,
0.009709333069622517,
0.036542221903800964,
-0.046035733073949814,
-0.0928955003619194,
-0.012700287625193596,
-0.16890422999858856,
0.029743004590272903,
0.056142281740903854,
-0.09386161714792252,
0.1539509892463684,
-0.3322822153568268,
-0.06663931906223297,
0.10415171086788177,
-0.10134118795394897,
0.023913618177175522,
0.03846872225403786,
0.08943786472082138,
-0.017708109691739082,
0.15325962007045746,
0.06815063208341599,
-0.053126998245716095,
0.24922582507133484,
0.038653820753097534,
0.05747373774647713,
-0.13901415467262268,
0.02071963995695114,
-0.16978579759597778,
0.04891867935657501,
-0.009134522639214993,
-0.09468844532966614,
0.020385731011629105,
-0.01639934629201889,
0.05465400218963623,
-0.11266997456550598,
0.011362992227077484,
-0.05433226376771927,
-0.11786595731973648,
-0.1426292061805725,
0.16968666017055511,
-0.097202830016613,
-0.2072828710079193,
0.062472160905599594,
-0.08393596112728119,
0.02836734801530838,
0.020383724942803383,
0.24771328270435333,
-0.08265253901481628,
0.005874335765838623,
-0.15595854818820953,
0.032693617045879364,
-0.031074613332748413,
0.0719333067536354,
-0.12570881843566895,
0.1146046370267868,
-0.09745221585035324,
-0.015121079981327057,
-0.1755262166261673,
-0.09577418863773346,
0.05270415171980858,
-0.13690468668937683,
-0.10077276825904846,
0.04906253144145012,
0.11552433669567108,
0.05801882967352867,
0.0033848092425614595,
-0.05957498401403427,
-0.09980513900518417,
0.06604472547769547,
0.12581773102283478,
0.05412168428301811,
-0.12726309895515442,
0.08766362816095352,
-0.20828862488269806,
0.0934552252292633,
-0.026969291269779205,
0.045187633484601974,
-0.1400231420993805,
0.07237434387207031,
0.04683864861726761,
-0.00201961281709373,
-0.16119875013828278,
-0.008991390466690063,
0.24146877229213715,
0.03466137871146202,
0.10668791085481644,
0.08551224321126938,
-0.0037547315005213022,
0.013569186441600323,
0.029723718762397766,
-0.10655378550291061,
-0.026119807735085487,
0.08902094513177872,
-0.07271555811166763,
0.04504269361495972,
-0.08506657928228378,
0.07834113389253616,
0.09814579039812088,
-0.2540665566921234,
-0.19687318801879883,
0.07954062521457672,
-0.034451957792043686,
0.034197088330984116,
-0.07235737144947052,
-0.01004075538367033,
-0.11278242617845535,
0.18652984499931335,
-0.02483956143260002,
-0.16000579297542572,
-0.021180035546422005,
0.027186643332242966,
0.035303641110658646,
0.0006761762779206038,
-0.14274834096431732,
-0.05904543772339821,
-0.1298077553510666,
-0.015198558568954468,
0.0013129858998581767,
0.14628329873085022,
-0.0778890922665596,
0.07494549453258514,
0.04666636884212494,
0.12074021250009537,
-0.16677166521549225,
0.01729903183877468,
0.1701844334602356,
0.1339763104915619,
0.050050999969244,
0.01843024045228958,
-0.062012236565351486,
-0.15728621184825897,
0.12606652081012726,
0.038139380514621735,
0.03397170826792717,
0.16173198819160461,
-0.049192845821380615,
-0.14789168536663055,
0.11186662316322327,
0.11784455925226212,
-0.08308225125074387,
0.11250437051057816,
-0.006537615321576595,
-0.12205354869365692,
-0.04235740005970001,
0.09302572906017303,
-0.016215730458498,
0.13801905512809753,
0.04213280230760574,
-0.07018928974866867,
0.16656240820884705,
0.07965722680091858,
0.0017636438133195043,
0.10453420877456665,
0.10659672319889069,
-0.017404455691576004,
0.23515526950359344,
0.27610382437705994,
-0.02842736802995205,
0.022227691486477852,
0.16473692655563354,
-0.0024117249995470047,
-0.05309242010116577,
0.03511514142155647,
0.033302877098321915,
-0.12288633733987808,
0.06773462146520615,
-0.16315148770809174,
0.09792175143957138,
0.02704351209104061,
-0.021753652021288872,
-0.09960588067770004,
-0.0294552780687809,
-0.11362224817276001,
-0.056083157658576965,
-0.03409630060195923,
0.031424976885318756,
-0.07319226861000061,
0.0073905629105865955,
-0.12513364851474762,
-0.04424799978733063,
0.062091752886772156,
0.07842345535755157,
-0.05101609602570534,
0.11412810534238815,
0.0002780125360004604,
-0.05627795308828354,
0.14276854693889618,
-0.04231393337249756,
-0.06731138378381729,
0.06834562867879868,
0.029409237205982208,
0.1076478660106659,
-0.035432085394859314,
-0.0316266305744648,
0.17256207764148712,
0.13726073503494263,
0.17769300937652588,
0.07982780039310455,
-0.08689852803945541,
0.020733295008540154,
0.15395621955394745,
0.08919153362512589,
0.13736553490161896,
0.07577063888311386,
0.14887583255767822,
-0.05362991243600845,
-0.03325044363737106,
-0.27812719345092773,
0.17847101390361786,
-0.08319967985153198,
-0.1227259561419487,
-0.005492078140377998,
-0.019992435351014137,
-0.06004013493657112,
0.13740620017051697,
0.00006992174894548953,
-0.21182778477668762,
0.02889489382505417,
0.08573568612337112,
0.1388222873210907,
0.1661265343427658,
-0.12659457325935364,
-0.04448904097080231,
0.040505703538656235,
-0.11098632216453552,
-0.06002337113022804,
-0.09014368057250977,
-0.09639525413513184,
-0.02192075550556183,
0.03839349374175072,
0.08708102256059647,
-0.005603522062301636,
-0.05277033895254135,
0.029705064371228218,
-0.07903384417295456,
-0.10882534086704254,
-0.12542057037353516,
0.5350646376609802,
-0.015979226678609848,
-0.14244213700294495,
-0.05541393160820007,
-0.19257456064224243,
0.054455313831567764,
-0.08312905579805374,
-0.11078951507806778,
0.03706911951303482,
-0.2992188036441803,
-0.09563809633255005,
0.053571667522192,
-0.06505381315946579,
0.012039100751280785,
-0.160931795835495,
-0.03183028846979141,
0.01553850807249546,
0.07029849290847778,
0.0749020129442215,
0.12900078296661377,
-0.001707380753941834,
0.04203163832426071,
0.06790586560964584,
-0.06389433145523071,
0.15959912538528442,
0.26483628153800964,
-0.16008420288562775,
-0.06334272027015686,
0.13229398429393768,
-0.008061054162681103,
-0.1341789811849594,
-0.036592863500118256,
0.0378708615899086,
0.03132908046245575,
-0.0808028057217598,
0.14723743498325348,
0.08218904584646225,
0.013494323939085007,
0.06408955156803131,
-0.13333280384540558,
0.1878417730331421,
0.0396573506295681,
0.12449493259191513,
-0.06517487019300461,
-0.13436225056648254,
0.08630978316068649,
0.14385516941547394,
0.06011243164539337,
0.07096130400896072,
0.05639534443616867,
-0.10511757433414459,
0.1453140676021576,
-0.06966060400009155,
-0.1440131962299347,
0.1301155984401703,
-0.05989447236061096,
-0.20256660878658295,
-0.005089564248919487,
0.16697250306606293,
0.0728667825460434,
0.00629463279619813,
0.07719790935516357,
0.17590244114398956,
0.17143769562244415,
0.1523980349302292,
0.014852501451969147,
-0.05929182097315788,
0.02614099718630314,
-0.027294423431158066,
-0.022041454911231995,
-0.008511648513376713,
-0.06387755274772644,
0.20995931327342987,
0.15052403509616852,
-0.16539926826953888,
0.007577232085168362,
0.1167113333940506,
-0.02483673393726349,
-0.027011143043637276,
-0.022934991866350174,
-0.06708936393260956,
-0.03209304064512253,
-0.07069602608680725,
-0.13960230350494385,
0.021765565499663353,
0.18642601370811462,
-0.024720482528209686,
-0.01662730798125267,
0.12202344834804535,
-0.08487632870674133,
0.18243055045604706,
0.015015174634754658,
0.008239773102104664,
0.09762605279684067,
0.1860707700252533,
0.09382703900337219,
0.08089696615934372,
-0.14313483238220215,
0.3670097887516022,
-0.06704249978065491,
-0.0666719526052475,
0.09588692337274551,
-0.09404940158128738,
-0.11974514275789261,
0.14534547924995422,
0.09837120771408081,
0.12346821278333664,
-0.09782764315605164,
-0.029676809906959534,
-0.07542037963867188,
-0.06139622628688812,
0.0242525115609169,
-0.02707502618432045,
-0.13746124505996704,
-0.10624583810567856,
-0.06859885901212692,
0.08816777169704437,
-0.014771150425076485,
0.00516504654660821,
-0.18164218962192535,
0.07595816254615784,
0.15618255734443665,
-0.18676887452602386,
-0.055320288985967636,
-0.10365957021713257,
0.005513268522918224,
-0.10259012877941132,
0.07698039710521698,
0.0920548290014267,
-0.17080843448638916,
0.1141144260764122,
0.018699927255511284,
-0.11285913735628128,
-0.007132100407034159,
0.03352317586541176,
0.00867956317961216,
0.18483467400074005,
-0.09475354105234146,
0.0923846960067749,
0.04818214103579521,
-0.11822958290576935,
-0.08035022765398026,
0.17544378340244293,
0.1963108628988266,
-0.009885715320706367,
-0.09360062330961227,
-0.08324889838695526,
0.05957607552409172,
0.06154433265328407,
0.03924313932657242,
-0.1327555626630783,
0.07549262791872025,
0.08726920932531357,
0.022943461313843727,
-0.04731861129403114,
-0.043807342648506165,
0.16524933278560638,
-0.07039861381053925,
-0.07971019297838211,
0.009161394089460373,
0.03682009503245354,
-0.06290324777364731,
0.08813836425542831,
-0.15328267216682434,
0.11357411742210388,
-0.06275563687086105,
0.19050011038780212,
-0.08865245431661606,
-0.0009502575267106295,
-0.021336205303668976,
0.190447136759758,
0.08690406382083893,
0.022513464093208313,
-0.17799080908298492,
-0.019076421856880188,
-0.10932720452547073,
0.1021580845117569,
0.09611786901950836,
-0.04180543124675751,
-0.08333272486925125,
-0.11626417934894562,
-0.03627746179699898,
0.12506771087646484,
-0.019955269992351532,
0.048048779368400574,
-0.06915140151977539,
0.040627602487802505,
0.15518039464950562,
-0.07326303422451019,
0.001487191068008542,
0.28620651364326477,
0.010184971615672112,
0.026618579402565956,
0.12557046115398407,
0.23465542495250702,
0.13440029323101044,
-0.033665984869003296,
0.13313458859920502,
0.19739305973052979,
-0.0998043641448021,
-0.05650773271918297,
0.09114046394824982,
0.0534178651869297,
-0.23059600591659546,
0.019633328542113304,
0.09050625562667847,
-0.05457160249352455,
0.019159961491823196,
0.10224322229623795,
-0.11535902321338654,
0.010645300149917603,
-0.12018365412950516,
-0.05020254850387573,
0.032642532140016556,
-0.09676390141248703,
-0.05911014601588249,
0.129002645611763,
-2.5268144446631695e-32,
0.000016070645870058797,
-0.10468698292970657,
-0.021779367700219154,
0.012471819296479225,
-0.12663426995277405,
0.0514947734773159,
-0.12642619013786316,
-0.06382733583450317,
-0.06691738218069077,
-0.09818195551633835,
-0.07193712890148163,
0.04259495437145233,
0.0065043289214372635,
0.09906207770109177,
-0.21914319694042206,
0.0346415638923645,
0.1670486330986023,
-0.1437433958053589,
-0.11750049144029617,
0.016479745507240295,
0.08158327639102936,
0.19851438701152802,
-0.1658187359571457,
-0.05916118621826172,
-0.22898447513580322,
-0.12624552845954895,
0.10105246305465698,
-0.14707182347774506,
0.05261659249663353,
-0.04641609638929367,
-0.12225428968667984,
-0.0437198281288147,
-0.1807466745376587,
-0.16571971774101257,
0.048471029847860336,
-0.06587079912424088,
-0.1480398327112198,
0.040474895387887955,
0.11886016279459,
0.12870581448078156,
0.036747004836797714,
0.07179483026266098,
0.14648082852363586,
-0.06331045925617218,
-0.1106291189789772,
0.012548474594950676,
0.05721910670399666,
0.030785318464040756,
-0.16348014771938324,
-0.15981844067573547,
-0.1177980974316597,
0.09988059848546982,
0.09233583509922028,
0.04398044943809509,
0.06878528743982315,
-0.021668942645192146,
0.09121709316968918,
0.08980069309473038,
-0.12242942303419113,
-0.11312475055456161,
0.08562973141670227,
0.1097586527466774,
-0.02612455002963543,
-0.0341113805770874,
0.1637420803308487,
-0.07731577008962631,
0.3308563232421875,
0.012692578136920929,
0.05826704204082489,
-0.07627523690462112,
0.23674257099628448,
0.11170684546232224,
-0.1626686006784439,
-0.16658228635787964,
0.10462366044521332,
-0.20905959606170654,
-0.18118327856063843,
0.0448867604136467,
0.03601028025150299,
-0.10131064057350159,
0.13178570568561554,
-0.08234676718711853,
-0.03514755889773369,
0.17729304730892181,
-0.15980738401412964,
0.14053981006145477,
-0.024548985064029694,
0.023043319582939148,
-0.05318063497543335,
-0.02934923581779003,
-0.01589195989072323,
-0.1683870255947113,
-0.014102313667535782,
-0.07594479620456696,
0.00007575528434244916,
-0.045055605471134186,
-0.17592768371105194,
0.0037109132390469313,
-0.10499998927116394,
0.04810178279876709,
-0.013258213177323341,
-0.10080427676439285,
0.23066510260105133,
-0.11857997626066208,
0.14681805670261383,
0.04420292377471924,
0.18083463609218597,
-0.041316527873277664,
-0.16727964580059052,
0.0037891361862421036,
0.0001901202485896647,
0.08529543876647949,
0.13171139359474182,
0.17863352596759796,
0.15641552209854126,
0.04063156247138977,
0.032041437923908234,
0.02830677293241024,
0.03815494477748871,
0.16332869231700897,
-0.20077340304851532,
0.005926111713051796,
0.1268562376499176,
0.023588525131344795,
-0.08487381041049957,
0.12002216279506683,
-0.18070687353610992,
0.023959975689649582,
-0.12176273763179779,
-0.1772652417421341,
-0.04081232100725174,
-0.06557208299636841,
7.501140544263762e-7,
-0.2285730093717575,
0.1984698325395584,
-0.1237391009926796,
0.039836760610342026,
-0.054179538041353226,
0.01418359950184822,
-0.2450169324874878,
0.04218321293592453,
0.0833120346069336,
0.17723552882671356,
0.009514525532722473,
0.11229056864976883,
-0.08532837778329849,
0.0741582065820694,
-0.08558555692434311,
-0.17723555862903595,
-0.1266142576932907,
0.006737848278135061,
-0.11488989740610123,
0.03623390570282936,
-0.06955713033676147,
0.17771337926387787,
-0.14953485131263733,
-0.08347078412771225,
0.25497326254844666,
-0.026095153763890266,
0.005330969113856554,
0.05003466457128525,
0.16626808047294617,
-0.02936541475355625,
0.017969472333788872,
0.0945681780576706,
-0.046518635004758835,
0.0687326118350029,
0.0694044977426529,
0.03566353768110275,
-0.1203913688659668,
-0.0005311289569362998,
0.16790083050727844,
-0.06939645856618881,
0.042326245456933975,
0.11585772782564163,
0.14609882235527039,
-0.05039829760789871,
0.03918430954217911,
0.07253865897655487,
-0.1536026895046234,
-0.03521953523159027,
0.014318511821329594,
0.0769043043255806,
-0.043726325035095215,
0.07351730018854141,
0.13481706380844116,
0.09183993190526962,
0.10343005508184433,
-0.1301736682653427,
-0.08740139752626419,
-0.17685316503047943,
-0.08948297053575516,
-0.034940943121910095,
-0.039405565708875656,
-0.1389850527048111,
0.06833529472351074,
0.0007227706373669207,
0.17672675848007202,
0.02480153925716877,
-0.02388036623597145,
1.379587146802033e-34,
-0.017458761110901833,
-0.01596664823591709,
0.08903500437736511,
-0.025861624628305435,
-0.015037075616419315,
-0.19378432631492615,
0.04895594343543053,
-0.03290211409330368,
0.04366819187998772,
-0.13757704198360443,
-0.1602521687746048
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Hi @AntreasAntoniou , sorry to know you are facing this issue. To help debugging it, could you tell me:
- What is the total dataset size?
- Is it always failing on the same shard or is the hanging problem happening randomly?
- Were you able to save the dataset as parquet locally? This would help us determine if the problem comes from the upload or the file generation.
I'm cc-ing @lhoestq who might have some insights from a `datasets` perspective. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 81 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Hi @AntreasAntoniou , sorry to know you are facing this issue. To help debugging it, could you tell me:
- What is the total dataset size?
- Is it always failing on the same shard or is the hanging problem happening randomly?
- Were you able to save the dataset as parquet locally? This would help us determine if the problem comes from the upload or the file generation.
I'm cc-ing @lhoestq who might have some insights from a `datasets` perspective. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | One trick that can also help is to check the traceback when you kill your python process: it will show where in the code it was hanging | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 27 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
One trick that can also help is to check the traceback when you kill your python process: it will show where in the code it was hanging | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Right. So I did the trick @lhoestq suggested. Here is where things seem to hang
```
Error while uploading 'data/train-00120-of-00195-466c2dbab2eb9989.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.15s/ba]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:52<00:00, 52.12s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.08s/ba]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:45<00:00, 45.54s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.08s/ba]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.03s/ba^Upload 1 LFS files: 0%| | 0/1 [
21:27:35<?, ?it/s]
Pushing dataset shards to the dataset hub: 63%|█████████████████████████████████████████████████████████████▎ | 122/195 [23:37:11<14:07:59, 696.98s/it]
^CError in sys.excepthook:
Traceback (most recent call last):
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1699, in print
extend(render(renderable, render_options))
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1335, in render
yield from self.render(render_output, _options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/constrain.py", line 29, in __rich_console__
yield from console.render(self.renderable, child_options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/panel.py", line 220, in __rich_console__
lines = console.render_lines(renderable, child_options, style=style)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1371, in render_lines
lines = list(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 292, in split_and_crop_lines
for segment in segments:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/padding.py", line 97, in __rich_console__
lines = console.render_lines(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1371, in render_lines
lines = list(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 292, in split_and_crop_lines
for segment in segments:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1335, in render
yield from self.render(render_output, _options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/syntax.py", line 611, in __rich_console__
segments = Segments(self._get_syntax(console, options))
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 668, in __init__
self.segments = list(segments)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/syntax.py", line 674, in _get_syntax
lines: Union[List[Text], Lines] = text.split("\n", allow_blank=ends_on_nl)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 1042, in split
lines = Lines(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/containers.py", line 70, in __init__
self._lines: List["Text"] = list(lines)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 1043, in <genexpr>
line for line in self.divide(flatten_spans()) if line.plain != separator
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 385, in plain
if len(self._text) != 1:
KeyboardInterrupt
Original exception was:
Traceback (most recent call last):
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
yield _result_or_cancel(fs.pop())
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
return fut.result(timeout)
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 453, in result
self._condition.wait(timeout)
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 320, in wait
waiter.acquire()
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/TALI/tali/scripts/validate_dataset.py", line 127, in <module>
train_dataset.push_to_hub(repo_id="Antreas/TALI-base", max_shard_size="5GB")
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/dataset_dict.py", line 1583, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 5275, in _push_parquet_shards_to_hub
_retry(
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 282, in _retry
return func(*func_args, **func_kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 826, in _inner
return fn(self, *args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3205, in upload_file
commit_info = self.create_commit(
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 826, in _inner
return fn(self, *args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2680, in create_commit
upload_lfs_files(
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/_commit_api.py", line 353, in upload_lfs_files
thread_map(
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 49, in _executor_map
with PoolExecutor(max_workers=max_workers, initializer=tqdm_class.set_lock,
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 649, in __exit__
self.shutdown(wait=True)
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/thread.py", line 235, in shutdown
t.join()
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 1096, in join
self._wait_for_tstate_lock()
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
KeyboardInterrupt
``` | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 556 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Right. So I did the trick @lhoestq suggested. Here is where things seem to hang
```
Error while uploading 'data/train-00120-of-00195-466c2dbab2eb9989.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.15s/ba]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:52<00:00, 52.12s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.08s/ba]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:45<00:00, 45.54s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.08s/ba]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.03s/ba^Upload 1 LFS files: 0%| | 0/1 [
21:27:35<?, ?it/s]
Pushing dataset shards to the dataset hub: 63%|█████████████████████████████████████████████████████████████▎ | 122/195 [23:37:11<14:07:59, 696.98s/it]
^CError in sys.excepthook:
Traceback (most recent call last):
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1699, in print
extend(render(renderable, render_options))
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1335, in render
yield from self.render(render_output, _options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/constrain.py", line 29, in __rich_console__
yield from console.render(self.renderable, child_options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/panel.py", line 220, in __rich_console__
lines = console.render_lines(renderable, child_options, style=style)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1371, in render_lines
lines = list(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 292, in split_and_crop_lines
for segment in segments:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/padding.py", line 97, in __rich_console__
lines = console.render_lines(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1371, in render_lines
lines = list(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 292, in split_and_crop_lines
for segment in segments:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1335, in render
yield from self.render(render_output, _options)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/syntax.py", line 611, in __rich_console__
segments = Segments(self._get_syntax(console, options))
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/segment.py", line 668, in __init__
self.segments = list(segments)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/syntax.py", line 674, in _get_syntax
lines: Union[List[Text], Lines] = text.split("\n", allow_blank=ends_on_nl)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 1042, in split
lines = Lines(
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/containers.py", line 70, in __init__
self._lines: List["Text"] = list(lines)
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 1043, in <genexpr>
line for line in self.divide(flatten_spans()) if line.plain != separator
File "/opt/conda/envs/main/lib/python3.10/site-packages/rich/text.py", line 385, in plain
if len(self._text) != 1:
KeyboardInterrupt
Original exception was:
Traceback (most recent call last):
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
yield _result_or_cancel(fs.pop())
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
return fut.result(timeout)
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 453, in result
self._condition.wait(timeout)
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 320, in wait
waiter.acquire()
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/TALI/tali/scripts/validate_dataset.py", line 127, in <module>
train_dataset.push_to_hub(repo_id="Antreas/TALI-base", max_shard_size="5GB")
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/dataset_dict.py", line 1583, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 5275, in _push_parquet_shards_to_hub
_retry(
File "/opt/conda/envs/main/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 282, in _retry
return func(*func_args, **func_kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 826, in _inner
return fn(self, *args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3205, in upload_file
commit_info = self.create_commit(
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 826, in _inner
return fn(self, *args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2680, in create_commit
upload_lfs_files(
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/_commit_api.py", line 353, in upload_lfs_files
thread_map(
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/opt/conda/envs/main/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 49, in _executor_map
with PoolExecutor(max_workers=max_workers, initializer=tqdm_class.set_lock,
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/_base.py", line 649, in __exit__
self.shutdown(wait=True)
File "/opt/conda/envs/main/lib/python3.10/concurrent/futures/thread.py", line 235, in shutdown
t.join()
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 1096, in join
self._wait_for_tstate_lock()
File "/opt/conda/envs/main/lib/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
KeyboardInterrupt
``` | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | @Wauplin
>What is the total dataset size?
There are three variants, and the random hanging happens on all three. The sizes are 2TB, 1TB, and 200GB.
>Is it always failing on the same shard or is the hanging problem happening randomly?
It seems to be very much random, as restarting can help move past the previous hang, only to find a new one, or not.
>Were you able to save the dataset as parquet locally? This would help us determine if the problem comes from the upload or the file generation.
Yes. The dataset seems to be locally stored as parquet. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 101 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
@Wauplin
>What is the total dataset size?
There are three variants, and the random hanging happens on all three. The sizes are 2TB, 1TB, and 200GB.
>Is it always failing on the same shard or is the hanging problem happening randomly?
It seems to be very much random, as restarting can help move past the previous hang, only to find a new one, or not.
>Were you able to save the dataset as parquet locally? This would help us determine if the problem comes from the upload or the file generation.
Yes. The dataset seems to be locally stored as parquet. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Hmm it looks like an issue with TQDM lock. Maybe you can try updating TQDM ? | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 16 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Hmm it looks like an issue with TQDM lock. Maybe you can try updating TQDM ? | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | I am using the latest version of tqdm
```
⬢ [Docker] ❯ pip install tqdm --upgrade
Requirement already satisfied: tqdm in /opt/conda/envs/main/lib/python3.10/site-packages (4.65.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
``` | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 54 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
I am using the latest version of tqdm
```
⬢ [Docker] ❯ pip install tqdm --upgrade
Requirement already satisfied: tqdm in /opt/conda/envs/main/lib/python3.10/site-packages (4.65.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
``` | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | I tried trying to catch the hanging issue in action again
```
Pushing dataset shards to the dataset hub: 65%|█████████████████████████████████████████████████████████████████▊ | 127/195 [2:28:02<1:19:15, 69.94s/it]
Error while uploading 'data/train-00127-of-00195-3f8d036ade107c27.parquet' to the Hub.
Pushing split train to the Hub.
Pushing dataset shards to the dataset hub: 64%|████████████████████████████████████████████████████████████████▏ | 124/195 [2:06:10<1:12:14, 61.05s/it]C^[^C^C^C
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /TALI/tali/scripts/validate_dataset.py:127 in <module> │
│ │
│ 124 │ │
│ 125 │ while not succesful_competion: │
│ 126 │ │ try: │
│ ❱ 127 │ │ │ train_dataset.push_to_hub(repo_id="Antreas/TALI-base", max_shard_size="5GB") │
│ 128 │ │ │ succesful_competion = True │
│ 129 │ │ except Exception as e: │
│ 130 │ │ │ print(e) │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/dataset_dict.py:1583 in push_to_hub │
│ │
│ 1580 │ │ for split in self.keys(): │
│ 1581 │ │ │ logger.warning(f"Pushing split {split} to the Hub.") │
│ 1582 │ │ │ # The split=key needs to be removed before merging │
│ ❱ 1583 │ │ │ repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parq │
│ 1584 │ │ │ │ repo_id, │
│ 1585 │ │ │ │ split=split, │
│ 1586 │ │ │ │ private=private, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:5263 in │
│ _push_parquet_shards_to_hub │
│ │
│ 5260 │ │ │
│ 5261 │ │ uploaded_size = 0 │
│ 5262 │ │ shards_path_in_repo = [] │
│ ❱ 5263 │ │ for index, shard in logging.tqdm( │
│ 5264 │ │ │ enumerate(itertools.chain([first_shard], shards_iter)), │
│ 5265 │ │ │ desc="Pushing dataset shards to the dataset hub", │
│ 5266 │ │ │ total=num_shards, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/tqdm/std.py:1178 in __iter__ │
│ │
│ 1175 │ │ time = self._time │
│ 1176 │ │ │
│ 1177 │ │ try: │
│ ❱ 1178 │ │ │ for obj in iterable: │
│ 1179 │ │ │ │ yield obj │
│ 1180 │ │ │ │ # Update and possibly print the progressbar. │
│ 1181 │ │ │ │ # Note: does not call self.update(1) for speed optimisation. │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:5238 in │
│ shards_with_embedded_external_files │
│ │
│ 5235 │ │ │ │ for shard in shards: │
│ 5236 │ │ │ │ │ format = shard.format │
│ 5237 │ │ │ │ │ shard = shard.with_format("arrow") │
│ ❱ 5238 │ │ │ │ │ shard = shard.map( │
│ 5239 │ │ │ │ │ │ embed_table_storage, │
│ 5240 │ │ │ │ │ │ batched=True, │
│ 5241 │ │ │ │ │ │ batch_size=1000, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:578 in wrapper │
│ │
│ 575 │ │ else: │
│ 576 │ │ │ self: "Dataset" = kwargs.pop("self") │
│ 577 │ │ # apply actual function │
│ ❱ 578 │ │ out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) │
│ 579 │ │ datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [ou │
│ 580 │ │ for dataset in datasets: │
│ 581 │ │ │ # Remove task templates if a column mapping of the template is no longer val │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:543 in wrapper │
│ │
│ 540 │ │ │ "output_all_columns": self._output_all_columns, │
│ 541 │ │ } │
│ 542 │ │ # apply actual function │
│ ❱ 543 │ │ out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) │
│ 544 │ │ datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [ou │
│ 545 │ │ # re-apply format to the output │
│ 546 │ │ for dataset in datasets: │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:3073 in map │
│ │
│ 3070 │ │ │ │ │ leave=False, │
│ 3071 │ │ │ │ │ desc=desc or "Map", │
│ 3072 │ │ │ │ ) as pbar: │
│ ❱ 3073 │ │ │ │ │ for rank, done, content in Dataset._map_single(**dataset_kwargs): │
│ 3074 │ │ │ │ │ │ if done: │
│ 3075 │ │ │ │ │ │ │ shards_done += 1 │
│ 3076 │ │ │ │ │ │ │ logger.debug(f"Finished processing shard number {rank} of {n │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:3464 in _map_single │
│ │
│ 3461 │ │ │ │ │ │ │ │ buf_writer, writer, tmp_file = init_buffer_and_writer() │
│ 3462 │ │ │ │ │ │ │ │ stack.enter_context(writer) │
│ 3463 │ │ │ │ │ │ │ if isinstance(batch, pa.Table): │
│ ❱ 3464 │ │ │ │ │ │ │ │ writer.write_table(batch) │
│ 3465 │ │ │ │ │ │ │ else: │
│ 3466 │ │ │ │ │ │ │ │ writer.write_batch(batch) │
│ 3467 │ │ │ │ │ │ num_examples_progress_update += num_examples_in_batch │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_writer.py:567 in write_table │
│ │
│ 564 │ │ │ writer_batch_size = self.writer_batch_size │
│ 565 │ │ if self.pa_writer is None: │
│ 566 │ │ │ self._build_writer(inferred_schema=pa_table.schema) │
│ ❱ 567 │ │ pa_table = pa_table.combine_chunks() │
│ 568 │ │ pa_table = table_cast(pa_table, self._schema) │
│ 569 │ │ if self.embed_local_files: │
│ 570 │ │ │ pa_table = embed_table_storage(pa_table) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyboardInterrupt
``` | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 867 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
I tried trying to catch the hanging issue in action again
```
Pushing dataset shards to the dataset hub: 65%|█████████████████████████████████████████████████████████████████▊ | 127/195 [2:28:02<1:19:15, 69.94s/it]
Error while uploading 'data/train-00127-of-00195-3f8d036ade107c27.parquet' to the Hub.
Pushing split train to the Hub.
Pushing dataset shards to the dataset hub: 64%|████████████████████████████████████████████████████████████████▏ | 124/195 [2:06:10<1:12:14, 61.05s/it]C^[^C^C^C
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /TALI/tali/scripts/validate_dataset.py:127 in <module> │
│ │
│ 124 │ │
│ 125 │ while not succesful_competion: │
│ 126 │ │ try: │
│ ❱ 127 │ │ │ train_dataset.push_to_hub(repo_id="Antreas/TALI-base", max_shard_size="5GB") │
│ 128 │ │ │ succesful_competion = True │
│ 129 │ │ except Exception as e: │
│ 130 │ │ │ print(e) │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/dataset_dict.py:1583 in push_to_hub │
│ │
│ 1580 │ │ for split in self.keys(): │
│ 1581 │ │ │ logger.warning(f"Pushing split {split} to the Hub.") │
│ 1582 │ │ │ # The split=key needs to be removed before merging │
│ ❱ 1583 │ │ │ repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parq │
│ 1584 │ │ │ │ repo_id, │
│ 1585 │ │ │ │ split=split, │
│ 1586 │ │ │ │ private=private, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:5263 in │
│ _push_parquet_shards_to_hub │
│ │
│ 5260 │ │ │
│ 5261 │ │ uploaded_size = 0 │
│ 5262 │ │ shards_path_in_repo = [] │
│ ❱ 5263 │ │ for index, shard in logging.tqdm( │
│ 5264 │ │ │ enumerate(itertools.chain([first_shard], shards_iter)), │
│ 5265 │ │ │ desc="Pushing dataset shards to the dataset hub", │
│ 5266 │ │ │ total=num_shards, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/tqdm/std.py:1178 in __iter__ │
│ │
│ 1175 │ │ time = self._time │
│ 1176 │ │ │
│ 1177 │ │ try: │
│ ❱ 1178 │ │ │ for obj in iterable: │
│ 1179 │ │ │ │ yield obj │
│ 1180 │ │ │ │ # Update and possibly print the progressbar. │
│ 1181 │ │ │ │ # Note: does not call self.update(1) for speed optimisation. │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:5238 in │
│ shards_with_embedded_external_files │
│ │
│ 5235 │ │ │ │ for shard in shards: │
│ 5236 │ │ │ │ │ format = shard.format │
│ 5237 │ │ │ │ │ shard = shard.with_format("arrow") │
│ ❱ 5238 │ │ │ │ │ shard = shard.map( │
│ 5239 │ │ │ │ │ │ embed_table_storage, │
│ 5240 │ │ │ │ │ │ batched=True, │
│ 5241 │ │ │ │ │ │ batch_size=1000, │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:578 in wrapper │
│ │
│ 575 │ │ else: │
│ 576 │ │ │ self: "Dataset" = kwargs.pop("self") │
│ 577 │ │ # apply actual function │
│ ❱ 578 │ │ out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) │
│ 579 │ │ datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [ou │
│ 580 │ │ for dataset in datasets: │
│ 581 │ │ │ # Remove task templates if a column mapping of the template is no longer val │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:543 in wrapper │
│ │
│ 540 │ │ │ "output_all_columns": self._output_all_columns, │
│ 541 │ │ } │
│ 542 │ │ # apply actual function │
│ ❱ 543 │ │ out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) │
│ 544 │ │ datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [ou │
│ 545 │ │ # re-apply format to the output │
│ 546 │ │ for dataset in datasets: │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:3073 in map │
│ │
│ 3070 │ │ │ │ │ leave=False, │
│ 3071 │ │ │ │ │ desc=desc or "Map", │
│ 3072 │ │ │ │ ) as pbar: │
│ ❱ 3073 │ │ │ │ │ for rank, done, content in Dataset._map_single(**dataset_kwargs): │
│ 3074 │ │ │ │ │ │ if done: │
│ 3075 │ │ │ │ │ │ │ shards_done += 1 │
│ 3076 │ │ │ │ │ │ │ logger.debug(f"Finished processing shard number {rank} of {n │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_dataset.py:3464 in _map_single │
│ │
│ 3461 │ │ │ │ │ │ │ │ buf_writer, writer, tmp_file = init_buffer_and_writer() │
│ 3462 │ │ │ │ │ │ │ │ stack.enter_context(writer) │
│ 3463 │ │ │ │ │ │ │ if isinstance(batch, pa.Table): │
│ ❱ 3464 │ │ │ │ │ │ │ │ writer.write_table(batch) │
│ 3465 │ │ │ │ │ │ │ else: │
│ 3466 │ │ │ │ │ │ │ │ writer.write_batch(batch) │
│ 3467 │ │ │ │ │ │ num_examples_progress_update += num_examples_in_batch │
│ │
│ /opt/conda/envs/main/lib/python3.10/site-packages/datasets/arrow_writer.py:567 in write_table │
│ │
│ 564 │ │ │ writer_batch_size = self.writer_batch_size │
│ 565 │ │ if self.pa_writer is None: │
│ 566 │ │ │ self._build_writer(inferred_schema=pa_table.schema) │
│ ❱ 567 │ │ pa_table = pa_table.combine_chunks() │
│ 568 │ │ pa_table = table_cast(pa_table, self._schema) │
│ 569 │ │ if self.embed_local_files: │
│ 570 │ │ │ pa_table = embed_table_storage(pa_table) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyboardInterrupt
``` | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | I'm on my phone so can't help that much. What I'd advice to do is to [save_to_disk](https://huggingface.co/docs/datasets/package_reference/main_classes#save_to_disk) if it's not already done and then upload the files/folder to the Hub separately. You can find what you need in the [upload guide](https://huggingface.co/docs/huggingface_hub/guides/upload). It might not help finding the exact issue for now but at least it can unblock you. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 58 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
I'm on my phone so can't help that much. What I'd advice to do is to [save_to_disk](https://huggingface.co/docs/datasets/package_reference/main_classes#save_to_disk) if it's not already done and then upload the files/folder to the Hub separately. You can find what you need in the [upload guide](https://huggingface.co/docs/huggingface_hub/guides/upload). It might not help finding the exact issue for now but at least it can unblock you. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | In your last stacktrace it interrupted while embedding external content - in case your dataset in made of images or audio files that live on your disk. Is it the case ? | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 32 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
In your last stacktrace it interrupted while embedding external content - in case your dataset in made of images or audio files that live on your disk. Is it the case ? | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | It's maybe related to https://github.com/apache/arrow/issues/34455: are you using ArrayND features ?
Also what's your `pyarrow` version ? Could you try updating to >= 12.0.1 ? | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 25 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
It's maybe related to https://github.com/apache/arrow/issues/34455: are you using ArrayND features ?
Also what's your `pyarrow` version ? Could you try updating to >= 12.0.1 ? | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | I was using pyarrow == 12.0.0
I am not explicitly using ArrayND features, unless the hub API automatically converts my files to such. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 23 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
I was using pyarrow == 12.0.0
I am not explicitly using ArrayND features, unless the hub API automatically converts my files to such. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | You can also try to reduce the `max_shard_size` - Sometimes parquet has a hard time working with data bigger than 2GB | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 21 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
You can also try to reduce the `max_shard_size` - Sometimes parquet has a hard time working with data bigger than 2GB | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | So, updating the pyarrow seems to help. It can still throw errors here and there but I can retry when that happens. It's better than hanging.
However, I am a bit confused about something. I have uploaded my datasets, but while earlier I could see all three sets, now I can only see 1. What's going on?
https://huggingface.co/datasets/Antreas/TALI-base
I have seen this happen before as well, so I deleted and reuploaded, but this dataset is way too large for me to do this. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 83 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
So, updating the pyarrow seems to help. It can still throw errors here and there but I can retry when that happens. It's better than hanging.
However, I am a bit confused about something. I have uploaded my datasets, but while earlier I could see all three sets, now I can only see 1. What's going on?
https://huggingface.co/datasets/Antreas/TALI-base
I have seen this happen before as well, so I deleted and reuploaded, but this dataset is way too large for me to do this. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | It's a bug on our side, I'll update the dataset viewer ;)
Thanks for reporting ! | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 16 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
It's a bug on our side, I'll update the dataset viewer ;)
Thanks for reporting ! | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Apparently this happened because of bad modifications in the README.md split metadata.
I fixed them in this PR: https://huggingface.co/datasets/Antreas/TALI-base/discussions/1 | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 19 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Apparently this happened because of bad modifications in the README.md split metadata.
I fixed them in this PR: https://huggingface.co/datasets/Antreas/TALI-base/discussions/1 | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | @lhoestq It's a bit odd that when uploading a dataset, one set at a time "train", "val", "test", the push_to_hub function overwrites the readme and removes differently named sets from previous commits. i.e., you push "val", all is well. Then you push "test", and the "val" entry disappears from the readme, while the data remain intact. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 56 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
@lhoestq It's a bit odd that when uploading a dataset, one set at a time "train", "val", "test", the push_to_hub function overwrites the readme and removes differently named sets from previous commits. i.e., you push "val", all is well. Then you push "test", and the "val" entry disappears from the readme, while the data remain intact. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Also, just found another related issue. One of the many that make things hang or fail when pushing to hub.
In the following code:
```python
train_generator = lambda: data_generator("train", percentage=1.0)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
print(f"Pushing TALI-large to hub")
dataset = datasets.DatasetDict(
{"train": train_data, "val": val_data, "test": test_data}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-large", max_shard_size="2GB")
succesful_competion = True
except Exception as e:
print(e)
```
Things keep failing in the push_to_repo step, at random places, with the following error:
```bash
Pushing dataset shards to the dataset hub: 7%|██████████▋ | 67/950 [42:41<9:22:37, 38.23s/it]
Error while uploading 'data/train-00067-of-00950-a4d179ed5a593486.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.81ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.20s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.48ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:15<00:00, 15.30s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.39ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.52s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.47ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.39s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.26ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:38<?, ?it/s]
Pushing dataset shards to the dataset hub: 7%|███████████▎ | 71/950 [44:37<9:12:28, 37.71s/it]
Error while uploading 'data/train-00071-of-00950-72bab6e5cb223aee.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.18ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.94s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.36ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.67s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.57ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.16s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.68ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:09<00:00, 9.63s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.36ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.67s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.37ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:39<?, ?it/s]
Pushing dataset shards to the dataset hub: 8%|████████████ | 76/950 [46:21<8:53:08, 36.60s/it]
Error while uploading 'data/train-00076-of-00950-b90e4e3b433db179.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.21ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:25<00:00, 25.40s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.56ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.40s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.49ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.53s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.27ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.25s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.42ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.03s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.39ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:39<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|████████████▊ | 81/950 [48:30<8:40:22, 35.93s/it]
Error while uploading 'data/train-00081-of-00950-84b0450a1df093a9.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.18ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.65s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.92ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:38<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|█████████████ | 82/950 [48:55<8:37:57, 35.80s/it]
Error while uploading 'data/train-00082-of-00950-0a1f52da35653e08.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.31ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:26<00:00, 26.29s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.42ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.57s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.64ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.35s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.64ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.74s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.31ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:40<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|█████████████▋ | 86/950 [50:48<8:30:25, 35.45s/it]
Error while uploading 'data/train-00086-of-00950-e1cc80dd17191b20.parquet' to the Hub.
```
I have a while loop that forces retries, but it seems that the progress itself is randomly getting lost as well. Any ideas on how to improve this? It has been blocking me for way too long.
Should I build the parquet manually and then push manually as well? If I do things manually, how can I ensure my dataset works properly with "stream=True"?
Thank you for your help and time. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 738 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Also, just found another related issue. One of the many that make things hang or fail when pushing to hub.
In the following code:
```python
train_generator = lambda: data_generator("train", percentage=1.0)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
print(f"Pushing TALI-large to hub")
dataset = datasets.DatasetDict(
{"train": train_data, "val": val_data, "test": test_data}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-large", max_shard_size="2GB")
succesful_competion = True
except Exception as e:
print(e)
```
Things keep failing in the push_to_repo step, at random places, with the following error:
```bash
Pushing dataset shards to the dataset hub: 7%|██████████▋ | 67/950 [42:41<9:22:37, 38.23s/it]
Error while uploading 'data/train-00067-of-00950-a4d179ed5a593486.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.81ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.20s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.48ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:15<00:00, 15.30s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.39ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.52s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.47ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.39s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.26ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:38<?, ?it/s]
Pushing dataset shards to the dataset hub: 7%|███████████▎ | 71/950 [44:37<9:12:28, 37.71s/it]
Error while uploading 'data/train-00071-of-00950-72bab6e5cb223aee.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.18ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.94s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.36ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.67s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.57ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.16s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.68ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:09<00:00, 9.63s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.36ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.67s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.37ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:39<?, ?it/s]
Pushing dataset shards to the dataset hub: 8%|████████████ | 76/950 [46:21<8:53:08, 36.60s/it]
Error while uploading 'data/train-00076-of-00950-b90e4e3b433db179.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.21ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:25<00:00, 25.40s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.56ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.40s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.49ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.53s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.27ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.25s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.42ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.03s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.39ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:39<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|████████████▊ | 81/950 [48:30<8:40:22, 35.93s/it]
Error while uploading 'data/train-00081-of-00950-84b0450a1df093a9.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.18ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.65s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.92ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:38<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|█████████████ | 82/950 [48:55<8:37:57, 35.80s/it]
Error while uploading 'data/train-00082-of-00950-0a1f52da35653e08.parquet' to the Hub.
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.31ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:26<00:00, 26.29s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.42ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.57s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.64ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:10<00:00, 10.35s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.64ba/s]
Upload 1 LFS files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.74s/it]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2.31ba/s]
Upload 1 LFS files: 0%| | 0/1 [16:40<?, ?it/s]
Pushing dataset shards to the dataset hub: 9%|█████████████▋ | 86/950 [50:48<8:30:25, 35.45s/it]
Error while uploading 'data/train-00086-of-00950-e1cc80dd17191b20.parquet' to the Hub.
```
I have a while loop that forces retries, but it seems that the progress itself is randomly getting lost as well. Any ideas on how to improve this? It has been blocking me for way too long.
Should I build the parquet manually and then push manually as well? If I do things manually, how can I ensure my dataset works properly with "stream=True"?
Thank you for your help and time. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | > @lhoestq It's a bit odd that when uploading a dataset, one set at a time "train", "val", "test", the push_to_hub function overwrites the readme and removes differently named sets from previous commits. i.e., you push "val", all is well. Then you push "test", and the "val" entry disappears from the readme, while the data remain intact.
Hmm this shouldn't happen. What code did you run exactly ? Using which version of `datasets` ? | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 74 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
> @lhoestq It's a bit odd that when uploading a dataset, one set at a time "train", "val", "test", the push_to_hub function overwrites the readme and removes differently named sets from previous commits. i.e., you push "val", all is well. Then you push "test", and the "val" entry disappears from the readme, while the data remain intact.
Hmm this shouldn't happen. What code did you run exactly ? Using which version of `datasets` ? | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | > I have a while loop that forces retries, but it seems that the progress itself is randomly getting lost as well. Any ideas on how to improve this? It has been blocking me for way too long.
Could you also print the cause of the error (`e.__cause__`) ? Or show the full stack trace when the error happens ?
This would give more details about why it failed and would help investigate. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 73 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
> I have a while loop that forces retries, but it seems that the progress itself is randomly getting lost as well. Any ideas on how to improve this? It has been blocking me for way too long.
Could you also print the cause of the error (`e.__cause__`) ? Or show the full stack trace when the error happens ?
This would give more details about why it failed and would help investigate. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | > Should I build the parquet manually and then push manually as well? If I do things manually, how can I ensure my dataset works properly with "stream=True"?
Parquet is supported out of the box ^^
If you want to make sure it works as expected you can try locally first:
```python
ds = load_dataset("path/to/local", streaming=True)
``` | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 57 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
> Should I build the parquet manually and then push manually as well? If I do things manually, how can I ensure my dataset works properly with "stream=True"?
Parquet is supported out of the box ^^
If you want to make sure it works as expected you can try locally first:
```python
ds = load_dataset("path/to/local", streaming=True)
``` | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | @lhoestq @AntreasAntoniou I transferred this issue to the `datasets` repository as the questions and answers are more related to this repo. Hope it can help other users find the bug and fixes more easily (like updating [tqdm](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120204) and [pyarrow](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120278) or [setting a lower `max_shard_size`](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120328)).
~For the initial "pushing large dataset consistently hangs"-issue, I still think it's best to try to `save_to_disk` first and then upload it manually/with a script (see [upload_folder](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder)). It's not the most satisfying solution but at least it would confirm from where the problem comes from.~
**EDIT:** removed suggestion about saving to disk first (see https://github.com/huggingface/datasets/issues/5990#issuecomment-1607186914). | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 99 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
@lhoestq @AntreasAntoniou I transferred this issue to the `datasets` repository as the questions and answers are more related to this repo. Hope it can help other users find the bug and fixes more easily (like updating [tqdm](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120204) and [pyarrow](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120278) or [setting a lower `max_shard_size`](https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120328)).
~For the initial "pushing large dataset consistently hangs"-issue, I still think it's best to try to `save_to_disk` first and then upload it manually/with a script (see [upload_folder](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder)). It's not the most satisfying solution but at least it would confirm from where the problem comes from.~
**EDIT:** removed suggestion about saving to disk first (see https://github.com/huggingface/datasets/issues/5990#issuecomment-1607186914). | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | > @lhoestq @AntreasAntoniou I transferred this issue to the datasets repository as the questions and answers are more related to this repo. Hope it can help other users find the bug and fixes more easily (like updating https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120204 and https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120278 or https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120328).
thanks :)
> For the initial "pushing large dataset consistently hangs"-issue, I still think it's best to try to save_to_disk first and then upload it manually/with a script (see [upload_folder](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder)). It's not the most satisfying solution but at least it would confirm from where the problem comes from.
As I've already said in other discussions, I would not recommend pushing files saved with `save_to_disk` to the Hub but save to parquet shards and upload them instead. The Hub does not support datasets saved with `save_to_disk`, which is meant for disk only. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 133 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
> @lhoestq @AntreasAntoniou I transferred this issue to the datasets repository as the questions and answers are more related to this repo. Hope it can help other users find the bug and fixes more easily (like updating https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120204 and https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120278 or https://github.com/huggingface/datasets/issues/5990#issuecomment-1607120328).
thanks :)
> For the initial "pushing large dataset consistently hangs"-issue, I still think it's best to try to save_to_disk first and then upload it manually/with a script (see [upload_folder](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder)). It's not the most satisfying solution but at least it would confirm from where the problem comes from.
As I've already said in other discussions, I would not recommend pushing files saved with `save_to_disk` to the Hub but save to parquet shards and upload them instead. The Hub does not support datasets saved with `save_to_disk`, which is meant for disk only. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | > As I've already said in other discussions, I would not recommend pushing files saved with save_to_disk to the Hub but save to parquet shards and upload them instead. The Hub does not support datasets saved with save_to_disk, which is meant for disk only.
Well noted, thanks. That part was not clear to me :) | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 55 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
> As I've already said in other discussions, I would not recommend pushing files saved with save_to_disk to the Hub but save to parquet shards and upload them instead. The Hub does not support datasets saved with save_to_disk, which is meant for disk only.
Well noted, thanks. That part was not clear to me :) | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | Sorry for not replying in a few days, I was on leave. :)
So, here are more information as to the error that causes some of the delay
```bash
Pushing Antreas/TALI-tiny to hub
Attempting to push to hub
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.06s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.15s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:26<00:00, 4.45s/ba]
/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/lfs.py:310: UserWarning: hf_transfer is enabled but does not support uploading from bytes or BinaryIO, falling back to regular upload
warnings.warn(
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:25<00:00, 4.26s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:27<00:00, 4.58s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.10s/ba]
Pushing dataset shards to the dataset hub: 22%|████████████████████████▎ | 5/23 [52:23<3:08:37, 628.74s/it]
Exception: Error while uploading 'data/train-00005-of-00023-e224d901fd65e062.parquet' to the Hub., with stacktrace: <traceback object at 0x7f745458d0c0>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/7c/d3/7cd385d9324302dc13e3986331d72d9be6fa0174c63dcfe0e08cd474f7f1e8b7/3415166ae28c0beccbbc692f38742b8dea2c197f5c805321104e888d21d7eb90?X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230627%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230627T003349Z&X-Amz-Expires=86400&X-Amz-Signature=5a12ff96f2
91f644134170992a6628e5f3c4e7b2e7fc3e940b4378fe11ae5390&X-Amz-SignedHeaders=host&partNumber=1&uploadId=JSsK8r63XSF.VlKQx3Vf8OW4DEVp5YIIY7LPnuapNIegsxs5EHgM1p4u0.Nn6_wlPlQnvxm8HKMxZhczKE9KB74t0etB
oLcxqBIvsgey3uXBTZMAEGwU6y7CDUADiEIO&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
```
One issue is that the uploading does not continue from the chunk it failed off. It often continues from a very old chunk. e.g. if it failed on chunk 192/250, it will continue from say 53/250, and this behaviour appears almost random. | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 228 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Sorry for not replying in a few days, I was on leave. :)
So, here are more information as to the error that causes some of the delay
```bash
Pushing Antreas/TALI-tiny to hub
Attempting to push to hub
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.06s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.15s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:26<00:00, 4.45s/ba]
/opt/conda/envs/main/lib/python3.10/site-packages/huggingface_hub/lfs.py:310: UserWarning: hf_transfer is enabled but does not support uploading from bytes or BinaryIO, falling back to regular upload
warnings.warn(
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:25<00:00, 4.26s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:27<00:00, 4.58s/ba]
Creating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:24<00:00, 4.10s/ba]
Pushing dataset shards to the dataset hub: 22%|████████████████████████▎ | 5/23 [52:23<3:08:37, 628.74s/it]
Exception: Error while uploading 'data/train-00005-of-00023-e224d901fd65e062.parquet' to the Hub., with stacktrace: <traceback object at 0x7f745458d0c0>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/7c/d3/7cd385d9324302dc13e3986331d72d9be6fa0174c63dcfe0e08cd474f7f1e8b7/3415166ae28c0beccbbc692f38742b8dea2c197f5c805321104e888d21d7eb90?X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230627%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230627T003349Z&X-Amz-Expires=86400&X-Amz-Signature=5a12ff96f2
91f644134170992a6628e5f3c4e7b2e7fc3e940b4378fe11ae5390&X-Amz-SignedHeaders=host&partNumber=1&uploadId=JSsK8r63XSF.VlKQx3Vf8OW4DEVp5YIIY7LPnuapNIegsxs5EHgM1p4u0.Nn6_wlPlQnvxm8HKMxZhczKE9KB74t0etB
oLcxqBIvsgey3uXBTZMAEGwU6y7CDUADiEIO&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
```
One issue is that the uploading does not continue from the chunk it failed off. It often continues from a very old chunk. e.g. if it failed on chunk 192/250, it will continue from say 53/250, and this behaviour appears almost random. | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | So, other than the random connection drops here and there, any idea why the progress does not continue where it left off?
```bash
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 10.79ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.65ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.39ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.04ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.52ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 12.28ba/s]
Pushing dataset shards to the dataset hub: 20%|██████████████████████ | 75/381 [1:34:39<6:26:11, 75.72s/it]
Exception: Error while uploading 'data/train-00075-of-00381-1614bc251b778766.parquet' to the Hub., with stacktrace: <traceback object at 0x7fab6d9a4980>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/3b/31/3b311464573d8d63b137fcd5b40af1e7a5b1306843c88e80372d0117157504e5/ed8dae933fb79ae1ef5fb1f698f5125d3e1c02977ac69438631f152bb3bfdd1e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-
Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230629T053004Z&X-Amz-Expires=86400&X-Amz-Signature=da2b26270edfd6d0
d069c015a5a432031107a8664c3f0917717e5e40c688183c&X-Amz-SignedHeaders=host&partNumber=1&uploadId=2erWGHTh3ICqBLU_QvHfnygZ2tkMWbL0rEqpJdYohCKHUHnfwMjvoBIg0TI_KSGn4rSKxUxOyqSIzFUFSRSzixZeLeneaXJOw.Qx8
zLKSV5xV7HRQDj4RBesNve6cSoo&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 12.09ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 11.51ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 10.77ba/s]
Pushing dataset shards to the dataset hub: 20%|██████████████████████▋ | 77/381 [1:32:50<6:06:34, 72.35s/it]
Exception: Error while uploading 'data/train-00077-of-00381-368b2327a9908aab.parquet' to the Hub., with stacktrace: <traceback object at 0x7fab45b27f80>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/3b/31/3b311464573d8d63b137fcd5b40af1e7a5b1306843c88e80372d0117157504e5/9462ff2c5e61283b53b091984a22de2f41a2f6e37b681171e2eca4a998f979cb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-
Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230629T070510Z&X-Amz-Expires=86400&X-Amz-Signature=9ab8487b93d443cd
21f05476405855d46051a0771b4986bbb20f770ded21b1a4&X-Amz-SignedHeaders=host&partNumber=1&uploadId=UiHX1B.DcoAO2QmIHpWpCuNPwhXU_o1dsTkTGPqZt1P51o9k0yz.EsFD9eKpQMwgAST3jOatRG78I_JWRBeLBDYYVNp8r0TpIdeSg
eUg8uwPZOCPw9y5mWOw8MWJrnBo&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
Pushing dataset shards to the dataset hub: 8%|████████▋ | 29/381 [27:39<5:50:03, 59.67s/it]
Map: 36%|████████████████████████████████████████████████████ | 1000/2764 [00:35<00:34, 51.63 examples/Map: 72%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 2000/2764 [00:40<00:15, 49.06 examples/Map: 72%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 2000/2764 [00:55<00:15, 49.06 examples/Map: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2764/2764 [00:56<00:00, 48.82 examples/Pushing dataset shards to the dataset hub: 8%|████████▉ | 30/381 [28:35<5:43:03, 58.64s/iPushing dataset shards to the dataset hub: 8%|█████████▎ | 31/381 [29:40<5:52:18, 60.40s/iPushing dataset shards to the dataset hub: 8%|█████████▌ | 32/381 [30:46<6:02:20, 62.29s/it]
Map: 36%|███████████████████████████████████████████████████▎
```
This is actually the issue that wastes the most time for me, and I need it fixed. Please advice on how I can go about it.
Notice how the progress goes from
| 77/381 to 30/381 | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 352 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
So, other than the random connection drops here and there, any idea why the progress does not continue where it left off?
```bash
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 10.79ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.65ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.39ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.04ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 13.52ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 12.28ba/s]
Pushing dataset shards to the dataset hub: 20%|██████████████████████ | 75/381 [1:34:39<6:26:11, 75.72s/it]
Exception: Error while uploading 'data/train-00075-of-00381-1614bc251b778766.parquet' to the Hub., with stacktrace: <traceback object at 0x7fab6d9a4980>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/3b/31/3b311464573d8d63b137fcd5b40af1e7a5b1306843c88e80372d0117157504e5/ed8dae933fb79ae1ef5fb1f698f5125d3e1c02977ac69438631f152bb3bfdd1e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-
Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230629T053004Z&X-Amz-Expires=86400&X-Amz-Signature=da2b26270edfd6d0
d069c015a5a432031107a8664c3f0917717e5e40c688183c&X-Amz-SignedHeaders=host&partNumber=1&uploadId=2erWGHTh3ICqBLU_QvHfnygZ2tkMWbL0rEqpJdYohCKHUHnfwMjvoBIg0TI_KSGn4rSKxUxOyqSIzFUFSRSzixZeLeneaXJOw.Qx8
zLKSV5xV7HRQDj4RBesNve6cSoo&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 12.09ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 11.51ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [00:02<00:00, 10.77ba/s]
Pushing dataset shards to the dataset hub: 20%|██████████████████████▋ | 77/381 [1:32:50<6:06:34, 72.35s/it]
Exception: Error while uploading 'data/train-00077-of-00381-368b2327a9908aab.parquet' to the Hub., with stacktrace: <traceback object at 0x7fab45b27f80>, and type: <class 'RuntimeError'>, and
cause: HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443): Max retries exceeded with url:
/lfs.huggingface.co/repos/3b/31/3b311464573d8d63b137fcd5b40af1e7a5b1306843c88e80372d0117157504e5/9462ff2c5e61283b53b091984a22de2f41a2f6e37b681171e2eca4a998f979cb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-
Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20230629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230629T070510Z&X-Amz-Expires=86400&X-Amz-Signature=9ab8487b93d443cd
21f05476405855d46051a0771b4986bbb20f770ded21b1a4&X-Amz-SignedHeaders=host&partNumber=1&uploadId=UiHX1B.DcoAO2QmIHpWpCuNPwhXU_o1dsTkTGPqZt1P51o9k0yz.EsFD9eKpQMwgAST3jOatRG78I_JWRBeLBDYYVNp8r0TpIdeSg
eUg8uwPZOCPw9y5mWOw8MWJrnBo&x-id=UploadPart (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
Push failed, retrying
Attempting to push to hub
Pushing split train to the Hub.
Pushing dataset shards to the dataset hub: 8%|████████▋ | 29/381 [27:39<5:50:03, 59.67s/it]
Map: 36%|████████████████████████████████████████████████████ | 1000/2764 [00:35<00:34, 51.63 examples/Map: 72%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 2000/2764 [00:40<00:15, 49.06 examples/Map: 72%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 2000/2764 [00:55<00:15, 49.06 examples/Map: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2764/2764 [00:56<00:00, 48.82 examples/Pushing dataset shards to the dataset hub: 8%|████████▉ | 30/381 [28:35<5:43:03, 58.64s/iPushing dataset shards to the dataset hub: 8%|█████████▎ | 31/381 [29:40<5:52:18, 60.40s/iPushing dataset shards to the dataset hub: 8%|█████████▌ | 32/381 [30:46<6:02:20, 62.29s/it]
Map: 36%|███████████████████████████████████████████████████▎
```
This is actually the issue that wastes the most time for me, and I need it fixed. Please advice on how I can go about it.
Notice how the progress goes from
| 77/381 to 30/381 | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5990 | Pushing a large dataset on the hub consistently hangs | If the any shard is missing on the Hub, it will re-upload it. It looks like the 30th shard was missing on the Hub in your case.
It also means that the other files up to the 77th that were successfully uploaded won't be uploaded again.
cc @mariosasko who might know better | ### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| 52 | Pushing a large dataset on the hub consistently hangs
### Describe the bug
Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help.
I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it.
### Reproduction
```python
import multiprocessing as mp
import pathlib
from math import ceil
import datasets
import numpy as np
from tqdm.auto import tqdm
from tali.data.data import select_subtitles_between_timestamps
from tali.utils import load_json
tali_dataset_dir = "/data/"
if __name__ == "__main__":
full_dataset = datasets.load_dataset(
"Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir
)
def data_generator(set_name, percentage: float = 1.0):
dataset = full_dataset[set_name]
for item in tqdm(dataset):
video_list = item["youtube_content_video"]
video_list = np.random.choice(
video_list, int(ceil(len(video_list) * percentage))
)
if len(video_list) == 0:
continue
captions = item["youtube_subtitle_text"]
captions = select_subtitles_between_timestamps(
subtitle_dict=load_json(
captions.replace(
"/data/",
tali_dataset_dir,
)
),
starting_timestamp=0,
ending_timestamp=100000000,
)
for video_path in video_list:
temp_path = video_path.replace("/data/", tali_dataset_dir)
video_path_actual: pathlib.Path = pathlib.Path(temp_path)
if video_path_actual.exists():
item["youtube_content_video"] = open(video_path_actual, "rb").read()
item["youtube_subtitle_text"] = captions
yield item
train_generator = lambda: data_generator("train", percentage=0.1)
val_generator = lambda: data_generator("val")
test_generator = lambda: data_generator("test")
train_data = datasets.Dataset.from_generator(
train_generator,
num_proc=mp.cpu_count(),
writer_batch_size=5000,
cache_dir=tali_dataset_dir,
)
val_data = datasets.Dataset.from_generator(
val_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
test_data = datasets.Dataset.from_generator(
test_generator,
writer_batch_size=5000,
num_proc=mp.cpu_count(),
cache_dir=tali_dataset_dir,
)
dataset = datasets.DatasetDict(
{
"train": train_data,
"val": val_data,
"test": test_data,
}
)
succesful_competion = False
while not succesful_competion:
try:
dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB")
succesful_competion = True
except Exception as e:
print(e)
```
### Logs
```shell
Pushing dataset shards to the dataset hub: 33%|██████████████████████████████████████▎ | 7/21 [24:33<49:06, 210.45s/it]
Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub.
Pushing split train to the Hub.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [42:10<00:00, 55.01s/it]
Pushing split val to the Hub.
Resuming upload of the dataset shards.
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.55ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.51s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.39ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:30<00:00, 30.19s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.28ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:24<00:00, 24.08s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.42ba/s]
Upload 1 LFS files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:23<00:00, 23.97s/it]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.49ba/s]
Creating parquet from Arrow format: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.54ba/s^
Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s]
Pushing dataset shards to the dataset hub: 52%|████████████████████████████████████████████████████████████▏ | 11/21 [17:23<15:48, 94.82s/it]
That's where it got stuck
```
### System info
```shell
- huggingface_hub version: 0.15.1
- Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Antreas
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.0.dev20230606+cu121
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
If the any shard is missing on the Hub, it will re-upload it. It looks like the 30th shard was missing on the Hub in your case.
It also means that the other files up to the 77th that were successfully uploaded won't be uploaded again.
cc @mariosasko who might know better | [
0.03865755721926689,
0.11689368635416031,
-0.0473719947040081,
-0.09907802194356918,
0.16644351184368134,
0.009385974146425724,
-0.05666324496269226,
0.03408709913492203,
-0.11329492181539536,
0.16055893898010254,
0.05125632882118225,
-0.07781993597745895,
-0.14904151856899261,
0.0869891569018364,
-0.11498305946588516,
0.1134694516658783,
-0.1159389540553093,
-0.02163846604526043,
0.12787537276744843,
-0.07123962789773941,
-0.09823812544345856,
0.02027013525366783,
0.26775747537612915,
-0.1193983405828476,
-0.13924750685691833,
-0.24715107679367065,
-0.12219683080911636,
0.011527085676789284,
-0.07095714658498764,
-0.033736761659383774,
-0.11205939203500748,
0.05906478688120842,
-0.07212590426206589,
0.3234748840332031,
0.000004467287908482831,
-0.016201015561819077,
0.13181914389133453,
-0.04429974406957626,
-0.09592925012111664,
0.1241917833685875,
0.23636585474014282,
-0.24002699553966522,
-0.05182290077209473,
-0.045623425394296646,
0.0903310552239418,
0.14386363327503204,
0.07148095965385437,
-0.0910646989941597,
0.15945422649383545,
-0.10630300641059875,
-0.07115338742733002,
0.03708983212709427,
0.01501974742859602,
0.02006637118756771,
-0.023613473400473595,
0.048006195574998856,
0.036027103662490845,
-0.013340438716113567,
0.12705188989639282,
-0.016438545659184456,
0.0654560849070549,
0.02997497096657753,
-0.07903174310922623,
-0.09821708500385284,
-0.01907445304095745,
-0.027044305577874184,
-0.15124185383319855,
-0.27752938866615295,
0.02828516624867916,
0.22232326865196228,
-0.12872326374053955,
-0.08433189988136292,
-0.13978657126426697,
0.10537771880626678,
-0.14728237688541412,
-0.004179873503744602,
-0.03599121421575546,
0.1967441439628601,
-0.17342807352542877,
-0.05125581845641136,
-0.012907612137496471,
-0.07543908059597015,
0.011832956224679947,
-0.05106280371546745,
-0.12338981032371521,
-0.024512119591236115,
-0.060343388468027115,
0.07609420269727707,
0.011230080388486385,
0.08656372129917145,
0.22439193725585938,
-0.08050896227359772,
0.03788859397172928,
-0.17310188710689545,
-0.3190120458602905,
-0.0012692117597907782,
0.05810312554240227,
-0.08396880328655243,
-0.11565976589918137,
-0.13302819430828094,
-0.12425442785024643,
0.17009106278419495,
-0.07839419692754745,
0.04145445302128792,
0.07350555062294006,
-0.11984561383724213,
-0.12832671403884888,
-0.12621726095676422,
0.16342684626579285,
0.048469074070453644,
-0.14146645367145538,
0.21670623123645782,
-0.046812355518341064,
0.08885066956281662,
0.24078787863254547,
-0.1535753607749939,
0.21681621670722961,
0.08045261353254318,
-0.027558187022805214,
0.1990242749452591,
-0.02576105110347271,
0.12024939060211182,
0.015962056815624237,
0.09362295269966125,
0.13183467090129852,
0.17890290915966034,
-0.13748033344745636,
-0.06156979128718376,
-0.0887533500790596,
0.081446073949337,
-0.01348526868969202,
-0.06523820012807846,
0.11341969668865204,
-0.08767645061016083,
0.13216298818588257,
-0.10305961221456528,
-0.04458374157547951,
-0.09211573004722595,
0.15367524325847626,
0.06578435003757477,
0.014847512356936932,
-0.21564270555973053,
0.03535296767950058,
0.1367615908384323,
0.0982365682721138,
0.23254722356796265,
0.023178376257419586,
0.033780988305807114,
-0.07274957746267319,
-0.03546888753771782,
-0.17138370871543884,
0.1650802344083786,
0.06030787527561188,
0.10065227746963501,
-0.009930694475769997,
0.07509332150220871,
-0.044751912355422974,
-0.1772438883781433,
-0.22993242740631104,
0.05984330549836159,
0.04903028905391693,
0.06206241995096207,
0.07723540812730789,
0.08700987696647644,
0.00417230324819684,
0.19490627944469452,
0.013233386911451817,
0.19459819793701172,
0.05835964158177376,
0.29247015714645386,
0.07054343819618225,
-0.007795675192028284,
0.11981469392776489,
-0.0018860878190025687,
-0.07051725685596466,
0.06951531767845154,
-0.29328280687332153,
-0.12301872670650482,
-0.17808637022972107,
-0.01636815443634987,
-0.022352414205670357,
-0.09855978935956955,
-0.13314612209796906,
0.0034491231199353933,
0.23632922768592834,
-0.15957985818386078,
0.2077021598815918,
0.15342167019844055,
-0.14581838250160217,
0.10243507474660873,
-0.0758478045463562,
-0.01370817981660366,
-0.16797229647636414,
0.0861024260520935,
0.08446396142244339,
-0.20075790584087372,
0.0128271309658885,
0.12126506119966507,
0.17042025923728943,
-0.05813782289624214,
0.20500876009464264,
0.0011897936929017305,
0.08733399957418442,
-0.0011564015876501799,
-0.015722062438726425,
-0.10432404279708862,
-0.2005102038383484,
0.14359374344348907,
0.21302784979343414,
-0.16237278282642365,
-0.22459176182746887,
0.09327760338783264,
-0.1151973307132721,
0.050607599318027496,
-0.15665490925312042,
-0.08232491463422775,
-0.09084365516901016,
-0.04690614715218544,
-0.1786777377128601,
0.08640922605991364,
-0.09627005457878113,
0.18655867874622345,
0.029692919924855232,
0.021188978105783463,
-0.02754242531955242,
0.18202310800552368,
0.052694790065288544,
-0.06560708582401276,
0.11412086337804794,
-0.026617981493473053,
-0.05652151256799698,
-0.1474304497241974,
0.11980272084474564,
-0.10569516569375992,
-0.07338758558034897,
-0.006451168563216925,
0.16463236510753632,
-0.1633768528699875,
0.1310214400291443,
0.012955197133123875,
-0.09076309204101562,
0.08270054310560226,
-0.10896270722150803,
-0.04200814291834831,
0.04347439110279083,
0.015207531861960888,
-0.0052786036394536495,
0.24043652415275574,
0.029028136283159256,
0.058821722865104675,
0.0718189999461174,
0.09525498747825623,
0.061406686902046204,
0.1519385576248169,
0.14409250020980835,
0.06716030091047287,
0.0656518042087555,
0.1140226498246193,
-0.038710471242666245,
0.13944554328918457,
0.34624791145324707,
-0.08286632597446442,
-0.031166167929768562,
0.04693710058927536,
0.062070008367300034,
0.11350133270025253,
-0.018712788820266724,
0.05201723799109459,
-0.05823701247572899,
0.0508863665163517,
-0.015454218722879887,
-0.16497927904129028,
-0.007428752724081278,
-0.1642351895570755,
-0.17392732203006744,
0.017566388472914696,
-0.04570591822266579,
-0.08362870663404465,
-0.1111120954155922,
-0.06748994439840317,
0.0866222232580185,
0.02494480274617672,
0.09711609780788422,
-0.03920937329530716,
0.04878239706158638,
0.09005532413721085,
0.023156458511948586,
-0.02240634895861149,
0.0573679581284523,
-0.0961320549249649,
-0.0578547827899456,
-0.2162407636642456,
0.07812298089265823,
-0.09760088473558426,
0.05235445126891136,
-0.07137442380189896,
0.11058183759450912,
-0.055980030447244644,
-0.023723753169178963,
-0.06495996564626694,
-0.0010770679218694568,
0.04522227868437767,
0.08073610812425613,
-0.04707194119691849,
0.0827304795384407,
0.011626885272562504,
0.04012046381831169,
0.05271447077393532,
-0.08052891492843628,
0.036573562771081924,
0.008938160724937916,
-0.07943851500749588,
-0.09323862940073013,
0.04786240682005882,
-0.07500889152288437,
0.21005840599536896,
-0.07252489030361176,
-0.10466767847537994,
-0.01852036826312542,
0.07067515701055527,
-0.01208185963332653,
0.1377696394920349,
-0.13654202222824097,
-0.020863303914666176,
0.07486200332641602,
0.07654497027397156,
-0.1283319592475891,
-0.060425207018852234,
-0.10545378178358078,
0.02411038614809513,
0.022915858775377274,
-0.06689874827861786,
-0.1608808934688568,
0.04041258990764618,
0.05331334471702576,
-0.26976457238197327,
0.041791968047618866,
-0.16060508787631989,
0.23875398933887482,
0.03513624891638756,
-0.05411966145038605,
0.009545106440782547,
-0.09013532847166061,
-0.053299371153116226,
0.07588449120521545,
-0.11706630140542984,
-0.025190509855747223,
-0.22545169293880463,
0.23568524420261383,
0.09941260516643524,
-0.1426740288734436,
0.09504333138465881,
-0.04688845947384834,
-0.18883304297924042,
0.03559407219290733,
0.237422376871109,
-0.2023625522851944,
0.3393239378929138,
-0.17236091196537018,
0.14613470435142517,
-0.04221515730023384,
0.09960082918405533,
0.20130810141563416,
0.16112808883190155,
-0.2840839624404907,
0.0005720676272176206,
0.18024680018424988,
-0.10790831595659256,
-0.09614400565624237,
-0.14417798817157745,
0.047045499086380005,
-0.12961015105247498,
-0.20300331711769104,
-0.009573419578373432,
0.07483673095703125,
0.00026854051975533366,
0.08060810714960098,
-0.030308019369840622,
0.0750609040260315,
-0.09598644077777863,
0.08555088192224503,
-0.0798824205994606,
-0.1628270447254181,
0.10584483295679092,
-0.032574743032455444,
0.11376992613077164,
-0.13935571908950806,
0.027280453592538834,
-0.11406542360782623,
0.08596133440732956,
-0.02175290323793888,
0.09295143932104111,
0.09480448812246323,
-0.13004310429096222,
-0.07168631255626678,
-0.030818011611700058,
0.10367555916309357,
-0.028134474530816078,
0.1459021121263504,
0.10221713781356812,
-0.013313528150320053,
0.14147576689720154,
-0.1565600335597992,
0.32839256525039673,
-0.06651745736598969,
-0.008042595349252224,
-0.1872439831495285,
-0.042939551174640656,
0.03153200075030327,
-0.08631807565689087,
0.10024797916412354,
0.16582433879375458,
-0.16436609625816345,
0.055070988833904266,
0.07295472174882889,
-0.05998121574521065,
-0.12613612413406372,
0.10001727938652039,
0.06806033849716187,
-0.24999664723873138,
-0.18784190714359283,
-0.08845305442810059,
0.08522709459066391,
-0.017525356262922287,
-0.10551067441701889,
-0.0486789308488369,
0.10127020627260208,
-0.023889336735010147,
0.2562776505947113,
-0.012335467152297497,
-0.01431682426482439,
0.08338174223899841,
0.1604979932308197,
-0.04581597074866295,
0.1549350768327713,
-0.033532675355672836,
0.1286526322364807,
0.102564737200737,
0.07359366118907928,
0.1882079392671585,
0.040089886635541916,
0.04736733436584473,
0.18331609666347504,
-0.052547406405210495,
0.04819362983107567,
-0.22393108904361725,
-0.0329357348382473,
-0.027943531051278114,
0.05856027454137802,
0.14936542510986328,
-0.13342036306858063,
-0.04709841310977936,
0.1011873260140419,
-0.09465105086565018,
0.1723899245262146,
0.07753714919090271,
0.02155783772468567,
-0.04004296660423279,
0.11559271067380905,
0.09206543117761612,
-0.08591753989458084,
-0.04005562141537666,
-0.022395141422748566,
0.15455476939678192,
-0.09773490577936172,
0.09770604223012924,
0.12054535746574402,
-0.2725673317909241,
-0.001995998667553067,
0.13406844437122345,
-0.09009008854627609,
0.0861748680472374,
0.0844794511795044,
-0.11071767657995224,
0.06132185831665993,
-0.01758435368537903,
0.08146770298480988,
0.0007349225343205035,
0.16857215762138367,
0.010988151654601097,
0.04960130900144577,
-0.13036984205245972,
-0.17045140266418457,
-0.1163766011595726,
0.009785646572709084,
0.09576418250799179,
-0.04760313034057617,
0.04807204753160477,
-0.161069855093956,
-0.047726381570100784,
0.027980612590909004,
-0.07396053522825241,
-0.07898112386465073,
0.09412673860788345,
0.010246064513921738,
-0.21475592255592346,
-0.029688918963074684,
0.005774413235485554,
-0.26050233840942383,
0.06547506898641586,
0.19227831065654755,
-0.13808509707450867,
0.11279010772705078,
-0.14915668964385986,
0.08167354762554169,
0.009734032675623894,
-0.056863073259592056,
-0.07736512273550034,
0.13276144862174988,
0.09803067147731781,
0.11403374373912811,
0.07104263454675674,
-0.08964759111404419,
-0.08675926178693771,
0.005278932396322489,
0.020773470401763916,
-0.0680144876241684,
0.0343494638800621,
-0.024719301611185074,
-0.04460756480693817,
-0.0017778320470824838,
0.015775375068187714,
0.12102746963500977,
-0.02003585360944271,
0.15434899926185608,
0.11886565387248993,
-0.0032371683046221733,
0.018015746027231216,
0.2618345320224762,
-0.020998366177082062,
0.04054500162601471,
0.02711668610572815,
0.23277489840984344,
0.07141831517219543,
-0.16669978201389313,
0.20038236677646637,
0.11906284093856812,
-0.07426921278238297,
0.004467418882995844,
-0.09003449976444244,
-0.013762343674898148,
-0.12224012613296509,
-0.27355775237083435,
0.13538864254951477,
-0.04174205660820007,
-0.01784149557352066,
0.08568155020475388,
-0.06322386860847473,
-0.07055972516536713,
-0.02458011917769909,
0.04719885066151619,
-0.06907369196414948,
-0.046365950256586075,
0.10640250146389008,
0.16666516661643982,
-2.5952411463188857e-32,
-0.0037301701959222555,
-0.10393796116113663,
-0.0719035342335701,
-0.09170239418745041,
-0.19026833772659302,
-0.08400217443704605,
-0.18551716208457947,
-0.2301102727651596,
0.09782221168279648,
-0.030162163078784943,
-0.03177163377404213,
0.10947549343109131,
0.06035805493593216,
0.057467982172966,
-0.02461831271648407,
0.01799614354968071,
0.10320447385311127,
0.0031736716628074646,
-0.1631106734275818,
0.023170260712504387,
0.022719981148838997,
-0.03247154504060745,
-0.27548685669898987,
0.11153504997491837,
0.06711672246456146,
0.03267896920442581,
0.044970616698265076,
-0.0002709690888877958,
0.16496242582798004,
-0.08756349235773087,
-0.14330162107944489,
0.19176335632801056,
-0.08677493035793304,
-0.2383262813091278,
-0.09053723514080048,
-0.06937982887029648,
-0.07830462604761124,
0.01592375710606575,
-0.09297928959131241,
0.10102535784244537,
0.04060133546590805,
-0.06468335539102554,
0.11880898475646973,
0.11714104562997818,
-0.16146911680698395,
0.01786750927567482,
0.03927198797464371,
0.10433843731880188,
-0.08423172682523727,
-0.04163021966814995,
-0.0633084699511528,
0.05713460221886635,
0.0727963075041771,
0.031152276322245598,
0.018557222560048103,
-0.1658497303724289,
0.008005679585039616,
0.2221032679080963,
-0.09561952948570251,
-0.26534849405288696,
-0.011027595028281212,
0.07876277714967728,
-0.10748650878667831,
-0.1497972011566162,
0.03611277416348457,
-0.003082903800532222,
0.32321247458457947,
-0.10428693145513535,
0.11245667189359665,
-0.06650631874799728,
-0.03081546723842621,
0.16739359498023987,
-0.007419686298817396,
-0.15985137224197388,
0.07234571874141693,
-0.05429944768548012,
0.06643013656139374,
-0.13657236099243164,
0.01218489371240139,
-0.12249741703271866,
-0.05268095061182976,
-0.13620303571224213,
-0.08045843988656998,
0.0124570457264781,
-0.06243788078427315,
0.06791041046380997,
0.0220447089523077,
-0.020013144239783287,
0.048824112862348557,
-0.022309711202979088,
0.022999240085482597,
-0.016479801386594772,
0.04626878350973129,
-0.13216115534305573,
-0.0101703442633152,
-0.10109611600637436,
-0.11657676845788956,
0.21996116638183594,
0.01390345674008131,
-0.06269040703773499,
0.02526717074215412,
-0.16467973589897156,
-0.11280536651611328,
-0.019839493557810783,
0.08344629406929016,
0.005605487152934074,
-0.023962177336215973,
0.23903456330299377,
0.007454026956111193,
0.012801434844732285,
-0.0056133633479475975,
0.025168612599372864,
0.020286738872528076,
0.035249680280685425,
0.178224116563797,
-0.10446802526712418,
0.009122881107032299,
-0.06953804939985275,
0.0754215270280838,
0.12635311484336853,
0.24683719873428345,
0.057297300547361374,
0.12765489518642426,
0.00402526929974556,
-0.024574637413024902,
0.07503056526184082,
-0.14294292032718658,
0.06481672823429108,
-0.06803831458091736,
-0.2217497080564499,
-0.12597572803497314,
-0.15988701581954956,
7.143202651604952e-7,
-0.15739913284778595,
0.2762940526008606,
0.025573605671525,
-0.01787823811173439,
-0.1182260662317276,
-0.019465243443846703,
-0.2834967374801636,
0.1040080189704895,
-0.04273713007569313,
0.02315324917435646,
0.19701848924160004,
0.2157209813594818,
0.16021592915058136,
-0.00690394826233387,
0.09041911363601685,
-0.18321138620376587,
-0.031620174646377563,
0.1534777581691742,
-0.15543204545974731,
0.02011794224381447,
0.10064362734556198,
0.02846289984881878,
0.028064075857400894,
0.03503619506955147,
0.1997004896402359,
-0.14711390435695648,
0.00998113676905632,
0.002998937852680683,
-0.09134187549352646,
-0.014356701634824276,
0.07027875632047653,
-0.0000877628626767546,
-0.19664226472377777,
-0.04722849652171135,
-0.05092727392911911,
-0.10997739434242249,
0.034928370267152786,
-0.10617881268262863,
0.07163893431425095,
-0.11256756633520126,
-0.09336481243371964,
-0.04186740890145302,
0.18779584765434265,
-0.04550755396485329,
0.021541515365242958,
-0.048071593046188354,
-0.13040801882743835,
0.21444371342658997,
0.10136972367763519,
-0.14964008331298828,
0.0392599031329155,
0.19375012814998627,
0.07796534150838852,
0.10377843677997589,
0.04216448590159416,
-0.000993048306554556,
-0.10959665477275848,
-0.2230859398841858,
0.09873219579458237,
0.08520715683698654,
-0.05355991795659065,
-0.0033753809984773397,
-0.03567812219262123,
-0.07409249991178513,
0.13969510793685913,
-0.05979941785335541,
-0.08653255552053452,
9.066943790439916e-35,
0.016190936788916588,
-0.05306015908718109,
0.22857733070850372,
-0.1247384324669838,
-0.052553460001945496,
-0.10230047255754471,
0.05515698716044426,
-0.009909131564199924,
0.13006162643432617,
-0.09031787514686584,
-0.0407092347741127
] |
https://github.com/huggingface/datasets/issues/5936 | Sequence of array not supported for most dtype | Related, `float16` is the only dtype not supported by `Array2D` (probably by every `ArrayND`):
```python
from datasets import Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # ok
"int16", # ok
"int32", # ok
"int64", # ok
"uint8", # ok
"uint16", # ok
"uint32", # ok
"uint64", # ok
"float16", # failed
"float32", # ok
"float64", # ok
]:
features = Features({"foo": Array2D(dtype=dtype, shape=(3, 4))})
array = np.zeros((3, 4), dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
``` | ### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4 | 91 | Sequence of array not supported for most dtype
### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4
Related, `float16` is the only dtype not supported by `Array2D` (probably by every `ArrayND`):
```python
from datasets import Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # ok
"int16", # ok
"int32", # ok
"int64", # ok
"uint8", # ok
"uint16", # ok
"uint32", # ok
"uint64", # ok
"float16", # failed
"float32", # ok
"float64", # ok
]:
features = Features({"foo": Array2D(dtype=dtype, shape=(3, 4))})
array = np.zeros((3, 4), dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
``` | [
-0.06746281683444977,
0.09096186608076096,
-0.05973975732922554,
0.049057867377996445,
0.0003988721582572907,
0.09867214411497116,
0.0362464115023613,
0.07625213265419006,
-0.0905209630727768,
-0.03702070564031601,
0.12113316357135773,
-0.1046123057603836,
0.05175279825925827,
0.08216515928506851,
0.09451530873775482,
-0.12374178320169449,
-0.013632142916321754,
-0.05126554146409035,
-0.0359366238117218,
-0.01180779654532671,
-0.08381325006484985,
0.03986257687211037,
0.0410766676068306,
-0.019569814205169678,
0.08603237569332123,
-0.03737352415919304,
-0.0694008618593216,
0.007070270832628012,
-0.09170708060264587,
-0.1369144320487976,
0.12136262655258179,
0.1930093616247177,
0.07359465211629868,
-0.19303984940052032,
0.000005597704330284614,
0.16257113218307495,
0.13499072194099426,
-0.20021046698093414,
0.0762251615524292,
-0.05415305495262146,
-0.08472410589456558,
-0.045782145112752914,
0.10663515329360962,
-0.020460005849599838,
-0.09980617463588715,
-0.1436014175415039,
-0.14781928062438965,
-0.06923811882734299,
0.05037236586213112,
-0.00888966117054224,
-0.04820113256573677,
-0.04580981656908989,
0.07967328280210495,
-0.13716402649879456,
0.015582511201500893,
0.10520923882722855,
0.1522323340177536,
-0.06801357865333557,
-0.1219949871301651,
0.12277711182832718,
0.1486339271068573,
-0.19431893527507782,
-0.13014733791351318,
0.18839289247989655,
-0.03974904865026474,
-0.16720256209373474,
-0.0660812184214592,
-0.14781904220581055,
-0.009643785655498505,
0.09891130030155182,
-0.021397296339273453,
-0.004776408895850182,
0.00545072928071022,
-0.031396690756082535,
0.15551131963729858,
-0.07584813237190247,
0.06841129809617996,
-0.006254908628761768,
-0.10881000012159348,
-0.047874875366687775,
0.001006168546155095,
0.11017246544361115,
-0.02164238691329956,
-0.023337770253419876,
-0.13487738370895386,
-0.10704734176397324,
-0.0904679000377655,
0.16383080184459686,
-0.20610766112804413,
-0.1017972007393837,
0.0608205683529377,
-0.007123047951608896,
-0.07606172561645508,
-0.07722540199756622,
0.16387741267681122,
-0.048274170607328415,
-0.19299432635307312,
-0.14169983565807343,
0.21563687920570374,
-0.08705606311559677,
0.044338125735521317,
0.08236921578645706,
0.055073585361242294,
-0.10335519909858704,
0.0030858940444886684,
-0.014428983442485332,
-0.08323332667350769,
-0.05025869607925415,
0.005780506879091263,
0.062442291527986526,
-0.05721279978752136,
0.14461450278759003,
-0.08565293997526169,
-0.0011948684696108103,
0.17155058681964874,
-0.055297527462244034,
0.10001268982887268,
0.09325337409973145,
-0.04513091221451759,
0.01920514926314354,
-0.06154526397585869,
0.1645168662071228,
-0.07569663971662521,
0.14673951268196106,
0.19265389442443848,
-0.015336773358285427,
0.00452239578589797,
0.09201371669769287,
0.06812587380409241,
-0.034279968589544296,
-0.03430819511413574,
-0.07602623105049133,
0.14059479534626007,
-0.021837469190359116,
0.11844342201948166,
0.11990968137979507,
0.13811011612415314,
-0.2821691632270813,
0.055210571736097336,
-0.10173898935317993,
-0.0827418863773346,
-0.0864187553524971,
0.041777677834033966,
-0.04548599570989609,
-0.017227444797754288,
0.10643699765205383,
-0.05605855584144592,
0.08427245914936066,
-0.004788760561496019,
0.13292840123176575,
-0.16233894228935242,
0.08794832974672318,
-0.051172662526369095,
-0.09231109172105789,
-0.29979386925697327,
0.11125840991735458,
0.05268131569027901,
-0.1741374284029007,
-0.04588771238923073,
-0.18497693538665771,
-0.046839579939842224,
0.01787998527288437,
-0.019091250374913216,
-0.19846628606319427,
0.08200924843549728,
0.006694377865642309,
-0.025586465373635292,
-0.012342519126832485,
-0.003286713734269142,
-0.022358501330018044,
0.11341539025306702,
-0.06921674311161041,
0.061580803245306015,
-0.1872543841600418,
-0.0858202576637268,
0.08587134629487991,
-0.15045329928398132,
0.13683462142944336,
-0.07907280325889587,
-0.1324562132358551,
0.04196977615356445,
0.0340825580060482,
0.08589200675487518,
-0.09233729541301727,
0.043978311121463776,
0.07682197540998459,
0.08335309475660324,
0.11159130930900574,
-0.11137259006500244,
-0.0762346088886261,
0.012983568012714386,
0.01803617924451828,
0.1616109013557434,
-0.09069053083658218,
-0.04685869440436363,
-0.01974201574921608,
-0.06901892274618149,
-0.10059656202793121,
-0.1375046968460083,
-0.0634886845946312,
-0.0758766233921051,
-0.022272121161222458,
0.10367196053266525,
0.05658519268035889,
0.03558821603655815,
-0.06327077746391296,
-0.2515024244785309,
0.005328012630343437,
0.0025078142061829567,
-0.20479577779769897,
-0.11094058305025101,
0.12719635665416718,
-0.16157391667366028,
-0.045238520950078964,
-0.20021848380565643,
0.05842558667063713,
-0.09348747879266739,
0.02334100566804409,
-0.1099800169467926,
0.21230332553386688,
0.018775276839733124,
-0.10358598828315735,
-0.022867752239108086,
-0.007083996664732695,
0.007906208746135235,
0.07536911219358444,
-0.017165532335639,
-0.07328087836503983,
0.03791557624936104,
0.22311608493328094,
0.10466306656599045,
-0.13210362195968628,
0.19271717965602875,
0.08380698412656784,
-0.12485462427139282,
-0.23794423043727875,
-0.3000282645225525,
-0.1527298390865326,
0.0039018767420202494,
-0.07541825622320175,
-0.188137948513031,
0.15684519708156586,
-0.0956006795167923,
0.01633540913462639,
0.14858944714069366,
0.098926842212677,
-0.2397742122411728,
0.029841983690857887,
0.0420510433614254,
0.052347246557474136,
0.3558315634727478,
0.05053955689072609,
-0.1009010374546051,
-0.1616957187652588,
-0.05239149183034897,
-0.10762836039066315,
-0.0011955349473282695,
-0.02474282495677471,
0.12284082919359207,
0.12409330159425735,
0.29307693243026733,
0.08271754533052444,
0.09566601365804672,
-0.0026162632275372744,
0.07762040197849274,
0.035486746579408646,
0.10897151380777359,
-0.03013749048113823,
-0.015375560149550438,
-0.014210718683898449,
0.1328609585762024,
-0.09784006327390671,
-0.01269562914967537,
-0.02904650941491127,
0.011764983646571636,
-0.16424766182899475,
0.08910081535577774,
0.0670667216181755,
0.08632642775774002,
0.2575039863586426,
-0.136330246925354,
-0.027925601229071617,
-0.06585978716611862,
-0.142704039812088,
0.009618356823921204,
0.08031906187534332,
-0.2940186560153961,
-0.14711295068264008,
-0.09010148793458939,
0.02349763736128807,
0.005995056591928005,
0.06794833391904831,
-0.04195399582386017,
-0.06555387377738953,
0.06802748888731003,
-0.10367345809936523,
0.006797452922910452,
-0.17415717244148254,
0.20739038288593292,
-0.002166405785828829,
0.03399205207824707,
0.16631314158439636,
0.026086410507559776,
-0.0959794744849205,
0.03612484410405159,
0.07841917127370834,
0.10125895589590073,
0.14727237820625305,
-0.07916809618473053,
-0.09177249670028687,
-0.09413391351699829,
-0.07802152633666992,
-0.13085751235485077,
0.09540850669145584,
0.18795271217823029,
0.15643413364887238,
0.04903072863817215,
-0.10341385006904602,
0.11456198245286942,
-0.023993903771042824,
0.07311466336250305,
0.199970081448555,
0.0745454803109169,
-0.07799738645553589,
-0.040378637611866,
0.016835808753967285,
-0.14353083074092865,
-0.23919804394245148,
0.04790487885475159,
0.05510832369327545,
0.08064962178468704,
0.15092770755290985,
0.029113801196217537,
-0.08470983058214188,
0.10181552171707153,
-0.19953657686710358,
-0.0920066311955452,
0.2751101553440094,
0.1424160748720169,
-0.025138424709439278,
-0.011123286560177803,
-0.028783312067389488,
-0.053241077810525894,
-0.0030498753767460585,
0.18802042305469513,
-0.14818477630615234,
-0.045087240636348724,
-0.08958534896373749,
-0.07367933541536331,
-0.0040079751051962376,
0.022217966616153717,
0.09436282515525818,
-0.006292515899986029,
-0.058019720017910004,
-0.2579628825187683,
0.13929997384548187,
-0.04125881940126419,
0.07463880628347397,
-0.22647079825401306,
0.020320376381278038,
-0.012049575336277485,
0.11608541011810303,
-0.09855678677558899,
0.09501101076602936,
-0.11528555303812027,
0.16220623254776,
0.16700468957424164,
-0.030809447169303894,
-0.21209409832954407,
0.05315133556723595,
-0.008600996807217598,
-0.005280887708067894,
-0.07368818670511246,
-0.06387894600629807,
-0.10348312556743622,
-0.011520547792315483,
0.07057998329401016,
0.12041257321834564,
0.11697780340909958,
0.051667470484972,
-0.08609651774168015,
-0.22429277002811432,
-0.0797153040766716,
0.08008711040019989,
0.05414740368723869,
-0.006182573735713959,
-0.017701804637908936,
-0.16395695507526398,
-0.1856389045715332,
0.13551931083202362,
0.11938143521547318,
-0.07421550899744034,
-0.19681094586849213,
0.05702439323067665,
0.00045748258708044887,
0.14570561051368713,
0.3493628203868866,
0.007259889505803585,
0.02003968507051468,
0.07911812514066696,
0.2714715301990509,
-0.01734715700149536,
-0.04342768341302872,
0.028100352734327316,
0.19451852142810822,
0.04006185755133629,
0.12912297248840332,
-0.06710198521614075,
0.19331973791122437,
0.03608126938343048,
-0.09015175700187683,
0.03962429240345955,
0.03659125417470932,
0.059964872896671295,
-0.015035683289170265,
-0.03388987481594086,
0.09934655576944351,
0.05412362143397331,
0.08273059129714966,
-0.2991102933883667,
-0.03276493772864342,
-0.06788179278373718,
0.3044194281101227,
0.12980957329273224,
-0.14540907740592957,
-0.1644614338874817,
-0.061134692281484604,
-0.0661785751581192,
0.0491594523191452,
-0.059902090579271317,
0.10397297888994217,
-0.054101455956697464,
0.026663074269890785,
-0.1330263912677765,
0.04904240742325783,
0.0009910383960232139,
0.08926529437303543,
-0.008319607935845852,
-0.05484982207417488,
-0.11581737548112869,
-0.18853759765625,
-0.018890751525759697,
0.05504096671938896,
-0.12379862368106842,
0.005293026566505432,
-0.1475919485092163,
-0.17500276863574982,
-0.03025064244866371,
-0.10197058320045471,
0.10082598775625229,
-0.06724170595407486,
-0.05633234977722168,
0.060579441487789154,
-0.052894093096256256,
0.11715780198574066,
0.10594746470451355,
0.10804614424705505,
-0.06584241986274719,
-0.1361631602048874,
0.06063805893063545,
0.07506013661623001,
-0.06627032905817032,
-0.044629402458667755,
0.07761119306087494,
0.2150835543870926,
0.05384957790374756,
0.21208062767982483,
0.14314983785152435,
-0.11091560870409012,
0.14186009764671326,
-0.16501189768314362,
-0.0029094950295984745,
-0.060092657804489136,
0.04289781302213669,
0.031104495748877525,
-0.1493098884820938,
0.05105162784457207,
-0.07138343155384064,
-0.04687876254320145,
0.07927734404802322,
-0.07042613625526428,
-0.03896716609597206,
0.12828314304351807,
-0.22017894685268402,
0.16056425869464874,
0.16537776589393616,
-0.0524284653365612,
0.05657460168004036,
-0.11334293335676193,
-0.01896379515528679,
-0.11228779703378677,
-0.06251619756221771,
-0.05993233993649483,
-0.011870350688695908,
0.015520197339355946,
0.059210244566202164,
0.12086238712072372,
0.13454928994178772,
-0.18483754992485046,
0.09479273110628128,
0.018213799223303795,
-0.1286366730928421,
0.009359085932374,
-0.0606766976416111,
-0.153784841299057,
-0.0027280161157250404,
-0.047723833471536636,
-0.034062083810567856,
0.10010407865047455,
0.16853170096874237,
0.1449042558670044,
0.10240641236305237,
-0.09639458358287811,
0.02678593061864376,
-0.09239314496517181,
-0.17715123295783997,
-0.08975996822118759,
0.07370198518037796,
0.006437231320887804,
0.04027668759226799,
0.08289097249507904,
-0.07556083798408508,
0.14021827280521393,
-0.005591465625911951,
-0.019991781562566757,
0.008730422705411911,
0.07550153136253357,
-0.09664648026227951,
0.08794224262237549,
0.22621087729930878,
0.09345395863056183,
0.10810112208127975,
0.09939819574356079,
-0.014649897813796997,
-0.020059995353221893,
-0.07674000412225723,
0.10094278305768967,
0.008740818127989769,
0.01943093165755272,
-0.1519477516412735,
0.05493027716875076,
-0.18999098241329193,
-0.08708036690950394,
0.13223274052143097,
0.205244243144989,
-0.04730413109064102,
0.022640014067292213,
-0.08919195830821991,
0.12382492423057556,
-0.0791400671005249,
-0.019458644092082977,
-0.041960012167692184,
0.022963467985391617,
-0.19975918531417847,
-0.016260063275694847,
-2.335669512327865e-32,
0.00254652788862586,
0.0782720148563385,
-0.17557460069656372,
-0.0724233090877533,
0.0025087110698223114,
-0.0843428373336792,
-0.11741670966148376,
0.1761990189552307,
0.13119840621948242,
-0.09426099061965942,
0.03480633348226547,
0.11672861129045486,
0.01795131526887417,
0.030796917155385017,
0.005217335186898708,
-0.0648498684167862,
0.11835804581642151,
0.02227700501680374,
0.14411552250385284,
0.10006167739629745,
0.08802083134651184,
0.04925473406910896,
0.04829486086964607,
0.20413082838058472,
-0.07583976536989212,
0.07609166949987411,
0.08887964487075806,
-0.2958444356918335,
0.08013102412223816,
-0.16218368709087372,
0.04676852747797966,
0.027716023847460747,
-0.08713413774967194,
-0.06548640131950378,
-0.04563474282622337,
-0.24197880923748016,
-0.10746385157108307,
-0.03834120184183121,
-0.1586199700832367,
0.0009807130554690957,
0.017087098211050034,
0.0494336374104023,
0.133616641163826,
0.05639910697937012,
0.0043087792582809925,
0.06454617530107498,
0.011981700547039509,
-0.03223511204123497,
-0.04706482216715813,
-0.056160490959882736,
0.049475885927677155,
-0.05384940654039383,
-0.08052476495504379,
0.11190023273229599,
-0.06444422155618668,
0.05464959517121315,
0.13935109972953796,
-0.019990714266896248,
0.002043491695076227,
0.006018131505697966,
0.13266132771968842,
0.08661770820617676,
0.056156907230615616,
-0.10045506805181503,
-0.08214785903692245,
0.09462103247642517,
0.19404181838035583,
-0.027524501085281372,
0.15025825798511505,
0.09667424112558365,
-0.1491433084011078,
0.15255385637283325,
-0.0017942847916856408,
-0.08258341997861862,
-0.03191238269209862,
0.126776322722435,
-0.07044445723295212,
0.08583774417638779,
-0.0694739818572998,
-0.10628561675548553,
-0.03342960402369499,
-0.03851407393813133,
0.06724146008491516,
-0.09624677151441574,
-0.06751201301813126,
0.030430983752012253,
0.014187588356435299,
-0.10081006586551666,
-0.032915275543928146,
-0.18610621988773346,
0.07449927181005478,
0.09580081701278687,
-0.02482382208108902,
-0.08948791772127151,
-0.10679366439580917,
0.3005408048629761,
-0.12688961625099182,
-0.026690877974033356,
-0.02668887749314308,
0.06843581050634384,
-0.003404691582545638,
-0.22368109226226807,
0.04993969574570656,
0.01598452776670456,
0.13270799815654755,
0.09268376976251602,
0.07698758691549301,
-0.022342033684253693,
-0.13336679339408875,
-0.08467062562704086,
-0.03637249767780304,
0.15739622712135315,
-0.02402549237012863,
0.04494541883468628,
0.17685019969940186,
-0.12973663210868835,
0.046481404453516006,
0.057251956313848495,
0.020763160660862923,
0.0313652902841568,
-0.06432824581861496,
0.0025595035403966904,
-0.08915379643440247,
0.09994935244321823,
0.17531059682369232,
-0.10263669490814209,
-0.21685846149921417,
-0.043493546545505524,
-0.03249645605683327,
0.0009573809220455587,
0.04640357568860054,
-0.0003302115364931524,
7.426928050335846e-7,
-0.2675139904022217,
0.11773946136236191,
-0.07155317813158035,
0.18999230861663818,
-0.009911458007991314,
0.1305578202009201,
-0.02728758193552494,
0.17926234006881714,
-0.06489259749650955,
0.16035938262939453,
0.20494352281093597,
-0.08191164582967758,
0.08500958979129791,
0.03521854802966118,
0.04667496681213379,
-0.09623762965202332,
-0.039071571081876755,
0.06953563541173935,
-0.20156030356884003,
0.01573757641017437,
0.04306633397936821,
-0.03848826885223389,
-0.029301734641194344,
-0.08854304254055023,
0.3122044503688812,
-0.0672866702079773,
-0.08488315343856812,
0.04900653287768364,
0.059728581458330154,
-0.1304810494184494,
-0.00880422443151474,
-0.04127644747495651,
0.1887311339378357,
0.15611422061920166,
-0.07673028111457825,
-0.0019827368669211864,
-0.13716180622577667,
-0.0238454882055521,
0.11639349907636642,
0.023141752928495407,
-0.07576365768909454,
0.007809111848473549,
0.09293532371520996,
0.05375565588474274,
0.06361569464206696,
0.16119825839996338,
-0.16619181632995605,
0.048119284212589264,
-0.055631473660469055,
0.024243563413619995,
-0.01758980192244053,
0.11700334399938583,
0.09835230559110641,
0.0967969000339508,
0.04074127972126007,
-0.06390596181154251,
0.07050611078739166,
-0.15925173461437225,
0.18082141876220703,
0.10369548946619034,
-0.047801773995161057,
0.05164220929145813,
-0.2319825291633606,
0.025483880192041397,
-0.03629191219806671,
0.0002158183924620971,
-0.07431630045175552,
1.643001655496884e-34,
-0.06952162832021713,
0.11877891421318054,
0.10175779461860657,
-0.13253341615200043,
-0.044909607619047165,
-0.02908717654645443,
0.19765165448188782,
0.007667879108339548,
0.09911870211362839,
-0.018551763147115707,
-0.10651266574859619
] |
https://github.com/huggingface/datasets/issues/5936 | Sequence of array not supported for most dtype | Here's something I can't explain:
When an array is encoded in the `from_dict` method, the numpy array is converted to a list (thus losing the original dtype, which is transfromed to the nearest builtin Python type)
https://github.com/huggingface/datasets/blob/6ee61e6e695b1df9f232d47faf3a5e2b30b33737/src/datasets/features/features.py#L524-L525
However, later on, this same data is written to memory, and it seems authorized that the data is an array (or in this case, a list of arrays).
https://github.com/huggingface/datasets/blob/6ee61e6e695b1df9f232d47faf3a5e2b30b33737/src/datasets/arrow_writer.py#L185-L186
So the question is: why convert it to a Python list? This seems to be quite expensive both in terms of write time (all data is copied) and memory (e.g., an int8 is converted to an int64).
Finally, if I try to remove this step, it solves all the previous problems, and it seems to me that it doesn't break anything (the CI passes without problem). | ### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4 | 132 | Sequence of array not supported for most dtype
### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4
Here's something I can't explain:
When an array is encoded in the `from_dict` method, the numpy array is converted to a list (thus losing the original dtype, which is transfromed to the nearest builtin Python type)
https://github.com/huggingface/datasets/blob/6ee61e6e695b1df9f232d47faf3a5e2b30b33737/src/datasets/features/features.py#L524-L525
However, later on, this same data is written to memory, and it seems authorized that the data is an array (or in this case, a list of arrays).
https://github.com/huggingface/datasets/blob/6ee61e6e695b1df9f232d47faf3a5e2b30b33737/src/datasets/arrow_writer.py#L185-L186
So the question is: why convert it to a Python list? This seems to be quite expensive both in terms of write time (all data is copied) and memory (e.g., an int8 is converted to an int64).
Finally, if I try to remove this step, it solves all the previous problems, and it seems to me that it doesn't break anything (the CI passes without problem). | [
-0.06746281683444977,
0.09096186608076096,
-0.05973975732922554,
0.049057867377996445,
0.0003988721582572907,
0.09867214411497116,
0.0362464115023613,
0.07625213265419006,
-0.0905209630727768,
-0.03702070564031601,
0.12113316357135773,
-0.1046123057603836,
0.05175279825925827,
0.08216515928506851,
0.09451530873775482,
-0.12374178320169449,
-0.013632142916321754,
-0.05126554146409035,
-0.0359366238117218,
-0.01180779654532671,
-0.08381325006484985,
0.03986257687211037,
0.0410766676068306,
-0.019569814205169678,
0.08603237569332123,
-0.03737352415919304,
-0.0694008618593216,
0.007070270832628012,
-0.09170708060264587,
-0.1369144320487976,
0.12136262655258179,
0.1930093616247177,
0.07359465211629868,
-0.19303984940052032,
0.000005597704330284614,
0.16257113218307495,
0.13499072194099426,
-0.20021046698093414,
0.0762251615524292,
-0.05415305495262146,
-0.08472410589456558,
-0.045782145112752914,
0.10663515329360962,
-0.020460005849599838,
-0.09980617463588715,
-0.1436014175415039,
-0.14781928062438965,
-0.06923811882734299,
0.05037236586213112,
-0.00888966117054224,
-0.04820113256573677,
-0.04580981656908989,
0.07967328280210495,
-0.13716402649879456,
0.015582511201500893,
0.10520923882722855,
0.1522323340177536,
-0.06801357865333557,
-0.1219949871301651,
0.12277711182832718,
0.1486339271068573,
-0.19431893527507782,
-0.13014733791351318,
0.18839289247989655,
-0.03974904865026474,
-0.16720256209373474,
-0.0660812184214592,
-0.14781904220581055,
-0.009643785655498505,
0.09891130030155182,
-0.021397296339273453,
-0.004776408895850182,
0.00545072928071022,
-0.031396690756082535,
0.15551131963729858,
-0.07584813237190247,
0.06841129809617996,
-0.006254908628761768,
-0.10881000012159348,
-0.047874875366687775,
0.001006168546155095,
0.11017246544361115,
-0.02164238691329956,
-0.023337770253419876,
-0.13487738370895386,
-0.10704734176397324,
-0.0904679000377655,
0.16383080184459686,
-0.20610766112804413,
-0.1017972007393837,
0.0608205683529377,
-0.007123047951608896,
-0.07606172561645508,
-0.07722540199756622,
0.16387741267681122,
-0.048274170607328415,
-0.19299432635307312,
-0.14169983565807343,
0.21563687920570374,
-0.08705606311559677,
0.044338125735521317,
0.08236921578645706,
0.055073585361242294,
-0.10335519909858704,
0.0030858940444886684,
-0.014428983442485332,
-0.08323332667350769,
-0.05025869607925415,
0.005780506879091263,
0.062442291527986526,
-0.05721279978752136,
0.14461450278759003,
-0.08565293997526169,
-0.0011948684696108103,
0.17155058681964874,
-0.055297527462244034,
0.10001268982887268,
0.09325337409973145,
-0.04513091221451759,
0.01920514926314354,
-0.06154526397585869,
0.1645168662071228,
-0.07569663971662521,
0.14673951268196106,
0.19265389442443848,
-0.015336773358285427,
0.00452239578589797,
0.09201371669769287,
0.06812587380409241,
-0.034279968589544296,
-0.03430819511413574,
-0.07602623105049133,
0.14059479534626007,
-0.021837469190359116,
0.11844342201948166,
0.11990968137979507,
0.13811011612415314,
-0.2821691632270813,
0.055210571736097336,
-0.10173898935317993,
-0.0827418863773346,
-0.0864187553524971,
0.041777677834033966,
-0.04548599570989609,
-0.017227444797754288,
0.10643699765205383,
-0.05605855584144592,
0.08427245914936066,
-0.004788760561496019,
0.13292840123176575,
-0.16233894228935242,
0.08794832974672318,
-0.051172662526369095,
-0.09231109172105789,
-0.29979386925697327,
0.11125840991735458,
0.05268131569027901,
-0.1741374284029007,
-0.04588771238923073,
-0.18497693538665771,
-0.046839579939842224,
0.01787998527288437,
-0.019091250374913216,
-0.19846628606319427,
0.08200924843549728,
0.006694377865642309,
-0.025586465373635292,
-0.012342519126832485,
-0.003286713734269142,
-0.022358501330018044,
0.11341539025306702,
-0.06921674311161041,
0.061580803245306015,
-0.1872543841600418,
-0.0858202576637268,
0.08587134629487991,
-0.15045329928398132,
0.13683462142944336,
-0.07907280325889587,
-0.1324562132358551,
0.04196977615356445,
0.0340825580060482,
0.08589200675487518,
-0.09233729541301727,
0.043978311121463776,
0.07682197540998459,
0.08335309475660324,
0.11159130930900574,
-0.11137259006500244,
-0.0762346088886261,
0.012983568012714386,
0.01803617924451828,
0.1616109013557434,
-0.09069053083658218,
-0.04685869440436363,
-0.01974201574921608,
-0.06901892274618149,
-0.10059656202793121,
-0.1375046968460083,
-0.0634886845946312,
-0.0758766233921051,
-0.022272121161222458,
0.10367196053266525,
0.05658519268035889,
0.03558821603655815,
-0.06327077746391296,
-0.2515024244785309,
0.005328012630343437,
0.0025078142061829567,
-0.20479577779769897,
-0.11094058305025101,
0.12719635665416718,
-0.16157391667366028,
-0.045238520950078964,
-0.20021848380565643,
0.05842558667063713,
-0.09348747879266739,
0.02334100566804409,
-0.1099800169467926,
0.21230332553386688,
0.018775276839733124,
-0.10358598828315735,
-0.022867752239108086,
-0.007083996664732695,
0.007906208746135235,
0.07536911219358444,
-0.017165532335639,
-0.07328087836503983,
0.03791557624936104,
0.22311608493328094,
0.10466306656599045,
-0.13210362195968628,
0.19271717965602875,
0.08380698412656784,
-0.12485462427139282,
-0.23794423043727875,
-0.3000282645225525,
-0.1527298390865326,
0.0039018767420202494,
-0.07541825622320175,
-0.188137948513031,
0.15684519708156586,
-0.0956006795167923,
0.01633540913462639,
0.14858944714069366,
0.098926842212677,
-0.2397742122411728,
0.029841983690857887,
0.0420510433614254,
0.052347246557474136,
0.3558315634727478,
0.05053955689072609,
-0.1009010374546051,
-0.1616957187652588,
-0.05239149183034897,
-0.10762836039066315,
-0.0011955349473282695,
-0.02474282495677471,
0.12284082919359207,
0.12409330159425735,
0.29307693243026733,
0.08271754533052444,
0.09566601365804672,
-0.0026162632275372744,
0.07762040197849274,
0.035486746579408646,
0.10897151380777359,
-0.03013749048113823,
-0.015375560149550438,
-0.014210718683898449,
0.1328609585762024,
-0.09784006327390671,
-0.01269562914967537,
-0.02904650941491127,
0.011764983646571636,
-0.16424766182899475,
0.08910081535577774,
0.0670667216181755,
0.08632642775774002,
0.2575039863586426,
-0.136330246925354,
-0.027925601229071617,
-0.06585978716611862,
-0.142704039812088,
0.009618356823921204,
0.08031906187534332,
-0.2940186560153961,
-0.14711295068264008,
-0.09010148793458939,
0.02349763736128807,
0.005995056591928005,
0.06794833391904831,
-0.04195399582386017,
-0.06555387377738953,
0.06802748888731003,
-0.10367345809936523,
0.006797452922910452,
-0.17415717244148254,
0.20739038288593292,
-0.002166405785828829,
0.03399205207824707,
0.16631314158439636,
0.026086410507559776,
-0.0959794744849205,
0.03612484410405159,
0.07841917127370834,
0.10125895589590073,
0.14727237820625305,
-0.07916809618473053,
-0.09177249670028687,
-0.09413391351699829,
-0.07802152633666992,
-0.13085751235485077,
0.09540850669145584,
0.18795271217823029,
0.15643413364887238,
0.04903072863817215,
-0.10341385006904602,
0.11456198245286942,
-0.023993903771042824,
0.07311466336250305,
0.199970081448555,
0.0745454803109169,
-0.07799738645553589,
-0.040378637611866,
0.016835808753967285,
-0.14353083074092865,
-0.23919804394245148,
0.04790487885475159,
0.05510832369327545,
0.08064962178468704,
0.15092770755290985,
0.029113801196217537,
-0.08470983058214188,
0.10181552171707153,
-0.19953657686710358,
-0.0920066311955452,
0.2751101553440094,
0.1424160748720169,
-0.025138424709439278,
-0.011123286560177803,
-0.028783312067389488,
-0.053241077810525894,
-0.0030498753767460585,
0.18802042305469513,
-0.14818477630615234,
-0.045087240636348724,
-0.08958534896373749,
-0.07367933541536331,
-0.0040079751051962376,
0.022217966616153717,
0.09436282515525818,
-0.006292515899986029,
-0.058019720017910004,
-0.2579628825187683,
0.13929997384548187,
-0.04125881940126419,
0.07463880628347397,
-0.22647079825401306,
0.020320376381278038,
-0.012049575336277485,
0.11608541011810303,
-0.09855678677558899,
0.09501101076602936,
-0.11528555303812027,
0.16220623254776,
0.16700468957424164,
-0.030809447169303894,
-0.21209409832954407,
0.05315133556723595,
-0.008600996807217598,
-0.005280887708067894,
-0.07368818670511246,
-0.06387894600629807,
-0.10348312556743622,
-0.011520547792315483,
0.07057998329401016,
0.12041257321834564,
0.11697780340909958,
0.051667470484972,
-0.08609651774168015,
-0.22429277002811432,
-0.0797153040766716,
0.08008711040019989,
0.05414740368723869,
-0.006182573735713959,
-0.017701804637908936,
-0.16395695507526398,
-0.1856389045715332,
0.13551931083202362,
0.11938143521547318,
-0.07421550899744034,
-0.19681094586849213,
0.05702439323067665,
0.00045748258708044887,
0.14570561051368713,
0.3493628203868866,
0.007259889505803585,
0.02003968507051468,
0.07911812514066696,
0.2714715301990509,
-0.01734715700149536,
-0.04342768341302872,
0.028100352734327316,
0.19451852142810822,
0.04006185755133629,
0.12912297248840332,
-0.06710198521614075,
0.19331973791122437,
0.03608126938343048,
-0.09015175700187683,
0.03962429240345955,
0.03659125417470932,
0.059964872896671295,
-0.015035683289170265,
-0.03388987481594086,
0.09934655576944351,
0.05412362143397331,
0.08273059129714966,
-0.2991102933883667,
-0.03276493772864342,
-0.06788179278373718,
0.3044194281101227,
0.12980957329273224,
-0.14540907740592957,
-0.1644614338874817,
-0.061134692281484604,
-0.0661785751581192,
0.0491594523191452,
-0.059902090579271317,
0.10397297888994217,
-0.054101455956697464,
0.026663074269890785,
-0.1330263912677765,
0.04904240742325783,
0.0009910383960232139,
0.08926529437303543,
-0.008319607935845852,
-0.05484982207417488,
-0.11581737548112869,
-0.18853759765625,
-0.018890751525759697,
0.05504096671938896,
-0.12379862368106842,
0.005293026566505432,
-0.1475919485092163,
-0.17500276863574982,
-0.03025064244866371,
-0.10197058320045471,
0.10082598775625229,
-0.06724170595407486,
-0.05633234977722168,
0.060579441487789154,
-0.052894093096256256,
0.11715780198574066,
0.10594746470451355,
0.10804614424705505,
-0.06584241986274719,
-0.1361631602048874,
0.06063805893063545,
0.07506013661623001,
-0.06627032905817032,
-0.044629402458667755,
0.07761119306087494,
0.2150835543870926,
0.05384957790374756,
0.21208062767982483,
0.14314983785152435,
-0.11091560870409012,
0.14186009764671326,
-0.16501189768314362,
-0.0029094950295984745,
-0.060092657804489136,
0.04289781302213669,
0.031104495748877525,
-0.1493098884820938,
0.05105162784457207,
-0.07138343155384064,
-0.04687876254320145,
0.07927734404802322,
-0.07042613625526428,
-0.03896716609597206,
0.12828314304351807,
-0.22017894685268402,
0.16056425869464874,
0.16537776589393616,
-0.0524284653365612,
0.05657460168004036,
-0.11334293335676193,
-0.01896379515528679,
-0.11228779703378677,
-0.06251619756221771,
-0.05993233993649483,
-0.011870350688695908,
0.015520197339355946,
0.059210244566202164,
0.12086238712072372,
0.13454928994178772,
-0.18483754992485046,
0.09479273110628128,
0.018213799223303795,
-0.1286366730928421,
0.009359085932374,
-0.0606766976416111,
-0.153784841299057,
-0.0027280161157250404,
-0.047723833471536636,
-0.034062083810567856,
0.10010407865047455,
0.16853170096874237,
0.1449042558670044,
0.10240641236305237,
-0.09639458358287811,
0.02678593061864376,
-0.09239314496517181,
-0.17715123295783997,
-0.08975996822118759,
0.07370198518037796,
0.006437231320887804,
0.04027668759226799,
0.08289097249507904,
-0.07556083798408508,
0.14021827280521393,
-0.005591465625911951,
-0.019991781562566757,
0.008730422705411911,
0.07550153136253357,
-0.09664648026227951,
0.08794224262237549,
0.22621087729930878,
0.09345395863056183,
0.10810112208127975,
0.09939819574356079,
-0.014649897813796997,
-0.020059995353221893,
-0.07674000412225723,
0.10094278305768967,
0.008740818127989769,
0.01943093165755272,
-0.1519477516412735,
0.05493027716875076,
-0.18999098241329193,
-0.08708036690950394,
0.13223274052143097,
0.205244243144989,
-0.04730413109064102,
0.022640014067292213,
-0.08919195830821991,
0.12382492423057556,
-0.0791400671005249,
-0.019458644092082977,
-0.041960012167692184,
0.022963467985391617,
-0.19975918531417847,
-0.016260063275694847,
-2.335669512327865e-32,
0.00254652788862586,
0.0782720148563385,
-0.17557460069656372,
-0.0724233090877533,
0.0025087110698223114,
-0.0843428373336792,
-0.11741670966148376,
0.1761990189552307,
0.13119840621948242,
-0.09426099061965942,
0.03480633348226547,
0.11672861129045486,
0.01795131526887417,
0.030796917155385017,
0.005217335186898708,
-0.0648498684167862,
0.11835804581642151,
0.02227700501680374,
0.14411552250385284,
0.10006167739629745,
0.08802083134651184,
0.04925473406910896,
0.04829486086964607,
0.20413082838058472,
-0.07583976536989212,
0.07609166949987411,
0.08887964487075806,
-0.2958444356918335,
0.08013102412223816,
-0.16218368709087372,
0.04676852747797966,
0.027716023847460747,
-0.08713413774967194,
-0.06548640131950378,
-0.04563474282622337,
-0.24197880923748016,
-0.10746385157108307,
-0.03834120184183121,
-0.1586199700832367,
0.0009807130554690957,
0.017087098211050034,
0.0494336374104023,
0.133616641163826,
0.05639910697937012,
0.0043087792582809925,
0.06454617530107498,
0.011981700547039509,
-0.03223511204123497,
-0.04706482216715813,
-0.056160490959882736,
0.049475885927677155,
-0.05384940654039383,
-0.08052476495504379,
0.11190023273229599,
-0.06444422155618668,
0.05464959517121315,
0.13935109972953796,
-0.019990714266896248,
0.002043491695076227,
0.006018131505697966,
0.13266132771968842,
0.08661770820617676,
0.056156907230615616,
-0.10045506805181503,
-0.08214785903692245,
0.09462103247642517,
0.19404181838035583,
-0.027524501085281372,
0.15025825798511505,
0.09667424112558365,
-0.1491433084011078,
0.15255385637283325,
-0.0017942847916856408,
-0.08258341997861862,
-0.03191238269209862,
0.126776322722435,
-0.07044445723295212,
0.08583774417638779,
-0.0694739818572998,
-0.10628561675548553,
-0.03342960402369499,
-0.03851407393813133,
0.06724146008491516,
-0.09624677151441574,
-0.06751201301813126,
0.030430983752012253,
0.014187588356435299,
-0.10081006586551666,
-0.032915275543928146,
-0.18610621988773346,
0.07449927181005478,
0.09580081701278687,
-0.02482382208108902,
-0.08948791772127151,
-0.10679366439580917,
0.3005408048629761,
-0.12688961625099182,
-0.026690877974033356,
-0.02668887749314308,
0.06843581050634384,
-0.003404691582545638,
-0.22368109226226807,
0.04993969574570656,
0.01598452776670456,
0.13270799815654755,
0.09268376976251602,
0.07698758691549301,
-0.022342033684253693,
-0.13336679339408875,
-0.08467062562704086,
-0.03637249767780304,
0.15739622712135315,
-0.02402549237012863,
0.04494541883468628,
0.17685019969940186,
-0.12973663210868835,
0.046481404453516006,
0.057251956313848495,
0.020763160660862923,
0.0313652902841568,
-0.06432824581861496,
0.0025595035403966904,
-0.08915379643440247,
0.09994935244321823,
0.17531059682369232,
-0.10263669490814209,
-0.21685846149921417,
-0.043493546545505524,
-0.03249645605683327,
0.0009573809220455587,
0.04640357568860054,
-0.0003302115364931524,
7.426928050335846e-7,
-0.2675139904022217,
0.11773946136236191,
-0.07155317813158035,
0.18999230861663818,
-0.009911458007991314,
0.1305578202009201,
-0.02728758193552494,
0.17926234006881714,
-0.06489259749650955,
0.16035938262939453,
0.20494352281093597,
-0.08191164582967758,
0.08500958979129791,
0.03521854802966118,
0.04667496681213379,
-0.09623762965202332,
-0.039071571081876755,
0.06953563541173935,
-0.20156030356884003,
0.01573757641017437,
0.04306633397936821,
-0.03848826885223389,
-0.029301734641194344,
-0.08854304254055023,
0.3122044503688812,
-0.0672866702079773,
-0.08488315343856812,
0.04900653287768364,
0.059728581458330154,
-0.1304810494184494,
-0.00880422443151474,
-0.04127644747495651,
0.1887311339378357,
0.15611422061920166,
-0.07673028111457825,
-0.0019827368669211864,
-0.13716180622577667,
-0.0238454882055521,
0.11639349907636642,
0.023141752928495407,
-0.07576365768909454,
0.007809111848473549,
0.09293532371520996,
0.05375565588474274,
0.06361569464206696,
0.16119825839996338,
-0.16619181632995605,
0.048119284212589264,
-0.055631473660469055,
0.024243563413619995,
-0.01758980192244053,
0.11700334399938583,
0.09835230559110641,
0.0967969000339508,
0.04074127972126007,
-0.06390596181154251,
0.07050611078739166,
-0.15925173461437225,
0.18082141876220703,
0.10369548946619034,
-0.047801773995161057,
0.05164220929145813,
-0.2319825291633606,
0.025483880192041397,
-0.03629191219806671,
0.0002158183924620971,
-0.07431630045175552,
1.643001655496884e-34,
-0.06952162832021713,
0.11877891421318054,
0.10175779461860657,
-0.13253341615200043,
-0.044909607619047165,
-0.02908717654645443,
0.19765165448188782,
0.007667879108339548,
0.09911870211362839,
-0.018551763147115707,
-0.10651266574859619
] |
https://github.com/huggingface/datasets/issues/5936 | Sequence of array not supported for most dtype | Arrow only support 1d numpy arrays, so we convert multidim arrays to lists of 1s arrays (and keep the dtype).
Though you noticed that it's concerting to lists and lose the dtype. If it's the case then it's a bug. | ### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4 | 40 | Sequence of array not supported for most dtype
### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4
Arrow only support 1d numpy arrays, so we convert multidim arrays to lists of 1s arrays (and keep the dtype).
Though you noticed that it's concerting to lists and lose the dtype. If it's the case then it's a bug. | [
-0.06746281683444977,
0.09096186608076096,
-0.05973975732922554,
0.049057867377996445,
0.0003988721582572907,
0.09867214411497116,
0.0362464115023613,
0.07625213265419006,
-0.0905209630727768,
-0.03702070564031601,
0.12113316357135773,
-0.1046123057603836,
0.05175279825925827,
0.08216515928506851,
0.09451530873775482,
-0.12374178320169449,
-0.013632142916321754,
-0.05126554146409035,
-0.0359366238117218,
-0.01180779654532671,
-0.08381325006484985,
0.03986257687211037,
0.0410766676068306,
-0.019569814205169678,
0.08603237569332123,
-0.03737352415919304,
-0.0694008618593216,
0.007070270832628012,
-0.09170708060264587,
-0.1369144320487976,
0.12136262655258179,
0.1930093616247177,
0.07359465211629868,
-0.19303984940052032,
0.000005597704330284614,
0.16257113218307495,
0.13499072194099426,
-0.20021046698093414,
0.0762251615524292,
-0.05415305495262146,
-0.08472410589456558,
-0.045782145112752914,
0.10663515329360962,
-0.020460005849599838,
-0.09980617463588715,
-0.1436014175415039,
-0.14781928062438965,
-0.06923811882734299,
0.05037236586213112,
-0.00888966117054224,
-0.04820113256573677,
-0.04580981656908989,
0.07967328280210495,
-0.13716402649879456,
0.015582511201500893,
0.10520923882722855,
0.1522323340177536,
-0.06801357865333557,
-0.1219949871301651,
0.12277711182832718,
0.1486339271068573,
-0.19431893527507782,
-0.13014733791351318,
0.18839289247989655,
-0.03974904865026474,
-0.16720256209373474,
-0.0660812184214592,
-0.14781904220581055,
-0.009643785655498505,
0.09891130030155182,
-0.021397296339273453,
-0.004776408895850182,
0.00545072928071022,
-0.031396690756082535,
0.15551131963729858,
-0.07584813237190247,
0.06841129809617996,
-0.006254908628761768,
-0.10881000012159348,
-0.047874875366687775,
0.001006168546155095,
0.11017246544361115,
-0.02164238691329956,
-0.023337770253419876,
-0.13487738370895386,
-0.10704734176397324,
-0.0904679000377655,
0.16383080184459686,
-0.20610766112804413,
-0.1017972007393837,
0.0608205683529377,
-0.007123047951608896,
-0.07606172561645508,
-0.07722540199756622,
0.16387741267681122,
-0.048274170607328415,
-0.19299432635307312,
-0.14169983565807343,
0.21563687920570374,
-0.08705606311559677,
0.044338125735521317,
0.08236921578645706,
0.055073585361242294,
-0.10335519909858704,
0.0030858940444886684,
-0.014428983442485332,
-0.08323332667350769,
-0.05025869607925415,
0.005780506879091263,
0.062442291527986526,
-0.05721279978752136,
0.14461450278759003,
-0.08565293997526169,
-0.0011948684696108103,
0.17155058681964874,
-0.055297527462244034,
0.10001268982887268,
0.09325337409973145,
-0.04513091221451759,
0.01920514926314354,
-0.06154526397585869,
0.1645168662071228,
-0.07569663971662521,
0.14673951268196106,
0.19265389442443848,
-0.015336773358285427,
0.00452239578589797,
0.09201371669769287,
0.06812587380409241,
-0.034279968589544296,
-0.03430819511413574,
-0.07602623105049133,
0.14059479534626007,
-0.021837469190359116,
0.11844342201948166,
0.11990968137979507,
0.13811011612415314,
-0.2821691632270813,
0.055210571736097336,
-0.10173898935317993,
-0.0827418863773346,
-0.0864187553524971,
0.041777677834033966,
-0.04548599570989609,
-0.017227444797754288,
0.10643699765205383,
-0.05605855584144592,
0.08427245914936066,
-0.004788760561496019,
0.13292840123176575,
-0.16233894228935242,
0.08794832974672318,
-0.051172662526369095,
-0.09231109172105789,
-0.29979386925697327,
0.11125840991735458,
0.05268131569027901,
-0.1741374284029007,
-0.04588771238923073,
-0.18497693538665771,
-0.046839579939842224,
0.01787998527288437,
-0.019091250374913216,
-0.19846628606319427,
0.08200924843549728,
0.006694377865642309,
-0.025586465373635292,
-0.012342519126832485,
-0.003286713734269142,
-0.022358501330018044,
0.11341539025306702,
-0.06921674311161041,
0.061580803245306015,
-0.1872543841600418,
-0.0858202576637268,
0.08587134629487991,
-0.15045329928398132,
0.13683462142944336,
-0.07907280325889587,
-0.1324562132358551,
0.04196977615356445,
0.0340825580060482,
0.08589200675487518,
-0.09233729541301727,
0.043978311121463776,
0.07682197540998459,
0.08335309475660324,
0.11159130930900574,
-0.11137259006500244,
-0.0762346088886261,
0.012983568012714386,
0.01803617924451828,
0.1616109013557434,
-0.09069053083658218,
-0.04685869440436363,
-0.01974201574921608,
-0.06901892274618149,
-0.10059656202793121,
-0.1375046968460083,
-0.0634886845946312,
-0.0758766233921051,
-0.022272121161222458,
0.10367196053266525,
0.05658519268035889,
0.03558821603655815,
-0.06327077746391296,
-0.2515024244785309,
0.005328012630343437,
0.0025078142061829567,
-0.20479577779769897,
-0.11094058305025101,
0.12719635665416718,
-0.16157391667366028,
-0.045238520950078964,
-0.20021848380565643,
0.05842558667063713,
-0.09348747879266739,
0.02334100566804409,
-0.1099800169467926,
0.21230332553386688,
0.018775276839733124,
-0.10358598828315735,
-0.022867752239108086,
-0.007083996664732695,
0.007906208746135235,
0.07536911219358444,
-0.017165532335639,
-0.07328087836503983,
0.03791557624936104,
0.22311608493328094,
0.10466306656599045,
-0.13210362195968628,
0.19271717965602875,
0.08380698412656784,
-0.12485462427139282,
-0.23794423043727875,
-0.3000282645225525,
-0.1527298390865326,
0.0039018767420202494,
-0.07541825622320175,
-0.188137948513031,
0.15684519708156586,
-0.0956006795167923,
0.01633540913462639,
0.14858944714069366,
0.098926842212677,
-0.2397742122411728,
0.029841983690857887,
0.0420510433614254,
0.052347246557474136,
0.3558315634727478,
0.05053955689072609,
-0.1009010374546051,
-0.1616957187652588,
-0.05239149183034897,
-0.10762836039066315,
-0.0011955349473282695,
-0.02474282495677471,
0.12284082919359207,
0.12409330159425735,
0.29307693243026733,
0.08271754533052444,
0.09566601365804672,
-0.0026162632275372744,
0.07762040197849274,
0.035486746579408646,
0.10897151380777359,
-0.03013749048113823,
-0.015375560149550438,
-0.014210718683898449,
0.1328609585762024,
-0.09784006327390671,
-0.01269562914967537,
-0.02904650941491127,
0.011764983646571636,
-0.16424766182899475,
0.08910081535577774,
0.0670667216181755,
0.08632642775774002,
0.2575039863586426,
-0.136330246925354,
-0.027925601229071617,
-0.06585978716611862,
-0.142704039812088,
0.009618356823921204,
0.08031906187534332,
-0.2940186560153961,
-0.14711295068264008,
-0.09010148793458939,
0.02349763736128807,
0.005995056591928005,
0.06794833391904831,
-0.04195399582386017,
-0.06555387377738953,
0.06802748888731003,
-0.10367345809936523,
0.006797452922910452,
-0.17415717244148254,
0.20739038288593292,
-0.002166405785828829,
0.03399205207824707,
0.16631314158439636,
0.026086410507559776,
-0.0959794744849205,
0.03612484410405159,
0.07841917127370834,
0.10125895589590073,
0.14727237820625305,
-0.07916809618473053,
-0.09177249670028687,
-0.09413391351699829,
-0.07802152633666992,
-0.13085751235485077,
0.09540850669145584,
0.18795271217823029,
0.15643413364887238,
0.04903072863817215,
-0.10341385006904602,
0.11456198245286942,
-0.023993903771042824,
0.07311466336250305,
0.199970081448555,
0.0745454803109169,
-0.07799738645553589,
-0.040378637611866,
0.016835808753967285,
-0.14353083074092865,
-0.23919804394245148,
0.04790487885475159,
0.05510832369327545,
0.08064962178468704,
0.15092770755290985,
0.029113801196217537,
-0.08470983058214188,
0.10181552171707153,
-0.19953657686710358,
-0.0920066311955452,
0.2751101553440094,
0.1424160748720169,
-0.025138424709439278,
-0.011123286560177803,
-0.028783312067389488,
-0.053241077810525894,
-0.0030498753767460585,
0.18802042305469513,
-0.14818477630615234,
-0.045087240636348724,
-0.08958534896373749,
-0.07367933541536331,
-0.0040079751051962376,
0.022217966616153717,
0.09436282515525818,
-0.006292515899986029,
-0.058019720017910004,
-0.2579628825187683,
0.13929997384548187,
-0.04125881940126419,
0.07463880628347397,
-0.22647079825401306,
0.020320376381278038,
-0.012049575336277485,
0.11608541011810303,
-0.09855678677558899,
0.09501101076602936,
-0.11528555303812027,
0.16220623254776,
0.16700468957424164,
-0.030809447169303894,
-0.21209409832954407,
0.05315133556723595,
-0.008600996807217598,
-0.005280887708067894,
-0.07368818670511246,
-0.06387894600629807,
-0.10348312556743622,
-0.011520547792315483,
0.07057998329401016,
0.12041257321834564,
0.11697780340909958,
0.051667470484972,
-0.08609651774168015,
-0.22429277002811432,
-0.0797153040766716,
0.08008711040019989,
0.05414740368723869,
-0.006182573735713959,
-0.017701804637908936,
-0.16395695507526398,
-0.1856389045715332,
0.13551931083202362,
0.11938143521547318,
-0.07421550899744034,
-0.19681094586849213,
0.05702439323067665,
0.00045748258708044887,
0.14570561051368713,
0.3493628203868866,
0.007259889505803585,
0.02003968507051468,
0.07911812514066696,
0.2714715301990509,
-0.01734715700149536,
-0.04342768341302872,
0.028100352734327316,
0.19451852142810822,
0.04006185755133629,
0.12912297248840332,
-0.06710198521614075,
0.19331973791122437,
0.03608126938343048,
-0.09015175700187683,
0.03962429240345955,
0.03659125417470932,
0.059964872896671295,
-0.015035683289170265,
-0.03388987481594086,
0.09934655576944351,
0.05412362143397331,
0.08273059129714966,
-0.2991102933883667,
-0.03276493772864342,
-0.06788179278373718,
0.3044194281101227,
0.12980957329273224,
-0.14540907740592957,
-0.1644614338874817,
-0.061134692281484604,
-0.0661785751581192,
0.0491594523191452,
-0.059902090579271317,
0.10397297888994217,
-0.054101455956697464,
0.026663074269890785,
-0.1330263912677765,
0.04904240742325783,
0.0009910383960232139,
0.08926529437303543,
-0.008319607935845852,
-0.05484982207417488,
-0.11581737548112869,
-0.18853759765625,
-0.018890751525759697,
0.05504096671938896,
-0.12379862368106842,
0.005293026566505432,
-0.1475919485092163,
-0.17500276863574982,
-0.03025064244866371,
-0.10197058320045471,
0.10082598775625229,
-0.06724170595407486,
-0.05633234977722168,
0.060579441487789154,
-0.052894093096256256,
0.11715780198574066,
0.10594746470451355,
0.10804614424705505,
-0.06584241986274719,
-0.1361631602048874,
0.06063805893063545,
0.07506013661623001,
-0.06627032905817032,
-0.044629402458667755,
0.07761119306087494,
0.2150835543870926,
0.05384957790374756,
0.21208062767982483,
0.14314983785152435,
-0.11091560870409012,
0.14186009764671326,
-0.16501189768314362,
-0.0029094950295984745,
-0.060092657804489136,
0.04289781302213669,
0.031104495748877525,
-0.1493098884820938,
0.05105162784457207,
-0.07138343155384064,
-0.04687876254320145,
0.07927734404802322,
-0.07042613625526428,
-0.03896716609597206,
0.12828314304351807,
-0.22017894685268402,
0.16056425869464874,
0.16537776589393616,
-0.0524284653365612,
0.05657460168004036,
-0.11334293335676193,
-0.01896379515528679,
-0.11228779703378677,
-0.06251619756221771,
-0.05993233993649483,
-0.011870350688695908,
0.015520197339355946,
0.059210244566202164,
0.12086238712072372,
0.13454928994178772,
-0.18483754992485046,
0.09479273110628128,
0.018213799223303795,
-0.1286366730928421,
0.009359085932374,
-0.0606766976416111,
-0.153784841299057,
-0.0027280161157250404,
-0.047723833471536636,
-0.034062083810567856,
0.10010407865047455,
0.16853170096874237,
0.1449042558670044,
0.10240641236305237,
-0.09639458358287811,
0.02678593061864376,
-0.09239314496517181,
-0.17715123295783997,
-0.08975996822118759,
0.07370198518037796,
0.006437231320887804,
0.04027668759226799,
0.08289097249507904,
-0.07556083798408508,
0.14021827280521393,
-0.005591465625911951,
-0.019991781562566757,
0.008730422705411911,
0.07550153136253357,
-0.09664648026227951,
0.08794224262237549,
0.22621087729930878,
0.09345395863056183,
0.10810112208127975,
0.09939819574356079,
-0.014649897813796997,
-0.020059995353221893,
-0.07674000412225723,
0.10094278305768967,
0.008740818127989769,
0.01943093165755272,
-0.1519477516412735,
0.05493027716875076,
-0.18999098241329193,
-0.08708036690950394,
0.13223274052143097,
0.205244243144989,
-0.04730413109064102,
0.022640014067292213,
-0.08919195830821991,
0.12382492423057556,
-0.0791400671005249,
-0.019458644092082977,
-0.041960012167692184,
0.022963467985391617,
-0.19975918531417847,
-0.016260063275694847,
-2.335669512327865e-32,
0.00254652788862586,
0.0782720148563385,
-0.17557460069656372,
-0.0724233090877533,
0.0025087110698223114,
-0.0843428373336792,
-0.11741670966148376,
0.1761990189552307,
0.13119840621948242,
-0.09426099061965942,
0.03480633348226547,
0.11672861129045486,
0.01795131526887417,
0.030796917155385017,
0.005217335186898708,
-0.0648498684167862,
0.11835804581642151,
0.02227700501680374,
0.14411552250385284,
0.10006167739629745,
0.08802083134651184,
0.04925473406910896,
0.04829486086964607,
0.20413082838058472,
-0.07583976536989212,
0.07609166949987411,
0.08887964487075806,
-0.2958444356918335,
0.08013102412223816,
-0.16218368709087372,
0.04676852747797966,
0.027716023847460747,
-0.08713413774967194,
-0.06548640131950378,
-0.04563474282622337,
-0.24197880923748016,
-0.10746385157108307,
-0.03834120184183121,
-0.1586199700832367,
0.0009807130554690957,
0.017087098211050034,
0.0494336374104023,
0.133616641163826,
0.05639910697937012,
0.0043087792582809925,
0.06454617530107498,
0.011981700547039509,
-0.03223511204123497,
-0.04706482216715813,
-0.056160490959882736,
0.049475885927677155,
-0.05384940654039383,
-0.08052476495504379,
0.11190023273229599,
-0.06444422155618668,
0.05464959517121315,
0.13935109972953796,
-0.019990714266896248,
0.002043491695076227,
0.006018131505697966,
0.13266132771968842,
0.08661770820617676,
0.056156907230615616,
-0.10045506805181503,
-0.08214785903692245,
0.09462103247642517,
0.19404181838035583,
-0.027524501085281372,
0.15025825798511505,
0.09667424112558365,
-0.1491433084011078,
0.15255385637283325,
-0.0017942847916856408,
-0.08258341997861862,
-0.03191238269209862,
0.126776322722435,
-0.07044445723295212,
0.08583774417638779,
-0.0694739818572998,
-0.10628561675548553,
-0.03342960402369499,
-0.03851407393813133,
0.06724146008491516,
-0.09624677151441574,
-0.06751201301813126,
0.030430983752012253,
0.014187588356435299,
-0.10081006586551666,
-0.032915275543928146,
-0.18610621988773346,
0.07449927181005478,
0.09580081701278687,
-0.02482382208108902,
-0.08948791772127151,
-0.10679366439580917,
0.3005408048629761,
-0.12688961625099182,
-0.026690877974033356,
-0.02668887749314308,
0.06843581050634384,
-0.003404691582545638,
-0.22368109226226807,
0.04993969574570656,
0.01598452776670456,
0.13270799815654755,
0.09268376976251602,
0.07698758691549301,
-0.022342033684253693,
-0.13336679339408875,
-0.08467062562704086,
-0.03637249767780304,
0.15739622712135315,
-0.02402549237012863,
0.04494541883468628,
0.17685019969940186,
-0.12973663210868835,
0.046481404453516006,
0.057251956313848495,
0.020763160660862923,
0.0313652902841568,
-0.06432824581861496,
0.0025595035403966904,
-0.08915379643440247,
0.09994935244321823,
0.17531059682369232,
-0.10263669490814209,
-0.21685846149921417,
-0.043493546545505524,
-0.03249645605683327,
0.0009573809220455587,
0.04640357568860054,
-0.0003302115364931524,
7.426928050335846e-7,
-0.2675139904022217,
0.11773946136236191,
-0.07155317813158035,
0.18999230861663818,
-0.009911458007991314,
0.1305578202009201,
-0.02728758193552494,
0.17926234006881714,
-0.06489259749650955,
0.16035938262939453,
0.20494352281093597,
-0.08191164582967758,
0.08500958979129791,
0.03521854802966118,
0.04667496681213379,
-0.09623762965202332,
-0.039071571081876755,
0.06953563541173935,
-0.20156030356884003,
0.01573757641017437,
0.04306633397936821,
-0.03848826885223389,
-0.029301734641194344,
-0.08854304254055023,
0.3122044503688812,
-0.0672866702079773,
-0.08488315343856812,
0.04900653287768364,
0.059728581458330154,
-0.1304810494184494,
-0.00880422443151474,
-0.04127644747495651,
0.1887311339378357,
0.15611422061920166,
-0.07673028111457825,
-0.0019827368669211864,
-0.13716180622577667,
-0.0238454882055521,
0.11639349907636642,
0.023141752928495407,
-0.07576365768909454,
0.007809111848473549,
0.09293532371520996,
0.05375565588474274,
0.06361569464206696,
0.16119825839996338,
-0.16619181632995605,
0.048119284212589264,
-0.055631473660469055,
0.024243563413619995,
-0.01758980192244053,
0.11700334399938583,
0.09835230559110641,
0.0967969000339508,
0.04074127972126007,
-0.06390596181154251,
0.07050611078739166,
-0.15925173461437225,
0.18082141876220703,
0.10369548946619034,
-0.047801773995161057,
0.05164220929145813,
-0.2319825291633606,
0.025483880192041397,
-0.03629191219806671,
0.0002158183924620971,
-0.07431630045175552,
1.643001655496884e-34,
-0.06952162832021713,
0.11877891421318054,
0.10175779461860657,
-0.13253341615200043,
-0.044909607619047165,
-0.02908717654645443,
0.19765165448188782,
0.007667879108339548,
0.09911870211362839,
-0.018551763147115707,
-0.10651266574859619
] |
https://github.com/huggingface/datasets/issues/5936 | Sequence of array not supported for most dtype | Ok the conversion to list shouldn't be there indeed ! Could you open a PR to remove it ? | ### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4 | 19 | Sequence of array not supported for most dtype
### Describe the bug
Create a dataset composed of sequence of array fails for most dtypes (see code below).
### Steps to reproduce the bug
```python
from datasets import Sequence, Array2D, Features, Dataset
import numpy as np
for dtype in [
"bool", # ok
"int8", # failed
"int16", # failed
"int32", # failed
"int64", # ok
"uint8", # failed
"uint16", # failed
"uint32", # failed
"uint64", # failed
"float16", # failed
"float32", # failed
"float64", # ok
]:
features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))})
sequence = [
[[1.0, 2.0], [3.0, 4.0]],
[[5.0, 6.0], [7.0, 8.0]],
]
array = np.array(sequence, dtype=dtype)
try:
dataset = Dataset.from_dict({"foo": [array]}, features=features)
except Exception as e:
print(f"Failed for dtype={dtype}")
```
Traceback for `dtype="int8"`:
```
Traceback (most recent call last):
File "/home/qgallouedec/datasets/a.py", line 29, in <module>
raise e
File "/home/qgallouedec/datasets/a.py", line 26, in <module>
dataset = Dataset.from_dict({"foo": [array]}, features=features)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict
pa_table = InMemoryTable.from_pydict(mapping=mapping)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict
return cls(pa.Table.from_pydict(*args, **kwargs))
File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict
File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict
File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 236, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>>
```
### Expected behavior
Not to fail.
### Environment info
- Python 3.10.6
- datasets: master branch
- Numpy: 1.23.4
Ok the conversion to list shouldn't be there indeed ! Could you open a PR to remove it ? | [
-0.06746281683444977,
0.09096186608076096,
-0.05973975732922554,
0.049057867377996445,
0.0003988721582572907,
0.09867214411497116,
0.0362464115023613,
0.07625213265419006,
-0.0905209630727768,
-0.03702070564031601,
0.12113316357135773,
-0.1046123057603836,
0.05175279825925827,
0.08216515928506851,
0.09451530873775482,
-0.12374178320169449,
-0.013632142916321754,
-0.05126554146409035,
-0.0359366238117218,
-0.01180779654532671,
-0.08381325006484985,
0.03986257687211037,
0.0410766676068306,
-0.019569814205169678,
0.08603237569332123,
-0.03737352415919304,
-0.0694008618593216,
0.007070270832628012,
-0.09170708060264587,
-0.1369144320487976,
0.12136262655258179,
0.1930093616247177,
0.07359465211629868,
-0.19303984940052032,
0.000005597704330284614,
0.16257113218307495,
0.13499072194099426,
-0.20021046698093414,
0.0762251615524292,
-0.05415305495262146,
-0.08472410589456558,
-0.045782145112752914,
0.10663515329360962,
-0.020460005849599838,
-0.09980617463588715,
-0.1436014175415039,
-0.14781928062438965,
-0.06923811882734299,
0.05037236586213112,
-0.00888966117054224,
-0.04820113256573677,
-0.04580981656908989,
0.07967328280210495,
-0.13716402649879456,
0.015582511201500893,
0.10520923882722855,
0.1522323340177536,
-0.06801357865333557,
-0.1219949871301651,
0.12277711182832718,
0.1486339271068573,
-0.19431893527507782,
-0.13014733791351318,
0.18839289247989655,
-0.03974904865026474,
-0.16720256209373474,
-0.0660812184214592,
-0.14781904220581055,
-0.009643785655498505,
0.09891130030155182,
-0.021397296339273453,
-0.004776408895850182,
0.00545072928071022,
-0.031396690756082535,
0.15551131963729858,
-0.07584813237190247,
0.06841129809617996,
-0.006254908628761768,
-0.10881000012159348,
-0.047874875366687775,
0.001006168546155095,
0.11017246544361115,
-0.02164238691329956,
-0.023337770253419876,
-0.13487738370895386,
-0.10704734176397324,
-0.0904679000377655,
0.16383080184459686,
-0.20610766112804413,
-0.1017972007393837,
0.0608205683529377,
-0.007123047951608896,
-0.07606172561645508,
-0.07722540199756622,
0.16387741267681122,
-0.048274170607328415,
-0.19299432635307312,
-0.14169983565807343,
0.21563687920570374,
-0.08705606311559677,
0.044338125735521317,
0.08236921578645706,
0.055073585361242294,
-0.10335519909858704,
0.0030858940444886684,
-0.014428983442485332,
-0.08323332667350769,
-0.05025869607925415,
0.005780506879091263,
0.062442291527986526,
-0.05721279978752136,
0.14461450278759003,
-0.08565293997526169,
-0.0011948684696108103,
0.17155058681964874,
-0.055297527462244034,
0.10001268982887268,
0.09325337409973145,
-0.04513091221451759,
0.01920514926314354,
-0.06154526397585869,
0.1645168662071228,
-0.07569663971662521,
0.14673951268196106,
0.19265389442443848,
-0.015336773358285427,
0.00452239578589797,
0.09201371669769287,
0.06812587380409241,
-0.034279968589544296,
-0.03430819511413574,
-0.07602623105049133,
0.14059479534626007,
-0.021837469190359116,
0.11844342201948166,
0.11990968137979507,
0.13811011612415314,
-0.2821691632270813,
0.055210571736097336,
-0.10173898935317993,
-0.0827418863773346,
-0.0864187553524971,
0.041777677834033966,
-0.04548599570989609,
-0.017227444797754288,
0.10643699765205383,
-0.05605855584144592,
0.08427245914936066,
-0.004788760561496019,
0.13292840123176575,
-0.16233894228935242,
0.08794832974672318,
-0.051172662526369095,
-0.09231109172105789,
-0.29979386925697327,
0.11125840991735458,
0.05268131569027901,
-0.1741374284029007,
-0.04588771238923073,
-0.18497693538665771,
-0.046839579939842224,
0.01787998527288437,
-0.019091250374913216,
-0.19846628606319427,
0.08200924843549728,
0.006694377865642309,
-0.025586465373635292,
-0.012342519126832485,
-0.003286713734269142,
-0.022358501330018044,
0.11341539025306702,
-0.06921674311161041,
0.061580803245306015,
-0.1872543841600418,
-0.0858202576637268,
0.08587134629487991,
-0.15045329928398132,
0.13683462142944336,
-0.07907280325889587,
-0.1324562132358551,
0.04196977615356445,
0.0340825580060482,
0.08589200675487518,
-0.09233729541301727,
0.043978311121463776,
0.07682197540998459,
0.08335309475660324,
0.11159130930900574,
-0.11137259006500244,
-0.0762346088886261,
0.012983568012714386,
0.01803617924451828,
0.1616109013557434,
-0.09069053083658218,
-0.04685869440436363,
-0.01974201574921608,
-0.06901892274618149,
-0.10059656202793121,
-0.1375046968460083,
-0.0634886845946312,
-0.0758766233921051,
-0.022272121161222458,
0.10367196053266525,
0.05658519268035889,
0.03558821603655815,
-0.06327077746391296,
-0.2515024244785309,
0.005328012630343437,
0.0025078142061829567,
-0.20479577779769897,
-0.11094058305025101,
0.12719635665416718,
-0.16157391667366028,
-0.045238520950078964,
-0.20021848380565643,
0.05842558667063713,
-0.09348747879266739,
0.02334100566804409,
-0.1099800169467926,
0.21230332553386688,
0.018775276839733124,
-0.10358598828315735,
-0.022867752239108086,
-0.007083996664732695,
0.007906208746135235,
0.07536911219358444,
-0.017165532335639,
-0.07328087836503983,
0.03791557624936104,
0.22311608493328094,
0.10466306656599045,
-0.13210362195968628,
0.19271717965602875,
0.08380698412656784,
-0.12485462427139282,
-0.23794423043727875,
-0.3000282645225525,
-0.1527298390865326,
0.0039018767420202494,
-0.07541825622320175,
-0.188137948513031,
0.15684519708156586,
-0.0956006795167923,
0.01633540913462639,
0.14858944714069366,
0.098926842212677,
-0.2397742122411728,
0.029841983690857887,
0.0420510433614254,
0.052347246557474136,
0.3558315634727478,
0.05053955689072609,
-0.1009010374546051,
-0.1616957187652588,
-0.05239149183034897,
-0.10762836039066315,
-0.0011955349473282695,
-0.02474282495677471,
0.12284082919359207,
0.12409330159425735,
0.29307693243026733,
0.08271754533052444,
0.09566601365804672,
-0.0026162632275372744,
0.07762040197849274,
0.035486746579408646,
0.10897151380777359,
-0.03013749048113823,
-0.015375560149550438,
-0.014210718683898449,
0.1328609585762024,
-0.09784006327390671,
-0.01269562914967537,
-0.02904650941491127,
0.011764983646571636,
-0.16424766182899475,
0.08910081535577774,
0.0670667216181755,
0.08632642775774002,
0.2575039863586426,
-0.136330246925354,
-0.027925601229071617,
-0.06585978716611862,
-0.142704039812088,
0.009618356823921204,
0.08031906187534332,
-0.2940186560153961,
-0.14711295068264008,
-0.09010148793458939,
0.02349763736128807,
0.005995056591928005,
0.06794833391904831,
-0.04195399582386017,
-0.06555387377738953,
0.06802748888731003,
-0.10367345809936523,
0.006797452922910452,
-0.17415717244148254,
0.20739038288593292,
-0.002166405785828829,
0.03399205207824707,
0.16631314158439636,
0.026086410507559776,
-0.0959794744849205,
0.03612484410405159,
0.07841917127370834,
0.10125895589590073,
0.14727237820625305,
-0.07916809618473053,
-0.09177249670028687,
-0.09413391351699829,
-0.07802152633666992,
-0.13085751235485077,
0.09540850669145584,
0.18795271217823029,
0.15643413364887238,
0.04903072863817215,
-0.10341385006904602,
0.11456198245286942,
-0.023993903771042824,
0.07311466336250305,
0.199970081448555,
0.0745454803109169,
-0.07799738645553589,
-0.040378637611866,
0.016835808753967285,
-0.14353083074092865,
-0.23919804394245148,
0.04790487885475159,
0.05510832369327545,
0.08064962178468704,
0.15092770755290985,
0.029113801196217537,
-0.08470983058214188,
0.10181552171707153,
-0.19953657686710358,
-0.0920066311955452,
0.2751101553440094,
0.1424160748720169,
-0.025138424709439278,
-0.011123286560177803,
-0.028783312067389488,
-0.053241077810525894,
-0.0030498753767460585,
0.18802042305469513,
-0.14818477630615234,
-0.045087240636348724,
-0.08958534896373749,
-0.07367933541536331,
-0.0040079751051962376,
0.022217966616153717,
0.09436282515525818,
-0.006292515899986029,
-0.058019720017910004,
-0.2579628825187683,
0.13929997384548187,
-0.04125881940126419,
0.07463880628347397,
-0.22647079825401306,
0.020320376381278038,
-0.012049575336277485,
0.11608541011810303,
-0.09855678677558899,
0.09501101076602936,
-0.11528555303812027,
0.16220623254776,
0.16700468957424164,
-0.030809447169303894,
-0.21209409832954407,
0.05315133556723595,
-0.008600996807217598,
-0.005280887708067894,
-0.07368818670511246,
-0.06387894600629807,
-0.10348312556743622,
-0.011520547792315483,
0.07057998329401016,
0.12041257321834564,
0.11697780340909958,
0.051667470484972,
-0.08609651774168015,
-0.22429277002811432,
-0.0797153040766716,
0.08008711040019989,
0.05414740368723869,
-0.006182573735713959,
-0.017701804637908936,
-0.16395695507526398,
-0.1856389045715332,
0.13551931083202362,
0.11938143521547318,
-0.07421550899744034,
-0.19681094586849213,
0.05702439323067665,
0.00045748258708044887,
0.14570561051368713,
0.3493628203868866,
0.007259889505803585,
0.02003968507051468,
0.07911812514066696,
0.2714715301990509,
-0.01734715700149536,
-0.04342768341302872,
0.028100352734327316,
0.19451852142810822,
0.04006185755133629,
0.12912297248840332,
-0.06710198521614075,
0.19331973791122437,
0.03608126938343048,
-0.09015175700187683,
0.03962429240345955,
0.03659125417470932,
0.059964872896671295,
-0.015035683289170265,
-0.03388987481594086,
0.09934655576944351,
0.05412362143397331,
0.08273059129714966,
-0.2991102933883667,
-0.03276493772864342,
-0.06788179278373718,
0.3044194281101227,
0.12980957329273224,
-0.14540907740592957,
-0.1644614338874817,
-0.061134692281484604,
-0.0661785751581192,
0.0491594523191452,
-0.059902090579271317,
0.10397297888994217,
-0.054101455956697464,
0.026663074269890785,
-0.1330263912677765,
0.04904240742325783,
0.0009910383960232139,
0.08926529437303543,
-0.008319607935845852,
-0.05484982207417488,
-0.11581737548112869,
-0.18853759765625,
-0.018890751525759697,
0.05504096671938896,
-0.12379862368106842,
0.005293026566505432,
-0.1475919485092163,
-0.17500276863574982,
-0.03025064244866371,
-0.10197058320045471,
0.10082598775625229,
-0.06724170595407486,
-0.05633234977722168,
0.060579441487789154,
-0.052894093096256256,
0.11715780198574066,
0.10594746470451355,
0.10804614424705505,
-0.06584241986274719,
-0.1361631602048874,
0.06063805893063545,
0.07506013661623001,
-0.06627032905817032,
-0.044629402458667755,
0.07761119306087494,
0.2150835543870926,
0.05384957790374756,
0.21208062767982483,
0.14314983785152435,
-0.11091560870409012,
0.14186009764671326,
-0.16501189768314362,
-0.0029094950295984745,
-0.060092657804489136,
0.04289781302213669,
0.031104495748877525,
-0.1493098884820938,
0.05105162784457207,
-0.07138343155384064,
-0.04687876254320145,
0.07927734404802322,
-0.07042613625526428,
-0.03896716609597206,
0.12828314304351807,
-0.22017894685268402,
0.16056425869464874,
0.16537776589393616,
-0.0524284653365612,
0.05657460168004036,
-0.11334293335676193,
-0.01896379515528679,
-0.11228779703378677,
-0.06251619756221771,
-0.05993233993649483,
-0.011870350688695908,
0.015520197339355946,
0.059210244566202164,
0.12086238712072372,
0.13454928994178772,
-0.18483754992485046,
0.09479273110628128,
0.018213799223303795,
-0.1286366730928421,
0.009359085932374,
-0.0606766976416111,
-0.153784841299057,
-0.0027280161157250404,
-0.047723833471536636,
-0.034062083810567856,
0.10010407865047455,
0.16853170096874237,
0.1449042558670044,
0.10240641236305237,
-0.09639458358287811,
0.02678593061864376,
-0.09239314496517181,
-0.17715123295783997,
-0.08975996822118759,
0.07370198518037796,
0.006437231320887804,
0.04027668759226799,
0.08289097249507904,
-0.07556083798408508,
0.14021827280521393,
-0.005591465625911951,
-0.019991781562566757,
0.008730422705411911,
0.07550153136253357,
-0.09664648026227951,
0.08794224262237549,
0.22621087729930878,
0.09345395863056183,
0.10810112208127975,
0.09939819574356079,
-0.014649897813796997,
-0.020059995353221893,
-0.07674000412225723,
0.10094278305768967,
0.008740818127989769,
0.01943093165755272,
-0.1519477516412735,
0.05493027716875076,
-0.18999098241329193,
-0.08708036690950394,
0.13223274052143097,
0.205244243144989,
-0.04730413109064102,
0.022640014067292213,
-0.08919195830821991,
0.12382492423057556,
-0.0791400671005249,
-0.019458644092082977,
-0.041960012167692184,
0.022963467985391617,
-0.19975918531417847,
-0.016260063275694847,
-2.335669512327865e-32,
0.00254652788862586,
0.0782720148563385,
-0.17557460069656372,
-0.0724233090877533,
0.0025087110698223114,
-0.0843428373336792,
-0.11741670966148376,
0.1761990189552307,
0.13119840621948242,
-0.09426099061965942,
0.03480633348226547,
0.11672861129045486,
0.01795131526887417,
0.030796917155385017,
0.005217335186898708,
-0.0648498684167862,
0.11835804581642151,
0.02227700501680374,
0.14411552250385284,
0.10006167739629745,
0.08802083134651184,
0.04925473406910896,
0.04829486086964607,
0.20413082838058472,
-0.07583976536989212,
0.07609166949987411,
0.08887964487075806,
-0.2958444356918335,
0.08013102412223816,
-0.16218368709087372,
0.04676852747797966,
0.027716023847460747,
-0.08713413774967194,
-0.06548640131950378,
-0.04563474282622337,
-0.24197880923748016,
-0.10746385157108307,
-0.03834120184183121,
-0.1586199700832367,
0.0009807130554690957,
0.017087098211050034,
0.0494336374104023,
0.133616641163826,
0.05639910697937012,
0.0043087792582809925,
0.06454617530107498,
0.011981700547039509,
-0.03223511204123497,
-0.04706482216715813,
-0.056160490959882736,
0.049475885927677155,
-0.05384940654039383,
-0.08052476495504379,
0.11190023273229599,
-0.06444422155618668,
0.05464959517121315,
0.13935109972953796,
-0.019990714266896248,
0.002043491695076227,
0.006018131505697966,
0.13266132771968842,
0.08661770820617676,
0.056156907230615616,
-0.10045506805181503,
-0.08214785903692245,
0.09462103247642517,
0.19404181838035583,
-0.027524501085281372,
0.15025825798511505,
0.09667424112558365,
-0.1491433084011078,
0.15255385637283325,
-0.0017942847916856408,
-0.08258341997861862,
-0.03191238269209862,
0.126776322722435,
-0.07044445723295212,
0.08583774417638779,
-0.0694739818572998,
-0.10628561675548553,
-0.03342960402369499,
-0.03851407393813133,
0.06724146008491516,
-0.09624677151441574,
-0.06751201301813126,
0.030430983752012253,
0.014187588356435299,
-0.10081006586551666,
-0.032915275543928146,
-0.18610621988773346,
0.07449927181005478,
0.09580081701278687,
-0.02482382208108902,
-0.08948791772127151,
-0.10679366439580917,
0.3005408048629761,
-0.12688961625099182,
-0.026690877974033356,
-0.02668887749314308,
0.06843581050634384,
-0.003404691582545638,
-0.22368109226226807,
0.04993969574570656,
0.01598452776670456,
0.13270799815654755,
0.09268376976251602,
0.07698758691549301,
-0.022342033684253693,
-0.13336679339408875,
-0.08467062562704086,
-0.03637249767780304,
0.15739622712135315,
-0.02402549237012863,
0.04494541883468628,
0.17685019969940186,
-0.12973663210868835,
0.046481404453516006,
0.057251956313848495,
0.020763160660862923,
0.0313652902841568,
-0.06432824581861496,
0.0025595035403966904,
-0.08915379643440247,
0.09994935244321823,
0.17531059682369232,
-0.10263669490814209,
-0.21685846149921417,
-0.043493546545505524,
-0.03249645605683327,
0.0009573809220455587,
0.04640357568860054,
-0.0003302115364931524,
7.426928050335846e-7,
-0.2675139904022217,
0.11773946136236191,
-0.07155317813158035,
0.18999230861663818,
-0.009911458007991314,
0.1305578202009201,
-0.02728758193552494,
0.17926234006881714,
-0.06489259749650955,
0.16035938262939453,
0.20494352281093597,
-0.08191164582967758,
0.08500958979129791,
0.03521854802966118,
0.04667496681213379,
-0.09623762965202332,
-0.039071571081876755,
0.06953563541173935,
-0.20156030356884003,
0.01573757641017437,
0.04306633397936821,
-0.03848826885223389,
-0.029301734641194344,
-0.08854304254055023,
0.3122044503688812,
-0.0672866702079773,
-0.08488315343856812,
0.04900653287768364,
0.059728581458330154,
-0.1304810494184494,
-0.00880422443151474,
-0.04127644747495651,
0.1887311339378357,
0.15611422061920166,
-0.07673028111457825,
-0.0019827368669211864,
-0.13716180622577667,
-0.0238454882055521,
0.11639349907636642,
0.023141752928495407,
-0.07576365768909454,
0.007809111848473549,
0.09293532371520996,
0.05375565588474274,
0.06361569464206696,
0.16119825839996338,
-0.16619181632995605,
0.048119284212589264,
-0.055631473660469055,
0.024243563413619995,
-0.01758980192244053,
0.11700334399938583,
0.09835230559110641,
0.0967969000339508,
0.04074127972126007,
-0.06390596181154251,
0.07050611078739166,
-0.15925173461437225,
0.18082141876220703,
0.10369548946619034,
-0.047801773995161057,
0.05164220929145813,
-0.2319825291633606,
0.025483880192041397,
-0.03629191219806671,
0.0002158183924620971,
-0.07431630045175552,
1.643001655496884e-34,
-0.06952162832021713,
0.11877891421318054,
0.10175779461860657,
-0.13253341615200043,
-0.044909607619047165,
-0.02908717654645443,
0.19765165448188782,
0.007667879108339548,
0.09911870211362839,
-0.018551763147115707,
-0.10651266574859619
] |
https://github.com/huggingface/datasets/issues/5931 | `datasets.map` not reusing cached copy by default | This can happen when a map transform cannot be hashed deterministically (e.g., an object referenced by the transform changes its state after the first call - an issue with fast tokenizers). The solution is to provide `cache_file_name` in the `map` call to check this file for the cached result instead of relying on the default caching mechanism. | ### Describe the bug
When I load the dataset from local directory, it's cached copy is picked up after first time. However, for `map` operation, the operation is applied again and cached copy is not picked up. Is there any way to pick cached copy instead of processing it again? The only solution I could think of was to use `save_to_disk` after my last transform and then use that in my DataLoader pipeline. Are there any other solutions for the same?
One more thing, my dataset is occupying 6GB storage memory after I use `map`, is there any way I can reduce that memory usage?
### Steps to reproduce the bug
```
# make sure that dataset decodes audio with correct sampling rate
dataset_sampling_rate = next(iter(self.raw_datasets.values())).features["audio"].sampling_rate
if dataset_sampling_rate != self.feature_extractor.sampling_rate:
self.raw_datasets = self.raw_datasets.cast_column(
"audio", datasets.features.Audio(sampling_rate=self.feature_extractor.sampling_rate)
)
vectorized_datasets = self.raw_datasets.map(
self.prepare_dataset,
remove_columns=next(iter(self.raw_datasets.values())).column_names,
num_proc=self.num_workers,
desc="preprocess datasets",
)
# filter data that is longer than max_input_length
self.vectorized_datasets = vectorized_datasets.filter(
self.is_audio_in_length_range,
num_proc=self.num_workers,
input_columns=["input_length"],
)
def prepare_dataset(self, batch):
# load audio
sample = batch["audio"]
inputs = self.feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"])
batch["input_values"] = inputs.input_values[0]
batch["input_length"] = len(batch["input_values"])
batch["labels"] = self.tokenizer(batch["target_text"]).input_ids
return batch
```
### Expected behavior
`map` to use cached copy and if possible an alternative technique to reduce memory usage after using `map`
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
| 57 | `datasets.map` not reusing cached copy by default
### Describe the bug
When I load the dataset from local directory, it's cached copy is picked up after first time. However, for `map` operation, the operation is applied again and cached copy is not picked up. Is there any way to pick cached copy instead of processing it again? The only solution I could think of was to use `save_to_disk` after my last transform and then use that in my DataLoader pipeline. Are there any other solutions for the same?
One more thing, my dataset is occupying 6GB storage memory after I use `map`, is there any way I can reduce that memory usage?
### Steps to reproduce the bug
```
# make sure that dataset decodes audio with correct sampling rate
dataset_sampling_rate = next(iter(self.raw_datasets.values())).features["audio"].sampling_rate
if dataset_sampling_rate != self.feature_extractor.sampling_rate:
self.raw_datasets = self.raw_datasets.cast_column(
"audio", datasets.features.Audio(sampling_rate=self.feature_extractor.sampling_rate)
)
vectorized_datasets = self.raw_datasets.map(
self.prepare_dataset,
remove_columns=next(iter(self.raw_datasets.values())).column_names,
num_proc=self.num_workers,
desc="preprocess datasets",
)
# filter data that is longer than max_input_length
self.vectorized_datasets = vectorized_datasets.filter(
self.is_audio_in_length_range,
num_proc=self.num_workers,
input_columns=["input_length"],
)
def prepare_dataset(self, batch):
# load audio
sample = batch["audio"]
inputs = self.feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"])
batch["input_values"] = inputs.input_values[0]
batch["input_length"] = len(batch["input_values"])
batch["labels"] = self.tokenizer(batch["target_text"]).input_ids
return batch
```
### Expected behavior
`map` to use cached copy and if possible an alternative technique to reduce memory usage after using `map`
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
This can happen when a map transform cannot be hashed deterministically (e.g., an object referenced by the transform changes its state after the first call - an issue with fast tokenizers). The solution is to provide `cache_file_name` in the `map` call to check this file for the cached result instead of relying on the default caching mechanism. | [
0.002318546874448657,
0.0470242016017437,
-0.18298709392547607,
-0.03571480140089989,
0.15219047665596008,
-0.03512507677078247,
0.11078227311372757,
-0.017345746979117393,
-0.024096254259347916,
0.32541584968566895,
-0.05615230277180672,
0.006832574959844351,
-0.012153349816799164,
-0.17803123593330383,
-0.07364921271800995,
0.12990710139274597,
-0.031542666256427765,
0.12631110846996307,
-0.1856163591146469,
-0.002415161579847336,
-0.19551464915275574,
0.06608814746141434,
0.13256946206092834,
-0.07080774009227753,
0.020117277279496193,
-0.1047481968998909,
-0.04367685317993164,
0.024506283923983574,
0.015032146126031876,
0.00817031692713499,
-0.07945695519447327,
0.017301000654697418,
-0.03248622268438339,
0.1168925017118454,
0.000005259315457806224,
0.11127952486276627,
0.186051607131958,
-0.07886646687984467,
-0.07322854548692703,
0.14130650460720062,
0.1460150182247162,
0.08224804699420929,
0.017876293510198593,
0.03586599603295326,
-0.06401025503873825,
-0.05607619881629944,
0.023792831227183342,
-0.1823263168334961,
0.20741145312786102,
-0.0748082846403122,
-0.08872130513191223,
-0.09901948273181915,
-0.1564074456691742,
-0.10978712141513824,
0.04692361131310463,
-0.008588454686105251,
0.03263361379504204,
-0.03476519137620926,
-0.24895401298999786,
-0.072022944688797,
0.035024091601371765,
0.00348318531177938,
0.0572514608502388,
0.11972753703594208,
-0.05502741411328316,
-0.02205875888466835,
-0.08674609661102295,
-0.1396360993385315,
0.05655452609062195,
0.17135250568389893,
-0.06483256071805954,
-0.13420261442661285,
-0.044543758034706116,
0.05517982691526413,
-0.08787669986486435,
-0.0809987485408783,
-0.18745553493499756,
0.015287132933735847,
-0.0032044409308582544,
0.013967951759696007,
-0.2431963086128235,
0.018262220546603203,
0.057118792086839676,
-0.05147155746817589,
-0.18998511135578156,
-0.07624534517526627,
-0.10389595478773117,
0.16839444637298584,
-0.11496873199939728,
-0.06296978890895844,
0.06163783743977547,
-0.030742889270186424,
-0.08818371593952179,
-0.03328297287225723,
-0.038081131875514984,
0.13002564013004303,
0.018183967098593712,
-0.12254315614700317,
0.010890898294746876,
-0.0697827935218811,
0.10118278861045837,
-0.005281516350805759,
0.005524796899408102,
0.0497361496090889,
0.05018050968647003,
-0.13049869239330292,
-0.10628744959831238,
-0.053062956780195236,
0.06512285768985748,
-0.06373343616724014,
-0.18638257682323456,
0.023840056732296944,
0.034137167036533356,
0.07514549791812897,
0.3772420883178711,
0.005605374462902546,
0.09032119065523148,
0.06980055570602417,
-0.024204764515161514,
0.12786991894245148,
0.09464912861585617,
0.08036213368177414,
-0.09296579658985138,
0.12053657323122025,
0.09371443092823029,
0.14557141065597534,
-0.14721205830574036,
0.06435218453407288,
-0.08854073286056519,
-0.00010676311649149284,
-0.09845171123743057,
-0.19602157175540924,
0.12705114483833313,
0.04836175590753555,
0.1179581806063652,
-0.021203262731432915,
-0.04615410417318344,
0.04313858970999718,
-0.1021604910492897,
-0.17284350097179413,
0.2486284226179123,
-0.13140620291233063,
0.21234792470932007,
0.10514464974403381,
0.026019053533673286,
0.08496872335672379,
0.045825112611055374,
0.06495659798383713,
-0.05747440457344055,
0.21530744433403015,
-0.16342873871326447,
0.17187897861003876,
0.11499862372875214,
0.2030116766691208,
0.01729879342019558,
0.23516611754894257,
0.09527844935655594,
0.06114263832569122,
-0.08253899216651917,
-0.14422659575939178,
0.10882463306188583,
-0.07615334540605545,
-0.08441293984651566,
0.03470347076654434,
-0.013992666266858578,
0.12345684319734573,
0.017566034570336342,
0.09765977412462234,
-0.1468556821346283,
-0.05435238033533096,
0.17779181897640228,
-0.0822766125202179,
-0.09462317824363708,
-0.05242514982819557,
-0.23583339154720306,
0.14908726513385773,
0.07467242330312729,
0.06147884577512741,
-0.2756410539150238,
0.06891655176877975,
0.10900356620550156,
0.05293509364128113,
-0.002344537992030382,
-0.04959344491362572,
0.2357591837644577,
-0.10042863339185715,
-0.043428316712379456,
0.021625671535730362,
-0.043535057455301285,
0.15673711895942688,
-0.1378173679113388,
0.019959835335612297,
-0.018268898129463196,
0.10339894890785217,
-0.10700107365846634,
0.054902758449316025,
0.04853307083249092,
0.11618030816316605,
-0.037003885954618454,
-0.20935861766338348,
0.013081349432468414,
-0.0003296986105851829,
0.017752831801772118,
-0.0447140671312809,
-0.04846857860684395,
0.029519615694880486,
-0.06344209611415863,
0.03711777925491333,
-0.0014402014203369617,
-0.2714938223361969,
-0.05646272748708725,
0.06058982014656067,
0.09945221990346909,
-0.012741820886731148,
-0.22717368602752686,
-0.11936815828084946,
-0.15692993998527527,
0.0850660428404808,
-0.060881003737449646,
0.046545375138521194,
-0.040742866694927216,
0.12657341361045837,
0.02227906882762909,
0.05263163894414902,
-0.03386378660798073,
0.0381745882332325,
0.09728293120861053,
-0.08099424093961716,
-0.010555547662079334,
-0.07384752482175827,
0.050102200359106064,
-0.03270505368709564,
0.09696373343467712,
0.14253197610378265,
0.014636184088885784,
0.08265478909015656,
-0.10664769262075424,
-0.18922585248947144,
0.10653204470872879,
0.1356697529554367,
-0.08962216228246689,
0.07635925710201263,
-0.08191511034965515,
-0.07501079142093658,
-0.0013393973931670189,
0.09136141836643219,
0.058026619255542755,
0.158950537443161,
-0.005010449793189764,
-0.1506383717060089,
0.17305275797843933,
0.12026343494653702,
-0.12624067068099976,
0.04912182688713074,
-0.1680774837732315,
-0.03212001919746399,
0.2532396614551544,
0.22124643623828888,
0.15925900638103485,
0.06326471269130707,
0.2859868109226227,
0.12411189824342728,
-0.009206296876072884,
-0.0012490178924053907,
0.09381015598773956,
-0.15177373588085175,
0.029916539788246155,
0.0934518352150917,
0.05544112250208855,
0.14442326128482819,
0.19495683908462524,
-0.03591533005237579,
-0.11031202971935272,
-0.01966206729412079,
-0.04119439423084259,
-0.16547274589538574,
-0.09899236261844635,
-0.059955090284347534,
0.09998658299446106,
-0.027466140687465668,
-0.16118726134300232,
0.1981433480978012,
0.16800247132778168,
-0.10811813175678253,
0.25145041942596436,
0.055617913603782654,
-0.13595519959926605,
0.09483276307582855,
-0.10448534041643143,
0.02670242264866829,
0.06830498576164246,
-0.18142986297607422,
0.13368146121501923,
-0.03697552904486656,
-0.019173001870512962,
0.13802236318588257,
0.0033324994146823883,
-0.10699619352817535,
-0.03531715273857117,
-0.17839094996452332,
0.06532556563615799,
0.09455955028533936,
0.02518184296786785,
-0.11356184631586075,
-0.010674746707081795,
-0.1530228704214096,
0.11478045582771301,
0.2446497231721878,
-0.2511708438396454,
-0.03664994239807129,
0.06749127060174942,
0.0164788905531168,
0.17420555651187897,
0.09832033514976501,
-0.05431600287556648,
0.03689561411738396,
-0.11151271313428879,
-0.19877572357654572,
0.03339433670043945,
-0.019363464787602425,
0.014072506688535213,
0.06287926435470581,
-0.06034831330180168,
0.022789640352129936,
-0.06790565699338913,
-0.024876711890101433,
0.10736092925071716,
-0.10930982232093811,
-0.10428421944379807,
-0.10425326973199844,
-0.06088731437921524,
0.03339071571826935,
-0.04636165499687195,
-0.0564439631998539,
0.02150513418018818,
-0.07268311828374863,
-0.22283236682415009,
-0.10540832579135895,
0.24853599071502686,
0.08366833627223969,
0.06613444536924362,
0.0505082830786705,
-0.19500571489334106,
0.009614527225494385,
0.1435764580965042,
-0.08519136905670166,
-0.032972946763038635,
-0.1208329051733017,
0.06705281138420105,
0.07623657584190369,
0.053907476365566254,
0.1766759753227234,
-0.05719318240880966,
-0.022839713841676712,
0.030219295993447304,
0.08399565517902374,
-0.16525694727897644,
0.21400189399719238,
-0.1395246386528015,
0.09857773035764694,
-0.01861572265625,
-0.01924467459321022,
0.18043829500675201,
0.0708550363779068,
-0.015821432694792747,
0.10838472843170166,
0.11437858641147614,
0.08403380960226059,
0.05959215760231018,
-0.055576566606760025,
-0.05606742575764656,
-0.08531705290079117,
-0.17976312339305878,
-0.06484919041395187,
0.01072123646736145,
-0.12330236285924911,
0.05202079936861992,
-0.000317165075102821,
-0.003303453093394637,
-0.024173768237233162,
0.008674132637679577,
-0.1333094984292984,
-0.08863378316164017,
0.04061374068260193,
0.04338278993964195,
-0.00012201180652482435,
0.004502356518059969,
-0.06837988644838333,
-0.2918938100337982,
0.20415742695331573,
0.0050894999876618385,
-0.013902369886636734,
0.1314762681722641,
-0.08850673586130142,
0.028881479054689407,
-0.016466904431581497,
0.14966139197349548,
-0.04123567417263985,
-0.03150327503681183,
-0.09306412935256958,
0.05426621064543724,
0.14325356483459473,
-0.01879183016717434,
0.07868096977472305,
0.050108652561903,
-0.01865169033408165,
0.123747818171978,
-0.012135091237723827,
0.0988861620426178,
0.045761507004499435,
0.03621167689561844,
0.0217778030782938,
-0.0009917861316353083,
0.052400410175323486,
0.11662038415670395,
0.09849143028259277,
-0.10936419665813446,
0.010800318792462349,
0.01809118129312992,
-0.13069337606430054,
-0.1483929306268692,
-0.06007488816976547,
-0.026910772547125816,
0.03571133688092232,
0.0761178582906723,
-0.09871456027030945,
-0.015632664784789085,
-0.07563954591751099,
0.15901049971580505,
0.027892086654901505,
0.1561882495880127,
0.19714100658893585,
0.0913618877530098,
0.07151221483945847,
0.057831984013319016,
-0.2341858297586441,
0.23745083808898926,
-0.11967596411705017,
-0.03343259170651436,
0.01649603620171547,
-0.11543150246143341,
0.011549990624189377,
0.01594618707895279,
-0.05482877045869827,
0.11094082146883011,
0.05713648721575737,
-0.0940718948841095,
-0.12903007864952087,
0.00011502964480314404,
-0.06265216320753098,
-0.1007244884967804,
0.020012646913528442,
-0.14596889913082123,
-0.03863302245736122,
0.12045147269964218,
-0.03840728849172592,
0.16549448668956757,
-0.3873772621154785,
0.039141878485679626,
0.06612978875637054,
-0.1292404979467392,
-0.021939150989055634,
0.05987749993801117,
0.14308978617191315,
-0.06488856673240662,
0.08995698392391205,
0.024928487837314606,
-0.165567085146904,
0.07229732722043991,
0.014993849210441113,
-0.11897950619459152,
0.12557676434516907,
0.08528317511081696,
0.0871630534529686,
0.07701236009597778,
0.06432299315929413,
-0.058435603976249695,
0.1361778825521469,
0.13063684105873108,
-0.06009773164987564,
0.03989560529589653,
0.049984898418188095,
-0.01764463260769844,
-0.0068632797338068485,
0.04525706171989441,
0.23253671824932098,
0.023363744840025902,
0.05979378893971443,
-0.055701520293951035,
0.10192833095788956,
-0.13567499816417694,
0.010383115150034428,
-0.09007443487644196,
0.03178738057613373,
0.05727607011795044,
-0.11274866759777069,
0.07179192453622818,
-0.16312557458877563,
-0.11696194857358932,
-0.06017639860510826,
0.03337264060974121,
0.04778203368186951,
-0.008506841026246548,
0.0783526822924614,
0.12462136149406433,
-0.2662118077278137,
0.015832308679819107,
-0.04629822447896004,
0.10110123455524445,
0.09161243587732315,
-0.06641710549592972,
-0.03376543149352074,
-0.03348106890916824,
-0.10221812129020691,
0.12807482481002808,
-0.04605624079704285,
-0.17286469042301178,
-0.1342136263847351,
0.06570495665073395,
-0.040984198451042175,
0.0715712308883667,
0.06495234370231628,
-0.07387325167655945,
-0.17250016331672668,
0.19390082359313965,
-0.07726263999938965,
-0.05585600808262825,
-0.12798140943050385,
0.1737227886915207,
0.18279050290584564,
-0.0003282135585322976,
0.09304428100585938,
-0.08571083098649979,
0.009148968383669853,
-0.0097654415294528,
0.06236809492111206,
0.023312924429774284,
-0.05678935348987579,
0.08550699800252914,
-0.10908393561840057,
0.04167274385690689,
-0.21743805706501007,
-0.11391528695821762,
-0.11167663335800171,
0.09528043866157532,
-0.08259905874729156,
0.09486027806997299,
0.01055278442800045,
-0.10003076493740082,
-0.045713815838098526,
0.04184076189994812,
0.14495961368083954,
-0.04655842483043671,
-0.0016603886615484953,
0.03978867828845978,
-2.604306558752427e-32,
0.07106350362300873,
-0.020266739651560783,
0.0713203027844429,
-0.04645775631070137,
-0.015285907313227654,
-0.0392804816365242,
-0.03632603958249092,
-0.12814836204051971,
-0.0066407653503119946,
-0.13478215038776398,
-0.1840451955795288,
0.049299802631139755,
0.13205890357494354,
0.016578514128923416,
-0.04670820012688637,
-0.051770683377981186,
0.12870213389396667,
-0.06831267476081848,
-0.10883111506700516,
0.11381964385509491,
0.13853664696216583,
0.08391974866390228,
0.12375965714454651,
0.04483496770262718,
-0.269083708524704,
0.020836690440773964,
-0.010384774766862392,
-0.19747233390808105,
-0.1452450156211853,
-0.040567606687545776,
-0.02946803718805313,
0.22796334326267242,
-0.060757607221603394,
-0.2134268432855606,
-0.1312449425458908,
-0.06547975540161133,
-0.20365391671657562,
-0.01792783848941326,
-0.0025625184644013643,
-0.00003499727608868852,
-0.030840251594781876,
0.13024157285690308,
0.19978468120098114,
-0.0711556151509285,
-0.08153781294822693,
-0.06130881607532501,
-0.034011442214250565,
-0.03910469636321068,
-0.1624038964509964,
-0.132857084274292,
-0.010758841410279274,
0.04299940913915634,
0.1624211221933365,
0.08015523105859756,
0.000012694380529865157,
-0.14084190130233765,
0.005350223742425442,
0.14682883024215698,
-0.2723499536514282,
0.10021299123764038,
0.03583240881562233,
0.011884095147252083,
0.11415836960077286,
-0.0018207106040790677,
0.28001436591148376,
-0.06829039752483368,
0.32922083139419556,
0.0257453341037035,
0.15911512076854706,
-0.04117182269692421,
-0.015697559341788292,
-0.04290992394089699,
-0.19775959849357605,
-0.0318412184715271,
0.028908096253871918,
-0.122065469622612,
0.10405655205249786,
-0.08513344079256058,
-0.15096870064735413,
0.03860267251729965,
-0.04949670657515526,
-0.09244946390390396,
0.0586773082613945,
-0.05392298847436905,
-0.1294342279434204,
0.19268490374088287,
0.032689761370420456,
0.1501835137605667,
-0.07511666417121887,
0.01659664325416088,
0.057645753026008606,
0.198693186044693,
0.024660451337695122,
-0.04194680228829384,
-0.058548253029584885,
0.046214062720537186,
-0.09390681982040405,
0.052496425807476044,
-0.08640843629837036,
0.04592154175043106,
0.02744150534272194,
-0.02406172640621662,
0.07711940258741379,
-0.11453445255756378,
0.06827661395072937,
0.14479045569896698,
0.1084512323141098,
0.10807763040065765,
-0.09915579110383987,
-0.05290423706173897,
-0.12484052777290344,
-0.06196294352412224,
0.11355257779359818,
0.02564774639904499,
0.15415436029434204,
0.11522988229990005,
0.09528220444917679,
0.13599710166454315,
0.07826881110668182,
0.16997161507606506,
-0.08522693067789078,
-0.14054854214191437,
0.01957789994776249,
0.09102429449558258,
-0.008414116688072681,
0.1101229265332222,
-0.17948590219020844,
-0.10915971547365189,
0.1709473431110382,
-0.14789971709251404,
-0.04144410416483879,
-0.1480318009853363,
7.28641055047774e-7,
-0.2067294716835022,
0.04050145298242569,
-0.03130578249692917,
-0.04260594770312309,
-0.056657079607248306,
0.07630204409360886,
-0.2990235388278961,
0.10657774657011032,
-0.069295234978199,
0.16899661719799042,
0.11615398526191711,
-0.05162042751908302,
0.08953272551298141,
-0.04830389469861984,
0.02400987781584263,
-0.14050276577472687,
-0.1659233719110489,
-0.014647799544036388,
-0.041802532970905304,
-0.0613345168530941,
-0.13833637535572052,
0.1454441398382187,
0.11370662599802017,
-0.14556972682476044,
0.047529108822345734,
0.01144029013812542,
0.04531293734908104,
-0.053636789321899414,
0.10189735144376755,
-0.15533429384231567,
0.03952251747250557,
0.10275603830814362,
0.15718227624893188,
-0.05687730386853218,
-0.060648154467344284,
0.08250975608825684,
-0.052066437900066376,
-0.09539563953876495,
0.06320159137248993,
-0.20365124940872192,
0.17790605127811432,
0.11620951443910599,
-0.08647792041301727,
0.016471203416585922,
0.11918630450963974,
-0.0955025777220726,
-0.10190477967262268,
-0.020330552011728287,
0.06531070172786713,
0.004804765339940786,
-0.005259643774479628,
0.15352381765842438,
0.1219400018453598,
0.24619436264038086,
0.0016043380601331592,
-0.02429460547864437,
-0.01727108471095562,
-0.30177924036979675,
0.1276848465204239,
-0.11187233030796051,
-0.13690558075904846,
-0.07688196748495102,
-0.0498974584043026,
-0.07917660474777222,
0.13257206976413727,
-0.2097623497247696,
-0.0003493943077046424,
1.5110459861323511e-34,
-0.22266742587089539,
-0.017917027696967125,
0.052158478647470474,
-0.24450244009494781,
0.04387146979570389,
-0.0683576688170433,
0.15815013647079468,
0.1412132829427719,
-0.09898779541254044,
-0.21025964617729187,
-0.222444549202919
] |
https://github.com/huggingface/datasets/issues/5929 | Importing PyTorch reduces multiprocessing performance for map | Hi! The times match when I run this code locally or on Colab.
Also, we use `multiprocess`, not `multiprocessing`, for parallelization, and torch's `__init__.py` (executed on `import torch` ) slightly modifies the latter. | ### Describe the bug
I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported.
### Steps to reproduce the bug
I created two example scripts to reproduce this behavior:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
Takes around 4 seconds on my machine.
While the same code, but with an `import torch`:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
import torch
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
takes around 22 seconds.
### Expected behavior
I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
- Python version: 3.11.3
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
- torch: 2.0.1 | 33 | Importing PyTorch reduces multiprocessing performance for map
### Describe the bug
I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported.
### Steps to reproduce the bug
I created two example scripts to reproduce this behavior:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
Takes around 4 seconds on my machine.
While the same code, but with an `import torch`:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
import torch
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
takes around 22 seconds.
### Expected behavior
I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
- Python version: 3.11.3
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
- torch: 2.0.1
Hi! The times match when I run this code locally or on Colab.
Also, we use `multiprocess`, not `multiprocessing`, for parallelization, and torch's `__init__.py` (executed on `import torch` ) slightly modifies the latter. | [
-0.16096703708171844,
0.10577213764190674,
-0.13965578377246857,
-0.056819722056388855,
-0.04658685252070427,
-0.045013781636953354,
0.17775966227054596,
-0.03099341131746769,
-0.14526216685771942,
0.12436486780643463,
0.003615977708250284,
-0.002776256063953042,
-0.09453506767749786,
-0.16929534077644348,
0.02395634911954403,
0.03952736780047417,
0.0594627819955349,
-0.018728116527199745,
0.014688306488096714,
-0.010550916194915771,
-0.15135516226291656,
-0.08689280599355698,
-0.02174786850810051,
-0.027240000665187836,
0.01217171736061573,
-0.04556692764163017,
-0.09810692816972733,
-0.04057789221405983,
-0.002393712755292654,
-0.02802916057407856,
-0.08455229550600052,
-0.071449413895607,
-0.10800846666097641,
0.31611788272857666,
0.000004916123543807771,
-0.024234380573034286,
0.2262762486934662,
0.1152593195438385,
0.14144667983055115,
0.05567435920238495,
0.21256901323795319,
-0.049089912325143814,
0.05851760506629944,
0.019256804138422012,
0.027951890602707863,
-0.031849492341279984,
-0.05271263048052788,
-0.06563743948936462,
-0.00020174759265501052,
0.022246720269322395,
-0.04152528569102287,
0.20291534066200256,
-0.03324078023433685,
-0.06598338484764099,
-0.04020221158862114,
-0.042572930455207825,
-0.15418605506420135,
0.06818545609712601,
-0.06360619515180588,
-0.08319490402936935,
-0.03333433344960213,
0.057178813964128494,
0.03522081300616264,
0.01817607879638672,
0.008375183679163456,
0.1248432919383049,
-0.17010490596294403,
-0.26326805353164673,
-0.0692548006772995,
0.1643552929162979,
-0.2903127372264862,
0.06401044130325317,
-0.06186894327402115,
-0.017967604100704193,
-0.08615417033433914,
-0.039877187460660934,
0.11784210801124573,
0.00010850420221686363,
-0.15061627328395844,
0.010929880663752556,
-0.07129234075546265,
0.012147784233093262,
0.02322656288743019,
-0.0908036082983017,
-0.18239620327949524,
0.13469959795475006,
0.19816158711910248,
0.06824285537004471,
0.094560407102108,
0.022957324981689453,
0.13965922594070435,
-0.12117975205183029,
0.05711260810494423,
-0.13260149955749512,
-0.024818504229187965,
-0.01542355865240097,
-0.09858648478984833,
-0.12475133687257767,
-0.08446565270423889,
-0.17006976902484894,
-0.018350062891840935,
0.267223060131073,
-0.01538157556205988,
0.01732132025063038,
-0.14960886538028717,
-0.08802492916584015,
0.0016231012996286154,
-0.042236801236867905,
0.022891506552696228,
-0.1265561431646347,
0.03614543005824089,
0.1653381735086441,
-0.023706601932644844,
-0.15513958036899567,
0.09950277209281921,
-0.1772540956735611,
0.0826089158654213,
0.07137539982795715,
-0.11661958694458008,
0.04271059110760689,
-0.023925263434648514,
0.043071091175079346,
-0.09984302520751953,
0.20123478770256042,
0.012794475071132183,
0.012671152129769325,
-0.12322811037302017,
-0.0423181988298893,
-0.1324877291917801,
0.06876613944768906,
-0.03055289015173912,
-0.069327712059021,
0.06333091109991074,
-0.050407763570547104,
0.069383405148983,
-0.11394817382097244,
0.0012655085884034634,
-0.020935388281941414,
-0.0702170878648758,
-0.037302128970623016,
0.13264775276184082,
0.00489965733140707,
0.09348585456609726,
0.10723673552274704,
-0.09900377690792084,
0.11560875922441483,
0.14345785975456238,
0.21777503192424774,
-0.15301848948001862,
-0.0402371808886528,
-0.024901049211621284,
0.05366359278559685,
-0.035406455397605896,
0.19918882846832275,
-0.04255643114447594,
0.05077587068080902,
-0.04385805502533913,
-0.05792044848203659,
-0.14321762323379517,
-0.03130079060792923,
-0.049900319427251816,
-0.19370914995670319,
-0.08902673423290253,
-0.032021600753068924,
0.06900102645158768,
0.18976448476314545,
0.005102579481899738,
0.09588305652141571,
0.03188571333885193,
0.16127033531665802,
0.27052682638168335,
-0.05936085432767868,
-0.2890896499156952,
0.1424759179353714,
0.010643403977155685,
0.059884652495384216,
-0.09470079094171524,
-0.015983756631612778,
-0.12217384576797485,
-0.007281085941940546,
-0.00677313469350338,
0.020893683657050133,
-0.044256791472435,
-0.042680513113737106,
0.20636339485645294,
0.1432725191116333,
0.18904148042201996,
0.2050286829471588,
-0.0336340107023716,
-0.01824912242591381,
-0.005186893977224827,
0.1172032281756401,
0.06272105872631073,
0.1418379247188568,
0.03658122569322586,
-0.01767933927476406,
-0.08687397092580795,
-0.10126524418592453,
0.1003156378865242,
-0.22965741157531738,
-0.10156029462814331,
-0.024238811805844307,
-0.2365867793560028,
0.025472693145275116,
-0.05374661087989807,
-0.03828416019678116,
-0.15696057677268982,
0.11613358557224274,
0.0582171306014061,
0.08535105735063553,
0.042858466506004333,
-0.007362418342381716,
0.1569925993680954,
0.10308613628149033,
-0.048198144882917404,
-0.23729731142520905,
-0.12736885249614716,
0.056951072067022324,
-0.21392178535461426,
0.023724941536784172,
-0.023382557556033134,
0.16273555159568787,
0.1724054366350174,
0.14723500609397888,
-0.1296042501926422,
-0.09909763932228088,
0.04698256775736809,
0.06787816435098648,
-0.09173039346933365,
0.029020925983786583,
-0.09609269350767136,
-0.021204300224781036,
-0.03966103121638298,
-0.1146986111998558,
0.09274966269731522,
0.023755993694067,
0.04598760977387428,
-0.09368239343166351,
0.16228972375392914,
0.12711891531944275,
-0.16025421023368835,
0.1231917217373848,
0.021005015820264816,
-0.14660491049289703,
0.08375188708305359,
0.21219804883003235,
0.14939673244953156,
0.1136951670050621,
-0.04898267239332199,
-0.1284540295600891,
0.27297285199165344,
0.041316717863082886,
-0.11007697880268097,
0.0436997152864933,
0.029249150305986404,
0.09818372130393982,
0.1605169177055359,
0.07747350633144379,
0.06129546836018562,
-0.06603152304887772,
0.2953207790851593,
-0.005432315170764923,
-0.03509538993239403,
0.002705506980419159,
-0.10142063349485397,
-0.11329664289951324,
0.17433345317840576,
-0.19836999475955963,
0.2414340227842331,
0.06440028548240662,
0.17643305659294128,
-0.04004170745611191,
-0.12071298807859421,
-0.037113964557647705,
0.03928598761558533,
-0.007568499073386192,
-0.027839696034789085,
-0.04037611931562424,
0.06175539270043373,
-0.02460133470594883,
-0.08294059336185455,
0.023930255323648453,
-0.008576338179409504,
-0.05034799501299858,
0.10134852677583694,
0.12394005060195923,
-0.014935491606593132,
-0.005519053898751736,
-0.0015260418877005577,
-0.04083037003874779,
0.0602048896253109,
-0.2695409655570984,
0.03926315903663635,
0.06053605303168297,
0.15826523303985596,
0.21832284331321716,
0.23649413883686066,
-0.1188570186495781,
-0.06420815736055374,
-0.2331325113773346,
0.09607107192277908,
-0.12760329246520996,
-0.02143348939716816,
0.005070924758911133,
0.036588601768016815,
0.008438101038336754,
0.09638078510761261,
0.027212996035814285,
-0.24727775156497955,
-0.006759268697351217,
0.039961427450180054,
-0.0056789531372487545,
0.1006312221288681,
-0.09187863022089005,
0.03427714481949806,
0.024639055132865906,
-0.05913025140762329,
-0.19682687520980835,
0.1125989556312561,
-0.06388340145349503,
0.07344143092632294,
0.06985227018594742,
-0.12983639538288116,
-0.12494815140962601,
0.021783897653222084,
0.035060882568359375,
-0.09852571040391922,
-0.0019902552012354136,
-0.14167428016662598,
0.013029610738158226,
0.08181067556142807,
0.03976457938551903,
-0.009907294064760208,
0.03327949345111847,
0.1950066238641739,
-0.062106795608997345,
-0.0999077633023262,
0.01830546371638775,
0.29221591353416443,
0.06817175447940826,
-0.046813905239105225,
-0.0816587582230568,
-0.026031777262687683,
0.0013582755345851183,
0.1904837042093277,
-0.0486224889755249,
0.005868749693036079,
-0.2504548132419586,
0.23102986812591553,
0.1533006727695465,
0.08119085431098938,
0.09574353694915771,
0.08965117484331131,
-0.1713404804468155,
0.014030525460839272,
0.04257877171039581,
-0.2094312310218811,
-0.022510601207613945,
-0.018032865598797798,
0.01568416692316532,
0.00010765150364022702,
-0.152626633644104,
0.17605191469192505,
0.043111976236104965,
-0.3126455545425415,
-0.00228821556083858,
-0.02344192937016487,
0.0413336381316185,
-0.16499654948711395,
-0.14716657996177673,
0.013009191490709782,
-0.11517664045095444,
-0.011076342314481735,
-0.040188081562519073,
-0.07213380187749863,
-0.12359823286533356,
0.08124212920665741,
-0.20438213646411896,
0.10160789638757706,
0.05910949036478996,
0.06086185947060585,
0.0874127596616745,
-0.13112600147724152,
0.05969084054231644,
0.054069701582193375,
-0.10183396190404892,
0.08183366805315018,
-0.0046965316869318485,
-0.09611079841852188,
-0.06631342321634293,
-0.17804405093193054,
0.04670114070177078,
0.08648467063903809,
-0.17694735527038574,
0.0022475235164165497,
0.036354947835206985,
0.14577853679656982,
0.08206717669963837,
-0.03796704486012459,
0.12451338768005371,
0.0007707916083745658,
0.07029088586568832,
0.14892731606960297,
-0.02782749943435192,
0.11227412521839142,
-0.04619065299630165,
-0.11326849460601807,
-0.015284867957234383,
-0.030453847721219063,
0.14892105758190155,
0.16710267961025238,
0.14383147656917572,
-0.14277254045009613,
-0.01758083887398243,
0.0490197017788887,
0.1515306532382965,
0.0431557223200798,
-0.04352849721908569,
-0.0589250847697258,
-0.09614963084459305,
-0.024328848347067833,
-0.20745447278022766,
-0.053977206349372864,
0.014665846712887287,
-0.019248152151703835,
0.0034502195194363594,
-0.05599936097860336,
0.047496020793914795,
0.22282260656356812,
0.03393646702170372,
0.11721894145011902,
0.01325426995754242,
0.14002303779125214,
0.052245792001485825,
0.2524015009403229,
-0.06859496980905533,
0.14570577442646027,
-0.05104522407054901,
-0.11728832870721817,
0.07853519916534424,
-0.024342985823750496,
-0.029097001999616623,
0.10033276677131653,
0.049333877861499786,
0.00996579322963953,
-0.2937321364879608,
-0.009092926979064941,
0.000941971258725971,
-0.03425315022468567,
0.1597609519958496,
0.06139327213168144,
-0.10859786719083786,
-0.08870261907577515,
-0.24523884057998657,
0.11205510795116425,
-0.05015874281525612,
0.27343279123306274,
-0.43476757407188416,
-0.01892171800136566,
0.0747499018907547,
-0.20776578783988953,
-0.01983153447508812,
0.027261201292276382,
0.19486083090305328,
-0.02316877245903015,
0.07777436077594757,
0.05314180254936218,
0.0024552152026444674,
0.13601362705230713,
0.006145442370325327,
-0.041288457810878754,
0.06699393689632416,
-0.026537207886576653,
0.15391188859939575,
0.09558200091123581,
-0.1135336309671402,
0.19668523967266083,
0.11296847462654114,
-0.07176317274570465,
-0.14140842854976654,
0.18469558656215668,
0.22459888458251953,
0.050705064088106155,
-0.04145312309265137,
-0.0214915219694376,
0.011536981910467148,
0.040168169885873795,
-0.04922995716333389,
-0.08373688906431198,
-0.04266295209527016,
-0.15350069105625153,
0.06724470108747482,
0.046348586678504944,
-0.04286205768585205,
0.3350912630558014,
0.05966098979115486,
0.06322058290243149,
0.036173660308122635,
-0.02600059099495411,
-0.005117516964673996,
0.001460660365410149,
-0.056254737079143524,
0.007369206752628088,
0.055874697864055634,
0.07053382694721222,
-0.07839725911617279,
-0.05195120349526405,
0.037164755165576935,
0.013889007270336151,
-0.06325319409370422,
0.05027362331748009,
-0.15774837136268616,
-0.15889456868171692,
-0.1660442054271698,
0.19144949316978455,
-0.045391473919153214,
-0.08905181288719177,
0.016948407515883446,
0.07032787799835205,
-0.02065545879304409,
0.042780548334121704,
-0.0697348341345787,
0.05160699039697647,
-0.09784530848264694,
0.2153988778591156,
-0.032710641622543335,
-0.14985065162181854,
-0.12158790230751038,
0.3015521764755249,
0.15182067453861237,
-0.03275235369801521,
0.0212052334100008,
0.1316622942686081,
0.05883539468050003,
-0.016454266384243965,
-0.01978720724582672,
0.0474071130156517,
0.02241501957178116,
-0.0819893479347229,
0.12043306976556778,
-0.07481587678194046,
-0.024942323565483093,
-0.11589132249355316,
-0.07388988882303238,
-0.08437226712703705,
-0.14482247829437256,
0.060057517141103745,
-0.12126396596431732,
-0.04099010303616524,
-0.19597773253917694,
0.02848859876394272,
0.220474973320961,
0.07113650441169739,
-0.00930183194577694,
-0.058890268206596375,
-2.313693057692067e-32,
0.012519893236458302,
-0.13886229693889618,
-0.025540346279740334,
0.04441823065280914,
-0.017483102157711983,
0.04132438451051712,
-0.16108660399913788,
-0.1475546956062317,
-0.09198511391878128,
-0.08696894347667694,
-0.1712089478969574,
0.09206985682249069,
0.04397450014948845,
-0.05306466668844223,
-0.08267764747142792,
0.012196974828839302,
0.14037565886974335,
-0.08714739978313446,
-0.14715521037578583,
0.06978441774845123,
0.21439193189144135,
0.20225882530212402,
-0.010587802156805992,
0.03356492891907692,
-0.098781518638134,
0.014065742492675781,
0.04443572834134102,
-0.2256770133972168,
0.1460258662700653,
-0.29424744844436646,
-0.10682936757802963,
0.1453431099653244,
-0.10189200937747955,
-0.13405264914035797,
-0.08493668586015701,
-0.04448528587818146,
-0.024434039369225502,
-0.09794774651527405,
-0.09799128770828247,
-0.12228576838970184,
-0.05439566448330879,
-0.02949051558971405,
0.2460309863090515,
0.007039263378828764,
-0.01889132894575596,
-0.04759152978658676,
0.022232934832572937,
0.03490140661597252,
-0.3114091753959656,
-0.12256909161806107,
-0.12590540945529938,
0.16563363373279572,
0.05226636305451393,
0.07680392265319824,
0.218071848154068,
-0.14733655750751495,
0.0899912565946579,
0.04565320536494255,
-0.09387001395225525,
-0.0313178189098835,
-0.07944262027740479,
-0.00432463688775897,
-0.015532931312918663,
0.1291169673204422,
0.17270535230636597,
0.08138606697320938,
0.4088847041130066,
0.0966326892375946,
0.37263816595077515,
0.11395035684108734,
0.04777092859148979,
0.14852122962474823,
-0.07631281018257141,
-0.07250731438398361,
-0.09219483286142349,
-0.14356699585914612,
-0.06605212390422821,
-0.03911300376057625,
0.03888699784874916,
-0.16794541478157043,
-0.10114352405071259,
-0.05013090372085571,
-0.032338324934244156,
0.1668800264596939,
-0.006504190620034933,
0.19566689431667328,
0.07235532253980637,
0.17847219109535217,
-0.12312041968107224,
-0.16339972615242004,
0.056292712688446045,
0.14331813156604767,
0.03037220984697342,
-0.03567635267972946,
0.09638085961341858,
0.12328878045082092,
-0.19043458998203278,
0.09509461373090744,
-0.04114798456430435,
0.11423131078481674,
-0.0378776416182518,
-0.0023929616436362267,
-0.09313710778951645,
-0.01326693408191204,
0.17026324570178986,
-0.043040454387664795,
0.017803264781832695,
0.053139109164476395,
-0.2317984253168106,
-0.09265509247779846,
-0.04095999523997307,
-0.05272568762302399,
0.1345079094171524,
0.012271721847355366,
0.12776245176792145,
0.014601621776819229,
-0.0044974652118980885,
-0.00638988520950079,
0.18308182060718536,
0.27716782689094543,
-0.07616797834634781,
-0.18982945382595062,
0.052507974207401276,
-0.09780308604240417,
-0.09083342552185059,
0.1696278303861618,
-0.1884901523590088,
0.0311686173081398,
0.1235976368188858,
-0.05295021831989288,
-0.09522030502557755,
-0.054704729467630386,
7.316312462535279e-7,
-0.10130743682384491,
0.14487777650356293,
-0.0798962265253067,
0.037865050137043,
-0.14161014556884766,
0.14045476913452148,
-0.22446496784687042,
0.1352749764919281,
-0.010657990351319313,
0.11822941154241562,
0.12302792817354202,
-0.014523891732096672,
0.047967083752155304,
0.09641794115304947,
0.24757012724876404,
-0.21518273651599884,
-0.03248211368918419,
0.01346871629357338,
-0.11039943993091583,
-0.007662823889404535,
-0.06916331499814987,
0.023445196449756622,
-0.016940947622060776,
-0.12306620925664902,
0.21616452932357788,
-0.16641463339328766,
0.09109541028738022,
-0.055257026106119156,
0.03691164404153824,
0.04535585641860962,
0.2639104723930359,
0.057525791227817535,
-0.10298458486795425,
0.08295142650604248,
0.055952299386262894,
-0.010394588112831116,
-0.08238164335489273,
-0.06485053151845932,
0.03906463459134102,
-0.012747814878821373,
0.004869429394602776,
-0.08942673355340958,
0.08081936091184616,
-0.1572616994380951,
0.06246620789170265,
0.2000638097524643,
-0.1064780056476593,
-0.10211405158042908,
0.062196407467126846,
0.0651627779006958,
0.09025241434574127,
0.15115082263946533,
-0.014949662610888481,
0.17962969839572906,
0.05602766573429108,
-0.036733921617269516,
-0.11745119094848633,
-0.2593347132205963,
-0.05885067209601402,
-0.13546672463417053,
-0.1991608738899231,
-0.10476207733154297,
-0.01516331173479557,
0.051415108144283295,
0.21620668470859528,
-0.09657567739486694,
-0.04496603086590767,
9.467486028848547e-35,
0.011798829771578312,
-0.10996544361114502,
0.07691016048192978,
-0.24897867441177368,
-0.002657240955159068,
-0.06506764888763428,
0.019139794632792473,
-0.21078352630138397,
-0.13494382798671722,
-0.2132929414510727,
-0.11085079610347748
] |
https://github.com/huggingface/datasets/issues/5929 | Importing PyTorch reduces multiprocessing performance for map | Hey Mariosasko,
Thanks for looking into it. We further did some investigations after your comment and figured out it's only affecting some hardware/software configurations with the `pytorch` installation of `conda-forge`. Based on this we found the following issue in PyTorch: https://github.com/pytorch/pytorch/issues/102269 with a quick fix for now.
Since it seems to be a deeper issue with forking processes, the difference between`multiprocess` and `multiprocessing` didn't make a difference.
Closing this, since the issue comes from `pytorch` not `dataset`.
| ### Describe the bug
I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported.
### Steps to reproduce the bug
I created two example scripts to reproduce this behavior:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
Takes around 4 seconds on my machine.
While the same code, but with an `import torch`:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
import torch
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
takes around 22 seconds.
### Expected behavior
I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
- Python version: 3.11.3
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
- torch: 2.0.1 | 77 | Importing PyTorch reduces multiprocessing performance for map
### Describe the bug
I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported.
### Steps to reproduce the bug
I created two example scripts to reproduce this behavior:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
Takes around 4 seconds on my machine.
While the same code, but with an `import torch`:
```
import datasets
datasets.disable_caching()
from datasets import Dataset
import time
import torch
PROC=32
if __name__ == "__main__":
dataset = [True] * 10000000
dataset = Dataset.from_dict({'train': dataset})
start = time.time()
dataset.map(lambda x: x, num_proc=PROC)
end = time.time()
print(end - start)
```
takes around 22 seconds.
### Expected behavior
I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
- Python version: 3.11.3
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
- torch: 2.0.1
Hey Mariosasko,
Thanks for looking into it. We further did some investigations after your comment and figured out it's only affecting some hardware/software configurations with the `pytorch` installation of `conda-forge`. Based on this we found the following issue in PyTorch: https://github.com/pytorch/pytorch/issues/102269 with a quick fix for now.
Since it seems to be a deeper issue with forking processes, the difference between`multiprocess` and `multiprocessing` didn't make a difference.
Closing this, since the issue comes from `pytorch` not `dataset`.
| [
-0.1609170138835907,
0.11680429428815842,
-0.1529327780008316,
-0.057525839656591415,
-0.02384747564792633,
-0.05062715709209442,
0.16062238812446594,
-0.024297352880239487,
-0.12491700053215027,
0.09960170835256577,
0.015382558107376099,
-0.01871323212981224,
-0.08991328626871109,
-0.15752647817134857,
0.04080946370959282,
0.03972112014889717,
0.07078902423381805,
-0.011575986631214619,
-0.004284144379198551,
-0.010134386830031872,
-0.13956321775913239,
-0.09095872193574905,
-0.010411422699689865,
-0.032765477895736694,
0.008109839633107185,
-0.015699846670031548,
-0.08715201169252396,
-0.03232670947909355,
0.012008769437670708,
-0.020318664610385895,
-0.07627832144498825,
-0.07294534146785736,
-0.11325809359550476,
0.3161925673484802,
0.000004977808657713467,
-0.011511982418596745,
0.2134021520614624,
0.11456569284200668,
0.1410336047410965,
0.05549101158976555,
0.2227185219526291,
-0.0571369007229805,
0.04200870543718338,
0.019631627947092056,
0.026635698974132538,
-0.07438787817955017,
-0.044738952070474625,
-0.0898972824215889,
-0.007032263092696667,
0.017717773094773293,
-0.03609080985188484,
0.19730010628700256,
-0.029152762144804,
-0.07387343049049377,
-0.014956053346395493,
-0.038583192974328995,
-0.1496223360300064,
0.046187788248062134,
-0.05048321560025215,
-0.08771919459104538,
-0.055839117616415024,
0.05457499623298645,
0.029672149568796158,
0.02013830840587616,
0.0249581728130579,
0.11607593297958374,
-0.17012876272201538,
-0.24058233201503754,
-0.05581270158290863,
0.15836694836616516,
-0.29006847739219666,
0.07269539684057236,
-0.04794413968920708,
-0.0195466335862875,
-0.08893038332462311,
-0.04320241138339043,
0.12289407104253769,
-0.004343748092651367,
-0.12907348573207855,
-0.01876893639564514,
-0.07560722529888153,
-0.015094633214175701,
0.012016701512038708,
-0.08571919798851013,
-0.1970769464969635,
0.1115383505821228,
0.20803791284561157,
0.07867395877838135,
0.07933124899864197,
0.03568367660045624,
0.12485462427139282,
-0.1315930038690567,
0.045676957815885544,
-0.13545072078704834,
-0.028809893876314163,
-0.003165699075907469,
-0.0941612496972084,
-0.14048634469509125,
-0.07838328927755356,
-0.1647491455078125,
-0.014105765148997307,
0.2771688401699066,
-0.012406856752932072,
-0.010681867599487305,
-0.14249494671821594,
-0.09061555564403534,
0.004299783613532782,
-0.035917818546295166,
0.026783352717757225,
-0.1328086405992508,
0.061439238488674164,
0.1668999344110489,
-0.003603684715926647,
-0.1444108784198761,
0.09269203990697861,
-0.19130539894104004,
0.09862425923347473,
0.0695781260728836,
-0.10507631301879883,
0.036680079996585846,
-0.0418008454144001,
0.03641945496201515,
-0.10120242834091187,
0.2018730640411377,
0.010750512592494488,
0.0107206916436553,
-0.10908321291208267,
-0.03283236175775528,
-0.12553603947162628,
0.07041225582361221,
-0.022615479305386543,
-0.09555132687091827,
0.07486318796873093,
-0.04578796774148941,
0.07039126753807068,
-0.10059139877557755,
0.01322153676301241,
-0.02616533637046814,
-0.06316005438566208,
-0.04100202023983002,
0.1524587720632553,
0.028307471424341202,
0.09963961690664291,
0.11127258092164993,
-0.11007232218980789,
0.10865501314401627,
0.14028121531009674,
0.23308847844600677,
-0.16213375329971313,
-0.03202982619404793,
-0.02746945433318615,
0.056856054812669754,
-0.048327475786209106,
0.18905997276306152,
-0.049566756933927536,
0.04293308034539223,
-0.029272904619574547,
-0.058134377002716064,
-0.1504078358411789,
-0.030820952728390694,
-0.04241053760051727,
-0.18939006328582764,
-0.07709462195634842,
-0.021563638001680374,
0.07258421182632446,
0.16573089361190796,
0.028289880603551865,
0.07027896493673325,
0.027357002720236778,
0.14617376029491425,
0.2403765171766281,
-0.067933090031147,
-0.28780296444892883,
0.13086679577827454,
0.014796755276620388,
0.08054262399673462,
-0.10357449948787689,
-0.010133801959455013,
-0.12470122426748276,
-0.0184035487473011,
-0.01637272909283638,
0.0329163521528244,
-0.06896574050188065,
-0.05103462189435959,
0.20326730608940125,
0.14847590029239655,
0.1762717366218567,
0.20093022286891937,
-0.027026504278182983,
-0.03105434961616993,
-0.003737034508958459,
0.10237951576709747,
0.08139210194349289,
0.1521046757698059,
0.03191976249217987,
-0.018055878579616547,
-0.07462429255247116,
-0.08746226876974106,
0.08281252533197403,
-0.24855835735797882,
-0.10697821527719498,
-0.015558171086013317,
-0.2505986988544464,
0.024678075686097145,
-0.05036043003201485,
-0.046232156455516815,
-0.17309673130512238,
0.12019124627113342,
0.051731258630752563,
0.0786132663488388,
0.022743090987205505,
0.007777571212500334,
0.17095205187797546,
0.10545904189348221,
-0.05039682611823082,
-0.237940713763237,
-0.14040134847164154,
0.06870487332344055,
-0.22724512219429016,
0.028562594205141068,
-0.028960714116692543,
0.1529785841703415,
0.15831422805786133,
0.14525550603866577,
-0.14315351843833923,
-0.09138383716344833,
0.06293344497680664,
0.07982249557971954,
-0.08860328048467636,
0.022517962381243706,
-0.10265463590621948,
-0.026151511818170547,
-0.0334780290722847,
-0.10696228593587875,
0.07896115630865097,
0.001917887944728136,
0.04763204976916313,
-0.07918021082878113,
0.16443157196044922,
0.11575572192668915,
-0.14168865978717804,
0.11501853168010712,
0.002023500157520175,
-0.15282680094242096,
0.0949048176407814,
0.1967208981513977,
0.14835228025913239,
0.11013519763946533,
-0.06353764981031418,
-0.10132598131895065,
0.27327415347099304,
0.051588114351034164,
-0.11840903759002686,
0.03708616644144058,
0.02688680589199066,
0.08449884504079819,
0.1674884408712387,
0.07405292242765427,
0.07187511026859283,
-0.07048256695270538,
0.2775699496269226,
-0.00964834913611412,
-0.019478226080536842,
0.010121346451342106,
-0.11980613321065903,
-0.09712737798690796,
0.1637892872095108,
-0.20066937804222107,
0.25192806124687195,
0.051869068294763565,
0.15655523538589478,
-0.04180441424250603,
-0.12042978405952454,
-0.03133362904191017,
0.030293898656964302,
-0.010010318830609322,
-0.046780604869127274,
-0.02255810797214508,
0.059725068509578705,
-0.04131835326552391,
-0.10879769176244736,
0.040611203759908676,
-0.0004568204749375582,
-0.06279327720403671,
0.09871357679367065,
0.11248769611120224,
-0.018220704048871994,
0.0003192789445165545,
0.013476611115038395,
-0.03944804519414902,
0.04448225721716881,
-0.24947288632392883,
0.046255193650722504,
0.04728303477168083,
0.15414458513259888,
0.22133122384548187,
0.22385376691818237,
-0.09633418917655945,
-0.07158107310533524,
-0.22977355122566223,
0.10721397399902344,
-0.12977808713912964,
-0.015985749661922455,
0.004792577121406794,
0.027117742225527763,
0.002793779131025076,
0.09186781197786331,
0.022022372111678123,
-0.26155784726142883,
-0.033892761915922165,
0.03516349568963051,
-0.02306831069290638,
0.1040513664484024,
-0.10496584326028824,
0.031161775812506676,
0.0585222989320755,
-0.03003803640604019,
-0.19247326254844666,
0.12412668019533157,
-0.024543622508645058,
0.08048729598522186,
0.08812247961759567,
-0.12532874941825867,
-0.11783994734287262,
0.015608151443302631,
0.032720886170864105,
-0.069680355489254,
0.002160485601052642,
-0.14059896767139435,
0.022089999169111252,
0.07160846143960953,
0.041345130652189255,
0.002953135408461094,
0.03060450591146946,
0.18302768468856812,
-0.06592158228158951,
-0.10105341672897339,
0.02128838747739792,
0.3004997670650482,
0.06961967051029205,
-0.06159051135182381,
-0.08230569958686829,
-0.016609152778983116,
0.02740578167140484,
0.19897274672985077,
-0.04401371255517006,
0.022414788603782654,
-0.25656658411026,
0.2344435155391693,
0.13321727514266968,
0.06640572845935822,
0.09987309575080872,
0.09762534499168396,
-0.1697283238172531,
0.0006049068761058152,
0.04771493375301361,
-0.18554674088954926,
-0.030845478177070618,
-0.01544165425002575,
0.007408365607261658,
-0.03379802405834198,
-0.15654583275318146,
0.18017742037773132,
0.058924537152051926,
-0.3104802370071411,
-0.010816922411322594,
-0.005313333589583635,
0.06288152933120728,
-0.15033787488937378,
-0.13492834568023682,
0.02401583269238472,
-0.12392687797546387,
-0.006256201304495335,
-0.05425965040922165,
-0.07958195358514786,
-0.12311529368162155,
0.07882815599441528,
-0.19052207469940186,
0.1376512199640274,
0.073817677795887,
0.06827910989522934,
0.05983230471611023,
-0.1250198632478714,
0.05264788493514061,
0.04292372614145279,
-0.10080669075250626,
0.08185748755931854,
0.005510757677257061,
-0.11564294993877411,
-0.06005342677235603,
-0.18697302043437958,
0.02863808162510395,
0.09931928664445877,
-0.17761138081550598,
0.004840909969061613,
0.043283794075250626,
0.15263889729976654,
0.06864026933908463,
-0.0492839477956295,
0.1285664588212967,
0.007391325663775206,
0.052452996373176575,
0.14844076335430145,
-0.020167654380202293,
0.12191154062747955,
-0.048301078379154205,
-0.10955443233251572,
-0.019296640530228615,
-0.027787908911705017,
0.1447416990995407,
0.17628857493400574,
0.13454578816890717,
-0.15236571431159973,
-0.01648554764688015,
0.05081941932439804,
0.13506393134593964,
0.048423152416944504,
-0.04335932806134224,
-0.054894525557756424,
-0.07593023031949997,
-0.02286132052540779,
-0.20939938724040985,
-0.048453327268362045,
-0.001500745420344174,
-0.0015079568838700652,
0.003706138813868165,
-0.0513785146176815,
0.03556877374649048,
0.20992150902748108,
0.04530009254813194,
0.12042374163866043,
0.003567455103620887,
0.12213059514760971,
0.07689128816127777,
0.24926991760730743,
-0.07593008875846863,
0.1349184662103653,
-0.05801219865679741,
-0.13788561522960663,
0.07831787317991257,
-0.017542093992233276,
-0.017534567043185234,
0.09198769181966782,
0.06948230415582657,
0.020925898104906082,
-0.27158161997795105,
-0.0005491352058015764,
0.00037424860056489706,
-0.031181856989860535,
0.16923515498638153,
0.07574322074651718,
-0.10608348995447159,
-0.08001921325922012,
-0.24009647965431213,
0.11104928702116013,
-0.047990500926971436,
0.26792746782302856,
-0.42450812458992004,
-0.0432477667927742,
0.05692420154809952,
-0.19115427136421204,
-0.02553701028227806,
0.03754010424017906,
0.18920959532260895,
-0.043518781661987305,
0.08083401620388031,
0.05726350098848343,
-0.00905351247638464,
0.13472552597522736,
0.029709801077842712,
-0.02649260126054287,
0.05331297963857651,
-0.0212804414331913,
0.15477418899536133,
0.09921542555093765,
-0.09354911744594574,
0.19481036067008972,
0.10096274316310883,
-0.049224499613046646,
-0.14133307337760925,
0.17594419419765472,
0.21454817056655884,
0.032393522560596466,
-0.05252417176961899,
-0.023989491164684296,
0.005974112544208765,
0.020442958921194077,
-0.022727208212018013,
-0.09091058373451233,
-0.027240809053182602,
-0.16258981823921204,
0.06676991283893585,
0.05804399773478508,
-0.033065974712371826,
0.3313217759132385,
0.07968758046627045,
0.08378951251506805,
0.060063883662223816,
-0.015499856323003769,
-0.01769806258380413,
-0.0029059185180813074,
-0.06147665157914162,
0.009340205229818821,
0.031937986612319946,
0.07674140483140945,
-0.060157474130392075,
-0.0549829825758934,
0.027017612010240555,
0.03846025466918945,
-0.08129004389047623,
0.060928791761398315,
-0.16178590059280396,
-0.1619548797607422,
-0.20611250400543213,
0.19417361915111542,
-0.04574822261929512,
-0.10393824428319931,
0.017376158386468887,
0.07423491775989532,
-0.018227243795990944,
0.04489939287304878,
-0.0645994320511818,
0.048345498740673065,
-0.10754157602787018,
0.22369590401649475,
-0.037034858018159866,
-0.14492511749267578,
-0.10686828941106796,
0.28669312596321106,
0.11419488489627838,
-0.021859388798475266,
0.02192777395248413,
0.12033294886350632,
0.04858586564660072,
-0.013815163634717464,
-0.03225858882069588,
0.08100342750549316,
0.02218514308333397,
-0.09269452840089798,
0.11558932811021805,
-0.07477564364671707,
-0.026663444936275482,
-0.13033229112625122,
-0.0851910263299942,
-0.10050133615732193,
-0.15522363781929016,
0.07088214159011841,
-0.11271101981401443,
-0.042588021606206894,
-0.19660264253616333,
0.04701033607125282,
0.1855885237455368,
0.06897435337305069,
-0.0008764042868278921,
-0.04029401019215584,
-2.3266940252121615e-32,
0.015008501708507538,
-0.12793749570846558,
-0.027751149609684944,
0.04249797388911247,
-0.012363296933472157,
0.05317585915327072,
-0.16497960686683655,
-0.1540212631225586,
-0.1070060059428215,
-0.09890500456094742,
-0.15982237458229065,
0.07530027627944946,
0.0376167856156826,
-0.03063620813190937,
-0.1046842634677887,
0.013951016589999199,
0.1365530639886856,
-0.07808628678321838,
-0.14888492226600647,
0.0904998704791069,
0.21338364481925964,
0.20071209967136383,
-0.0057833194732666016,
0.033624887466430664,
-0.10743831098079681,
0.017873212695121765,
0.06345593929290771,
-0.23847392201423645,
0.13148562610149384,
-0.2867356240749359,
-0.1068328469991684,
0.12439703941345215,
-0.10506577789783478,
-0.1592583954334259,
-0.07871600985527039,
-0.05682157725095749,
-0.027243362739682198,
-0.10288159549236298,
-0.09537720680236816,
-0.1310201734304428,
-0.04094564542174339,
-0.017227377742528915,
0.25543418526649475,
0.0008764015510678291,
-0.03970082849264145,
-0.047290053218603134,
0.0402374267578125,
0.047092027962207794,
-0.3209252953529358,
-0.12263411283493042,
-0.14282095432281494,
0.1672566682100296,
0.05954663082957268,
0.0704207643866539,
0.21265143156051636,
-0.13207796216011047,
0.0948016494512558,
0.028448140248656273,
-0.11627191305160522,
-0.015416041947901249,
-0.06078946217894554,
0.012159458361566067,
-0.0162289310246706,
0.11330558359622955,
0.16463950276374817,
0.07111600041389465,
0.4098709523677826,
0.09281768649816513,
0.3573783338069916,
0.11490298062562943,
0.050556935369968414,
0.15584048628807068,
-0.07653568685054779,
-0.07607842981815338,
-0.08070195466279984,
-0.15094062685966492,
-0.05377257242798805,
-0.03579213470220566,
0.036633677780628204,
-0.14311517775058746,
-0.11477846652269363,
-0.0505770705640316,
-0.0298187006264925,
0.1734837144613266,
-0.009421641938388348,
0.19776184856891632,
0.07856601476669312,
0.19487498700618744,
-0.11754785478115082,
-0.1770719736814499,
0.049802713096141815,
0.12198509275913239,
0.05275504291057587,
-0.051557835191488266,
0.09512709081172943,
0.1300712525844574,
-0.19845664501190186,
0.10027044266462326,
-0.045959483832120895,
0.10395047813653946,
-0.02723720483481884,
0.004772473126649857,
-0.07545211911201477,
-0.010650166310369968,
0.1534799188375473,
-0.04914518818259239,
0.0017518856329843402,
0.07337293773889542,
-0.231411874294281,
-0.09087111055850983,
-0.029483148828148842,
-0.04240426421165466,
0.13333845138549805,
0.02002609893679619,
0.13201114535331726,
0.020267006009817123,
0.010310295969247818,
0.00396603811532259,
0.17649167776107788,
0.2904937267303467,
-0.0821116641163826,
-0.17563743889331818,
0.05688977241516113,
-0.08740059286355972,
-0.09323402494192123,
0.1672510802745819,
-0.19041962921619415,
0.021994836628437042,
0.11789339780807495,
-0.04550661891698837,
-0.08854541182518005,
-0.05392095074057579,
7.329787194976234e-7,
-0.10593509674072266,
0.14512212574481964,
-0.06850969046354294,
0.026862578466534615,
-0.14038988947868347,
0.15315020084381104,
-0.20370566844940186,
0.12401368468999863,
-0.007439788896590471,
0.11497929692268372,
0.12483800947666168,
-0.016146818175911903,
0.047435808926820755,
0.08498935401439667,
0.2575362026691437,
-0.20647035539150238,
-0.03076286055147648,
-0.0005392060847952962,
-0.12641853094100952,
0.002245383569970727,
-0.0478634275496006,
0.053254857659339905,
-0.037454091012477875,
-0.12273868918418884,
0.23078808188438416,
-0.15275686979293823,
0.09072718024253845,
-0.053686559200286865,
0.05616253986954689,
0.05525597184896469,
0.2788512706756592,
0.0502539686858654,
-0.1133507490158081,
0.08299729973077774,
0.057474490255117416,
-0.029582075774669647,
-0.09939046204090118,
-0.060044579207897186,
0.03794007748365402,
-0.028690222650766373,
0.011018211022019386,
-0.09302178770303726,
0.07554052025079727,
-0.17668269574642181,
0.07104291766881943,
0.20826329290866852,
-0.11695298552513123,
-0.1150437593460083,
0.05564213544130325,
0.07087664306163788,
0.09494809061288834,
0.13716845214366913,
-0.017443740740418434,
0.18384356796741486,
0.06782544404268265,
-0.030252091586589813,
-0.1258240044116974,
-0.24750947952270508,
-0.04966127499938011,
-0.14470961689949036,
-0.2020922750234604,
-0.08763442933559418,
-0.019594278186559677,
0.04704466834664345,
0.20135124027729034,
-0.1121739074587822,
-0.06676064431667328,
1.0308162509975074e-34,
0.00806627981364727,
-0.11819814890623093,
0.07147827744483948,
-0.24389345943927765,
0.0026927569415420294,
-0.07640449702739716,
0.01606922782957554,
-0.19244025647640228,
-0.148134246468544,
-0.20669201016426086,
-0.11150360107421875
] |
https://github.com/huggingface/datasets/issues/5927 | `IndexError` when indexing `Sequence` of `Array2D` with `None` values | Easy fix would be to add:
```python
null_indices -= np.arange(len(null_indices))
```
before L279, but I'm not sure it's the most intuitive way to fix it. | ### Describe the bug
Having `None` values in a `Sequence` of `ArrayND` fails.
### Steps to reproduce the bug
```python
from datasets import Array2D, Dataset, Features, Sequence
data = [
[
[[0]],
None,
None,
]
]
feature = Sequence(Array2D((1, 1), dtype="int64"))
dataset = Dataset.from_dict({"a": data}, features=Features({"a": feature}))
dataset[0] # error raised only when indexing
```
```
Traceback (most recent call last):
File "/Users/quentingallouedec/gia/c.py", line 13, in <module>
dataset[0] # error raised only when indexing
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2658, in __getitem__
return self._getitem(key)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2643, in _getitem
formatted_output = format_table(
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 634, in format_table
return formatter(pa_table, query_type=query_type)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 406, in __call__
return self.format_row(pa_table)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 441, in format_row
row = self.python_arrow_extractor().extract_row(pa_table)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 144, in extract_row
return _unnest(pa_table.to_pydict())
File "pyarrow/table.pxi", line 4146, in pyarrow.lib.Table.to_pydict
File "pyarrow/table.pxi", line 1312, in pyarrow.lib.ChunkedArray.to_pylist
File "pyarrow/array.pxi", line 1521, in pyarrow.lib.Array.to_pylist
File "pyarrow/scalar.pxi", line 675, in pyarrow.lib.ListScalar.as_py
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 760, in to_pylist
return self.to_numpy(zero_copy_only=zero_copy_only).tolist()
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 725, in to_numpy
numpy_arr = np.insert(numpy_arr.astype(np.float64), null_indices, np.nan, axis=0)
File "<__array_function__ internals>", line 200, in insert
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/numpy/lib/function_base.py", line 5426, in insert
old_mask[indices] = False
IndexError: index 3 is out of bounds for axis 0 with size 3
```
AFAIK, the problem only occurs when you use a `Sequence` of `ArrayND`.
I strongly suspect that the problem comes from this line, or `np.insert` is misused:
https://github.com/huggingface/datasets/blob/02ee418831aba68d0be93227bce8b3f42ef8980f/src/datasets/features/features.py#L729
To put t simply, you want something that do that:
```python
import numpy as np
numpy_arr = np.zeros((1, 1, 1))
null_indices = np.array([1, 2])
np.insert(numpy_arr, null_indices, np.nan, axis=0)
# raise an error, instead of outputting
# array([[[ 0.]],
# [[nan]],
# [[nan]]])
```
### Expected behavior
The previous code should not raise an error.
### Environment info
- Python 3.10.11
- datasets 2.10.0
- pyarrow 12.0.0 | 25 | `IndexError` when indexing `Sequence` of `Array2D` with `None` values
### Describe the bug
Having `None` values in a `Sequence` of `ArrayND` fails.
### Steps to reproduce the bug
```python
from datasets import Array2D, Dataset, Features, Sequence
data = [
[
[[0]],
None,
None,
]
]
feature = Sequence(Array2D((1, 1), dtype="int64"))
dataset = Dataset.from_dict({"a": data}, features=Features({"a": feature}))
dataset[0] # error raised only when indexing
```
```
Traceback (most recent call last):
File "/Users/quentingallouedec/gia/c.py", line 13, in <module>
dataset[0] # error raised only when indexing
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2658, in __getitem__
return self._getitem(key)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2643, in _getitem
formatted_output = format_table(
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 634, in format_table
return formatter(pa_table, query_type=query_type)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 406, in __call__
return self.format_row(pa_table)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 441, in format_row
row = self.python_arrow_extractor().extract_row(pa_table)
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 144, in extract_row
return _unnest(pa_table.to_pydict())
File "pyarrow/table.pxi", line 4146, in pyarrow.lib.Table.to_pydict
File "pyarrow/table.pxi", line 1312, in pyarrow.lib.ChunkedArray.to_pylist
File "pyarrow/array.pxi", line 1521, in pyarrow.lib.Array.to_pylist
File "pyarrow/scalar.pxi", line 675, in pyarrow.lib.ListScalar.as_py
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 760, in to_pylist
return self.to_numpy(zero_copy_only=zero_copy_only).tolist()
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 725, in to_numpy
numpy_arr = np.insert(numpy_arr.astype(np.float64), null_indices, np.nan, axis=0)
File "<__array_function__ internals>", line 200, in insert
File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/numpy/lib/function_base.py", line 5426, in insert
old_mask[indices] = False
IndexError: index 3 is out of bounds for axis 0 with size 3
```
AFAIK, the problem only occurs when you use a `Sequence` of `ArrayND`.
I strongly suspect that the problem comes from this line, or `np.insert` is misused:
https://github.com/huggingface/datasets/blob/02ee418831aba68d0be93227bce8b3f42ef8980f/src/datasets/features/features.py#L729
To put t simply, you want something that do that:
```python
import numpy as np
numpy_arr = np.zeros((1, 1, 1))
null_indices = np.array([1, 2])
np.insert(numpy_arr, null_indices, np.nan, axis=0)
# raise an error, instead of outputting
# array([[[ 0.]],
# [[nan]],
# [[nan]]])
```
### Expected behavior
The previous code should not raise an error.
### Environment info
- Python 3.10.11
- datasets 2.10.0
- pyarrow 12.0.0
Easy fix would be to add:
```python
null_indices -= np.arange(len(null_indices))
```
before L279, but I'm not sure it's the most intuitive way to fix it. | [
0.08029993623495102,
0.09957290440797806,
-0.009993822313845158,
-0.08922635763883591,
0.23242628574371338,
0.07017552852630615,
0.24089041352272034,
0.10267423093318939,
-0.12696152925491333,
0.005446700379252434,
0.020321428775787354,
-0.12210763245820999,
-0.05626643821597099,
0.03544061258435249,
-0.08129481971263885,
0.07401471585035324,
0.04447328671813011,
-0.01745160110294819,
0.04622955247759819,
0.11818913370370865,
-0.1803678721189499,
-0.026637548580765724,
-0.0010062730871140957,
-0.036335188895463943,
-0.008248478174209595,
-0.18743205070495605,
-0.14227062463760376,
0.0777425691485405,
-0.11820247024297714,
-0.2375125288963318,
0.10198111087083817,
0.10183966159820557,
-0.05491279065608978,
0.1560819298028946,
0.0000050582266339915805,
0.10054587572813034,
0.1666809618473053,
-0.11323875188827515,
0.029357684776186943,
-0.07622736692428589,
0.03938285633921623,
0.13462044298648834,
0.0009015435352921486,
-0.0025417108554393053,
-0.014516104944050312,
-0.24887552857398987,
-0.0620746873319149,
0.0915042981505394,
-0.07501806318759918,
-0.05104004964232445,
-0.03650553897023201,
-0.018451876938343048,
0.1774342656135559,
-0.21765395998954773,
0.12089131027460098,
0.021788448095321655,
0.15314191579818726,
-0.13425731658935547,
-0.17615196108818054,
-0.0111150611191988,
0.06348232179880142,
-0.06330403685569763,
-0.12384798377752304,
-0.03438630700111389,
-0.10666541010141373,
-0.08209799230098724,
-0.13166306912899017,
-0.013776254840195179,
-0.032416410744190216,
0.18731100857257843,
0.056736886501312256,
0.10149621218442917,
-0.07871049642562866,
0.03269573301076889,
0.09703639149665833,
-0.14618881046772003,
-0.032683856785297394,
0.14836055040359497,
-0.056866586208343506,
0.06515532732009888,
0.027687199413776398,
0.0541641041636467,
0.07931094616651535,
0.08492355048656464,
-0.16419856250286102,
0.035902075469493866,
-0.18326179683208466,
0.07487604022026062,
0.04239070042967796,
-0.20205903053283691,
0.08313824981451035,
-0.011416157707571983,
-0.0278233103454113,
-0.09165483713150024,
0.10764267295598984,
-0.10641016811132431,
-0.022017639130353928,
-0.27163735032081604,
0.027705982327461243,
0.04666797071695328,
-0.03885406628251076,
-0.12491599470376968,
0.08190693706274033,
0.04139404743909836,
-0.07871434092521667,
-0.00046856666449457407,
0.014859937131404877,
0.03315841406583786,
0.00017491121252533048,
0.016912903636693954,
0.09923430532217026,
0.023899627849459648,
-0.13934394717216492,
0.01064098346978426,
0.12818916141986847,
0.024254513904452324,
0.2849426567554474,
0.11591318249702454,
-0.09736575931310654,
0.09625939279794693,
-0.12397469580173492,
0.1826321929693222,
-0.08353576809167862,
0.12895245850086212,
0.15479370951652527,
0.0981258973479271,
-0.0029118540696799755,
0.06207657232880592,
-0.007212109863758087,
0.06014665588736534,
-0.1009954884648323,
0.14208699762821198,
0.2530405521392822,
-0.06357458233833313,
0.0333402119576931,
-0.024987665936350822,
-0.005360787268728018,
-0.17481687664985657,
0.06540394574403763,
-0.01861862652003765,
0.11671464890241623,
-0.03755854442715645,
0.006995942443609238,
0.040017906576395035,
-0.05974110588431358,
0.042571838945150375,
0.12490622699260712,
-0.0165230855345726,
0.06656382977962494,
-0.02275596186518669,
-0.2594938576221466,
0.0076069883070886135,
-0.1565665900707245,
-0.047582607716321945,
-0.20549935102462769,
0.11487039178609848,
0.1751263439655304,
-0.23572887480258942,
-0.14389674365520477,
-0.016262922435998917,
0.04484887421131134,
0.2037012279033661,
0.02336762845516205,
-0.2084370255470276,
0.14141713082790375,
-0.020810240879654884,
0.10833317041397095,
-0.08365756273269653,
0.06166478618979454,
0.024245265871286392,
0.19695313274860382,
-0.0031394637189805508,
-0.026812449097633362,
-0.05640167370438576,
-0.12397980690002441,
0.07404427975416183,
-0.133509561419487,
0.06614706665277481,
-0.17282357811927795,
-0.08750806003808975,
0.009511793963611126,
-0.13562878966331482,
0.14964444935321808,
-0.08438350260257721,
-0.02526906318962574,
-0.008350684307515621,
0.059684522449970245,
-0.10950332134962082,
-0.1562587022781372,
-0.14487899839878082,
0.06856118142604828,
-0.011436392553150654,
0.09166396409273148,
-0.1825162023305893,
-0.0717293918132782,
-0.16034844517707825,
-0.20090225338935852,
-0.22534751892089844,
-0.220476433634758,
-0.10467329621315002,
0.03511100634932518,
-0.036013808101415634,
-0.04006831347942352,
-0.016403377056121826,
-0.010561646893620491,
-0.13229630887508392,
-0.1346227079629898,
0.0014517157105728984,
-0.02268368750810623,
-0.20324184000492096,
-0.4092327654361725,
0.025934260338544846,
-0.044087741523981094,
0.022740937769412994,
-0.04429525136947632,
-0.0291416235268116,
0.10085134953260422,
-0.049435075372457504,
-0.1989542692899704,
0.17649543285369873,
-0.03143659606575966,
0.10614132881164551,
0.09814122319221497,
-0.09201575070619583,
-0.009331430308520794,
-0.07167506217956543,
-0.01846710965037346,
-0.14197203516960144,
0.005767445545643568,
0.1577053815126419,
-0.07721314579248428,
-0.040388550609350204,
0.07770532369613647,
0.007122798822820187,
-0.0588039830327034,
-0.3221164047718048,
-0.127409428358078,
-0.33039918541908264,
0.062063366174697876,
-0.2063322365283966,
-0.16835451126098633,
0.10151185840368271,
0.02552535943686962,
0.018029609695076942,
0.0798928365111351,
0.11545728147029877,
-0.21699734032154083,
0.11913853138685226,
-0.0431862436234951,
0.044945280998945236,
0.2066001296043396,
0.1279762238264084,
-0.14817993342876434,
-0.14804668724536896,
0.06353943049907684,
-0.12862423062324524,
-0.016973000019788742,
0.07437333464622498,
-0.032556116580963135,
-0.07058773934841156,
0.27345699071884155,
-0.1573316752910614,
-0.052596479654312134,
-0.050421375781297684,
0.16995766758918762,
0.04482828453183174,
0.11388646811246872,
-0.1476723551750183,
0.0625392496585846,
0.1158410832285881,
-0.12813407182693481,
0.0016076952451840043,
0.0012530472595244646,
-0.003539638826623559,
-0.08369026333093643,
-0.13107457756996155,
-0.046415552496910095,
0.07543160021305084,
0.09901191294193268,
0.17584048211574554,
-0.14426575601100922,
-0.03373236209154129,
-0.012286324054002762,
-0.06190633028745651,
-0.033495768904685974,
0.09322722256183624,
-0.13346458971500397,
-0.12172872573137283,
0.05719994753599167,
0.09699826687574387,
0.020343082025647163,
-0.0074799335561692715,
-0.028115279972553253,
-0.13040155172348022,
0.0008786774124018848,
-0.04548560455441475,
-0.07959889620542526,
-0.12243091315031052,
0.06873232126235962,
-0.007850862108170986,
0.0045751770958304405,
0.040518734604120255,
0.08113442361354828,
0.06183786690235138,
0.17323385179042816,
0.13975757360458374,
0.212241530418396,
0.26310962438583374,
0.010971710085868835,
-0.08447596430778503,
-0.03282950446009636,
-0.04231133684515953,
-0.10297323018312454,
0.03770744800567627,
0.2594381868839264,
-0.04037851840257645,
0.04644419997930527,
-0.15055423974990845,
0.04642622917890549,
0.0638672485947609,
-0.05121127888560295,
0.09549916535615921,
-0.10747628659009933,
0.036276210099458694,
-0.03241495415568352,
0.06547392159700394,
-0.16187946498394012,
-0.06717104464769363,
-0.1704927235841751,
-0.06105925515294075,
0.019754953682422638,
0.05775996297597885,
-0.1185845285654068,
-0.04071221128106117,
0.04117025062441826,
-0.12663324177265167,
-0.14889511466026306,
0.17289593815803528,
0.11434177309274673,
0.046048928052186966,
0.07501159608364105,
-0.005609616171568632,
-0.11425693333148956,
0.08604812622070312,
0.089171402156353,
-0.188390851020813,
-0.12120061367750168,
-0.025215845555067062,
-0.04456087946891785,
-0.14421382546424866,
-0.02560918778181076,
0.20866115391254425,
0.09590691328048706,
-0.0941002294421196,
-0.16259337961673737,
0.11381498724222183,
-0.10320775210857391,
-0.025370052084326744,
-0.2474018931388855,
-0.016699405387043953,
0.19402633607387543,
0.020326169207692146,
0.02801305428147316,
0.06755860894918442,
0.034754376858472824,
0.14850476384162903,
0.05333898216485977,
0.06302463263273239,
-0.1709570735692978,
-0.027310622856020927,
-0.23894186317920685,
0.197140172123909,
-0.05616890639066696,
-0.0464760959148407,
-0.014958526007831097,
-0.06506968289613724,
0.050960760563611984,
-0.18836268782615662,
0.1466405987739563,
0.06380803138017654,
0.019968107342720032,
-0.18979081511497498,
-0.06741201132535934,
0.15343230962753296,
0.00035848826519213617,
-0.09005790948867798,
-0.12005329877138138,
-0.0642857700586319,
-0.1567806750535965,
0.05013354495167732,
0.04503884166479111,
0.006511373445391655,
-0.16580413281917572,
-0.025036541745066643,
0.013483612798154354,
-0.04173649474978447,
0.1343490034341812,
0.11084794998168945,
-0.025680139660835266,
0.04284987971186638,
0.12464677542448044,
0.11187189817428589,
-0.08196485042572021,
-0.043940719217061996,
0.19922861456871033,
0.0482306182384491,
0.11131851375102997,
-0.12127885222434998,
0.07003350555896759,
0.037431471049785614,
-0.01675810106098652,
0.0913001075387001,
0.0432770699262619,
0.002899013925343752,
0.18230509757995605,
-0.0717819482088089,
0.112503282725811,
-0.20376348495483398,
-0.007071745581924915,
-0.27759554982185364,
-0.14577946066856384,
-0.10216181725263596,
0.17060944437980652,
0.19387902319431305,
-0.06648951023817062,
-0.10324952006340027,
-0.06345236301422119,
-0.0949246734380722,
0.003646146971732378,
-0.0002484991564415395,
0.1255127638578415,
-0.12156152725219727,
0.09260163456201553,
0.04092809185385704,
0.08674784004688263,
0.014782976359128952,
0.15772952139377594,
0.13116838037967682,
0.08297508955001831,
-0.00573166785761714,
-0.2580961287021637,
-0.06066250056028366,
0.11362141370773315,
-0.19145429134368896,
0.15109924972057343,
-0.16339634358882904,
-0.005579535383731127,
-0.018286967650055885,
-0.019565317779779434,
0.028721129521727562,
-0.15899476408958435,
-0.2447892427444458,
-0.06299014389514923,
-0.14872202277183533,
0.16781404614448547,
0.12501458823680878,
0.07091159373521805,
0.023207446560263634,
0.03958568349480629,
0.2546516954898834,
0.1210227757692337,
-0.014106981456279755,
-0.12027207762002945,
0.058321576565504074,
0.3400993347167969,
-0.06004827842116356,
0.33436599373817444,
0.0730995312333107,
-0.001600055955350399,
0.22860592603683472,
-0.1413416713476181,
0.0451333224773407,
-0.011366094462573528,
0.11261076480150223,
0.00828719511628151,
-0.08043710887432098,
0.1681351661682129,
-0.0753568708896637,
-0.07031270116567612,
0.09664406627416611,
0.0334571897983551,
-0.0021242587827146053,
0.160186305642128,
-0.23145410418510437,
0.06782399863004684,
0.0483095645904541,
-0.0084071708843112,
0.03472016751766205,
-0.011515796184539795,
-0.028550025075674057,
0.026225527748465538,
0.03537154570221901,
-0.01179021317511797,
-0.004009820055216551,
0.06443959474563599,
-0.04003643989562988,
0.06515436619520187,
0.29651159048080444,
-0.11842238903045654,
0.007289364002645016,
0.06674324721097946,
-0.07620557397603989,
0.0650814101099968,
-0.10957209765911102,
0.020987750962376595,
-0.1403665691614151,
-0.02244396135210991,
0.01256194431334734,
0.049528058618307114,
-0.09142082929611206,
0.002250728663057089,
0.04666109383106232,
-0.09715116769075394,
0.02288287878036499,
-0.02248256281018257,
-0.1372518688440323,
-0.057766638696193695,
-0.021433604881167412,
-0.025069311261177063,
0.17137593030929565,
0.15153144299983978,
-0.028204167261719704,
0.16550223529338837,
-0.04717647284269333,
-0.08181747049093246,
-0.01517695002257824,
0.0452783964574337,
0.06920450925827026,
0.30550968647003174,
0.2741435766220093,
0.02531971037387848,
0.26389601826667786,
-0.046402666717767715,
-0.004853630438446999,
-0.05613350123167038,
0.07800754904747009,
0.10864116251468658,
-0.07268386334180832,
-0.06250378489494324,
-0.08439309895038605,
0.03967706859111786,
-0.09145088493824005,
-0.08311647921800613,
0.0048854295164346695,
0.22692960500717163,
-0.05645047500729561,
-0.005142674315720797,
-0.11057324707508087,
-0.0011454819468781352,
0.018510984256863594,
-0.09506777673959732,
0.16809974610805511,
0.03634321689605713,
-0.2140909880399704,
-0.03145352751016617,
-2.4280854088215748e-32,
-0.03141181543469429,
-0.03330868482589722,
-0.11297056823968887,
-0.09560081362724304,
-0.21805322170257568,
0.12928593158721924,
-0.08661218732595444,
0.19636303186416626,
-0.031081171706318855,
-0.12348273396492004,
-0.08505420386791229,
0.10979603230953217,
0.062365274876356125,
-0.0959940180182457,
-0.005724284797906876,
0.08159218728542328,
0.06068655103445053,
0.11479146778583527,
0.11145945638418198,
-0.04603629186749458,
0.051398687064647675,
0.20228363573551178,
-0.046880222856998444,
0.05020939186215401,
-0.08405520021915436,
0.005071619991213083,
0.023406600579619408,
-0.17159625887870789,
0.132748082280159,
-0.169425368309021,
-0.12362582981586456,
0.06413872539997101,
0.016194680705666542,
-0.1274309605360031,
0.10519563406705856,
-0.21026985347270966,
-0.08104604482650757,
-0.2333720624446869,
-0.20423683524131775,
0.0011485825525596738,
0.13612711429595947,
0.07647788524627686,
-0.010129014030098915,
-0.05103738605976105,
-0.08206036686897278,
0.10745213180780411,
0.04374996945261955,
0.06085728481411934,
-0.1660364270210266,
-0.0393836610019207,
0.036524783819913864,
-0.053666651248931885,
-0.16801191866397858,
0.1882450431585312,
0.04115688428282738,
0.014412716962397099,
0.14589209854602814,
0.036106426268815994,
-0.09559538215398788,
-0.10089918971061707,
0.16885943710803986,
0.058555521070957184,
0.0866820365190506,
0.002134170848876238,
-0.00790094118565321,
0.23816925287246704,
0.2694641947746277,
0.17409631609916687,
0.06455734372138977,
0.08435964584350586,
-0.0953715369105339,
-0.08444048464298248,
-0.20617344975471497,
-0.09894724935293198,
-0.14040453732013702,
0.11478596180677414,
-0.10822734236717224,
0.17653830349445343,
0.00219673290848732,
-0.06345034390687943,
-0.00808307621628046,
0.1346210241317749,
0.07582104206085205,
-0.05868695303797722,
0.006394315045326948,
0.028787754476070404,
0.041193075478076935,
-0.053431589156389236,
-0.14669622480869293,
-0.052245620638132095,
-0.009519251994788647,
0.04069139435887337,
-0.09970877319574356,
-0.00880211591720581,
-0.0719611793756485,
0.32530346512794495,
-0.07401052862405777,
0.16270563006401062,
-0.07896144688129425,
-0.08662553876638412,
-0.028542211279273033,
-0.04714418202638626,
0.05188799276947975,
0.1173337921500206,
0.28034260869026184,
-0.030128130689263344,
-0.0038634659722447395,
-0.021889645606279373,
-0.14779804646968842,
-0.13901741802692413,
-0.008687339723110199,
-0.004757777787744999,
0.09537068754434586,
0.13059063255786896,
0.00515152420848608,
-0.01892329938709736,
0.016253041103482246,
0.036213379353284836,
0.24727872014045715,
0.12699446082115173,
-0.0827116072177887,
-0.010748126544058323,
-0.1856633573770523,
-0.16956040263175964,
0.00738838966935873,
-0.11616924405097961,
-0.218843474984169,
0.07799598574638367,
-0.031077666208148003,
0.07534189522266388,
0.04199941083788872,
-0.02231033891439438,
7.008301849964482e-7,
-0.32525601983070374,
0.1946476399898529,
-0.0126575268805027,
-0.045831482857465744,
-0.19989550113677979,
0.18394535779953003,
-0.049830805510282516,
0.08934913575649261,
-0.09614212810993195,
0.21241018176078796,
0.19759926199913025,
-0.08486829698085785,
-0.026122398674488068,
-0.06851217150688171,
0.10726115852594376,
0.07471418380737305,
-0.07649996131658554,
0.07366615533828735,
-0.1514788120985031,
0.0001849602413130924,
0.087979257106781,
-0.04773787781596184,
-0.00536081800237298,
-0.15561959147453308,
0.07697098702192307,
0.031114445999264717,
-0.11786089092493057,
0.06527701020240784,
0.1208631694316864,
-0.019341226667165756,
0.03492331877350807,
-0.06915437430143356,
0.012454905547201633,
0.12832756340503693,
0.024894798174500465,
-0.07406848669052124,
-0.2145361304283142,
-0.09936155378818512,
0.12810018658638,
0.15997260808944702,
0.2274421751499176,
0.04741784930229187,
0.07909516990184784,
-0.0014394473982974887,
0.1327505260705948,
0.2496069073677063,
-0.09859953075647354,
0.26260289549827576,
-0.1783149689435959,
0.24707943201065063,
-0.06886269897222519,
0.17301490902900696,
0.07224376499652863,
0.06961807608604431,
-0.045828595757484436,
-0.04169061407446861,
0.0023723668418824673,
-0.11691363155841827,
0.2793343961238861,
0.06075352057814598,
-0.010083337314426899,
0.06837020814418793,
-0.011838997714221478,
0.1549455225467682,
0.012535279616713524,
-0.05004461482167244,
0.039402950555086136,
-3.621734829081931e-35,
0.0832635685801506,
0.022539323195815086,
0.002671201480552554,
-0.1003207266330719,
0.013081016950309277,
-0.005040322430431843,
0.19220194220542908,
-0.013056893832981586,
0.05263194814324379,
-0.14837001264095306,
-0.0971175879240036
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | Based on https://github.com/rapidsai/cudf/issues/10187, this probably means your `pyarrow` installation is not compatible with `datasets`.
Can you please execute the following commands in the terminal and paste the output here?
```
conda list | grep arrow
```
```
python -c "import pyarrow; print(pyarrow.__file__)"
```
| ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 43 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
Based on https://github.com/rapidsai/cudf/issues/10187, this probably means your `pyarrow` installation is not compatible with `datasets`.
Can you please execute the following commands in the terminal and paste the output here?
```
conda list | grep arrow
```
```
python -c "import pyarrow; print(pyarrow.__file__)"
```
| [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | > Based on [rapidsai/cudf#10187](https://github.com/rapidsai/cudf/issues/10187), this probably means your `pyarrow` installation is not compatible with `datasets`.
>
> Can you please execute the following commands in the terminal and paste the output here?
>
> ```
> conda list | grep arrow
> ```
>
> ```
> python -c "import pyarrow; print(pyarrow.__file__)"
> ```
Here is the output to the first command:
```
arrow-cpp 11.0.0 py39h7f74497_0
pyarrow 12.0.0 pypi_0 pypi
```
and the second:
```
/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/__init__.py
```
Thanks!
| ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 78 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
> Based on [rapidsai/cudf#10187](https://github.com/rapidsai/cudf/issues/10187), this probably means your `pyarrow` installation is not compatible with `datasets`.
>
> Can you please execute the following commands in the terminal and paste the output here?
>
> ```
> conda list | grep arrow
> ```
>
> ```
> python -c "import pyarrow; print(pyarrow.__file__)"
> ```
Here is the output to the first command:
```
arrow-cpp 11.0.0 py39h7f74497_0
pyarrow 12.0.0 pypi_0 pypi
```
and the second:
```
/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/__init__.py
```
Thanks!
| [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):
pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 32 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):
pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
Do we need to update dependencies? | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 32 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
Do we need to update dependencies? | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | Please note that our CI properly passes all tests with `pyarrow-12.0.0`, for Python 3.7 and Python 3.10, for Ubuntu and Windows: see for example https://github.com/huggingface/datasets/actions/runs/5157324334/jobs/9289582291 | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 25 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
Please note that our CI properly passes all tests with `pyarrow-12.0.0`, for Python 3.7 and Python 3.10, for Ubuntu and Windows: see for example https://github.com/huggingface/datasets/actions/runs/5157324334/jobs/9289582291 | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | For conda with python3.8.16 this solved my problem! thanks!
> I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies? I can work on that if no one else is working on it.
| ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 57 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
For conda with python3.8.16 this solved my problem! thanks!
> I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies? I can work on that if no one else is working on it.
| [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | Thanks for replying. I am not sure about those environments but it seems like pyarrow-12.0.0 does not work for conda with python 3.8.16.
> Please note that our CI properly passes all tests with `pyarrow-12.0.0`, for Python 3.7 and Python 3.10, for Ubuntu and Windows: see for example https://github.com/huggingface/datasets/actions/runs/5157324334/jobs/9289582291
| ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 49 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
Thanks for replying. I am not sure about those environments but it seems like pyarrow-12.0.0 does not work for conda with python 3.8.16.
> Please note that our CI properly passes all tests with `pyarrow-12.0.0`, for Python 3.7 and Python 3.10, for Ubuntu and Windows: see for example https://github.com/huggingface/datasets/actions/runs/5157324334/jobs/9289582291
| [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | Got the same error with:
```
arrow-cpp 11.0.0 py310h7516544_0
pyarrow 12.0.0 pypi_0 pypi
python 3.10.11 h7a1cb2a_2
datasets 2.13.0 pyhd8ed1ab_0 conda-forge
``` | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 21 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
Got the same error with:
```
arrow-cpp 11.0.0 py310h7516544_0
pyarrow 12.0.0 pypi_0 pypi
python 3.10.11 h7a1cb2a_2
datasets 2.13.0 pyhd8ed1ab_0 conda-forge
``` | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | > I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
This solved the issue for me as well. | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 43 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
> I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
This solved the issue for me as well. | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | > I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
Solved it for me also | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 40 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
> I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
Solved it for me also | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | > 基于 [rapidsai/cudf#10187](https://github.com/rapidsai/cudf/issues/10187),这可能意味着您的安装与 不兼容。`pyarrow``datasets`
>
> 您能否在终端中执行以下命令并将输出粘贴到此处?
>
> ```
> conda list | grep arrow
> ```
>
> ```
> python -c "import pyarrow; print(pyarrow.__file__)"
> ```
arrow-cpp 11.0.0 py310h7516544_0
pyarrow 12.0.1 pypi_0 pypi
/root/miniconda3/lib/python3.10/site-packages/pyarrow/__init__.py | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 37 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
> 基于 [rapidsai/cudf#10187](https://github.com/rapidsai/cudf/issues/10187),这可能意味着您的安装与 不兼容。`pyarrow``datasets`
>
> 您能否在终端中执行以下命令并将输出粘贴到此处?
>
> ```
> conda list | grep arrow
> ```
>
> ```
> python -c "import pyarrow; print(pyarrow.__file__)"
> ```
arrow-cpp 11.0.0 py310h7516544_0
pyarrow 12.0.1 pypi_0 pypi
/root/miniconda3/lib/python3.10/site-packages/pyarrow/__init__.py | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | Got the same problem with
arrow-cpp 11.0.0 py310h1fc3239_0
pyarrow 12.0.1 pypi_0 pypi
miniforge3/envs/mlp/lib/python3.10/site-packages/pyarrow/__init__.py
Reverting back to pyarrow 11 solved the problem.
| ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 21 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
Got the same problem with
arrow-cpp 11.0.0 py310h1fc3239_0
pyarrow 12.0.1 pypi_0 pypi
miniforge3/envs/mlp/lib/python3.10/site-packages/pyarrow/__init__.py
Reverting back to pyarrow 11 solved the problem.
| [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | I got different. Solved with
pip install pyarrow==12.0.1
pip install cchardet
env:
Python 3.9.16
transformers 4.32.1 | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 16 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
I got different. Solved with
pip install pyarrow==12.0.1
pip install cchardet
env:
Python 3.9.16
transformers 4.32.1 | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5923 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility | > I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
This works for me as well | ### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
| 41 | Cannot import datasets - ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility
### Describe the bug
When trying to import datasets, I get a pyarrow ValueError:
Traceback (most recent call last):
File "/Users/edward/test/test.py", line 1, in <module>
import datasets
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module>
from .arrow_dataset import Dataset
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 65, in <module>
from .arrow_reader import ArrowReader
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/datasets/arrow_reader.py", line 28, in <module>
import pyarrow.parquet as pq
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/__init__.py", line 20, in <module>
from .core import *
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 45, in <module>
from pyarrow.fs import (LocalFileSystem, FileSystem, FileType,
File "/Users/edward/opt/anaconda3/envs/cs235/lib/python3.9/site-packages/pyarrow/fs.py", line 49, in <module>
from pyarrow._gcsfs import GcsFileSystem # noqa
File "pyarrow/_gcsfs.pyx", line 1, in init pyarrow._gcsfs
ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject
### Steps to reproduce the bug
`import datasets`
### Expected behavior
Successful import
### Environment info
Conda environment, MacOS
python 3.9.12
datasets 2.12.0
> I got the same error, pyarrow 12.0.0 released May/2023 (https://pypi.org/project/pyarrow/) is not compatible, running `pip install pyarrow==11.0.0` to force install the previous version solved the problem.
>
> Do we need to update dependencies?
This works for me as well | [
0.08804599195718765,
0.19562970101833344,
-0.15463292598724365,
-0.15046252310276031,
0.13974736630916595,
0.15179818868637085,
0.07648365199565887,
0.15641461312770844,
-0.16641464829444885,
0.22425107657909393,
-0.11430678516626358,
-0.06792258471250534,
-0.03903227299451828,
-0.011889882385730743,
-0.022082293406128883,
0.08879632502794266,
-0.10966065526008606,
0.016130156815052032,
-0.04028196260333061,
0.09181128442287445,
0.018668610602617264,
0.12161879241466522,
0.1435089260339737,
-0.11046548932790756,
0.0573161356151104,
-0.2155066430568695,
-0.043608468025922775,
0.24386098980903625,
-0.08363823592662811,
-0.23823103308677673,
0.25199973583221436,
-0.05321923643350601,
0.074115090072155,
0.19867002964019775,
0.000004409887424117187,
-0.014839517883956432,
0.16292063891887665,
0.04508291557431221,
-0.09916526824235916,
-0.03130743280053139,
0.08566846698522568,
0.07572969049215317,
0.06626011431217194,
0.0093589648604393,
0.18722696602344513,
-0.22279147803783417,
-0.08509819209575653,
0.21896417438983917,
0.008217954076826572,
0.13961735367774963,
0.06486010551452637,
0.08722911030054092,
0.30961596965789795,
-0.12231649458408356,
0.17047719657421112,
0.07378054410219193,
-0.0036958069540560246,
0.10448649525642395,
-0.2759608030319214,
0.0005553215742111206,
-0.01691764034330845,
-0.22334995865821838,
-0.03554869070649147,
-0.10151930898427963,
-0.12681105732917786,
-0.08657091110944748,
-0.049375541508197784,
-0.008778956718742847,
0.028988095000386238,
0.2544626295566559,
0.038355689495801926,
-0.05055343732237816,
-0.18897181749343872,
-0.05894772335886955,
-0.014116554521024227,
-0.057150762528181076,
0.009352781809866428,
-0.019275300204753876,
-0.13390429317951202,
0.12445010244846344,
0.041674040257930756,
-0.09066811203956604,
0.04843182489275932,
-0.016397790983319283,
-0.1263912171125412,
-0.029521094635128975,
-0.20434731245040894,
0.134690061211586,
0.025558067485690117,
-0.24135079979896545,
0.18779730796813965,
0.07864363491535187,
-0.04700818657875061,
-0.18315571546554565,
0.10327055305242538,
-0.04389001056551933,
0.016879834234714508,
0.047682955861091614,
-0.07200409471988678,
-0.09855243563652039,
-0.1627357453107834,
-0.19799642264842987,
-0.000008647388312965631,
0.15449202060699463,
0.06618031859397888,
0.015097314491868019,
-0.12272235006093979,
0.08180675655603409,
-0.03815649822354317,
0.02428910695016384,
0.062427278608083725,
0.10134484618902206,
-0.17830023169517517,
-0.23028242588043213,
0.13054683804512024,
0.1811746209859848,
0.14655454456806183,
0.05642235279083252,
-0.06044942885637283,
0.05180670693516731,
-0.021656613796949387,
0.13826078176498413,
-0.10107608139514923,
0.044638391584157944,
0.14792118966579437,
-0.02550361305475235,
0.04438747838139534,
0.1663718819618225,
-0.06741765886545181,
0.04699057713150978,
-0.05322439223527908,
0.18872588872909546,
0.06057380512356758,
-0.1240278109908104,
0.17121554911136627,
-0.06119603291153908,
-0.0468757301568985,
-0.2663663923740387,
0.04552339017391205,
-0.019578799605369568,
0.09578336030244827,
-0.2050170600414276,
-0.1292777806520462,
0.09122869372367859,
0.09303990751504898,
0.05917925760149956,
0.08217085897922516,
-0.14518004655838013,
-0.08009244501590729,
0.03910217434167862,
-0.2188723087310791,
0.09956949204206467,
-0.14495699107646942,
0.07152511924505234,
0.004466557409614325,
0.06275653839111328,
-0.08361226320266724,
-0.03536117821931839,
-0.15666012465953827,
-0.20611844956874847,
-0.015443374402821064,
-0.06005338951945305,
0.09033910185098648,
-0.210793599486351,
0.0026932719629257917,
0.21161888539791107,
-0.009412363171577454,
0.0665937066078186,
-0.04012840986251831,
-0.010030237957835197,
0.18582049012184143,
0.11633303016424179,
-0.08044539391994476,
-0.06434628367424011,
-0.01734454371035099,
0.06874115765094757,
-0.03387506678700447,
0.09423508495092392,
-0.3309498727321625,
0.006093886215239763,
0.12023137509822845,
-0.005974928382784128,
0.10018789023160934,
-0.26238563656806946,
0.20410364866256714,
-0.012189796194434166,
-0.0458701066672802,
-0.014761151745915413,
-0.053237371146678925,
-0.12361083179712296,
-0.020843645557761192,
0.15673278272151947,
0.019158368930220604,
-0.05495914816856384,
0.13365963101387024,
-0.2717399299144745,
0.08305806666612625,
-0.07496222108602524,
0.06632725894451141,
-0.24806706607341766,
0.10743804275989532,
-0.005310541018843651,
0.002457251539453864,
-0.046634476631879807,
-0.046909332275390625,
-0.1122482642531395,
-0.0563596747815609,
-0.05758145824074745,
-0.07631252706050873,
-0.06574037671089172,
-0.15008342266082764,
-0.06362462043762207,
-0.13955312967300415,
0.008022984489798546,
0.08269838988780975,
0.10603439062833786,
-0.06675595790147781,
-0.05382402613759041,
-0.042199525982141495,
0.1690455824136734,
0.022749880328774452,
0.18130415678024292,
0.039856310933828354,
0.061611421406269073,
-0.12281665205955505,
0.04388877749443054,
0.0584355928003788,
-0.2679648697376251,
0.17278815805912018,
0.09066303819417953,
-0.24707739055156708,
-0.10688851028680801,
0.0881897509098053,
0.11244361102581024,
0.014622378163039684,
-0.03161235898733139,
-0.06265009194612503,
-0.11639157682657242,
0.0647495687007904,
-0.08055780082941055,
-0.04954313486814499,
0.07127370685338974,
-0.08143407851457596,
0.058029741048812866,
0.03210094943642616,
0.020575031638145447,
0.014345124363899231,
0.07033321261405945,
0.017933251336216927,
-0.1313835084438324,
0.22871093451976776,
0.02356770448386669,
-0.13282310962677002,
0.01413330715149641,
-0.0026307960506528616,
-0.07721791416406631,
-0.1181902289390564,
0.022957194596529007,
-0.07528116554021835,
-0.053116511553525925,
0.27918869256973267,
0.08328203111886978,
-0.034297142177820206,
0.04796841740608215,
0.14665018022060394,
-0.09371829777956009,
0.20499877631664276,
-0.1316547691822052,
0.07820679247379303,
0.10394563525915146,
-0.22633779048919678,
0.02556414157152176,
-0.04504206031560898,
-0.0805792585015297,
0.14062723517417908,
-0.08989900350570679,
0.07829643040895462,
-0.10746373236179352,
0.21294161677360535,
-0.09628644585609436,
-0.30145248770713806,
0.14816999435424805,
0.10814892500638962,
-0.13550734519958496,
0.05625021085143089,
0.17146974802017212,
-0.15044736862182617,
-0.16426731646060944,
-0.05570603534579277,
0.06330355256795883,
-0.011768353171646595,
0.06791599094867706,
0.03346825763583183,
-0.021139590069651604,
-0.10631275177001953,
-0.03157331421971321,
0.11917730420827866,
-0.15254424512386322,
-0.0602022260427475,
0.03749949112534523,
-0.0031565907411277294,
0.1019660085439682,
0.04936164990067482,
-0.059583935886621475,
0.09730721265077591,
0.10812827199697495,
0.33549273014068604,
0.2085859328508377,
-0.07985556125640869,
-0.06262224167585373,
0.08089421689510345,
-0.17752529680728912,
0.09820158034563065,
0.08585307002067566,
0.13926541805267334,
0.026306699961423874,
-0.030277982354164124,
-0.10119117796421051,
0.06004296988248825,
0.044541019946336746,
-0.09037608653306961,
0.061259277164936066,
-0.07696454972028732,
0.035899944603443146,
-0.0980069637298584,
0.12153495848178864,
-0.3567189574241638,
-0.19586440920829773,
-0.013529566116631031,
0.12005523592233658,
-0.03232079744338989,
0.027371063828468323,
-0.08146501332521439,
-0.2259712964296341,
0.020020628347992897,
-0.16427600383758545,
-0.13531218469142914,
-0.005005015525966883,
0.2602469027042389,
0.06627293676137924,
0.115895576775074,
-0.0412544310092926,
-0.011807420291006565,
0.042619701474905014,
0.13175217807292938,
-0.12576691806316376,
0.043392114341259,
-0.17879360914230347,
0.1711616963148117,
-0.08433488011360168,
0.03679557144641876,
0.12368261814117432,
0.06190640106797218,
-0.12061747908592224,
0.027641087770462036,
0.10753230005502701,
-0.1451280415058136,
0.10729064047336578,
-0.0031222179532051086,
0.038440510630607605,
0.0150639982894063,
0.024406293407082558,
0.04135561361908913,
-0.07569269835948944,
-0.10540939122438431,
0.15996645390987396,
0.07773695141077042,
0.0002567490446381271,
-0.146869957447052,
-0.16929017007350922,
0.023590557277202606,
-0.07530511170625687,
0.005491852294653654,
-0.09996435046195984,
-0.10277850925922394,
-0.028125334531068802,
-0.08422502875328064,
-0.12153642624616623,
0.1399604231119156,
-0.012008479796350002,
0.05437425523996353,
-0.09546013176441193,
-0.07905757427215576,
0.042227670550346375,
-0.03900180011987686,
0.012464636005461216,
-0.10645613819360733,
0.0055182017385959625,
-0.054610949009656906,
-0.006317910272628069,
0.17292578518390656,
0.17129957675933838,
-0.029002945870161057,
-0.06875153630971909,
0.07833517342805862,
-0.1341303139925003,
0.12660568952560425,
0.2768279016017914,
0.050151631236076355,
-0.00008174978574970737,
-0.04730378836393356,
0.09060421586036682,
0.12603826820850372,
0.05649673566222191,
0.08400516957044601,
0.12416176497936249,
-0.07463718950748444,
-0.15900437533855438,
0.012224378064274788,
-0.00714403809979558,
0.08956395834684372,
-0.07892005145549774,
-0.15949800610542297,
0.04247414693236351,
0.09210850298404694,
0.20646673440933228,
0.06547149270772934,
-0.08325904607772827,
-0.1345621794462204,
-0.1320793777704239,
-0.2780468463897705,
-0.20039819180965424,
-0.002379488432779908,
0.11667224764823914,
-0.04476061463356018,
-0.056650832295417786,
0.016142001375555992,
-0.10418938100337982,
0.20316536724567413,
-0.00334553187713027,
0.09378435462713242,
-0.020379025489091873,
-0.009163422510027885,
-0.07476896792650223,
0.0043571628630161285,
0.06039904057979584,
0.4263276159763336,
0.027551187202334404,
-0.12940064072608948,
-0.09072862565517426,
-0.06439738720655441,
-0.0043585654348134995,
0.0507894828915596,
-0.1256716549396515,
0.13236449658870697,
-0.14641061425209045,
-0.08311039954423904,
0.015556846745312214,
-0.061237264424562454,
-0.021495521068572998,
-0.19470098614692688,
-0.013608699664473534,
-0.07890022546052933,
-0.21745343506336212,
0.03793012723326683,
0.015686778351664543,
0.20234622061252594,
0.051088087260723114,
0.021252624690532684,
0.037674956023693085,
-0.04627037048339844,
-0.03791594132781029,
-0.05904194712638855,
0.0794549286365509,
0.14234952628612518,
-0.035424523055553436,
0.17356275022029877,
-0.06612828373908997,
-0.019947605207562447,
-0.0012386413291096687,
0.0919613465666771,
0.11480974406003952,
-0.09436468780040741,
0.012702872976660728,
0.04251214861869812,
-0.15176929533481598,
0.034459177404642105,
-0.0839632898569107,
-0.10919493436813354,
0.011978333815932274,
0.13390249013900757,
-0.012066006660461426,
0.18951334059238434,
-0.09685855358839035,
0.06801699846982956,
0.058834388852119446,
0.045088306069374084,
-0.06815630942583084,
-0.04954661801457405,
-0.2595667243003845,
0.013478333130478859,
-0.05022048205137253,
-0.13843998312950134,
-0.10095701366662979,
0.14086733758449554,
0.06776886433362961,
-0.0045675975270569324,
0.1336684226989746,
-0.16299103200435638,
0.0857141837477684,
0.1306152641773224,
-0.06768108904361725,
-0.07620100677013397,
0.07009564340114594,
-0.11209750175476074,
-0.11771104484796524,
0.08284502476453781,
0.0006106851506046951,
-0.023177800700068474,
-0.22421671450138092,
0.044994886964559555,
0.16827858984470367,
-0.13412553071975708,
0.00125649303663522,
0.006171243265271187,
0.0838581994175911,
-0.0610419325530529,
0.08958573639392853,
-0.20063863694667816,
0.20770835876464844,
-0.000691452354658395,
-0.15824970602989197,
0.09893366694450378,
-0.011867945082485676,
0.05653327330946922,
0.05344819650053978,
-0.027602223679423332,
0.034487005323171616,
0.07333854585886002,
0.1257101595401764,
0.1781044602394104,
0.33320194482803345,
0.10048511624336243,
-0.002835851162672043,
-0.012238357216119766,
-0.0015132286353036761,
0.03235187008976936,
-0.18059398233890533,
0.08040663599967957,
0.04503748565912247,
0.13514386117458344,
-0.08299940824508667,
-0.06557037681341171,
0.09232684224843979,
0.22676046192646027,
0.15053586661815643,
-0.08826107531785965,
-0.06664643436670303,
-0.10304863750934601,
-0.12886281311511993,
-0.05955015867948532,
0.1288558691740036,
0.061525799334049225,
-0.02893398143351078,
-0.049850258976221085,
-2.243391736420377e-32,
-0.0046458058059215546,
-0.0018983943155035377,
-0.11926409602165222,
0.08733432739973068,
-0.20114217698574066,
-0.039149343967437744,
-0.118004210293293,
-0.09338211268186569,
-0.05716918408870697,
-0.11443400382995605,
-0.06277405470609665,
0.06924746185541153,
-0.06826002895832062,
-0.018801353871822357,
-0.1367494761943817,
0.0313454270362854,
-0.059049393981695175,
0.0004935543402098119,
0.11476385593414307,
0.048450320959091187,
0.05695278197526932,
0.01167494710534811,
0.09427846223115921,
0.11736377328634262,
-0.2135278582572937,
-0.041373927146196365,
-0.08100882172584534,
0.06346629559993744,
0.03302817419171333,
-0.023947594687342644,
0.0803571417927742,
0.07478105276823044,
0.15868836641311646,
-0.05116431787610054,
-0.04784892499446869,
-0.06704866886138916,
-0.055913329124450684,
-0.0776139497756958,
-0.17395812273025513,
0.08854464441537857,
-0.014744630083441734,
0.0008309063268825412,
0.21166397631168365,
-0.2290077954530716,
-0.003563402220606804,
0.07274667173624039,
0.013967613689601421,
-0.01217735093086958,
0.048080239444971085,
-0.15316084027290344,
0.05216259881854057,
-0.02939755469560623,
-0.015955397859215736,
0.17477460205554962,
-0.015116170048713684,
0.0827900692820549,
-0.055222589522600174,
0.03720280900597572,
-0.12527550756931305,
-0.02619211934506893,
0.1117369681596756,
-0.031481534242630005,
-0.09992551058530807,
0.07262318581342697,
0.13790956139564514,
0.06481436640024185,
0.23742064833641052,
-0.13096053898334503,
0.08889304846525192,
-0.036610521376132965,
-0.031646307557821274,
0.12941600382328033,
-0.0028420533053576946,
-0.07282613217830658,
-0.195726677775383,
0.156447634100914,
-0.2689007520675659,
0.14329718053340912,
0.09856712818145752,
-0.0029022349044680595,
-0.03588194400072098,
0.08018189668655396,
0.028575140982866287,
-0.0004592054756358266,
0.04988027736544609,
-0.0158570297062397,
-0.09986109286546707,
0.006234833505004644,
-0.1369515359401703,
-0.21236951649188995,
-0.05808042362332344,
0.20448993146419525,
0.05061096325516701,
-0.1890372931957245,
-0.2360401749610901,
0.20493105053901672,
-0.09126269817352295,
0.07582409679889679,
-0.06586311757564545,
0.027246447280049324,
-0.10016169399023056,
-0.10214561223983765,
-0.08545892685651779,
0.12144430726766586,
0.3446265459060669,
0.048161763697862625,
0.08588245511054993,
0.0652773529291153,
-0.20633211731910706,
-0.0522937998175621,
0.003524716477841139,
-0.19375847280025482,
0.14637576043605804,
0.15009106695652008,
0.1497780829668045,
0.14404264092445374,
-0.09587989747524261,
-0.1928246170282364,
0.27654051780700684,
0.01659255661070347,
-0.07820744812488556,
-0.11454945802688599,
-0.11974814534187317,
0.00042851731996051967,
0.003801020560786128,
0.07455796748399734,
-0.17198650538921356,
0.03872184455394745,
0.019754700362682343,
0.12389614433050156,
0.04814726859331131,
0.013777627609670162,
6.999639481364284e-7,
-0.3491348922252655,
0.17052853107452393,
-0.050206150859594345,
0.13232427835464478,
-0.02346465364098549,
0.07348938286304474,
-0.15818481147289276,
0.13805925846099854,
-0.05375027656555176,
0.0831599161028862,
0.16621430218219757,
0.11895062029361725,
-0.02951020374894142,
-0.15815433859825134,
0.12009483575820923,
-0.1307847499847412,
-0.07887458801269531,
0.09043703973293304,
0.059776175767183304,
-0.021358786150813103,
0.24958458542823792,
0.07790744304656982,
0.1752658486366272,
-0.11402138322591782,
0.018220864236354828,
-0.14684133231639862,
-0.06639917194843292,
-0.14240127801895142,
0.055279456079006195,
0.02709379605948925,
-0.017439287155866623,
0.08009688556194305,
-0.17838117480278015,
0.269386887550354,
0.02840583212673664,
-0.12534919381141663,
-0.1741768717765808,
-0.1453460454940796,
0.03086952678859234,
0.16786865890026093,
0.07315186411142349,
0.09928237646818161,
-0.013439290225505829,
-0.1191813126206398,
0.2171066701412201,
0.1510619968175888,
-0.0471072793006897,
0.015219874680042267,
0.019765716046094894,
0.009017719887197018,
0.08763223886489868,
0.10803142189979553,
0.011194388382136822,
0.08014661073684692,
-0.05785509571433067,
0.07940081506967545,
-0.04854349419474602,
-0.03322624787688255,
0.09921213984489441,
0.07820852100849152,
-0.10489700734615326,
-0.03570341318845749,
-0.08491384238004684,
-0.0042877900414168835,
0.15560437738895416,
-0.09338242560625076,
0.07050204277038574,
-4.6976663007163833e-35,
0.04280826821923256,
-0.018724631518125534,
0.1355067640542984,
-0.18180464208126068,
-0.05530970171093941,
0.02162383869290352,
0.3499048352241516,
-0.06877924501895905,
0.15483319759368896,
-0.1822475790977478,
-0.011454188264906406
] |
https://github.com/huggingface/datasets/issues/5922 | Length of table does not accurately reflect the split | As already replied by @lhoestq (private channel):
> `.train_test_split` (as well as `.shard`, `.select`) doesn't create a new arrow table to save time and disk space. Instead, it uses an indices mapping on top of the table that locate which examples are part of train or test. | ### Describe the bug
I load a Huggingface Dataset and do `train_test_split`. I'm expecting the underlying table for the dataset to also be split, but it's not.
### Steps to reproduce the bug
![image](https://github.com/huggingface/datasets/assets/8068268/83e5768f-8b4c-422a-945c-832a7585afff)
### Expected behavior
The expected behavior is when `len(hf_dataset["train"].data)` should match the length of the train split, and not be the entire unsplit dataset.
### Environment info
datasets 2.10.1
python 3.10.11 | 47 | Length of table does not accurately reflect the split
### Describe the bug
I load a Huggingface Dataset and do `train_test_split`. I'm expecting the underlying table for the dataset to also be split, but it's not.
### Steps to reproduce the bug
![image](https://github.com/huggingface/datasets/assets/8068268/83e5768f-8b4c-422a-945c-832a7585afff)
### Expected behavior
The expected behavior is when `len(hf_dataset["train"].data)` should match the length of the train split, and not be the entire unsplit dataset.
### Environment info
datasets 2.10.1
python 3.10.11
As already replied by @lhoestq (private channel):
> `.train_test_split` (as well as `.shard`, `.select`) doesn't create a new arrow table to save time and disk space. Instead, it uses an indices mapping on top of the table that locate which examples are part of train or test. | [
0.028598986566066742,
-0.05172004550695419,
-0.062123410403728485,
0.11908384412527084,
0.060599181801080704,
0.02070179395377636,
0.08407379686832428,
0.15579204261302948,
-0.10207752883434296,
0.15539969503879547,
0.10809381306171417,
-0.12713882327079773,
-0.013609843328595161,
0.06874896585941315,
0.07101034373044968,
-0.008097234182059765,
0.01294167060405016,
-0.08922459930181503,
-0.17943207919597626,
0.007018034812062979,
0.036754999309778214,
-0.041541025042533875,
0.007893938571214676,
0.00031785701867192984,
-0.15176931023597717,
0.02381860464811325,
-0.255852073431015,
-0.08381492644548416,
-0.11414475739002228,
0.07382693886756897,
-0.016294224187731743,
-0.09303247928619385,
-0.06771954149007797,
0.11928104609251022,
0.000005568946562561905,
0.09449128806591034,
-0.005474682431668043,
-0.04555915668606758,
0.04727208614349365,
-0.05050831288099289,
0.10194803029298782,
0.08102146536111832,
0.08708268404006958,
0.0865064188838005,
0.006486651953309774,
0.12959541380405426,
-0.2361104041337967,
0.013463295064866543,
-0.11044543236494064,
0.0003405292227398604,
0.008152227848768234,
0.03657674416899681,
-0.03787568211555481,
-0.1362239122390747,
0.18252289295196533,
0.06099589169025421,
0.10773627460002899,
0.07404427975416183,
-0.13835430145263672,
-0.02685975469648838,
-0.062355030328035355,
0.02472304366528988,
0.20507371425628662,
0.05364334583282471,
-0.05577247589826584,
0.11686890572309494,
-0.231490358710289,
-0.0015177635941654444,
0.062166728079319,
0.09830861538648605,
-0.13471820950508118,
0.06342010945081711,
0.15470506250858307,
-0.001307816943153739,
0.16598671674728394,
-0.08266942948102951,
-0.07894881069660187,
0.10309723764657974,
0.06932028383016586,
-0.07671201229095459,
-0.16859953105449677,
0.17525528371334076,
-0.04369691386818886,
-0.04582305625081062,
-0.31574147939682007,
0.05097320303320885,
-0.1263401061296463,
0.020465590059757233,
-0.010496286675333977,
-0.10809770226478577,
-0.0031490272376686335,
0.10955655574798584,
-0.13875608146190643,
-0.004840175621211529,
-0.1761210411787033,
0.08681578934192657,
0.08799700438976288,
-0.1331479400396347,
0.08532793819904327,
-0.03871159255504608,
-0.13514530658721924,
-0.05204420164227486,
-0.03159143403172493,
-0.12728086113929749,
0.03567036986351013,
-0.11285822838544846,
0.0012365846196189523,
0.1418994516134262,
-0.07225867360830307,
0.04910352826118469,
0.041260093450546265,
0.026566382497549057,
-0.013305521570146084,
0.004254354164004326,
0.06221095472574234,
-0.18805959820747375,
-0.008540814742445946,
-0.01819499582052231,
-0.028169039636850357,
0.19758771359920502,
0.15711019933223724,
0.06933696568012238,
0.052899595350027084,
0.16194701194763184,
-0.061787448823451996,
0.05535547807812691,
-0.1254284679889679,
0.008283604867756367,
-0.08184082061052322,
0.0039251092821359634,
-0.07152040302753448,
0.0813487246632576,
-0.2094869464635849,
-0.027228737249970436,
0.10371436178684235,
-0.1240924745798111,
0.0011890566674992442,
-0.1561485230922699,
0.18093560636043549,
-0.14885039627552032,
-0.1702224165201187,
-0.13059589266777039,
0.2730104923248291,
-0.030996127054095268,
0.15457598865032196,
0.08225130289793015,
0.016997182741761208,
-0.013129331171512604,
-0.021113978698849678,
0.01067260093986988,
-0.3245154917240143,
0.11173049360513687,
-0.08585076779127121,
0.014358396641910076,
-0.08062761276960373,
-0.009544591419398785,
-0.007855734787881374,
0.06836830824613571,
0.04351884871721268,
0.06556171923875809,
0.2436298131942749,
0.05930282920598984,
0.04091815650463104,
-0.12001602351665497,
0.05833722651004791,
-0.10691887140274048,
-0.047485124319791794,
-0.051768623292446136,
0.006029867567121983,
-0.10068701207637787,
0.09157680720090866,
-0.03604108467698097,
0.11956840008497238,
0.001943020848557353,
-0.10466908663511276,
0.20141856372356415,
-0.0277958195656538,
0.2093009501695633,
-0.16414788365364075,
-0.052809394896030426,
0.010156773962080479,
-0.0026538625825196505,
-0.02056390978395939,
-0.27853962779045105,
0.03446429222822189,
0.06123306229710579,
0.15416201949119568,
0.02839653007686138,
-0.0803961455821991,
-0.040557604283094406,
-0.10071979463100433,
-0.12074200809001923,
-0.031134188175201416,
-0.05524452030658722,
0.03802556172013283,
-0.10697761923074722,
-0.12099090218544006,
-0.07648944854736328,
0.09491636604070663,
-0.1742308884859085,
0.011975262314081192,
0.01142798736691475,
-0.046559300273656845,
0.03547429293394089,
-0.021543612703680992,
-0.261791855096817,
-0.08190584927797318,
0.012913466431200504,
0.07741692662239075,
-0.16710315644741058,
-0.14880429208278656,
0.04674558341503143,
-0.09555041790008545,
0.11056197434663773,
-0.0647229477763176,
0.03674947842955589,
0.05033360794186592,
-0.08936195075511932,
-0.01808769442141056,
0.20091362297534943,
0.025085756555199623,
-0.16635526716709137,
-0.05047309398651123,
0.17629839479923248,
-0.07875183969736099,
0.15191100537776947,
-0.16231659054756165,
-0.08532026410102844,
0.1155577301979065,
0.0712047666311264,
-0.039311733096838,
-0.03430027887225151,
0.177283376455307,
0.013847899623215199,
-0.057037223130464554,
-0.06771334260702133,
-0.017141565680503845,
-0.10214178264141083,
0.15633557736873627,
-0.07036486268043518,
-0.06552064418792725,
-0.014219144359230995,
-0.07781048864126205,
-0.050189558416604996,
0.016290368512272835,
0.00775875523686409,
-0.09740156680345535,
0.08915074169635773,
-0.01173645630478859,
-0.02199019305408001,
0.09635581821203232,
0.20020873844623566,
0.0902281180024147,
-0.0804532989859581,
-0.03413398191332817,
-0.23433971405029297,
-0.1288384348154068,
0.17328859865665436,
0.10797367244958878,
0.10564184188842773,
0.34379222989082336,
-0.0013774364488199353,
-0.19934239983558655,
0.059226952493190765,
-0.037030261009931564,
-0.1523558795452118,
0.008704755455255508,
0.008462793193757534,
-0.018369309604167938,
0.036129508167505264,
0.09635568410158157,
-0.18004830181598663,
-0.08179020881652832,
-0.003633294254541397,
-0.08285440504550934,
-0.21357709169387817,
-0.06613875180482864,
0.0781792551279068,
-0.09562022238969803,
0.03180956840515137,
-0.061846308410167694,
0.2684096097946167,
-0.008537361398339272,
0.062357883900403976,
0.06164956092834473,
0.03314730152487755,
-0.10400620102882385,
-0.034276366233825684,
-0.04751814156770706,
0.000022490732590085827,
-0.09145331382751465,
-0.09629543125629425,
-0.023035923019051552,
-0.15181761980056763,
0.016763823106884956,
-0.1787274330854416,
-0.03539786860346794,
-0.14553028345108032,
0.11274739354848862,
0.08759568631649017,
0.013482198119163513,
0.20519991219043732,
-0.060187891125679016,
-0.09189974516630173,
-0.13323761522769928,
0.03741060569882393,
0.02555491030216217,
0.040771596133708954,
-0.24242885410785675,
-0.019444098696112633,
-0.09978865087032318,
-0.024026526138186455,
-0.10744371265172958,
-0.047366078943014145,
0.10808511078357697,
0.12997448444366455,
-0.07619849592447281,
0.05559195205569267,
0.017302144318819046,
-0.11374269425868988,
0.04292978718876839,
0.15038292109966278,
-0.19624067842960358,
-0.029115203768014908,
0.14291463792324066,
0.058569058775901794,
-0.00636991485953331,
-0.010047695599496365,
0.14867547154426575,
0.049423348158597946,
-0.008920601569116116,
0.036043837666511536,
0.05798346921801567,
-0.08577428758144379,
0.0754479393362999,
-0.1023012176156044,
-0.2299940586090088,
0.03084787167608738,
0.13678941130638123,
0.026003722101449966,
0.10321751981973648,
0.0959421694278717,
-0.131526380777359,
-0.09070182591676712,
0.05208555608987808,
-0.07402752339839935,
-0.005971874576061964,
-0.1544387936592102,
0.1438916027545929,
0.09515731036663055,
0.08165793120861053,
0.12270674854516983,
-0.12842415273189545,
0.016818951815366745,
-0.1256304681301117,
-0.004196886904537678,
-0.017936713993549347,
-0.03703964501619339,
0.07306550443172455,
-0.009243128821253777,
0.099307581782341,
0.06765656918287277,
0.019570348784327507,
0.11341921240091324,
-0.026321617886424065,
-0.07022028416395187,
-0.11691316962242126,
0.004387661349028349,
-0.0811033546924591,
-0.06731274724006653,
0.04480152204632759,
0.030301515012979507,
-0.09269144386053085,
0.11864855885505676,
0.06345994025468826,
0.07944764941930771,
0.19387823343276978,
-0.10487096011638641,
0.15659956634044647,
0.012335366569459438,
0.020058102905750275,
-0.1194441169500351,
-0.07190127670764923,
0.05931401252746582,
0.01848812960088253,
0.10367278754711151,
-0.03438778221607208,
-0.03473176062107086,
-0.2031298130750656,
0.03545478731393814,
0.09092976897954941,
-0.13486218452453613,
0.012379711493849754,
0.0919322595000267,
0.05574522167444229,
0.13844484090805054,
0.17220282554626465,
0.17835348844528198,
-0.07854791730642319,
0.15296021103858948,
0.15665659308433533,
0.021923601627349854,
0.04852624237537384,
0.034234654158353806,
-0.04118688404560089,
0.05296589434146881,
-0.12087169289588928,
-0.025282572954893112,
0.006886220071464777,
0.05415934696793556,
0.1426285356283188,
0.05255692079663277,
0.039030831307172775,
-0.0023685023188591003,
0.37864184379577637,
-0.021692508831620216,
0.009911452420055866,
0.09252350777387619,
-0.02263519912958145,
-0.07230076193809509,
0.0307915136218071,
-0.02277410589158535,
0.12981492280960083,
0.031233539804816246,
-0.03344641253352165,
-0.053406618535518646,
-0.011892545036971569,
-0.16794314980506897,
0.20721717178821564,
0.1126784011721611,
0.16830255091190338,
-0.028918320313096046,
0.1695629209280014,
-0.10068415850400925,
0.2825709283351898,
0.04713422432541847,
0.2669627368450165,
-0.2116691917181015,
-0.0716208666563034,
0.07986041158437729,
-0.11183890700340271,
0.10114030539989471,
0.12024620920419693,
-0.07445848733186722,
0.1378623992204666,
-0.09206803143024445,
0.13097023963928223,
-0.039869386702775955,
0.012431245297193527,
0.02641136571764946,
0.0036089892964810133,
-0.023211423307657242,
-0.030942736193537712,
-0.2745835483074188,
0.0021668344270437956,
-0.01296291034668684,
0.013804174028337002,
0.00554127711802721,
0.13211219012737274,
0.09892790764570236,
-0.14587517082691193,
-0.029907364398241043,
0.12005209177732468,
0.05231506749987602,
0.09201250225305557,
-0.0760052427649498,
-0.00009168942779069766,
-0.13113346695899963,
-0.0008265437791123986,
0.031933460384607315,
-0.25653237104415894,
0.12818115949630737,
-0.008855530992150307,
0.06671222299337387,
0.0900200605392456,
0.1306309849023819,
0.07890990376472473,
-0.07633386552333832,
0.13714396953582764,
-0.11082230508327484,
0.16066372394561768,
-0.009482629597187042,
0.03912226855754852,
0.0500025749206543,
0.020194251090288162,
0.21195979416370392,
-0.07824182510375977,
0.059179916977882385,
-0.01908414252102375,
-0.009490913711488247,
-0.10723645985126495,
0.06811188906431198,
-0.08019696921110153,
0.04145549610257149,
0.008745045401155949,
-0.0048967753536999226,
0.04010641574859619,
-0.07468518614768982,
0.040705423802137375,
-0.09936361759901047,
0.16180096566677094,
0.032301828265190125,
0.104681596159935,
-0.15921638906002045,
-0.06781765073537827,
-0.05195192992687225,
0.042912133038043976,
0.005312957335263491,
0.1563836634159088,
-0.1111060306429863,
-0.11985207349061966,
0.1475542187690735,
0.018549637869000435,
-0.0343233123421669,
0.02175789326429367,
0.08713480830192566,
-0.19544348120689392,
-0.0010629664175212383,
-0.05063259229063988,
-0.0058322991244494915,
0.11772355437278748,
0.1654326170682907,
-0.037585172802209854,
-0.015445102006196976,
0.0070215812884271145,
0.02286464534699917,
-0.09896859526634216,
-0.2030089795589447,
0.15237441658973694,
0.05175071209669113,
0.09089638292789459,
0.07189328968524933,
0.05583346262574196,
-0.10773869603872299,
-0.0003800135455094278,
0.13464950025081635,
0.3363577127456665,
-0.12161551415920258,
-0.04012434929609299,
-0.09911132603883743,
0.019010214135050774,
-0.12588317692279816,
-0.11775729805231094,
0.1484130322933197,
0.045764170587062836,
-0.04114226624369621,
0.072245292365551,
-0.07280312478542328,
-0.07287449389696121,
-0.12994597852230072,
-0.01513240858912468,
0.045038994401693344,
0.08904456347227097,
-0.15714538097381592,
0.1678713709115982,
-2.2141072334055168e-32,
-0.0856286883354187,
0.1386430710554123,
0.039521485567092896,
-0.12998613715171814,
-0.27762722969055176,
0.12266861647367477,
-0.15750300884246826,
-0.07918045669794083,
-0.011209830641746521,
-0.01108088344335556,
-0.2524987459182739,
0.13649438321590424,
-0.02805294655263424,
-0.04367940500378609,
0.11434193700551987,
-0.2272995561361313,
-0.014162960462272167,
-0.06873179227113724,
-0.13844631612300873,
0.13740397989749908,
0.020990746095776558,
0.04894638806581497,
0.02140951342880726,
0.1341589391231537,
-0.0016774499090388417,
0.02528586983680725,
-0.13253842294216156,
-0.11592849344015121,
0.024398749694228172,
-0.09507300704717636,
0.019542859867215157,
0.1278580129146576,
-0.0344693548977375,
-0.07027117908000946,
0.025490550324320793,
-0.14902742207050323,
-0.21097199618816376,
-0.15608002245426178,
0.011688979342579842,
0.043165650218725204,
0.014934170059859753,
0.13994435966014862,
0.10736740380525589,
-0.055391307920217514,
-0.05469107627868652,
-0.026581844314932823,
0.06637246161699295,
-0.011234956793487072,
-0.011865594424307346,
-0.0761132538318634,
0.1572898030281067,
-0.004186335019767284,
0.17156313359737396,
0.03832952305674553,
0.1901436448097229,
-0.18475908041000366,
0.061572134494781494,
-0.02339140512049198,
-0.02229459024965763,
0.0016471932176500559,
0.24087420105934143,
-0.01686689630150795,
-0.014897781424224377,
0.03192944452166557,
0.0628095343708992,
0.02206362970173359,
0.238864004611969,
-0.011004749685525894,
0.12804356217384338,
-0.03993987664580345,
-0.0304582342505455,
0.031194085255265236,
0.012289936654269695,
-0.18913021683692932,
-0.00722141657024622,
0.05940140783786774,
-0.08615181595087051,
-0.16844430565834045,
0.17417918145656586,
-0.11019504070281982,
-0.04560340940952301,
-0.011626573279500008,
-0.10232973843812943,
0.030444493517279625,
0.013076046481728554,
-0.0097647774964571,
0.1045469269156456,
-0.08692920953035355,
0.02214456908404827,
-0.0033237808384001255,
0.048785656690597534,
0.1268937736749649,
-0.11937712132930756,
-0.04624033719301224,
-0.10019313544034958,
0.11198898404836655,
-0.17282631993293762,
0.031792666763067245,
0.005773300305008888,
-0.03767240419983864,
0.010254718363285065,
-0.0482872910797596,
0.1539415568113327,
-0.005539200734347105,
0.08164011687040329,
0.03325337916612625,
0.2540498971939087,
-0.03976637125015259,
-0.012716339901089668,
0.03857484832406044,
-0.07252564281225204,
-0.06429586559534073,
0.12369418144226074,
0.0749540850520134,
0.048119038343429565,
-0.000596030498854816,
-0.04931757599115372,
-0.15580222010612488,
0.1721373349428177,
0.14743229746818542,
-0.0597865954041481,
-0.023258110508322716,
-0.25472313165664673,
-0.016105107963085175,
0.0010593475308269262,
0.03334029018878937,
-0.12990471720695496,
-0.0987216904759407,
0.04648631438612938,
-0.18389427661895752,
0.05312872678041458,
-0.02655530534684658,
7.614893320351257e-7,
-0.009464584290981293,
0.003007572842761874,
0.04300084710121155,
-0.20071667432785034,
-0.05945774167776108,
0.0376143716275692,
-0.05797205865383148,
0.10054965317249298,
-0.13935156166553497,
0.03843413665890694,
0.03834133595228195,
-0.030233509838581085,
-0.002149811014533043,
-0.23023293912410736,
0.20934176445007324,
-0.1993594765663147,
-0.09238635748624802,
-0.03976345807313919,
-0.15244847536087036,
0.13001281023025513,
-0.11757919937372208,
0.04776391386985779,
0.0582498162984848,
-0.02511449344456196,
-0.05692778900265694,
0.09664025157690048,
-0.27706673741340637,
-0.07505633682012558,
0.17246966063976288,
-0.11244696378707886,
-0.04508177936077118,
-0.22969301044940948,
-0.01365935243666172,
0.19916804134845734,
-0.07433001697063446,
0.14578327536582947,
-0.17577585577964783,
-0.09087387472391129,
-0.004422361962497234,
0.22773098945617676,
-0.05607359856367111,
-0.17920993268489838,
0.06859767436981201,
-0.24683278799057007,
0.20060187578201294,
0.16021408140659332,
0.08764990419149399,
0.10082776844501495,
-0.01806599833071232,
0.021919066086411476,
-0.02360013872385025,
0.15111331641674042,
0.29102015495300293,
0.3496379554271698,
-0.029878774657845497,
-0.09645672142505646,
0.13747023046016693,
-0.19391551613807678,
0.10317687690258026,
0.01787761226296425,
-0.05672115087509155,
-0.036743875592947006,
-0.07587338984012604,
0.2224074900150299,
-0.025235475972294807,
-0.23938581347465515,
-0.11056786775588989,
1.8114563096600786e-34,
-0.038203854113817215,
0.12127137184143066,
0.04484039172530174,
-0.2336336374282837,
0.09628770500421524,
-0.06362985074520111,
0.2494453340768814,
0.027466926723718643,
-0.17709384858608246,
-0.07766276597976685,
-0.146911159157753
] |
https://github.com/huggingface/datasets/issues/5913 | I tried to load a custom dataset using the following statement: dataset = load_dataset('json', data_files=data_files). The dataset contains 50 million text-image pairs, but an error occurred. | Thanks for reporting, @cjt222.
What is the structure of your JSON files. Please note that it is normally simpler if the data file format is JSON-Lines instead. | ### Describe the bug
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
Downloading and preparing dataset json/default to /home/kas/diffusers/examples/dreambooth/cache_data/datasets/json/default-acf423d8c6ef99d0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 84.35it/s]
Extracting data files: 0%| | 0/1 [00:00<?, ?it/s] for _, table in generator:
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 114, in _generate_tables
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
File "pyarrow/_json.pyx", line 258, in pyarrow._json.read_json
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 27.72it/s]
Generating train split: 0 examples [00:00, ? examples/s] File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 125, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2390448764
### Steps to reproduce the bug
1、data_files = ["1.json", "2.json", "3.json"]
2、dataset = load_dataset('json', data_files=data_files)
### Expected behavior
Read the dataset normally.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 1.3.5 | 27 | I tried to load a custom dataset using the following statement: dataset = load_dataset('json', data_files=data_files). The dataset contains 50 million text-image pairs, but an error occurred.
### Describe the bug
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
Downloading and preparing dataset json/default to /home/kas/diffusers/examples/dreambooth/cache_data/datasets/json/default-acf423d8c6ef99d0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 84.35it/s]
Extracting data files: 0%| | 0/1 [00:00<?, ?it/s] for _, table in generator:
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 114, in _generate_tables
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
File "pyarrow/_json.pyx", line 258, in pyarrow._json.read_json
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 27.72it/s]
Generating train split: 0 examples [00:00, ? examples/s] File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 125, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2390448764
### Steps to reproduce the bug
1、data_files = ["1.json", "2.json", "3.json"]
2、dataset = load_dataset('json', data_files=data_files)
### Expected behavior
Read the dataset normally.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 1.3.5
Thanks for reporting, @cjt222.
What is the structure of your JSON files. Please note that it is normally simpler if the data file format is JSON-Lines instead. | [
0.06496935337781906,
0.1526070237159729,
-0.018914097920060158,
0.0643303170800209,
0.23263177275657654,
0.04562734439969063,
0.08029908686876297,
0.05003545060753822,
0.008796540088951588,
0.21689139306545258,
-0.10407805442810059,
-0.09480634331703186,
-0.030902089551091194,
-0.05737153813242912,
0.005916827358305454,
-0.019445577636361122,
-0.04779611527919769,
0.07555562257766724,
0.145523801445961,
0.026832586154341698,
-0.0896216630935669,
-0.010058223269879818,
0.13049153983592987,
-0.11851032078266144,
-0.064210906624794,
-0.08041513711214066,
-0.07010439038276672,
0.18853764235973358,
0.06149202212691307,
-0.18036378920078278,
0.12058565020561218,
-0.06360901892185211,
0.0004238056135363877,
0.1485067903995514,
0.000005527646862901747,
0.009483038447797298,
0.1083829328417778,
0.0672263652086258,
-0.14558649063110352,
-0.07806321978569031,
0.14107955992221832,
-0.11795652657747269,
-0.059171780943870544,
-0.022353671491146088,
0.09392428398132324,
-0.10970467329025269,
-0.0921756699681282,
0.04345684498548508,
0.018814248964190483,
0.1671086549758911,
-0.024496782571077347,
0.01249595545232296,
-0.05063174292445183,
-0.21941524744033813,
0.10552483797073364,
-0.058956362307071686,
0.08524531126022339,
0.1319856494665146,
-0.14184369146823883,
-0.10096137225627899,
-0.08343386650085449,
-0.20633205771446228,
-0.010799916461110115,
0.07627784460783005,
-0.13942576944828033,
0.010742493905127048,
-0.09777754545211792,
-0.10408046096563339,
0.028300952166318893,
0.2966930866241455,
0.05117836967110634,
0.13523799180984497,
-0.07890742272138596,
-0.06358339637517929,
-0.00661090575158596,
-0.0559467151761055,
-0.005542275030165911,
0.04062343388795853,
-0.24478964507579803,
0.08329042792320251,
-0.05393204092979431,
0.061859652400016785,
0.011370781809091568,
-0.0009633665904402733,
-0.23665380477905273,
0.005356065928936005,
-0.16175691783428192,
0.05379021167755127,
-0.025370752438902855,
-0.014785743318498135,
0.06051473319530487,
0.06958385556936264,
-0.11863008141517639,
-0.22969579696655273,
0.09312722086906433,
0.10704929381608963,
-0.027845634147524834,
-0.20942261815071106,
0.03901864215731621,
-0.10670915246009827,
-0.08609824627637863,
-0.09656235575675964,
0.008047198876738548,
0.1783801019191742,
0.17683236300945282,
-0.02031104639172554,
-0.16209349036216736,
-0.06215706840157509,
0.0053978851065039635,
-0.026648182421922684,
-0.040839873254299164,
0.18977561593055725,
-0.29570072889328003,
-0.05529426038265228,
0.09754731506109238,
-0.029377449303865433,
0.0900653675198555,
0.13184426724910736,
0.0800301656126976,
0.06236857920885086,
0.0236586295068264,
0.05969879776239395,
-0.06175672635436058,
0.09334170073270798,
0.014145576395094395,
-0.05073902755975723,
-0.07420472800731659,
0.04981815442442894,
-0.08681263029575348,
-0.03035776875913143,
0.0011230555828660727,
-0.09218204766511917,
0.036157555878162384,
-0.04110526293516159,
0.14142049849033356,
-0.0907164141535759,
0.01076943427324295,
-0.18211998045444489,
-0.07423794269561768,
-0.021339409053325653,
0.03956243395805359,
-0.12922075390815735,
-0.16846804320812225,
0.13715113699436188,
0.13551323115825653,
0.04402252286672592,
0.04645692557096481,
0.02017475664615631,
0.014969083480536938,
0.07140524685382843,
-0.2859126329421997,
0.0051492913626134396,
-0.210969939827919,
0.06710964441299438,
-0.12938259541988373,
-0.0028579127974808216,
-0.12387719005346298,
-0.044950906187295914,
-0.19880355894565582,
-0.07393092662096024,
0.004390659276396036,
-0.013751087710261345,
-0.042535558342933655,
-0.10518594086170197,
0.1337863653898239,
0.1085159182548523,
-0.04565335065126419,
0.1617140918970108,
0.004981245379894972,
0.0326523631811142,
0.11525724828243256,
-0.019031578674912453,
-0.14936935901641846,
0.031371548771858215,
-0.2316146343946457,
0.13006021082401276,
-0.03719423711299896,
0.10688688606023788,
-0.2728232145309448,
0.09187234193086624,
0.12920913100242615,
-0.14185796678066254,
-0.08182240277528763,
-0.14299121499061584,
0.15569594502449036,
-0.02362395077943802,
0.02944643422961235,
0.017663555219769478,
-0.07710777223110199,
-0.10761471837759018,
0.04122840240597725,
0.06710059195756912,
-0.05684199184179306,
0.009523538872599602,
0.07011548429727554,
-0.14386890828609467,
0.010641152039170265,
-0.08395756781101227,
0.025142069905996323,
-0.19812431931495667,
-0.07555989921092987,
0.08009002357721329,
0.03982412442564964,
0.08614499866962433,
0.04387969523668289,
-0.07159312814474106,
-0.13098719716072083,
0.19189417362213135,
0.021535418927669525,
-0.2710362374782562,
-0.17978759109973907,
0.12037516385316849,
-0.105117566883564,
0.018798241391777992,
-0.15803579986095428,
-0.0023089642636477947,
-0.08771251887083054,
0.11235400289297104,
-0.12556448578834534,
0.14559179544448853,
-0.09999480098485947,
0.038750939071178436,
0.08352571725845337,
-0.002471981570124626,
-0.09882836043834686,
0.024670196697115898,
0.07014183700084686,
-0.06403942406177521,
0.07091986387968063,
0.04635264724493027,
-0.12166505306959152,
-0.12885579466819763,
0.11025487631559372,
0.1728881448507309,
-0.019227376207709312,
-0.04665444418787956,
-0.07331409305334091,
-0.07182248681783676,
-0.06495708227157593,
-0.040887314826250076,
-0.07375507056713104,
0.07011698186397552,
0.008573626168072224,
-0.17266859114170074,
0.041138000786304474,
0.03975888714194298,
-0.02329716458916664,
0.23903632164001465,
-0.0765136331319809,
-0.011194257996976376,
0.34463003277778625,
0.15781289339065552,
-0.07826448231935501,
0.0699036717414856,
0.05808199942111969,
-0.00739354407414794,
0.062016669660806656,
0.16301271319389343,
-0.053531963378190994,
-0.11942972987890244,
0.20920532941818237,
-0.04649197682738304,
0.052524369210004807,
0.040047869086265564,
0.10591037571430206,
-0.1396310031414032,
0.012258336879312992,
-0.10010948032140732,
0.03443837910890579,
0.06602808833122253,
-0.04384352266788483,
-0.020022638142108917,
-0.14476816356182098,
-0.16420556604862213,
-0.04619757831096649,
-0.041218411177396774,
0.04635915160179138,
-0.10863449424505234,
0.0725538358092308,
0.012147481553256512,
-0.05233372002840042,
0.04855101928114891,
0.08520909398794174,
-0.10122579336166382,
0.10752222687005997,
0.05505998805165291,
-0.004297140520066023,
0.08418779820203781,
-0.011482100933790207,
0.05841652676463127,
0.0447707362473011,
0.08547330647706985,
0.03435007482767105,
-0.15733490884304047,
-0.0109092453494668,
-0.047952450811862946,
0.13677869737148285,
-0.017086580395698547,
-0.019717268645763397,
-0.01595451310276985,
-0.1210353747010231,
-0.022323284298181534,
0.03913077339529991,
0.0380614772439003,
0.11988765746355057,
0.09988182038068771,
0.12875598669052124,
0.13046102225780487,
-0.13711139559745789,
0.047520872205495834,
0.03222038596868515,
-0.06219697743654251,
0.03952687978744507,
0.1272563636302948,
0.05032617598772049,
0.06150360405445099,
0.039122581481933594,
-0.18664813041687012,
0.13211838901042938,
0.09421000629663467,
-0.054849330335855484,
0.23486775159835815,
-0.10950370877981186,
0.014772744849324226,
-0.002553092548623681,
0.029811741784214973,
-0.2200329452753067,
-0.11423046141862869,
-0.037577882409095764,
0.14913851022720337,
-0.08779234439134598,
0.06514132767915726,
0.0037119733169674873,
0.06644359230995178,
0.0816005989909172,
-0.20923413336277008,
-0.13299518823623657,
-0.07133416831493378,
0.3020625114440918,
0.045085128396749496,
-0.0718577578663826,
0.04584847018122673,
-0.0767781212925911,
-0.027629323303699493,
0.06702587008476257,
-0.24884702265262604,
0.1133275255560875,
-0.11607719212770462,
0.002176561625674367,
-0.19357627630233765,
-0.026883715763688087,
0.09114816784858704,
0.06812060624361038,
-0.07095600664615631,
-0.010790822096168995,
0.0955606997013092,
-0.15197007358074188,
0.1837741732597351,
-0.08994381874799728,
0.10651412606239319,
0.047579389065504074,
0.044583238661289215,
0.060423195362091064,
-0.06720467656850815,
-0.08069223910570145,
0.13151638209819794,
0.07352929562330246,
0.09234987944364548,
-0.15427735447883606,
-0.09755998849868774,
0.03715640306472778,
-0.1689484715461731,
-0.009517346508800983,
-0.10370925813913345,
0.04501098766922951,
-0.07210255414247513,
-0.04508677124977112,
-0.21472890675067902,
0.05847452953457832,
0.04389325901865959,
0.03730771318078041,
-0.11994078755378723,
-0.04505600035190582,
0.07846177369356155,
0.09179791063070297,
0.0823037251830101,
-0.035350602120161057,
-0.036067891865968704,
-0.1558089554309845,
0.1451192945241928,
0.03626631200313568,
0.08436045050621033,
0.03606272116303444,
0.027642270550131798,
0.01865421235561371,
-0.1658530831336975,
0.2412424236536026,
0.18843162059783936,
0.11786263436079025,
0.022170981392264366,
0.14207175374031067,
0.11761943995952606,
-0.07960376143455505,
0.06608270108699799,
0.13064436614513397,
0.16329410672187805,
-0.02226407453417778,
-0.09963954240083694,
-0.056908220052719116,
-0.02411728911101818,
0.09490816295146942,
0.06243926286697388,
-0.0774407908320427,
0.052984569221735,
0.2328292727470398,
0.17125625908374786,
-0.11048906296491623,
-0.06588443368673325,
-0.1222982108592987,
-0.20582446455955505,
-0.1814274936914444,
-0.24593231081962585,
0.15453630685806274,
0.2763610780239105,
0.05893683806061745,
-0.0428188256919384,
0.048017777502536774,
-0.08559224009513855,
0.12571336328983307,
0.007474018260836601,
-0.030019611120224,
0.01423910353332758,
0.0523231215775013,
-0.04943769797682762,
-0.06833627074956894,
-0.005668157711625099,
0.42479100823402405,
0.03006996214389801,
0.01236817054450512,
0.03241203352808952,
-0.16023002564907074,
-0.008283186703920364,
-0.013792476616799831,
-0.04668636620044708,
0.0006953253177925944,
-0.09254106879234314,
-0.13132260739803314,
-0.0016201954567804933,
0.054624006152153015,
-0.049486927688121796,
-0.20616209506988525,
-0.1975805163383484,
-0.13846637308597565,
-0.16851870715618134,
0.03371120244264603,
-0.013390741311013699,
0.08270688354969025,
-0.12939998507499695,
0.08030738681554794,
0.17334459722042084,
-0.06723618507385254,
-0.06908784806728363,
-0.14858165383338928,
0.03392907977104187,
-0.01124943420290947,
0.09575506299734116,
0.1757861077785492,
-0.16274705529212952,
-0.03895038366317749,
0.13549202680587769,
-0.0438397116959095,
0.10543745756149292,
-0.04234245419502258,
0.006575147155672312,
0.13443796336650848,
0.031051866710186005,
0.01571219600737095,
0.0014581310097128153,
-0.03418240323662758,
0.09106329083442688,
0.13704447448253632,
-0.01451225858181715,
0.18361087143421173,
-0.17488044500350952,
0.012718774378299713,
0.15935562551021576,
-0.04006547853350639,
-0.04335172474384308,
-0.19733396172523499,
-0.09030139446258545,
0.13327614963054657,
-0.0702599585056305,
-0.026486167684197426,
-0.09803356975317001,
0.1140916496515274,
-0.05749865993857384,
-0.05742479860782623,
0.08879481256008148,
0.03828475996851921,
-0.0034276891965419054,
0.007567044347524643,
-0.061571214348077774,
0.03893839195370674,
-0.050437625497579575,
0.025030769407749176,
-0.040905993431806564,
0.00007535509212175384,
-0.04770873486995697,
0.006029595620930195,
-0.07872956991195679,
0.10298766195774078,
0.03883713111281395,
-0.06704317033290863,
0.08622284233570099,
0.12037535756826401,
0.024640347808599472,
-0.08401525765657425,
-0.013985409401357174,
-0.0032881409861147404,
0.10290030390024185,
0.09736224263906479,
-0.06409739702939987,
0.08186856657266617,
-0.05932510644197464,
0.033509980887174606,
0.11029330641031265,
-0.03542892262339592,
0.0992845818400383,
0.12776388227939606,
0.09811698645353317,
0.11591631174087524,
0.09534059464931488,
0.3046448826789856,
0.08641371130943298,
-0.06690244376659393,
0.16585509479045868,
0.14219196140766144,
-0.24952535331249237,
-0.013504067435860634,
0.10713612288236618,
0.004315318074077368,
-0.2344728708267212,
-0.052543073892593384,
0.1486765444278717,
0.1065371111035347,
0.18771560490131378,
-0.016573602333664894,
-0.030410736799240112,
-0.06253060698509216,
-0.07184358686208725,
-0.0024943160824477673,
0.15363125503063202,
-0.004524637944996357,
-0.048513635993003845,
0.06979241222143173,
-2.5804114034624994e-32,
-0.04342775419354439,
-0.07043832540512085,
-0.005287801846861839,
-0.08941396325826645,
-0.060738757252693176,
0.0689035952091217,
-0.014250888489186764,
-0.05771069973707199,
0.025844436138868332,
-0.0540681891143322,
-0.10167866200208664,
-0.058191459625959396,
0.02344440296292305,
0.04483377933502197,
-0.05579152703285217,
-0.002992107532918453,
-0.058284591883420944,
-0.09277956932783127,
0.06175442785024643,
0.013334226794540882,
0.0007835481665097177,
0.07346177101135254,
-0.08453233540058136,
-0.07041572034358978,
-0.005130679812282324,
0.019166970625519753,
-0.025589529424905777,
-0.13238553702831268,
0.15714338421821594,
-0.014591723680496216,
-0.07114768773317337,
0.07509128749370575,
0.0913877934217453,
-0.11161183565855026,
-0.10796415060758591,
0.0007471252465620637,
-0.1684829443693161,
-0.07659440487623215,
0.05668707937002182,
0.09080956131219864,
-0.07069066166877747,
0.0703619047999382,
0.11782961338758469,
-0.21172204613685608,
0.03262116387486458,
0.09356696903705597,
0.04923446103930473,
-0.04431624338030815,
-0.1429411768913269,
-0.027884885668754578,
0.07259418070316315,
0.02060258574783802,
0.022075198590755463,
0.0751902163028717,
0.05672478675842285,
-0.12069571763277054,
-0.02302466705441475,
0.17182712256908417,
-0.05548085272312164,
-0.16896383464336395,
0.10293161869049072,
-0.08049322664737701,
-0.033501747995615005,
-0.05372168868780136,
0.1298900991678238,
-0.032216403633356094,
0.35084268450737,
0.03245187923312187,
0.023372754454612732,
-0.084850013256073,
0.1000615805387497,
0.149717316031456,
-0.1558341234922409,
0.0667123794555664,
0.02123286761343479,
-0.053499944508075714,
-0.14123012125492096,
0.013843630440533161,
-0.036102294921875,
-0.10108935087919235,
0.07772201299667358,
0.0004293571982998401,
-0.07380808144807816,
0.07422833889722824,
0.004364599473774433,
0.022569961845874786,
-0.07648089528083801,
-0.01579725556075573,
-0.1106572225689888,
-0.13377730548381805,
-0.014213619753718376,
0.016618063673377037,
-0.11353664845228195,
-0.17845039069652557,
-0.10487768799066544,
0.11108367145061493,
-0.11593553423881531,
0.03641192987561226,
-0.10799459367990494,
0.09451913088560104,
-0.11160658299922943,
-0.07142803072929382,
0.057131119072437286,
0.009144442155957222,
0.21479441225528717,
0.10723743587732315,
0.1402595192193985,
-0.00006463420868385583,
-0.2366432249546051,
-0.06190139427781105,
-0.07711920142173767,
0.025663400068879128,
0.15396364033222198,
0.13486544787883759,
0.21066904067993164,
0.09504804760217667,
-0.1192859634757042,
-0.10705457627773285,
0.1522645205259323,
0.13113103806972504,
-0.1438113898038864,
-0.08536198735237122,
-0.06609068810939789,
-0.06902802735567093,
-0.017095861956477165,
0.12303749471902847,
-0.1624811738729477,
-0.0630853921175003,
-0.0018309401348233223,
0.05681212991476059,
0.019196297973394394,
-0.0602816678583622,
7.523995009250939e-7,
-0.31613415479660034,
0.19165654480457306,
0.011925849132239819,
0.07720596343278885,
0.036599740386009216,
0.03435835614800453,
-0.3547042906284332,
0.15920861065387726,
-0.09338109940290451,
0.12468565255403519,
0.3020414412021637,
0.06675659120082855,
-0.08763477951288223,
-0.004923127591609955,
-0.020290318876504898,
-0.07831938564777374,
-0.00499656843021512,
0.04759126529097557,
-0.03983338549733162,
-0.006518926005810499,
0.17268610000610352,
0.1717444211244583,
-0.05411343276500702,
-0.05793454125523567,
0.056822746992111206,
-0.1748509705066681,
0.04928841069340706,
-0.12469915300607681,
-0.03013436123728752,
-0.013277523219585419,
-0.031226594001054764,
0.21403971314430237,
-0.1437465250492096,
0.15608753263950348,
0.06843039393424988,
-0.021401839330792427,
-0.20436041057109833,
-0.08488836884498596,
0.08662925660610199,
0.038085609674453735,
0.11302226781845093,
0.0468415841460228,
-0.011175713501870632,
-0.008542194031178951,
0.12168213725090027,
0.039301712065935135,
-0.16263410449028015,
0.14075712859630585,
0.04830354079604149,
0.13775423169136047,
0.02222977764904499,
0.12826335430145264,
0.0746527910232544,
0.04652395471930504,
0.03000478819012642,
-0.14688880741596222,
-0.02107485942542553,
-0.22006183862686157,
0.14465095102787018,
-0.031129581853747368,
-0.058006033301353455,
0.02508697099983692,
0.03433166816830635,
-0.08423005789518356,
0.09333287924528122,
0.00962547305971384,
0.027273278683423996,
7.945430344259295e-35,
0.06121956184506416,
-0.102666474878788,
0.10056639462709427,
-0.19936370849609375,
0.04825173690915108,
-0.060943279415369034,
0.12307646870613098,
-0.01701325736939907,
0.09728651493787766,
-0.17626436054706573,
0.023030294105410576
] |
https://github.com/huggingface/datasets/issues/5913 | I tried to load a custom dataset using the following statement: dataset = load_dataset('json', data_files=data_files). The dataset contains 50 million text-image pairs, but an error occurred. | > Thanks for reporting, @cjt222.
>
> What is the structure of your JSON files. Please note that it is normally simpler if the data file format is JSON-Lines instead.
Thanks! I have encountered similar problems. I modify the json format from list to line and works! | ### Describe the bug
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
Downloading and preparing dataset json/default to /home/kas/diffusers/examples/dreambooth/cache_data/datasets/json/default-acf423d8c6ef99d0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 84.35it/s]
Extracting data files: 0%| | 0/1 [00:00<?, ?it/s] for _, table in generator:
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 114, in _generate_tables
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
File "pyarrow/_json.pyx", line 258, in pyarrow._json.read_json
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 27.72it/s]
Generating train split: 0 examples [00:00, ? examples/s] File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 125, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2390448764
### Steps to reproduce the bug
1、data_files = ["1.json", "2.json", "3.json"]
2、dataset = load_dataset('json', data_files=data_files)
### Expected behavior
Read the dataset normally.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 1.3.5 | 47 | I tried to load a custom dataset using the following statement: dataset = load_dataset('json', data_files=data_files). The dataset contains 50 million text-image pairs, but an error occurred.
### Describe the bug
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
Downloading and preparing dataset json/default to /home/kas/diffusers/examples/dreambooth/cache_data/datasets/json/default-acf423d8c6ef99d0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 84.35it/s]
Extracting data files: 0%| | 0/1 [00:00<?, ?it/s] for _, table in generator:
File "/home/kas/.conda/envs/diffusers/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 114, in _generate_tables
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
File "pyarrow/_json.pyx", line 258, in pyarrow._json.read_json
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 27.72it/s]
Generating train split: 0 examples [00:00, ? examples/s] File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 125, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2390448764
### Steps to reproduce the bug
1、data_files = ["1.json", "2.json", "3.json"]
2、dataset = load_dataset('json', data_files=data_files)
### Expected behavior
Read the dataset normally.
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 1.3.5
> Thanks for reporting, @cjt222.
>
> What is the structure of your JSON files. Please note that it is normally simpler if the data file format is JSON-Lines instead.
Thanks! I have encountered similar problems. I modify the json format from list to line and works! | [
0.06496935337781906,
0.1526070237159729,
-0.018914097920060158,
0.0643303170800209,
0.23263177275657654,
0.04562734439969063,
0.08029908686876297,
0.05003545060753822,
0.008796540088951588,
0.21689139306545258,
-0.10407805442810059,
-0.09480634331703186,
-0.030902089551091194,
-0.05737153813242912,
0.005916827358305454,
-0.019445577636361122,
-0.04779611527919769,
0.07555562257766724,
0.145523801445961,
0.026832586154341698,
-0.0896216630935669,
-0.010058223269879818,
0.13049153983592987,
-0.11851032078266144,
-0.064210906624794,
-0.08041513711214066,
-0.07010439038276672,
0.18853764235973358,
0.06149202212691307,
-0.18036378920078278,
0.12058565020561218,
-0.06360901892185211,
0.0004238056135363877,
0.1485067903995514,
0.000005527646862901747,
0.009483038447797298,
0.1083829328417778,
0.0672263652086258,
-0.14558649063110352,
-0.07806321978569031,
0.14107955992221832,
-0.11795652657747269,
-0.059171780943870544,
-0.022353671491146088,
0.09392428398132324,
-0.10970467329025269,
-0.0921756699681282,
0.04345684498548508,
0.018814248964190483,
0.1671086549758911,
-0.024496782571077347,
0.01249595545232296,
-0.05063174292445183,
-0.21941524744033813,
0.10552483797073364,
-0.058956362307071686,
0.08524531126022339,
0.1319856494665146,
-0.14184369146823883,
-0.10096137225627899,
-0.08343386650085449,
-0.20633205771446228,
-0.010799916461110115,
0.07627784460783005,
-0.13942576944828033,
0.010742493905127048,
-0.09777754545211792,
-0.10408046096563339,
0.028300952166318893,
0.2966930866241455,
0.05117836967110634,
0.13523799180984497,
-0.07890742272138596,
-0.06358339637517929,
-0.00661090575158596,
-0.0559467151761055,
-0.005542275030165911,
0.04062343388795853,
-0.24478964507579803,
0.08329042792320251,
-0.05393204092979431,
0.061859652400016785,
0.011370781809091568,
-0.0009633665904402733,
-0.23665380477905273,
0.005356065928936005,
-0.16175691783428192,
0.05379021167755127,
-0.025370752438902855,
-0.014785743318498135,
0.06051473319530487,
0.06958385556936264,
-0.11863008141517639,
-0.22969579696655273,
0.09312722086906433,
0.10704929381608963,
-0.027845634147524834,
-0.20942261815071106,
0.03901864215731621,
-0.10670915246009827,
-0.08609824627637863,
-0.09656235575675964,
0.008047198876738548,
0.1783801019191742,
0.17683236300945282,
-0.02031104639172554,
-0.16209349036216736,
-0.06215706840157509,
0.0053978851065039635,
-0.026648182421922684,
-0.040839873254299164,
0.18977561593055725,
-0.29570072889328003,
-0.05529426038265228,
0.09754731506109238,
-0.029377449303865433,
0.0900653675198555,
0.13184426724910736,
0.0800301656126976,
0.06236857920885086,
0.0236586295068264,
0.05969879776239395,
-0.06175672635436058,
0.09334170073270798,
0.014145576395094395,
-0.05073902755975723,
-0.07420472800731659,
0.04981815442442894,
-0.08681263029575348,
-0.03035776875913143,
0.0011230555828660727,
-0.09218204766511917,
0.036157555878162384,
-0.04110526293516159,
0.14142049849033356,
-0.0907164141535759,
0.01076943427324295,
-0.18211998045444489,
-0.07423794269561768,
-0.021339409053325653,
0.03956243395805359,
-0.12922075390815735,
-0.16846804320812225,
0.13715113699436188,
0.13551323115825653,
0.04402252286672592,
0.04645692557096481,
0.02017475664615631,
0.014969083480536938,
0.07140524685382843,
-0.2859126329421997,
0.0051492913626134396,
-0.210969939827919,
0.06710964441299438,
-0.12938259541988373,
-0.0028579127974808216,
-0.12387719005346298,
-0.044950906187295914,
-0.19880355894565582,
-0.07393092662096024,
0.004390659276396036,
-0.013751087710261345,
-0.042535558342933655,
-0.10518594086170197,
0.1337863653898239,
0.1085159182548523,
-0.04565335065126419,
0.1617140918970108,
0.004981245379894972,
0.0326523631811142,
0.11525724828243256,
-0.019031578674912453,
-0.14936935901641846,
0.031371548771858215,
-0.2316146343946457,
0.13006021082401276,
-0.03719423711299896,
0.10688688606023788,
-0.2728232145309448,
0.09187234193086624,
0.12920913100242615,
-0.14185796678066254,
-0.08182240277528763,
-0.14299121499061584,
0.15569594502449036,
-0.02362395077943802,
0.02944643422961235,
0.017663555219769478,
-0.07710777223110199,
-0.10761471837759018,
0.04122840240597725,
0.06710059195756912,
-0.05684199184179306,
0.009523538872599602,
0.07011548429727554,
-0.14386890828609467,
0.010641152039170265,
-0.08395756781101227,
0.025142069905996323,
-0.19812431931495667,
-0.07555989921092987,
0.08009002357721329,
0.03982412442564964,
0.08614499866962433,
0.04387969523668289,
-0.07159312814474106,
-0.13098719716072083,
0.19189417362213135,
0.021535418927669525,
-0.2710362374782562,
-0.17978759109973907,
0.12037516385316849,
-0.105117566883564,
0.018798241391777992,
-0.15803579986095428,
-0.0023089642636477947,
-0.08771251887083054,
0.11235400289297104,
-0.12556448578834534,
0.14559179544448853,
-0.09999480098485947,
0.038750939071178436,
0.08352571725845337,
-0.002471981570124626,
-0.09882836043834686,
0.024670196697115898,
0.07014183700084686,
-0.06403942406177521,
0.07091986387968063,
0.04635264724493027,
-0.12166505306959152,
-0.12885579466819763,
0.11025487631559372,
0.1728881448507309,
-0.019227376207709312,
-0.04665444418787956,
-0.07331409305334091,
-0.07182248681783676,
-0.06495708227157593,
-0.040887314826250076,
-0.07375507056713104,
0.07011698186397552,
0.008573626168072224,
-0.17266859114170074,
0.041138000786304474,
0.03975888714194298,
-0.02329716458916664,
0.23903632164001465,
-0.0765136331319809,
-0.011194257996976376,
0.34463003277778625,
0.15781289339065552,
-0.07826448231935501,
0.0699036717414856,
0.05808199942111969,
-0.00739354407414794,
0.062016669660806656,
0.16301271319389343,
-0.053531963378190994,
-0.11942972987890244,
0.20920532941818237,
-0.04649197682738304,
0.052524369210004807,
0.040047869086265564,
0.10591037571430206,
-0.1396310031414032,
0.012258336879312992,
-0.10010948032140732,
0.03443837910890579,
0.06602808833122253,
-0.04384352266788483,
-0.020022638142108917,
-0.14476816356182098,
-0.16420556604862213,
-0.04619757831096649,
-0.041218411177396774,
0.04635915160179138,
-0.10863449424505234,
0.0725538358092308,
0.012147481553256512,
-0.05233372002840042,
0.04855101928114891,
0.08520909398794174,
-0.10122579336166382,
0.10752222687005997,
0.05505998805165291,
-0.004297140520066023,
0.08418779820203781,
-0.011482100933790207,
0.05841652676463127,
0.0447707362473011,
0.08547330647706985,
0.03435007482767105,
-0.15733490884304047,
-0.0109092453494668,
-0.047952450811862946,
0.13677869737148285,
-0.017086580395698547,
-0.019717268645763397,
-0.01595451310276985,
-0.1210353747010231,
-0.022323284298181534,
0.03913077339529991,
0.0380614772439003,
0.11988765746355057,
0.09988182038068771,
0.12875598669052124,
0.13046102225780487,
-0.13711139559745789,
0.047520872205495834,
0.03222038596868515,
-0.06219697743654251,
0.03952687978744507,
0.1272563636302948,
0.05032617598772049,
0.06150360405445099,
0.039122581481933594,
-0.18664813041687012,
0.13211838901042938,
0.09421000629663467,
-0.054849330335855484,
0.23486775159835815,
-0.10950370877981186,
0.014772744849324226,
-0.002553092548623681,
0.029811741784214973,
-0.2200329452753067,
-0.11423046141862869,
-0.037577882409095764,
0.14913851022720337,
-0.08779234439134598,
0.06514132767915726,
0.0037119733169674873,
0.06644359230995178,
0.0816005989909172,
-0.20923413336277008,
-0.13299518823623657,
-0.07133416831493378,
0.3020625114440918,
0.045085128396749496,
-0.0718577578663826,
0.04584847018122673,
-0.0767781212925911,
-0.027629323303699493,
0.06702587008476257,
-0.24884702265262604,
0.1133275255560875,
-0.11607719212770462,
0.002176561625674367,
-0.19357627630233765,
-0.026883715763688087,
0.09114816784858704,
0.06812060624361038,
-0.07095600664615631,
-0.010790822096168995,
0.0955606997013092,
-0.15197007358074188,
0.1837741732597351,
-0.08994381874799728,
0.10651412606239319,
0.047579389065504074,
0.044583238661289215,
0.060423195362091064,
-0.06720467656850815,
-0.08069223910570145,
0.13151638209819794,
0.07352929562330246,
0.09234987944364548,
-0.15427735447883606,
-0.09755998849868774,
0.03715640306472778,
-0.1689484715461731,
-0.009517346508800983,
-0.10370925813913345,
0.04501098766922951,
-0.07210255414247513,
-0.04508677124977112,
-0.21472890675067902,
0.05847452953457832,
0.04389325901865959,
0.03730771318078041,
-0.11994078755378723,
-0.04505600035190582,
0.07846177369356155,
0.09179791063070297,
0.0823037251830101,
-0.035350602120161057,
-0.036067891865968704,
-0.1558089554309845,
0.1451192945241928,
0.03626631200313568,
0.08436045050621033,
0.03606272116303444,
0.027642270550131798,
0.01865421235561371,
-0.1658530831336975,
0.2412424236536026,
0.18843162059783936,
0.11786263436079025,
0.022170981392264366,
0.14207175374031067,
0.11761943995952606,
-0.07960376143455505,
0.06608270108699799,
0.13064436614513397,
0.16329410672187805,
-0.02226407453417778,
-0.09963954240083694,
-0.056908220052719116,
-0.02411728911101818,
0.09490816295146942,
0.06243926286697388,
-0.0774407908320427,
0.052984569221735,
0.2328292727470398,
0.17125625908374786,
-0.11048906296491623,
-0.06588443368673325,
-0.1222982108592987,
-0.20582446455955505,
-0.1814274936914444,
-0.24593231081962585,
0.15453630685806274,
0.2763610780239105,
0.05893683806061745,
-0.0428188256919384,
0.048017777502536774,
-0.08559224009513855,
0.12571336328983307,
0.007474018260836601,
-0.030019611120224,
0.01423910353332758,
0.0523231215775013,
-0.04943769797682762,
-0.06833627074956894,
-0.005668157711625099,
0.42479100823402405,
0.03006996214389801,
0.01236817054450512,
0.03241203352808952,
-0.16023002564907074,
-0.008283186703920364,
-0.013792476616799831,
-0.04668636620044708,
0.0006953253177925944,
-0.09254106879234314,
-0.13132260739803314,
-0.0016201954567804933,
0.054624006152153015,
-0.049486927688121796,
-0.20616209506988525,
-0.1975805163383484,
-0.13846637308597565,
-0.16851870715618134,
0.03371120244264603,
-0.013390741311013699,
0.08270688354969025,
-0.12939998507499695,
0.08030738681554794,
0.17334459722042084,
-0.06723618507385254,
-0.06908784806728363,
-0.14858165383338928,
0.03392907977104187,
-0.01124943420290947,
0.09575506299734116,
0.1757861077785492,
-0.16274705529212952,
-0.03895038366317749,
0.13549202680587769,
-0.0438397116959095,
0.10543745756149292,
-0.04234245419502258,
0.006575147155672312,
0.13443796336650848,
0.031051866710186005,
0.01571219600737095,
0.0014581310097128153,
-0.03418240323662758,
0.09106329083442688,
0.13704447448253632,
-0.01451225858181715,
0.18361087143421173,
-0.17488044500350952,
0.012718774378299713,
0.15935562551021576,
-0.04006547853350639,
-0.04335172474384308,
-0.19733396172523499,
-0.09030139446258545,
0.13327614963054657,
-0.0702599585056305,
-0.026486167684197426,
-0.09803356975317001,
0.1140916496515274,
-0.05749865993857384,
-0.05742479860782623,
0.08879481256008148,
0.03828475996851921,
-0.0034276891965419054,
0.007567044347524643,
-0.061571214348077774,
0.03893839195370674,
-0.050437625497579575,
0.025030769407749176,
-0.040905993431806564,
0.00007535509212175384,
-0.04770873486995697,
0.006029595620930195,
-0.07872956991195679,
0.10298766195774078,
0.03883713111281395,
-0.06704317033290863,
0.08622284233570099,
0.12037535756826401,
0.024640347808599472,
-0.08401525765657425,
-0.013985409401357174,
-0.0032881409861147404,
0.10290030390024185,
0.09736224263906479,
-0.06409739702939987,
0.08186856657266617,
-0.05932510644197464,
0.033509980887174606,
0.11029330641031265,
-0.03542892262339592,
0.0992845818400383,
0.12776388227939606,
0.09811698645353317,
0.11591631174087524,
0.09534059464931488,
0.3046448826789856,
0.08641371130943298,
-0.06690244376659393,
0.16585509479045868,
0.14219196140766144,
-0.24952535331249237,
-0.013504067435860634,
0.10713612288236618,
0.004315318074077368,
-0.2344728708267212,
-0.052543073892593384,
0.1486765444278717,
0.1065371111035347,
0.18771560490131378,
-0.016573602333664894,
-0.030410736799240112,
-0.06253060698509216,
-0.07184358686208725,
-0.0024943160824477673,
0.15363125503063202,
-0.004524637944996357,
-0.048513635993003845,
0.06979241222143173,
-2.5804114034624994e-32,
-0.04342775419354439,
-0.07043832540512085,
-0.005287801846861839,
-0.08941396325826645,
-0.060738757252693176,
0.0689035952091217,
-0.014250888489186764,
-0.05771069973707199,
0.025844436138868332,
-0.0540681891143322,
-0.10167866200208664,
-0.058191459625959396,
0.02344440296292305,
0.04483377933502197,
-0.05579152703285217,
-0.002992107532918453,
-0.058284591883420944,
-0.09277956932783127,
0.06175442785024643,
0.013334226794540882,
0.0007835481665097177,
0.07346177101135254,
-0.08453233540058136,
-0.07041572034358978,
-0.005130679812282324,
0.019166970625519753,
-0.025589529424905777,
-0.13238553702831268,
0.15714338421821594,
-0.014591723680496216,
-0.07114768773317337,
0.07509128749370575,
0.0913877934217453,
-0.11161183565855026,
-0.10796415060758591,
0.0007471252465620637,
-0.1684829443693161,
-0.07659440487623215,
0.05668707937002182,
0.09080956131219864,
-0.07069066166877747,
0.0703619047999382,
0.11782961338758469,
-0.21172204613685608,
0.03262116387486458,
0.09356696903705597,
0.04923446103930473,
-0.04431624338030815,
-0.1429411768913269,
-0.027884885668754578,
0.07259418070316315,
0.02060258574783802,
0.022075198590755463,
0.0751902163028717,
0.05672478675842285,
-0.12069571763277054,
-0.02302466705441475,
0.17182712256908417,
-0.05548085272312164,
-0.16896383464336395,
0.10293161869049072,
-0.08049322664737701,
-0.033501747995615005,
-0.05372168868780136,
0.1298900991678238,
-0.032216403633356094,
0.35084268450737,
0.03245187923312187,
0.023372754454612732,
-0.084850013256073,
0.1000615805387497,
0.149717316031456,
-0.1558341234922409,
0.0667123794555664,
0.02123286761343479,
-0.053499944508075714,
-0.14123012125492096,
0.013843630440533161,
-0.036102294921875,
-0.10108935087919235,
0.07772201299667358,
0.0004293571982998401,
-0.07380808144807816,
0.07422833889722824,
0.004364599473774433,
0.022569961845874786,
-0.07648089528083801,
-0.01579725556075573,
-0.1106572225689888,
-0.13377730548381805,
-0.014213619753718376,
0.016618063673377037,
-0.11353664845228195,
-0.17845039069652557,
-0.10487768799066544,
0.11108367145061493,
-0.11593553423881531,
0.03641192987561226,
-0.10799459367990494,
0.09451913088560104,
-0.11160658299922943,
-0.07142803072929382,
0.057131119072437286,
0.009144442155957222,
0.21479441225528717,
0.10723743587732315,
0.1402595192193985,
-0.00006463420868385583,
-0.2366432249546051,
-0.06190139427781105,
-0.07711920142173767,
0.025663400068879128,
0.15396364033222198,
0.13486544787883759,
0.21066904067993164,
0.09504804760217667,
-0.1192859634757042,
-0.10705457627773285,
0.1522645205259323,
0.13113103806972504,
-0.1438113898038864,
-0.08536198735237122,
-0.06609068810939789,
-0.06902802735567093,
-0.017095861956477165,
0.12303749471902847,
-0.1624811738729477,
-0.0630853921175003,
-0.0018309401348233223,
0.05681212991476059,
0.019196297973394394,
-0.0602816678583622,
7.523995009250939e-7,
-0.31613415479660034,
0.19165654480457306,
0.011925849132239819,
0.07720596343278885,
0.036599740386009216,
0.03435835614800453,
-0.3547042906284332,
0.15920861065387726,
-0.09338109940290451,
0.12468565255403519,
0.3020414412021637,
0.06675659120082855,
-0.08763477951288223,
-0.004923127591609955,
-0.020290318876504898,
-0.07831938564777374,
-0.00499656843021512,
0.04759126529097557,
-0.03983338549733162,
-0.006518926005810499,
0.17268610000610352,
0.1717444211244583,
-0.05411343276500702,
-0.05793454125523567,
0.056822746992111206,
-0.1748509705066681,
0.04928841069340706,
-0.12469915300607681,
-0.03013436123728752,
-0.013277523219585419,
-0.031226594001054764,
0.21403971314430237,
-0.1437465250492096,
0.15608753263950348,
0.06843039393424988,
-0.021401839330792427,
-0.20436041057109833,
-0.08488836884498596,
0.08662925660610199,
0.038085609674453735,
0.11302226781845093,
0.0468415841460228,
-0.011175713501870632,
-0.008542194031178951,
0.12168213725090027,
0.039301712065935135,
-0.16263410449028015,
0.14075712859630585,
0.04830354079604149,
0.13775423169136047,
0.02222977764904499,
0.12826335430145264,
0.0746527910232544,
0.04652395471930504,
0.03000478819012642,
-0.14688880741596222,
-0.02107485942542553,
-0.22006183862686157,
0.14465095102787018,
-0.031129581853747368,
-0.058006033301353455,
0.02508697099983692,
0.03433166816830635,
-0.08423005789518356,
0.09333287924528122,
0.00962547305971384,
0.027273278683423996,
7.945430344259295e-35,
0.06121956184506416,
-0.102666474878788,
0.10056639462709427,
-0.19936370849609375,
0.04825173690915108,
-0.060943279415369034,
0.12307646870613098,
-0.01701325736939907,
0.09728651493787766,
-0.17626436054706573,
0.023030294105410576
] |
https://github.com/huggingface/datasets/issues/5912 | Missing elements in `map` a batched dataset | Hi ! in your code batching is **only used within** `map`, to process examples in batch. The dataset itself however is not batched and returns elements one by one.
To iterate on batches, you can do
```python
for batch in dataset.iter(batch_size=8):
...
``` | ### Describe the bug
As outlined [here](https://discuss.huggingface.co/t/length-error-using-map-with-datasets/40969/3?u=sachin), the following collate function drops 5 out of possible 6 elements in the batch (it is 6 because out of the eight, two are bad links in laion). A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here.
The weirdest part is when inspecting the sizes of the tensors as shown below, both `tokenized_captions["input_ids"]` and `image_features` show the correct shapes. Simply the output only has one element (with the batch dimension squeezed out).
```python
class CollateFn:
def get_image(self, url):
try:
response = requests.get(url)
return Image.open(io.BytesIO(response.content)).convert("RGB")
except PIL.UnidentifiedImageError:
logger.info(f"Reading error: Could not transform f{url}")
return None
except requests.exceptions.ConnectionError:
logger.info(f"Connection error: Could not transform f{url}")
return None
def __call__(self, batch):
images = [self.get_image(url) for url in batch["url"]]
captions = [caption for caption, image in zip(batch["caption"], images) if image is not None]
images = [image for image in images if image is not None]
tokenized_captions = tokenizer(
captions,
padding="max_length",
truncation=True,
max_length=tokenizer.model_max_length,
return_tensors="pt",
)
image_features = torch.stack([torch.Tensor(feature_extractor(image)["pixel_values"][0]) for image in images])
# import pdb; pdb.set_trace()
return {"input_ids": tokenized_captions["input_ids"], "images": image_features}
collate_fn = CollateFn()
laion_ds = datasets.load_dataset("laion/laion400m", split="train", streaming=True)
laion_ds_batched = laion_ds.map(collate_fn, batched=True, batch_size=8, remove_columns=next(iter(laion_ds)).keys())
```
### Steps to reproduce the bug
A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here.
### Expected behavior
Would expect `next(iter(laion_ds_batched))` to produce two tensors of shape `(batch_size, 77)` and `batch_size, image_shape`.
### Environment info
datasets==2.12.0
python==3.10 | 43 | Missing elements in `map` a batched dataset
### Describe the bug
As outlined [here](https://discuss.huggingface.co/t/length-error-using-map-with-datasets/40969/3?u=sachin), the following collate function drops 5 out of possible 6 elements in the batch (it is 6 because out of the eight, two are bad links in laion). A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here.
The weirdest part is when inspecting the sizes of the tensors as shown below, both `tokenized_captions["input_ids"]` and `image_features` show the correct shapes. Simply the output only has one element (with the batch dimension squeezed out).
```python
class CollateFn:
def get_image(self, url):
try:
response = requests.get(url)
return Image.open(io.BytesIO(response.content)).convert("RGB")
except PIL.UnidentifiedImageError:
logger.info(f"Reading error: Could not transform f{url}")
return None
except requests.exceptions.ConnectionError:
logger.info(f"Connection error: Could not transform f{url}")
return None
def __call__(self, batch):
images = [self.get_image(url) for url in batch["url"]]
captions = [caption for caption, image in zip(batch["caption"], images) if image is not None]
images = [image for image in images if image is not None]
tokenized_captions = tokenizer(
captions,
padding="max_length",
truncation=True,
max_length=tokenizer.model_max_length,
return_tensors="pt",
)
image_features = torch.stack([torch.Tensor(feature_extractor(image)["pixel_values"][0]) for image in images])
# import pdb; pdb.set_trace()
return {"input_ids": tokenized_captions["input_ids"], "images": image_features}
collate_fn = CollateFn()
laion_ds = datasets.load_dataset("laion/laion400m", split="train", streaming=True)
laion_ds_batched = laion_ds.map(collate_fn, batched=True, batch_size=8, remove_columns=next(iter(laion_ds)).keys())
```
### Steps to reproduce the bug
A reproducible [kaggle kernel ](https://www.kaggle.com/sachin/laion-hf-dataset/edit) can be found here.
### Expected behavior
Would expect `next(iter(laion_ds_batched))` to produce two tensors of shape `(batch_size, 77)` and `batch_size, image_shape`.
### Environment info
datasets==2.12.0
python==3.10
Hi ! in your code batching is **only used within** `map`, to process examples in batch. The dataset itself however is not batched and returns elements one by one.
To iterate on batches, you can do
```python
for batch in dataset.iter(batch_size=8):
...
``` | [
0.22559095919132233,
0.061816148459911346,
-0.1318882703781128,
0.14059703052043915,
0.08976446092128754,
0.015750007703900337,
0.17346079647541046,
0.05874180793762207,
-0.12725649774074554,
0.16456396877765656,
0.1907046139240265,
-0.06211863085627556,
0.017335353419184685,
-0.12183184921741486,
0.02074969932436943,
-0.07603807002305984,
0.016933899372816086,
0.009804384782910347,
0.02699993923306465,
-0.09202590584754944,
-0.21304190158843994,
0.06316718459129333,
0.07603660225868225,
-0.08854939043521881,
-0.17240111529827118,
0.04814054071903229,
-0.21133653819561005,
-0.06228815019130707,
-0.13383103907108307,
0.04406498000025749,
0.1256362795829773,
-0.021543458104133606,
-0.1213764026761055,
-0.04385910555720329,
0.000005574265742325224,
0.007638288661837578,
0.12218286097049713,
-0.08755183219909668,
0.20881417393684387,
-0.13644957542419434,
0.04449347034096718,
-0.09066590666770935,
-0.06767483055591583,
-0.04491739720106125,
0.018156275153160095,
0.03522498905658722,
0.03328482806682587,
0.03413928300142288,
-0.02452412061393261,
0.019003771245479584,
0.05632195621728897,
0.020832311362028122,
0.06377175450325012,
-0.02125699631869793,
0.14323553442955017,
0.050585582852363586,
0.0012443425366654992,
-0.07035094499588013,
-0.06850168853998184,
-0.002502150135114789,
0.16356027126312256,
-0.021208781749010086,
0.07701669633388519,
0.10748559981584549,
-0.1334541290998459,
0.14075341820716858,
-0.05385236442089081,
-0.341368168592453,
-0.03240445628762245,
0.035996969789266586,
-0.09846371412277222,
0.08875186741352081,
-0.06476833671331406,
0.05424587056040764,
0.10193411260843277,
-0.2081376165151596,
-0.08461558818817139,
0.23168101906776428,
0.0014469134621322155,
0.08612916618585587,
-0.07353008538484573,
0.12233969569206238,
-0.019244926050305367,
-0.0030141975730657578,
-0.11758463084697723,
-0.030019203200936317,
-0.13162831962108612,
0.01761631853878498,
-0.302268385887146,
0.04507559910416603,
-0.06764581054449081,
-0.03398186340928078,
-0.015785161405801773,
0.050196681171655655,
0.06729166954755783,
0.030856801196932793,
0.0018506709020584822,
-0.2455185353755951,
0.17757456004619598,
-0.07217848300933838,
-0.1614285111427307,
-0.16158807277679443,
-0.16349869966506958,
0.06962794065475464,
-0.035928934812545776,
0.08698024600744247,
0.010020163841545582,
0.06089578941464424,
-0.015241635031998158,
-0.06794445216655731,
0.09924646466970444,
0.01447801012545824,
-0.07821600884199142,
0.11127983778715134,
0.028333384543657303,
-0.03253400698304176,
0.07219883054494858,
0.07288014888763428,
-0.004503580741584301,
0.12371035665273666,
-0.03524260222911835,
0.25141793489456177,
-0.16908404231071472,
0.013693143613636494,
-0.08424437046051025,
0.15762139856815338,
0.12080585211515427,
0.11027287691831589,
0.057655248790979385,
-0.03459871932864189,
-0.039805322885513306,
-0.08121804893016815,
-0.09315391629934311,
-0.015717295929789543,
-0.03160368651151657,
-0.0044691250659525394,
0.06954047083854675,
-0.05756746977567673,
-0.04423333331942558,
-0.01959257386624813,
-0.09175680577754974,
-0.28629305958747864,
0.16873399913311005,
0.04125381261110306,
0.24335719645023346,
0.10003829002380371,
0.1491498202085495,
0.03963428735733032,
0.08527851849794388,
0.07925672829151154,
-0.223732128739357,
0.23379236459732056,
-0.147250697016716,
0.03938239812850952,
-0.053280092775821686,
0.05721665546298027,
-0.10819234699010849,
-0.17226950824260712,
-0.13042877614498138,
-0.008626045659184456,
0.06376992166042328,
-0.03733855485916138,
0.04709714278578758,
-0.16773369908332825,
0.040919940918684006,
-0.0535115972161293,
0.06503153592348099,
-0.16306650638580322,
0.0015857176622375846,
0.09344100952148438,
0.20024509727954865,
0.09527689218521118,
0.043487828224897385,
0.064326211810112,
-0.23597149550914764,
0.183206707239151,
-0.02323068119585514,
0.07027719169855118,
-0.052999988198280334,
-0.05295481160283089,
0.020079346373677254,
0.05232322961091995,
-0.2649690508842468,
-0.112681083381176,
0.2924058139324188,
0.08770156651735306,
0.2734251022338867,
0.033491481095552444,
-0.04686499387025833,
0.055971626192331314,
0.04322276636958122,
0.014546968974173069,
0.02373233251273632,
-0.2762625515460968,
0.18185383081436157,
-0.02664218470454216,
0.022664431482553482,
-0.1277064085006714,
-0.07343641668558121,
-0.2685629725456238,
0.15819333493709564,
0.07634326070547104,
0.17350980639457703,
0.07051541656255722,
0.00834245141595602,
0.10823516547679901,
-0.09946846961975098,
0.20705847442150116,
0.0064645432867109776,
-0.00020220135047566146,
-0.12788085639476776,
0.026526926085352898,
-0.02164420485496521,
0.08883477747440338,
-0.06629091501235962,
0.052955154329538345,
0.08121021091938019,
-0.022576624527573586,
-0.0952000617980957,
0.026091385632753372,
0.045248162001371384,
-0.12422390282154083,
0.04357961565256119,
0.01533530279994011,
0.10957349836826324,
0.1660010665655136,
-0.09250246733427048,
-0.052895113825798035,
0.030615519732236862,
0.16637995839118958,
-0.03183009847998619,
0.05002027377486229,
0.21448762714862823,
-0.07580535113811493,
-0.055739596486091614,
-0.013912232592701912,
-0.09935354441404343,
-0.20391634106636047,
0.23385228216648102,
0.017812546342611313,
-0.13326789438724518,
-0.05276603624224663,
-0.04906861484050751,
-0.11955349892377853,
0.2538518011569977,
-0.003255058079957962,
0.13002730906009674,
-0.011889886111021042,
0.05425244942307472,
-0.08105673640966415,
-0.012457764707505703,
-0.018672440201044083,
-0.013306474313139915,
0.06908686459064484,
0.08746679872274399,
-0.09326563775539398,
-0.06285491585731506,
0.07103113830089569,
-0.04859504476189613,
0.08502791076898575,
0.2514297068119049,
-0.14621256291866302,
-0.07291217893362045,
-0.07111551612615585,
0.08231855928897858,
-0.14115777611732483,
0.010853640735149384,
-0.12198789417743683,
-0.057647623121738434,
0.07262338697910309,
0.07190749794244766,
-0.13314247131347656,
0.026036428287625313,
0.06681425869464874,
-0.15642331540584564,
-0.08989474922418594,
-0.1765335351228714,
0.06157810240983963,
0.09361062198877335,
0.15063050389289856,
-0.1273411512374878,
0.08714630454778671,
0.03907303139567375,
-0.09725026041269302,
0.049190275371074677,
-0.031189952045679092,
-0.25298598408699036,
-0.1331845074892044,
-0.13282227516174316,
0.09808754920959473,
0.0618857815861702,
-0.15666508674621582,
-0.00428535183891654,
-0.16006013751029968,
-0.06271153688430786,
-0.1601414531469345,
-0.0817708745598793,
-0.04245305433869362,
0.09981433302164078,
-0.08279330283403397,
-0.14703567326068878,
0.17624948918819427,
-0.10529349744319916,
-0.05956508219242096,
-0.10864157229661942,
-0.09548711031675339,
0.13116337358951569,
0.13049505650997162,
-0.20690274238586426,
-0.1668071150779724,
-0.057790350168943405,
-0.016246363520622253,
-0.10955497622489929,
0.0108159389346838,
0.07426230609416962,
0.11518056690692902,
-0.004806440323591232,
-0.08089055120944977,
0.08166944980621338,
0.09282397478818893,
-0.028302432969212532,
0.04657579958438873,
-0.011298301629722118,
-0.16924558579921722,
-0.060596536844968796,
-0.06569525599479675,
0.038242846727371216,
-0.16392889618873596,
-0.03334930166602135,
0.1489555835723877,
0.04832380637526512,
0.015778357163071632,
-0.11500115692615509,
-0.26728567481040955,
0.10905667394399643,
-0.1626802384853363,
-0.07736384868621826,
0.04496924579143524,
0.3099210262298584,
-0.00802151020616293,
-0.05205162614583969,
-0.06603381782770157,
-0.09018183499574661,
0.09240899235010147,
0.10586470365524292,
-0.18030835688114166,
-0.062469203025102615,
0.14827892184257507,
-0.0778084322810173,
-0.04233703762292862,
0.009036355651915073,
-0.016709208488464355,
0.0032123043201863766,
0.03305234760046005,
-0.03706987947225571,
0.13451096415519714,
-0.16671571135520935,
0.0806366503238678,
0.1621464341878891,
-0.06417878717184067,
0.11843199282884598,
0.1727306991815567,
0.16415168344974518,
-0.011508848518133163,
-0.0446588359773159,
0.16546717286109924,
-0.022923409938812256,
0.17564420402050018,
-0.06905043870210648,
-0.08375398814678192,
0.10939572751522064,
0.04382101446390152,
0.09936338663101196,
0.08062215149402618,
-0.057705506682395935,
0.08547162264585495,
0.026076048612594604,
0.018931474536657333,
-0.015300911851227283,
-0.09010078758001328,
-0.06015750393271446,
-0.05805767700076103,
-0.02382834255695343,
0.15174581110477448,
0.07137153297662735,
-0.014084541238844395,
0.05247035250067711,
0.008851238526403904,
-0.2368689626455307,
0.05557233840227127,
0.12127605825662613,
0.09248872846364975,
-0.25449448823928833,
-0.07433266937732697,
0.03979915380477905,
-0.052590880542993546,
0.3280477821826935,
0.17283865809440613,
0.0707031637430191,
-0.02758248709142208,
0.20389999449253082,
0.23278360068798065,
-0.03370669484138489,
-0.14090947806835175,
0.04790256544947624,
0.05799684301018715,
-0.053303372114896774,
-0.03313065320253372,
0.034311696887016296,
-0.016522672027349472,
0.18086418509483337,
0.24779081344604492,
0.11340385675430298,
0.04603354632854462,
0.04549811780452728,
-0.010278522036969662,
-0.01791532337665558,
0.06435804069042206,
0.07682737708091736,
-0.26371094584465027,
-0.09603891521692276,
-0.1934465914964676,
0.20534271001815796,
0.17976276576519012,
-0.07417327910661697,
-0.29605573415756226,
0.05050709843635559,
-0.15474480390548706,
0.09002271294593811,
-0.018534069880843163,
0.11291895061731339,
0.04405426234006882,
0.050072647631168365,
0.07490784674882889,
0.046451225876808167,
0.12616558372974396,
0.23828907310962677,
-0.09410420805215836,
0.020444286987185478,
0.14096277952194214,
-0.29298508167266846,
0.07140349596738815,
0.059527438133955,
-0.10721805691719055,
0.04087039828300476,
-0.01786997728049755,
-0.04963570088148117,
0.12212154269218445,
0.09874039888381958,
0.09168285131454468,
-0.18335825204849243,
-0.1072704866528511,
0.09495341777801514,
-0.2849521338939667,
-0.03934534266591072,
0.03137190267443657,
0.1389320194721222,
-0.20828349888324738,
-0.014600415714085102,
0.08551974594593048,
0.018145445734262466,
-0.06605285406112671,
-0.041904523968696594,
0.003662626026198268,
0.05434365198016167,
-0.0697845071554184,
0.2644939422607422,
-0.029499055817723274,
0.10263979434967041,
-0.022503601387143135,
-0.08030541986227036,
0.0494217723608017,
0.07294898480176926,
-0.08171968907117844,
0.052899252623319626,
-0.10463211685419083,
0.1494961678981781,
0.15522339940071106,
0.13046836853027344,
0.1291801929473877,
0.04951437562704086,
0.1702607423067093,
-0.1618008017539978,
0.12032625824213028,
0.0075186085887253284,
0.22008618712425232,
0.07441873103380203,
-0.10672765970230103,
-0.03704927861690521,
-0.1485103964805603,
-0.013477829284965992,
0.09331157058477402,
0.12792392075061798,
-0.21418331563472748,
0.1787615865468979,
0.02207455039024353,
0.10933995246887207,
-0.19760283827781677,
0.12934193015098572,
-0.009726817719638348,
0.1389489620923996,
-0.04089701175689697,
0.05048400163650513,
0.038368966430425644,
-0.03865506500005722,
-0.1307377815246582,
0.05987914279103279,
0.0037842276506125927,
0.03461963310837746,
-0.12466718256473541,
-0.08883387595415115,
0.03901444002985954,
0.10503280907869339,
-0.02469625324010849,
-0.005849043373018503,
-0.1017671748995781,
-0.1246865838766098,
-0.023062145337462425,
-0.004380957223474979,
-0.005263734608888626,
0.08026960492134094,
-0.13382422924041748,
-0.0416145958006382,
-0.02290092408657074,
0.15535762906074524,
0.03192481771111488,
-0.09971410781145096,
-0.15638311207294464,
0.14317439496517181,
0.08173011988401413,
0.02605220302939415,
0.15537674725055695,
0.05220669135451317,
0.00875038281083107,
0.03248022124171257,
0.09453154355287552,
-0.03360896557569504,
0.05762181431055069,
-0.015431221574544907,
-0.0958012044429779,
0.0035802859347313643,
-0.21903814375400543,
-0.08601456880569458,
0.05282645300030708,
-0.013361799530684948,
0.03221725672483444,
-0.12425848841667175,
0.09459523111581802,
-0.09371016174554825,
-0.05525956302881241,
0.02010013721883297,
-0.027676988393068314,
0.017254455015063286,
0.010275387205183506,
0.0029076288919895887,
-2.4655388628906807e-32,
-0.1411827951669693,
-0.22622160613536835,
-0.018258582800626755,
-0.04207681864500046,
-0.033384229987859726,
0.18431280553340912,
-0.01894570328295231,
0.051010724157094955,
-0.07798827439546585,
0.03561864793300629,
0.06922819465398788,
-0.11275658756494522,
0.025930853560566902,
0.15342657268047333,
0.20320089161396027,
-0.0315735824406147,
0.026855187490582466,
0.05854867398738861,
0.07843922078609467,
0.11083711683750153,
0.06928054988384247,
0.07415760308504105,
0.0593322329223156,
0.05946097895503044,
0.0320843905210495,
0.20622164011001587,
-0.10408517718315125,
-0.059722427278757095,
0.12912145256996155,
-0.04710272699594498,
-0.07317350804805756,
0.22642792761325836,
0.0199611596763134,
0.08663258701562881,
-0.08934834599494934,
-0.1341656595468521,
-0.21336868405342102,
0.04336163401603699,
-0.013345322571694851,
-0.003564679529517889,
0.11970847100019455,
-0.00307440641336143,
0.008181419223546982,
-0.2260361760854721,
0.15074363350868225,
0.06794014573097229,
-0.0030727116391062737,
0.07115683704614639,
-0.09699276089668274,
0.11203819513320923,
0.12836027145385742,
-0.025247137993574142,
0.027182113379240036,
0.09239079803228378,
-0.02550004981458187,
-0.055912915617227554,
0.0754423439502716,
0.1410578340291977,
-0.08712520450353622,
0.053282469511032104,
0.06119946017861366,
0.03187420219182968,
0.21707716584205627,
-0.04310597479343414,
0.03837619721889496,
-0.019512783735990524,
0.2080944925546646,
0.0746874064207077,
-0.06948776543140411,
0.010287399403750896,
-0.0506168007850647,
0.07577962428331375,
-0.14841708540916443,
-0.08087235689163208,
-0.22218599915504456,
-0.07492008060216904,
0.00681304931640625,
-0.00410839170217514,
-0.1627315729856491,
0.015102303586900234,
0.01210425142198801,
0.03809213638305664,
0.03279055655002594,
-0.0898832306265831,
-0.08232574164867401,
-0.08250849694013596,
0.02565622329711914,
0.020762858912348747,
-0.06569170206785202,
0.11683797836303711,
-0.1140042394399643,
0.0037969525437802076,
-0.04861419275403023,
-0.0890718549489975,
-0.1420833170413971,
-0.00636124424636364,
-0.061947841197252274,
-0.023616693913936615,
-0.21012866497039795,
-0.08327528089284897,
0.014241449534893036,
-0.07208810746669769,
0.10869357734918594,
0.012976966798305511,
0.039098840206861496,
0.007350295782089233,
0.08409305661916733,
0.002582259476184845,
0.005091042257845402,
-0.14270293712615967,
-0.19208557903766632,
-0.030284937471151352,
0.10307709127664566,
0.09039786458015442,
0.03542671725153923,
0.03219088539481163,
-0.08018636703491211,
-0.08788226544857025,
0.15476259589195251,
0.21745161712169647,
0.0786832645535469,
-0.03892587125301361,
-0.2825236916542053,
-0.21189358830451965,
-0.07246903330087662,
-0.046556148678064346,
-0.2784481942653656,
0.033020682632923126,
0.13325761258602142,
0.003674151375889778,
-0.008785875514149666,
0.032650358974933624,
7.072590619827679e-7,
-0.16347239911556244,
0.01786969229578972,
0.0716603472828865,
-0.19572173058986664,
0.031165773048996925,
0.1766897737979889,
-0.18233118951320648,
0.15438668429851532,
-0.1380930244922638,
0.20253968238830566,
0.07735184580087662,
-0.2219112515449524,
0.022455966100096703,
-0.1355758160352707,
0.038964904844760895,
-0.05700474977493286,
-0.08836783468723297,
-0.12299297749996185,
-0.19571872055530548,
0.08645068854093552,
-0.1568189263343811,
0.15644827485084534,
0.05996353551745415,
-0.13731041550636292,
0.1211937740445137,
-0.0897892564535141,
-0.2331981360912323,
0.007468454539775848,
-0.05048186331987381,
-0.12508004903793335,
0.02136986143887043,
0.12785108387470245,
0.1275075227022171,
-0.03316684812307358,
-0.08333155512809753,
0.0840490311384201,
0.09461171925067902,
-0.046027690172195435,
0.06894548237323761,
0.013164152391254902,
-0.07985145598649979,
-0.07996992021799088,
0.094213105738163,
-0.22540749609470367,
0.007097063586115837,
0.1175636425614357,
0.10557462275028229,
0.02764851041138172,
-0.14110207557678223,
0.18908149003982544,
-0.03534851595759392,
0.07408455014228821,
0.16539715230464935,
0.17950330674648285,
-0.03972241282463074,
-0.11908800899982452,
0.10257051140069962,
-0.14352750778198242,
0.03918466344475746,
-0.18785536289215088,
-0.14899279177188873,
-0.10203354805707932,
-0.11192729324102402,
0.10503573715686798,
0.18136447668075562,
-0.07816734164953232,
-0.061400435864925385,
5.36708909655119e-35,
-0.17139208316802979,
-0.02962964028120041,
0.05077723413705826,
-0.22866342961788177,
0.07580047100782394,
-0.03418906778097153,
0.10000088065862656,
0.09814530611038208,
-0.04460172727704048,
-0.07179667800664902,
-0.03604679927229881
] |
https://github.com/huggingface/datasets/issues/5910 | Cannot use both set_format and set_transform | Currently, it's not possible to chain `set_format`/`set_transform` calls (plus, this is a breaking change if we decide to implement it), so I see two possible solutions:
* using `set_format`/`set_transform` for the 1st transform and then passing the transformed example/batch to the 2nd transform
* implementing and registering a custom formatter (the relevant code is [here](https://github.com/huggingface/datasets/tree/main/src/datasets/formatting))
Btw, your example requires a single `set_format` call:
```python
ds.set_format("torch", columns=["image"], output_all_columns=True, dtype=torch.double)
``` | ### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
``` | 69 | Cannot use both set_format and set_transform
### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
Currently, it's not possible to chain `set_format`/`set_transform` calls (plus, this is a breaking change if we decide to implement it), so I see two possible solutions:
* using `set_format`/`set_transform` for the 1st transform and then passing the transformed example/batch to the 2nd transform
* implementing and registering a custom formatter (the relevant code is [here](https://github.com/huggingface/datasets/tree/main/src/datasets/formatting))
Btw, your example requires a single `set_format` call:
```python
ds.set_format("torch", columns=["image"], output_all_columns=True, dtype=torch.double)
``` | [
-0.05961849167943001,
0.1262877881526947,
-0.03210154175758362,
-0.13575811684131622,
0.13766884803771973,
-0.011086109094321728,
0.3925343155860901,
0.010178297758102417,
-0.2834893465042114,
-0.14690479636192322,
-0.019702769815921783,
-0.0586627833545208,
-0.010451148264110088,
-0.031676944345235825,
-0.021386584267020226,
-0.14387233555316925,
0.008194800466299057,
-0.058203570544719696,
-0.0901123434305191,
0.14038723707199097,
-0.1081203743815422,
-0.03771650791168213,
0.048874132335186005,
-0.1157131940126419,
-0.07992132008075714,
-0.10432230681180954,
-0.02743462659418583,
-0.011762319132685661,
-0.17085416615009308,
-0.10389437526464462,
0.08842325955629349,
0.18922406435012817,
0.07492264360189438,
0.3041212260723114,
0.000005086109467811184,
0.14989133179187775,
0.08211521804332733,
0.05629729852080345,
-0.0014054697239771485,
0.0442938506603241,
0.17648853361606598,
-0.10570339113473892,
0.11396981030702591,
-0.061888404190540314,
-0.21693943440914154,
-0.2765897512435913,
-0.12548786401748657,
0.10535794496536255,
0.16116006672382355,
0.20791374146938324,
0.012350881472229958,
-0.010278926230967045,
-0.05834006145596504,
-0.16370625793933868,
-0.014459080994129181,
0.1499566286802292,
-0.009945547208189964,
0.06394586712121964,
-0.10792085528373718,
0.07556511461734772,
-0.014616417698562145,
0.006070706527680159,
-0.10536058247089386,
-0.1329248994588852,
-0.13747598230838776,
-0.028109367936849594,
-0.22461549937725067,
-0.019298477098345757,
0.11550676077604294,
0.043919917196035385,
-0.038377564400434494,
0.01708674430847168,
-0.02700842171907425,
0.0064260633662343025,
-0.11744314432144165,
-0.18011954426765442,
-0.07510159909725189,
0.10613246262073517,
-0.09779606759548187,
0.20283344388008118,
-0.15315018594264984,
0.03474998474121094,
0.025613972917199135,
-0.033658016473054886,
-0.31655174493789673,
0.04985775798559189,
-0.09096011519432068,
0.0736159011721611,
-0.07670276612043381,
-0.0009610790875740349,
0.13379673659801483,
0.04406645521521568,
0.02862352505326271,
-0.1108630895614624,
-0.05212569609284401,
-0.11613333225250244,
-0.22229750454425812,
-0.1785527914762497,
-0.06603462994098663,
0.03675052523612976,
0.00841110572218895,
-0.08705583214759827,
0.002784842625260353,
0.041098084300756454,
-0.008070645853877068,
0.12906402349472046,
-0.0899210125207901,
0.05021381750702858,
0.008657312951982021,
0.004339066334068775,
0.1917373538017273,
0.08481426537036896,
0.018841098994016647,
-0.13600768148899078,
0.01616840623319149,
-0.06983542442321777,
0.09296098351478577,
0.20660893619060516,
-0.005144951865077019,
-0.041892170906066895,
0.1319686621427536,
-0.025931885465979576,
-0.12910951673984528,
0.10289941728115082,
0.101448193192482,
0.19107653200626373,
0.10416137427091599,
0.04415825009346008,
0.06409939378499985,
0.055676788091659546,
0.030695253983139992,
0.20662952959537506,
0.038829922676086426,
-0.1856251358985901,
0.07120326906442642,
-0.08777283132076263,
0.005636907182633877,
-0.04067583754658699,
-0.005920123308897018,
0.07295215874910355,
0.12813255190849304,
0.06228902190923691,
0.24702292680740356,
-0.07288787513971329,
-0.023488817736506462,
0.15041910111904144,
0.10339422523975372,
0.08440282940864563,
-0.08407124131917953,
0.0036284441594034433,
-0.08040211349725723,
0.10531742125749588,
-0.34863391518592834,
0.0339689701795578,
-0.07041669636964798,
0.04591154679656029,
0.15852828323841095,
-0.13064207136631012,
0.02668478712439537,
-0.07898010313510895,
0.11172142624855042,
-0.015514903701841831,
0.044797271490097046,
-0.16175371408462524,
0.04322128742933273,
0.015919717028737068,
0.061174217611551285,
0.02018457092344761,
0.09011918306350708,
0.15850061178207397,
0.24941585958003998,
-0.03988051414489746,
-0.09718293696641922,
0.03344361111521721,
-0.08187489956617355,
0.014021838083863258,
-0.08450756222009659,
0.08894284814596176,
-0.014045020565390587,
-0.13616305589675903,
0.020022904500365257,
-0.04734419658780098,
0.09404566138982773,
-0.19072075188159943,
0.07327890396118164,
0.06701910495758057,
0.01699359156191349,
0.09382225573062897,
-0.19328677654266357,
-0.14974547922611237,
-0.10851501673460007,
0.11558151245117188,
0.16369737684726715,
-0.09727773070335388,
0.07893680036067963,
0.07042507082223892,
-0.11217335611581802,
-0.016482356935739517,
-0.07343287765979767,
-0.20599566400051117,
-0.06345968693494797,
-0.027059821411967278,
-0.2565489709377289,
-0.07693694531917572,
-0.11404334753751755,
-0.07220295071601868,
-0.18664145469665527,
0.0013040571939200163,
0.024014504626393318,
0.05112242326140404,
-0.12904798984527588,
0.03766002878546715,
-0.08907458186149597,
-0.12989692389965057,
0.07843472808599472,
-0.1681489497423172,
0.026091139763593674,
0.015865828841924667,
-0.07616263628005981,
0.06564382463693619,
-0.11679944396018982,
0.1080726906657219,
0.17653310298919678,
0.04649153724312782,
0.16182377934455872,
0.07914355397224426,
0.0668008103966713,
-0.08839450031518936,
0.0032018667552620173,
0.11586543917655945,
-0.1216762512922287,
-0.09635534882545471,
-0.04831313714385033,
0.022319866344332695,
-0.06801657378673553,
-0.07354520261287689,
-0.19552700221538544,
-0.24794195592403412,
-0.0053389230743050575,
0.06349784135818481,
-0.12566272914409637,
-0.024327240884304047,
-0.06782743334770203,
-0.052399393171072006,
-0.005478206090629101,
0.1382087767124176,
-0.010546653531491756,
0.16174229979515076,
-0.15446078777313232,
-0.039295438677072525,
0.19096143543720245,
0.009117546491324902,
-0.18573857843875885,
-0.028975673019886017,
-0.039877355098724365,
-0.11036169528961182,
0.007348374463617802,
-0.03260764852166176,
-0.09365954250097275,
-0.29881033301353455,
0.1610661745071411,
-0.014811377041041851,
0.027405092492699623,
-0.012904668226838112,
0.08821067214012146,
0.006755630485713482,
0.10224244743585587,
-0.12742570042610168,
0.05726221576333046,
-0.027990611270070076,
0.11211046576499939,
0.034474655985832214,
-0.06734619289636612,
-0.06470338255167007,
-0.030607549473643303,
-0.10994941741228104,
-0.10265854746103287,
-0.031238015741109848,
0.15143874287605286,
0.21108409762382507,
-0.10914961993694305,
0.13576476275920868,
0.13308283686637878,
-0.20059719681739807,
0.021081173792481422,
0.06854727119207382,
-0.1268148422241211,
0.0832238644361496,
-0.11292780190706253,
0.06624612212181091,
0.08900770545005798,
-0.018802503123879433,
-0.08821552991867065,
-0.032729778438806534,
0.1004531979560852,
0.04894612357020378,
0.23091591894626617,
-0.04670342057943344,
0.032615866512060165,
-0.07136355340480804,
-0.16306906938552856,
0.09886390715837479,
0.07974879443645477,
0.011968116275966167,
0.04569924622774124,
-0.03615028038620949,
0.23569010198116302,
0.1536352038383484,
-0.277667760848999,
0.0020809341222047806,
0.06634669005870819,
0.04558433219790459,
0.06105489656329155,
-0.10418421030044556,
0.03680611401796341,
-0.009622273035347462,
0.07622019201517105,
-0.1451534628868103,
0.26714229583740234,
0.07628323882818222,
0.14523419737815857,
-0.09697878360748291,
-0.10241534560918808,
-0.01898006908595562,
-0.061371125280857086,
0.0970083698630333,
-0.07084650546312332,
-0.013692441396415234,
-0.0792740061879158,
0.039127081632614136,
-0.143125981092453,
0.1687903255224228,
-0.04836427420377731,
-0.03514042869210243,
0.031125906854867935,
-0.008978046476840973,
-0.048406947404146194,
0.07678354531526566,
0.20969846844673157,
0.04060593619942665,
-0.1228196918964386,
-0.10386116057634354,
-0.05244329199194908,
0.058344218879938126,
0.1824716031551361,
0.008481550961732864,
-0.15084436535835266,
-0.13418403267860413,
-0.12849363684654236,
-0.12706145644187927,
0.0896904394030571,
-0.05957217141985893,
-0.07690805196762085,
-0.09491120278835297,
0.07055413722991943,
0.03733280673623085,
-0.26666688919067383,
-0.03674528747797012,
-0.08900115638971329,
0.011636247858405113,
0.06399557739496231,
0.09963051229715347,
0.04703105613589287,
-0.03044736385345459,
-0.1678115427494049,
0.02736707776784897,
0.07332118600606918,
0.15776534378528595,
-0.2254730761051178,
-0.33372700214385986,
0.03667253628373146,
0.0011937181698158383,
-0.03052879497408867,
0.03170110285282135,
-0.10334473848342896,
-0.059449151158332825,
-0.03492864593863487,
-0.09752408415079117,
0.04201020300388336,
0.12633879482746124,
0.05525790899991989,
-0.1429951786994934,
-0.0352773517370224,
0.013544506393373013,
0.2634463608264923,
0.09567797929048538,
-0.05755828320980072,
0.1108531579375267,
-0.10930447280406952,
-0.017063334584236145,
0.04238976910710335,
0.04940882325172424,
0.0003125679213553667,
-0.1364087164402008,
0.05335712432861328,
-0.048018861562013626,
0.21190312504768372,
0.06894171983003616,
0.000004092108611075673,
0.1545424908399582,
0.05632835999131203,
0.2187054455280304,
0.12248141318559647,
-0.045485302805900574,
0.15502972900867462,
-0.062258750200271606,
-0.027967456728219986,
-0.2766624093055725,
-0.006152104586362839,
0.03174300119280815,
0.10533341020345688,
0.24232888221740723,
0.06010839343070984,
0.007333108689635992,
-0.0034427158534526825,
0.003413492115214467,
0.011681539006531239,
-0.05465816706418991,
0.12849722802639008,
-0.07022470980882645,
-0.28194138407707214,
-0.2689897119998932,
0.2202697992324829,
0.1643083393573761,
0.0038494328036904335,
-0.01643272116780281,
0.0018044663593173027,
-0.02719997614622116,
0.011197110638022423,
0.0094607537612319,
0.13527685403823853,
0.07065198570489883,
0.02314148284494877,
0.049806416034698486,
0.1959957331418991,
-0.11557726562023163,
0.19349049031734467,
-0.14384636282920837,
0.06744389981031418,
0.0014294922584667802,
-0.04027623310685158,
0.002951761009171605,
0.19917790591716766,
-0.17304544150829315,
-0.06977846473455429,
-0.11075454205274582,
-0.03621361777186394,
0.06566403806209564,
0.054830484092235565,
0.08839309215545654,
-0.2389380931854248,
-0.18195347487926483,
-0.22685883939266205,
-0.10677491873502731,
0.10126551240682602,
0.07318461686372757,
0.013664385303854942,
-0.10955901443958282,
-0.05873535946011543,
0.17840741574764252,
-0.07871836423873901,
-0.04862538352608681,
0.08804848790168762,
0.14425323903560638,
0.06078704446554184,
-0.02982115000486374,
0.29533901810646057,
-0.07705015689134598,
0.046318091452121735,
0.09580923616886139,
0.012629104778170586,
0.028362324461340904,
-0.03759115934371948,
0.09026050567626953,
0.08130794018507004,
-0.11192914098501205,
0.17102424800395966,
-0.216103196144104,
-0.06407947838306427,
-0.039512090384960175,
0.09392198920249939,
0.1446986347436905,
0.0063962447457015514,
0.03490552306175232,
0.08099102228879929,
0.00815572589635849,
-0.004431998357176781,
-0.05950053036212921,
-0.08218646794557571,
0.06196523830294609,
-0.11124598234891891,
-0.030150163918733597,
0.05493305251002312,
-0.005120196845382452,
0.14866766333580017,
-0.034222181886434555,
-0.19057932496070862,
0.09847589582204819,
-0.06901651620864868,
0.0855521708726883,
-0.03236224502325058,
0.030720794573426247,
0.03912784904241562,
0.07251643389463425,
0.25855883955955505,
-0.224074125289917,
-0.02514391392469406,
0.2844289243221283,
0.10685322433710098,
0.012423048727214336,
0.059166792780160904,
0.07394644618034363,
-0.03142326697707176,
-0.03990038484334946,
0.13707298040390015,
0.04365771263837814,
-0.09228375554084778,
-0.015594705007970333,
-0.0707850232720375,
0.10910816490650177,
-0.050911612808704376,
0.029097119346261024,
0.22841912508010864,
0.10784143209457397,
0.06131644919514656,
-0.05924558639526367,
0.006832397077232599,
-0.11546865850687027,
0.14249630272388458,
0.26832953095436096,
-0.12368398159742355,
0.11692535132169724,
0.10691005736589432,
-0.03194631636142731,
0.05819154530763626,
0.004256641026586294,
0.07503663003444672,
-0.14336904883384705,
0.05945677310228348,
-0.1502339392900467,
-0.006916302256286144,
-0.11872296780347824,
-0.13987120985984802,
0.05718269571661949,
0.11631055921316147,
-0.05317601561546326,
-0.050959259271621704,
-0.04655894264578819,
0.01998284086585045,
0.020691607147455215,
0.004786239471286535,
0.24611106514930725,
0.34487053751945496,
-0.11965476721525192,
0.09110894054174423,
-2.3864336766785072e-32,
-0.061033423990011215,
0.1923295110464096,
-0.009344211779534817,
0.10386282205581665,
-0.08050154149532318,
0.1174955889582634,
0.14452162384986877,
0.014046083204448223,
0.04125034809112549,
-0.006263254676014185,
-0.20735085010528564,
-0.040806420147418976,
-0.022093260660767555,
-0.050841979682445526,
0.046146828681230545,
-0.018773943185806274,
-0.028822043910622597,
-0.14375051856040955,
-0.05804983153939247,
0.06103765219449997,
0.2826843857765198,
0.045137256383895874,
0.1874198466539383,
0.012632439844310284,
-0.0061788978055119514,
0.0927853137254715,
-0.03803252801299095,
-0.07965614646673203,
-0.03641469404101372,
-0.10000870376825333,
-0.0427204854786396,
0.06183058023452759,
0.01336737908422947,
-0.07349628955125809,
-0.1794583648443222,
0.09178648144006729,
-0.09771327674388885,
-0.17477279901504517,
0.038267094641923904,
0.08870335668325424,
-0.09337121993303299,
0.1711706966161728,
0.08029504120349884,
-0.07546072453260422,
0.1830635815858841,
0.029388142749667168,
-0.11107129603624344,
0.03092031367123127,
0.042849015444517136,
-0.10299820452928543,
-0.030773526057600975,
0.11955045908689499,
0.00400834996253252,
0.15343450009822845,
0.11671032011508942,
-0.21695317327976227,
0.047072634100914,
0.044096607714891434,
-0.21234692633152008,
-0.04736504703760147,
0.0372072197496891,
0.07200494408607483,
0.03420072793960571,
-0.11031565070152283,
0.004071185365319252,
0.0009021662990562618,
0.18216872215270996,
0.1719537079334259,
0.277650386095047,
0.034906238317489624,
0.04715757817029953,
0.0450097918510437,
0.03671371564269066,
-0.01804632693529129,
-0.3201581537723541,
-0.0018055003602057695,
-0.1340731978416443,
0.06411635875701904,
0.027808314189314842,
-0.1642528772354126,
-0.18936389684677124,
0.21050159633159637,
0.0957031175494194,
0.05313396081328392,
0.045227210968732834,
0.0467100515961647,
-0.07137638330459595,
0.11190838366746902,
-0.2345212697982788,
0.011727445758879185,
-0.04015577584505081,
0.16141778230667114,
0.10566910356283188,
0.06754730641841888,
-0.003417092142626643,
-0.0058606406673789024,
-0.02719722129404545,
0.05587472766637802,
-0.13922877609729767,
0.007819371297955513,
-0.0022213910706341267,
-0.11388512700796127,
0.1536267101764679,
0.09812014549970627,
0.1877223402261734,
-0.003850781125947833,
0.21490125358104706,
-0.023388808593153954,
-0.22219914197921753,
-0.09207114577293396,
0.01791132427752018,
0.010452085174620152,
0.15910261869430542,
-0.07216022908687592,
0.1608331799507141,
0.03574975207448006,
-0.09865747392177582,
-0.02828950807452202,
0.16012334823608398,
0.05339712277054787,
-0.16637182235717773,
-0.1102580726146698,
-0.01971042901277542,
-0.1205940842628479,
-0.017125803977251053,
-0.08374432474374771,
-0.2609761357307434,
-0.12903988361358643,
0.10503556579351425,
0.06568710505962372,
-0.0427241176366806,
0.013819119893014431,
7.191271720330406e-7,
0.06208421662449837,
0.008009279146790504,
0.08689618855714798,
0.01604558899998665,
-0.07757511734962463,
0.1550043523311615,
-0.1194591373205185,
0.09035530686378479,
-0.03921088948845863,
0.24626803398132324,
0.0783374011516571,
-0.20914137363433838,
-0.0710580050945282,
-0.07657139003276825,
0.1862066090106964,
-0.14498695731163025,
0.04642947390675545,
0.09034179151058197,
-0.12630604207515717,
-0.06623070687055588,
0.018567044287919998,
0.03185566887259483,
0.04087747633457184,
0.002793146762996912,
0.10388824343681335,
-0.04635396599769592,
0.06791043281555176,
-0.01843692548573017,
0.14225569367408752,
-0.012736677192151546,
0.06610511243343353,
-0.06603522598743439,
-0.09889809042215347,
0.2026377171278,
-0.05439669266343117,
-0.1299079805612564,
-0.0017298165475949645,
0.03945111110806465,
0.12598001956939697,
0.13104228675365448,
-0.03835872933268547,
-0.08421028405427933,
-0.09964116662740707,
-0.30681219696998596,
0.09432031959295273,
0.13335947692394257,
-0.09459858387708664,
0.09272758662700653,
-0.08744123578071594,
0.09622780233621597,
0.006976833567023277,
0.07712870836257935,
0.0734361857175827,
0.21129339933395386,
-0.027555471286177635,
0.09286672621965408,
-0.24374571442604065,
-0.1549195647239685,
0.17754827439785004,
-0.14784455299377441,
-0.16833238303661346,
-0.06455670297145844,
-0.035072144120931625,
-0.05105254426598549,
0.1393709033727646,
-0.02056228183209896,
-0.1031639575958252,
1.9227006639592103e-34,
-0.11750287562608719,
0.06911203265190125,
-0.019492968916893005,
-0.13681024312973022,
-0.06003904342651367,
-0.11762621253728867,
0.11114177107810974,
0.055171869695186615,
-0.08998092263936996,
-0.20671170949935913,
-0.147196426987648
] |
https://github.com/huggingface/datasets/issues/5910 | Cannot use both set_format and set_transform | Hey Mario,
Thanks, for getting back to me. the toDouble was just an example my real life case requires many more transforms.
What do you mean by:
> using set_format/set_transform for the 1st transform and then passing the transformed example/batch to the 2nd transform
How would that go, I thought you can't chain them?
As for the custom formatter, is it possible to reference an existing formatter, in my case `torch_formatter` inside of my custom formatter?
maybe I can inherit from it and just call `super.recursive_tensorize()`? | ### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
``` | 86 | Cannot use both set_format and set_transform
### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
Hey Mario,
Thanks, for getting back to me. the toDouble was just an example my real life case requires many more transforms.
What do you mean by:
> using set_format/set_transform for the 1st transform and then passing the transformed example/batch to the 2nd transform
How would that go, I thought you can't chain them?
As for the custom formatter, is it possible to reference an existing formatter, in my case `torch_formatter` inside of my custom formatter?
maybe I can inherit from it and just call `super.recursive_tensorize()`? | [
-0.016285018995404243,
0.1301276981830597,
-0.03257913142442703,
-0.13788950443267822,
0.13483722507953644,
0.007915007881820202,
0.4100874662399292,
0.02942238375544548,
-0.29164764285087585,
-0.15218359231948853,
-0.02640322782099247,
-0.03838096559047699,
-0.028808241710066795,
-0.015606259927153587,
-0.03131188079714775,
-0.15354584157466888,
-0.019435998052358627,
-0.06756136566400528,
-0.07259541004896164,
0.10764794051647186,
-0.09879549592733383,
-0.06779997050762177,
0.04165845364332199,
-0.0891377404332161,
-0.10374230146408081,
-0.07781302183866501,
0.005397993605583906,
-0.03794674202799797,
-0.17575059831142426,
-0.0838155597448349,
0.1005629375576973,
0.16184569895267487,
0.11312103271484375,
0.3304872214794159,
0.000004954593350703362,
0.16396678984165192,
0.06609616428613663,
0.041525233536958694,
0.003466869704425335,
0.039307158440351486,
0.17105315625667572,
-0.15154002606868744,
0.10576646029949188,
-0.04815557971596718,
-0.2309497743844986,
-0.28838232159614563,
-0.14707887172698975,
0.1448306292295456,
0.21958768367767334,
0.22639498114585876,
-0.0008229402592405677,
-0.07830815017223358,
-0.0280133243650198,
-0.1872587352991104,
-0.027542289346456528,
0.1284736543893814,
-0.016873925924301147,
0.09329457581043243,
-0.06376805901527405,
0.040744926780462265,
-0.0013481146888807416,
0.008470196276903152,
-0.10038094222545624,
-0.124873585999012,
-0.14574863016605377,
-0.08084551244974136,
-0.12986142933368683,
-0.02795070968568325,
0.11223844438791275,
0.028053320944309235,
-0.02372865378856659,
0.031187796965241432,
-0.06655020266771317,
0.027849934995174408,
-0.12080225348472595,
-0.15014542639255524,
-0.1042790487408638,
0.11358380317687988,
-0.07115646451711655,
0.1857071965932846,
-0.15870212018489838,
0.056060031056404114,
0.026117000728845596,
-0.03412248566746712,
-0.2860880196094513,
0.08096718788146973,
-0.08668889850378036,
0.07283848524093628,
-0.12243442982435226,
0.013706673868000507,
0.17947113513946533,
0.044943321496248245,
0.11642998456954956,
-0.09689120203256607,
-0.06822529435157776,
-0.12190284579992294,
-0.2307443916797638,
-0.16962815821170807,
-0.10957344621419907,
0.09442611038684845,
0.030495407059788704,
-0.10539181530475616,
0.0015022798907011747,
0.06219187006354332,
-0.0005781467771157622,
0.150803342461586,
-0.16247086226940155,
0.051520124077796936,
-0.035975437611341476,
-0.007236141711473465,
0.148616760969162,
0.06643842160701752,
0.0034271744079887867,
-0.09672058373689651,
-0.025693535804748535,
-0.02635139599442482,
0.08837566524744034,
0.22740766406059265,
-0.018691549077630043,
-0.07762470841407776,
0.09826581925153732,
-0.024201614782214165,
-0.1296895444393158,
0.043923038989305496,
0.09718403220176697,
0.19254785776138306,
0.0963408425450325,
0.055396925657987595,
0.03346671536564827,
0.09029904007911682,
0.04281742498278618,
0.2163553386926651,
-0.004648528061807156,
-0.14456769824028015,
0.04867599904537201,
-0.042460523545742035,
0.019233234226703644,
-0.04706784337759018,
0.013834690675139427,
0.07824662327766418,
0.1675238460302353,
0.01224479265511036,
0.22907114028930664,
-0.10815631598234177,
-0.019244754686951637,
0.13807255029678345,
0.09824997931718826,
0.0724761039018631,
-0.12099377810955048,
-0.06932234764099121,
-0.09184037894010544,
0.07696516066789627,
-0.3337223529815674,
0.023259403184056282,
-0.05651383846998215,
0.03785198926925659,
0.17858600616455078,
-0.18040868639945984,
0.07004792243242264,
-0.06862754374742508,
0.09224443137645721,
0.011232461780309677,
0.08130025118589401,
-0.1744815856218338,
0.0068108877167105675,
-0.024014471098780632,
0.057809531688690186,
-0.028252288699150085,
0.08057387918233871,
0.18514081835746765,
0.2506934106349945,
-0.017906097695231438,
-0.07670266181230545,
0.06040637567639351,
-0.0695284977555275,
-0.02118285745382309,
-0.07690373808145523,
0.11807701736688614,
0.0036410915199667215,
-0.11588327586650848,
0.006685527507215738,
-0.009365586563944817,
0.09299591183662415,
-0.16228319704532623,
0.14304308593273163,
0.06321325153112411,
0.04971545189619064,
0.08030468970537186,
-0.2047836184501648,
-0.17029552161693573,
-0.11514293402433395,
0.09981389343738556,
0.1597541868686676,
-0.1600072979927063,
0.1350405365228653,
0.07989753782749176,
-0.16469627618789673,
-0.05224301666021347,
-0.11509779840707779,
-0.24524198472499847,
-0.00015983231423888355,
-0.030754759907722473,
-0.24529273808002472,
-0.0357830747961998,
-0.0939948633313179,
-0.07210831344127655,
-0.08178997039794922,
0.009757396765053272,
-0.002096537034958601,
0.0759955570101738,
-0.11854062229394913,
0.02348872646689415,
-0.08466079831123352,
-0.16936065256595612,
0.044153496623039246,
-0.12905605137348175,
0.028277406468987465,
0.01425791997462511,
-0.12986339628696442,
0.0044743954204022884,
-0.08800400793552399,
0.06965801864862442,
0.21235699951648712,
0.04014163091778755,
0.1429399698972702,
0.06651358306407928,
0.0408804677426815,
-0.122654028236866,
-0.017726778984069824,
0.10179034620523453,
-0.13345888257026672,
-0.06570176035165787,
-0.017522551119327545,
-0.02026202529668808,
-0.08147919923067093,
-0.11242619901895523,
-0.17041794955730438,
-0.23903107643127441,
-0.03008604794740677,
0.023308761417865753,
-0.06732878088951111,
-0.022448234260082245,
-0.07810473442077637,
-0.07303497195243835,
0.043123017996549606,
0.1184031069278717,
0.07487310469150543,
0.1735841929912567,
-0.1586403101682663,
-0.027809299528598785,
0.1682731658220291,
0.005277793854475021,
-0.1765822470188141,
-0.0019091585418209434,
-0.06558597832918167,
-0.0802423357963562,
-0.0644710585474968,
-0.09102416783571243,
-0.08520559221506119,
-0.3033599555492401,
0.1146128922700882,
-0.007856005802750587,
0.060524482280015945,
-0.0002658299054019153,
0.054547395557165146,
-0.004209921229630709,
0.08254966139793396,
-0.15659330785274506,
0.06925278156995773,
-0.053512584418058395,
0.11516081541776657,
0.023610254749655724,
-0.05512365698814392,
-0.09192591905593872,
-0.026285840198397636,
-0.10921461880207062,
-0.11954396218061447,
-0.10721360146999359,
0.13167981803417206,
0.21602283418178558,
-0.13079766929149628,
0.1707034707069397,
0.11574161052703857,
-0.21312852203845978,
0.03194436430931091,
0.08089800924062729,
-0.11107088625431061,
0.08685745298862457,
-0.09093695133924484,
0.01303163543343544,
0.07488933950662613,
0.021649044007062912,
-0.07720626890659332,
-0.06575196236371994,
0.0913834273815155,
0.06652286648750305,
0.22763878107070923,
-0.007796261925250292,
0.0439726896584034,
-0.09583919495344162,
-0.17848506569862366,
0.08244247734546661,
0.05658341571688652,
0.006467894650995731,
0.04710258170962334,
-0.08393265306949615,
0.21710141003131866,
0.19448518753051758,
-0.3006150722503662,
0.04204327613115311,
0.09864810109138489,
0.06952577829360962,
0.06435241550207138,
-0.1016729474067688,
0.040810320526361465,
0.010010938160121441,
0.11025860160589218,
-0.13458044826984406,
0.27885702252388,
0.06185387820005417,
0.18000614643096924,
-0.12278702855110168,
-0.12876440584659576,
-0.01112088281661272,
-0.03429245203733444,
0.1020997166633606,
-0.07088224589824677,
0.0022966719698160887,
-0.08720340579748154,
0.07480465620756149,
-0.14498741924762726,
0.15593168139457703,
-0.03420425206422806,
-0.04386739805340767,
-0.0019206603756174445,
-0.008051292039453983,
-0.03821293264627457,
0.07052456587553024,
0.2021169364452362,
0.04079405590891838,
-0.07726148515939713,
-0.10101872682571411,
-0.05684593319892883,
0.09469937533140182,
0.16586066782474518,
0.032657504081726074,
-0.1547722965478897,
-0.11057569831609726,
-0.1731773316860199,
-0.1408109962940216,
0.13642656803131104,
-0.024078182876110077,
-0.06301865726709366,
-0.09222020953893661,
0.05678475275635719,
0.08375726640224457,
-0.27123793959617615,
-0.08707033097743988,
-0.07620322704315186,
0.004593513906002045,
0.034010518342256546,
0.12963061034679413,
0.05865976959466934,
-0.04508405178785324,
-0.17047461867332458,
0.015457629226148129,
0.05507981777191162,
0.09861347824335098,
-0.1829744130373001,
-0.3230645954608917,
0.036621786653995514,
0.018985750153660774,
-0.0073131658136844635,
0.029608169570565224,
-0.1118096187710762,
-0.044211145490407944,
0.00016163336113095284,
-0.03757748007774353,
0.0063682785257697105,
0.09545600414276123,
0.05501110106706619,
-0.1147603765130043,
-0.07071614265441895,
-0.010842534713447094,
0.2717368006706238,
0.08180220425128937,
-0.06896455585956573,
0.12285838276147842,
-0.08680326491594315,
-0.033443354070186615,
0.048995282500982285,
0.07184065878391266,
-0.003457000944763422,
-0.052255067974328995,
0.06707415729761124,
-0.0701373964548111,
0.17744819819927216,
0.08341846615076065,
-0.012593409046530724,
0.147285595536232,
0.06111617386341095,
0.17412008345127106,
0.09512959420681,
-0.06332135200500488,
0.16708672046661377,
-0.11077696084976196,
-0.05174289271235466,
-0.29918086528778076,
-0.011524084955453873,
0.05786999687552452,
0.08373530954122543,
0.22523358464241028,
0.07537057995796204,
0.012302730232477188,
-0.0074747828766703606,
0.008716799318790436,
0.035672955214977264,
-0.060075003653764725,
0.1176665872335434,
-0.07819488644599915,
-0.2911534309387207,
-0.287322461605072,
0.2250411957502365,
0.19508309662342072,
-0.032984986901283264,
-0.02066841349005699,
0.016304755583405495,
-0.04584338143467903,
-0.01975988782942295,
0.004251144360750914,
0.140449658036232,
0.14809393882751465,
0.005546427797526121,
0.0775127187371254,
0.17724618315696716,
-0.09256280213594437,
0.14505797624588013,
-0.11781265586614609,
0.07381343841552734,
-0.03419981151819229,
0.007921564392745495,
-0.02475118264555931,
0.18876191973686218,
-0.16414788365364075,
-0.077751524746418,
-0.13812579214572906,
-0.05343089997768402,
0.06486329436302185,
0.06486406922340393,
0.053191181272268295,
-0.2643536329269409,
-0.2050510197877884,
-0.22338519990444183,
-0.060674820095300674,
0.0954526886343956,
0.07920883595943451,
0.02924192324280739,
-0.1498374193906784,
-0.07227858901023865,
0.14091446995735168,
-0.015149140730500221,
-0.02982243336737156,
0.09241371601819992,
0.14503024518489838,
0.03505074977874756,
0.00258851726539433,
0.25389042496681213,
-0.09160009026527405,
0.044616181403398514,
0.10431993007659912,
-0.008248483762145042,
0.024521667510271072,
-0.030374495312571526,
0.03306207433342934,
0.12953513860702515,
-0.16005472838878632,
0.15759630501270294,
-0.1989087164402008,
-0.06767314672470093,
-0.01762637309730053,
0.040866900235414505,
0.17806440591812134,
0.01959831640124321,
0.1030767485499382,
0.0964176207780838,
0.020497512072324753,
-0.0052688573487102985,
-0.041394177824258804,
-0.09617158025503159,
0.07899864763021469,
-0.09921455383300781,
0.0055139027535915375,
0.08115255832672119,
-0.03758496791124344,
0.10998138040304184,
-0.059141095727682114,
-0.14175157248973846,
0.11835663765668869,
-0.0736560970544815,
0.08709676563739777,
0.0026407663244754076,
0.03010133095085621,
0.007349947467446327,
0.07862313091754913,
0.22512561082839966,
-0.188143789768219,
-0.028012273833155632,
0.26930874586105347,
0.09152056276798248,
0.06909014284610748,
0.06453501433134079,
0.10141739994287491,
-0.021454280242323875,
-0.04868045076727867,
0.12317816913127899,
0.03395799547433853,
-0.07116097211837769,
-0.024230528622865677,
-0.08141368627548218,
0.12950271368026733,
-0.010372723452746868,
0.02018253691494465,
0.24004480242729187,
0.0884319469332695,
0.06094147264957428,
-0.0792028084397316,
0.003106718184426427,
-0.09617360681295395,
0.18607555329799652,
0.2770389914512634,
-0.1409079134464264,
0.10044878721237183,
0.13593967258930206,
0.012506424449384212,
0.07553435862064362,
-0.0010864700889214873,
0.015237716026604176,
-0.13332122564315796,
0.05691058561205864,
-0.16150622069835663,
-0.00455729803070426,
-0.10547813028097153,
-0.12173628062009811,
0.06256316602230072,
0.12991203367710114,
-0.0677521824836731,
-0.08916846662759781,
-0.0725732296705246,
-0.007884398102760315,
0.00047485012328252196,
-0.03673015162348747,
0.21897636353969574,
0.3454827666282654,
-0.10588409006595612,
0.08486855030059814,
-2.398728759840933e-32,
-0.046342868357896805,
0.16395634412765503,
-0.01751323975622654,
0.06398218125104904,
-0.06774669885635376,
0.13328853249549866,
0.16005587577819824,
-0.046448949724435806,
0.042795050889253616,
0.000701145560014993,
-0.2022954523563385,
-0.052471403032541275,
-0.03706823289394379,
-0.02134707383811474,
0.038687024265527725,
-0.030428461730480194,
-0.0005228091031312943,
-0.11696427315473557,
-0.06483843177556992,
0.047352008521556854,
0.27282825112342834,
0.03078753873705864,
0.2576085329055786,
-0.014801949262619019,
-0.02695026993751526,
0.07990122586488724,
-0.04369976744055748,
-0.06401578336954117,
-0.004254825878888369,
-0.06369803845882416,
-0.062176525592803955,
0.09548908472061157,
0.005746867507696152,
-0.06995728611946106,
-0.18104217946529388,
0.10993006825447083,
-0.07091762870550156,
-0.19243043661117554,
0.07509908080101013,
0.07948911190032959,
-0.11556220054626465,
0.12302305549383163,
0.11897256225347519,
-0.11682199686765671,
0.17638351023197174,
0.01829351857304573,
-0.11117847263813019,
0.03923880681395531,
-0.01743576116859913,
-0.06286478042602539,
-0.04948781430721283,
0.10406670719385147,
0.023603100329637527,
0.1255403757095337,
0.12475616484880447,
-0.18008092045783997,
0.06627476215362549,
-0.001061558141373098,
-0.23064583539962769,
-0.00741137471050024,
0.05348478630185127,
0.07121286541223526,
0.061891164630651474,
-0.12966269254684448,
0.00799642689526081,
-0.027553431689739227,
0.1123841255903244,
0.18306614458560944,
0.2671181857585907,
0.022050021216273308,
0.030998677015304565,
0.023343771696090698,
0.06140846759080887,
-0.030353356152772903,
-0.37084639072418213,
0.009586626663804054,
-0.07418101280927658,
0.046649981290102005,
0.05316260829567909,
-0.14815475046634674,
-0.18270732462406158,
0.22986477613449097,
0.0933883860707283,
0.04341407120227814,
0.05916709825396538,
-0.015339567326009274,
-0.05149444192647934,
0.08611514419317245,
-0.24319839477539062,
0.020659232512116432,
0.009423138573765755,
0.13542304933071136,
0.07141341269016266,
0.0734829232096672,
0.015637202188372612,
0.01556666474789381,
-0.01826263964176178,
0.04688418284058571,
-0.1381901502609253,
-0.009707571007311344,
-0.04556245729327202,
-0.08727776259183884,
0.12926261126995087,
0.10497192293405533,
0.1688510924577713,
0.004845567978918552,
0.166544571518898,
-0.028352737426757812,
-0.1955409198999405,
-0.08962444216012955,
0.039539143443107605,
0.02353692054748535,
0.1704140603542328,
-0.11067945510149002,
0.16250059008598328,
0.027552500367164612,
-0.11550233513116837,
0.00933934561908245,
0.1443205624818802,
0.06046435981988907,
-0.14107376337051392,
-0.11334136873483658,
0.04206822067499161,
-0.12491267919540405,
-0.01107342541217804,
-0.09187048673629761,
-0.31218743324279785,
-0.09599334001541138,
0.10710827261209488,
0.0873008444905281,
-0.034705646336078644,
0.04464243724942207,
7.191362101366394e-7,
0.06480179727077484,
0.06018826737999916,
0.07952447980642319,
0.010370873846113682,
-0.07352790236473083,
0.19666339457035065,
-0.08568425476551056,
0.11025939136743546,
-0.031937748193740845,
0.24783310294151306,
0.0881287083029747,
-0.21050967276096344,
-0.07778476923704147,
-0.07837532460689545,
0.14324913918972015,
-0.17385147511959076,
0.04894790053367615,
0.14145487546920776,
-0.112345390021801,
-0.037917520850896835,
0.097209632396698,
0.08379391580820084,
0.10624087601900101,
0.005260550417006016,
0.09150714427232742,
-0.047434113919734955,
0.07575547695159912,
0.00009192448487738147,
0.10111832618713379,
-0.012565379031002522,
0.046502649784088135,
-0.018578825518488884,
-0.11764102429151535,
0.21159778535366058,
-0.03323401138186455,
-0.09396570175886154,
0.008194188587367535,
0.01518318708986044,
0.14404025673866272,
0.11044703423976898,
-0.019622383639216423,
-0.08572512120008469,
-0.11844418942928314,
-0.29007676243782043,
0.07297409325838089,
0.12138435989618301,
-0.05652812123298645,
0.12954577803611755,
-0.0864923819899559,
0.09331577271223068,
-0.00034042223705910146,
0.054375309497117996,
0.04119259864091873,
0.19492512941360474,
-0.06371001899242401,
0.10059434920549393,
-0.27461355924606323,
-0.1324400156736374,
0.20057576894760132,
-0.11835639923810959,
-0.17563612759113312,
-0.021938499063253403,
-0.01612335443496704,
-0.11467771977186203,
0.143400177359581,
-0.03652665391564369,
-0.0737876445055008,
1.2114540316697615e-34,
-0.09428568929433823,
0.06267736107110977,
-0.0010204246500506997,
-0.13057541847229004,
-0.03898516669869423,
-0.09642361104488373,
0.05010797455906868,
0.04317982867360115,
-0.0930047556757927,
-0.23193371295928955,
-0.11862646788358688
] |
https://github.com/huggingface/datasets/issues/5910 | Cannot use both set_format and set_transform | > How would that go, I thought you can't chain them?
Yes, they cannot be chained. This is what I meant:
```python
ds.set_transform(first_transform)
# calling the 2nd transform on each accessed batch
second_transform(ds[2:3])
```
> As for the custom formatter, is it possible to reference an existing formatter, in my case torch_formatter inside of my custom formatter?
>
>maybe I can inherit from it and just call super.recursive_tensorize()?
Yes, subclassing makes the most sense. | ### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
``` | 74 | Cannot use both set_format and set_transform
### Describe the bug
I need to process some data using the set_transform method but I also need the data to be formatted for pytorch before processing it.
I don't see anywhere in the documentation something that says that both methods cannot be used at the same time.
### Steps to reproduce the bug
```
from datasets import load_dataset
ds = load_dataset("mnist", split="train")
ds.set_format(type="torch")
def transform(entry):
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
### Expected behavior
It should print the pytorch tensor image as a double, but it errors because "entry" in the transform function doesn't receive a pytorch tensor to begin with, it receives a PIL Image -> entry.double() errors because entry isn't a pytorch tensor.
### Environment info
Latest versions.
### Note:
It would be at least handy to have access to a function that can do the dataset.set_format in the set_transform function.
Something like:
```
from datasets import load_dataset, do_format
ds = load_dataset("mnist", split="train")
def transform(entry):
entry = do_format(entry, type="torch")
return entry["image"].double()
ds.set_transform(transform)
print(ds[0])
```
> How would that go, I thought you can't chain them?
Yes, they cannot be chained. This is what I meant:
```python
ds.set_transform(first_transform)
# calling the 2nd transform on each accessed batch
second_transform(ds[2:3])
```
> As for the custom formatter, is it possible to reference an existing formatter, in my case torch_formatter inside of my custom formatter?
>
>maybe I can inherit from it and just call super.recursive_tensorize()?
Yes, subclassing makes the most sense. | [
0.002284585265442729,
0.1770046204328537,
-0.04238796606659889,
-0.12424654513597488,
0.12317197024822235,
0.04061634838581085,
0.4100109338760376,
0.026753725484013557,
-0.2539158761501312,
-0.15887956321239471,
-0.040308937430381775,
-0.0545462891459465,
-0.024701397866010666,
-0.014546533115208149,
-0.03788292780518532,
-0.15826773643493652,
-0.02390800043940544,
-0.07475131005048752,
-0.07654484361410141,
0.10740947723388672,
-0.09281022846698761,
-0.06906887888908386,
0.01671132817864418,
-0.12031886726617813,
-0.11776075512170792,
-0.08474191278219223,
-0.021777700632810593,
-0.047864966094493866,
-0.17750787734985352,
-0.07871855050325394,
0.13910053670406342,
0.15681594610214233,
0.10883453488349915,
0.3339120149612427,
0.000005055183919466799,
0.16347473859786987,
0.09029067307710648,
0.0448833666741848,
-0.006122160237282515,
0.03994659334421158,
0.14752234518527985,
-0.15455590188503265,
0.11034910380840302,
-0.06664250791072845,
-0.22004319727420807,
-0.2753208875656128,
-0.15953747928142548,
0.12858736515045166,
0.21262943744659424,
0.21505798399448395,
-0.010196838527917862,
-0.08821145445108414,
-0.02767716348171234,
-0.19357720017433167,
-0.04454733431339264,
0.1040572077035904,
-0.029136383906006813,
0.10096844285726547,
-0.06418914347887039,
0.026998793706297874,
0.02670242078602314,
-0.02108808606863022,
-0.09195857495069504,
-0.10306733101606369,
-0.1254936158657074,
-0.09631755948066711,
-0.12481841444969177,
-0.05670661851763725,
0.1054142564535141,
0.03358108177781105,
-0.008609920740127563,
0.04573189467191696,
-0.0644913911819458,
0.002692584879696369,
-0.12000281363725662,
-0.15331654250621796,
-0.07032077759504318,
0.09668155014514923,
-0.05932704731822014,
0.17105983197689056,
-0.15809902548789978,
0.0694843977689743,
0.03296225890517235,
-0.044977299869060516,
-0.2696111798286438,
0.105048269033432,
-0.07466121017932892,
0.0703156366944313,
-0.1251920908689499,
0.013918212614953518,
0.18232466280460358,
0.060042835772037506,
0.1030275747179985,
-0.1152956560254097,
-0.061599574983119965,
-0.11253892630338669,
-0.21394585072994232,
-0.18526433408260345,
-0.10088858753442764,
0.12588606774806976,
0.015631480142474174,
-0.08393911272287369,
0.021724656224250793,
0.06107550114393234,
0.005098416935652494,
0.13188858330249786,
-0.17712342739105225,
0.03949848189949989,
-0.027411654591560364,
-0.01547284796833992,
0.14767950773239136,
0.06732863187789917,
0.0016362208407372236,
-0.08995528519153595,
-0.01965547725558281,
-0.019542960450053215,
0.08607147634029388,
0.23461753129959106,
-0.018410099670290947,
-0.09585267305374146,
0.07888775318861008,
-0.003886103630065918,
-0.12924489378929138,
0.014541725628077984,
0.11655431240797043,
0.16065263748168945,
0.13799308240413666,
0.03609900921583176,
0.0543232262134552,
0.08632520586252213,
0.06435670703649521,
0.18558287620544434,
-0.03321728855371475,
-0.1413690745830536,
0.03885103017091751,
-0.009519338607788086,
-0.0018889284692704678,
-0.03705345466732979,
0.03733482211828232,
0.05558914318680763,
0.14759080111980438,
0.001020727097056806,
0.20818273723125458,
-0.11346215009689331,
-0.018706440925598145,
0.1622689962387085,
0.11083652824163437,
0.054632801562547684,
-0.12713982164859772,
-0.07201173901557922,
-0.11041226983070374,
0.09487642347812653,
-0.3440714478492737,
0.014020293951034546,
-0.08007509261369705,
0.04766459763050079,
0.19919352233409882,
-0.17871084809303284,
0.04925953969359398,
-0.07335295528173447,
0.08304080367088318,
-0.0005400856025516987,
0.06032799929380417,
-0.17834599316120148,
0.017952563241124153,
-0.05040266737341881,
0.07616176456212997,
-0.03093811497092247,
0.06347084790468216,
0.16698142886161804,
0.23522402346134186,
-0.013161643408238888,
-0.07812988013029099,
0.033848512917757034,
-0.08497873693704605,
-0.031005997210741043,
-0.09328974783420563,
0.13025479018688202,
-0.0015901851002126932,
-0.10400188714265823,
-0.008450874127447605,
0.03513446822762489,
0.10178554058074951,
-0.1499495506286621,
0.13013441860675812,
0.06184223294258118,
0.038529060781002045,
0.07340925931930542,
-0.18676680326461792,
-0.20235925912857056,
-0.12326240539550781,
0.09992627054452896,
0.12957072257995605,
-0.16262304782867432,
0.12919281423091888,
0.06936683505773544,
-0.1542038917541504,
-0.05378967151045799,
-0.10668777674436569,
-0.2679603099822998,
0.0006659296341240406,
-0.0354052297770977,
-0.24383147060871124,
-0.006779700517654419,
-0.10088251531124115,
-0.09956186264753342,
-0.104736328125,
0.03301243111491203,
0.04362821206450462,
0.11262865364551544,
-0.10794077068567276,
0.021002091467380524,
-0.0634395107626915,
-0.16681692004203796,
0.02381778694689274,
-0.09590740501880646,
0.02299695461988449,
0.019950412213802338,
-0.15860925614833832,
-0.0011738839093595743,
-0.10168997198343277,
0.07839144766330719,
0.200240820646286,
0.03949201479554176,
0.14586086571216583,
0.058576665818691254,
0.04377789795398712,
-0.09186743199825287,
-0.040793679654598236,
0.10663344711065292,
-0.12348964065313339,
-0.05352772772312164,
-0.004833070561289787,
-0.05288213491439819,
-0.08690299093723297,
-0.11862391978502274,
-0.18353243172168732,
-0.20561638474464417,
-0.0316915325820446,
0.025671297684311867,
-0.10917001217603683,
0.004503257106989622,
-0.0747542679309845,
-0.06645230948925018,
0.045314520597457886,
0.11550220847129822,
0.10644766688346863,
0.16354642808437347,
-0.16595543920993805,
-0.01264592818915844,
0.18101724982261658,
0.006303740665316582,
-0.17764919996261597,
-0.026389451697468758,
-0.06254716962575912,
-0.058893732726573944,
-0.0591895617544651,
-0.09740085899829865,
-0.053092557936906815,
-0.26794910430908203,
0.12149407714605331,
-0.0148445013910532,
0.05844118446111679,
0.001628631493076682,
0.04861903563141823,
-0.0004079336649738252,
0.06221543997526169,
-0.11216509342193604,
0.08167687058448792,
-0.04717496410012245,
0.1395217478275299,
0.018029719591140747,
-0.0542093925178051,
-0.09087386727333069,
-0.01954529620707035,
-0.0920054242014885,
-0.10363451391458511,
-0.10528019070625305,
0.1289023905992508,
0.21456579864025116,
-0.14857015013694763,
0.15790654718875885,
0.11724107712507248,
-0.21476958692073822,
0.033396754413843155,
0.07179141789674759,
-0.13344180583953857,
0.05151374265551567,
-0.0796089619398117,
0.01022354606539011,
0.06961257755756378,
0.017759332433342934,
-0.08853881061077118,
-0.05522715300321579,
0.07850264757871628,
0.06244547292590141,
0.19633719325065613,
-0.002445087768137455,
0.024823425337672234,
-0.11088522523641586,
-0.1826634258031845,
0.10726601630449295,
0.061733998358249664,
-0.0028601044323295355,
0.047172028571367264,
-0.11655979603528976,
0.22290661931037903,
0.21667948365211487,
-0.34037715196609497,
0.04821331053972244,
0.0909901112318039,
0.0748504176735878,
0.05726717412471771,
-0.10756631195545197,
0.0561346635222435,
0.020889680832624435,
0.10447880625724792,
-0.13598166406154633,
0.27433153986930847,
0.07602591067552567,
0.16229860484600067,
-0.1369776725769043,
-0.1147778332233429,
0.010204311460256577,
-0.04713169485330582,
0.08680275827646255,
-0.08020669221878052,
0.018729880452156067,
-0.08260229974985123,
0.08511818945407867,
-0.1449495255947113,
0.16362130641937256,
-0.040052156895399094,
-0.03453361615538597,
0.026496699079871178,
-0.011959774419665337,
-0.028305139392614365,
0.07399114966392517,
0.22762884199619293,
0.03946865722537041,
-0.10249805450439453,
-0.12118168920278549,
-0.06665428727865219,
0.13230055570602417,
0.13924413919448853,
0.046812593936920166,
-0.15137380361557007,
-0.11008845269680023,
-0.14932948350906372,
-0.1433575451374054,
0.14555715024471283,
-0.05660518631339073,
-0.04004914313554764,
-0.08906425535678864,
0.04941044747829437,
0.11568696796894073,
-0.25286805629730225,
-0.09759986400604248,
-0.08533567190170288,
0.013934563845396042,
0.033943913877010345,
0.12918798625469208,
0.06269769370555878,
-0.05317767709493637,
-0.14845384657382965,
0.014696967788040638,
0.04679093137383461,
0.08403633534908295,
-0.17334753274917603,
-0.3397626578807831,
0.00693679042160511,
-0.0056726629845798016,
-0.004143802914768457,
0.010047400370240211,
-0.10542380064725876,
-0.059330593794584274,
0.01689337193965912,
-0.007111207582056522,
0.020880363881587982,
0.11185597628355026,
0.04293271154165268,
-0.12425649911165237,
-0.07490624487400055,
-0.006578514818102121,
0.2609720528125763,
0.0825858861207962,
-0.07303135097026825,
0.11613593995571136,
-0.1124330535531044,
-0.045687172561883926,
0.05064778029918671,
0.0742296501994133,
0.0030960354488343,
-0.050116829574108124,
0.07271664589643478,
-0.05834038183093071,
0.17099834978580475,
0.1065608337521553,
-0.02839614450931549,
0.14275206625461578,
0.06885924935340881,
0.13723812997341156,
0.09339068830013275,
-0.035307157784700394,
0.1989658772945404,
-0.15189242362976074,
-0.0646662712097168,
-0.28981080651283264,
0.010794642381370068,
0.011885189451277256,
0.10963068902492523,
0.1862308233976364,
0.05292713642120361,
0.018568582832813263,
-0.027802271768450737,
0.0043047405779361725,
0.019042396917939186,
-0.07144086062908173,
0.11163052171468735,
-0.08693432062864304,
-0.2779359221458435,
-0.2920955419540405,
0.23704630136489868,
0.19032976031303406,
-0.021311648190021515,
-0.010515561327338219,
0.01986592262983322,
-0.05645319074392319,
-0.0198525357991457,
0.0006963404593989253,
0.12046364694833755,
0.15137611329555511,
-0.002386034931987524,
0.08300690352916718,
0.15429113805294037,
-0.08063903450965881,
0.16768690943717957,
-0.11972964555025101,
0.07187860459089279,
-0.0055701578967273235,
-0.006769070401787758,
-0.04714857414364815,
0.1788756102323532,
-0.18005043268203735,
-0.07240752130746841,
-0.14030177891254425,
-0.07177521288394928,
0.025078510865569115,
0.02629689686000347,
0.06929436326026917,
-0.2414059340953827,
-0.22415101528167725,
-0.21603132784366608,
-0.07608970254659653,
0.09765820950269699,
0.07015702873468399,
0.017481191083788872,
-0.1726139783859253,
-0.1076604425907135,
0.11955585330724716,
0.006079694721847773,
-0.03511977940797806,
0.08842349052429199,
0.15761320292949677,
0.015853600576519966,
-0.037361565977334976,
0.2880135476589203,
-0.07558418810367584,
0.04464681074023247,
0.09366384148597717,
-0.02665656805038452,
0.015692584216594696,
-0.03937152028083801,
0.027068007737398148,
0.1331140100955963,
-0.12384609878063202,
0.1321885883808136,
-0.17976737022399902,
-0.037696558982133865,
-0.017105620354413986,
0.04590333253145218,
0.18533073365688324,
0.013888589106500149,
0.10422150045633316,
0.09899178892374039,
0.06090588495135307,
-0.002567280549556017,
-0.02113432250916958,
-0.10066594183444977,
0.06728467345237732,
-0.11146531254053116,
0.025220276787877083,
0.06654241681098938,
-0.011082690209150314,
0.1216142326593399,
-0.05453524738550186,
-0.12012601643800735,
0.14196379482746124,
-0.06847088783979416,
0.09844083338975906,
0.013655216433107853,
0.02037026919424534,
0.0026271832175552845,
0.06251697242259979,
0.218891441822052,
-0.17757835984230042,
-0.016493597999215126,
0.2496475875377655,
0.11118395626544952,
0.06514570862054825,
0.0840635746717453,
0.11305082589387894,
-0.03757011517882347,
-0.03755917027592659,
0.13300250470638275,
0.028862806037068367,
-0.06459827721118927,
-0.019074533134698868,
-0.093467116355896,
0.1438312828540802,
-0.017647983506321907,
0.01169796846807003,
0.23450875282287598,
0.08481507003307343,
0.04073736444115639,
-0.08566758781671524,
0.00965415220707655,
-0.1021842435002327,
0.21371522545814514,
0.2972979247570038,
-0.11230140179395676,
0.1051238626241684,
0.14369963109493256,
0.017180288210511208,
0.05932137742638588,
-0.0018238737247884274,
0.010647262446582317,
-0.12956681847572327,
0.042522165924310684,
-0.1423131674528122,
-0.04295103996992111,
-0.11429069936275482,
-0.11631743609905243,
0.06389793008565903,
0.14018438756465912,
-0.08385536074638367,
-0.0910722091794014,
-0.08893974870443344,
-0.013608448207378387,
0.00434306263923645,
-0.020752806216478348,
0.18624652922153473,
0.31015533208847046,
-0.10002864897251129,
0.0912727415561676,
-2.4049831244712767e-32,
-0.056445520371198654,
0.13216866552829742,
-0.030458487570285797,
0.08681771904230118,
-0.07630889117717743,
0.16930152475833893,
0.1486169993877411,
-0.043996959924697876,
0.043968770653009415,
0.006497494876384735,
-0.18313699960708618,
-0.05008593201637268,
-0.038377344608306885,
-0.020117884501814842,
0.04095163568854332,
-0.01062796264886856,
-0.000029674924007849768,
-0.1220916286110878,
-0.05009928345680237,
0.06648220121860504,
0.2682963013648987,
0.048267021775245667,
0.24528904259204865,
-0.027765048667788506,
-0.03493531420826912,
0.050194237381219864,
-0.03952523320913315,
-0.06202441081404686,
-0.00811940710991621,
-0.048283301293849945,
-0.08396504074335098,
0.07755371928215027,
0.028840787708759308,
-0.02681400068104267,
-0.17862118780612946,
0.08493414521217346,
-0.0889461413025856,
-0.16121110320091248,
0.06105520948767662,
0.08967962116003036,
-0.1270366609096527,
0.13321983814239502,
0.11977813392877579,
-0.0898493081331253,
0.16391806304454803,
0.005432686302810907,
-0.1183164045214653,
0.04067223146557808,
-0.022367296740412712,
-0.06796497106552124,
-0.07172825932502747,
0.10533358156681061,
0.03329874947667122,
0.11437000334262848,
0.12689223885536194,
-0.16595375537872314,
0.06846598535776138,
-0.0026171845383942127,
-0.2300453633069992,
0.004187453538179398,
0.06136089190840721,
0.07534512877464294,
0.06361790746450424,
-0.11941983550786972,
0.0029731476679444313,
-0.01506735198199749,
0.14230239391326904,
0.18886816501617432,
0.24531137943267822,
0.051573630422353745,
0.029679344967007637,
0.039380334317684174,
0.08166830241680145,
-0.02496805228292942,
-0.36017611622810364,
0.002310417126864195,
-0.08144481480121613,
0.04250885173678398,
0.03609883412718773,
-0.13735686242580414,
-0.21133360266685486,
0.2256029099225998,
0.09803074598312378,
0.051542624831199646,
0.09378902614116669,
-0.011701391078531742,
-0.05451640859246254,
0.09147774428129196,
-0.22921359539031982,
0.016444217413663864,
0.023121658712625504,
0.14446556568145752,
0.0519145168364048,
0.08772281557321548,
0.00616796687245369,
0.045824602246284485,
-0.005172837991267443,
0.029147116467356682,
-0.13498219847679138,
-0.030358007177710533,
-0.04261661693453789,
-0.08109056949615479,
0.109256312251091,
0.13033224642276764,
0.16100645065307617,
-0.00817991141229868,
0.19823816418647766,
-0.03320932015776634,
-0.19780932366847992,
-0.08890564739704132,
0.020701175555586815,
0.061961859464645386,
0.1588161140680313,
-0.09670912474393845,
0.1828710436820984,
0.0033229966647922993,
-0.12041793018579483,
0.03212837129831314,
0.13289935886859894,
0.06758364289999008,
-0.11874571442604065,
-0.0937090516090393,
0.03161356598138809,
-0.11364080011844635,
0.011566598899662495,
-0.11108703166246414,
-0.30124908685684204,
-0.10043060779571533,
0.10242637246847153,
0.08620358258485794,
-0.015756284818053246,
0.035274688154459,
7.261371024469554e-7,
0.054642412811517715,
0.056298352777957916,
0.09665118902921677,
0.006658010184764862,
-0.059423595666885376,
0.19178041815757751,
-0.06236164644360542,
0.12686476111412048,
-0.028560301288962364,
0.23543894290924072,
0.09218771010637283,
-0.23031890392303467,
-0.044688232243061066,
-0.10709267109632492,
0.1636984944343567,
-0.14512433111667633,
0.04041368141770363,
0.15699897706508636,
-0.11196693778038025,
-0.04857037961483002,
0.10288841277360916,
0.054941657930612564,
0.07509174197912216,
-0.00569524522870779,
0.10679730027914047,
-0.059159934520721436,
0.057552602142095566,
0.026799913495779037,
0.09298030287027359,
-0.023938283324241638,
0.04789179190993309,
0.004442177247256041,
-0.11646111309528351,
0.22437159717082977,
-0.04701344668865204,
-0.10565052181482315,
0.023469999432563782,
0.009815233759582043,
0.12469276785850525,
0.1294376105070114,
-0.04121330380439758,
-0.09645028412342072,
-0.12183847278356552,
-0.24361015856266022,
0.06860901415348053,
0.1401491016149521,
-0.03338636830449104,
0.12278954684734344,
-0.09945271164178848,
0.09932322055101395,
-0.0006271846359595656,
0.07487715035676956,
0.032739657908678055,
0.16948997974395752,
-0.07046141475439072,
0.08916237205266953,
-0.2608698606491089,
-0.1348532885313034,
0.2047867476940155,
-0.11981517821550369,
-0.1688767820596695,
-0.01895752176642418,
-0.01422180701047182,
-0.10079989582300186,
0.15662086009979248,
-0.010338791646063328,
-0.09447167813777924,
1.1391617030660418e-34,
-0.07603635638952255,
0.04954198747873306,
0.017242010682821274,
-0.14877428114414215,
-0.040271345525979996,
-0.09223465621471405,
0.03358005732297897,
0.027272894978523254,
-0.10018665343523026,
-0.2268499881029129,
-0.1024947389960289
] |
https://github.com/huggingface/datasets/issues/5908 | Unbearably slow sorting on big mapped datasets | Hi ! `shard` currently returns a slow dataset by default, with examples evenly distributed in the dataset.
You can get a fast dataset using `contiguous=True` (which should be the default imo):
```python
dataset = dataset.shard(10, 0, contiguous=True)
```
This way you don't need to flatten_indices() and sort should be fast as well | ### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 52 | Unbearably slow sorting on big mapped datasets
### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Hi ! `shard` currently returns a slow dataset by default, with examples evenly distributed in the dataset.
You can get a fast dataset using `contiguous=True` (which should be the default imo):
```python
dataset = dataset.shard(10, 0, contiguous=True)
```
This way you don't need to flatten_indices() and sort should be fast as well | [
-0.020926209166646004,
0.14995591342449188,
-0.09500040113925934,
0.025046631693840027,
0.021287932991981506,
-0.05208745226264,
0.06299873441457748,
0.18619787693023682,
-0.12383133172988892,
0.11176997423171997,
0.01172923855483532,
-0.06562598794698715,
-0.08272072672843933,
-0.009492439217865467,
-0.147597536444664,
0.02753455936908722,
-0.028530534356832504,
-0.0145619697868824,
0.07031748443841934,
-0.1325082778930664,
-0.1291336566209793,
-0.09433209896087646,
0.04659833759069443,
-0.0867782011628151,
-0.08566677570343018,
-0.11469519883394241,
-0.1096593588590622,
0.0060689388774335384,
0.07858934998512268,
-0.058754194527864456,
-0.07691001892089844,
0.01536061242222786,
-0.1971932053565979,
0.24594798684120178,
0.0000051943070502602495,
-0.10435467213392258,
0.1274118274450302,
0.17816004157066345,
0.073800228536129,
0.21548312902450562,
0.13663949072360992,
-0.09456045925617218,
-0.05361802130937576,
-0.019537953659892082,
-0.08999594300985336,
0.0037790972273796797,
-0.03200983256101608,
-0.039927832782268524,
0.011273855343461037,
-0.10555634647607803,
-0.07821664959192276,
0.07869496941566467,
-0.13404656946659088,
-0.052455417811870575,
-0.005260772071778774,
-0.05349894240498543,
-0.0076580955646932125,
-0.005476239137351513,
-0.06029273197054863,
0.02205001190304756,
0.07897213101387024,
-0.02027084119617939,
0.14067520201206207,
0.16520462930202484,
0.00816952995955944,
0.22704669833183289,
-0.11649056524038315,
0.12542366981506348,
-0.003269134322181344,
0.29110822081565857,
-0.37645474076271057,
0.045636970549821854,
0.05021977424621582,
0.009407872334122658,
-0.1863788366317749,
-0.042048562318086624,
0.06084147095680237,
0.09708217531442642,
-0.10390646755695343,
-0.13245190680027008,
-0.050925057381391525,
0.06897212564945221,
0.074121855199337,
0.055982206016778946,
-0.19454635679721832,
0.019336674362421036,
0.037982914596796036,
0.015424865297973156,
0.04597289860248566,
0.008062531240284443,
0.018601568415760994,
-0.044447094202041626,
-0.08299124240875244,
0.011272060684859753,
-0.20729680359363556,
-0.027288587763905525,
0.13578273355960846,
-0.13440154492855072,
0.01612829975783825,
-0.07194719463586807,
-0.05720924213528633,
0.0688629001379013,
-0.017704829573631287,
-0.029140489175915718,
-0.11002306640148163,
0.003433572594076395,
-0.055615369230508804,
-0.12843547761440277,
0.13180655241012573,
0.058725398033857346,
-0.05271982401609421,
0.15437938272953033,
-0.11088868230581284,
-0.06710300594568253,
0.08931847661733627,
-0.030726401135325432,
0.11511225998401642,
-0.041050054132938385,
0.13995814323425293,
0.003786712419241667,
0.04530135169625282,
0.08533637970685959,
0.042754944413900375,
0.017812548205256462,
-0.03686077520251274,
0.037472356110811234,
-0.12495383620262146,
-0.04280939698219299,
-0.16642342507839203,
0.17434145510196686,
-0.06553395092487335,
-0.08591973036527634,
0.15391705930233002,
0.06631344556808472,
0.0006174613954499364,
-0.1109180599451065,
-0.14022038877010345,
-0.017616836354136467,
0.040385354310274124,
-0.06069028005003929,
-0.009586173109710217,
0.06409513205289841,
0.05740843713283539,
-0.03492855280637741,
0.0836360976099968,
0.16214372217655182,
-0.0010766644263640046,
0.12144282460212708,
-0.05165434256196022,
-0.036811210215091705,
-0.273960143327713,
0.029809070751070976,
-0.04190310090780258,
0.03747238963842392,
-0.15280887484550476,
0.1251322627067566,
0.14709007740020752,
-0.2340288609266281,
-0.06380990147590637,
-0.03466115891933441,
-0.10662543773651123,
-0.08271325379610062,
-0.0905766561627388,
-0.05392396077513695,
0.08195417374372482,
0.030209042131900787,
0.05419266223907471,
0.2111997902393341,
-0.20584306120872498,
0.08373738825321198,
0.15983374416828156,
0.032104142010211945,
-0.0358610562980175,
0.07934638857841492,
0.04003024473786354,
0.0532786063849926,
-0.173394575715065,
-0.008485401049256325,
-0.2721398174762726,
0.12431824207305908,
-0.0293025691062212,
-0.020800543949007988,
-0.0459495447576046,
-0.04725285992026329,
0.3129526674747467,
-0.0967523604631424,
0.1964462399482727,
0.22961218655109406,
0.027352694422006607,
-0.0011848865542560816,
0.00979958288371563,
0.006948262453079224,
-0.08471366763114929,
0.08369706571102142,
-0.08792246133089066,
-0.08556664735078812,
0.07298982888460159,
-0.055034734308719635,
0.07230591773986816,
-0.13826197385787964,
-0.11784033477306366,
0.16373789310455322,
-0.12568539381027222,
0.060932863503694534,
-0.06090685352683067,
-0.058822061866521835,
-0.18330588936805725,
0.23491452634334564,
0.07655631750822067,
-0.1549954116344452,
-0.004677425604313612,
0.058510392904281616,
-0.018095381557941437,
0.09516586363315582,
-0.084298275411129,
0.004639822524040937,
-0.09776801615953445,
0.038744185119867325,
-0.009157203137874603,
0.10015933960676193,
0.005120145156979561,
0.032743193209171295,
-0.01202383078634739,
0.017897803336381912,
-0.06618230789899826,
0.03312249481678009,
0.006721227429807186,
0.07955673336982727,
0.12358953803777695,
0.0070594679564237595,
-0.07094110548496246,
-0.15924732387065887,
0.21421417593955994,
-0.07481366395950317,
-0.07646200060844421,
0.08240992575883865,
0.03644454851746559,
-0.17413806915283203,
0.047990553081035614,
0.09460615366697311,
-0.17814901471138,
0.0773405060172081,
-0.08712630718946457,
-0.05555132031440735,
0.0006030109361745417,
0.07618964463472366,
-0.003548267064616084,
0.08309263736009598,
-0.0024945326149463654,
0.014823969453573227,
-0.051609527319669724,
-0.008389300666749477,
0.06896992027759552,
-0.06552688032388687,
0.12515586614608765,
-0.018161112442612648,
0.2269190400838852,
0.08842665702104568,
0.12030375748872757,
0.15150287747383118,
0.40203237533569336,
0.02076924405992031,
-0.003364207223057747,
-0.06822142004966736,
-0.022528717294335365,
0.012855191715061665,
-0.0029347394593060017,
0.03423440828919411,
-0.06803061068058014,
0.10667826980352402,
0.12380491942167282,
-0.07331863045692444,
-0.03127089887857437,
0.0010167834116145968,
-0.09408324211835861,
-0.10681907087564468,
-0.10206212103366852,
0.03249591588973999,
0.004176869988441467,
0.052758168429136276,
0.008955801837146282,
-0.053293805569410324,
0.07797346264123917,
0.03831876441836357,
0.03889256343245506,
-0.09971106052398682,
-0.09526405483484268,
0.11592312157154083,
0.03114587627351284,
0.03296289220452309,
0.01067516952753067,
-0.19908472895622253,
-0.1282230019569397,
-0.13482411205768585,
0.060824815183877945,
0.07721833884716034,
0.12856018543243408,
-0.09781930595636368,
0.020603828132152557,
-0.10424605011940002,
-0.021520940586924553,
0.025616968050599098,
0.06254809349775314,
0.04193507507443428,
0.1326846182346344,
0.17865557968616486,
-0.012504810467362404,
-0.06919756531715393,
-0.2960091233253479,
0.19546841084957123,
-0.10082294046878815,
-0.025349823758006096,
0.012484755367040634,
0.03281367942690849,
-0.04817955940961838,
-0.016010362654924393,
-0.1588059663772583,
-0.06853826344013214,
0.1520991176366806,
0.017554985359311104,
-0.15422995388507843,
0.1429220587015152,
-0.22874568402767181,
-0.10792550444602966,
-0.038294557482004166,
0.034172121435403824,
0.052977535873651505,
0.05294989049434662,
-0.12138250470161438,
0.012454109266400337,
0.08760206401348114,
-0.0037327350582927465,
-0.149321511387825,
0.03291064500808716,
0.09767196327447891,
-0.11452542990446091,
-0.038210947066545486,
-0.17074772715568542,
0.3416880667209625,
0.14952555298805237,
-0.0677434429526329,
-0.059134434908628464,
-0.09275692701339722,
-0.15923811495304108,
0.14993417263031006,
-0.1312551200389862,
0.06326945126056671,
-0.38874250650405884,
0.10823480039834976,
0.2650282680988312,
-0.07008474320173264,
0.15193049609661102,
-0.07887117564678192,
-0.16039428114891052,
-0.038250140845775604,
0.00753599451854825,
-0.09458550810813904,
0.013704394921660423,
-0.10799728333950043,
0.07083200663328171,
0.0340394452214241,
0.05273978039622307,
0.17174942791461945,
0.10504165291786194,
-0.07484778016805649,
-0.12963542342185974,
-0.05496401712298393,
-0.09576354175806046,
-0.07681915163993835,
-0.17704597115516663,
-0.0097733736038208,
0.044456180185079575,
-0.14501288533210754,
0.00922215636819601,
0.12847550213336945,
0.06768778711557388,
0.11830562353134155,
-0.08824601769447327,
0.20945622026920319,
-0.0900278389453888,
0.15711817145347595,
-0.055350348353385925,
-0.10171112418174744,
0.03992288187146187,
0.03828859701752663,
0.05648842081427574,
-0.10594439506530762,
-0.013705441728234291,
-0.1536637395620346,
0.055423006415367126,
0.015232444740831852,
-0.08886556327342987,
0.11865445971488953,
-0.07917438447475433,
-0.11935476213693619,
0.00795174203813076,
0.03355412557721138,
0.006351978983730078,
0.013637373223900795,
0.0947081595659256,
0.06073763966560364,
0.16225501894950867,
0.0950729101896286,
0.21862097084522247,
0.09768246859312057,
-0.1623724400997162,
-0.13072620332241058,
0.1087714210152626,
0.17471249401569366,
-0.037595223635435104,
0.17871172726154327,
0.30447593331336975,
0.03204624727368355,
-0.06278329342603683,
0.1884816288948059,
-0.05226334184408188,
-0.015401743352413177,
0.0938701406121254,
-0.043991655111312866,
-0.14780859649181366,
0.050677310675382614,
-0.19936291873455048,
-0.09218722581863403,
0.023974379524588585,
0.11326583474874496,
0.07615748047828674,
-0.12581400573253632,
-0.12115658074617386,
0.13138730823993683,
0.018942924216389656,
-0.021445315331220627,
-0.05355091392993927,
0.16753940284252167,
0.11581981182098389,
0.2854114770889282,
-0.3098839223384857,
0.21489323675632477,
-0.017989810556173325,
-0.13837513327598572,
0.04108265042304993,
-0.1570519506931305,
0.04114225134253502,
0.0668771043419838,
-0.05651881545782089,
0.07629472017288208,
-0.0754033550620079,
-0.05862974375486374,
-0.05392034724354744,
0.011849522590637207,
-0.009605750441551208,
-0.08027809113264084,
-0.2137645184993744,
0.012362632900476456,
-0.1783156841993332,
0.15551288425922394,
0.030850255861878395,
0.10340961068868637,
-0.19731181859970093,
0.09324700385332108,
0.14696726202964783,
-0.28085002303123474,
-0.01180260069668293,
-0.06658729910850525,
0.033403296023607254,
-0.01581123098731041,
0.04550052434206009,
-0.029676510021090508,
-0.019670521840453148,
0.04640010744333267,
-0.10623809695243835,
-0.25523263216018677,
0.034627802670001984,
0.06474899500608444,
0.047429703176021576,
0.13398148119449615,
0.004274600651115179,
-0.045108452439308167,
0.02707822248339653,
0.05709485709667206,
-0.07694915682077408,
0.25673067569732666,
0.15720079839229584,
-0.04627932608127594,
-0.20782695710659027,
-0.03482073172926903,
0.16920581459999084,
-0.06307046860456467,
0.02859019674360752,
-0.08765432983636856,
-0.08554507046937943,
0.05651159957051277,
0.1664494127035141,
-0.07375900447368622,
0.17568683624267578,
0.140194833278656,
-0.1166696771979332,
0.022102659568190575,
-0.05524402856826782,
-0.04254067316651344,
0.03053429163992405,
0.13458572328090668,
-0.1480150669813156,
0.07842466980218887,
-0.08637405931949615,
0.01647952012717724,
0.023962365463376045,
-0.06176116317510605,
-0.10555990785360336,
0.10464124381542206,
-0.11712265014648438,
-0.09676159173250198,
0.1306607723236084,
-0.25200098752975464,
-0.11901955306529999,
0.03940276801586151,
-0.0737992599606514,
-0.032557860016822815,
-0.008797322399914265,
0.13192440569400787,
-0.060487426817417145,
0.11611722409725189,
0.08439531177282333,
0.03438478335738182,
0.08096814155578613,
0.04302041977643967,
-0.008707176893949509,
-0.04653575271368027,
-0.054170090705156326,
0.3315604031085968,
0.16583895683288574,
0.2581281363964081,
0.0584590844810009,
0.1502264440059662,
0.0663023367524147,
-0.09018358588218689,
0.17682863771915436,
0.06179840490221977,
-0.04253337159752846,
-0.04998388513922691,
-0.07733692228794098,
0.014898763038218021,
-0.016748832538723946,
-0.12797904014587402,
0.1343565732240677,
-0.029965709894895554,
-0.16952019929885864,
-0.04660670831799507,
-0.00683610001578927,
-0.021041247993707657,
-0.04433942213654518,
0.01665082387626171,
-0.03725898265838623,
-0.12002767622470856,
-0.15937773883342743,
-0.03827567398548126,
-2.4478824969309484e-32,
-0.07917079329490662,
-0.06539999693632126,
-0.07328245043754578,
-0.09250960499048233,
-0.09915773570537567,
0.09232277423143387,
-0.12618085741996765,
-0.12630894780158997,
-0.033642832189798355,
-0.030145976692438126,
-0.19566087424755096,
0.20359604060649872,
0.03257197141647339,
-0.032768525183200836,
-0.06173166260123253,
0.024116139858961105,
0.16433991491794586,
-0.012566275894641876,
-0.20458097755908966,
0.07331746071577072,
0.16008897125720978,
0.014049378223717213,
-0.05782466009259224,
-0.027065156027674675,
-0.1701454520225525,
0.014937608502805233,
0.048283353447914124,
-0.14438076317310333,
-0.06947492063045502,
-0.25475066900253296,
-0.09987549483776093,
0.18785753846168518,
-0.010985304601490498,
-0.031465332955121994,
0.011904735118150711,
-0.09392135590314865,
-0.06896605342626572,
0.16249379515647888,
0.009319763630628586,
0.04472433403134346,
0.055924706161022186,
0.1091376543045044,
0.09476125240325928,
0.002944291103631258,
0.005518392194062471,
-0.07553432136774063,
0.02484048716723919,
0.024428468197584152,
-0.20186331868171692,
0.08385106921195984,
0.008922451175749302,
0.036796245723962784,
0.04533495381474495,
0.019811555743217468,
0.00365734426304698,
-0.20420654118061066,
0.06716211140155792,
0.11446297913789749,
-0.15181216597557068,
-0.012791227549314499,
0.08366526663303375,
0.1509532928466797,
-0.13754412531852722,
0.010780352167785168,
-0.005776664707809687,
-0.06529273092746735,
0.5212922096252441,
0.2117646485567093,
0.17906291782855988,
-0.04234790429472923,
0.09545937180519104,
0.04303450509905815,
-0.035925935953855515,
-0.18129409849643707,
0.11463969945907593,
-0.05183080956339836,
-0.0650496855378151,
0.13569138944149017,
0.14079321920871735,
-0.019096365198493004,
-0.004814763553440571,
-0.15097127854824066,
-0.012631649151444435,
0.0967884510755539,
0.000990958185866475,
0.05542043223977089,
0.02411302737891674,
0.19324642419815063,
-0.01479711476713419,
-0.12151233851909637,
-0.018809808418154716,
0.08914121985435486,
-0.16326695680618286,
-0.023781880736351013,
-0.0898948535323143,
0.11492984741926193,
-0.13826970756053925,
0.27300339937210083,
-0.17448082566261292,
-0.015760477632284164,
-0.11041687428951263,
0.05685369670391083,
0.0022298519033938646,
0.006932580843567848,
0.20458686351776123,
-0.00924938265234232,
0.09489359706640244,
-0.02419891767203808,
-0.13680888712406158,
-0.10326682776212692,
-0.016429435461759567,
0.04740368202328682,
0.013413352891802788,
0.0912356898188591,
0.03412536904215813,
-0.129563108086586,
0.12202468514442444,
-0.007596784271299839,
0.115097276866436,
0.22706207633018494,
-0.013357577845454216,
-0.08869864046573639,
-0.00011107150203315541,
0.0013691817875951529,
0.1429695338010788,
0.04884425550699234,
-0.14331349730491638,
-0.02204262465238571,
-0.03351736068725586,
-0.13779112696647644,
-0.062454987317323685,
-0.08375371992588043,
7.400947197311325e-7,
-0.11224720627069473,
0.2950049936771393,
-0.018042169511318207,
0.05959705635905266,
0.03427576273679733,
0.019109565764665604,
-0.10833743959665298,
-0.006683007348328829,
-0.05979113280773163,
0.13932698965072632,
0.15086853504180908,
0.03311352804303169,
0.1501874029636383,
0.023614652454853058,
0.20560471713542938,
-0.38939693570137024,
-0.16104407608509064,
0.032274916768074036,
-0.1913425773382187,
0.07916044443845749,
-0.07387107610702515,
-0.022090692073106766,
-0.19194288551807404,
-0.03945561498403549,
0.1882372349500656,
-0.005481043364852667,
0.014970341697335243,
-0.03343574330210686,
0.157831609249115,
-0.035073939710855484,
0.057919181883335114,
-0.08886730670928955,
-0.04663887992501259,
0.04563063383102417,
0.027205217629671097,
0.032042957842350006,
-0.15037715435028076,
0.02142651006579399,
0.04736199602484703,
0.06533464044332504,
-0.011817232705652714,
-0.10760688781738281,
0.03756454586982727,
-0.028273165225982666,
0.01731681078672409,
0.11632811278104782,
-0.1346529871225357,
0.31786972284317017,
0.061703070998191833,
0.057555265724658966,
-0.06371184438467026,
0.25253838300704956,
-0.013359539210796356,
0.1294136643409729,
0.03636045381426811,
-0.2487267404794693,
0.014090200886130333,
-0.18416520953178406,
-0.09586238861083984,
0.0011683253105729818,
0.031225547194480896,
-0.07557571679353714,
-0.11099575459957123,
0.14367079734802246,
0.12616340816020966,
0.01718980260193348,
-0.17196841537952423,
7.043544356999766e-35,
-0.024387255311012268,
0.11418846249580383,
0.16303621232509613,
-0.17991642653942108,
-0.060455918312072754,
-0.06309445947408676,
0.060026369988918304,
-0.02428538352251053,
-0.20677168667316437,
-0.232293501496315,
-0.044658273458480835
] |
https://github.com/huggingface/datasets/issues/5908 | Unbearably slow sorting on big mapped datasets | @lhoestq
> contiguous=True (which should be the default imo)
For `IterableDataset`, it's not possible to implement contiguous sharding without knowing the number of examples in advance, so setting the default value to `contiguous=True` would result in an inconsistency between `Dataset` and `IterableDataset` (when we add `IterableDataset.shard`) | ### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 46 | Unbearably slow sorting on big mapped datasets
### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
@lhoestq
> contiguous=True (which should be the default imo)
For `IterableDataset`, it's not possible to implement contiguous sharding without knowing the number of examples in advance, so setting the default value to `contiguous=True` would result in an inconsistency between `Dataset` and `IterableDataset` (when we add `IterableDataset.shard`) | [
-0.03368847072124481,
0.14862067997455597,
-0.1021367758512497,
0.004558394197374582,
0.00934509001672268,
-0.04715031012892723,
0.08256864547729492,
0.17872291803359985,
-0.12469253689050674,
0.11801543831825256,
-0.003777520265430212,
-0.09219695627689362,
-0.0794069916009903,
-0.08262591809034348,
-0.15995454788208008,
0.02298404648900032,
-0.01052344124764204,
-0.010777647607028484,
0.015904150903224945,
-0.14592480659484863,
-0.13158713281154633,
-0.06820188462734222,
0.03401193767786026,
-0.09830990433692932,
-0.07909432053565979,
-0.10855074226856232,
-0.1099255234003067,
-0.010852311737835407,
0.08987591415643692,
-0.05012181028723717,
-0.07803989201784134,
0.030764520168304443,
-0.18476366996765137,
0.2030307948589325,
0.00000506247897646972,
-0.10124471038579941,
0.1034649908542633,
0.16203156113624573,
0.05669968202710152,
0.2266109436750412,
0.14614355564117432,
-0.0847458690404892,
-0.06257132440805435,
-0.019817732274532318,
-0.07924594730138779,
0.013528009876608849,
-0.046794869005680084,
-0.0658273696899414,
-0.02709704451262951,
-0.1264038383960724,
-0.07028501480817795,
0.0767364576458931,
-0.1580948680639267,
-0.06101090833544731,
-0.034689679741859436,
-0.045988522469997406,
0.003001637291163206,
0.03137722611427307,
-0.060243088752031326,
0.013111705891788006,
0.09723544865846634,
-0.0170398261398077,
0.15134654939174652,
0.16589978337287903,
-0.013417341746389866,
0.20355351269245148,
-0.09406502544879913,
0.13814611732959747,
0.007276667281985283,
0.2655058205127716,
-0.35625535249710083,
0.030638979747891426,
0.04947790503501892,
0.014118039980530739,
-0.20327584445476532,
-0.06618158519268036,
0.05213227868080139,
0.11089484393596649,
-0.09821826964616776,
-0.14628688991069794,
-0.03820781037211418,
0.0968971848487854,
0.08368797600269318,
0.05533241480588913,
-0.19010093808174133,
0.030205726623535156,
0.02296946756541729,
0.025979047641158104,
0.04088817909359932,
0.009411506354808807,
0.014335786923766136,
-0.08502223342657089,
-0.09675891697406769,
0.024494551122188568,
-0.2159060835838318,
-0.013241088017821312,
0.1652822047472,
-0.11155254393815994,
0.039286211133003235,
-0.04334627836942673,
-0.04054558649659157,
0.06824847310781479,
-0.003361188108101487,
-0.02622159942984581,
-0.07454021275043488,
-0.02168157882988453,
-0.0798541009426117,
-0.13894011080265045,
0.12663626670837402,
0.05555848032236099,
-0.049889881163835526,
0.14399681985378265,
-0.07369525730609894,
-0.08509799838066101,
0.12384682148694992,
-0.044999878853559494,
0.12392524629831314,
-0.018726665526628494,
0.13583897054195404,
-0.022653276100754738,
0.006022885907441378,
0.03801645711064339,
0.051240064203739166,
-0.009375308640301228,
-0.02691012993454933,
0.03810807317495346,
-0.14282794296741486,
-0.03579886257648468,
-0.15222753584384918,
0.15645213425159454,
-0.07785064727067947,
-0.06851185113191605,
0.11578954011201859,
0.06348176300525665,
0.03139407932758331,
-0.07632944732904434,
-0.1360873430967331,
-0.0419832319021225,
0.02461872436106205,
-0.050911761820316315,
0.022809376940131187,
0.013208423741161823,
0.0524970181286335,
-0.036438919603824615,
0.0831124484539032,
0.15688063204288483,
-0.01113622821867466,
0.09393958747386932,
-0.05673837661743164,
-0.018331026658415794,
-0.2614906430244446,
0.05489382892847061,
-0.05146258324384689,
0.049363914877176285,
-0.1657494753599167,
0.14866194128990173,
0.1628221869468689,
-0.20133709907531738,
-0.09087880700826645,
-0.03943018987774849,
-0.08840794861316681,
-0.09572141617536545,
-0.10450087487697601,
-0.05703761801123619,
0.10658060759305954,
0.03865927457809448,
0.009029754437506199,
0.23316147923469543,
-0.1888452023267746,
0.09101107716560364,
0.1577649563550949,
0.01336914487183094,
-0.057483281940221786,
0.11262128502130508,
0.0027749326545745134,
0.05508936196565628,
-0.1471770852804184,
0.016556091606616974,
-0.29129788279533386,
0.12853042781352997,
-0.0036350993905216455,
0.018910115584731102,
-0.042175691574811935,
-0.07372994720935822,
0.30210059881210327,
-0.10839565098285675,
0.19925056397914886,
0.17931291460990906,
-0.0009825058514252305,
-0.013661940582096577,
0.008839845657348633,
0.009922906756401062,
-0.08845464885234833,
0.07687953859567642,
-0.06850843131542206,
-0.07416216284036636,
0.06273223459720612,
-0.057898227125406265,
0.08926454931497574,
-0.1389334499835968,
-0.11653189361095428,
0.1600840836763382,
-0.09789463877677917,
0.06381914764642715,
-0.038056258112192154,
-0.08305865526199341,
-0.19809654355049133,
0.2510780096054077,
0.12953540682792664,
-0.20205050706863403,
-0.02930966392159462,
0.0682072788476944,
-0.015382765792310238,
0.08758232742547989,
-0.10591267049312592,
-0.007793494034558535,
-0.10946573317050934,
0.07875072211027145,
0.014863355085253716,
0.10623954981565475,
-0.0061559127643704414,
0.048662811517715454,
0.004339895211160183,
0.014744061045348644,
-0.08301390707492828,
0.05525117367506027,
0.01937149278819561,
0.07238955795764923,
0.1273919939994812,
0.0075528668239712715,
-0.0722217783331871,
-0.17474748194217682,
0.2061208337545395,
-0.09632708877325058,
-0.08658982813358307,
0.08855422586202621,
0.03983510658144951,
-0.14907681941986084,
0.049922846257686615,
0.11391356587409973,
-0.19191735982894897,
0.040020912885665894,
-0.0836016982793808,
-0.03825276717543602,
-0.0022943904623389244,
0.05960230529308319,
-0.03421592339873314,
0.07050009071826935,
-0.00320950779132545,
-0.008563238196074963,
-0.06768645346164703,
0.000345563079463318,
0.06725862622261047,
-0.060480695217847824,
0.108309805393219,
-0.03839203715324402,
0.23392297327518463,
0.07554914802312851,
0.1251610815525055,
0.18580511212348938,
0.41234955191612244,
0.010562104173004627,
-0.01979951560497284,
-0.08432238548994064,
-0.02232537604868412,
0.01479690708220005,
0.0018363960552960634,
0.027444208040833473,
-0.031100429594516754,
0.10584535449743271,
0.1476457267999649,
-0.0740906149148941,
-0.03827071562409401,
-0.00620179483667016,
-0.09970872849225998,
-0.10021533817052841,
-0.1088574230670929,
0.039098966866731644,
0.012188496999442577,
0.07290273904800415,
-0.0017560342093929648,
-0.07072333991527557,
0.07096229493618011,
0.009578589349985123,
0.053452733904123306,
-0.09741435199975967,
-0.09242162853479385,
0.09485766291618347,
0.007385688833892345,
0.05720428004860878,
0.03050956502556801,
-0.2083001434803009,
-0.122101791203022,
-0.11219353973865509,
0.07721263915300369,
0.04322021082043648,
0.12262973934412003,
-0.0625641793012619,
0.02838081121444702,
-0.09677141159772873,
-0.025159824639558792,
0.024958478286862373,
0.04080546647310257,
0.028157969936728477,
0.1515817940235138,
0.15409694612026215,
-0.012682410888373852,
-0.064637690782547,
-0.3248332440853119,
0.17171992361545563,
-0.10373950749635696,
-0.02922697737812996,
0.01716654933989048,
0.012706619687378407,
-0.04066920652985573,
-0.0027656126767396927,
-0.15583598613739014,
-0.07736673951148987,
0.1770608127117157,
0.06432508677244186,
-0.12205038219690323,
0.1276034712791443,
-0.23160138726234436,
-0.11288817226886749,
-0.025981782004237175,
0.02003397047519684,
0.06733154505491257,
0.04689892381429672,
-0.09861703217029572,
0.0069211930967867374,
0.08246614038944244,
0.005367751698940992,
-0.1584949791431427,
0.04918583482503891,
0.12188179790973663,
-0.17576947808265686,
-0.046702854335308075,
-0.1552407145500183,
0.3592914342880249,
0.1275964379310608,
-0.06691507995128632,
-0.03420889377593994,
-0.09301827847957611,
-0.14491450786590576,
0.16221117973327637,
-0.14434503018856049,
0.06572511047124863,
-0.36793604493141174,
0.10916104167699814,
0.22753439843654633,
-0.10061798989772797,
0.13646338880062103,
-0.06133639067411423,
-0.14717718958854675,
-0.05419043451547623,
-0.013344372622668743,
-0.10708416253328323,
0.01919941045343876,
-0.09539822489023209,
0.0955396294593811,
0.05116945505142212,
0.06950012594461441,
0.18503990769386292,
0.1257094442844391,
-0.04826498404145241,
-0.10823264718055725,
-0.03172549605369568,
-0.13078218698501587,
-0.0778902992606163,
-0.17082500457763672,
0.02701243944466114,
0.036030810326337814,
-0.13161878287792206,
0.00425382424145937,
0.10965341329574585,
0.06049664691090584,
0.12199890613555908,
-0.0747188851237297,
0.2290678769350052,
-0.10958075523376465,
0.16525393724441528,
-0.062033917754888535,
-0.08826602250337601,
0.06504204869270325,
0.0520099475979805,
0.0625716894865036,
-0.12814010679721832,
-0.013007095083594322,
-0.13946062326431274,
0.08907134085893631,
0.03146308287978172,
-0.07410014420747757,
0.169150710105896,
-0.08844900131225586,
-0.11471394449472427,
0.015846816822886467,
0.038837600499391556,
0.022593773901462555,
-0.01827901601791382,
0.1283206343650818,
0.056748826056718826,
0.19241946935653687,
0.08016140758991241,
0.23797808587551117,
0.10555409640073776,
-0.17156283557415009,
-0.12190216034650803,
0.07430467754602432,
0.18065549433231354,
-0.002784077310934663,
0.1866193264722824,
0.28855422139167786,
0.026145681738853455,
-0.09712636470794678,
0.1833057999610901,
-0.045951779931783676,
-0.0031236677896231413,
0.08387962728738785,
-0.014554359950125217,
-0.14024227857589722,
0.03785615414381027,
-0.2156793773174286,
-0.09880426526069641,
0.03685536980628967,
0.14042061567306519,
0.08522729575634003,
-0.12279412895441055,
-0.1340385526418686,
0.14249423146247864,
0.04233522713184357,
-0.012225383892655373,
-0.04684316739439964,
0.1962992548942566,
0.12589649856090546,
0.2903381288051605,
-0.26973262429237366,
0.20505361258983612,
-0.02618786133825779,
-0.12118624150753021,
0.08181805908679962,
-0.15148118138313293,
0.032132357358932495,
0.10429398715496063,
-0.08198634535074234,
0.07347173988819122,
-0.11221562325954437,
-0.06606540828943253,
-0.07315916568040848,
0.022403821349143982,
0.0050443364307284355,
-0.08363285660743713,
-0.22381670773029327,
0.025024108588695526,
-0.20250476896762848,
0.17397688329219818,
0.025201687589287758,
0.09907585382461548,
-0.20812539756298065,
0.09606586396694183,
0.1372605860233307,
-0.30306193232536316,
-0.020614540204405785,
-0.013921873643994331,
0.02727491967380047,
-0.03123203106224537,
0.035095978528261185,
-0.03823399543762207,
-0.006738499738276005,
0.04491329938173294,
-0.08466310799121857,
-0.25891098380088806,
0.03283011540770531,
0.0707576647400856,
0.06599307805299759,
0.17207524180412292,
0.021913262084126472,
-0.06500362604856491,
0.05394580215215683,
0.04509787634015083,
-0.08640392124652863,
0.2621520161628723,
0.12760615348815918,
-0.06388377398252487,
-0.1522098332643509,
-0.010156855918467045,
0.19734056293964386,
-0.06362856179475784,
0.03402110934257507,
-0.10173974186182022,
-0.08156769722700119,
0.07706692814826965,
0.14875268936157227,
-0.07626707851886749,
0.19583407044410706,
0.11941343545913696,
-0.09616980701684952,
0.012612981721758842,
-0.013774829916656017,
-0.04908764734864235,
0.055218543857336044,
0.11156702786684036,
-0.15312859416007996,
0.08134636282920837,
-0.08148237317800522,
0.021404294297099113,
0.03648705035448074,
-0.0787244364619255,
-0.08508897572755814,
0.08802676945924759,
-0.10657165944576263,
-0.08557286113500595,
0.16164889931678772,
-0.23491083085536957,
-0.08212937414646149,
0.03647233545780182,
-0.08554986119270325,
-0.05369265004992485,
-0.0050154575146734715,
0.1392979621887207,
-0.0592588409781456,
0.10616545379161835,
0.08935439586639404,
0.022717414423823357,
0.07968349754810333,
0.05493280291557312,
-0.00553873460739851,
-0.025610007345676422,
-0.04670898616313934,
0.34246379137039185,
0.15943965315818787,
0.24946871399879456,
0.05097510293126106,
0.14756444096565247,
0.09272812306880951,
-0.08786925673484802,
0.15697583556175232,
0.0782645046710968,
-0.02477356046438217,
-0.043958671391010284,
-0.08967934548854828,
0.07600181549787521,
-0.006593835074454546,
-0.10757811367511749,
0.10503020137548447,
-0.04067721962928772,
-0.16232742369174957,
-0.040525153279304504,
-0.0009054443798959255,
-0.004186796955764294,
-0.038575317710638046,
0.005807867273688316,
-0.0423349104821682,
-0.14578554034233093,
-0.16245336830615997,
-0.011756525374948978,
-2.469277522673471e-32,
-0.09192255139350891,
-0.04283452033996582,
-0.07576964795589447,
-0.11788518726825714,
-0.08966300636529922,
0.08286529779434204,
-0.136870339512825,
-0.12050571292638779,
-0.009793590754270554,
-0.03499902784824371,
-0.20008590817451477,
0.21424788236618042,
0.03315470367670059,
-0.03984017297625542,
-0.06329405307769775,
0.03316662088036537,
0.1772795021533966,
-0.009412719868123531,
-0.19551870226860046,
0.0827413871884346,
0.13452959060668945,
0.007449594791978598,
-0.072124183177948,
-0.046286989003419876,
-0.1696949601173401,
-0.004721979144960642,
0.0373687669634819,
-0.12130721658468246,
-0.09724275767803192,
-0.25183969736099243,
-0.09259741008281708,
0.18445077538490295,
-0.03174411877989769,
-0.050216566771268845,
0.018654966726899147,
-0.09509695321321487,
-0.12338268756866455,
0.1306053102016449,
0.01855923980474472,
0.06492201238870621,
0.05062638968229294,
0.10026314854621887,
0.0765390694141388,
-0.022820139303803444,
0.005382620729506016,
-0.08133555948734283,
-0.03341803327202797,
0.02229841984808445,
-0.18289585411548615,
0.049461401998996735,
0.02870785817503929,
0.05853524059057236,
0.04104036092758179,
0.041348930448293686,
0.026390934363007545,
-0.2105425000190735,
0.05990510806441307,
0.11789070814847946,
-0.19140316545963287,
-0.020746195688843727,
0.0915520042181015,
0.1411736011505127,
-0.10648910701274872,
-0.0003792370262090117,
-0.006426943000406027,
-0.07408102601766586,
0.5409910678863525,
0.20915932953357697,
0.1472150683403015,
-0.029490521177649498,
0.04522846266627312,
0.028762277215719223,
-0.05925104394555092,
-0.21123863756656647,
0.07332685589790344,
0.002690476132556796,
-0.09812953323125839,
0.09530048072338104,
0.057899489998817444,
-0.012537633068859577,
0.005892373621463776,
-0.12942054867744446,
-0.04047832638025284,
0.09713385254144669,
-0.010132252238690853,
0.02787562645971775,
0.02895677275955677,
0.14480994641780853,
-0.005886474624276161,
-0.15146003663539886,
-0.04374493658542633,
0.08182662725448608,
-0.18714429438114166,
-0.020545372739434242,
-0.09976666420698166,
0.11851421743631363,
-0.1689445972442627,
0.26039740443229675,
-0.16522414982318878,
-0.002669414272531867,
-0.1354692131280899,
0.03441045433282852,
-0.011406084522604942,
-0.005112295504659414,
0.19849953055381775,
0.018843017518520355,
0.09675490856170654,
-0.012228862382471561,
-0.13598425686359406,
-0.08449535071849823,
0.011960863135755062,
0.07506737858057022,
-0.0021563752088695765,
0.08428201079368591,
0.0445675291121006,
-0.13615690171718597,
0.1340748518705368,
0.02234910987317562,
0.14052031934261322,
0.2144961953163147,
-0.03828243166208267,
-0.10051329433917999,
-0.023743892088532448,
0.040228426456451416,
0.17808036506175995,
0.0501587800681591,
-0.13801173865795135,
-0.06809701025485992,
-0.04862014949321747,
-0.13741476833820343,
-0.05554664880037308,
-0.08251100033521652,
7.288500682989252e-7,
-0.1211031824350357,
0.3024059534072876,
-0.013413089327514172,
0.04186307638883591,
0.059387028217315674,
0.005385568831115961,
-0.09272558987140656,
-0.03137507289648056,
-0.08141083270311356,
0.178851917386055,
0.1642308384180069,
0.05488479882478714,
0.1409020721912384,
0.019714340567588806,
0.24664898216724396,
-0.3675984740257263,
-0.14610004425048828,
0.06813648343086243,
-0.1876106560230255,
0.06472665816545486,
-0.03401196375489235,
-0.030821572989225388,
-0.194333016872406,
-0.0610981322824955,
0.16883502900600433,
-0.033757284283638,
0.0032654674723744392,
-0.032008733600378036,
0.13608716428279877,
-0.01472283061593771,
0.05169380456209183,
-0.08704306185245514,
-0.00839473120868206,
0.028625857084989548,
0.022094955667853355,
0.03963419049978256,
-0.16147536039352417,
0.06621763855218887,
0.03451594337821007,
0.08555189520120621,
-0.0006701076054014266,
-0.09838556498289108,
0.04674799367785454,
-0.02313018962740898,
0.05915132537484169,
0.10390415787696838,
-0.12709031999111176,
0.32213008403778076,
0.06012406200170517,
0.03763952478766441,
-0.04881276562809944,
0.2890656590461731,
0.0052071004174649715,
0.15050135552883148,
0.05997385457158089,
-0.23317384719848633,
-0.014954688958823681,
-0.20132778584957123,
-0.10199796408414841,
-0.01110810600221157,
0.0055073825642466545,
-0.04504035785794258,
-0.13948848843574524,
0.17677313089370728,
0.09986904263496399,
0.00273890164680779,
-0.19901032745838165,
6.392552945243869e-35,
-0.022931504994630814,
0.12732790410518646,
0.15097323060035706,
-0.170924112200737,
-0.04561029374599457,
-0.06440155953168869,
0.10415308177471161,
-0.003182510146871209,
-0.22499077022075653,
-0.22056061029434204,
-0.04467537999153137
] |
https://github.com/huggingface/datasets/issues/5908 | Unbearably slow sorting on big mapped datasets | Actually sharded iterable datasets are made of sub iterables that generally yield contiguous data no ? So in a way it's possible to shard an iterable dataset contiguously.
If the dataset is made of one shard it's indeed not possible to shard it contiguously though | ### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 45 | Unbearably slow sorting on big mapped datasets
### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Actually sharded iterable datasets are made of sub iterables that generally yield contiguous data no ? So in a way it's possible to shard an iterable dataset contiguously.
If the dataset is made of one shard it's indeed not possible to shard it contiguously though | [
-0.0021898720879107714,
0.12147658318281174,
-0.10067451745271683,
0.03433723375201225,
-0.017938178032636642,
-0.047678831964731216,
0.08175084739923477,
0.15049231052398682,
-0.15751993656158447,
0.1374451369047165,
0.012171633541584015,
-0.10101423412561417,
-0.0642930418252945,
-0.039380673319101334,
-0.15227311849594116,
0.0000712170367478393,
-0.03325335681438446,
-0.014180132187902927,
0.0050262948498129845,
-0.12371716648340225,
-0.11797858774662018,
-0.07309619337320328,
0.036286335438489914,
-0.08983996510505676,
-0.05938646197319031,
-0.0878109484910965,
-0.13179083168506622,
-0.007095483131706715,
0.1044827476143837,
-0.034205786883831024,
-0.08258354663848877,
-0.008370120078325272,
-0.19871023297309875,
0.22299398481845856,
0.00000510052223035018,
-0.056997597217559814,
0.12098506093025208,
0.17205043137073517,
0.044287096709012985,
0.2362453043460846,
0.1335260570049286,
-0.08588451147079468,
-0.06869202107191086,
-0.02930041402578354,
-0.06824032962322235,
0.031122392043471336,
-0.06030170992016792,
-0.05909712240099907,
0.006921361666172743,
-0.1368514597415924,
-0.07953812181949615,
0.12473542243242264,
-0.13432258367538452,
-0.04723246023058891,
-0.008119563572108746,
-0.05919889360666275,
-0.030286723747849464,
0.012835619039833546,
-0.08837781846523285,
0.039656106382608414,
0.09994997084140778,
-0.012144933454692364,
0.13905265927314758,
0.1726199835538864,
-0.013395940884947777,
0.20636574923992157,
-0.10802329331636429,
0.1187017634510994,
0.00904939416795969,
0.22719594836235046,
-0.36263608932495117,
0.047921061515808105,
0.0316428542137146,
0.0044655567035079,
-0.1829942911863327,
-0.054645389318466187,
0.046394649893045425,
0.11378788948059082,
-0.09795522689819336,
-0.12297327816486359,
-0.02292218804359436,
0.10637073218822479,
0.07439000904560089,
0.03305979073047638,
-0.21385695040225983,
0.012629014439880848,
0.0248549934476614,
0.0015374626964330673,
0.008431763388216496,
-0.005585849285125732,
0.03719150274991989,
-0.0644739493727684,
-0.08568320423364639,
0.022380435839295387,
-0.24364274740219116,
-0.01256285235285759,
0.14590874314308167,
-0.12154649943113327,
0.011249987408518791,
-0.028352167457342148,
-0.030701572075486183,
0.08310478925704956,
0.031314704567193985,
-0.011321664787828922,
-0.07196051627397537,
-0.014900373294949532,
-0.07942903786897659,
-0.17124105989933014,
0.09778588265180588,
0.054684992879629135,
-0.04256632924079895,
0.12404321134090424,
-0.07425184547901154,
-0.07134722173213959,
0.09170162677764893,
-0.0601622574031353,
0.12915635108947754,
-0.03386443853378296,
0.11966481059789658,
-0.008228975348174572,
-0.0164477601647377,
0.07489152997732162,
0.049373455345630646,
0.02323630265891552,
0.00650279363617301,
0.05743027478456497,
-0.13278183341026306,
-0.05234098806977272,
-0.14632613956928253,
0.14894433319568634,
-0.0656738132238388,
-0.0816769003868103,
0.1126088872551918,
0.04829108342528343,
0.007984342984855175,
-0.11322147399187088,
-0.15303687751293182,
-0.04347394406795502,
0.015490543097257614,
-0.051811955869197845,
0.0005817543133161962,
0.03378461301326752,
0.06687135249376297,
-0.03153463825583458,
0.08688687533140182,
0.15519049763679504,
-0.008020954206585884,
0.1167556419968605,
-0.03821807727217674,
-0.019940132275223732,
-0.27762672305107117,
0.0855071172118187,
-0.04298185184597969,
0.04309608414769173,
-0.19343607127666473,
0.11616027355194092,
0.1759331226348877,
-0.2237064391374588,
-0.0539194755256176,
-0.04156171530485153,
-0.09327155351638794,
-0.09635145962238312,
-0.11795003712177277,
-0.06895910948514938,
0.08972468227148056,
0.0459170937538147,
0.0426793098449707,
0.19029280543327332,
-0.18987853825092316,
0.07376336306333542,
0.15970484912395477,
0.03429668769240379,
-0.0048439414240419865,
0.07735168188810349,
0.030755849555134773,
0.14151309430599213,
-0.1525566279888153,
0.026794567704200745,
-0.2804458737373352,
0.1714266687631607,
-0.03477243706583977,
0.046141479164361954,
-0.011460335925221443,
-0.07638976722955704,
0.28737494349479675,
-0.1411912590265274,
0.1778116077184677,
0.17179587483406067,
0.0009457594132982194,
-0.01486401166766882,
0.0005154823884367943,
0.022729167714715004,
-0.0747460201382637,
0.08258802443742752,
-0.07129263132810593,
-0.062128402292728424,
0.07510700076818466,
-0.08091525733470917,
0.08652801066637039,
-0.1673506200313568,
-0.10135108977556229,
0.14769293367862701,
-0.10886247456073761,
0.06299903243780136,
-0.04454965516924858,
-0.07684213668107986,
-0.15155406296253204,
0.25477170944213867,
0.10988517105579376,
-0.1889888346195221,
0.007613032590597868,
0.04986618831753731,
-0.041235677897930145,
0.10872519761323929,
-0.10099776834249496,
-0.02451644279062748,
-0.1354135125875473,
0.0610235221683979,
-0.029297111555933952,
0.06446938961744308,
-0.03484354168176651,
0.05152861401438713,
-0.032957445830106735,
-0.0035086884163320065,
-0.10706812888383865,
0.03863562270998955,
-0.0007043408695608377,
0.09321531653404236,
0.1249234676361084,
0.0026817021425813437,
-0.08673729747533798,
-0.15414108335971832,
0.21489374339580536,
-0.08434643596410751,
-0.08278146386146545,
0.10186626017093658,
0.057192396372556686,
-0.16714628040790558,
0.03866388648748398,
0.10393171012401581,
-0.19501176476478577,
0.030394848436117172,
-0.07845082879066467,
-0.06104918196797371,
0.011459529399871826,
0.04738596826791763,
0.004627563059329987,
0.080839142203331,
0.008710531517863274,
0.009866222739219666,
-0.05742942541837692,
-0.002649509347975254,
0.0610942579805851,
-0.06619527190923691,
0.12710514664649963,
-0.041852351278066635,
0.2429860234260559,
0.09056594222784042,
0.12644211947917938,
0.16497868299484253,
0.4099966585636139,
0.011332942172884941,
-0.0263613723218441,
-0.09336994588375092,
-0.056588828563690186,
0.009894582442939281,
-0.011745247058570385,
0.06301067769527435,
-0.03665415197610855,
0.10679204761981964,
0.16087175905704498,
-0.08734288811683655,
-0.03671015799045563,
0.009288258850574493,
-0.08812399208545685,
-0.10175742954015732,
-0.12292785197496414,
0.04402555897831917,
-0.0035376488231122494,
0.06712839007377625,
0.02550186775624752,
-0.026321658864617348,
0.07723294198513031,
-0.007459498010575771,
0.05173809826374054,
-0.07268442958593369,
-0.070303775370121,
0.10956404358148575,
0.020610501989722252,
0.061361826956272125,
0.04296969994902611,
-0.2082781046628952,
-0.14612843096256256,
-0.11975818127393723,
0.08056104928255081,
0.03937128186225891,
0.15091024339199066,
-0.08663646876811981,
0.038270253688097,
-0.08723895996809006,
-0.02282428741455078,
0.002594822319224477,
0.051976416260004044,
0.03581467643380165,
0.1537446528673172,
0.14548678696155548,
-0.03011355921626091,
-0.08752014487981796,
-0.29677581787109375,
0.1769089251756668,
-0.10664036870002747,
-0.03903808072209358,
-0.0033953061792999506,
0.026875758543610573,
-0.030903222039341927,
-0.012400451116263866,
-0.16825436055660248,
-0.06051899492740631,
0.1598760038614273,
0.023729518055915833,
-0.14266833662986755,
0.15734197199344635,
-0.2218528538942337,
-0.11927945911884308,
-0.020629985257983208,
0.0333353653550148,
0.057705845683813095,
0.06871415674686432,
-0.07620607316493988,
0.024861956015229225,
0.07786401361227036,
0.027235550805926323,
-0.17264948785305023,
0.05460696294903755,
0.12178339809179306,
-0.1485806405544281,
-0.05380963534116745,
-0.14809095859527588,
0.3463471531867981,
0.1359158158302307,
-0.06832223385572433,
-0.05042485520243645,
-0.06746108829975128,
-0.15830162167549133,
0.17809464037418365,
-0.12667524814605713,
0.07572976499795914,
-0.3961471915245056,
0.08161778002977371,
0.24670536816120148,
-0.07915231585502625,
0.13924482464790344,
-0.07203689962625504,
-0.17449958622455597,
-0.06519724428653717,
-0.01316183153539896,
-0.10648557543754578,
-0.00499712023884058,
-0.10085166245698929,
0.10206754505634308,
0.03239855170249939,
0.08030378073453903,
0.20459066331386566,
0.11510063707828522,
-0.05774446204304695,
-0.10573253780603409,
-0.04607114940881729,
-0.10793204605579376,
-0.06465461105108261,
-0.1789884865283966,
0.02911324054002762,
0.02291320450603962,
-0.14060989022254944,
0.013547882437705994,
0.12337657809257507,
0.0679079070687294,
0.11594657599925995,
-0.07402298599481583,
0.20067726075649261,
-0.08044411242008209,
0.13911661505699158,
-0.049144383519887924,
-0.08632925152778625,
0.05704832449555397,
0.09300322085618973,
0.07838071137666702,
-0.11032471060752869,
-0.010662168264389038,
-0.14432990550994873,
0.0782007947564125,
0.0138923404738307,
-0.10649021714925766,
0.12590883672237396,
-0.0930265411734581,
-0.12204545736312866,
0.024761928245425224,
0.04248673841357231,
0.010601500980556011,
-0.046587247401475906,
0.11707819253206253,
0.05325901880860329,
0.165483295917511,
0.08931785076856613,
0.25965046882629395,
0.09069864451885223,
-0.19228020310401917,
-0.10137832164764404,
0.09014548361301422,
0.16965845227241516,
-0.012646548449993134,
0.15556541085243225,
0.2622976303100586,
0.031230682507157326,
-0.07153130322694778,
0.2049461454153061,
-0.051468174904584885,
-0.015101348981261253,
0.08920985460281372,
-0.022521398961544037,
-0.14348125457763672,
0.049277305603027344,
-0.20839844644069672,
-0.1026618629693985,
0.028147418051958084,
0.13139347732067108,
0.07641865313053131,
-0.12279719114303589,
-0.11877836287021637,
0.14746864140033722,
0.044760167598724365,
-0.032161060720682144,
-0.044734660536050797,
0.1720118671655655,
0.11737891286611557,
0.3169727325439453,
-0.2737272381782532,
0.213810995221138,
-0.008174440823495388,
-0.11555797606706619,
0.07939448207616806,
-0.1682385504245758,
0.021398358047008514,
0.11570527404546738,
-0.08085114508867264,
0.03418832644820213,
-0.059245020151138306,
-0.05784181132912636,
-0.0547296442091465,
0.020413342863321304,
0.015642911195755005,
-0.08211185783147812,
-0.20493203401565552,
0.02313379943370819,
-0.21871431171894073,
0.16189175844192505,
0.030499691143631935,
0.07351444661617279,
-0.22836098074913025,
0.10517487674951553,
0.1491481065750122,
-0.29931867122650146,
-0.016059013083577156,
-0.05197492986917496,
0.03262025862932205,
-0.017338529229164124,
0.0675249695777893,
-0.024160055443644524,
0.018824787810444832,
0.04344688728451729,
-0.10592930763959885,
-0.28508174419403076,
0.025947337970137596,
0.053690310567617416,
0.06467633694410324,
0.1544482707977295,
0.013959688134491444,
-0.05536920204758644,
0.038034532219171524,
0.09622371196746826,
-0.0789552628993988,
0.2664571702480316,
0.14410972595214844,
-0.04204758629202843,
-0.1793891340494156,
0.016631122678518295,
0.20328502357006073,
-0.055776435881853104,
0.005319337360560894,
-0.10688237845897675,
-0.08419039845466614,
0.072579026222229,
0.12525609135627747,
-0.06702488660812378,
0.22854775190353394,
0.09020079672336578,
-0.08688514679670334,
-0.032109931111335754,
-0.05726022273302078,
-0.019646350294351578,
0.03541208431124687,
0.10523807257413864,
-0.1399405598640442,
0.1027817651629448,
-0.09744627773761749,
0.014797951094806194,
0.03179996460676193,
-0.04009618982672691,
-0.09953261911869049,
0.10556993633508682,
-0.09366555511951447,
-0.10648267716169357,
0.1299043446779251,
-0.27248549461364746,
-0.10377002507448196,
0.06889817118644714,
-0.10281763225793839,
-0.043338023126125336,
-0.023981330916285515,
0.12532289326190948,
-0.060584161430597305,
0.10320053994655609,
0.08810467272996902,
0.0050975666381418705,
0.0673714429140091,
0.03219016268849373,
0.024143733084201813,
-0.026270052418112755,
-0.040323514491319656,
0.31153371930122375,
0.15405891835689545,
0.2644014060497284,
0.07107251137495041,
0.14564207196235657,
0.06099452078342438,
-0.08777649700641632,
0.12418492138385773,
0.07321801781654358,
-0.02488633245229721,
-0.04553790017962456,
-0.0928986668586731,
0.05133766308426857,
-0.012805054895579815,
-0.12196971476078033,
0.12735587358474731,
-0.021774036809802055,
-0.1771145761013031,
-0.06166738644242287,
0.026349909603595734,
-0.01184611301869154,
-0.05318344011902809,
0.025643033906817436,
-0.030538516119122505,
-0.12199011445045471,
-0.14210662245750427,
-0.011797940358519554,
-2.4414372614053898e-32,
-0.07682858407497406,
-0.04429823160171509,
-0.07033257931470871,
-0.05498877167701721,
-0.08437750488519669,
0.09779618680477142,
-0.14678595960140228,
-0.09701766818761826,
-0.019938038662075996,
-0.031359151005744934,
-0.21218743920326233,
0.22384901344776154,
0.03633119910955429,
-0.02032461203634739,
-0.06481809914112091,
0.02373426780104637,
0.1861010491847992,
-0.0343196764588356,
-0.19506078958511353,
0.08295142650604248,
0.14917755126953125,
-0.010156869888305664,
-0.07790069282054901,
0.007205400615930557,
-0.13887158036231995,
-0.016275670379400253,
0.023357989266514778,
-0.1265597641468048,
-0.07959655672311783,
-0.23421628773212433,
-0.10288698226213455,
0.18891237676143646,
-0.035069193691015244,
-0.009443978779017925,
0.0015702800592407584,
-0.06675614416599274,
-0.11272173374891281,
0.15030089020729065,
-0.014798454940319061,
0.057808972895145416,
0.0015298061771318316,
0.11996088176965714,
0.10644692182540894,
-0.014391984790563583,
0.014784829691052437,
-0.07956823706626892,
0.007422139868140221,
0.03618603199720383,
-0.20202681422233582,
0.058742325752973557,
0.032448697835206985,
0.03699324652552605,
0.039650704711675644,
0.004787129815667868,
0.047366928309202194,
-0.18984569609165192,
0.08170263469219208,
0.10787022113800049,
-0.18611542880535126,
-0.0032901617232710123,
0.10040494799613953,
0.1612519472837448,
-0.12662610411643982,
-0.0012776940129697323,
-0.013720732182264328,
-0.08362001180648804,
0.48438775539398193,
0.2067248523235321,
0.1832520216703415,
-0.04806358367204666,
0.049157943576574326,
0.030153891071677208,
-0.05503161624073982,
-0.21874839067459106,
0.12111963331699371,
-0.009392805397510529,
-0.09648419916629791,
0.10926553606987,
0.08089213073253632,
-0.0024403277784585953,
0.009071556851267815,
-0.13742738962173462,
-0.016339074820280075,
0.09580641984939575,
-0.00939944013953209,
0.009236151352524757,
0.019909508526325226,
0.171037957072258,
-0.02361169457435608,
-0.11093118786811829,
-0.009406891651451588,
0.12286035716533661,
-0.1819128394126892,
-0.024397097527980804,
-0.10897759348154068,
0.10554681718349457,
-0.16929243505001068,
0.24788393080234528,
-0.16332507133483887,
0.018036356195807457,
-0.12113086134195328,
0.04941129684448242,
-0.004181830212473869,
0.0063898563385009766,
0.17494824528694153,
-0.002289371332153678,
0.10510807484388351,
-0.002473260508850217,
-0.13750550150871277,
-0.08020027726888657,
0.012809563428163528,
0.08299939334392548,
-0.03480842337012291,
0.07659945636987686,
0.06028781831264496,
-0.14577336609363556,
0.1312350332736969,
-0.005280079320073128,
0.11915121972560883,
0.2315405160188675,
-0.028940442949533463,
-0.10814745724201202,
-0.04303747043013573,
0.012386786751449108,
0.14779746532440186,
0.057776644825935364,
-0.17737026512622833,
-0.059072598814964294,
-0.05481623858213425,
-0.13393627107143402,
-0.04251588135957718,
-0.053324293345212936,
7.352011834882433e-7,
-0.10539287328720093,
0.3001912534236908,
-0.0033133092802017927,
0.06957361102104187,
0.061798207461833954,
0.02588639408349991,
-0.09954334795475006,
-0.0030075155664235353,
-0.0900573879480362,
0.12799622118473053,
0.1403341442346573,
0.04257803037762642,
0.16916300356388092,
0.02518474869430065,
0.25303730368614197,
-0.37966907024383545,
-0.16294093430042267,
0.048666905611753464,
-0.2190992683172226,
0.06981918215751648,
-0.03525978699326515,
-0.026403378695249557,
-0.19769936800003052,
-0.0589723102748394,
0.19125136733055115,
-0.012587297707796097,
0.0492144376039505,
-0.028539611026644707,
0.12141939997673035,
-0.013033612631261349,
0.059304676949977875,
-0.05926571786403656,
-0.020518561825156212,
0.04677293077111244,
0.013151370920240879,
0.025537310168147087,
-0.17192679643630981,
0.03766203671693802,
0.05840671434998512,
0.0698518455028534,
-0.012625223957002163,
-0.114596426486969,
0.040899623185396194,
-0.006656949408352375,
0.029271820560097694,
0.097352534532547,
-0.13312877714633942,
0.30081906914711,
0.03742856904864311,
0.05249200388789177,
-0.05856945365667343,
0.2665750980377197,
-0.004334723576903343,
0.1448039561510086,
0.040734682232141495,
-0.22725051641464233,
0.01660153828561306,
-0.20185622572898865,
-0.09287905693054199,
0.007891523651778698,
0.0033722713124006987,
-0.021296044811606407,
-0.100645050406456,
0.1574651002883911,
0.10152313858270645,
0.02775728330016136,
-0.1956024318933487,
6.205490927232253e-35,
0.005922700744122267,
0.12479667365550995,
0.15427619218826294,
-0.21441859006881714,
-0.07958459109067917,
-0.05012785643339157,
0.05075838789343834,
-0.03342331945896149,
-0.24264225363731384,
-0.20550048351287842,
-0.048812899738550186
] |
https://github.com/huggingface/datasets/issues/5908 | Unbearably slow sorting on big mapped datasets | > Actually sharded iterable datasets are made of sub iterables that generally yield contiguous data no ? So in a way it's possible to shard an iterable dataset contiguously.
But sharding an iterable dataset by sharding its `gen_kwargs` would still yield approximate shards(not equal to `Dataset.shard`), no? | ### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 47 | Unbearably slow sorting on big mapped datasets
### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
> Actually sharded iterable datasets are made of sub iterables that generally yield contiguous data no ? So in a way it's possible to shard an iterable dataset contiguously.
But sharding an iterable dataset by sharding its `gen_kwargs` would still yield approximate shards(not equal to `Dataset.shard`), no? | [
-0.006635320372879505,
0.09148121625185013,
-0.10573208332061768,
0.04310291260480881,
-0.022332845255732536,
-0.03583291918039322,
0.09093495458364487,
0.13668490946292877,
-0.19335320591926575,
0.14649955928325653,
0.013230744749307632,
-0.1151716485619545,
-0.058150503784418106,
-0.02404182031750679,
-0.14352524280548096,
-0.0023992944043129683,
-0.027708232402801514,
-0.022887835279107094,
0.018205979838967323,
-0.12178515642881393,
-0.11670324206352234,
-0.06195059046149254,
0.039509303867816925,
-0.07305023819208145,
-0.03577272221446037,
-0.07724637538194656,
-0.13855105638504028,
0.0068654329515993595,
0.11882222443819046,
-0.040665652602910995,
-0.0797659382224083,
-0.01319955289363861,
-0.21875914931297302,
0.20517608523368835,
0.000005095024789625313,
-0.051649656146764755,
0.1387854814529419,
0.1742590218782425,
0.039837297052145004,
0.24375899136066437,
0.11312204599380493,
-0.08402660489082336,
-0.07543563842773438,
-0.0375225730240345,
-0.07054633647203445,
0.0272854994982481,
-0.06279121339321136,
-0.03694522753357887,
-0.010476612485945225,
-0.14467404782772064,
-0.0803314745426178,
0.11751189082860947,
-0.10664605349302292,
-0.03995424509048462,
0.010765483602881432,
-0.04142483323812485,
-0.0371532179415226,
0.027016373351216316,
-0.10666190832853317,
0.05753825977444649,
0.12080232053995132,
-0.00902574509382248,
0.12494153529405594,
0.169034942984581,
-0.0021935757249593735,
0.20181529223918915,
-0.127648264169693,
0.10979839414358139,
0.04038337245583534,
0.20843081176280975,
-0.3767205476760864,
0.021644672378897667,
0.02596707083284855,
0.000798428722191602,
-0.16751064360141754,
-0.05991898104548454,
0.04717947170138359,
0.12646172940731049,
-0.08753787726163864,
-0.11660058051347733,
-0.03348100930452347,
0.08315500617027283,
0.07600010186433792,
0.019505441188812256,
-0.19518087804317474,
0.03183197230100632,
0.03923465311527252,
-0.005332837346941233,
-0.02100463956594467,
-0.005647584330290556,
0.02989093028008938,
-0.07490601390600204,
-0.09975983947515488,
0.012149699963629246,
-0.2238500863313675,
-0.013713099993765354,
0.1290660798549652,
-0.08471021801233292,
-0.00010806133650476113,
-0.03537997975945473,
-0.04510553553700447,
0.081895612180233,
0.0522148497402668,
-0.01776289939880371,
-0.07141859829425812,
-0.026355424895882607,
-0.05110748112201691,
-0.1776590347290039,
0.09243330359458923,
0.05337955430150032,
-0.04400484263896942,
0.12517981231212616,
-0.06269554793834686,
-0.07762201130390167,
0.08498957008123398,
-0.05470919981598854,
0.10921112447977066,
-0.03135243058204651,
0.12241998314857483,
0.002385999308899045,
-0.013841580599546432,
0.07224307954311371,
0.03700103238224983,
0.03902208432555199,
0.011988716199994087,
0.040300771594047546,
-0.1675131767988205,
-0.056910689920186996,
-0.15136505663394928,
0.13639657199382782,
-0.06868241727352142,
-0.0785422995686531,
0.11994463950395584,
0.06146695464849472,
0.0035310150124132633,
-0.14320874214172363,
-0.15595105290412903,
-0.0550219900906086,
0.034969694912433624,
-0.043953634798526764,
0.006599585525691509,
0.04072484001517296,
0.07884514331817627,
-0.04153652489185333,
0.09121888875961304,
0.1678704023361206,
-0.019180819392204285,
0.10140568763017654,
-0.03551379591226578,
-0.015545645728707314,
-0.2848479449748993,
0.08576549589633942,
-0.017460498958826065,
0.06269750744104385,
-0.21532681584358215,
0.10707731544971466,
0.17814220488071442,
-0.22697387635707855,
-0.051657624542713165,
-0.061225634068250656,
-0.09651189297437668,
-0.11204098910093307,
-0.12999050319194794,
-0.0859450250864029,
0.09050377458333969,
0.04987151548266411,
0.04866449534893036,
0.174009308218956,
-0.1895170509815216,
0.0736638605594635,
0.16256266832351685,
0.026229262351989746,
-0.012097951956093311,
0.05960329249501228,
0.031135233119130135,
0.16629847884178162,
-0.13026870787143707,
0.05388965457677841,
-0.29239997267723083,
0.1844061017036438,
-0.020806673914194107,
0.04718586429953575,
0.004953626077622175,
-0.08327541500329971,
0.27802082896232605,
-0.14084221422672272,
0.1559055745601654,
0.16307106614112854,
-0.002379718003794551,
-0.011705946177244186,
-0.020912213250994682,
0.03158263489603996,
-0.07795720547437668,
0.08064544945955276,
-0.06624904274940491,
-0.05028791353106499,
0.08457589149475098,
-0.06897152215242386,
0.09744776785373688,
-0.175237238407135,
-0.11272101104259491,
0.15172865986824036,
-0.08430025726556778,
0.05249031260609627,
-0.03683893755078316,
-0.06600190699100494,
-0.13723863661289215,
0.26588308811187744,
0.09052285552024841,
-0.19415880739688873,
0.0051709008403122425,
0.03180564194917679,
-0.04752887040376663,
0.10805303603410721,
-0.11161710321903229,
-0.025747094303369522,
-0.13661310076713562,
0.06429877132177353,
-0.017997728660702705,
0.0767965167760849,
-0.027041176334023476,
0.0547877661883831,
-0.052502647042274475,
-0.008736389689147472,
-0.11542511731386185,
0.0473603680729866,
-0.02028406411409378,
0.07609762251377106,
0.1114140972495079,
0.00986625999212265,
-0.09187183529138565,
-0.1536465734243393,
0.2106165587902069,
-0.07132940739393234,
-0.06948675215244293,
0.10199740529060364,
0.05846145376563072,
-0.16270965337753296,
0.05011625960469246,
0.10879378765821457,
-0.15934798121452332,
0.010711961425840855,
-0.07283758372068405,
-0.048941534012556076,
0.037878088653087616,
0.06507376581430435,
0.009914900176227093,
0.07492639124393463,
0.0221832524985075,
-0.012005319818854332,
-0.05882585048675537,
-0.003402604488655925,
0.06024450063705444,
-0.05472137778997421,
0.1272260844707489,
-0.06410589814186096,
0.23799839615821838,
0.0620177797973156,
0.15489469468593597,
0.1571887582540512,
0.41329634189605713,
0.02559671178460121,
-0.02536151185631752,
-0.08275923877954483,
-0.06695951521396637,
0.003327305195853114,
-0.0001138651859946549,
0.08787933737039566,
-0.02092691697180271,
0.11174140125513077,
0.164712056517601,
-0.08319708704948425,
-0.052096594125032425,
0.010101592168211937,
-0.08501791208982468,
-0.12070532143115997,
-0.11922379583120346,
0.06776510179042816,
-0.0005239917081780732,
0.06299012899398804,
0.03355201706290245,
0.003490975359454751,
0.06814274191856384,
-0.019822878763079643,
0.06605128943920135,
-0.06531363725662231,
-0.0683717429637909,
0.121163509786129,
0.028205975890159607,
0.0836048573255539,
0.041108760982751846,
-0.22504544258117676,
-0.1551794856786728,
-0.1265241801738739,
0.0850515365600586,
0.03821680694818497,
0.14269614219665527,
-0.09972181171178818,
0.03700222447514534,
-0.07550783455371857,
-0.01968802697956562,
0.0021161469630897045,
0.05598534643650055,
0.024346664547920227,
0.16397547721862793,
0.1513194739818573,
-0.044478777796030045,
-0.09002158045768738,
-0.29715171456336975,
0.16136914491653442,
-0.10843614488840103,
-0.049959611147642136,
-0.01018812507390976,
0.043282315135002136,
-0.025026680901646614,
-0.015455535613000393,
-0.1788242757320404,
-0.06516437232494354,
0.15505777299404144,
0.028026020154356956,
-0.14058616757392883,
0.15435883402824402,
-0.2297464907169342,
-0.11689913272857666,
-0.012178570963442326,
0.049355797469615936,
0.05904160067439079,
0.07334654033184052,
-0.07193923741579056,
0.03584751859307289,
0.08759909868240356,
0.03159476816654205,
-0.16143646836280823,
0.033970534801483154,
0.14019276201725006,
-0.1352943331003189,
-0.06464344263076782,
-0.1386653184890747,
0.3477478623390198,
0.11584416031837463,
-0.07104966044425964,
-0.03996456786990166,
-0.07269919663667679,
-0.14187462627887726,
0.190900057554245,
-0.12263445556163788,
0.07341510057449341,
-0.40870869159698486,
0.07775109261274338,
0.25130200386047363,
-0.06059443950653076,
0.1294904351234436,
-0.07962995767593384,
-0.16216494143009186,
-0.061032433062791824,
-0.008241869509220123,
-0.09799319505691528,
-0.0157981738448143,
-0.09644995629787445,
0.15677803754806519,
0.04158283397555351,
0.08811453729867935,
0.1985396295785904,
0.09321023523807526,
-0.060056596994400024,
-0.10504443943500519,
-0.04706535115838051,
-0.10777891427278519,
-0.05144482105970383,
-0.18372689187526703,
0.02040054276585579,
0.034698136150836945,
-0.13639035820960999,
0.01927119493484497,
0.11702048778533936,
0.07434441149234772,
0.11852283775806427,
-0.08597429096698761,
0.1915757805109024,
-0.08043671399354935,
0.13092273473739624,
-0.033029112964868546,
-0.07980156689882278,
0.0501701757311821,
0.11426696181297302,
0.08938586711883545,
-0.12524756789207458,
0.01707778312265873,
-0.12879055738449097,
0.07627832144498825,
0.019236691296100616,
-0.10482390969991684,
0.12157737463712692,
-0.08357411623001099,
-0.123176708817482,
0.03292788937687874,
0.023524770513176918,
0.008893812075257301,
-0.055243734270334244,
0.13586850464344025,
0.042742859572172165,
0.17957210540771484,
0.06891923397779465,
0.26430168747901917,
0.09369360655546188,
-0.17425653338432312,
-0.07373403757810593,
0.08407171070575714,
0.16847552359104156,
-0.013073213398456573,
0.13690216839313507,
0.2710387706756592,
0.018792500719428062,
-0.0727570503950119,
0.1926906555891037,
-0.04686058312654495,
-0.014133657328784466,
0.08154921233654022,
-0.018339887261390686,
-0.13408641517162323,
0.04489537328481674,
-0.19478395581245422,
-0.11588640511035919,
0.014997338876128197,
0.10311603546142578,
0.09625934064388275,
-0.13765741884708405,
-0.11371155828237534,
0.15468603372573853,
0.04567723348736763,
-0.006610520649701357,
-0.04961573705077171,
0.17420779168605804,
0.09929485619068146,
0.3216573894023895,
-0.2953626215457916,
0.18942011892795563,
-0.015164563432335854,
-0.09737001359462738,
0.05423842370510101,
-0.17164523899555206,
0.01597781293094158,
0.11757998168468475,
-0.08661163598299026,
0.009048140607774258,
-0.05390571802854538,
-0.0582536906003952,
-0.06923308223485947,
0.019520103931427002,
0.011236530728638172,
-0.10089346766471863,
-0.19417864084243774,
0.01633385568857193,
-0.21821287274360657,
0.15584534406661987,
0.019026992842555046,
0.06250221282243729,
-0.2000202238559723,
0.09036710113286972,
0.15039211511611938,
-0.3011566400527954,
-0.011515840888023376,
-0.04523664712905884,
0.02622256986796856,
-0.020954834297299385,
0.09055633842945099,
-0.026752321049571037,
0.0205074530094862,
0.04319078102707863,
-0.12054578214883804,
-0.2959745228290558,
0.027277983725070953,
0.05094892159104347,
0.05316353961825371,
0.17193028330802917,
0.016495171934366226,
-0.054369889199733734,
0.03758245334029198,
0.09950403869152069,
-0.09404630213975906,
0.2883237600326538,
0.12846659123897552,
-0.03472978249192238,
-0.17082615196704865,
0.030668750405311584,
0.18871326744556427,
-0.05529271066188812,
0.011333576403558254,
-0.10982635617256165,
-0.10281763225793839,
0.06833795458078384,
0.12672919034957886,
-0.06908026337623596,
0.2669025659561157,
0.08571638911962509,
-0.0933026373386383,
-0.05841202288866043,
-0.06676668673753738,
-0.012667411006987095,
0.06274489313364029,
0.11285261064767838,
-0.14583973586559296,
0.10764789581298828,
-0.09279437363147736,
0.016446402296423912,
0.03249363601207733,
-0.04358366131782532,
-0.11345428228378296,
0.09086912870407104,
-0.085822194814682,
-0.1233973577618599,
0.12222784757614136,
-0.27609536051750183,
-0.10896288603544235,
0.07505539059638977,
-0.08654265850782394,
-0.0529165118932724,
-0.044703830033540726,
0.12522262334823608,
-0.08288358896970749,
0.08554989844560623,
0.08377407491207123,
-0.003433720674365759,
0.06031191349029541,
0.027415193617343903,
0.025146858766674995,
-0.02428758516907692,
-0.0406375452876091,
0.28469523787498474,
0.14313553273677826,
0.2660065293312073,
0.08691646158695221,
0.13550794124603271,
0.06433897465467453,
-0.06624457240104675,
0.1070469319820404,
0.06372922658920288,
-0.030376704409718513,
-0.05703290179371834,
-0.08771196007728577,
0.06749586015939713,
-0.017668822780251503,
-0.1357247680425644,
0.12284950166940689,
-0.012562881223857403,
-0.18907245993614197,
-0.060877736657857895,
0.023532168939709663,
0.0013657313538715243,
-0.07174722105264664,
0.04360559210181236,
-0.01948273926973343,
-0.1439894139766693,
-0.12489508837461472,
-0.020643386989831924,
-2.4593935253613756e-32,
-0.07345397025346756,
-0.03534878045320511,
-0.07144376635551453,
-0.043260637670755386,
-0.07291753590106964,
0.08736281841993332,
-0.15447905659675598,
-0.08360089361667633,
-0.027596864849328995,
-0.023572737351059914,
-0.21354839205741882,
0.23715665936470032,
0.02804398164153099,
-0.011963346041738987,
-0.05385398864746094,
0.013934957794845104,
0.19062656164169312,
-0.05556394159793854,
-0.18038804829120636,
0.08312047272920609,
0.14646613597869873,
-0.03449559211730957,
-0.06194985657930374,
0.061186857521533966,
-0.11808422952890396,
-0.039946068078279495,
0.03357444703578949,
-0.14213941991329193,
-0.06438413262367249,
-0.24593131244182587,
-0.10493068397045135,
0.18032777309417725,
-0.03547995910048485,
0.006235742941498756,
0.011482546105980873,
-0.07060692459344864,
-0.10602602362632751,
0.1592329442501068,
0.008534643799066544,
0.04681988060474396,
-0.019362812861800194,
0.12678804993629456,
0.10606274753808975,
-0.012912449426949024,
0.007884969934821129,
-0.07776092737913132,
-0.010924077592790127,
0.03335686773061752,
-0.20042923092842102,
0.0201885849237442,
0.025461260229349136,
0.0418095737695694,
0.04071858152747154,
0.012337103486061096,
0.05036826804280281,
-0.1966906636953354,
0.08279465138912201,
0.11000826954841614,
-0.20373965799808502,
-0.0065951100550591946,
0.10677694529294968,
0.1550654023885727,
-0.11892110854387283,
-0.00044559079105965793,
-0.025932729244232178,
-0.08711155503988266,
0.4647900462150574,
0.20415352284908295,
0.17679312825202942,
-0.023570707067847252,
0.05186501890420914,
0.04183030501008034,
-0.03918798267841339,
-0.20296752452850342,
0.1087542176246643,
-0.012362463399767876,
-0.10242791473865509,
0.10829965025186539,
0.07428306341171265,
0.014416529797017574,
0.019324984401464462,
-0.15051187574863434,
-0.020922288298606873,
0.09735844284296036,
-0.018811117857694626,
-0.001971898367628455,
0.013068587519228458,
0.15879663825035095,
-0.03075171634554863,
-0.11680035293102264,
-0.02288849465548992,
0.11257415264844894,
-0.18444739282131195,
-0.00704926298931241,
-0.08351503312587738,
0.1006176546216011,
-0.16293826699256897,
0.23796279728412628,
-0.1544879972934723,
0.013037629425525665,
-0.11369568854570389,
0.05385950580239296,
-0.0011484191054478288,
-0.010725626721978188,
0.1649765819311142,
-0.017192572355270386,
0.10883904993534088,
-0.005428805015981197,
-0.12991343438625336,
-0.06371581554412842,
0.0044062938541173935,
0.11098354309797287,
-0.029133111238479614,
0.05684783682227135,
0.05852926895022392,
-0.1322890818119049,
0.13940614461898804,
-0.04166801646351814,
0.12607276439666748,
0.24190004169940948,
-0.02728983573615551,
-0.11185259371995926,
-0.04273606091737747,
0.006154836621135473,
0.1495528519153595,
0.06481757760047913,
-0.19990189373493195,
-0.07367190718650818,
-0.061280377209186554,
-0.13020727038383484,
-0.04634607210755348,
-0.04591876640915871,
7.349331667683145e-7,
-0.08825699239969254,
0.29758918285369873,
-0.008975368924438953,
0.08337003737688065,
0.06165004521608353,
0.03199638053774834,
-0.07561532407999039,
-0.003192000091075897,
-0.08191628754138947,
0.12767034769058228,
0.12154537439346313,
0.04528672620654106,
0.16265900433063507,
0.03114970214664936,
0.24238324165344238,
-0.3552866280078888,
-0.1688709706068039,
0.05285467207431793,
-0.2100747972726822,
0.08167842030525208,
-0.038558050990104675,
-0.026438303291797638,
-0.2085297405719757,
-0.05035945400595665,
0.18877993524074554,
-0.01269293762743473,
0.07014720141887665,
-0.0279966052621603,
0.11414839327335358,
0.0008769515552558005,
0.06428167223930359,
-0.04907545447349548,
-0.01963025890290737,
0.05728081241250038,
0.007111639715731144,
0.02458149380981922,
-0.1763111799955368,
0.02375723421573639,
0.05777442455291748,
0.06122414395213127,
-0.018411021679639816,
-0.12424158304929733,
0.0660257413983345,
-0.040926847606897354,
0.042887717485427856,
0.12533381581306458,
-0.12426262348890305,
0.286784827709198,
0.02335880510509014,
0.03455948084592819,
-0.055238235741853714,
0.2517348527908325,
-0.0008667100337333977,
0.12790906429290771,
0.05513652786612511,
-0.23386219143867493,
0.03008171170949936,
-0.20655199885368347,
-0.08603131771087646,
0.01760704442858696,
0.012297977693378925,
-0.019531086087226868,
-0.10626939684152603,
0.15314112603664398,
0.10019905120134354,
0.04801981523633003,
-0.18411865830421448,
4.084627055691478e-35,
0.00394586194306612,
0.14994598925113678,
0.15069860219955444,
-0.2148379385471344,
-0.10081330686807632,
-0.03244243562221527,
0.026701362803578377,
-0.04507278650999069,
-0.24847105145454407,
-0.21275804936885834,
-0.046353794634342194
] |
https://github.com/huggingface/datasets/issues/5908 | Unbearably slow sorting on big mapped datasets | I understand the issue doesn't exist with non-mapped datasets, but if flattening is so much more efficient than sorting the indices, that's an issue in itself.
There are plenty of issues people posted for which the root cause turns out to be the same. It seems like mapped datasets are terribly inefficient. I think I saw some issue like that somewhere (about the mapped datasets in general), but can't find it now.
Maybe indices should be flattened before any additional processing, then. | ### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 82 | Unbearably slow sorting on big mapped datasets
### Describe the bug
For me, with ~40k lines, sorting took 3.5 seconds on a flattened dataset (including the flatten operation) and 22.7 seconds on a mapped dataset (right after sharding), which is about x5 slowdown. Moreover, it seems like it slows down exponentially with bigger datasets (wasn't able to sort 700k lines at all, with flattening takes about a minute).
### Steps to reproduce the bug
```Python
from datasets import load_dataset
import time
dataset = load_dataset("xnli", "en", split="train")
dataset = dataset.shard(10, 0)
print(len(dataset))
t = time.time()
# dataset = dataset.flatten_indices() # uncomment this line and it's fast
dataset = dataset.sort("label", reverse=True, load_from_cache_file=False)
print(f"finished in {time.time() - t:.4f} seconds")
```
### Expected behavior
Expect sorting to take the same or less time than flattening and then sorting.
### Environment info
- `datasets` version: 2.12.1.dev0 (same with 2.12.0 too)
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
I understand the issue doesn't exist with non-mapped datasets, but if flattening is so much more efficient than sorting the indices, that's an issue in itself.
There are plenty of issues people posted for which the root cause turns out to be the same. It seems like mapped datasets are terribly inefficient. I think I saw some issue like that somewhere (about the mapped datasets in general), but can't find it now.
Maybe indices should be flattened before any additional processing, then. | [
-0.042095646262168884,
0.06256415694952011,
-0.11411093175411224,
0.050857771188020706,
0.01269884966313839,
-0.028259191662073135,
0.037359800189733505,
0.15899339318275452,
-0.10594811290502548,
0.1168447956442833,
0.0063282400369644165,
-0.015255571343004704,
-0.04995250329375267,
-0.01931186206638813,
-0.16291236877441406,
0.033008016645908356,
-0.03156828135251999,
-0.004994336515665054,
0.04279543086886406,
-0.11195003241300583,
-0.14110781252384186,
-0.11629348248243332,
0.038583360612392426,
-0.08117445558309555,
-0.07416275143623352,
-0.06713926047086716,
-0.1065567210316658,
0.008355091325938702,
0.07446262985467911,
-0.04381749406456947,
-0.07075878232717514,
-0.011201109737157822,
-0.19705930352210999,
0.2669312655925751,
0.000005382435574574629,
-0.09152963757514954,
0.12362848222255707,
0.1743275672197342,
0.029843343421816826,
0.2272690087556839,
0.13647477328777313,
-0.11185722798109055,
-0.046898599714040756,
0.009333578869700432,
-0.07655949890613556,
-0.018730508163571358,
-0.02131676860153675,
-0.0923648327589035,
0.06476867198944092,
-0.09640958160161972,
-0.07576879113912582,
0.0693548172712326,
-0.16165302693843842,
-0.03625268116593361,
0.012287279590964317,
-0.06795404851436615,
-0.020009329542517662,
0.022567063570022583,
-0.07599789649248123,
0.003994086291640997,
0.10954046249389648,
-0.047854069620370865,
0.11011183261871338,
0.1364509016275406,
-0.05115720257163048,
0.23191025853157043,
-0.08374734967947006,
0.10404764860868454,
0.003131950506940484,
0.25719085335731506,
-0.3209950923919678,
0.0470384806394577,
0.04906627908349037,
0.03665463253855705,
-0.1625276505947113,
-0.0002973731025122106,
0.03996523097157478,
0.06480631977319717,
-0.08561748266220093,
-0.1250104457139969,
-0.0658114105463028,
0.09793642163276672,
0.07327808439731598,
0.01588178239762783,
-0.21850600838661194,
0.02219141274690628,
0.04005091264843941,
0.015754304826259613,
0.028246106579899788,
0.021134668961167336,
0.08211708068847656,
-0.0910247340798378,
-0.056045375764369965,
0.03862283378839493,
-0.17289859056472778,
-0.042337484657764435,
0.12474867701530457,
-0.1929277628660202,
-0.00020447814313229173,
-0.0769115537405014,
-0.05958237126469612,
0.08885287493467331,
-0.03741242736577988,
-0.019702015444636345,
-0.14805027842521667,
0.02048335410654545,
-0.02533271536231041,
-0.11869094520807266,
0.10517331212759018,
0.012107862159609795,
-0.07438474148511887,
0.135491281747818,
-0.10055764019489288,
-0.06625458598136902,
0.040104471147060394,
-0.04474245011806488,
0.09632689505815506,
-0.06416814029216766,
0.12524709105491638,
-0.041124776005744934,
0.0343157984316349,
0.08231686800718307,
0.03386915102601051,
0.022818122059106827,
-0.028864016756415367,
0.0714244395494461,
-0.13275544345378876,
-0.02713027410209179,
-0.17188602685928345,
0.20517981052398682,
-0.05612105503678322,
-0.10175752639770508,
0.1553318053483963,
0.08229675143957138,
0.01573922298848629,
-0.07879715412855148,
-0.13297325372695923,
-0.024036774411797523,
-0.015944361686706543,
-0.06968772411346436,
0.01224050298333168,
0.03623060882091522,
0.1152535080909729,
-0.019353756681084633,
0.06980758160352707,
0.17491820454597473,
-0.0141160162165761,
0.11112271994352341,
-0.05040310323238373,
-0.042609572410583496,
-0.25588154792785645,
0.05514444783329964,
-0.032056067138910294,
0.07507459074258804,
-0.12026124447584152,
0.12188509851694107,
0.12657727301120758,
-0.2228413224220276,
-0.03408725932240486,
-0.03555091470479965,
-0.11030904203653336,
-0.11487293988466263,
-0.07411952316761017,
-0.03130992501974106,
0.07781688123941422,
0.06848043203353882,
0.06049707159399986,
0.17371200025081635,
-0.15859921276569366,
0.0878896489739418,
0.18027712404727936,
0.03445936739444733,
-0.05247732996940613,
0.12389927357435226,
0.06100527569651604,
0.062297314405441284,
-0.16732953488826752,
-0.023665158078074455,
-0.3067385256290436,
0.12858350574970245,
-0.02471991628408432,
-0.01979328878223896,
-0.035704389214515686,
-0.03566644713282585,
0.30373483896255493,
-0.0955359935760498,
0.1696028858423233,
0.1549069732427597,
0.017421318218111992,
-0.004139890428632498,
-0.008772210218012333,
-0.0009641725919209421,
-0.022797124460339546,
0.04487229138612747,
-0.11777663230895996,
-0.06446067243814468,
0.07194837182760239,
-0.032041627913713455,
0.07455343753099442,
-0.1518053561449051,
-0.11752486974000931,
0.15165026485919952,
-0.1586938202381134,
0.004721666220575571,
-0.08999065309762955,
-0.04285668209195137,
-0.18184137344360352,
0.25087666511535645,
0.0856887549161911,
-0.14141874015331268,
0.019497277215123177,
0.0643361508846283,
-0.03579501435160637,
0.086106076836586,
-0.09157325327396393,
-0.023314693942666054,
-0.10503300279378891,
0.05802450329065323,
-0.028637420386075974,
0.06452224403619766,
-0.027813056483864784,
-0.024389201775193214,
-0.026970941573381424,
0.010917703621089458,
-0.04324786737561226,
0.01726626046001911,
0.01866440288722515,
0.10835383832454681,
0.12368308007717133,
-0.0141852255910635,
-0.04995078966021538,
-0.14427436888217926,
0.18049533665180206,
-0.1301155984401703,
-0.062207236886024475,
0.06748437136411667,
0.09333691000938416,
-0.15021178126335144,
0.06155715882778168,
0.06214673072099686,
-0.1944132298231125,
0.09470324963331223,
-0.10561008751392365,
-0.07447820156812668,
-0.0038057591300457716,
0.09189717471599579,
0.011306566186249256,
0.1087503507733345,
-0.002626331290230155,
0.024494130164384842,
-0.03341878950595856,
-0.02045942284166813,
0.04469666630029678,
-0.05745266005396843,
0.10778727382421494,
-0.045035671442747116,
0.21436579525470734,
0.09948930144309998,
0.14963315427303314,
0.14286018908023834,
0.3884055018424988,
0.04749768599867821,
-0.06716787070035934,
-0.10944858938455582,
-0.006040704902261496,
0.024897055700421333,
0.0009395570959895849,
-0.016989601776003838,
-0.0976550355553627,
0.1380540132522583,
0.1404687464237213,
-0.057390086352825165,
-0.026739254593849182,
-0.012511059641838074,
-0.07903219014406204,
-0.12765836715698242,
-0.10399527102708817,
0.0118310721591115,
-0.009552220813930035,
0.1102750226855278,
0.034431759268045425,
-0.0416179895401001,
0.05539397522807121,
0.03998753800988197,
0.04520011320710182,
-0.08390288054943085,
-0.07378823310136795,
0.0790410041809082,
0.041159436106681824,
0.0077163479290902615,
0.038590144366025925,
-0.21306933462619781,
-0.13249355554580688,
-0.14657770097255707,
0.027771655470132828,
0.09832365810871124,
0.08683142811059952,
-0.09287240356206894,
0.02467075176537037,
-0.1193990707397461,
-0.013352052308619022,
0.02137652039527893,
0.04626215994358063,
0.03624218329787254,
0.14046092331409454,
0.14117437601089478,
-0.023619521409273148,
-0.0626254677772522,
-0.2705501616001129,
0.17838047444820404,
-0.11077195405960083,
0.0064336503855884075,
0.02514750510454178,
0.001543780555948615,
-0.06559021770954132,
-0.0019688892643898726,
-0.16843044757843018,
-0.06888146698474884,
0.15355901420116425,
0.05797187238931656,
-0.14030218124389648,
0.14991270005702972,
-0.21376660466194153,
-0.1338523030281067,
-0.04203953593969345,
0.02487151324748993,
0.09912686049938202,
0.06255266815423965,
-0.10784346610307693,
-0.006178558338433504,
0.07529059797525406,
0.01610310934484005,
-0.12488239258527756,
0.04943478852510452,
0.09255460649728775,
-0.10527200251817703,
-0.03387324884533882,
-0.15251171588897705,
0.3096270263195038,
0.14567112922668457,
-0.1017267107963562,
-0.07961216568946838,
-0.05971187725663185,
-0.1430111527442932,
0.14128395915031433,
-0.12085253745317459,
0.08259078115224838,
-0.35092487931251526,
0.08445674926042557,
0.2463407963514328,
-0.04765806347131729,
0.1442732810974121,
-0.06293869763612747,
-0.1535354107618332,
-0.04011853411793709,
-0.010761933401226997,
-0.08336832374334335,
-0.004559597931802273,
-0.08701780438423157,
0.05182960256934166,
0.001963940216228366,
-0.007754440885037184,
0.11720197647809982,
0.11953116953372955,
-0.04820990562438965,
-0.1376749724149704,
-0.036711063235998154,
-0.08441545069217682,
-0.10806721448898315,
-0.151921346783638,
-0.040240347385406494,
0.030327782034873962,
-0.14145714044570923,
0.01852315478026867,
0.1116255596280098,
0.061208296567201614,
0.13555271923542023,
-0.05111078917980194,
0.20386971533298492,
-0.07470648735761642,
0.14680986106395721,
-0.06178659945726395,
-0.12530918419361115,
0.06456110626459122,
0.05130317807197571,
0.03666197508573532,
-0.09272366017103195,
-0.00561950821429491,
-0.1962907314300537,
0.07137399911880493,
-0.001288699102587998,
-0.06866316497325897,
0.0875168889760971,
-0.08827818930149078,
-0.09379878640174866,
0.015683870762586594,
0.03000863827764988,
-0.01918746903538704,
-0.0010506866965442896,
0.08543037623167038,
0.07679334282875061,
0.12666016817092896,
0.12518388032913208,
0.229288250207901,
0.13921739161014557,
-0.18952426314353943,
-0.14496736228466034,
0.11148107796907425,
0.15957294404506683,
-0.02852685935795307,
0.18978935480117798,
0.39435023069381714,
0.015063428319990635,
-0.052923884242773056,
0.18114836513996124,
-0.03505594655871391,
-0.02152733877301216,
0.09024438261985779,
-0.009871130809187889,
-0.15897385776042938,
0.10001300275325775,
-0.2098715603351593,
-0.10078845918178558,
0.037417251616716385,
0.1062794104218483,
0.05661005526781082,
-0.14811378717422485,
-0.1135607585310936,
0.1231953427195549,
0.04448467493057251,
-0.02837497927248478,
-0.030159009620547295,
0.15083950757980347,
0.11743208765983582,
0.29228100180625916,
-0.3484344482421875,
0.2001824975013733,
-0.04007095843553543,
-0.11438704282045364,
0.05794532969594002,
-0.14306548237800598,
0.058932431042194366,
0.04925433173775673,
-0.05748502165079117,
0.03909282013773918,
-0.06310003250837326,
-0.038268137723207474,
-0.04692484438419342,
0.010600456967949867,
-0.030506214126944542,
-0.06556382030248642,
-0.22284425795078278,
-0.012835202738642693,
-0.17063036561012268,
0.15123166143894196,
0.014645909890532494,
0.08840048313140869,
-0.21508528292179108,
0.09667359292507172,
0.14421027898788452,
-0.2613185942173004,
0.0018793063936755061,
-0.08604829758405685,
0.06293357908725739,
0.013379286974668503,
0.06787528097629547,
-0.02516079694032669,
-0.010831020772457123,
0.07125397026538849,
-0.07643869519233704,
-0.21897193789482117,
0.023714816197752953,
0.026271596550941467,
0.03833918273448944,
0.1292506605386734,
-0.018034717068076134,
-0.0672629252076149,
0.031226953491568565,
0.09893724322319031,
-0.0823398157954216,
0.2633713185787201,
0.22331826388835907,
-0.049174707382917404,
-0.2442581206560135,
-0.008402354083955288,
0.17204532027244568,
-0.04475963115692139,
-0.005891438107937574,
-0.09244147688150406,
-0.09898741543292999,
0.01783042587339878,
0.19696243107318878,
-0.05581000819802284,
0.16826915740966797,
0.14127770066261292,
-0.1260640174150467,
0.038841474801301956,
-0.06577573716640472,
-0.05224531888961792,
0.03073887899518013,
0.1181701049208641,
-0.16045935451984406,
0.06181252375245094,
-0.0809299647808075,
0.04319712519645691,
0.03271983191370964,
-0.09261594712734222,
-0.0682111606001854,
0.07885968685150146,
-0.051175616681575775,
-0.08082535117864609,
0.12817902863025665,
-0.24114477634429932,
-0.10368840396404266,
0.06261962652206421,
-0.09599151462316513,
-0.04656198248267174,
-0.04078691825270653,
0.16202539205551147,
-0.06337761133909225,
0.112419992685318,
0.06739214807748795,
0.025593439117074013,
0.06533657014369965,
0.06412333995103836,
0.007563167251646519,
-0.09010676294565201,
-0.03680245950818062,
0.298247754573822,
0.1965123862028122,
0.24077966809272766,
0.10303481668233871,
0.1225871741771698,
0.0639226883649826,
-0.09600600600242615,
0.12236902862787247,
0.0735914334654808,
-0.03621259704232216,
-0.02241090126335621,
-0.10535717010498047,
-0.03106660209596157,
0.014484381303191185,
-0.10268155485391617,
0.10841328650712967,
-0.035786017775535583,
-0.18886007368564606,
-0.01763302832841873,
-0.04424020275473595,
-0.0046050106175243855,
-0.02549261413514614,
0.04164508357644081,
-0.05548330023884773,
-0.1217350959777832,
-0.15288935601711273,
-0.030506452545523643,
-2.4584047876755402e-32,
-0.08031100034713745,
-0.03545426204800606,
-0.06722516566514969,
-0.056630492210388184,
-0.0582466721534729,
0.12861832976341248,
-0.11842167377471924,
-0.08858893066644669,
-0.019680963829159737,
-0.044053107500076294,
-0.1883428990840912,
0.177591472864151,
0.04397259280085564,
0.005193088203668594,
-0.07977417856454849,
0.009848863817751408,
0.13921035826206207,
-0.011164453811943531,
-0.20073670148849487,
0.08124172687530518,
0.16239312291145325,
-0.00734178489074111,
-0.0648319348692894,
-0.06655813008546829,
-0.15361016988754272,
0.03104771301150322,
0.09551790356636047,
-0.15953470766544342,
-0.0562124140560627,
-0.2063092738389969,
-0.09610498696565628,
0.17442773282527924,
-0.021509243175387383,
-0.013001704588532448,
0.0039503020234405994,
-0.10952639579772949,
-0.03529904782772064,
0.12563176453113556,
0.00009479414438828826,
0.045065704733133316,
0.04511228948831558,
0.08362074196338654,
0.10435124486684799,
0.04903466999530792,
0.006259560585021973,
-0.08516551554203033,
0.021961117163300514,
0.038837749511003494,
-0.1807803362607956,
0.08304068446159363,
-0.02197953127324581,
0.030256468802690506,
0.06306620687246323,
-0.03654983267188072,
0.00304018403403461,
-0.19433726370334625,
0.053947996348142624,
0.1083434522151947,
-0.11653490364551544,
-0.018988367170095444,
0.08350983262062073,
0.154032900929451,
-0.12313240766525269,
0.03836982697248459,
0.00217543076723814,
-0.05571228638291359,
0.5080054998397827,
0.20641247928142548,
0.14162732660770416,
-0.03640983998775482,
0.07859072089195251,
0.04443683475255966,
-0.032033246010541916,
-0.14457297325134277,
0.10187134891748428,
-0.025882475078105927,
-0.07452338933944702,
0.13213488459587097,
0.11859932541847229,
-0.00679685827344656,
-0.02962925285100937,
-0.13504357635974884,
0.007864758372306824,
0.06946682929992676,
-0.017175056040287018,
0.03952579200267792,
0.006509733386337757,
0.26310253143310547,
-0.04057660698890686,
-0.12151367217302322,
-0.016707072034478188,
0.07805290073156357,
-0.15922394394874573,
-0.0301374439150095,
-0.08096859604120255,
0.1005120724439621,
-0.12009929120540619,
0.2524239122867584,
-0.1750396192073822,
-0.01630859635770321,
-0.12648867070674896,
0.05517395958304405,
-0.007592398207634687,
0.02835022658109665,
0.20562943816184998,
-0.005351829808205366,
0.09818525612354279,
-0.021410103887319565,
-0.12460528314113617,
-0.09359107166528702,
-0.0013587054563686252,
0.04289516806602478,
0.009226849302649498,
0.054870717227458954,
0.039000146090984344,
-0.1454107165336609,
0.11966188251972198,
-0.018925119191408157,
0.1143602579832077,
0.24556468427181244,
0.012689686380326748,
-0.1162441074848175,
0.026591196656227112,
0.00022817800345364958,
0.12869912385940552,
0.06550972908735275,
-0.15062716603279114,
-0.04470151662826538,
-0.030741743743419647,
-0.13877813518047333,
-0.036851003766059875,
-0.07841711491346359,
7.578128702334652e-7,
-0.10486022382974625,
0.2567126154899597,
0.032647427171468735,
0.0641983300447464,
0.047684937715530396,
0.07750892639160156,
-0.09548377245664597,
-0.03180616721510887,
-0.04643717408180237,
0.12849847972393036,
0.12735293805599213,
0.016736336052417755,
0.16442278027534485,
0.01270123291760683,
0.2557646334171295,
-0.36239802837371826,
-0.16427595913410187,
0.028530694544315338,
-0.21035563945770264,
0.08595959097146988,
-0.06499166041612625,
-0.012729686684906483,
-0.1845943033695221,
-0.03908659517765045,
0.1862592250108719,
0.011885865591466427,
0.045215342193841934,
-0.0553564615547657,
0.20826730132102966,
-0.04186537489295006,
0.03588593006134033,
-0.05958864465355873,
-0.04139639809727669,
0.0714397057890892,
0.02814626693725586,
0.03062545508146286,
-0.13798080384731293,
0.0048776972107589245,
0.038355905562639236,
0.03575698658823967,
-0.0071535902097821236,
-0.10945428907871246,
0.005436462815850973,
-0.03631703183054924,
0.023965122178196907,
0.0850319191813469,
-0.12455736100673676,
0.28593623638153076,
0.012847588397562504,
0.09013563394546509,
-0.08990275859832764,
0.221443310379982,
-0.007990594021975994,
0.14224492013454437,
0.04413619637489319,
-0.24670270085334778,
0.00047195356455631554,
-0.15732735395431519,
-0.1016838327050209,
-0.02206507697701454,
0.015877678990364075,
-0.04930226504802704,
-0.10439454019069672,
0.15954536199569702,
0.13445600867271423,
0.02034073695540428,
-0.18756385147571564,
1.0351636285912565e-34,
-0.05119461566209793,
0.09741054475307465,
0.1697254776954651,
-0.23474743962287903,
-0.052830953150987625,
-0.04943114146590233,
0.07892026752233505,
-0.05228683724999428,
-0.2252626270055771,
-0.22457170486450195,
-0.022759322077035904
] |
https://github.com/huggingface/datasets/issues/5905 | Offer an alternative to Iterable Dataset that allows lazy loading and processing while skipping batches efficiently | We plan to improve this eventually (see https://github.com/huggingface/datasets/issues/5454 and https://github.com/huggingface/datasets/issues/5380).
> Is it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there.
If not, I could do it using a plain Pytorch dataset. Then I would need to convert it to a datasets' dataset to get all the features of datasets. Is it something possible ?
Yes, by creating a mapped dataset that stores audio URLs. Indexing a dataset in such format only downloads and decodes the bytes of the accessed samples (without storing them on disk).
You can do the following to create this dataset:
```python
def gen():
# Generator that yields (audio URL, text) pairs as dict
...
yield {"audio": "audio_url", "text": "some text"}
features = Features({"audio": datasets.Audio(), "text": datasets.Value("string")})
ds = Dataset.from_generator(gen, features=features)
ds[2:5] # downloads and decodes the samples each time they are accessed
``` | ### Feature request
I would like a way to resume training from a checkpoint without waiting for a very long time when using an iterable dataset.
### Motivation
I am training models on the speech-recognition task. I have very large datasets that I can't comfortably store on a disk and also quite computationally intensive audio processing to do. As a result I want to load data from my remote when it is needed and perform all processing on the fly.
I am currently using the iterable dataset feature of _datasets_. It does everything I need with one exception. My issue is that when resuming training at a step n, we have to download all the data and perform the processing of steps < n, just to get the iterable at the right step. In my case it takes almost as long as training for the same steps, which make resuming training from a checkpoint useless in practice.
I understand that the nature of iterators make it probably nearly impossible to quickly resume training.
I thought about a possible solution nonetheless :
I could in fact index my large dataset and make it a mapped dataset. Then I could use set_transform to perform the processing on the fly. Finally, if I'm not mistaken, the _accelerate_ package allows to [skip steps efficiently](https://github.com/huggingface/accelerate/blob/a73898027a211c3f6dc4460351b0ec246aa824aa/src/accelerate/data_loader.py#L827) for a mapped dataset.
Is it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there.
If not, I could do it using a plain _Pytorch_ dataset. Then I would need to convert it to a _datasets_' dataset to get all the features of _datasets_. Is it something possible ?
### Your contribution
I could provide a PR to allow lazy loading of mapped dataset or the conversion of a mapped _Pytorch_ dataset into a _Datasets_ dataset if you think it is an useful new feature. | 151 | Offer an alternative to Iterable Dataset that allows lazy loading and processing while skipping batches efficiently
### Feature request
I would like a way to resume training from a checkpoint without waiting for a very long time when using an iterable dataset.
### Motivation
I am training models on the speech-recognition task. I have very large datasets that I can't comfortably store on a disk and also quite computationally intensive audio processing to do. As a result I want to load data from my remote when it is needed and perform all processing on the fly.
I am currently using the iterable dataset feature of _datasets_. It does everything I need with one exception. My issue is that when resuming training at a step n, we have to download all the data and perform the processing of steps < n, just to get the iterable at the right step. In my case it takes almost as long as training for the same steps, which make resuming training from a checkpoint useless in practice.
I understand that the nature of iterators make it probably nearly impossible to quickly resume training.
I thought about a possible solution nonetheless :
I could in fact index my large dataset and make it a mapped dataset. Then I could use set_transform to perform the processing on the fly. Finally, if I'm not mistaken, the _accelerate_ package allows to [skip steps efficiently](https://github.com/huggingface/accelerate/blob/a73898027a211c3f6dc4460351b0ec246aa824aa/src/accelerate/data_loader.py#L827) for a mapped dataset.
Is it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there.
If not, I could do it using a plain _Pytorch_ dataset. Then I would need to convert it to a _datasets_' dataset to get all the features of _datasets_. Is it something possible ?
### Your contribution
I could provide a PR to allow lazy loading of mapped dataset or the conversion of a mapped _Pytorch_ dataset into a _Datasets_ dataset if you think it is an useful new feature.
We plan to improve this eventually (see https://github.com/huggingface/datasets/issues/5454 and https://github.com/huggingface/datasets/issues/5380).
> Is it possible to lazily load samples of a mapped dataset ? I'm used to [dataset scripts](https://huggingface.co/docs/datasets/dataset_script), maybe something can be done there.
If not, I could do it using a plain Pytorch dataset. Then I would need to convert it to a datasets' dataset to get all the features of datasets. Is it something possible ?
Yes, by creating a mapped dataset that stores audio URLs. Indexing a dataset in such format only downloads and decodes the bytes of the accessed samples (without storing them on disk).
You can do the following to create this dataset:
```python
def gen():
# Generator that yields (audio URL, text) pairs as dict
...
yield {"audio": "audio_url", "text": "some text"}
features = Features({"audio": datasets.Audio(), "text": datasets.Value("string")})
ds = Dataset.from_generator(gen, features=features)
ds[2:5] # downloads and decodes the samples each time they are accessed
``` | [
-0.18576274812221527,
0.3170192837715149,
-0.04298904165625572,
-0.1107923686504364,
0.036654237657785416,
0.010798916220664978,
0.19385990500450134,
0.07454226911067963,
0.07487011700868607,
0.13734018802642822,
-0.03889792785048485,
0.01076891552656889,
-0.20453402400016785,
0.0781884491443634,
-0.009217782877385616,
-0.2675546407699585,
-0.06006648391485214,
-0.008125785738229752,
-0.03383801877498627,
-0.035023532807826996,
-0.09496498852968216,
0.02039717324078083,
0.1253279596567154,
-0.1369100660085678,
0.1483146697282791,
-0.0853070467710495,
-0.10664160549640656,
-0.051926515996456146,
0.1055045872926712,
-0.10107754915952682,
0.13878916203975677,
0.127569317817688,
-0.04006096348166466,
0.15534572303295135,
0.0000058512796385912225,
0.22416020929813385,
0.14068031311035156,
0.014936123974621296,
-0.12635983526706696,
0.04908568039536476,
0.15305356681346893,
0.011403103359043598,
-0.02422250807285309,
-0.01856238953769207,
-0.10118457674980164,
-0.04590258374810219,
0.059574928134679794,
-0.18396973609924316,
0.10900440812110901,
-0.07060901075601578,
-0.04269932955503464,
-0.013524130918085575,
-0.19028717279434204,
-0.13455386459827423,
-0.028148818761110306,
-0.01926444098353386,
0.08699245750904083,
-0.01539232674986124,
0.037653326988220215,
-0.03192118555307388,
-0.01976563036441803,
0.05997135490179062,
0.06730163097381592,
-0.1380583941936493,
0.12918692827224731,
-0.08178331702947617,
-0.2019202560186386,
-0.07981343567371368,
-0.05856860801577568,
0.10100430995225906,
-0.147762730717659,
-0.0769805908203125,
-0.06048876419663429,
-0.037677716463804245,
-0.09949008375406265,
-0.08457952737808228,
-0.1605304777622223,
0.004066158551722765,
-0.11702466756105423,
0.11020787805318832,
-0.06960159540176392,
0.006766778416931629,
0.041496556252241135,
-0.056385014206171036,
-0.19623060524463654,
-0.1418798416852951,
-0.026724407449364662,
0.021856486797332764,
0.06618678569793701,
0.07345963269472122,
0.13233095407485962,
-0.11035079509019852,
0.03440820425748825,
0.10655757039785385,
-0.15134286880493164,
0.018663667142391205,
-0.0474516786634922,
-0.06000863388180733,
0.029187237843871117,
-0.021491484716534615,
0.1812109351158142,
0.08379554748535156,
-0.09715045988559723,
0.051731254905462265,
-0.0628289133310318,
-0.19598188996315002,
-0.09322542697191238,
-0.1421208679676056,
0.04719962924718857,
0.07003656774759293,
0.03058604523539543,
0.12665246427059174,
-0.06024201959371567,
0.007047593127936125,
0.023501891642808914,
-0.02193550020456314,
-0.03214648738503456,
0.23628990352153778,
-0.1069754958152771,
-0.004824143834412098,
0.11540152877569199,
0.06326289474964142,
-0.05159131810069084,
0.14579987525939941,
0.04486408084630966,
0.14293785393238068,
-0.019720470532774925,
-0.02845415286719799,
-0.06773639470338821,
-0.12690827250480652,
-0.01597769185900688,
-0.03728074952960014,
0.13268224895000458,
-0.009316856041550636,
0.16998633742332458,
0.07070966809988022,
-0.009163141250610352,
-0.17000742256641388,
-0.07157938927412033,
0.03789655119180679,
0.24977435171604156,
-0.017977779731154442,
-0.06538496166467667,
-0.09063511341810226,
-0.07402458041906357,
-0.004207675810903311,
-0.06156973913311958,
0.0837085172533989,
-0.1725776493549347,
0.1954125463962555,
-0.03877982497215271,
0.11820439249277115,
-0.025407837703824043,
0.1307658702135086,
-0.14821341633796692,
-0.005604315549135208,
-0.09246966242790222,
-0.06424311548471451,
-0.3832164704799652,
-0.11204898357391357,
0.12419084459543228,
-0.08731595426797867,
-0.110103078186512,
0.04074500873684883,
0.042015720158815384,
0.13279017806053162,
0.08896403759717941,
0.014254298061132431,
-0.02904743328690529,
-0.0006705832201987505,
-0.023136282339692116,
-0.12961985170841217,
-0.006372764706611633,
0.017473168671131134,
0.024837516248226166,
0.10095074027776718,
-0.10696867108345032,
0.10890161246061325,
-0.11980194598436356,
0.11365275830030441,
0.03389321267604828,
0.009545961394906044,
0.07598279416561127,
0.04054051637649536,
0.18747946619987488,
-0.1172180250287056,
-0.01701517403125763,
0.16595548391342163,
-0.16524308919906616,
0.033738747239112854,
0.10472462326288223,
-0.05077974870800972,
0.09939787536859512,
0.2567139267921448,
0.03238137066364288,
-0.041420191526412964,
-0.01378736924380064,
-0.18066811561584473,
0.14232715964317322,
-0.11678045243024826,
-0.11950742453336716,
0.06887532025575638,
-0.013120494782924652,
-0.03269333392381668,
-0.1555091291666031,
-0.19853575527668,
-0.1786363422870636,
0.09042243659496307,
0.2144053727388382,
-0.09199803322553635,
-0.09062278270721436,
0.006973881274461746,
0.033585354685783386,
0.04202518239617348,
-0.10536646097898483,
0.04407918080687523,
-0.0793217271566391,
0.06197786331176758,
-0.03638593107461929,
0.0830647200345993,
-0.08152513206005096,
0.09081364423036575,
0.1165330708026886,
-0.002194080501794815,
-0.105671226978302,
0.048878107219934464,
0.19246353209018707,
0.07241486757993698,
0.17477506399154663,
0.032804377377033234,
-0.0636354386806488,
-0.06558957695960999,
0.21740645170211792,
0.00008106703171506524,
-0.09515441954135895,
-0.0011767385294660926,
0.112659752368927,
-0.012340310961008072,
-0.02132466994225979,
0.033690646290779114,
-0.2461557537317276,
0.006234421394765377,
-0.012467078864574432,
-0.02587302215397358,
-0.09799520671367645,
0.13539540767669678,
-0.05552218481898308,
0.04705940559506416,
0.006231343373656273,
-0.0927734524011612,
0.24779556691646576,
0.042951904237270355,
-0.06208113580942154,
0.12782073020935059,
0.07175883650779724,
0.06778842955827713,
0.06499329954385757,
0.12195831537246704,
0.013204640708863735,
-0.023345017805695534,
0.24775081872940063,
0.013314597308635712,
-0.00264436355791986,
0.03524276986718178,
0.05137592926621437,
0.060813385993242264,
0.12165378779172897,
-0.0651162639260292,
-0.04108918085694313,
0.036833249032497406,
-0.021088965237140656,
0.09766227751970291,
0.032439224421978,
0.017316196113824844,
-0.0827796682715416,
-0.013020101934671402,
-0.002144260797649622,
0.0011302828788757324,
0.13564690947532654,
-0.10474638640880585,
-0.038919366896152496,
-0.01112966239452362,
0.14437684416770935,
-0.1365327537059784,
0.1961902529001236,
-0.06884383410215378,
-0.10004986822605133,
-0.06452867388725281,
-0.0658477321267128,
-0.12185411155223846,
0.03481005132198334,
0.010575690306723118,
0.030454305931925774,
0.006311923265457153,
0.08290476351976395,
-0.03429295867681503,
-0.06741082668304443,
-0.0008021005196496844,
-0.05712929368019104,
-0.27367669343948364,
-0.07783431559801102,
-0.07211018353700638,
0.08597578853368759,
-0.053976256400346756,
0.02086813375353813,
-0.07921154797077179,
0.14453600347042084,
0.1358003169298172,
-0.22427214682102203,
-0.18845774233341217,
0.08008988201618195,
-0.04151776060461998,
0.002516471315175295,
-0.12009873986244202,
0.0203259140253067,
0.011340168304741383,
-0.07712617516517639,
-0.20023661851882935,
0.06975231319665909,
-0.012538908049464226,
0.12323658913373947,
0.08633643388748169,
0.11387123912572861,
0.0701979547739029,
0.0365695096552372,
0.08696229010820389,
-0.1597817987203598,
-0.07319194078445435,
0.012180604971945286,
-0.04289618879556656,
-0.13857853412628174,
0.012152894400060177,
-0.004537949804216623,
0.09340329468250275,
0.11926652491092682,
-0.009631332010030746,
-0.08650849759578705,
-0.038752734661102295,
0.1831473559141159,
0.09290646016597748,
0.06635718792676926,
-0.16442692279815674,
-0.0941871851682663,
-0.10067396610975266,
0.115126833319664,
-0.15516501665115356,
0.0008358433842658997,
-0.2005297839641571,
0.04500902444124222,
-0.0340304933488369,
-0.17029567062854767,
0.15348196029663086,
-0.04660498723387718,
0.025950131937861443,
0.06727448105812073,
-0.047197125852108,
-0.23057058453559875,
0.14403320848941803,
-0.25768935680389404,
0.1272270828485489,
0.02707747183740139,
0.16339817643165588,
0.29961299896240234,
-0.14758020639419556,
-0.1372212916612625,
-0.020817741751670837,
0.19598455727100372,
-0.000022219421225599945,
-0.0553220734000206,
-0.15817180275917053,
0.004148927051573992,
-0.206094428896904,
-0.0023143645375967026,
0.024868523702025414,
-0.10609040409326553,
-0.06097043678164482,
-0.008452648296952248,
-0.18124820291996002,
0.23799674212932587,
-0.07951219379901886,
0.13903819024562836,
-0.12481357902288437,
-0.03984116017818451,
0.014908086508512497,
0.16568458080291748,
-0.0771375522017479,
-0.12181174010038376,
0.043637268245220184,
-0.10821735858917236,
0.2603946030139923,
0.0029765544459223747,
0.021930227056145668,
0.11472901701927185,
-0.2075282782316208,
0.02961365319788456,
-0.07970363646745682,
0.047664936631917953,
0.041104089468717575,
-0.045701898634433746,
0.0015717538772150874,
-0.007834628224372864,
0.19078469276428223,
0.032904114574193954,
0.046108704060316086,
-0.054514914751052856,
-0.15550114214420319,
0.015636466443538666,
-0.004844009410589933,
0.0010559250367805362,
0.02492956444621086,
0.12952186167240143,
-0.016685470938682556,
-0.08765069395303726,
-0.06520964205265045,
0.09034112840890884,
-0.05465301126241684,
-0.1636926531791687,
-0.009965194389224052,
0.22771020233631134,
-0.026039155200123787,
-0.03272261470556259,
-0.08054479956626892,
0.15326273441314697,
0.009442102164030075,
0.12534596025943756,
-0.0396839864552021,
-0.08282222598791122,
0.16007862985134125,
0.14337636530399323,
-0.09238611161708832,
0.03990964591503143,
0.1744348555803299,
0.2645340859889984,
0.04366055876016617,
0.1554255336523056,
-0.06959372013807297,
0.1314396858215332,
-0.06355653703212738,
-0.1200319230556488,
-0.03227202594280243,
-0.09966196864843369,
0.08017513900995255,
0.2986246347427368,
-0.05681787431240082,
0.21280233561992645,
0.09361054003238678,
-0.09732238948345184,
-0.1443459540605545,
-0.07899170368909836,
0.09397031366825104,
-0.08296958357095718,
-0.08431558310985565,
-0.16307218372821808,
-0.08360717445611954,
0.22455206513404846,
0.0024050436913967133,
0.09355751425027847,
-0.07401032745838165,
0.010282830335199833,
0.19268639385700226,
-0.08441787958145142,
-0.06738246977329254,
0.03222579136490822,
0.02183455601334572,
-0.08878640830516815,
0.30197933316230774,
0.13088586926460266,
-0.054489705711603165,
0.1299065202474594,
0.022476419806480408,
-0.16265244781970978,
0.09152127057313919,
-0.0021232638973742723,
-0.03545842692255974,
0.09439961612224579,
-0.016255227848887444,
0.06880806386470795,
-0.06215739622712135,
-0.11388812959194183,
0.04308651387691498,
0.015554672107100487,
0.004857312422245741,
0.030002079904079437,
-0.1093839555978775,
0.014072875492274761,
0.1837027370929718,
-0.019909173250198364,
0.032208994030952454,
-0.25429147481918335,
0.13603796064853668,
0.08949004113674164,
-0.089566171169281,
-0.022514427080750465,
-0.01997317187488079,
0.000607532449066639,
-0.11009220033884048,
-0.06465604901313782,
0.16110442578792572,
-0.1843639314174652,
-0.03768349066376686,
-0.05609099566936493,
-0.028297103941440582,
0.10341599583625793,
-0.0848565623164177,
0.10074026882648468,
-0.1031169593334198,
-0.05785371735692024,
0.10543595254421234,
0.20173503458499908,
0.08889506012201309,
-0.022160973399877548,
-0.040533412247896194,
-0.009219948202371597,
-0.20093156397342682,
0.016344958916306496,
0.094017393887043,
-0.10011491924524307,
-0.02435380220413208,
-0.07694192975759506,
-0.06450720876455307,
-0.04419568553566933,
-0.016157779842615128,
0.03353928402066231,
-0.02892521396279335,
-0.04569835588335991,
0.007161187939345837,
0.10020294040441513,
0.07747659832239151,
0.15791256725788116,
-0.0775006115436554,
-0.10866882652044296,
-0.02131282538175583,
0.11100509762763977,
0.024684017524123192,
-0.12233977019786835,
0.06550118327140808,
-0.006568455137312412,
-0.10077464580535889,
0.09699724614620209,
-0.16511711478233337,
0.04728378355503082,
-0.1706937998533249,
-0.08272374421358109,
-0.04895118996500969,
-0.12389126420021057,
-0.15352146327495575,
-0.054389603435993195,
-0.03309040889143944,
-0.061102643609046936,
0.13438406586647034,
0.012384683825075626,
0.17517685890197754,
0.02798398770391941,
-0.2123565375804901,
0.012208937667310238,
-2.692945298023357e-32,
-0.012150479480624199,
0.038013964891433716,
-0.0022322582080960274,
0.040591899305582047,
-0.16249331831932068,
0.01951560005545616,
-0.08683476597070694,
-0.05590900778770447,
0.05964577943086624,
-0.022068139165639877,
-0.13831903040409088,
-0.036031510680913925,
0.15719598531723022,
0.010131994262337685,
-0.15455684065818787,
0.0873425155878067,
0.1434839963912964,
-0.03474539890885353,
-0.07246210426092148,
0.11820393055677414,
0.0896691232919693,
0.0353987030684948,
-0.1560453474521637,
0.029207075014710426,
-0.08242621272802353,
0.01075709331780672,
0.09999948740005493,
-0.0194699726998806,
-0.04321883246302605,
-0.1453930288553238,
-0.026695024222135544,
0.12138859927654266,
0.012894544750452042,
-0.029619451612234116,
-0.10766616463661194,
0.15737853944301605,
-0.2780163586139679,
0.10212548822164536,
-0.08158642053604126,
0.06566264480352402,
0.09148481488227844,
0.17303483188152313,
0.006365750450640917,
-0.1610834300518036,
0.1513202041387558,
0.1049099862575531,
0.005255923140794039,
0.05813677981495857,
-0.05259265750646591,
0.036164771765470505,
-0.0017832985613495111,
0.16314013302326202,
0.004128482658416033,
0.05913146957755089,
0.07333897054195404,
0.08683088421821594,
0.0019123638048768044,
0.04942147806286812,
-0.13487328588962555,
-0.16154275834560394,
0.09493570029735565,
0.08788669854402542,
-0.07625056058168411,
-0.007839088328182697,
0.16812469065189362,
0.06155911460518837,
0.20253117382526398,
-0.12490924447774887,
0.0791197195649147,
0.09902295470237732,
-0.01654035598039627,
-0.12581422924995422,
-0.02526811696588993,
-0.07887552678585052,
-0.049578968435525894,
0.06413158029317856,
-0.12208287417888641,
-0.03535936027765274,
0.04415339231491089,
-0.004725721664726734,
0.04370376095175743,
0.06484698504209518,
0.1259554773569107,
0.04686965420842171,
0.012246550992131233,
0.06675907969474792,
0.00854672584682703,
0.10682821273803711,
-0.016190094873309135,
0.032073114067316055,
-0.10872787982225418,
0.18737247586250305,
0.12181606888771057,
0.07120157033205032,
-0.04161704704165459,
0.114718958735466,
-0.048316702246665955,
0.18506133556365967,
0.024549735710024834,
-0.07141640037298203,
0.08039423823356628,
-0.030803613364696503,
-0.015049557201564312,
0.03096637688577175,
0.1573156863451004,
-0.05809285491704941,
-0.06075950711965561,
0.10413409769535065,
-0.17394334077835083,
0.0020537269301712513,
-0.13010482490062714,
0.06711046397686005,
0.050380267202854156,
0.084551602602005,
0.17923171818256378,
-0.11889903992414474,
0.12479399144649506,
0.09896782785654068,
0.027640750631690025,
-0.015126519836485386,
-0.19946317374706268,
-0.022723667323589325,
0.1282462477684021,
-0.16206221282482147,
0.00042772715096361935,
0.03321268782019615,
0.0245618037879467,
0.015744294971227646,
0.07358688116073608,
-0.21420195698738098,
0.06183473393321037,
0.053265806287527084,
7.552623628725996e-7,
-0.17900347709655762,
0.0463208369910717,
0.09391988068819046,
0.0022948975674808025,
-0.013168181292712688,
0.012761776335537434,
0.0467650480568409,
-0.063968725502491,
0.11626654118299484,
0.1259026974439621,
0.11099755018949509,
-0.1239214837551117,
-0.006845216266810894,
0.021788017824292183,
-0.08268928527832031,
-0.1204831451177597,
-0.10945995897054672,
-0.012426886707544327,
-0.09248705953359604,
-0.1875331699848175,
0.013385427184402943,
0.16644150018692017,
0.017351562157273293,
-0.07870301604270935,
0.10665962100028992,
0.02172824554145336,
-0.09819226711988449,
0.11163120716810226,
0.06031661853194237,
-0.07975613325834274,
-0.005043470300734043,
-0.028081687167286873,
0.021956617012619972,
0.029664304107427597,
-0.1728527545928955,
-0.041407253593206406,
-0.03069474920630455,
0.09020152688026428,
0.03494368493556976,
0.05655654892325401,
0.003777092322707176,
-0.0857035294175148,
0.014273327775299549,
0.044025927782058716,
0.20325662195682526,
-0.0765707939863205,
-0.04192384332418442,
0.0420197956264019,
-0.23819705843925476,
0.011603755876421928,
-0.09712530672550201,
0.151542529463768,
0.002337571233510971,
0.2835703492164612,
0.00812885258346796,
0.05640378221869469,
-0.10703761875629425,
-0.09671653062105179,
0.04051131755113602,
-0.11207064986228943,
-0.23319141566753387,
0.03299916535615921,
-0.07230226695537567,
-0.014722224324941635,
-0.06292165070772171,
-0.003704493399709463,
-0.08411497622728348,
6.541020522023238e-35,
0.0798247903585434,
-0.021173788234591484,
0.049884941428899765,
-0.012445145286619663,
-0.10796190053224564,
-0.04904172569513321,
0.031699202954769135,
0.027578867971897125,
-0.023632794618606567,
-0.1731490194797516,
-0.2556302547454834
] |
https://github.com/huggingface/datasets/issues/5895 | The dir name and split strings are confused when loading ArmelR/stack-exchange-instruction dataset | Thanks for reporting, @DongHande.
I think the issue is caused by the metadata in the dataset card: in the header of the `README.md`, they state that the dataset has 4 splits ("finetune", "reward", "rl", "evaluation").
```yaml
splits:
- name: finetune
num_bytes: 6674567576
num_examples: 3000000
- name: reward
num_bytes: 6674341521
num_examples: 3000000
- name: rl
num_bytes: 6679279968
num_examples: 3000000
- name: evaluation
num_bytes: 4022714493
num_examples: 1807695
```
I guess the user wanted to define these as configs, instead of splits. This is not yet supported for no-script datasets, but will be soon supported. See:
- #5331
I think we should contact the dataset author to inform about the issue with the split names, as you already did: https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/discussions/1
Let's continue the discussion there! | ### Describe the bug
When I load the ArmelR/stack-exchange-instruction dataset, I encounter a bug that may be raised by confusing the dir name string and the split string about the dataset.
When I use the script "datasets.load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)", it fails. But it succeeds when I add the "streaming = True" parameter.
The website of the dataset is https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/ .
The traceback logs are as below:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 1706, in _prepare_split
split_info = self.info.splits[split_generator.name]
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/splits.py", line 530, in __getitem__
instructions = make_file_instructions(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 112, in make_file_instructions
name2filenames = {
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 113, in <dictcomp>
info.name: filenames_for_dataset_split(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 70, in filenames_for_dataset_split
prefix = filename_prefix_for_split(dataset_name, split)
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 54, in filename_prefix_for_split
if os.path.basename(name) != name:
File "/home/xxx/miniconda3/envs/code/lib/python3.9/posixpath.py", line 142, in basename
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
### Steps to reproduce the bug
1. import datasets library function: ```from datasets import load_dataset```
2. load dataset: ```ds=load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)```
### Expected behavior
The dataset can be loaded successfully without the streaming setting.
### Environment info
Linux,
python=3.9
datasets=2.12.0 | 122 | The dir name and split strings are confused when loading ArmelR/stack-exchange-instruction dataset
### Describe the bug
When I load the ArmelR/stack-exchange-instruction dataset, I encounter a bug that may be raised by confusing the dir name string and the split string about the dataset.
When I use the script "datasets.load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)", it fails. But it succeeds when I add the "streaming = True" parameter.
The website of the dataset is https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/ .
The traceback logs are as below:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 1706, in _prepare_split
split_info = self.info.splits[split_generator.name]
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/splits.py", line 530, in __getitem__
instructions = make_file_instructions(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 112, in make_file_instructions
name2filenames = {
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 113, in <dictcomp>
info.name: filenames_for_dataset_split(
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 70, in filenames_for_dataset_split
prefix = filename_prefix_for_split(dataset_name, split)
File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 54, in filename_prefix_for_split
if os.path.basename(name) != name:
File "/home/xxx/miniconda3/envs/code/lib/python3.9/posixpath.py", line 142, in basename
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
### Steps to reproduce the bug
1. import datasets library function: ```from datasets import load_dataset```
2. load dataset: ```ds=load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)```
### Expected behavior
The dataset can be loaded successfully without the streaming setting.
### Environment info
Linux,
python=3.9
datasets=2.12.0
Thanks for reporting, @DongHande.
I think the issue is caused by the metadata in the dataset card: in the header of the `README.md`, they state that the dataset has 4 splits ("finetune", "reward", "rl", "evaluation").
```yaml
splits:
- name: finetune
num_bytes: 6674567576
num_examples: 3000000
- name: reward
num_bytes: 6674341521
num_examples: 3000000
- name: rl
num_bytes: 6679279968
num_examples: 3000000
- name: evaluation
num_bytes: 4022714493
num_examples: 1807695
```
I guess the user wanted to define these as configs, instead of splits. This is not yet supported for no-script datasets, but will be soon supported. See:
- #5331
I think we should contact the dataset author to inform about the issue with the split names, as you already did: https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/discussions/1
Let's continue the discussion there! | [
0.2986295223236084,
-0.059427518397569656,
-0.06528649479150772,
0.1355910301208496,
0.1605314016342163,
0.1337883323431015,
0.23728923499584198,
-0.03263963386416435,
-0.09382442384958267,
0.12419883906841278,
0.018170181661844254,
-0.0863887146115303,
-0.028406357392668724,
-0.04357287287712097,
0.06407864391803741,
-0.08721449226140976,
-0.019268374890089035,
-0.1716585010290146,
0.05914090946316719,
0.005204624030739069,
0.02854510024189949,
0.1377459615468979,
0.002636472461745143,
-0.05881650373339653,
0.017216350883245468,
0.02824273146688938,
0.007918046787381172,
0.19784365594387054,
-0.036044616252183914,
-0.2043713480234146,
0.22136591374874115,
-0.1214207112789154,
0.06620720773935318,
0.3059064447879791,
0.000005645251803798601,
0.1144099235534668,
0.12139760702848434,
0.011888687498867512,
-0.1681167185306549,
-0.17934904992580414,
-0.03927317261695862,
0.17630408704280853,
-0.002982978941872716,
-0.0003041081945411861,
0.07491392642259598,
-0.10273262113332748,
0.014241769909858704,
-0.009292139671742916,
-0.1547667235136032,
0.22259286046028137,
0.05211401358246803,
-0.09927920997142792,
-0.04469777271151543,
-0.06302595138549805,
0.04699215292930603,
0.05810127407312393,
0.06376305222511292,
0.12200315296649933,
-0.09553858637809753,
0.1033916249871254,
-0.042251572012901306,
-0.07339891791343689,
0.1517961323261261,
0.15206924080848694,
-0.06510492414236069,
-0.011790012940764427,
-0.13978539407253265,
-0.22130195796489716,
-0.07341871410608292,
0.1898430734872818,
0.17380337417125702,
0.026400724425911903,
-0.17417266964912415,
0.08742312341928482,
-0.04039663076400757,
-0.04353567585349083,
0.023077718913555145,
0.06298480182886124,
-0.21263304352760315,
-0.009090978652238846,
-0.0037788613699376583,
-0.008557084016501904,
-0.015340959653258324,
0.1408044546842575,
-0.26435524225234985,
0.10112880915403366,
-0.1615488976240158,
-0.0016365571646019816,
-0.11269370466470718,
-0.1389361470937729,
0.11808525770902634,
-0.08210001140832901,
-0.10476014018058777,
-0.09357113391160965,
0.19615094363689423,
0.14746809005737305,
-0.13897617161273956,
-0.039036598056554794,
-0.07760988920927048,
0.12116939574480057,
-0.06289307028055191,
-0.2781282663345337,
-0.10508561134338379,
0.0028450018726289272,
0.08823154866695404,
0.06885197758674622,
0.0005384578253142536,
0.08540207892656326,
0.17189106345176697,
0.11067502945661545,
0.07613427937030792,
0.053599435836076736,
-0.025785621255636215,
-0.041503407061100006,
-0.101982980966568,
-0.015390388667583466,
0.03819756582379341,
-0.014299518428742886,
-0.11657164245843887,
-0.012242029421031475,
-0.03511552885174751,
0.04472186043858528,
0.05644124001264572,
0.12189438194036484,
0.11016614735126495,
-0.08219365775585175,
-0.13941925764083862,
0.21296505630016327,
0.047231998294591904,
0.0351710170507431,
-0.0169511828571558,
0.006364909000694752,
-0.059350185096263885,
-0.02005012147128582,
0.15559589862823486,
-0.035730935633182526,
0.12810026109218597,
-0.15351440012454987,
0.036516640335321426,
-0.12382825464010239,
-0.0878458246588707,
-0.06047656014561653,
-0.0662551298737526,
-0.027020718902349472,
0.0816870853304863,
0.10597049444913864,
0.15119275450706482,
0.09290868043899536,
-0.04893314465880394,
0.023681463673710823,
-0.2746432423591614,
0.10612981766462326,
-0.16572418808937073,
0.03383418917655945,
0.07366380095481873,
0.01735370233654976,
0.08640193194150925,
-0.07540144771337509,
-0.0039378805086016655,
0.06520624458789825,
0.13383907079696655,
0.014364507980644703,
0.10214125365018845,
-0.11786027997732162,
0.045188650488853455,
-0.04747883230447769,
0.055970415472984314,
-0.05685042962431908,
-0.16957636177539825,
-0.12716157734394073,
0.0388784259557724,
0.050443440675735474,
-0.10584845393896103,
0.12465892732143402,
-0.21261857450008392,
0.22331343591213226,
-0.03719475120306015,
-0.06094631552696228,
-0.10630053281784058,
-0.026883574202656746,
0.0018746122950688004,
-0.005587544292211533,
-0.04512299969792366,
-0.19171753525733948,
-0.033679112792015076,
-0.03941250964999199,
0.008487891405820847,
0.1404864490032196,
0.13477635383605957,
0.002454741857945919,
-0.03615741804242134,
0.10799337923526764,
-0.14511218667030334,
-0.07902668416500092,
0.04890219867229462,
-0.11169412732124329,
-0.1560695767402649,
-0.09775508940219879,
0.16981302201747894,
-0.1880485564470291,
0.05336372181773186,
-0.1287626177072525,
-0.11490511894226074,
0.001769617898389697,
-0.01919461227953434,
0.21422281861305237,
-0.22699539363384247,
0.18616658449172974,
-0.0451774001121521,
-0.16965577006340027,
-0.30908626317977905,
-0.0019703807774931192,
-0.053224217146635056,
-0.0037222986575216055,
-0.09392476081848145,
-0.02616160176694393,
-0.03758810833096504,
0.1394144892692566,
0.00897160917520523,
0.026221444830298424,
-0.04803080856800079,
0.11417433619499207,
0.048639316111803055,
0.07212088257074356,
-0.046979695558547974,
0.06226351112127304,
-0.1296592801809311,
-0.026359302923083305,
-0.049197420477867126,
0.06211787462234497,
-0.2137245088815689,
-0.07868528366088867,
0.05431849882006645,
0.12297647446393967,
0.16202232241630554,
-0.08052610605955124,
-0.13544879853725433,
-0.2675454318523407,
0.08150231838226318,
0.0338023416697979,
0.02068796008825302,
-0.044976137578487396,
-0.06091296672821045,
-0.0007295691757462919,
-0.022901056334376335,
-0.055520083755254745,
-0.13880574703216553,
0.16187117993831635,
0.05271941050887108,
-0.08931145817041397,
0.26541876792907715,
-0.040983568876981735,
-0.18026278913021088,
-0.036199238151311874,
0.13427744805812836,
0.071711465716362,
0.05939815938472748,
0.04138767719268799,
-0.0205963347107172,
-0.04401908442378044,
0.20154321193695068,
-0.11757414788007736,
-0.06298843771219254,
0.11170929670333862,
-0.009021267294883728,
-0.0741807222366333,
0.013074284419417381,
0.1782851666212082,
-0.03420893847942352,
0.06894233077764511,
0.14772681891918182,
-0.011163429357111454,
-0.038728490471839905,
-0.13868464529514313,
0.14389660954475403,
0.07151668518781662,
-0.06176215782761574,
-0.12216168642044067,
-0.009397407993674278,
-0.05056902766227722,
-0.0923895612359047,
0.02455747313797474,
0.045910902321338654,
-0.18592892587184906,
0.04071975126862526,
0.04119123890995979,
-0.058954328298568726,
-0.02451934851706028,
-0.1553109735250473,
-0.00881238467991352,
0.03432862088084221,
-0.14038346707820892,
-0.05171602964401245,
-0.2760958969593048,
-0.09336166828870773,
-0.03170117363333702,
-0.007623110897839069,
-0.13267861306667328,
-0.12784692645072937,
0.14574600756168365,
-0.1266932487487793,
0.11881045997142792,
0.06729811429977417,
-0.017368780449032784,
0.046201303601264954,
-0.003094685962423682,
0.027777094393968582,
-0.04059135541319847,
-0.06680432707071304,
-0.022664619609713554,
0.0948447436094284,
0.08996479958295822,
0.07145541906356812,
0.20321466028690338,
-0.0758088007569313,
-0.17393597960472107,
0.10230681300163269,
-0.13348984718322754,
0.0791049525141716,
0.08201069384813309,
-0.0889478474855423,
0.1567412167787552,
0.1470271497964859,
-0.013891708105802536,
-0.020006509497761726,
-0.14356662333011627,
-0.36620935797691345,
-0.14664006233215332,
-0.038864344358444214,
0.007277370430529118,
-0.02997790090739727,
0.11608479171991348,
-0.12437277287244797,
-0.11615189909934998,
0.039604343473911285,
-0.09258648008108139,
-0.15101061761379242,
0.008237704634666443,
0.2822088301181793,
-0.08142182976007462,
0.04747305065393448,
0.06572529673576355,
0.013117535039782524,
-0.06182261183857918,
0.0706145167350769,
0.024608347564935684,
0.07161257416009903,
-0.031699296087026596,
-0.005348538514226675,
0.0205986425280571,
0.1177634745836258,
0.03311539068818092,
0.0023157719988375902,
-0.0010131971212103963,
-0.030178338289260864,
0.12830568850040436,
-0.08293166756629944,
-0.002849576063454151,
-0.0176820307970047,
-0.02869025245308876,
0.23715989291667938,
-0.03078453801572323,
0.11518228054046631,
-0.0473054014146328,
-0.07118093967437744,
0.14124533534049988,
0.07953204214572906,
0.09107168763875961,
-0.021421048790216446,
-0.09932280331850052,
0.12917284667491913,
-0.16079771518707275,
-0.041205279529094696,
0.07556304335594177,
-0.026703104376792908,
0.06301587074995041,
-0.05082542076706886,
0.00016801332822069526,
-0.010411825031042099,
0.005350067745894194,
-0.17109809815883636,
-0.07268856465816498,
-0.12285932898521423,
0.08292602747678757,
0.17528222501277924,
0.10147912800312042,
-0.07129120826721191,
0.07865798473358154,
-0.1227976605296135,
0.0382487028837204,
0.026402141898870468,
0.010013162158429623,
-0.0575513020157814,
-0.11273157596588135,
0.02923722378909588,
-0.01610642671585083,
0.19726558029651642,
0.1308857649564743,
-0.041761238127946854,
0.06968659162521362,
0.1811227798461914,
0.10914687812328339,
0.07172241806983948,
0.0321749746799469,
-0.007491549011319876,
0.06284903734922409,
0.11188750714063644,
-0.019663743674755096,
-0.06310641765594482,
0.0835222601890564,
0.08203660696744919,
-0.2548518776893616,
-0.01266656257212162,
0.028794780373573303,
0.10444523394107819,
0.016731780022382736,
0.04786478355526924,
-0.10328130424022675,
-0.11431069672107697,
-0.14129798114299774,
-0.12247884273529053,
-0.0414036363363266,
0.15969222784042358,
0.09653937816619873,
-0.035833872854709625,
-0.0405162051320076,
0.1336502581834793,
-0.03229481354355812,
0.13184435665607452,
-0.09902114421129227,
0.15691545605659485,
-0.044737089425325394,
0.018201470375061035,
0.1252494752407074,
0.05689628794789314,
0.13351751863956451,
0.3091464042663574,
-0.3240286707878113,
-0.11742187291383743,
0.05921195074915886,
-0.26551809906959534,
0.009181075729429722,
0.13904547691345215,
-0.08816787600517273,
-0.05581049993634224,
-0.1721286028623581,
-0.0024221371859312057,
-0.006159037817269564,
0.052556853741407394,
0.2199411690235138,
-0.05762651190161705,
-0.16691230237483978,
-0.14259089529514313,
-0.1417468786239624,
0.09651690721511841,
0.05370703339576721,
0.1743950992822647,
-0.1459372341632843,
-0.12434226274490356,
0.13652849197387695,
-0.12414652109146118,
-0.06763865053653717,
-0.1075260117650032,
0.10525722801685333,
0.007469413336366415,
0.08389951288700104,
0.18871697783470154,
-0.2723715007305145,
-0.02310866490006447,
0.04884900897741318,
-0.08490955829620361,
0.028492126613855362,
-0.10790156573057175,
0.01787424460053444,
0.19692867994308472,
0.01836514100432396,
0.014363125897943974,
-0.2632896304130554,
0.09172634780406952,
-0.06317736953496933,
0.10543610155582428,
0.0033291312865912914,
-0.02165043354034424,
-0.1043839231133461,
-0.03828536719083786,
0.24326060712337494,
0.05721248313784599,
0.00498917605727911,
-0.019338170066475868,
-0.19809862971305847,
0.017061932012438774,
-0.058431532233953476,
-0.012277426198124886,
-0.014489047229290009,
0.20911453664302826,
-0.035385385155677795,
-0.033866286277770996,
0.007773205172270536,
0.0660555362701416,
0.1752103865146637,
0.09041949361562729,
0.005261420272290707,
0.08493480831384659,
0.10351543873548508,
-0.00654250755906105,
-0.17116492986679077,
0.031903401017189026,
0.1424696445465088,
-0.0636606216430664,
-0.1429634988307953,
-0.07647736370563507,
0.09745028614997864,
-0.011748109012842178,
-0.15796241164207458,
0.16564762592315674,
0.04863044619560242,
-0.03366406261920929,
-0.038545362651348114,
0.02514061890542507,
0.1661330610513687,
0.03795831277966499,
-0.13607509434223175,
0.0346587710082531,
-0.12550635635852814,
-0.12926217913627625,
0.0008035083883441985,
-0.09514115750789642,
-0.04589487612247467,
0.048438847064971924,
0.06648394465446472,
0.0537312813103199,
0.2637481987476349,
0.22844120860099792,
-0.09468033164739609,
-0.005903329234570265,
0.18988023698329926,
0.11314801126718521,
-0.21545441448688507,
0.14888222515583038,
0.06549274921417236,
-0.04206637293100357,
-0.17903855443000793,
-0.06611605733633041,
0.09715604037046432,
0.1827217936515808,
-0.09879016131162643,
0.0022122683003544807,
0.09556715935468674,
-0.06779372692108154,
-0.07834690064191818,
0.013756789267063141,
0.1403646469116211,
-0.02298940159380436,
-0.08790994435548782,
-0.02892197296023369,
-2.3964196481255363e-32,
-0.02781248837709427,
0.11787455528974533,
0.0651102066040039,
-0.03933447226881981,
-0.1080787405371666,
0.17373397946357727,
-0.07808816432952881,
0.0027663088403642178,
-0.09090757369995117,
-0.022232074290513992,
-0.03383495658636093,
-0.03414285182952881,
0.007846195250749588,
0.024048365652561188,
0.031119197607040405,
-0.06583818793296814,
0.016216007992625237,
0.07776062935590744,
0.055025480687618256,
0.04384424909949303,
0.18695856630802155,
0.07784173637628555,
0.10236676037311554,
-0.031265079975128174,
0.018819978460669518,
-0.06406010687351227,
-0.06734922528266907,
-0.1261986345052719,
0.20254935324192047,
0.11147923022508621,
0.027433274313807487,
-0.0024515539407730103,
0.053334128111600876,
-0.0984921082854271,
-0.03877781331539154,
-0.03236464783549309,
-0.20897799730300903,
-0.17124949395656586,
-0.08511975407600403,
-0.047354016453027725,
-0.1676572561264038,
0.11666615307331085,
0.1880171149969101,
-0.1355619728565216,
-0.09553941339254379,
0.05033133924007416,
-0.011859340593218803,
0.05495806783437729,
0.050709594041109085,
-0.12868353724479675,
0.07305263727903366,
0.03418285399675369,
0.06472301483154297,
0.10149341821670532,
0.18620893359184265,
-0.29971686005592346,
0.024503592401742935,
0.06937608122825623,
-0.020430613309144974,
0.049401480704545975,
0.25610822439193726,
-0.05465903505682945,
0.1158483624458313,
0.0065314616076648235,
-0.02262125536799431,
-0.02608545497059822,
0.3008689284324646,
0.011465724557638168,
0.19201017916202545,
-0.13045500218868256,
-0.011959277093410492,
0.09911753982305527,
0.011404838413000107,
-0.09519659727811813,
-0.04867035895586014,
-0.03111221082508564,
-0.12321916967630386,
0.02251441590487957,
0.11018534749746323,
-0.10207549482584,
-0.02629823051393032,
-0.03342445567250252,
-0.08019807189702988,
0.00047489014104939997,
-0.07603433728218079,
0.007720895577222109,
-0.06762189418077469,
-0.0383843332529068,
-0.13406647741794586,
-0.15402254462242126,
0.08348435908555984,
0.11544368416070938,
-0.01084611564874649,
-0.06272865831851959,
-0.1700727641582489,
0.09661918133497238,
-0.029353754594922066,
0.021615024656057358,
-0.07464354485273361,
0.11354540288448334,
-0.1259707361459732,
0.11154721677303314,
0.1458609402179718,
-0.048606567084789276,
-0.027798838913440704,
-0.007330377120524645,
0.11188424378633499,
-0.12544140219688416,
-0.09616616368293762,
-0.020085327327251434,
0.004993620328605175,
0.14361608028411865,
0.06822236627340317,
0.12549611926078796,
0.15283003449440002,
0.1203000620007515,
-0.05528714135289192,
-0.09795916825532913,
0.3312685191631317,
0.036357250064611435,
0.011606991291046143,
0.05337920039892197,
-0.3490752577781677,
0.17555861175060272,
0.01449461467564106,
-0.004730090033262968,
-0.14014780521392822,
-0.12508362531661987,
0.058654528111219406,
-0.0491282120347023,
-0.014933865517377853,
-0.014214476570487022,
7.135759005905129e-7,
-0.1294458955526352,
0.1398332118988037,
0.09642206877470016,
-0.05735401436686516,
-0.13315080106258392,
0.11906293779611588,
-0.0734921395778656,
0.05544469505548477,
-0.07202383875846863,
0.04909856989979744,
0.028303710743784904,
-0.08336446434259415,
-0.024202970787882805,
-0.20037846267223358,
0.17618802189826965,
0.1483398973941803,
-0.13047091662883759,
0.11659812182188034,
-0.17018276453018188,
0.16416384279727936,
-0.03289182484149933,
0.18924932181835175,
0.2098008692264557,
-0.11446644365787506,
-0.10965483635663986,
0.024618307128548622,
-0.36275768280029297,
-0.06635664403438568,
0.08667910844087601,
0.07586570829153061,
-0.12672926485538483,
-0.034217339009046555,
-0.06273086369037628,
0.001247837906703353,
0.07255052030086517,
-0.08723785728216171,
-0.2310265153646469,
-0.1149989515542984,
-0.07870786637067795,
0.25930196046829224,
-0.007698396220803261,
-0.010302653536200523,
0.029353512451052666,
-0.02616092935204506,
0.04406018182635307,
0.22178837656974792,
-0.008417305536568165,
-0.059135060757398605,
-0.13758394122123718,
0.165011927485466,
-0.020847881212830544,
0.010064246132969856,
0.15498247742652893,
0.21083182096481323,
-0.15329502522945404,
-0.055573392659425735,
0.001781259197741747,
-0.13397344946861267,
0.3153896927833557,
0.0285243708640337,
-0.08574427664279938,
-0.0823795348405838,
-0.033377841114997864,
0.04955032467842102,
0.12128903716802597,
-0.14505796134471893,
0.042943406850099564,
1.2446358035528265e-34,
0.01252712681889534,
-0.04250011593103409,
-0.03203083574771881,
-0.10635434091091156,
0.008343938738107681,
-0.04007859155535698,
0.1366414576768875,
-0.03807706758379936,
-0.1838257759809494,
-0.021533723920583725,
-0.061912085860967636
] |
https://github.com/huggingface/datasets/issues/5892 | User access requests with manual review do not notify the dataset owner | I think this has been addressed.
Please open a new issue if you are still not getting notified. | ### Describe the bug
When a user access requests are enabled, and new requests are set to Manual Review, the dataset owner should be notified of the pending requests. However, instead, currently nothing happens, and so the dataset request can go unanswered for quite some time until the owner happens to check that particular dataset's Settings pane.
### Steps to reproduce the bug
1. Enable a dataset's user access requests
2. Set to Manual Review
3. Ask another HF user to request access to the dataset
4. Dataset owner is not notified
### Expected behavior
The dataset owner should receive some kind of notification, perhaps in their HF site inbox, or by email, when a dataset access request is made and manual review is enabled.
### Environment info
n/a | 18 | User access requests with manual review do not notify the dataset owner
### Describe the bug
When a user access requests are enabled, and new requests are set to Manual Review, the dataset owner should be notified of the pending requests. However, instead, currently nothing happens, and so the dataset request can go unanswered for quite some time until the owner happens to check that particular dataset's Settings pane.
### Steps to reproduce the bug
1. Enable a dataset's user access requests
2. Set to Manual Review
3. Ask another HF user to request access to the dataset
4. Dataset owner is not notified
### Expected behavior
The dataset owner should receive some kind of notification, perhaps in their HF site inbox, or by email, when a dataset access request is made and manual review is enabled.
### Environment info
n/a
I think this has been addressed.
Please open a new issue if you are still not getting notified. | [
-0.04771650582551956,
0.09973207116127014,
-0.07544778287410736,
0.09555046260356903,
0.19261638820171356,
0.025193432345986366,
0.054100919514894485,
-0.06253962218761444,
-0.09887374192476273,
0.21234869956970215,
-0.19966687262058258,
-0.05923331901431084,
-0.11155277490615845,
-0.07914011180400848,
-0.025990866124629974,
0.14625850319862366,
-0.003907186910510063,
-0.09310565888881683,
-0.03912632167339325,
-0.028191888704895973,
-0.11354430019855499,
-0.03243331238627434,
0.02054842934012413,
0.03374207019805908,
-0.04350227862596512,
-0.07023468613624573,
-0.13511744141578674,
-0.1023097112774849,
0.0397636853158474,
-0.07342420518398285,
-0.02414298988878727,
0.30800166726112366,
-0.003098693210631609,
0.1461818814277649,
0.000005093938398204045,
0.0013722280273213983,
0.2764725089073181,
0.11332322657108307,
-0.21622762084007263,
0.028110045939683914,
-0.05997287109494209,
-0.2384466826915741,
0.016789084300398827,
-0.05299745127558708,
-0.05566345155239105,
-0.12351393699645996,
-0.057995058596134186,
-0.1279459148645401,
-0.052791837602853775,
-0.0520441010594368,
-0.04735430330038071,
0.19083955883979797,
-0.06654243171215057,
-0.1547679305076599,
0.2305544763803482,
0.07581126689910889,
0.004627443850040436,
-0.05761789157986641,
-0.1961410492658615,
0.08483773469924927,
-0.10845127701759338,
0.03483489528298378,
0.040069565176963806,
0.07649332284927368,
-0.12905409932136536,
-0.16825395822525024,
-0.2538462281227112,
-0.049881644546985626,
0.03260340169072151,
0.15692561864852905,
0.20074215531349182,
0.11219584941864014,
-0.14904698729515076,
0.060927074402570724,
-0.0016400684835389256,
0.10095955431461334,
-0.02874453365802765,
-0.0783807784318924,
0.05573643371462822,
-0.0422416552901268,
-0.1701301485300064,
0.05742780119180679,
-0.13537165522575378,
0.04239439591765404,
-0.08297757059335709,
0.013951118104159832,
-0.06593936681747437,
-0.05417684465646744,
-0.24605858325958252,
-0.047918643802404404,
0.32251599431037903,
-0.034619495272636414,
-0.123414047062397,
-0.08320187777280807,
-0.03256210312247276,
-0.002547983778640628,
0.07687777280807495,
-0.05908210203051567,
0.12078547477722168,
0.03243527188897133,
0.12214485555887222,
0.06646586954593658,
-0.3208368718624115,
0.11716749519109726,
0.11937018483877182,
-0.054434120655059814,
0.0015124399214982986,
0.07182778418064117,
0.2978653907775879,
0.12541577219963074,
-0.005201876629143953,
0.011813169345259666,
0.005335681606084108,
-0.0786433294415474,
0.15405015647411346,
0.052807461470365524,
0.07850929349660873,
0.038971271365880966,
0.05361929535865784,
0.01579471491277218,
0.03461737185716629,
-0.09710882604122162,
-0.08966489136219025,
0.08626674115657806,
-0.13413336873054504,
-0.022264381870627403,
0.08445844799280167,
-0.07420375198125839,
0.13085392117500305,
0.028584446758031845,
-0.12716226279735565,
-0.16570468246936798,
-0.06717300415039062,
0.11519469320774078,
0.07843029499053955,
0.08648161590099335,
0.12367361783981323,
0.1328161060810089,
-0.08224619925022125,
-0.12879377603530884,
0.08210572600364685,
0.0842382088303566,
-0.10065553337335587,
0.033205728977918625,
0.1974361687898636,
0.03514920547604561,
0.15560129284858704,
0.08122556656599045,
-0.07699407637119293,
-0.0173155777156353,
0.052900150418281555,
0.2497933954000473,
-0.05683949589729309,
-0.03660685941576958,
-0.0538775734603405,
0.0546678826212883,
-0.062238436192274094,
0.20662634074687958,
-0.16135239601135254,
-0.04595881700515747,
0.1348702609539032,
-0.012794281356036663,
0.15839876234531403,
0.04934278875589371,
0.06611192971467972,
0.18836212158203125,
0.0492330826818943,
0.05245160311460495,
-0.19742150604724884,
-0.0023380217608064413,
0.06319892406463623,
-0.06740788370370865,
-0.10267557203769684,
0.07966776937246323,
-0.12531527876853943,
0.03898555412888527,
-0.007341049611568451,
-0.10257091373205185,
-0.10521823912858963,
-0.016149865463376045,
-0.11683369427919388,
-0.021547749638557434,
-0.06445519626140594,
-0.04985589534044266,
-0.12978202104568481,
-0.15005749464035034,
-0.016981547698378563,
-0.05730699002742767,
0.006634992081671953,
0.06332891434431076,
0.08491035550832748,
-0.09534943848848343,
-0.18505103886127472,
0.12027915567159653,
0.04347249120473862,
0.04248170554637909,
0.18845516443252563,
-0.20440222322940826,
0.16140729188919067,
-0.058815356343984604,
-0.03686678782105446,
0.041332636028528214,
0.02795472927391529,
0.1534605622291565,
0.028680220246315002,
0.0014334417646750808,
0.036895573139190674,
0.09763750433921814,
0.05851299315690994,
-0.15828537940979004,
-0.14089228212833405,
-0.0880022644996643,
-0.0838705524802208,
0.05680781975388527,
-0.30034053325653076,
-0.0019896263256669044,
-0.09022784233093262,
0.09179399162530899,
-0.18066133558750153,
0.04483899846673012,
-0.11749467253684998,
0.14613278210163116,
-0.21053946018218994,
0.04722058027982712,
0.05293433740735054,
0.08917414397001266,
0.055767644196748734,
0.15958501398563385,
0.04079059511423111,
0.089024618268013,
0.12256556004285812,
0.12039811909198761,
-0.04659315571188927,
0.11544980108737946,
-0.14707133173942566,
0.08454088866710663,
0.16216157376766205,
-0.29449746012687683,
-0.016967497766017914,
0.037039775401353836,
0.14361488819122314,
-0.00447470648214221,
0.02662697806954384,
-0.0031789743807166815,
0.00159093935508281,
-0.040914762765169144,
-0.019912421703338623,
0.06616080552339554,
-0.010588373988866806,
0.06345397233963013,
0.04715453460812569,
0.10169494152069092,
-0.13798397779464722,
0.04770788177847862,
-0.14831385016441345,
-0.0724867433309555,
0.1841505914926529,
0.04768304154276848,
-0.07162684947252274,
0.1309949904680252,
0.32856443524360657,
0.05980672687292099,
-0.17694751918315887,
-0.13174574077129364,
0.01721770688891411,
-0.030932407826185226,
0.33933916687965393,
-0.007003202103078365,
-0.22367848455905914,
0.07085376977920532,
0.04186045378446579,
-0.03739123418927193,
-0.053441207855939865,
-0.013778041116893291,
0.07443724572658539,
-0.07131081819534302,
-0.12764769792556763,
0.0486627034842968,
0.036546532064676285,
0.17912456393241882,
-0.1499033123254776,
0.06212007254362106,
0.08534597605466843,
-0.16969053447246552,
0.06157327815890312,
-0.02011224441230297,
-0.07946591079235077,
0.007853295654058456,
0.09721270948648453,
0.008522594347596169,
0.0003346316225361079,
-0.1557983160018921,
-0.02833070605993271,
-0.10713725537061691,
-0.06945883482694626,
-0.09872188419103622,
-0.17713087797164917,
0.03635968267917633,
-0.10400167852640152,
0.07562784850597382,
-0.003670494304969907,
0.24388308823108673,
-0.005295352078974247,
-0.05402585119009018,
0.020367447286844254,
-0.15788666903972626,
0.1356818974018097,
0.18664968013763428,
-0.013757439330220222,
-0.15644703805446625,
0.04728810489177704,
-0.019733108580112457,
0.16523535549640656,
-0.017937256023287773,
-0.021381523460149765,
-0.08797591179609299,
-0.057945337146520615,
0.014033608138561249,
0.10926605015993118,
0.3614491820335388,
0.10001767426729202,
0.060370802879333496,
0.07794906198978424,
0.015855679288506508,
-0.06841425597667694,
0.17260991036891937,
-0.14033207297325134,
-0.09983275085687637,
0.05465652048587799,
-0.09431841224431992,
0.01661689765751362,
0.06345802545547485,
-0.0009193707956001163,
-0.12090028077363968,
-0.018197281286120415,
-0.05810645967721939,
-0.02122134156525135,
-0.08285991847515106,
0.2378925085067749,
-0.026464026421308517,
0.059652697294950485,
0.029361333698034286,
-0.09556650370359421,
0.09541275352239609,
0.023905286565423012,
-0.013913222588598728,
-0.04399128258228302,
-0.25596877932548523,
0.17566277086734772,
-0.006144000217318535,
0.06010683625936508,
0.18394561111927032,
-0.11492222547531128,
-0.0898968055844307,
-0.12359326332807541,
-0.05365747958421707,
-0.10019198060035706,
0.009603594429790974,
-0.16563710570335388,
-0.06704480946063995,
0.04293379560112953,
0.0003390260972082615,
0.11529833823442459,
-0.04554654285311699,
0.0899026021361351,
0.1840779036283493,
0.08815076947212219,
0.21847721934318542,
0.21239864826202393,
-0.19109593331813812,
-0.00918037910014391,
-0.06989624351263046,
-0.010845103301107883,
-0.040169570595026016,
0.06742236763238907,
-0.21241214871406555,
0.15607616305351257,
-0.10376211255788803,
-0.08705168962478638,
-0.13124758005142212,
-0.08820205181837082,
-0.2861950993537903,
-0.06688874214887619,
0.08605459332466125,
0.16363045573234558,
-0.17425675690174103,
-0.06928612291812897,
0.042692992836236954,
-0.017084013670682907,
0.17691314220428467,
-0.10885541141033173,
0.11873341351747513,
0.0641312450170517,
-0.024356121197342873,
0.08428964763879776,
-0.01457091886550188,
0.05280650779604912,
-0.07182378321886063,
0.042742762714624405,
0.09586551785469055,
-0.026901526376605034,
0.03455273434519768,
-0.18344049155712128,
0.19096402823925018,
-0.0074668871238827705,
-0.09379280358552933,
0.2759867012500763,
-0.006269116885960102,
0.04528309032320976,
-0.08687929064035416,
-0.056916654109954834,
0.13191808760166168,
0.06904815137386322,
-0.165986567735672,
0.11679434031248093,
-0.1696414202451706,
-0.1494823694229126,
-0.16133809089660645,
0.007420529145747423,
-0.2118348926305771,
0.06510365754365921,
0.0569266676902771,
0.05019865930080414,
-0.011198759078979492,
0.15034045279026031,
-0.0888560339808464,
-0.039156120270490646,
0.1433083564043045,
-0.04888567328453064,
0.02435947023332119,
-0.012810868211090565,
0.12394697219133377,
0.00805398914963007,
0.07872427999973297,
0.04928450286388397,
-0.056494202464818954,
0.24259595572948456,
-0.07579073309898376,
-0.15739277005195618,
0.03728102520108223,
-0.17586328089237213,
0.254861056804657,
0.08886199444532394,
0.020345434546470642,
0.09389626979827881,
-0.04281814023852348,
0.09065510332584381,
-0.047311458736658096,
-0.00839246530085802,
-0.04070916026830673,
-0.13970910012722015,
-0.3220512270927429,
-0.26227137446403503,
-0.09224828332662582,
0.23026762902736664,
-0.03731345012784004,
0.1327345073223114,
0.030309950932860374,
-0.0023246086202561855,
-0.060546062886714935,
-0.18473906815052032,
-0.025673758238554,
-0.19564886391162872,
0.045986469835042953,
-0.14204064011573792,
-0.056781329214572906,
0.2712666690349579,
-0.1990167200565338,
-0.05560336634516716,
0.06214091181755066,
0.04363277927041054,
-0.034210070967674255,
-0.014773227274417877,
0.09435997903347015,
0.08666589111089706,
0.13438552618026733,
0.022812888026237488,
0.025558171793818474,
-0.08540941774845123,
-0.025799710303544998,
0.24423137307167053,
-0.0478549525141716,
0.03629987686872482,
-0.03807355836033821,
0.0025987010449171066,
0.0671367272734642,
0.11750879883766174,
0.1687140017747879,
-0.09387139976024628,
0.06936928629875183,
0.14053021371364594,
0.05561871826648712,
0.13186633586883545,
-0.04059295356273651,
-0.17007948458194733,
-0.07252445816993713,
-0.14872467517852783,
0.08757735788822174,
-0.08038021624088287,
0.17780067026615143,
0.12696029245853424,
-0.03958900272846222,
0.21991577744483948,
0.10523877292871475,
0.06652525067329407,
-0.21178577840328217,
0.050306789577007294,
0.017407748848199844,
-0.04709132760763168,
-0.002870763186365366,
0.032551560550928116,
0.09083858877420425,
-0.06241895630955696,
-0.06860386580228806,
0.14655689895153046,
-0.12625649571418762,
-0.27616262435913086,
0.16081763803958893,
-0.035843126475811005,
-0.10433568060398102,
0.004195950925350189,
-0.017817754298448563,
0.078577421605587,
-0.08640537410974503,
0.07272106409072876,
0.054038796573877335,
0.0455767996609211,
-0.010932697914540768,
0.14358724653720856,
0.1491503119468689,
0.0898432731628418,
0.015047218650579453,
-0.026836559176445007,
-0.02257441356778145,
-0.008871818892657757,
0.02185487374663353,
0.1501980572938919,
-0.20416125655174255,
-0.06801065802574158,
0.034194037318229675,
-0.01866624318063259,
-0.03684144467115402,
-0.12794500589370728,
-0.04413115978240967,
-0.1728820949792862,
-0.05663960427045822,
-0.02866467460989952,
-0.022215241566300392,
-0.1642570197582245,
-0.2917048931121826,
-0.041968997567892075,
0.018157683312892914,
0.006547238677740097,
-0.05581433326005936,
-0.02217385545372963,
-2.5434829545578295e-32,
-0.10395396500825882,
-0.040542226284742355,
-0.13580040633678436,
-0.0233185812830925,
-0.019926460459828377,
-0.04747727885842323,
0.03735429421067238,
-0.0706181600689888,
0.022370753809809685,
0.026867538690567017,
-0.08147713541984558,
-0.007037997245788574,
0.04691608250141144,
0.14494723081588745,
0.25055503845214844,
-0.12474115937948227,
0.017819110304117203,
-0.1220574676990509,
0.06923020631074905,
0.09184587001800537,
0.007901733741164207,
0.06397594511508942,
-0.10164592415094376,
-0.02012946456670761,
0.022103970870375633,
0.018088970333337784,
-0.0530463382601738,
-0.1389988660812378,
-0.14169947803020477,
0.12404407560825348,
0.02927389182150364,
0.13773216307163239,
0.09624014794826508,
0.058804649859666824,
-0.001012092805467546,
0.021166112273931503,
-0.11325938999652863,
-0.009395180270075798,
-0.15103745460510254,
-0.013935673050582409,
-0.13160960376262665,
0.15340586006641388,
-0.04628356173634529,
-0.11634307354688644,
-0.1027197614312172,
0.06004408374428749,
0.0002587789495009929,
0.09941688925027847,
-0.019008835777640343,
-0.05442151054739952,
-0.08479944616556168,
0.03240859508514404,
0.12190742790699005,
-0.006080562714487314,
0.18162785470485687,
0.04841158911585808,
0.1640615314245224,
-0.048962563276290894,
-0.1649562567472458,
0.005114764906466007,
0.14828763902187347,
-0.0689268633723259,
-0.02257443219423294,
0.20311394333839417,
-0.00007073698361637071,
-0.04262464866042137,
0.30914491415023804,
0.07727731764316559,
-0.009318075142800808,
0.08272498100996017,
-0.0530511736869812,
0.0773036926984787,
-0.24196115136146545,
-0.011717738583683968,
-0.30513274669647217,
0.09672348946332932,
0.06045045703649521,
-0.08025311678647995,
-0.04676574841141701,
0.10050244629383087,
0.11698964238166809,
-0.270486056804657,
-0.08942484855651855,
-0.06564436852931976,
0.03508974611759186,
-0.09305384755134583,
-0.0578763373196125,
-0.04653884097933769,
-0.04711293429136276,
-0.06054014712572098,
0.19069094955921173,
0.03631579875946045,
-0.35149264335632324,
-0.03992295265197754,
-0.15298360586166382,
0.08483654260635376,
0.09358993917703629,
0.14545512199401855,
-0.07384975999593735,
0.06643768399953842,
-0.04367521032691002,
0.016871377825737,
0.10567761957645416,
0.11062890291213989,
-0.014986426569521427,
-0.07016213983297348,
0.04447797313332558,
0.10364995151758194,
-0.14093905687332153,
-0.09210794419050217,
-0.09475376456975937,
0.11894744634628296,
0.13214664161205292,
0.05174371972680092,
0.12721553444862366,
-0.11799652874469757,
-0.040114790201187134,
0.11088079959154129,
0.006034082733094692,
0.12428178638219833,
-0.26679614186286926,
0.1877508908510208,
-0.16025282442569733,
0.0404830127954483,
-0.07419511675834656,
-0.015458394773304462,
-0.026657702401280403,
-0.19622588157653809,
0.2733452618122101,
0.022307079285383224,
0.09285500645637512,
-0.4372982978820801,
7.145687845877546e-7,
-0.1658935546875,
-0.06712907552719116,
0.001815091585740447,
0.014183513820171356,
-0.007020635064691305,
0.09065871685743332,
-0.2647434175014496,
0.15725071728229523,
-0.04146401584148407,
0.08833364397287369,
0.22077573835849762,
-0.07157059758901596,
0.019803889095783234,
-0.15716581046581268,
0.024983791634440422,
-0.003174030454829335,
0.05050639808177948,
0.09788975119590759,
-0.12516376376152039,
0.12784938514232635,
-0.01874173991382122,
-0.04995189607143402,
-0.03959014639258385,
-0.13803361356258392,
0.19078654050827026,
0.04588817059993744,
-0.011479917913675308,
-0.1151246502995491,
0.02047083154320717,
-0.036942970007658005,
0.07635824382305145,
0.031875770539045334,
0.11041363328695297,
0.10574858635663986,
0.02184230461716652,
0.061511218547821045,
-0.11386218667030334,
-0.03328194469213486,
0.06325823068618774,
-0.07502862066030502,
-0.04107885807752609,
0.11406569927930832,
-0.1726362556219101,
-0.07502075284719467,
0.14215758442878723,
-0.0108021330088377,
-0.014652259647846222,
0.14668329060077667,
0.15002037584781647,
0.0400102399289608,
0.08789172768592834,
0.09190895408391953,
0.025885101407766342,
-0.046055298298597336,
0.002444186247885227,
0.004393183626234531,
0.02432934194803238,
-0.08727077394723892,
0.23319530487060547,
-0.000025402468963875435,
-0.06559646874666214,
-0.05309917777776718,
0.03722385689616203,
-0.010189056396484375,
-0.05259816721081734,
0.07547847926616669,
-0.060364481061697006,
1.006411427071002e-34,
0.05819498002529144,
0.2337014526128769,
0.1428123116493225,
-0.05460892245173454,
0.005830774549394846,
-0.07833606004714966,
0.08387438952922821,
0.09318701922893524,
0.07490001618862152,
-0.14399820566177368,
-0.06957361847162247
] |
https://github.com/huggingface/datasets/issues/5887 | HuggingsFace dataset example give error | Nice catch @donhuvy, that's because some models don't need the `token_type_ids`, as in this case, as the example is using `distilbert-base-cased`, and according to the DistilBert documentation at https://huggingface.co/transformers/v3.0.2/model_doc/distilbert.html, `DistilBert doesn’t have token_type_ids, you don’t need to indicate which token belongs to which segment. Just separate your segments with the separation token tokenizer.sep_token (or [SEP])`. `token_type_ids` are neither required in some other well known models such as RoBERTa.
Here the issue comes due to a mismatch between the tokenizer and the model, as the Colab is using a BERT tokenizer (`bert-base-cased`), while the model is a DistilBERT (`distilbert-base-cased`), so aligning the tokenizer and the model solves it! | ### Describe the bug
![image](https://github.com/huggingface/datasets/assets/1328316/1f4f0086-3db9-4c79-906b-05a375357cce)
![image](https://github.com/huggingface/datasets/assets/1328316/733ebd3d-89b9-4ece-b80a-00ab5b0a4122)
### Steps to reproduce the bug
Use link as reference document written https://colab.research.google.com/github/huggingface/datasets/blob/main/notebooks/Overview.ipynb#scrollTo=biqDH9vpvSVz
```python
# Now let's train our model
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model.train().to(device)
for i, batch in enumerate(dataloader):
batch.to(device)
outputs = model(**batch)
loss = outputs.loss
loss.backward()
optimizer.step()
model.zero_grad()
print(f'Step {i} - loss: {loss:.3}')
if i > 5:
break
```
Error
```python
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-44-7040b885f382>](https://localhost:8080/#) in <cell line: 5>()
5 for i, batch in enumerate(dataloader):
6 batch.to(device)
----> 7 outputs = model(**batch)
8 loss = outputs.loss
9 loss.backward()
[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
1499 or _global_backward_pre_hooks or _global_backward_hooks
1500 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501 return forward_call(*args, **kwargs)
1502 # Do not call functions when jit is used
1503 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: DistilBertForQuestionAnswering.forward() got an unexpected keyword argument 'token_type_ids'
```
https://github.com/huggingface/datasets/assets/1328316/5d8b1d61-9337-4d59-8423-4f37f834c156
### Expected behavior
Run success on Google Colab (free)
### Environment info
Windows 11 x64, Google Colab free (my Google Drive just empty about 200 MB, but I don't think it cause problem) | 107 | HuggingsFace dataset example give error
### Describe the bug
![image](https://github.com/huggingface/datasets/assets/1328316/1f4f0086-3db9-4c79-906b-05a375357cce)
![image](https://github.com/huggingface/datasets/assets/1328316/733ebd3d-89b9-4ece-b80a-00ab5b0a4122)
### Steps to reproduce the bug
Use link as reference document written https://colab.research.google.com/github/huggingface/datasets/blob/main/notebooks/Overview.ipynb#scrollTo=biqDH9vpvSVz
```python
# Now let's train our model
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model.train().to(device)
for i, batch in enumerate(dataloader):
batch.to(device)
outputs = model(**batch)
loss = outputs.loss
loss.backward()
optimizer.step()
model.zero_grad()
print(f'Step {i} - loss: {loss:.3}')
if i > 5:
break
```
Error
```python
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-44-7040b885f382>](https://localhost:8080/#) in <cell line: 5>()
5 for i, batch in enumerate(dataloader):
6 batch.to(device)
----> 7 outputs = model(**batch)
8 loss = outputs.loss
9 loss.backward()
[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
1499 or _global_backward_pre_hooks or _global_backward_hooks
1500 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501 return forward_call(*args, **kwargs)
1502 # Do not call functions when jit is used
1503 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: DistilBertForQuestionAnswering.forward() got an unexpected keyword argument 'token_type_ids'
```
https://github.com/huggingface/datasets/assets/1328316/5d8b1d61-9337-4d59-8423-4f37f834c156
### Expected behavior
Run success on Google Colab (free)
### Environment info
Windows 11 x64, Google Colab free (my Google Drive just empty about 200 MB, but I don't think it cause problem)
Nice catch @donhuvy, that's because some models don't need the `token_type_ids`, as in this case, as the example is using `distilbert-base-cased`, and according to the DistilBert documentation at https://huggingface.co/transformers/v3.0.2/model_doc/distilbert.html, `DistilBert doesn’t have token_type_ids, you don’t need to indicate which token belongs to which segment. Just separate your segments with the separation token tokenizer.sep_token (or [SEP])`. `token_type_ids` are neither required in some other well known models such as RoBERTa.
Here the issue comes due to a mismatch between the tokenizer and the model, as the Colab is using a BERT tokenizer (`bert-base-cased`), while the model is a DistilBERT (`distilbert-base-cased`), so aligning the tokenizer and the model solves it! | [
0.05310261994600296,
-0.1843060553073883,
0.04767001420259476,
0.0007313493406400084,
0.3298640251159668,
-0.0702061578631401,
0.08509497344493866,
-0.0017495360225439072,
0.046208593994379044,
0.03412489593029022,
0.04343079403042793,
-0.05515677109360695,
0.006621736567467451,
0.014334646053612232,
0.09527911245822906,
-0.1349005550146103,
0.08798690885305405,
-0.035968977957963943,
-0.12271679937839508,
-0.009425376541912556,
0.018219636753201485,
0.06533507257699966,
0.006012570578604937,
-0.12999138236045837,
-0.1351882666349411,
-0.1924142986536026,
-0.1726706176996231,
0.07009681314229965,
0.07611335813999176,
0.014871971681714058,
0.10112364590167999,
-0.062417369335889816,
0.11179235577583313,
0.034346893429756165,
0.000006254046638787258,
0.016108736395835876,
0.15481050312519073,
-0.018317990005016327,
0.04178953170776367,
-0.15335626900196075,
0.1622302234172821,
-0.0893077403306961,
-0.1275823563337326,
-0.063383087515831,
-0.028488967567682266,
0.07702777534723282,
-0.09865230321884155,
0.006718785502016544,
0.1110607385635376,
0.07673070579767227,
0.03156188502907753,
0.002242746064439416,
0.027721015736460686,
-0.19999894499778748,
-0.025870291516184807,
-0.0065912953577935696,
-0.05616728216409683,
0.05154147371649742,
-0.05602484196424484,
-0.06913008540868759,
0.008871184661984444,
-0.09513809531927109,
0.00783886294811964,
-0.1351311057806015,
0.14007484912872314,
0.02307327836751938,
0.032093022018671036,
-0.12950290739536285,
-0.06507857888936996,
0.22452667355537415,
-0.06977101415395737,
0.09259933978319168,
-0.15104252099990845,
-0.003283953992649913,
0.054316870868206024,
-0.17537838220596313,
-0.012747741304337978,
0.04847778007388115,
-0.1505637913942337,
0.06579101830720901,
-0.15294919908046722,
0.0659569501876831,
-0.03955651819705963,
0.05906276777386665,
0.0063253967091441154,
0.021048547700047493,
-0.13403856754302979,
0.13916684687137604,
0.041871700435876846,
-0.08761963993310928,
0.17229466140270233,
0.06955020874738693,
-0.03324493393301964,
-0.11423522979021072,
-0.11684674024581909,
0.04243569076061249,
-0.05197658762335777,
-0.018413979560136795,
0.0006529628881253302,
0.02733335830271244,
-0.10889773815870285,
-0.12704239785671234,
0.13313870131969452,
0.1525084376335144,
-0.017439117655158043,
-0.04377558454871178,
-0.050653889775276184,
-0.05491810664534569,
0.017077459022402763,
0.10542535781860352,
0.13109071552753448,
0.027640869840979576,
-0.09283798187971115,
-0.08767734467983246,
0.08577971905469894,
-0.04313473030924797,
0.05665162578225136,
0.0025272336788475513,
-0.04994445666670799,
0.0945243090391159,
0.09264898300170898,
0.2029375433921814,
0.00857469905167818,
0.02210398018360138,
0.12527050077915192,
-0.10777340084314346,
0.11134213209152222,
0.09483406692743301,
-0.06316238641738892,
0.019392792135477066,
-0.1154208704829216,
0.06448405236005783,
-0.1738354116678238,
-0.05752546340227127,
0.022686075419187546,
-0.04947737604379654,
0.038222841918468475,
-0.039242327213287354,
0.12634526193141937,
-0.026939675211906433,
0.03285975009202957,
-0.17945042252540588,
-0.08903878182172775,
0.1415042281150818,
0.10224787145853043,
-0.09939892590045929,
0.25977277755737305,
0.1321825087070465,
-0.023350924253463745,
-0.048778023570775986,
-0.050042543560266495,
0.15565551817417145,
-0.2750774323940277,
0.03513909876346588,
-0.008696900680661201,
0.21599140763282776,
0.05128961801528931,
-0.038483232259750366,
-0.173533633351326,
-0.061074476689100266,
0.1338128298521042,
0.05926632136106491,
-0.05955516919493675,
-0.054655056446790695,
0.17053359746932983,
0.12043331563472748,
-0.0503402017056942,
0.03722982481122017,
0.01956668682396412,
-0.05628618225455284,
0.24452824890613556,
0.027636677026748657,
-0.03917635232210159,
-0.09297917783260345,
-0.16643057763576508,
0.10049152374267578,
-0.12693709135055542,
0.0799972265958786,
-0.2545212209224701,
-0.08318553119897842,
0.004978533368557692,
-0.07721629738807678,
0.11888054758310318,
-0.01220696046948433,
-0.09557713568210602,
0.005975920706987381,
0.015029281377792358,
-0.006926447153091431,
-0.15641282498836517,
-0.051559772342443466,
-0.058583736419677734,
-0.034983307123184204,
-0.01589469239115715,
0.007271577604115009,
-0.06716232746839523,
-0.10520537197589874,
0.042171575129032135,
-0.08818423002958298,
0.01574993133544922,
-0.26895397901535034,
-0.0971880555152893,
-0.02333238162100315,
0.13378800451755524,
0.08952928334474564,
0.004717870149761438,
-0.0683615505695343,
-0.1967485398054123,
0.004256937652826309,
0.09519394487142563,
-0.14664272964000702,
-0.10772684961557388,
-0.03710021451115608,
0.0937562808394432,
-0.055403172969818115,
-0.04714285582304001,
-0.030657535418868065,
-0.04780227318406105,
-0.07681353390216827,
-0.09876494109630585,
-0.025854840874671936,
-0.1307578831911087,
0.10136081278324127,
0.10327465087175369,
0.06455552577972412,
-0.010736562311649323,
0.12378699332475662,
-0.19149476289749146,
-0.01970616728067398,
0.009331275708973408,
0.08949162811040878,
0.057725291699171066,
-0.1763966679573059,
0.09733683615922928,
0.12653684616088867,
-0.1388309746980667,
-0.08760169893503189,
-0.08071684837341309,
-0.07914264500141144,
0.038091130554676056,
0.029081249609589577,
-0.21115386486053467,
0.0698803961277008,
-0.1481013149023056,
-0.12001591920852661,
0.13663147389888763,
0.12943178415298462,
0.002374898409470916,
0.025883838534355164,
-0.0973585918545723,
-0.13648273050785065,
0.13386662304401398,
0.1563601940870285,
-0.12374334037303925,
0.03136430308222771,
0.13154485821723938,
-0.11765801906585693,
0.018772786483168602,
0.07828360050916672,
-0.1536700278520584,
-0.14881880581378937,
0.0566401407122612,
-0.062319133430719376,
0.04054524004459381,
-0.009297417476773262,
0.16692271828651428,
-0.09303153306245804,
0.18441060185432434,
-0.07045725733041763,
0.14928112924098969,
-0.0018657094333320856,
0.043131738901138306,
0.03134390711784363,
-0.10815885663032532,
-0.11122305691242218,
-0.09708207100629807,
0.1211012676358223,
0.03962014615535736,
-0.08668956160545349,
0.05399666726589203,
0.0892811194062233,
-0.07910726219415665,
0.21465085446834564,
-0.08740635961294174,
-0.08233482390642166,
0.02565028890967369,
0.09226175397634506,
0.07294997572898865,
-0.0014011524617671967,
-0.07637657225131989,
0.004122195765376091,
-0.0708068236708641,
0.013076270930469036,
-0.11117348819971085,
-0.033012330532073975,
-0.11754027754068375,
0.013224868103861809,
0.09930078685283661,
0.09648095816373825,
-0.007101825438439846,
0.16723811626434326,
-0.08324265480041504,
0.19990421831607819,
0.09263263642787933,
-0.06681875139474869,
-0.026652274653315544,
-0.042480967938899994,
0.21235686540603638,
0.231784850358963,
-0.17367659509181976,
-0.04276115819811821,
0.04030071943998337,
-0.13820046186447144,
-0.08789093047380447,
0.06479503959417343,
0.1356901228427887,
0.1241745799779892,
-0.1364351511001587,
-0.05672677978873253,
0.10263866931200027,
-0.01819019950926304,
0.018237246200442314,
0.10371462255716324,
-0.06756293773651123,
0.11970414221286774,
-0.058147646486759186,
0.12051083892583847,
-0.18620048463344574,
-0.0657677948474884,
-0.07552798837423325,
-0.07874557375907898,
-0.0547240674495697,
0.19750680029392242,
0.020119987428188324,
0.12575678527355194,
0.1128181740641594,
-0.11514027416706085,
-0.0695461556315422,
-0.18150071799755096,
0.2682097256183624,
0.01613488420844078,
-0.12415632605552673,
-0.13790255784988403,
-0.09018147736787796,
0.0625976026058197,
-0.011420002207159996,
-0.21362996101379395,
-0.004478914197534323,
-0.046975359320640564,
0.08399029821157455,
-0.10025202482938766,
0.10639433562755585,
-0.0374603234231472,
-0.10953924059867859,
-0.0596778467297554,
-0.12103789299726486,
0.059222523123025894,
0.0019214319763705134,
0.07245862483978271,
-0.053464505821466446,
0.09186699986457825,
0.19087177515029907,
0.040335699915885925,
0.1313997358083725,
0.11689282208681107,
-0.2706984877586365,
0.07500878721475601,
0.09438779950141907,
0.01857069879770279,
-0.08008655160665512,
-0.20673918724060059,
0.1478411853313446,
-0.0018831592751666903,
0.06669191271066666,
-0.15252922475337982,
-0.006668143440037966,
0.014674699865281582,
-0.009410964325070381,
-0.15481017529964447,
0.13382858037948608,
0.13518311083316803,
-0.00001764815897331573,
-0.08604597300291061,
-0.10120135545730591,
0.05916557088494301,
0.05517195537686348,
-0.02063770778477192,
-0.05605087801814079,
0.017486020922660828,
-0.08486409485340118,
0.18240010738372803,
0.032498300075531006,
0.07769712805747986,
-0.006791266147047281,
-0.42234131693840027,
0.11199319362640381,
-0.0792221948504448,
0.1984570324420929,
0.19891636073589325,
0.046523164957761765,
0.10272455960512161,
0.09551193565130234,
0.11402557045221329,
0.023535696789622307,
-0.005952846258878708,
0.06016768887639046,
-0.007845751009881496,
-0.000853853824082762,
-0.13859081268310547,
0.12203367054462433,
0.10577652603387833,
0.11093094199895859,
0.0838264748454094,
0.03035328909754753,
0.07894271612167358,
0.21433673799037933,
-0.0069079347886145115,
0.022453216835856438,
-0.021353570744395256,
0.03110269084572792,
-0.1113370805978775,
0.02588786743581295,
-0.14588551223278046,
0.2903139889240265,
0.16098172962665558,
0.04362289980053902,
-0.07671303302049637,
0.10614729672670364,
-0.053243014961481094,
0.03940941020846367,
0.0530342236161232,
-0.06089022755622864,
-0.04254467785358429,
-0.026467962190508842,
0.03458208590745926,
0.2299717515707016,
-0.02445751056075096,
0.2842322885990143,
0.028697872534394264,
-0.1148269921541214,
0.05698096752166748,
-0.07176458835601807,
-0.1363867074251175,
0.06014104187488556,
0.07461164146661758,
0.07162880897521973,
-0.1095857098698616,
-0.06061342731118202,
0.0215402040630579,
0.11895160377025604,
0.0919511541724205,
0.006980127189308405,
-0.10113343596458435,
0.010780861601233482,
0.011191241443157196,
0.11653891205787659,
0.08122716099023819,
0.12266065925359726,
0.054557252675294876,
-0.02430989407002926,
-0.09746096283197403,
0.0415227897465229,
-0.05607986822724342,
-0.0014895820058882236,
0.019079960882663727,
0.05669167637825012,
0.011904304847121239,
0.1539953202009201,
0.07513938844203949,
0.06994228810071945,
0.2481582760810852,
-0.06895273923873901,
0.12690775096416473,
0.014759283512830734,
0.06005973741412163,
0.12077837437391281,
-0.023295560851693153,
-0.004353260155767202,
-0.10053787380456924,
-0.09689737856388092,
-0.137595072388649,
0.09505894780158997,
0.006107303313910961,
0.016000179573893547,
-0.1985657513141632,
-0.10539133101701736,
0.12440931051969528,
-0.1074482873082161,
-0.05735080689191818,
-0.07301831245422363,
0.16133634746074677,
0.08160989731550217,
-0.08290864527225494,
-0.00015538642765022814,
-0.11017714440822601,
0.1263016015291214,
0.09870120137929916,
-0.03869197890162468,
0.2621961832046509,
0.11226092278957367,
0.11303915828466415,
0.020747972652316093,
0.03482871875166893,
0.029452908784151077,
-0.06686478853225708,
-0.007751206401735544,
-0.13386841118335724,
0.0598224513232708,
0.07768858224153519,
0.0624861977994442,
-0.0758705586194992,
0.02802583947777748,
0.22290237247943878,
0.02445806935429573,
0.013127653859555721,
-0.04039560630917549,
-0.12824036180973053,
-0.10240943729877472,
0.0898762121796608,
0.006652883253991604,
0.07770054042339325,
-0.023434540256857872,
0.03481327369809151,
0.03843900188803673,
-0.15313534438610077,
-0.10343243181705475,
0.19992771744728088,
-0.022901639342308044,
0.01591254584491253,
0.3476862609386444,
0.04044347256422043,
0.03029155358672142,
0.09433954209089279,
0.32813507318496704,
-0.13444164395332336,
-0.05270824208855629,
0.003983878996223211,
0.31353047490119934,
-0.13202829658985138,
0.07707786560058594,
-0.026887590065598488,
0.10568579286336899,
-0.06536052376031876,
0.01630159094929695,
0.09683678299188614,
0.12723404169082642,
0.19802415370941162,
0.0873122364282608,
-0.18654629588127136,
-0.11065198481082916,
-0.1413998305797577,
-0.04341826215386391,
0.05953345075249672,
0.11057928204536438,
-0.08527269959449768,
-0.013904326595366001,
-2.726265567018178e-32,
-0.1321364939212799,
-0.007178316358476877,
-0.12120017409324646,
0.05159083381295204,
-0.22141233086585999,
0.003077136119827628,
-0.03231985867023468,
0.04693939909338951,
-0.1474114954471588,
0.0042965589091181755,
-0.1779390573501587,
-0.009900250472128391,
0.019363511353731155,
-0.11681017279624939,
-0.08250796794891357,
0.08757772296667099,
0.039512354880571365,
-0.06926141679286957,
-0.09476093202829361,
0.07905416935682297,
0.03327626734972,
0.14058837294578552,
0.02418644353747368,
0.0029854951426386833,
-0.01375156082212925,
0.07557689398527145,
-0.20657958090305328,
0.026131847873330116,
-0.08479602634906769,
-0.1168171763420105,
-0.12117346376180649,
0.09900069981813431,
-0.07143867760896683,
-0.08333371579647064,
0.006478275638073683,
0.042669735848903656,
-0.05883631855249405,
-0.06399863213300705,
-0.04331587255001068,
0.08762315660715103,
0.08166291564702988,
0.12980909645557404,
0.031051024794578552,
-0.08567599207162857,
-0.06561876088380814,
0.11345352232456207,
0.009424131363630295,
-0.21703146398067474,
0.0395505353808403,
-0.07060056924819946,
0.05234565958380699,
0.024616297334432602,
0.013423853553831577,
-0.052601005882024765,
0.02271951735019684,
-0.08364583551883698,
0.040291715413331985,
0.09977253526449203,
-0.0026667898055166006,
0.020895184949040413,
-0.09538137912750244,
0.07668281346559525,
0.03388810530304909,
-0.22131800651550293,
0.03322072699666023,
0.11119486391544342,
0.1724952608346939,
-0.12043936550617218,
0.0936758741736412,
-0.09305866807699203,
-0.020989039912819862,
-0.04448125511407852,
0.08120781183242798,
0.01188686303794384,
-0.15680259466171265,
-0.13336531817913055,
0.021969066932797432,
-0.09485751390457153,
-0.007998224347829819,
-0.10474178194999695,
0.03833221644163132,
0.033759526908397675,
-0.10572417825460434,
-0.013369093649089336,
0.025017879903316498,
-0.08709769695997238,
0.1018977239727974,
-0.07717787474393845,
-0.11611834913492203,
-0.10353698581457138,
-0.011726697906851768,
-0.00044533281470648944,
-0.15294386446475983,
-0.1008048802614212,
0.026302136480808258,
-0.011579022742807865,
0.007851455360651016,
0.05806877464056015,
-0.056608617305755615,
-0.09760374575853348,
-0.1426335722208023,
-0.0771719440817833,
0.08618583530187607,
0.1074507087469101,
0.15766482055187225,
0.02029312402009964,
0.16187432408332825,
0.07677660137414932,
-0.08784016966819763,
-0.02714630775153637,
0.0017011078307405114,
-0.05026370659470558,
0.09719403833150864,
0.18192841112613678,
0.1209641546010971,
-0.20854689180850983,
0.03124377317726612,
0.04463117569684982,
0.05326594039797783,
0.12220005691051483,
-0.1382351517677307,
0.05193660780787468,
-0.27693644165992737,
-0.12616407871246338,
-0.11304829269647598,
0.030190587043762207,
-0.22419393062591553,
0.048528049141168594,
-0.049811992794275284,
-0.1353897750377655,
-0.03495856374502182,
-0.06455568969249725,
7.357807589869481e-7,
-0.2909964621067047,
0.12089678645133972,
-0.005333029665052891,
-0.04287751764059067,
-0.06406497210264206,
0.10476105660200119,
-0.21982724964618683,
0.005351391155272722,
-0.0686783567070961,
0.1805860549211502,
0.07143939286470413,
-0.05262065306305885,
-0.04108559340238571,
-0.15074732899665833,
0.1449810415506363,
-0.06486235558986664,
-0.07604806125164032,
0.024226045235991478,
0.057705268263816833,
-0.1013263687491417,
-0.1457287073135376,
0.06907057017087936,
0.2952442467212677,
-0.023070335388183594,
0.12539204955101013,
-0.006356752943247557,
-0.14917050302028656,
-0.08392126858234406,
0.08068060874938965,
-0.05327538773417473,
0.1632232815027237,
-0.015255972743034363,
-0.005532861687242985,
0.056639499962329865,
-0.011316404677927494,
0.01472435425966978,
-0.15475237369537354,
-0.018368268385529518,
-0.0694451704621315,
-0.09838118404150009,
0.014063682407140732,
0.18067045509815216,
-0.02779308147728443,
-0.25425517559051514,
0.0707584023475647,
0.21182216703891754,
0.0037308887112885714,
-0.08126500993967056,
-0.014681423082947731,
0.1438612937927246,
-0.04667682200670242,
0.010068215429782867,
0.16952605545520782,
0.15745903551578522,
-0.025935987010598183,
0.08358907699584961,
0.0010169153101742268,
-0.10148495435714722,
0.10733981430530548,
-0.017013518139719963,
-0.09424885362386703,
-0.09277883917093277,
0.13493937253952026,
-0.013003721833229065,
0.02140718325972557,
-0.13395851850509644,
-0.10856673866510391,
4.5551496640880517e-35,
-0.01302969828248024,
0.013093553483486176,
0.008410075679421425,
-0.03369942680001259,
-0.042229063808918,
-0.010786454193294048,
0.2177010178565979,
-0.010698680765926838,
0.03016415238380432,
-0.010482755489647388,
-0.11817167699337006
] |
https://github.com/huggingface/datasets/issues/5887 | HuggingsFace dataset example give error | This has been addressed in #5902.
The Quicktour notebook is deprecated now - please use the notebook version of the [Quickstart doc page](https://huggingface.co/docs/datasets/main/en/quickstart) instead ("Open in Colab" button). | ### Describe the bug
![image](https://github.com/huggingface/datasets/assets/1328316/1f4f0086-3db9-4c79-906b-05a375357cce)
![image](https://github.com/huggingface/datasets/assets/1328316/733ebd3d-89b9-4ece-b80a-00ab5b0a4122)
### Steps to reproduce the bug
Use link as reference document written https://colab.research.google.com/github/huggingface/datasets/blob/main/notebooks/Overview.ipynb#scrollTo=biqDH9vpvSVz
```python
# Now let's train our model
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model.train().to(device)
for i, batch in enumerate(dataloader):
batch.to(device)
outputs = model(**batch)
loss = outputs.loss
loss.backward()
optimizer.step()
model.zero_grad()
print(f'Step {i} - loss: {loss:.3}')
if i > 5:
break
```
Error
```python
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-44-7040b885f382>](https://localhost:8080/#) in <cell line: 5>()
5 for i, batch in enumerate(dataloader):
6 batch.to(device)
----> 7 outputs = model(**batch)
8 loss = outputs.loss
9 loss.backward()
[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
1499 or _global_backward_pre_hooks or _global_backward_hooks
1500 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501 return forward_call(*args, **kwargs)
1502 # Do not call functions when jit is used
1503 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: DistilBertForQuestionAnswering.forward() got an unexpected keyword argument 'token_type_ids'
```
https://github.com/huggingface/datasets/assets/1328316/5d8b1d61-9337-4d59-8423-4f37f834c156
### Expected behavior
Run success on Google Colab (free)
### Environment info
Windows 11 x64, Google Colab free (my Google Drive just empty about 200 MB, but I don't think it cause problem) | 28 | HuggingsFace dataset example give error
### Describe the bug
![image](https://github.com/huggingface/datasets/assets/1328316/1f4f0086-3db9-4c79-906b-05a375357cce)
![image](https://github.com/huggingface/datasets/assets/1328316/733ebd3d-89b9-4ece-b80a-00ab5b0a4122)
### Steps to reproduce the bug
Use link as reference document written https://colab.research.google.com/github/huggingface/datasets/blob/main/notebooks/Overview.ipynb#scrollTo=biqDH9vpvSVz
```python
# Now let's train our model
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model.train().to(device)
for i, batch in enumerate(dataloader):
batch.to(device)
outputs = model(**batch)
loss = outputs.loss
loss.backward()
optimizer.step()
model.zero_grad()
print(f'Step {i} - loss: {loss:.3}')
if i > 5:
break
```
Error
```python
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-44-7040b885f382>](https://localhost:8080/#) in <cell line: 5>()
5 for i, batch in enumerate(dataloader):
6 batch.to(device)
----> 7 outputs = model(**batch)
8 loss = outputs.loss
9 loss.backward()
[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
1499 or _global_backward_pre_hooks or _global_backward_hooks
1500 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501 return forward_call(*args, **kwargs)
1502 # Do not call functions when jit is used
1503 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: DistilBertForQuestionAnswering.forward() got an unexpected keyword argument 'token_type_ids'
```
https://github.com/huggingface/datasets/assets/1328316/5d8b1d61-9337-4d59-8423-4f37f834c156
### Expected behavior
Run success on Google Colab (free)
### Environment info
Windows 11 x64, Google Colab free (my Google Drive just empty about 200 MB, but I don't think it cause problem)
This has been addressed in #5902.
The Quicktour notebook is deprecated now - please use the notebook version of the [Quickstart doc page](https://huggingface.co/docs/datasets/main/en/quickstart) instead ("Open in Colab" button). | [
0.05310261994600296,
-0.1843060553073883,
0.04767001420259476,
0.0007313493406400084,
0.3298640251159668,
-0.0702061578631401,
0.08509497344493866,
-0.0017495360225439072,
0.046208593994379044,
0.03412489593029022,
0.04343079403042793,
-0.05515677109360695,
0.006621736567467451,
0.014334646053612232,
0.09527911245822906,
-0.1349005550146103,
0.08798690885305405,
-0.035968977957963943,
-0.12271679937839508,
-0.009425376541912556,
0.018219636753201485,
0.06533507257699966,
0.006012570578604937,
-0.12999138236045837,
-0.1351882666349411,
-0.1924142986536026,
-0.1726706176996231,
0.07009681314229965,
0.07611335813999176,
0.014871971681714058,
0.10112364590167999,
-0.062417369335889816,
0.11179235577583313,
0.034346893429756165,
0.000006254046638787258,
0.016108736395835876,
0.15481050312519073,
-0.018317990005016327,
0.04178953170776367,
-0.15335626900196075,
0.1622302234172821,
-0.0893077403306961,
-0.1275823563337326,
-0.063383087515831,
-0.028488967567682266,
0.07702777534723282,
-0.09865230321884155,
0.006718785502016544,
0.1110607385635376,
0.07673070579767227,
0.03156188502907753,
0.002242746064439416,
0.027721015736460686,
-0.19999894499778748,
-0.025870291516184807,
-0.0065912953577935696,
-0.05616728216409683,
0.05154147371649742,
-0.05602484196424484,
-0.06913008540868759,
0.008871184661984444,
-0.09513809531927109,
0.00783886294811964,
-0.1351311057806015,
0.14007484912872314,
0.02307327836751938,
0.032093022018671036,
-0.12950290739536285,
-0.06507857888936996,
0.22452667355537415,
-0.06977101415395737,
0.09259933978319168,
-0.15104252099990845,
-0.003283953992649913,
0.054316870868206024,
-0.17537838220596313,
-0.012747741304337978,
0.04847778007388115,
-0.1505637913942337,
0.06579101830720901,
-0.15294919908046722,
0.0659569501876831,
-0.03955651819705963,
0.05906276777386665,
0.0063253967091441154,
0.021048547700047493,
-0.13403856754302979,
0.13916684687137604,
0.041871700435876846,
-0.08761963993310928,
0.17229466140270233,
0.06955020874738693,
-0.03324493393301964,
-0.11423522979021072,
-0.11684674024581909,
0.04243569076061249,
-0.05197658762335777,
-0.018413979560136795,
0.0006529628881253302,
0.02733335830271244,
-0.10889773815870285,
-0.12704239785671234,
0.13313870131969452,
0.1525084376335144,
-0.017439117655158043,
-0.04377558454871178,
-0.050653889775276184,
-0.05491810664534569,
0.017077459022402763,
0.10542535781860352,
0.13109071552753448,
0.027640869840979576,
-0.09283798187971115,
-0.08767734467983246,
0.08577971905469894,
-0.04313473030924797,
0.05665162578225136,
0.0025272336788475513,
-0.04994445666670799,
0.0945243090391159,
0.09264898300170898,
0.2029375433921814,
0.00857469905167818,
0.02210398018360138,
0.12527050077915192,
-0.10777340084314346,
0.11134213209152222,
0.09483406692743301,
-0.06316238641738892,
0.019392792135477066,
-0.1154208704829216,
0.06448405236005783,
-0.1738354116678238,
-0.05752546340227127,
0.022686075419187546,
-0.04947737604379654,
0.038222841918468475,
-0.039242327213287354,
0.12634526193141937,
-0.026939675211906433,
0.03285975009202957,
-0.17945042252540588,
-0.08903878182172775,
0.1415042281150818,
0.10224787145853043,
-0.09939892590045929,
0.25977277755737305,
0.1321825087070465,
-0.023350924253463745,
-0.048778023570775986,
-0.050042543560266495,
0.15565551817417145,
-0.2750774323940277,
0.03513909876346588,
-0.008696900680661201,
0.21599140763282776,
0.05128961801528931,
-0.038483232259750366,
-0.173533633351326,
-0.061074476689100266,
0.1338128298521042,
0.05926632136106491,
-0.05955516919493675,
-0.054655056446790695,
0.17053359746932983,
0.12043331563472748,
-0.0503402017056942,
0.03722982481122017,
0.01956668682396412,
-0.05628618225455284,
0.24452824890613556,
0.027636677026748657,
-0.03917635232210159,
-0.09297917783260345,
-0.16643057763576508,
0.10049152374267578,
-0.12693709135055542,
0.0799972265958786,
-0.2545212209224701,
-0.08318553119897842,
0.004978533368557692,
-0.07721629738807678,
0.11888054758310318,
-0.01220696046948433,
-0.09557713568210602,
0.005975920706987381,
0.015029281377792358,
-0.006926447153091431,
-0.15641282498836517,
-0.051559772342443466,
-0.058583736419677734,
-0.034983307123184204,
-0.01589469239115715,
0.007271577604115009,
-0.06716232746839523,
-0.10520537197589874,
0.042171575129032135,
-0.08818423002958298,
0.01574993133544922,
-0.26895397901535034,
-0.0971880555152893,
-0.02333238162100315,
0.13378800451755524,
0.08952928334474564,
0.004717870149761438,
-0.0683615505695343,
-0.1967485398054123,
0.004256937652826309,
0.09519394487142563,
-0.14664272964000702,
-0.10772684961557388,
-0.03710021451115608,
0.0937562808394432,
-0.055403172969818115,
-0.04714285582304001,
-0.030657535418868065,
-0.04780227318406105,
-0.07681353390216827,
-0.09876494109630585,
-0.025854840874671936,
-0.1307578831911087,
0.10136081278324127,
0.10327465087175369,
0.06455552577972412,
-0.010736562311649323,
0.12378699332475662,
-0.19149476289749146,
-0.01970616728067398,
0.009331275708973408,
0.08949162811040878,
0.057725291699171066,
-0.1763966679573059,
0.09733683615922928,
0.12653684616088867,
-0.1388309746980667,
-0.08760169893503189,
-0.08071684837341309,
-0.07914264500141144,
0.038091130554676056,
0.029081249609589577,
-0.21115386486053467,
0.0698803961277008,
-0.1481013149023056,
-0.12001591920852661,
0.13663147389888763,
0.12943178415298462,
0.002374898409470916,
0.025883838534355164,
-0.0973585918545723,
-0.13648273050785065,
0.13386662304401398,
0.1563601940870285,
-0.12374334037303925,
0.03136430308222771,
0.13154485821723938,
-0.11765801906585693,
0.018772786483168602,
0.07828360050916672,
-0.1536700278520584,
-0.14881880581378937,
0.0566401407122612,
-0.062319133430719376,
0.04054524004459381,
-0.009297417476773262,
0.16692271828651428,
-0.09303153306245804,
0.18441060185432434,
-0.07045725733041763,
0.14928112924098969,
-0.0018657094333320856,
0.043131738901138306,
0.03134390711784363,
-0.10815885663032532,
-0.11122305691242218,
-0.09708207100629807,
0.1211012676358223,
0.03962014615535736,
-0.08668956160545349,
0.05399666726589203,
0.0892811194062233,
-0.07910726219415665,
0.21465085446834564,
-0.08740635961294174,
-0.08233482390642166,
0.02565028890967369,
0.09226175397634506,
0.07294997572898865,
-0.0014011524617671967,
-0.07637657225131989,
0.004122195765376091,
-0.0708068236708641,
0.013076270930469036,
-0.11117348819971085,
-0.033012330532073975,
-0.11754027754068375,
0.013224868103861809,
0.09930078685283661,
0.09648095816373825,
-0.007101825438439846,
0.16723811626434326,
-0.08324265480041504,
0.19990421831607819,
0.09263263642787933,
-0.06681875139474869,
-0.026652274653315544,
-0.042480967938899994,
0.21235686540603638,
0.231784850358963,
-0.17367659509181976,
-0.04276115819811821,
0.04030071943998337,
-0.13820046186447144,
-0.08789093047380447,
0.06479503959417343,
0.1356901228427887,
0.1241745799779892,
-0.1364351511001587,
-0.05672677978873253,
0.10263866931200027,
-0.01819019950926304,
0.018237246200442314,
0.10371462255716324,
-0.06756293773651123,
0.11970414221286774,
-0.058147646486759186,
0.12051083892583847,
-0.18620048463344574,
-0.0657677948474884,
-0.07552798837423325,
-0.07874557375907898,
-0.0547240674495697,
0.19750680029392242,
0.020119987428188324,
0.12575678527355194,
0.1128181740641594,
-0.11514027416706085,
-0.0695461556315422,
-0.18150071799755096,
0.2682097256183624,
0.01613488420844078,
-0.12415632605552673,
-0.13790255784988403,
-0.09018147736787796,
0.0625976026058197,
-0.011420002207159996,
-0.21362996101379395,
-0.004478914197534323,
-0.046975359320640564,
0.08399029821157455,
-0.10025202482938766,
0.10639433562755585,
-0.0374603234231472,
-0.10953924059867859,
-0.0596778467297554,
-0.12103789299726486,
0.059222523123025894,
0.0019214319763705134,
0.07245862483978271,
-0.053464505821466446,
0.09186699986457825,
0.19087177515029907,
0.040335699915885925,
0.1313997358083725,
0.11689282208681107,
-0.2706984877586365,
0.07500878721475601,
0.09438779950141907,
0.01857069879770279,
-0.08008655160665512,
-0.20673918724060059,
0.1478411853313446,
-0.0018831592751666903,
0.06669191271066666,
-0.15252922475337982,
-0.006668143440037966,
0.014674699865281582,
-0.009410964325070381,
-0.15481017529964447,
0.13382858037948608,
0.13518311083316803,
-0.00001764815897331573,
-0.08604597300291061,
-0.10120135545730591,
0.05916557088494301,
0.05517195537686348,
-0.02063770778477192,
-0.05605087801814079,
0.017486020922660828,
-0.08486409485340118,
0.18240010738372803,
0.032498300075531006,
0.07769712805747986,
-0.006791266147047281,
-0.42234131693840027,
0.11199319362640381,
-0.0792221948504448,
0.1984570324420929,
0.19891636073589325,
0.046523164957761765,
0.10272455960512161,
0.09551193565130234,
0.11402557045221329,
0.023535696789622307,
-0.005952846258878708,
0.06016768887639046,
-0.007845751009881496,
-0.000853853824082762,
-0.13859081268310547,
0.12203367054462433,
0.10577652603387833,
0.11093094199895859,
0.0838264748454094,
0.03035328909754753,
0.07894271612167358,
0.21433673799037933,
-0.0069079347886145115,
0.022453216835856438,
-0.021353570744395256,
0.03110269084572792,
-0.1113370805978775,
0.02588786743581295,
-0.14588551223278046,
0.2903139889240265,
0.16098172962665558,
0.04362289980053902,
-0.07671303302049637,
0.10614729672670364,
-0.053243014961481094,
0.03940941020846367,
0.0530342236161232,
-0.06089022755622864,
-0.04254467785358429,
-0.026467962190508842,
0.03458208590745926,
0.2299717515707016,
-0.02445751056075096,
0.2842322885990143,
0.028697872534394264,
-0.1148269921541214,
0.05698096752166748,
-0.07176458835601807,
-0.1363867074251175,
0.06014104187488556,
0.07461164146661758,
0.07162880897521973,
-0.1095857098698616,
-0.06061342731118202,
0.0215402040630579,
0.11895160377025604,
0.0919511541724205,
0.006980127189308405,
-0.10113343596458435,
0.010780861601233482,
0.011191241443157196,
0.11653891205787659,
0.08122716099023819,
0.12266065925359726,
0.054557252675294876,
-0.02430989407002926,
-0.09746096283197403,
0.0415227897465229,
-0.05607986822724342,
-0.0014895820058882236,
0.019079960882663727,
0.05669167637825012,
0.011904304847121239,
0.1539953202009201,
0.07513938844203949,
0.06994228810071945,
0.2481582760810852,
-0.06895273923873901,
0.12690775096416473,
0.014759283512830734,
0.06005973741412163,
0.12077837437391281,
-0.023295560851693153,
-0.004353260155767202,
-0.10053787380456924,
-0.09689737856388092,
-0.137595072388649,
0.09505894780158997,
0.006107303313910961,
0.016000179573893547,
-0.1985657513141632,
-0.10539133101701736,
0.12440931051969528,
-0.1074482873082161,
-0.05735080689191818,
-0.07301831245422363,
0.16133634746074677,
0.08160989731550217,
-0.08290864527225494,
-0.00015538642765022814,
-0.11017714440822601,
0.1263016015291214,
0.09870120137929916,
-0.03869197890162468,
0.2621961832046509,
0.11226092278957367,
0.11303915828466415,
0.020747972652316093,
0.03482871875166893,
0.029452908784151077,
-0.06686478853225708,
-0.007751206401735544,
-0.13386841118335724,
0.0598224513232708,
0.07768858224153519,
0.0624861977994442,
-0.0758705586194992,
0.02802583947777748,
0.22290237247943878,
0.02445806935429573,
0.013127653859555721,
-0.04039560630917549,
-0.12824036180973053,
-0.10240943729877472,
0.0898762121796608,
0.006652883253991604,
0.07770054042339325,
-0.023434540256857872,
0.03481327369809151,
0.03843900188803673,
-0.15313534438610077,
-0.10343243181705475,
0.19992771744728088,
-0.022901639342308044,
0.01591254584491253,
0.3476862609386444,
0.04044347256422043,
0.03029155358672142,
0.09433954209089279,
0.32813507318496704,
-0.13444164395332336,
-0.05270824208855629,
0.003983878996223211,
0.31353047490119934,
-0.13202829658985138,
0.07707786560058594,
-0.026887590065598488,
0.10568579286336899,
-0.06536052376031876,
0.01630159094929695,
0.09683678299188614,
0.12723404169082642,
0.19802415370941162,
0.0873122364282608,
-0.18654629588127136,
-0.11065198481082916,
-0.1413998305797577,
-0.04341826215386391,
0.05953345075249672,
0.11057928204536438,
-0.08527269959449768,
-0.013904326595366001,
-2.726265567018178e-32,
-0.1321364939212799,
-0.007178316358476877,
-0.12120017409324646,
0.05159083381295204,
-0.22141233086585999,
0.003077136119827628,
-0.03231985867023468,
0.04693939909338951,
-0.1474114954471588,
0.0042965589091181755,
-0.1779390573501587,
-0.009900250472128391,
0.019363511353731155,
-0.11681017279624939,
-0.08250796794891357,
0.08757772296667099,
0.039512354880571365,
-0.06926141679286957,
-0.09476093202829361,
0.07905416935682297,
0.03327626734972,
0.14058837294578552,
0.02418644353747368,
0.0029854951426386833,
-0.01375156082212925,
0.07557689398527145,
-0.20657958090305328,
0.026131847873330116,
-0.08479602634906769,
-0.1168171763420105,
-0.12117346376180649,
0.09900069981813431,
-0.07143867760896683,
-0.08333371579647064,
0.006478275638073683,
0.042669735848903656,
-0.05883631855249405,
-0.06399863213300705,
-0.04331587255001068,
0.08762315660715103,
0.08166291564702988,
0.12980909645557404,
0.031051024794578552,
-0.08567599207162857,
-0.06561876088380814,
0.11345352232456207,
0.009424131363630295,
-0.21703146398067474,
0.0395505353808403,
-0.07060056924819946,
0.05234565958380699,
0.024616297334432602,
0.013423853553831577,
-0.052601005882024765,
0.02271951735019684,
-0.08364583551883698,
0.040291715413331985,
0.09977253526449203,
-0.0026667898055166006,
0.020895184949040413,
-0.09538137912750244,
0.07668281346559525,
0.03388810530304909,
-0.22131800651550293,
0.03322072699666023,
0.11119486391544342,
0.1724952608346939,
-0.12043936550617218,
0.0936758741736412,
-0.09305866807699203,
-0.020989039912819862,
-0.04448125511407852,
0.08120781183242798,
0.01188686303794384,
-0.15680259466171265,
-0.13336531817913055,
0.021969066932797432,
-0.09485751390457153,
-0.007998224347829819,
-0.10474178194999695,
0.03833221644163132,
0.033759526908397675,
-0.10572417825460434,
-0.013369093649089336,
0.025017879903316498,
-0.08709769695997238,
0.1018977239727974,
-0.07717787474393845,
-0.11611834913492203,
-0.10353698581457138,
-0.011726697906851768,
-0.00044533281470648944,
-0.15294386446475983,
-0.1008048802614212,
0.026302136480808258,
-0.011579022742807865,
0.007851455360651016,
0.05806877464056015,
-0.056608617305755615,
-0.09760374575853348,
-0.1426335722208023,
-0.0771719440817833,
0.08618583530187607,
0.1074507087469101,
0.15766482055187225,
0.02029312402009964,
0.16187432408332825,
0.07677660137414932,
-0.08784016966819763,
-0.02714630775153637,
0.0017011078307405114,
-0.05026370659470558,
0.09719403833150864,
0.18192841112613678,
0.1209641546010971,
-0.20854689180850983,
0.03124377317726612,
0.04463117569684982,
0.05326594039797783,
0.12220005691051483,
-0.1382351517677307,
0.05193660780787468,
-0.27693644165992737,
-0.12616407871246338,
-0.11304829269647598,
0.030190587043762207,
-0.22419393062591553,
0.048528049141168594,
-0.049811992794275284,
-0.1353897750377655,
-0.03495856374502182,
-0.06455568969249725,
7.357807589869481e-7,
-0.2909964621067047,
0.12089678645133972,
-0.005333029665052891,
-0.04287751764059067,
-0.06406497210264206,
0.10476105660200119,
-0.21982724964618683,
0.005351391155272722,
-0.0686783567070961,
0.1805860549211502,
0.07143939286470413,
-0.05262065306305885,
-0.04108559340238571,
-0.15074732899665833,
0.1449810415506363,
-0.06486235558986664,
-0.07604806125164032,
0.024226045235991478,
0.057705268263816833,
-0.1013263687491417,
-0.1457287073135376,
0.06907057017087936,
0.2952442467212677,
-0.023070335388183594,
0.12539204955101013,
-0.006356752943247557,
-0.14917050302028656,
-0.08392126858234406,
0.08068060874938965,
-0.05327538773417473,
0.1632232815027237,
-0.015255972743034363,
-0.005532861687242985,
0.056639499962329865,
-0.011316404677927494,
0.01472435425966978,
-0.15475237369537354,
-0.018368268385529518,
-0.0694451704621315,
-0.09838118404150009,
0.014063682407140732,
0.18067045509815216,
-0.02779308147728443,
-0.25425517559051514,
0.0707584023475647,
0.21182216703891754,
0.0037308887112885714,
-0.08126500993967056,
-0.014681423082947731,
0.1438612937927246,
-0.04667682200670242,
0.010068215429782867,
0.16952605545520782,
0.15745903551578522,
-0.025935987010598183,
0.08358907699584961,
0.0010169153101742268,
-0.10148495435714722,
0.10733981430530548,
-0.017013518139719963,
-0.09424885362386703,
-0.09277883917093277,
0.13493937253952026,
-0.013003721833229065,
0.02140718325972557,
-0.13395851850509644,
-0.10856673866510391,
4.5551496640880517e-35,
-0.01302969828248024,
0.013093553483486176,
0.008410075679421425,
-0.03369942680001259,
-0.042229063808918,
-0.010786454193294048,
0.2177010178565979,
-0.010698680765926838,
0.03016415238380432,
-0.010482755489647388,
-0.11817167699337006
] |
https://github.com/huggingface/datasets/issues/5886 | Use work-stealing algorithm when parallel computing | Alternatively we could set the number of shards to be a factor than the number of processes (current they're equal) - this way it will be less likely to end up with a shard that is significantly slower than all the other ones. | ### Feature request
when i used Dataset.map api to process data concurrently, i found that
it gets slower and slower as it gets closer to completion. Then i read the source code of arrow_dataset.py and found that it shard the dataset and use multiprocessing pool to execute each shard.It may cause the slowest task to drag out the entire program's execution time,especially when processing huge dataset.
### Motivation
using work-stealing algorithm instead of sharding and parallel computing to optimize performance.
### Your contribution
just an idea. | 43 | Use work-stealing algorithm when parallel computing
### Feature request
when i used Dataset.map api to process data concurrently, i found that
it gets slower and slower as it gets closer to completion. Then i read the source code of arrow_dataset.py and found that it shard the dataset and use multiprocessing pool to execute each shard.It may cause the slowest task to drag out the entire program's execution time,especially when processing huge dataset.
### Motivation
using work-stealing algorithm instead of sharding and parallel computing to optimize performance.
### Your contribution
just an idea.
Alternatively we could set the number of shards to be a factor than the number of processes (current they're equal) - this way it will be less likely to end up with a shard that is significantly slower than all the other ones. | [
-0.08108142763376236,
0.3347759246826172,
-0.14548827707767487,
0.060840848833322525,
-0.11941781640052795,
-0.03496532514691353,
0.1331554800271988,
-0.020607393234968185,
-0.10335616767406464,
0.09433864802122116,
0.05380488559603691,
0.16741596162319183,
-0.16783306002616882,
0.13823345303535461,
-0.023163553327322006,
-0.15916182100772858,
-0.050839878618717194,
0.1165686547756195,
-0.0480334646999836,
0.048111021518707275,
-0.04238247126340866,
0.006781625561416149,
0.20910313725471497,
-0.0068771992810070515,
0.04692026227712631,
-0.08844830840826035,
-0.10650987923145294,
0.02984321303665638,
0.08637681603431702,
0.029316868633031845,
0.06895054876804352,
0.023768829181790352,
-0.19429230690002441,
0.18560843169689178,
0.000005758121915278025,
0.09945289045572281,
0.19968345761299133,
0.1106167882680893,
0.08714403957128525,
0.08195249736309052,
0.009349486790597439,
-0.00961851142346859,
0.10669571906328201,
-0.018225736916065216,
-0.10021410882472992,
0.13638058304786682,
0.006171054672449827,
-0.10919375717639923,
0.18318428099155426,
-0.2089049369096756,
-0.11173256486654282,
0.19189244508743286,
-0.005129384342581034,
-0.05471128970384598,
-0.003567170351743698,
-0.008836071006953716,
-0.047532469034194946,
-0.04668053612112999,
-0.16217155754566193,
-0.11170277744531631,
0.028286688029766083,
0.13460823893547058,
0.05713970959186554,
0.10287153720855713,
0.16696469485759735,
0.07415993511676788,
-0.16375389695167542,
-0.07460474222898483,
-0.012756042182445526,
0.014449033886194229,
-0.2896884083747864,
-0.1881658285856247,
-0.00821563508361578,
-0.014316197484731674,
0.02236962877213955,
-0.05864996835589409,
-0.10494212061166763,
0.0848843902349472,
-0.0024353107437491417,
-0.006559605710208416,
0.011103564873337746,
-0.007759947795420885,
0.04364438354969025,
0.010378110222518444,
0.015283945947885513,
-0.18900756537914276,
0.14011697471141815,
-0.03782527893781662,
0.07530470192432404,
0.03210252523422241,
0.015468988567590714,
0.05553092062473297,
0.06584037095308304,
0.0038698180578649044,
-0.13323932886123657,
0.0006136019364930689,
-0.09681189060211182,
-0.05750766023993492,
0.057126373052597046,
-0.14445491135120392,
0.12885601818561554,
0.1148812472820282,
-0.022709546610713005,
0.13938230276107788,
0.04396001249551773,
-0.2801777124404907,
-0.16178935766220093,
-0.025906475260853767,
-0.0732649639248848,
-0.05405237898230553,
-0.07555310428142548,
0.03763056918978691,
0.07954905182123184,
-0.12102896720170975,
0.07983121275901794,
0.046700142323970795,
0.031601857393980026,
0.2524210810661316,
-0.05791646987199783,
-0.04329612851142883,
0.12961958348751068,
0.13449430465698242,
0.05097243934869766,
0.13803638517856598,
0.1296951174736023,
-0.0476364865899086,
-0.02853744849562645,
-0.05512261763215065,
-0.012581711634993553,
-0.006076131947338581,
-0.10883132368326187,
0.07925087958574295,
-0.027904072776436806,
-0.009507720358669758,
0.12912587821483612,
0.11836864054203033,
0.06986934691667557,
-0.035546381026506424,
0.03663113713264465,
-0.1599305272102356,
0.2006848156452179,
0.0023509240709245205,
0.10828030109405518,
-0.11724960058927536,
0.043481580913066864,
-0.0050233397632837296,
-0.04516442120075226,
0.17039427161216736,
-0.08892673254013062,
0.1365484595298767,
-0.1539650559425354,
0.09924471378326416,
-0.12160710990428925,
0.05223948508501053,
-0.17697764933109283,
0.08447965234518051,
-0.1538631170988083,
-0.11904684454202652,
-0.1747627705335617,
-0.005002540536224842,
0.10638311505317688,
-0.04034445807337761,
-0.0981525257229805,
0.030077610164880753,
0.07561839371919632,
0.10907833278179169,
0.1670125126838684,
0.07844553887844086,
-0.17304004728794098,
-0.05622101202607155,
0.04009679704904556,
-0.026363162323832512,
-0.06627778708934784,
-0.11865612864494324,
0.07747878134250641,
0.20606406033039093,
-0.023284921422600746,
0.17395518720149994,
-0.13724394142627716,
-0.009298066608607769,
-0.07380099594593048,
-0.1151842549443245,
0.11161568760871887,
-0.00936896726489067,
0.18490482866764069,
-0.03326389566063881,
-0.06074361875653267,
0.16025160253047943,
-0.10767998546361923,
0.016302630305290222,
-0.012450575828552246,
0.014621857553720474,
-0.044539034366607666,
0.26829010248184204,
0.017177553847432137,
-0.06249724328517914,
0.05971105769276619,
-0.17481665313243866,
0.12213705480098724,
-0.08445035666227341,
-0.147140234708786,
-0.062432948499917984,
-0.06780567020177841,
-0.0871843546628952,
0.05030875653028488,
-0.106974296271801,
0.047633394598960876,
0.040921445935964584,
0.01579366996884346,
-0.15956366062164307,
-0.08230529725551605,
0.0201609767973423,
0.07406854629516602,
0.08892255276441574,
-0.08398669213056564,
0.020137624815106392,
-0.08778524398803711,
-0.1880168616771698,
-0.08197716623544693,
-0.04222053289413452,
-0.09491962939500809,
0.08047275990247726,
-0.06306497007608414,
0.040509551763534546,
-0.009816243313252926,
-0.004111914429813623,
0.07517604529857635,
0.14018996059894562,
0.09734060615301132,
-0.027903836220502853,
-0.0631951093673706,
-0.0487559549510479,
0.17791816592216492,
0.035923879593610764,
-0.17181071639060974,
0.1960371732711792,
0.12646709382534027,
-0.010464619845151901,
0.09679689258337021,
-0.14274178445339203,
-0.08718446642160416,
0.1352619081735611,
-0.10335895419120789,
0.017625145614147186,
0.029074057936668396,
0.007136047352105379,
-0.0164294745773077,
0.01233088318258524,
0.01980709843337536,
-0.039531409740448,
0.12857939302921295,
0.06178327277302742,
-0.0901508554816246,
-0.07597222924232483,
0.04474987834692001,
-0.008254238404333591,
0.11476446688175201,
0.06419258564710617,
0.10143161565065384,
-0.0063979667611420155,
0.20335502922534943,
0.09087498486042023,
0.021439503878355026,
-0.03905099630355835,
0.023704420775175095,
0.0307789146900177,
0.041947219520807266,
0.25612571835517883,
0.036605529487133026,
0.08188536763191223,
0.10445363819599152,
0.04902547597885132,
-0.00006442254380090162,
-0.0024772982578724623,
0.015301208943128586,
-0.04852892830967903,
0.15889234840869904,
0.06621042639017105,
0.06720120459794998,
-0.10292034596204758,
0.002075880765914917,
-0.0685199424624443,
0.23171862959861755,
-0.15353643894195557,
0.1374177783727646,
-0.009924165904521942,
-0.0918455719947815,
0.18437013030052185,
-0.1801416575908661,
-0.06609465181827545,
0.15503862500190735,
-0.12362708896398544,
0.03984401375055313,
0.020189015194773674,
0.035678911954164505,
-0.046513743698596954,
-0.0649009644985199,
-0.02239210158586502,
-0.2097007930278778,
-0.13211867213249207,
0.006056546699255705,
-0.017844369634985924,
0.23163489997386932,
-0.060822051018476486,
0.014710554853081703,
0.0661393329501152,
0.09193232655525208,
-0.07755190134048462,
-0.1481919288635254,
-0.11779271066188812,
-0.006020896602421999,
-0.04974455013871193,
0.03825133293867111,
0.03571586683392525,
0.09727293998003006,
-0.2131621241569519,
-0.12405213713645935,
-0.26305925846099854,
0.032879870384931564,
-0.24580776691436768,
-0.047190111130476,
0.04581103101372719,
-0.09207223355770111,
0.05542460456490517,
-0.07724851369857788,
0.11750298738479614,
-0.14908620715141296,
-0.061023369431495667,
0.07528788596391678,
0.029042623937129974,
-0.056055571883916855,
-0.1028377115726471,
-0.007634908892214298,
0.0044197803363204,
0.18851087987422943,
-0.08125471323728561,
-0.02390151470899582,
-0.006274692248553038,
0.16507825255393982,
-0.13332845270633698,
0.062033213675022125,
-0.022429892793297768,
-0.15214170515537262,
-0.07763570547103882,
0.20656535029411316,
0.0876452624797821,
0.012146338820457458,
-0.20199421048164368,
0.048962123692035675,
0.03251709043979645,
-0.0040434375405311584,
0.08975505828857422,
0.010255161672830582,
-0.04274556413292885,
0.00893733836710453,
0.10981456190347672,
-0.027890749275684357,
0.07881256192922592,
-0.260369211435318,
0.2095455527305603,
-0.010005621239542961,
0.15999312698841095,
0.41424456238746643,
-0.1321912258863449,
-0.07151222974061966,
-0.037901826202869415,
0.08467866480350494,
-0.027684643864631653,
0.07495877146720886,
-0.10302825272083282,
-0.16375625133514404,
-0.07551319152116776,
-0.11354783922433853,
-0.11052829772233963,
-0.030233070254325867,
-0.010093660093843937,
0.10686460137367249,
-0.2718302011489868,
0.1239561140537262,
0.03458528593182564,
0.12112877517938614,
-0.08086217194795609,
-0.01583031192421913,
-0.10758157074451447,
0.06144246831536293,
-0.04308611527085304,
-0.10870317369699478,
0.04443204030394554,
-0.04070764780044556,
0.1292949765920639,
-0.07571613788604736,
0.05993632227182388,
0.10702628642320633,
-0.17936991155147552,
-0.07144812494516373,
-0.10465297102928162,
-0.11373760551214218,
-0.0466422438621521,
0.021714840084314346,
0.05590000003576279,
0.05523638799786568,
0.16252541542053223,
0.0641440898180008,
-0.007328913547098637,
-0.08683953434228897,
-0.15758280456066132,
0.10849563777446747,
0.14015179872512817,
0.047753091901540756,
-0.04911845177412033,
-0.08599450439214706,
-0.02886248752474785,
-0.17066216468811035,
-0.05298301577568054,
0.12528738379478455,
-0.1829557567834854,
-0.10291193425655365,
0.0037331548519432545,
0.06328270584344864,
-0.02826029807329178,
-0.010608013719320297,
-0.03180182725191116,
0.14106138050556183,
0.07447406649589539,
0.05902041122317314,
-0.11810661107301712,
-0.23405404388904572,
0.17970584332942963,
0.17111602425575256,
-0.022274386137723923,
0.11400369554758072,
-0.0019031288102269173,
0.07397005707025528,
-0.05861756578087807,
-0.009012381546199322,
-0.1067100390791893,
0.12061596661806107,
0.06151779368519783,
-0.11394577473402023,
-0.09925948083400726,
-0.10060327500104904,
0.06675320118665695,
0.15736524760723114,
-0.05453789234161377,
0.0696638971567154,
-0.0210279431194067,
-0.06258139759302139,
-0.1380581557750702,
-0.11253885924816132,
-0.02005598321557045,
-0.00932211335748434,
0.12456119805574417,
-0.029431425034999847,
-0.14009040594100952,
0.20873898267745972,
0.005493232514709234,
0.12335512042045593,
-0.09603304415941238,
-0.05617079138755798,
0.20008446276187897,
0.060139771550893784,
-0.05123572796583176,
-0.05278344079852104,
-0.09130986034870148,
-0.08267391473054886,
0.21631668508052826,
0.10323178768157959,
-0.006807643920183182,
0.02827676199376583,
-0.0673731341958046,
-0.1449834257364273,
0.10715144127607346,
0.023076146841049194,
0.07477599382400513,
0.08115776628255844,
0.19997817277908325,
0.042039934545755386,
-0.07419556379318237,
0.08051585406064987,
-0.01965448260307312,
0.1482798308134079,
0.0334174670279026,
-0.006021976470947266,
0.050856444984674454,
0.04826734587550163,
0.1438973993062973,
-0.08494751155376434,
0.08619770407676697,
-0.1164618730545044,
0.052943095564842224,
-0.04620850831270218,
-0.02770197205245495,
-0.051090057939291,
0.19821859896183014,
0.07136578857898712,
-0.20836754143238068,
-0.18725287914276123,
0.04845357686281204,
-0.011183241382241249,
0.07527854293584824,
-0.03331812098622322,
0.10228515416383743,
0.07697518169879913,
-0.07128556072711945,
0.08503233641386032,
-0.05659177154302597,
-0.000027523272365215234,
-0.1432565450668335,
0.15761874616146088,
-0.005151300225406885,
-0.03177626058459282,
0.0441402941942215,
-0.23693111538887024,
-0.18339253962039948,
0.07436589151620865,
0.012024659663438797,
0.05660105124115944,
-0.006017325446009636,
-0.034221623092889786,
-0.23158158361911774,
-0.03528837859630585,
0.006859695538878441,
0.026789465919137,
-0.19170163571834564,
0.05124492570757866,
-0.04410426318645477,
0.01383995171636343,
-0.062416091561317444,
-0.05648169666528702,
0.0025179353542625904,
0.1562502682209015,
0.11276508867740631,
0.034295253455638885,
-0.1465764194726944,
-0.1419413685798645,
-0.01993447169661522,
0.1145300567150116,
-0.00964465644210577,
-0.11606315523386002,
0.015235614962875843,
-0.012380953878164291,
-0.2127312272787094,
-0.23472781479358673,
-0.020324403420090675,
0.2422610968351364,
-0.1349298059940338,
-0.08487699180841446,
-0.053281571716070175,
-0.10951697826385498,
-0.08255220949649811,
0.022390009835362434,
0.1654207855463028,
0.025340089574456215,
-0.1446823924779892,
-0.05000957474112511,
-2.628856464395763e-32,
0.19505374133586884,
-0.02114357054233551,
-0.07473503053188324,
0.007375330664217472,
-0.17026227712631226,
-0.09083471447229385,
-0.06285583227872849,
-0.0872756689786911,
0.03407592326402664,
-0.022265011444687843,
-0.19552548229694366,
0.09123752266168594,
0.1312103122472763,
-0.031191620975732803,
0.05200115963816643,
-0.033875804394483566,
0.09027290344238281,
-0.0056439293548464775,
0.0038281800225377083,
-0.020438576117157936,
0.12896046042442322,
0.012925541959702969,
0.0644058808684349,
0.24832572042942047,
-0.07029305398464203,
-0.1576116681098938,
-0.01600835844874382,
-0.009872534312307835,
-0.05974655598402023,
-0.26253649592399597,
-0.020081551745533943,
0.20564304292201996,
-0.019758928567171097,
0.09341837465763092,
-0.0890515148639679,
0.08839655667543411,
-0.06898421049118042,
0.08660769462585449,
-0.005287351552397013,
0.016049649566411972,
-0.20191320776939392,
0.1902889758348465,
0.027170132845640182,
0.03103470243513584,
0.10331237316131592,
-0.03454100713133812,
-0.009056245908141136,
0.10922250151634216,
-0.11428254097700119,
0.15743380784988403,
-0.06512189656496048,
0.01335881743580103,
0.0026419467758387327,
0.12349162995815277,
0.06421304494142532,
-0.09243205934762955,
0.07460809499025345,
-0.1289389282464981,
-0.2839900553226471,
0.03951726853847504,
-0.008898446336388588,
-0.12075073271989822,
0.003786515211686492,
0.15947715938091278,
0.16368204355239868,
-0.0069408719427883625,
0.1116214171051979,
0.010058089159429073,
0.21026110649108887,
0.0379079170525074,
-0.04187280312180519,
-0.0182943232357502,
0.09097571671009064,
-0.04558776319026947,
-0.03140302374958992,
-0.10660162568092346,
-0.07184910774230957,
0.023239200934767723,
0.0656486302614212,
0.02950759418308735,
0.03203504532575607,
-0.05055858939886093,
-0.01724996790289879,
0.05585518106818199,
0.19959063827991486,
0.07546399533748627,
0.06174652650952339,
0.15237662196159363,
-0.005212851334363222,
0.015921859070658684,
-0.07391180843114853,
0.4156494140625,
-0.003890699241310358,
-0.12627966701984406,
0.11052931845188141,
0.05820764601230621,
0.04271773621439934,
0.10452024638652802,
-0.11074725538492203,
-0.08969520032405853,
-0.07225371152162552,
0.134643092751503,
-0.018272778019309044,
0.022450746968388557,
0.11329720169305801,
-0.010431296192109585,
0.19825764000415802,
-0.04231039807200432,
-0.14423802495002747,
-0.026547886431217194,
-0.17148633301258087,
0.07277502119541168,
0.10181605815887451,
-0.11524616926908493,
0.0519728846848011,
-0.03293345868587494,
0.04153866693377495,
-0.11487080901861191,
0.12130530178546906,
0.15538224577903748,
-0.18816359341144562,
0.015010624192655087,
0.10237859189510345,
-0.14374136924743652,
0.06388413161039352,
-0.0037149244453758,
-0.02388516627252102,
-0.12717635929584503,
0.0901181772351265,
-0.21824395656585693,
-0.1270841807126999,
-0.19014719128608704,
7.613488151037018e-7,
-0.05858703702688217,
0.05355311557650566,
-0.11984162032604218,
0.11368586122989655,
-0.07396788150072098,
0.07264475524425507,
-0.010650720447301865,
0.12560325860977173,
-0.04640722647309303,
0.05213433876633644,
0.09059257060289383,
-0.20686668157577515,
0.07908812165260315,
0.09109951555728912,
-0.09015602618455887,
-0.19231843948364258,
-0.08039688318967819,
-0.010950294323265553,
-0.050401367247104645,
-0.017595790326595306,
-0.021176021546125412,
-0.0021787958685308695,
0.16833122074604034,
-0.18582050502300262,
0.07060667127370834,
-0.004707558546215296,
-0.03295823931694031,
0.12460034340620041,
0.1248106136918068,
-0.04032427817583084,
0.034994520246982574,
0.030863851308822632,
-0.05033809691667557,
0.009759602136909962,
-0.14589416980743408,
-0.02889183536171913,
-0.03533095866441727,
-0.0888502225279808,
-0.11291848123073578,
-0.00044762392644770443,
-0.1074686348438263,
-0.07029946148395538,
-0.033801425248384476,
0.02569420076906681,
0.11206398904323578,
0.028188155964016914,
-0.08543568104505539,
0.13997268676757812,
0.006923019420355558,
-0.03258185088634491,
0.1341753453016281,
0.12060265988111496,
0.033354584127664566,
0.11598527431488037,
-0.029336625710129738,
0.016865337267518044,
0.0207982175052166,
-0.1333121359348297,
0.029132740572094917,
-0.005661132279783487,
-0.1014719009399414,
-0.07283216714859009,
0.08132489770650864,
0.012339123524725437,
0.08456168323755264,
-0.06531368941068649,
-0.14211735129356384,
2.3111672233892873e-34,
-0.06868228316307068,
0.14690467715263367,
0.0006052239332348108,
0.09377851337194443,
-0.04177631437778473,
-0.08797361701726913,
0.006194795947521925,
0.025397617369890213,
0.10302611440420151,
-0.16085933148860931,
-0.24928486347198486
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | Hi!
You want to use `push_to_hub` (creates Parquet files) instead of `save_to_disk` (creates Arrow files) when creating a Hub dataset. Parquet is designed for long-term storage and takes less space than the Arrow format, and, most importantly, `load_dataset` can parse it, which should fix the viewer.
Regarding the dataset generation, `Dataset.from_generator` with the video data represented as `datasets.Value("binary")` followed by `push_to_hub` should work (if the `push_to_hub` step times out, restart it to resume uploading)
PS: Once the dataset is uploaded, to make working with the dataset easier, it's a good idea to add a [transform](https://huggingface.co/docs/datasets/main/en/process#format-transform) to the README that shows how to decode the binary video data into something a model can understand. Also, if you get an `ArrowInvalid` error (can happen when working with large binary data) in `Dataset.from_generator`, reduce the value of `writer_batch_size` (the default is 1000) to fix it. | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 142 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
Hi!
You want to use `push_to_hub` (creates Parquet files) instead of `save_to_disk` (creates Arrow files) when creating a Hub dataset. Parquet is designed for long-term storage and takes less space than the Arrow format, and, most importantly, `load_dataset` can parse it, which should fix the viewer.
Regarding the dataset generation, `Dataset.from_generator` with the video data represented as `datasets.Value("binary")` followed by `push_to_hub` should work (if the `push_to_hub` step times out, restart it to resume uploading)
PS: Once the dataset is uploaded, to make working with the dataset easier, it's a good idea to add a [transform](https://huggingface.co/docs/datasets/main/en/process#format-transform) to the README that shows how to decode the binary video data into something a model can understand. Also, if you get an `ArrowInvalid` error (can happen when working with large binary data) in `Dataset.from_generator`, reduce the value of `writer_batch_size` (the default is 1000) to fix it. | [
-0.15690994262695312,
0.14264383912086487,
0.011477911844849586,
-0.1154017299413681,
0.05217572674155235,
0.01955687254667282,
0.13055892288684845,
0.14288368821144104,
-0.040051721036434174,
-0.02722996473312378,
0.00036994231049902737,
0.0890793576836586,
-0.13667772710323334,
0.23186466097831726,
0.14367647469043732,
-0.21205344796180725,
-0.10962823033332825,
0.07962803542613983,
0.051239948719739914,
0.038065988570451736,
0.11533242464065552,
-0.011546480469405651,
0.13608388602733612,
-0.1606147140264511,
-0.23414161801338196,
-0.0722912922501564,
-0.12852737307548523,
0.2011435180902481,
0.1144668236374855,
-0.1857638955116272,
-0.10153722018003464,
0.10609694570302963,
0.20782122015953064,
0.31113144755363464,
0.000005446504928841023,
-0.02900581993162632,
0.032963354140520096,
-0.002333499025553465,
0.02429802715778351,
-0.0014112434582784772,
0.14015251398086548,
-0.11246076226234436,
-0.10438883304595947,
-0.037679269909858704,
0.1626342535018921,
-0.06589828431606293,
0.16022436320781708,
-0.13996849954128265,
0.2282014787197113,
-0.1409444957971573,
-0.013881933875381947,
-0.013024674728512764,
-0.053965263068675995,
-0.04734094440937042,
-0.01569041982293129,
0.27616390585899353,
-0.042086727917194366,
0.1433800756931305,
0.1650586724281311,
0.10345082730054855,
-0.0958423912525177,
-0.025110945105552673,
0.11665894836187363,
-0.09804445505142212,
0.2920534312725067,
0.10565245896577835,
-0.21576784551143646,
-0.20137594640254974,
-0.059178829193115234,
0.12354277074337006,
-0.08139718323945999,
-0.1683213710784912,
-0.11910773813724518,
-0.02228023111820221,
0.02264757640659809,
-0.039942916482686996,
-0.1433716118335724,
0.05630994588136673,
-0.07232384383678436,
0.08300124108791351,
-0.17910780012607574,
-0.07077851891517639,
-0.0578838475048542,
-0.23405131697654724,
-0.09843422472476959,
-0.044431913644075394,
-0.007092281710356474,
0.0007650094339624047,
0.013020745478570461,
-0.10152751207351685,
0.09473248571157455,
-0.024088190868496895,
0.08177770674228668,
0.024387186393141747,
0.0023359479382634163,
-0.06274186074733734,
-0.06479938328266144,
0.025302164256572723,
0.04514513537287712,
-0.07841961085796356,
0.1039944514632225,
0.18823620676994324,
-0.3303123116493225,
0.1492428481578827,
0.0002778744965326041,
-0.0477340929210186,
-0.042271316051483154,
-0.19644342362880707,
0.17167794704437256,
0.13186806440353394,
-0.002927094232290983,
0.04972368851304054,
-0.14498718082904816,
0.00963548943400383,
-0.11862271279096603,
-0.04124411195516586,
-0.026200514286756516,
0.1480596959590912,
-0.04770553484559059,
0.12179753929376602,
0.03854021430015564,
0.05710718780755997,
-0.03394448384642601,
0.13136431574821472,
0.03030737116932869,
0.030248375609517097,
-0.20434048771858215,
-0.05885487422347069,
-0.013750653713941574,
-0.04442057013511658,
-0.010087665170431137,
0.030563225969672203,
0.10904786735773087,
-0.01950267143547535,
0.14380711317062378,
-0.18649733066558838,
0.07141951471567154,
-0.06239524483680725,
0.17167451977729797,
0.08973518013954163,
0.07227271050214767,
0.03473670780658722,
-0.10168640315532684,
-0.11298849433660507,
0.023680098354816437,
0.05443398654460907,
0.07602208852767944,
0.036192886531353,
-0.17862017452716827,
0.06672141700983047,
0.15591485798358917,
0.09945428371429443,
-0.0803380012512207,
0.0956396758556366,
0.04960106685757637,
-0.005280680954456329,
-0.22635865211486816,
-0.10757561028003693,
-0.4286907911300659,
0.007332960143685341,
-0.017321793362498283,
-0.022936664521694183,
0.01633157581090927,
0.030235951766371727,
0.05679582431912422,
0.1400485783815384,
0.08870252966880798,
0.12827500700950623,
0.09975899010896683,
0.20632736384868622,
0.0008326676907017827,
-0.07983732968568802,
-0.02718811109662056,
-0.08035110682249069,
-0.04593378305435181,
0.2724224925041199,
0.0018400142434984446,
-0.2100585550069809,
-0.017483629286289215,
0.012921812012791634,
0.02213064581155777,
-0.09577374905347824,
0.03037758357822895,
0.21594834327697754,
0.2940240800380707,
-0.11273463815450668,
0.04990663751959801,
0.2803973853588104,
-0.05513417720794678,
0.08289079368114471,
-0.07335904985666275,
0.02444690279662609,
-0.03591536357998848,
0.17579708993434906,
-0.052705761045217514,
-0.17298524081707,
0.11952999979257584,
-0.10617611557245255,
0.0606730617582798,
-0.19621463119983673,
0.046004537492990494,
-0.05232544243335724,
-0.014357263222336769,
-0.1167229413986206,
-0.08565358072519302,
-0.10000073164701462,
-0.16328522562980652,
-0.009263715706765652,
0.2572692632675171,
-0.17408354580402374,
0.05109081044793129,
0.0025027578230947256,
-0.19817836582660675,
-0.1036643385887146,
0.058231014758348465,
-0.09035524725914001,
-0.09070297330617905,
0.044829826802015305,
-0.18143576383590698,
0.14256274700164795,
-0.0701061263680458,
0.20667220652103424,
0.17993678152561188,
0.019441572949290276,
0.04316014051437378,
0.13594254851341248,
0.09693054854869843,
0.06051875278353691,
0.13778263330459595,
0.017322031781077385,
-0.012519394047558308,
-0.09318004548549652,
0.15603968501091003,
0.0866544172167778,
-0.001283118617720902,
0.15008625388145447,
0.28844574093818665,
0.07223568111658096,
0.11360173672437668,
-0.05356846749782562,
-0.14431610703468323,
-0.11960482597351074,
-0.062058717012405396,
0.022007478401064873,
-0.0045890226028859615,
0.08263220638036728,
-0.05156533792614937,
-0.11920550465583801,
0.15146982669830322,
-0.0391383022069931,
0.16885432600975037,
0.013909643515944481,
0.05397281050682068,
0.13964803516864777,
0.07757636904716492,
-0.08912286907434464,
0.10551371425390244,
0.05515195056796074,
-0.005036529619246721,
-0.007409995887428522,
0.18423178791999817,
-0.033514268696308136,
-0.05376077815890312,
0.07738939672708511,
-0.027673877775669098,
-0.11940883845090866,
0.08194644749164581,
-0.05920316278934479,
-0.005171590484678745,
0.15044237673282623,
0.08558093011379242,
-0.0335158109664917,
0.02647804282605648,
-0.047898855060338974,
-0.07235977053642273,
-0.20973017811775208,
-0.050824955105781555,
0.06938058882951736,
0.008311119861900806,
0.020208489149808884,
-0.05529344081878662,
0.09851645678281784,
0.09452041238546371,
-0.07270929962396622,
0.00969652645289898,
-0.09795620292425156,
-0.03755462169647217,
-0.02212740108370781,
0.07643941044807434,
-0.15423399209976196,
-0.0014631287194788456,
-0.058075543493032455,
0.17314966022968292,
0.022432580590248108,
0.0631159320473671,
-0.06753740459680557,
-0.029876118525862694,
0.06815005838871002,
-0.067259781062603,
-0.07071400433778763,
-0.09054931998252869,
0.014390937983989716,
0.1703871339559555,
0.13803063333034515,
0.05661933496594429,
0.0952606201171875,
0.08700690418481827,
0.13541504740715027,
-0.0032717494759708643,
-0.2875342071056366,
-0.04637013375759125,
0.03375925123691559,
-0.03446989133954048,
0.050472307950258255,
0.04268117621541023,
-0.032002367079257965,
-0.015848658978939056,
-0.06256796419620514,
-0.08344550430774689,
-0.044165756553411484,
0.008805196732282639,
0.010542348027229309,
0.12443802505731583,
-0.0138400224968791,
-0.09175104647874832,
0.31208688020706177,
-0.09544426202774048,
-0.16667678952217102,
0.17970162630081177,
-0.007025145925581455,
-0.08305663615465164,
-0.07023103535175323,
-0.07088372111320496,
0.06203435733914375,
0.08677618205547333,
-0.04736074432730675,
-0.03731413185596466,
-0.16635039448738098,
0.12241021543741226,
-0.15610244870185852,
0.007948360405862331,
-0.054743919521570206,
0.07456494867801666,
-0.02008117362856865,
0.08795927464962006,
-0.18547654151916504,
-0.13551746308803558,
-0.13899625837802887,
0.0785762220621109,
0.11306776106357574,
-0.14552666246891022,
0.03851843997836113,
0.03557378053665161,
-0.06577892601490021,
0.06104346737265587,
-0.013546677306294441,
-0.3475668132305145,
0.16570617258548737,
-0.26711034774780273,
0.06480211019515991,
-0.0383898951113224,
0.10525567084550858,
0.03323723375797272,
-0.1316443681716919,
-0.1649296134710312,
0.11644285172224045,
0.15147963166236877,
0.051620934158563614,
-0.13845208287239075,
-0.13409903645515442,
0.008722614496946335,
-0.23339726030826569,
0.054899923503398895,
-0.022205062210559845,
-0.0011151281651109457,
0.0632070004940033,
0.06736773997545242,
-0.10716448724269867,
0.1469787359237671,
0.02442076802253723,
0.0950685515999794,
-0.1066766083240509,
-0.09195639193058014,
-0.18211118876934052,
-0.0797446072101593,
-0.06674380600452423,
-0.2163330763578415,
0.08075286448001862,
0.022320549935102463,
0.2898518145084381,
-0.03778501972556114,
0.11157586425542831,
0.14138440787792206,
-0.17499127984046936,
0.1557910144329071,
0.05846867710351944,
-0.07976098358631134,
0.08148356527090073,
0.006003393791615963,
0.07408487796783447,
-0.011622918769717216,
0.11024963110685349,
0.049074456095695496,
0.018008612096309662,
-0.11179573833942413,
-0.11160005629062653,
-0.17025744915008545,
0.12665928900241852,
-0.05981016531586647,
-0.051932476460933685,
0.043586280196905136,
0.11114789545536041,
-0.06593547016382217,
0.04271712899208069,
-0.08816645294427872,
0.00256907450966537,
-0.07193958759307861,
0.03409046307206154,
0.07392865419387817,
0.06256798654794693,
-0.07293392717838287,
-0.07219550758600235,
0.29202958941459656,
-0.08691854029893875,
0.13818378746509552,
-0.017580512911081314,
-0.15983644127845764,
0.04448184743523598,
0.11827714741230011,
-0.02858455292880535,
0.13854514062404633,
0.10061389952898026,
0.021024182438850403,
0.006700176279991865,
0.2684926688671112,
-0.012023169547319412,
0.17882251739501953,
-0.046168919652700424,
-0.07695100456476212,
-0.0569695346057415,
-0.05765058100223541,
0.0906967967748642,
0.35167157649993896,
0.056899476796388626,
-0.012973309494554996,
-0.08178727328777313,
-0.056309331208467484,
-0.011146243661642075,
0.1254008561372757,
0.18023699522018433,
-0.22759243845939636,
-0.13298532366752625,
0.07989626377820969,
0.05984484776854515,
0.05995870754122734,
0.07777036726474762,
-0.002688956679776311,
0.09869077056646347,
0.02353041060268879,
-0.04204894229769707,
0.005479735787957907,
-0.06180484965443611,
0.04725649580359459,
0.045294784009456635,
-0.07871048897504807,
0.11706879734992981,
0.24005679786205292,
-0.2092963308095932,
-0.0022487500682473183,
-0.15847621858119965,
-0.08133280277252197,
0.08121873438358307,
-0.007045783568173647,
-0.0663272887468338,
0.1107967272400856,
-0.05011790990829468,
0.006349814590066671,
-0.14317838847637177,
0.06301355361938477,
0.02040986530482769,
0.15747272968292236,
-0.006322517059743404,
-0.05867599695920944,
-0.18568961322307587,
0.04882225766777992,
0.12087324261665344,
-0.1982237845659256,
-0.047090597450733185,
-0.23971647024154663,
0.044953420758247375,
0.0029495656490325928,
-0.14694944024085999,
0.024829251691699028,
0.0876082256436348,
0.09468677639961243,
-0.11111344397068024,
0.06382818520069122,
0.1370657980442047,
-0.13266941905021667,
0.0057087973691523075,
-0.06664721667766571,
-0.09247900545597076,
0.19951890408992767,
-0.12019512057304382,
0.06315520405769348,
-0.132266104221344,
-0.07759369909763336,
0.0657857358455658,
0.06767841428518295,
0.17904439568519592,
0.11851319670677185,
0.012062648311257362,
0.02949671261012554,
-0.06380236893892288,
0.07054353505373001,
0.008210240863263607,
-0.04773696884512901,
0.13237737119197845,
0.05934949219226837,
-0.15230655670166016,
-0.034004393965005875,
-0.05658547207713127,
0.13770915567874908,
0.022436605766415596,
-0.20267294347286224,
0.058880243450403214,
-0.03131166473031044,
-0.12994761765003204,
-0.0722055733203888,
-0.18727512657642365,
-0.10401321947574615,
-0.08412088453769684,
0.07125070691108704,
-0.07665060460567474,
-0.03974199667572975,
0.19256339967250824,
0.0613357312977314,
-0.05478733777999878,
-0.0024700877256691456,
0.054945364594459534,
-0.17744681239128113,
-0.03803173452615738,
-0.23119008541107178,
0.08166476339101791,
-0.06041441485285759,
-0.028026647865772247,
0.04729212075471878,
-0.1810816526412964,
-0.03595910593867302,
0.03889935091137886,
0.0879964828491211,
0.027688097208738327,
-0.12865400314331055,
-0.11674074083566666,
-0.011575971730053425,
-2.838885860413821e-32,
0.053345534950494766,
-0.01558343693614006,
-0.04147377982735634,
0.025301849469542503,
-0.03898043558001518,
-0.04165153205394745,
0.03801297768950462,
-0.21800488233566284,
0.06349452584981918,
-0.1784997135400772,
0.024085016921162605,
0.015502803027629852,
0.04350670427083969,
0.09163383394479752,
-0.08295892179012299,
0.06753081828355789,
0.15971316397190094,
-0.0753433108329773,
-0.14292055368423462,
0.09125594049692154,
0.23570068180561066,
-0.07994243502616882,
-0.05996881052851677,
0.1376158595085144,
-0.06926324963569641,
0.10164482146501541,
-0.006993989925831556,
0.11491960287094116,
0.06083379685878754,
-0.14520984888076782,
-0.07053546607494354,
0.027775827795267105,
-0.06901295483112335,
0.00919356569647789,
0.060705117881298065,
0.06178799644112587,
-0.19264040887355804,
0.047410085797309875,
-0.0719231441617012,
0.019220823422074318,
-0.023617751896381378,
0.03415040299296379,
0.0053611379116773605,
-0.02802801877260208,
0.03757399320602417,
0.06965804100036621,
-0.03288207948207855,
0.1528875231742859,
-0.13143101334571838,
0.06691461056470871,
-0.050384510308504105,
0.12489666789770126,
-0.03254832699894905,
0.012149831280112267,
0.1429932713508606,
-0.01959943398833275,
0.07017508894205093,
0.0819852352142334,
0.023807497695088387,
-0.00871369056403637,
-0.010570166632533073,
-0.07187441736459732,
-0.07154247909784317,
0.0006410580244846642,
0.14039906859397888,
0.029688194394111633,
0.22047287225723267,
-0.305874228477478,
0.12429388612508774,
0.11071489751338959,
0.010526561178267002,
0.0013370055239647627,
0.024531090632081032,
-0.014942406676709652,
0.04820454865694046,
0.03425736352801323,
-0.06116707995533943,
-0.10144948214292526,
-0.06333708018064499,
-0.10182046890258789,
-0.11898594349622726,
-0.1286248415708542,
0.08275304734706879,
0.04530822113156319,
0.08869905024766922,
0.09018191695213318,
-0.0473683625459671,
-0.09266269207000732,
0.07844182103872299,
-0.055524617433547974,
0.01787758618593216,
-0.01604699343442917,
0.052820298820734024,
0.09827910363674164,
0.06380575150251389,
-0.03583119809627533,
0.037511952221393585,
0.3221680819988251,
0.13476987183094025,
-0.08783911168575287,
0.0887993574142456,
-0.003932238090783358,
-0.04878263548016548,
-0.013795534148812294,
0.12390909343957901,
-0.08358585834503174,
-0.045315250754356384,
0.28684645891189575,
-0.09114290028810501,
0.08460305631160736,
-0.10537803173065186,
-0.03328759968280792,
0.03811866044998169,
-0.06518395245075226,
0.06270770728588104,
-0.0996457114815712,
0.07290863245725632,
0.017801057547330856,
-0.008179506286978722,
0.033564623445272446,
-0.2049865424633026,
-0.10973954945802689,
-0.1140357032418251,
-0.0795171782374382,
-0.0784350261092186,
-0.07458984106779099,
0.011804497800767422,
0.03490978851914406,
0.060377784073352814,
-0.15699228644371033,
-0.05408487096428871,
-0.016717441380023956,
7.266802981575893e-7,
-0.119282066822052,
0.0920700654387474,
0.0029522620607167482,
-0.11647530645132065,
0.03634578734636307,
0.025644278153777122,
-0.147391214966774,
0.15732784569263458,
0.12801986932754517,
0.05937580764293671,
0.08050841093063354,
-0.1290154904127121,
-0.037887319922447205,
0.08489813655614853,
-0.11151743680238724,
-0.1336122453212738,
-0.05490437150001526,
0.03484823927283287,
-0.16522932052612305,
0.07446514070034027,
0.2643764019012451,
0.1805455982685089,
0.0362732857465744,
0.040451399981975555,
0.057730093598365784,
-0.010718938894569874,
0.010069873183965683,
0.1421651840209961,
-0.09473806619644165,
-0.09833468496799469,
-0.010683770291507244,
-0.046000972390174866,
-0.12863540649414062,
0.010208744555711746,
-0.16940750181674957,
-0.07588029652833939,
-0.07398577034473419,
0.029158692806959152,
-0.05055627599358559,
0.02445351518690586,
-0.09559798240661621,
0.01037570834159851,
0.00497796107083559,
-0.08542010188102722,
0.06259815394878387,
-0.01880207657814026,
-0.03130936250090599,
0.08629486709833145,
-0.1881791353225708,
-0.014734061434864998,
0.026065383106470108,
0.026900755241513252,
0.10261422395706177,
0.18618541955947876,
-0.0946965366601944,
-0.09412067383527756,
-0.01314800325781107,
-0.07842941582202911,
-0.033812977373600006,
-0.044909119606018066,
-0.0405750647187233,
-0.004150472115725279,
-0.10677162557840347,
0.09311142563819885,
0.04908382147550583,
-0.002707934472709894,
-0.07345719635486603,
5.894620311103389e-35,
0.057468824088573456,
-0.009064069017767906,
0.2046782374382019,
-0.10633984953165054,
-0.1828932762145996,
0.02229568175971508,
-0.031083595007658005,
0.00868389941751957,
0.06468899548053741,
-0.040741872042417526,
-0.08010401576757431
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | One issue here is that Dataset.from_generator can work well for the non 'infinite sampling' version of the dataset. The training set for example is often sampled dynamically given the video files that I have uploaded. I worry that storing the video data as binary means that I'll end up duplicating a lot of the data. Furthermore, storing video data as anything but .mp4 would quickly make the dataset size from 1.9TB to 1PB. | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 73 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
One issue here is that Dataset.from_generator can work well for the non 'infinite sampling' version of the dataset. The training set for example is often sampled dynamically given the video files that I have uploaded. I worry that storing the video data as binary means that I'll end up duplicating a lot of the data. Furthermore, storing video data as anything but .mp4 would quickly make the dataset size from 1.9TB to 1PB. | [
-0.12801668047904968,
0.18807250261306763,
-0.0019920310005545616,
-0.12520360946655273,
0.10168512165546417,
0.021934781223535538,
0.10293987393379211,
0.15516266226768494,
-0.05039452388882637,
0.0030648037791252136,
0.009533419273793697,
0.016662301495671272,
-0.19726139307022095,
0.21007542312145233,
0.13896878063678741,
-0.2374861091375351,
-0.10840845853090286,
0.08687862753868103,
-0.013972335495054722,
0.041379526257514954,
0.12182225286960602,
-0.04078090190887451,
0.11987500637769699,
-0.17225803434848785,
-0.1897416114807129,
-0.06058795377612114,
-0.1336655616760254,
0.10701098293066025,
0.134795144200325,
-0.18144337832927704,
-0.1395738422870636,
0.06515871733427048,
0.26740747690200806,
0.32909807562828064,
0.000005596906703431159,
-0.0212735403329134,
0.02664448693394661,
0.014593195170164108,
-0.010848701931536198,
0.04670160636305809,
0.15355247259140015,
-0.08093227446079254,
-0.09649732708930969,
0.025486204773187637,
0.11572138220071793,
-0.06277261674404144,
0.1952313482761383,
-0.17105154693126678,
0.2207435518503189,
-0.16369439661502838,
-0.008964242413640022,
0.02757956273853779,
-0.09465541690587997,
-0.06978633254766464,
-0.007386390585452318,
0.2684517800807953,
-0.06646359711885452,
0.14073291420936584,
0.14769499003887177,
0.058136235922575,
-0.08206319063901901,
-0.004109299276024103,
0.10131604224443436,
-0.10888426005840302,
0.22454258799552917,
0.09558699280023575,
-0.20467233657836914,
-0.10669492930173874,
-0.01450179610401392,
0.14152240753173828,
-0.06856533885002136,
-0.12964709103107452,
-0.13015682995319366,
0.011043057776987553,
0.03866620361804962,
0.0008737244643270969,
-0.15658842027187347,
0.06781496852636337,
-0.0914258286356926,
0.09301354736089706,
-0.18670980632305145,
-0.036901719868183136,
-0.08451522141695023,
-0.2238294929265976,
-0.07887928187847137,
-0.11768683791160583,
-0.018194690346717834,
-0.031623080372810364,
0.001305274199694395,
-0.1063581332564354,
0.06497545540332794,
0.03939266502857208,
0.09536193311214447,
0.08594658970832825,
0.041675351560115814,
-0.0813567116856575,
-0.08890329301357269,
0.02226126939058304,
0.020954418927431107,
-0.059016164392232895,
0.17771460115909576,
0.1848246157169342,
-0.26745739579200745,
0.13556905090808868,
-0.011547685600817204,
-0.06067686527967453,
-0.0458868071436882,
-0.23964446783065796,
0.193336620926857,
0.10886809974908829,
-0.0251779668033123,
0.04324452206492424,
-0.13673318922519684,
-0.03737897798418999,
-0.13719302415847778,
-0.053458072245121,
-0.06617911905050278,
0.15244153141975403,
-0.07755779474973679,
0.04288657009601593,
0.012538913637399673,
0.07237301766872406,
-0.03096585161983967,
0.15099042654037476,
-0.0021100137382745743,
0.034083668142557144,
-0.15246924757957458,
-0.04071969911456108,
-0.01785983331501484,
-0.07976214587688446,
0.0020866356790065765,
-0.02680184878408909,
0.11039019376039505,
0.0073943836614489555,
0.12259494513273239,
-0.11673419922590256,
0.05793225020170212,
-0.07334893196821213,
0.15376044809818268,
0.12369327992200851,
0.09580422937870026,
0.05030339956283569,
-0.052516646683216095,
-0.09202458709478378,
0.01620449125766754,
0.015448018908500671,
0.07443057745695114,
0.04154196381568909,
-0.15683339536190033,
0.09041672945022583,
0.2031438648700714,
0.16383324563503265,
-0.08267161250114441,
0.13095241785049438,
0.08686777949333191,
-0.013678599148988724,
-0.17402516305446625,
-0.10156480967998505,
-0.3763129413127899,
-0.06798233836889267,
-0.0012021261500194669,
0.0004424750804901123,
0.021929286420345306,
0.024134693667292595,
0.032523948699235916,
0.15958936512470245,
0.05841967463493347,
0.09592276066541672,
0.07977581769227982,
0.18847432732582092,
0.001335162902250886,
-0.08690184354782104,
-0.04232792556285858,
-0.06436475366353989,
0.009896563366055489,
0.23549282550811768,
-0.030293717980384827,
-0.18041157722473145,
0.0018033067462965846,
0.036277301609516144,
0.02365010417997837,
-0.08514008671045303,
0.06467609107494354,
0.2928566038608551,
0.2538546323776245,
-0.03716546297073364,
0.08553043752908707,
0.31438207626342773,
-0.06558464467525482,
0.04517856612801552,
-0.08105316758155823,
-0.055924929678440094,
-0.02128884382545948,
0.18195044994354248,
-0.0285929124802351,
-0.1825350821018219,
0.12033674120903015,
-0.17954052984714508,
0.05345317721366882,
-0.19592159986495972,
0.04291541501879692,
-0.020588615909218788,
-0.050922367721796036,
-0.091603122651577,
-0.1381463259458542,
-0.12546701729297638,
-0.14309221506118774,
-0.05359592288732529,
0.20838046073913574,
-0.20103615522384644,
0.07747253775596619,
-0.03138401359319687,
-0.17202700674533844,
-0.17207486927509308,
0.06804552674293518,
-0.07533732056617737,
-0.09970074892044067,
0.02228819578886032,
-0.13822782039642334,
0.20982439815998077,
-0.10696663707494736,
0.15659739077091217,
0.19225820899009705,
0.04178326949477196,
0.0826161801815033,
0.052365437150001526,
0.1440919041633606,
0.08573680371046066,
0.14433184266090393,
0.009957012720406055,
-0.0269399955868721,
-0.08167030662298203,
0.1371121108531952,
0.06185032054781914,
-0.0262442696839571,
0.07531290501356125,
0.33327656984329224,
0.04344930499792099,
0.12349601089954376,
-0.03117736615240574,
-0.18000498414039612,
-0.07984756678342819,
-0.07829294353723526,
0.01943446509540081,
0.00211713626049459,
0.08622105419635773,
-0.07264333218336105,
-0.16744472086429596,
0.1676350235939026,
0.022598179057240486,
0.18083764612674713,
-0.02705438621342182,
0.025238187983632088,
0.13349780440330505,
0.06862472742795944,
-0.09916777163743973,
0.051770251244306564,
0.039665333926677704,
-0.0014888322912156582,
-0.10416649281978607,
0.19086642563343048,
-0.0563984289765358,
-0.04616811126470566,
0.05716203153133392,
-0.016151748597621918,
-0.08715719729661942,
0.08889099210500717,
-0.07946810871362686,
0.01301674172282219,
0.19468984007835388,
0.08622372895479202,
-0.06828421354293823,
0.04574521258473396,
-0.060932550579309464,
-0.06676240265369415,
-0.2034173160791397,
-0.14799362421035767,
0.08648249506950378,
0.04762290418148041,
-0.004968259017914534,
-0.0684756338596344,
0.09812861680984497,
0.0671377032995224,
-0.070022352039814,
0.043925799429416656,
-0.10459233075380325,
-0.08833449333906174,
-0.05369436740875244,
0.019279038533568382,
-0.14876623451709747,
0.014394605532288551,
-0.020899176597595215,
0.11681753396987915,
0.04356531798839569,
0.058787327259778976,
-0.05049467831850052,
-0.01115916296839714,
0.05926384776830673,
-0.043768495321273804,
-0.13063780963420868,
-0.0076908692717552185,
0.06364352256059647,
0.1576613485813141,
0.14811313152313232,
0.054401248693466187,
0.04510771855711937,
0.11530569940805435,
0.11013447493314743,
-0.04127465561032295,
-0.26625120639801025,
-0.056874290108680725,
0.035297442227602005,
0.008109577000141144,
0.08704280853271484,
0.06840122491121292,
0.048533227294683456,
0.009525702334940434,
-0.047701284289360046,
-0.038245029747486115,
-0.0597556047141552,
0.010560248047113419,
-0.010477937757968903,
0.15114860236644745,
0.040290091186761856,
-0.07924488931894302,
0.35399267077445984,
-0.08756869286298752,
-0.17374403774738312,
0.17350630462169647,
-0.04986092075705528,
-0.09710022062063217,
0.006371953058987856,
-0.035687725991010666,
0.0300986859947443,
0.04064372926950455,
-0.039019059389829636,
-0.05230248346924782,
-0.14457003772258759,
0.06938759982585907,
-0.16164977848529816,
0.008777962066233158,
-0.08464781194925308,
0.06874474883079529,
0.031523607671260834,
0.07821255922317505,
-0.19829413294792175,
-0.11603129655122757,
-0.09655401110649109,
0.04995361343026161,
0.10244149714708328,
-0.16469913721084595,
0.05706646293401718,
0.023098038509488106,
-0.06255926191806793,
0.09634292125701904,
0.011985616758465767,
-0.312856525182724,
0.14996464550495148,
-0.21609681844711304,
0.014243720099329948,
-0.09057599306106567,
0.10496984422206879,
0.028326023370027542,
-0.12104281038045883,
-0.15467002987861633,
0.06036578491330147,
0.1754036545753479,
0.03635592386126518,
-0.1141040176153183,
-0.09819383174180984,
0.02260112576186657,
-0.25101515650749207,
0.05255790054798126,
-0.020308835431933403,
0.016147980466485023,
0.1232035905122757,
0.06909593939781189,
-0.05084764584898949,
0.15106596052646637,
0.06679562479257584,
0.13090556859970093,
-0.08233979344367981,
-0.09949258714914322,
-0.16948047280311584,
-0.1067115068435669,
-0.08844086527824402,
-0.16865023970603943,
0.05274869501590729,
-0.003678067121654749,
0.29488247632980347,
-0.02748572640120983,
0.13512800633907318,
0.1625734269618988,
-0.14731715619564056,
0.17496244609355927,
0.06503870338201523,
-0.11546740680932999,
0.06581412255764008,
-0.0037048489321023226,
0.09423597157001495,
0.006769921630620956,
0.07677573710680008,
0.060257140547037125,
-0.06463418155908585,
-0.1279418170452118,
-0.09911580383777618,
-0.1447392702102661,
0.12554463744163513,
-0.038446974009275436,
-0.03354794532060623,
0.05066680908203125,
0.049149706959724426,
-0.03342443332076073,
0.07121216505765915,
0.0033867135643959045,
0.0324985608458519,
-0.08110033720731735,
0.035709213465452194,
0.11498904228210449,
0.030061475932598114,
-0.05849447846412659,
-0.0768941193819046,
0.2714649736881256,
-0.09326325356960297,
0.16744957864284515,
-0.05709050968289375,
-0.1914442628622055,
0.0593346543610096,
0.07632990181446075,
-0.009099330753087997,
0.08050515502691269,
0.09434574842453003,
0.021211465820670128,
0.02899475209414959,
0.2758790850639343,
-0.002961983671411872,
0.160925030708313,
-0.06717915087938309,
-0.046599291265010834,
-0.08135099709033966,
-0.06564511358737946,
0.07247022539377213,
0.31980669498443604,
0.05134417489171028,
0.017957778647542,
-0.02680676057934761,
-0.03571855276823044,
-0.04719270393252373,
0.12958204746246338,
0.16603368520736694,
-0.21176935732364655,
-0.11696814745664597,
0.028385253623127937,
0.08309301733970642,
0.09310450404882431,
0.11331529915332794,
0.003912296146154404,
0.0854126438498497,
0.03820217400789261,
-0.09359029680490494,
0.017200402915477753,
-0.06511054933071136,
0.06899745762348175,
0.06284702569246292,
-0.06777776777744293,
0.18123024702072144,
0.1685645431280136,
-0.16704966127872467,
0.03081805817782879,
-0.13519258797168732,
-0.05497464910149574,
0.1023365780711174,
0.03842731937766075,
-0.04772692918777466,
0.0751899853348732,
-0.0450560636818409,
0.029155168682336807,
-0.15665943920612335,
0.06908223778009415,
0.023407742381095886,
0.09956101328134537,
0.012346046045422554,
-0.042912837117910385,
-0.17137932777404785,
-0.0008325395174324512,
0.12459177523851395,
-0.16932043433189392,
-0.02184540033340454,
-0.2748718857765198,
0.06650268286466599,
0.03223993256688118,
-0.07568636536598206,
-0.01486503891646862,
0.044340942054986954,
0.09729359298944473,
-0.09313805401325226,
0.11007196456193924,
0.12198717147111893,
-0.13387173414230347,
-0.02025497332215309,
-0.07378663122653961,
-0.026038337498903275,
0.23328694701194763,
-0.11026296764612198,
0.057416949421167374,
-0.15134170651435852,
-0.05588208884000778,
0.13255713880062103,
0.07650847733020782,
0.21503518521785736,
0.14625610411167145,
0.005766167305409908,
0.0447276346385479,
-0.0874185785651207,
0.03913040831685066,
0.023718807846307755,
-0.04535844177007675,
0.12317667156457901,
0.03453565016388893,
-0.1506832093000412,
-0.02952093631029129,
-0.10417795181274414,
0.1559118777513504,
-0.004512550309300423,
-0.21812202036380768,
0.04214545339345932,
-0.02427905984222889,
-0.1255914568901062,
-0.01063811406493187,
-0.17574100196361542,
-0.10651394724845886,
-0.026842288672924042,
0.020590635016560555,
-0.049420882016420364,
-0.03988916054368019,
0.19126661121845245,
0.04155690595507622,
-0.025183243677020073,
-0.018340524286031723,
0.024499088525772095,
-0.16170039772987366,
-0.07132182270288467,
-0.17717066407203674,
0.06857788562774658,
-0.06368958204984665,
-0.07871522009372711,
0.061850614845752716,
-0.2394091635942459,
-0.09285503625869751,
0.08930431306362152,
0.07023567706346512,
0.01565926894545555,
-0.06462480127811432,
-0.15258179605007172,
-0.04342137649655342,
-2.8315904485990304e-32,
0.03551014885306358,
-0.017781706526875496,
-0.029520073905587196,
0.06073327362537384,
-0.02989935129880905,
-0.04858040809631348,
0.05806509405374527,
-0.1895047277212143,
0.0638771802186966,
-0.1408727765083313,
0.011303686536848545,
-0.04214335232973099,
0.03720611333847046,
0.09739843010902405,
-0.0827278345823288,
0.06723643839359283,
0.10918742418289185,
-0.09829191118478775,
-0.12551283836364746,
0.09819062054157257,
0.20522870123386383,
-0.07897400856018066,
-0.025627711787819862,
0.04939272627234459,
-0.08638519048690796,
0.1503250151872635,
-0.01686852239072323,
0.09054653346538544,
0.03832816705107689,
-0.085098996758461,
-0.056419625878334045,
0.024516861885786057,
-0.05503684654831886,
-0.0028211085591465235,
0.04530470818281174,
0.015009228140115738,
-0.18682824075222015,
0.05906182527542114,
-0.09166096150875092,
-0.03804966062307358,
0.015335987322032452,
-0.01662357896566391,
-0.043567512184381485,
-0.06317757815122604,
0.08131647855043411,
0.05515739321708679,
0.034387119114398956,
0.12646082043647766,
-0.12520048022270203,
-0.02272895537316799,
-0.02496902272105217,
0.1261422038078308,
-0.08767352253198624,
-0.03271079808473587,
0.10316497087478638,
0.04746510088443756,
0.051609765738248825,
-0.03667015954852104,
0.08188565820455551,
0.04383247718214989,
0.06134503707289696,
-0.016454508528113365,
-0.05555717274546623,
-0.023367982357740402,
0.13701027631759644,
0.05056558549404144,
0.22090217471122742,
-0.38133126497268677,
0.14440050721168518,
0.04754011705517769,
-0.021732376888394356,
-0.038235146552324295,
-0.0012359203537926078,
0.005057111848145723,
0.06828878819942474,
0.016634806990623474,
-0.03260619938373566,
-0.10885053128004074,
-0.060207292437553406,
-0.1592671275138855,
-0.13057099282741547,
-0.0941590890288353,
0.05380289629101753,
0.05960860848426819,
0.07251594215631485,
0.07157742232084274,
-0.07527314871549606,
-0.075679250061512,
0.12107180058956146,
-0.03209662064909935,
0.07269804924726486,
-0.041205864399671555,
0.07279796153306961,
0.0907897874712944,
0.03467446565628052,
-0.08306310325860977,
0.044350508600473404,
0.31400927901268005,
0.1547391265630722,
-0.10222485661506653,
0.12408338487148285,
-0.020003950223326683,
-0.06058529391884804,
-0.06982223689556122,
0.0744762048125267,
-0.10155028104782104,
-0.027017323300242424,
0.2873673439025879,
-0.1002286747097969,
0.09881163388490677,
-0.12357892841100693,
-0.031143730506300926,
0.05809231102466583,
-0.015768110752105713,
0.06407713890075684,
-0.15560221672058105,
0.06315212696790695,
0.0635734349489212,
-0.045608039945364,
0.045751139521598816,
-0.2777999937534332,
-0.13290470838546753,
-0.10185554623603821,
-0.09339464455842972,
-0.1033356562256813,
-0.06708438694477081,
0.03018663078546524,
0.029322471469640732,
0.050172608345746994,
-0.16993187367916107,
-0.04336640611290932,
-0.005851189140230417,
7.184077048805193e-7,
-0.12581607699394226,
0.0552167147397995,
0.010713259689509869,
-0.11816549301147461,
0.02283092774450779,
0.04260297864675522,
-0.08504252135753632,
0.12112095952033997,
0.128438338637352,
0.07980459928512573,
0.06154785677790642,
-0.14571793377399445,
-0.0546790286898613,
0.0693538561463356,
-0.10221860557794571,
-0.17235083878040314,
0.013863028027117252,
0.008550205267965794,
-0.12747782468795776,
0.08339884132146835,
0.2377968728542328,
0.24342843890190125,
0.06752964109182358,
0.06065759435296059,
0.0145375095307827,
-0.05364816635847092,
0.04007202386856079,
0.11608242988586426,
-0.10418348759412766,
-0.07644718140363693,
0.007256418466567993,
-0.057146865874528885,
-0.1400177925825119,
0.019388116896152496,
-0.16946257650852203,
-0.06750768423080444,
-0.06825459748506546,
0.06759289652109146,
-0.09590497612953186,
-0.026119664311408997,
-0.0950489267706871,
0.014347082935273647,
-0.03228376433253288,
0.01099205669015646,
0.04863249883055687,
-0.009116150438785553,
-0.01923390105366707,
0.07941535115242004,
-0.2201993763446808,
-0.05547943338751793,
0.0029440675862133503,
0.021681759506464005,
0.13317500054836273,
0.20068605244159698,
-0.10585314780473709,
-0.14223042130470276,
-0.012585272081196308,
-0.07571391761302948,
-0.011736282147467136,
-0.09924432635307312,
-0.059980906546115875,
0.03128219023346901,
-0.10394352674484253,
0.08263504505157471,
0.11661367118358612,
0.017647748813033104,
-0.08120407164096832,
5.637896477481129e-35,
0.08111386001110077,
0.010550799779593945,
0.2080695778131485,
-0.09487757086753845,
-0.16419509053230286,
0.03763213008642197,
-0.03766458481550217,
0.011590033769607544,
0.02896219864487648,
-0.03431827202439308,
-0.12358075380325317
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | > storing video data as anything but .mp4
What I mean by storing as `datasets.Value("binary")` is embedding raw MP4 bytes in the Arrow table, but, indeed, this would waste a lot of space if there are duplicates.
So I see two options:
* if one video is not mapped to too many samples, you can embed the video bytes and do "group by" on the rest of the columns (this would turn them into lists) to avoid duplicating them (then, it should be easy to define a `map` in the README that samples the video data to "unpack" the samples)
* you can create a dataset script that downloads the video files and embeds their file paths into the Arrow file
Also, I misread MP4 as MP3. We need to add a `Video` feature to the `datasets` lib to support MP4 files in the viewer (a bit trickier to implement than the `Image` feature due to the Arrow limitations). | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 159 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
> storing video data as anything but .mp4
What I mean by storing as `datasets.Value("binary")` is embedding raw MP4 bytes in the Arrow table, but, indeed, this would waste a lot of space if there are duplicates.
So I see two options:
* if one video is not mapped to too many samples, you can embed the video bytes and do "group by" on the rest of the columns (this would turn them into lists) to avoid duplicating them (then, it should be easy to define a `map` in the README that samples the video data to "unpack" the samples)
* you can create a dataset script that downloads the video files and embeds their file paths into the Arrow file
Also, I misread MP4 as MP3. We need to add a `Video` feature to the `datasets` lib to support MP4 files in the viewer (a bit trickier to implement than the `Image` feature due to the Arrow limitations). | [
-0.11960886418819427,
0.19533702731132507,
-0.029645593836903572,
-0.117351233959198,
0.102962426841259,
0.04880352318286896,
0.13501691818237305,
0.16883237659931183,
-0.034136973321437836,
-0.02525423839688301,
-0.017957597970962524,
0.02727300301194191,
-0.1892063468694687,
0.2074384242296219,
0.14063118398189545,
-0.2128124237060547,
-0.08290619403123856,
0.11787541210651398,
-0.008883951231837273,
0.058177120983600616,
0.12034738808870316,
-0.05301392823457718,
0.14528614282608032,
-0.16219358146190643,
-0.17157232761383057,
-0.00036379179800860584,
-0.13367696106433868,
0.08707460016012192,
0.16054017841815948,
-0.18550391495227814,
-0.14632578194141388,
0.09160137176513672,
0.2448190152645111,
0.33940616250038147,
0.0000055530995268782135,
-0.006228296551853418,
0.026937542483210564,
0.005365222226828337,
0.014159095473587513,
0.0685785636305809,
0.12278018146753311,
-0.07814811170101166,
-0.08962494879961014,
0.019888482987880707,
0.10887551307678223,
-0.1138792634010315,
0.2090371996164322,
-0.219588965177536,
0.2140648514032364,
-0.17788127064704895,
-0.019003689289093018,
0.007993820123374462,
-0.09841606020927429,
-0.02746223844587803,
0.01865055225789547,
0.27876585721969604,
-0.08067761361598969,
0.15064483880996704,
0.14685724675655365,
0.06838566809892654,
-0.06966696679592133,
0.009714115411043167,
0.10610073059797287,
-0.108493871986866,
0.2640744745731354,
0.10485412180423737,
-0.22535941004753113,
-0.11353739351034164,
-0.024249091744422913,
0.14146997034549713,
-0.07500388473272324,
-0.13484516739845276,
-0.09652890264987946,
0.01410686131566763,
0.007732326630502939,
-0.02930525504052639,
-0.1499944031238556,
0.07633572071790695,
-0.046750862151384354,
0.09409106522798538,
-0.17969916760921478,
-0.016179202124476433,
-0.0788799449801445,
-0.19220802187919617,
-0.09072082489728928,
-0.10072589665651321,
-0.019977334886789322,
0.011442480608820915,
0.01797293685376644,
-0.11287560313940048,
0.04393181577324867,
0.006600407883524895,
0.07589715719223022,
0.08744001388549805,
0.030188078060746193,
-0.07198521494865417,
-0.0721340924501419,
0.020204253494739532,
0.03363629803061485,
-0.09821212291717529,
0.18728603422641754,
0.21138812601566315,
-0.2707808315753937,
0.13949084281921387,
-0.01634221337735653,
-0.05676809325814247,
-0.0641343891620636,
-0.188206747174263,
0.1958663910627365,
0.10326308757066727,
-0.01426689513027668,
0.0463714599609375,
-0.09855075925588608,
-0.02772360108792782,
-0.11070109158754349,
-0.01994750089943409,
-0.04403839632868767,
0.19258160889148712,
-0.10075144469738007,
0.09192747622728348,
0.010064254514873028,
0.04234147444367409,
0.004499427042901516,
0.13561353087425232,
0.00197146600112319,
0.022764744237065315,
-0.16625678539276123,
-0.0688941702246666,
0.01037802454084158,
-0.021471627056598663,
0.021352579817175865,
-0.004275190178304911,
0.1367620974779129,
0.01096632331609726,
0.17066209018230438,
-0.10834237933158875,
0.07766879349946976,
-0.061885617673397064,
0.1493603140115738,
0.10362347960472107,
0.06905421614646912,
0.059648413211107254,
-0.024745099246501923,
-0.06900780647993088,
0.032882142812013626,
0.049161359667778015,
0.05144837126135826,
0.05631142109632492,
-0.1757032424211502,
0.11160996556282043,
0.18795788288116455,
0.17436982691287994,
-0.07719402015209198,
0.1286178082227707,
0.09203791618347168,
0.014662526547908783,
-0.16727188229560852,
-0.10658115148544312,
-0.34780097007751465,
-0.05111079663038254,
-0.003847548272460699,
-0.0214151032269001,
0.018001796677708626,
0.026153061538934708,
0.020343070849776268,
0.12833519279956818,
0.05187663808465004,
0.12153017520904541,
0.060483526438474655,
0.17665158212184906,
-0.04424943029880524,
-0.08237951993942261,
-0.04038789123296738,
-0.06951219588518143,
0.015194510109722614,
0.2481907606124878,
-0.011624174192547798,
-0.16771595180034637,
-0.017231492325663567,
0.021276140585541725,
0.032117605209350586,
-0.08924848586320877,
0.07181517034769058,
0.31685909628868103,
0.296711266040802,
-0.0730537623167038,
0.09571117907762527,
0.3103640079498291,
-0.0774090513586998,
0.048220835626125336,
-0.08716700226068497,
-0.013313708826899529,
0.004686116240918636,
0.17519661784172058,
-0.07232964783906937,
-0.2012292742729187,
0.09390837699174881,
-0.18370257318019867,
0.060072459280490875,
-0.1886012852191925,
0.04040028154850006,
-0.031546611338853836,
-0.06593037396669388,
-0.09339667111635208,
-0.11602520942687988,
-0.09708662331104279,
-0.15167227387428284,
-0.03310735523700714,
0.2209327071905136,
-0.19399312138557434,
0.06906282156705856,
-0.04648643732070923,
-0.21221159398555756,
-0.19623742997646332,
0.054219603538513184,
-0.049694355577230453,
-0.08019106835126877,
0.0426182858645916,
-0.18034009635448456,
0.1551409810781479,
-0.08001349866390228,
0.153900608420372,
0.18746908009052277,
0.02994607388973236,
0.10904041677713394,
0.06461023539304733,
0.13273270428180695,
0.07352213561534882,
0.14136359095573425,
0.011701666750013828,
-0.005986179690808058,
-0.08755616098642349,
0.14787335693836212,
0.07525978982448578,
-0.037686217576265335,
0.10232315212488174,
0.3207976222038269,
0.0741584524512291,
0.13393253087997437,
-0.012305904179811478,
-0.16907304525375366,
-0.06848407536745071,
-0.04070787876844406,
-0.01659182831645012,
0.0028942555654793978,
0.1100713461637497,
-0.05850823596119881,
-0.15612466633319855,
0.14491930603981018,
0.0063774241134524345,
0.16213609278202057,
-0.01593800261616707,
0.0318414680659771,
0.13179008662700653,
0.053476035594940186,
-0.13178306818008423,
0.034539319574832916,
0.05791060999035835,
0.03113914467394352,
-0.0646793395280838,
0.20967800915241241,
-0.05496538430452347,
-0.03695420175790787,
0.04585104435682297,
-0.021415721625089645,
-0.0779733955860138,
0.09163884073495865,
-0.07794009149074554,
0.017104173079133034,
0.19442985951900482,
0.08918529748916626,
-0.0755249559879303,
0.03315276652574539,
-0.03965285047888756,
-0.06202249974012375,
-0.23166020214557648,
-0.1070883646607399,
0.06273547559976578,
0.03180163726210594,
0.030976207926869392,
-0.06979796290397644,
0.09878521412611008,
0.04700419679284096,
-0.0654139518737793,
0.008032242767512798,
-0.10642697662115097,
-0.10045699775218964,
-0.03589645028114319,
0.07410671561956406,
-0.18344774842262268,
0.022960538044571877,
-0.045290835201740265,
0.15594777464866638,
-0.008747081272304058,
0.05211315304040909,
-0.059810515493154526,
-0.011124733835458755,
0.03065541759133339,
-0.06968773901462555,
-0.08361173421144485,
-0.014552945271134377,
0.026372432708740234,
0.17984306812286377,
0.15027262270450592,
0.05874472111463547,
0.05399617552757263,
0.14807948470115662,
0.1448613703250885,
-0.024286553263664246,
-0.2850160300731659,
-0.09754355251789093,
0.04334183409810066,
-0.04148982837796211,
0.06641150265932083,
0.0790577307343483,
0.07529553025960922,
-0.02990814857184887,
-0.08493820577859879,
-0.031108127906918526,
-0.06299807131290436,
0.028099680319428444,
0.006134455557912588,
0.1313380002975464,
0.017916008830070496,
-0.08127959072589874,
0.3310542404651642,
-0.08599340170621872,
-0.17386606335639954,
0.18873588740825653,
-0.03360278159379959,
-0.0820070132613182,
-0.059927623718976974,
-0.03843146190047264,
0.0217303279787302,
0.052608948200941086,
-0.013921737670898438,
-0.05240227282047272,
-0.13778053224086761,
0.07645011693239212,
-0.16865286231040955,
0.0021614825818687677,
-0.049066074192523956,
0.06252922117710114,
0.0164862759411335,
0.09292055666446686,
-0.18938079476356506,
-0.09307324886322021,
-0.09831149131059647,
0.04781627282500267,
0.11074667423963547,
-0.14964626729488373,
0.060244835913181305,
0.041989829391241074,
-0.053365468978881836,
0.10599657148122787,
-0.015598636120557785,
-0.3516913056373596,
0.13067680597305298,
-0.22834937274456024,
0.044355764985084534,
-0.08235535770654678,
0.1093413233757019,
-0.0018904944881796837,
-0.1251283437013626,
-0.1623333841562271,
0.07211523503065109,
0.18430303037166595,
0.012928594835102558,
-0.13337720930576324,
-0.0806996077299118,
-0.006136672105640173,
-0.22946365177631378,
0.06955446302890778,
-0.009455131366848946,
0.02444772981107235,
0.09109262377023697,
0.07224372774362564,
-0.034071408212184906,
0.12123139947652817,
0.03956824913620949,
0.12178855389356613,
-0.1102810949087143,
-0.09628552943468094,
-0.1828988492488861,
-0.13103033602237701,
-0.09047039598226547,
-0.17047421634197235,
0.026035955175757408,
0.010589373297989368,
0.2981303930282593,
-0.026519926264882088,
0.13820317387580872,
0.1613204926252365,
-0.16091789305210114,
0.15621346235275269,
0.0662611722946167,
-0.08052767068147659,
0.04965437948703766,
0.012884979136288166,
0.08951487392187119,
-0.0014670573873445392,
0.06879531592130661,
0.06357630342245102,
-0.05247863382101059,
-0.11726262420415878,
-0.07645173370838165,
-0.15759366750717163,
0.13355478644371033,
-0.025945039466023445,
-0.02181433141231537,
0.034814998507499695,
0.03526030853390694,
-0.08266010880470276,
0.01615891605615616,
-0.003459715750068426,
0.007036770693957806,
-0.07773926109075546,
0.03084780089557171,
0.09964826703071594,
0.03488403558731079,
-0.06784477084875107,
-0.09690579026937485,
0.2713710367679596,
-0.1296047866344452,
0.16266600787639618,
-0.07518728822469711,
-0.18907469511032104,
0.03805448114871979,
0.10535527020692825,
-0.003980932291597128,
0.10863400250673294,
0.13318876922130585,
0.04079693555831909,
0.0018096532439813018,
0.2874894440174103,
-0.04908634349703789,
0.1698594093322754,
-0.07877757400274277,
-0.04976098984479904,
-0.059232987463474274,
-0.07892461121082306,
0.11084453761577606,
0.33057254552841187,
0.026181485503911972,
0.022330332547426224,
-0.03154097497463226,
-0.07927734404802322,
-0.050015565007925034,
0.09041771292686462,
0.16399647295475006,
-0.21253295242786407,
-0.09789234399795532,
0.031744372099637985,
0.08741876482963562,
0.0877121090888977,
0.09075167030096054,
0.007706024684011936,
0.09435311704874039,
0.021117351949214935,
-0.06674375385046005,
0.012157672084867954,
-0.05896115303039551,
0.03182712569832802,
0.0698557049036026,
-0.07601512968540192,
0.15217290818691254,
0.14687147736549377,
-0.16034144163131714,
0.0354456901550293,
-0.17980219423770905,
-0.05830203741788864,
0.0821516215801239,
0.008276287466287613,
-0.021383434534072876,
0.08830368518829346,
-0.05355888605117798,
0.023154808208346367,
-0.14860139787197113,
0.08560659736394882,
0.008633323945105076,
0.09823331236839294,
0.03858758881688118,
-0.051757581532001495,
-0.1782248616218567,
0.029327213764190674,
0.1197909563779831,
-0.20464254915714264,
-0.045104362070560455,
-0.25155025720596313,
0.01367674395442009,
-0.003137481864541769,
-0.09457557648420334,
-0.03863419219851494,
0.045021168887615204,
0.10661299526691437,
-0.12982386350631714,
0.10026364773511887,
0.14901262521743774,
-0.133249893784523,
-0.030480418354272842,
-0.09413743019104004,
-0.04622116684913635,
0.20780490338802338,
-0.11223261058330536,
0.0662989467382431,
-0.13154028356075287,
-0.06810250878334045,
0.07426833361387253,
0.08763252198696136,
0.16009162366390228,
0.12406779825687408,
0.04047561436891556,
0.015024452470242977,
-0.09669110178947449,
0.08243700116872787,
-0.013490540906786919,
-0.054135117679834366,
0.1008005142211914,
0.05658770725131035,
-0.154844731092453,
-0.02259267307817936,
-0.08459904789924622,
0.11328628659248352,
-0.025214126333594322,
-0.18291214108467102,
0.05236193537712097,
-0.03437398374080658,
-0.14529024064540863,
-0.030970962718129158,
-0.17810098826885223,
-0.09200307726860046,
-0.06947299093008041,
0.022983217611908913,
-0.06345238536596298,
-0.044190797954797745,
0.23597611486911774,
0.06007741019129753,
-0.04440043494105339,
-0.023689471185207367,
-0.011833748780190945,
-0.18478256464004517,
-0.041691724210977554,
-0.18904994428157806,
0.049384456127882004,
-0.05407780781388283,
-0.07137902826070786,
0.055539119988679886,
-0.2337738275527954,
-0.05511770024895668,
0.06360030919313431,
0.06945639848709106,
0.000897685531526804,
-0.1314854621887207,
-0.148649662733078,
-0.029434315860271454,
-2.8709171998529654e-32,
0.036097366362810135,
-0.022991914302110672,
-0.03778340667486191,
0.0393904373049736,
-0.006096471566706896,
-0.05184078589081764,
0.038506053388118744,
-0.22287072241306305,
0.061934586614370346,
-0.1557478904724121,
0.01821964606642723,
-0.0050467317923903465,
0.04314590245485306,
0.09036173671483994,
-0.05396124720573425,
0.052749764174222946,
0.12125208973884583,
-0.0904768854379654,
-0.13515299558639526,
0.06767716258764267,
0.20316721498966217,
-0.10169024765491486,
-0.032417234033346176,
0.05419999733567238,
-0.08797220140695572,
0.154542937874794,
-0.03162016347050667,
0.08130179345607758,
0.0663955956697464,
-0.0815865769982338,
-0.059986673295497894,
0.02566642127931118,
-0.073328897356987,
0.02494346722960472,
0.04495970532298088,
-0.020633254200220108,
-0.1722005307674408,
0.039832714945077896,
-0.0831170305609703,
-0.017112378031015396,
0.054144617170095444,
0.008706885389983654,
-0.06552582234144211,
-0.07816634327173233,
0.08448535203933716,
0.022706259042024612,
0.0027729382272809744,
0.14820316433906555,
-0.12519389390945435,
-0.006151646375656128,
-0.014368703588843346,
0.12071705609560013,
-0.04513484612107277,
-0.002985074184834957,
0.12260204553604126,
0.03277589753270149,
0.0797879695892334,
-0.03727398440241814,
0.037897173315286636,
0.05983119457960129,
0.024693120270967484,
-0.03441177308559418,
-0.033776961266994476,
-0.033967096358537674,
0.16530770063400269,
0.06405239552259445,
0.20683912932872772,
-0.36120688915252686,
0.1115049198269844,
0.07701724022626877,
-0.006427508778870106,
-0.02441343665122986,
0.051913000643253326,
0.008541076444089413,
0.05579737201333046,
0.03151706978678703,
-0.04140818119049072,
-0.05967427417635918,
-0.08379467576742172,
-0.145717054605484,
-0.13881084322929382,
-0.0507052019238472,
0.02387033775448799,
0.0522807277739048,
0.07295750081539154,
0.09290725737810135,
-0.05257875844836235,
-0.08601387590169907,
0.11174355447292328,
-0.06818299740552902,
0.03281969204545021,
-0.009178323671221733,
0.06841481477022171,
0.10583922266960144,
0.020043713971972466,
-0.05914654582738876,
0.05348687246441841,
0.3517163097858429,
0.15177375078201294,
-0.09399683028459549,
0.10553242266178131,
-0.01250404305756092,
-0.04031660780310631,
-0.06260556727647781,
0.07367810606956482,
-0.07374799996614456,
-0.042670104652643204,
0.312359094619751,
-0.12261415272951126,
0.08356048166751862,
-0.08187147229909897,
-0.0819711685180664,
0.04525803029537201,
-0.055338695645332336,
0.037539031356573105,
-0.14082524180412292,
0.0622999332845211,
0.06051691249012947,
-0.02879626676440239,
0.04282442852854729,
-0.23029883205890656,
-0.12811854481697083,
-0.1117674931883812,
-0.07397264987230301,
-0.06870605796575546,
-0.06960359215736389,
0.02909679152071476,
-0.019798357039690018,
0.08403418213129044,
-0.16152958571910858,
-0.029222531244158745,
-0.03549225628376007,
7.13661222562223e-7,
-0.1093965470790863,
0.08040633052587509,
-0.011517468839883804,
-0.11805763095617294,
-0.020565472543239594,
0.06986062973737717,
-0.0683622732758522,
0.12002622336149216,
0.12304782122373581,
0.0678091049194336,
0.06333547085523605,
-0.13287527859210968,
-0.03968965262174606,
0.08351504802703857,
-0.026605580002069473,
-0.21325016021728516,
0.02169911377131939,
0.005351197440177202,
-0.14572496712207794,
0.0841064527630806,
0.23944899439811707,
0.24736890196800232,
0.04099636524915695,
0.06554922461509705,
0.036718305200338364,
-0.02585129626095295,
0.05656636878848076,
0.0887318029999733,
-0.0886092558503151,
-0.08140444755554199,
0.0025065552908927202,
-0.06076036021113396,
-0.16998626291751862,
0.006585906725376844,
-0.2035651057958603,
-0.05841526389122009,
-0.08330324292182922,
0.04367388039827347,
-0.10523305088281631,
-0.0030476038809865713,
-0.0862131416797638,
0.00195637671276927,
-0.0018121425528079271,
-0.0273953415453434,
0.0687413215637207,
-0.015597818419337273,
-0.060455046594142914,
0.07668165862560272,
-0.2030266970396042,
-0.025409087538719177,
0.0012296070344746113,
0.025168245658278465,
0.10801692306995392,
0.19788053631782532,
-0.1178412213921547,
-0.13081222772598267,
0.00803364161401987,
-0.10369934886693954,
-0.026970311999320984,
-0.07395408302545547,
-0.03456214442849159,
0.042133089154958725,
-0.12128366529941559,
0.10380300134420395,
0.15067218244075775,
-0.007625382859259844,
-0.10403549671173096,
8.717726688918432e-35,
0.038617175072431564,
-0.008689789101481438,
0.22079670429229736,
-0.09277091920375824,
-0.1524028331041336,
0.02976163476705551,
-0.038826458156108856,
0.03224822133779526,
0.05468633770942688,
-0.03155141323804855,
-0.10876216739416122
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | @mariosasko Right. If I want my dataset to be streamable, what are the necessary requirements to achieve that within the context of .mp4 binaries like we have here? I guess your second point here would not support that right? | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 39 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
@mariosasko Right. If I want my dataset to be streamable, what are the necessary requirements to achieve that within the context of .mp4 binaries like we have here? I guess your second point here would not support that right? | [
-0.11422275006771088,
0.17057853937149048,
0.003980900626629591,
-0.11582068353891373,
0.09958506375551224,
0.02900085598230362,
0.10936015844345093,
0.11656522750854492,
-0.04126657918095589,
0.030953040346503258,
0.014072490856051445,
0.027135362848639488,
-0.10797864198684692,
0.2116975635290146,
0.13780319690704346,
-0.2567393183708191,
-0.1047053411602974,
0.11440657079219818,
0.0004632349591702223,
0.021244920790195465,
0.15837983787059784,
-0.028765644878149033,
0.07669687271118164,
-0.16738323867321014,
-0.18276450037956238,
-0.05250563099980354,
-0.11270623654127121,
0.13762378692626953,
0.10137603431940079,
-0.1667516976594925,
-0.11960151791572571,
0.08275552839040756,
0.2607961893081665,
0.3412172794342041,
0.000005565149876929354,
-0.03748978674411774,
0.026466771960258484,
0.015773870050907135,
0.019245395436882973,
0.05664068087935448,
0.11314902454614639,
-0.1002577543258667,
-0.09284111112356186,
0.015511390753090382,
0.1319372057914734,
-0.06278514862060547,
0.20369894802570343,
-0.17046159505844116,
0.2595992088317871,
-0.15019752085208893,
-0.007716448977589607,
0.006067258771508932,
-0.07102217525243759,
-0.05644594505429268,
-0.021200399845838547,
0.2647031247615814,
-0.05746443197131157,
0.14141716063022614,
0.16098959743976593,
0.06848489493131638,
-0.08183596283197403,
-0.0015165562508627772,
0.08007854223251343,
-0.0809454396367073,
0.23117542266845703,
0.07836220413446426,
-0.2227703183889389,
-0.1630638986825943,
-0.03191179782152176,
0.16454654932022095,
-0.04241134598851204,
-0.1313784122467041,
-0.1193186417222023,
0.010029802098870277,
0.009126788005232811,
0.016498224809765816,
-0.14916330575942993,
0.008409164845943451,
-0.073961041867733,
0.09982277452945709,
-0.20150509476661682,
-0.0074903531931340694,
-0.08194659650325775,
-0.20997992157936096,
-0.0806206613779068,
-0.09505483508110046,
-0.01349626760929823,
-0.008999841287732124,
-0.03175493702292442,
-0.08491894602775574,
0.06718944758176804,
-0.005816532764583826,
0.09575863182544708,
0.07889536023139954,
0.025399835780262947,
-0.06877920776605606,
-0.08446642756462097,
0.05595703423023224,
0.015355332754552364,
-0.0623355433344841,
0.147161602973938,
0.20214402675628662,
-0.2715752124786377,
0.14121633768081665,
0.0013184541603550315,
-0.021690625697374344,
-0.050258468836545944,
-0.2739682197570801,
0.20106925070285797,
0.10742853581905365,
0.0038499257061630487,
0.03434264659881592,
-0.10983550548553467,
-0.010976720601320267,
-0.15059253573417664,
-0.04755092039704323,
-0.05663469061255455,
0.1432645320892334,
-0.04440594092011452,
0.0735633373260498,
0.02305377647280693,
0.035680562257766724,
-0.027081234380602837,
0.12797307968139648,
-0.0043899971060454845,
0.02656450867652893,
-0.16610439121723175,
-0.049179546535015106,
-0.005392427556216717,
-0.0701485425233841,
0.017751766368746758,
-0.05067858099937439,
0.08188570290803909,
0.0004364317865110934,
0.1283709704875946,
-0.2027893215417862,
0.08006417751312256,
-0.053719062358140945,
0.148324117064476,
0.14815005660057068,
0.10603343695402145,
0.03253897652029991,
-0.10246448218822479,
-0.06680991500616074,
0.021083379164338112,
0.02397031895816326,
0.08401058614253998,
0.03983886539936066,
-0.14902277290821075,
0.057172976434230804,
0.23801350593566895,
0.14723412692546844,
-0.059557653963565826,
0.125599205493927,
0.07261582463979721,
-0.009209497831761837,
-0.17098373174667358,
-0.11108973622322083,
-0.40838155150413513,
-0.03255241736769676,
0.004818245302885771,
-0.02035546489059925,
0.05342443659901619,
0.047383807599544525,
0.036848366260528564,
0.17685602605342865,
0.10394135862588882,
0.11935732513666153,
0.02930225245654583,
0.19829151034355164,
0.00787911657243967,
-0.06317921727895737,
-0.02219177782535553,
-0.040635429322719574,
0.030263986438512802,
0.26222464442253113,
0.013949592597782612,
-0.22841787338256836,
-0.035730503499507904,
0.05588490888476372,
0.03425164520740509,
-0.08194010704755783,
0.06628969311714172,
0.2667618691921234,
0.27578428387641907,
-0.0676926001906395,
0.08211706578731537,
0.30952587723731995,
-0.07395651191473007,
0.05603547394275665,
-0.10017604380846024,
-0.028025539591908455,
-0.02146877907216549,
0.20183682441711426,
-0.022184154018759727,
-0.1791675090789795,
0.14236901700496674,
-0.20308279991149902,
0.029207617044448853,
-0.16998600959777832,
0.039076995104551315,
-0.04286574199795723,
-0.04118601977825165,
-0.060597170144319534,
-0.11261444538831711,
-0.10904203355312347,
-0.1714523881673813,
-0.037921544164419174,
0.24552996456623077,
-0.1931464821100235,
0.11507337540388107,
-0.032117538154125214,
-0.20059339702129364,
-0.1414591521024704,
0.08515565097332001,
-0.05291862413287163,
-0.07731661945581436,
0.03747422620654106,
-0.16141149401664734,
0.19862864911556244,
-0.13543805480003357,
0.20718514919281006,
0.1911620795726776,
0.058498505502939224,
0.0803905725479126,
0.05670725926756859,
0.11517351120710373,
0.08885309100151062,
0.15324586629867554,
0.012121638283133507,
0.016130199655890465,
-0.06750345975160599,
0.14396177232265472,
0.09146244823932648,
-0.01395503431558609,
0.12697304785251617,
0.3452869951725006,
0.10091035068035126,
0.11712533980607986,
-0.026897035539150238,
-0.15250203013420105,
-0.08529157936573029,
-0.04683555290102959,
-0.000435097812442109,
-0.019121143966913223,
0.05317699909210205,
-0.07908444851636887,
-0.15226022899150848,
0.17186367511749268,
0.0062219733372330666,
0.17853735387325287,
-0.021802512928843498,
0.029376601800322533,
0.1376454383134842,
0.09378805011510849,
-0.12149959057569504,
0.06748606264591217,
0.05587930604815483,
0.00773813109844923,
-0.11697076261043549,
0.19229228794574738,
-0.055403973907232285,
-0.026741620153188705,
0.04665829613804817,
-0.05517294257879257,
-0.11357869952917099,
0.09447740018367767,
-0.034393079578876495,
0.03401441499590874,
0.1757543683052063,
0.10856445133686066,
-0.048700880259275436,
0.06125868856906891,
-0.0870218575000763,
-0.05956782400608063,
-0.16888894140720367,
-0.12378045171499252,
0.08522110432386398,
0.034784335643053055,
0.019737567752599716,
-0.06582465022802353,
0.08989682048559189,
0.0453447587788105,
-0.07715409994125366,
0.028331642970442772,
-0.07652238756418228,
-0.06074509397149086,
-0.03880496695637703,
0.05033091828227043,
-0.1702548861503601,
0.013502305373549461,
-0.03305767849087715,
0.12858502566814423,
0.016373325139284134,
0.07884114980697632,
-0.019059203565120697,
-0.0209452323615551,
0.07350257784128189,
-0.05750875547528267,
-0.09438445419073105,
-0.03506333380937576,
0.027038242667913437,
0.1778762936592102,
0.13674570620059967,
0.052367404103279114,
0.0602656714618206,
0.09709778428077698,
0.12910118699073792,
-0.025030408054590225,
-0.2592334747314453,
-0.05800170451402664,
0.028287125751376152,
0.012925033457577229,
0.09742988646030426,
0.0615173764526844,
0.02728894352912903,
0.0006054342957213521,
-0.05843977630138397,
-0.047919683158397675,
-0.05787508189678192,
0.011957558803260326,
-0.006745144259184599,
0.12072790414094925,
-0.012917686253786087,
-0.10730867832899094,
0.346548467874527,
-0.08392494916915894,
-0.16727522015571594,
0.18781888484954834,
-0.061868902295827866,
-0.11067315191030502,
-0.025170354172587395,
-0.04938279837369919,
0.08197593688964844,
0.08181118220090866,
-0.01951170340180397,
-0.07036248594522476,
-0.15536972880363464,
0.03265363350510597,
-0.16892090439796448,
-0.0042213923297822475,
-0.061536580324172974,
0.08365374058485031,
0.042401183396577835,
0.0869579091668129,
-0.23177655041217804,
-0.09026393294334412,
-0.11458978801965714,
0.04351215809583664,
0.10262514650821686,
-0.13001106679439545,
0.06992679089307785,
0.01663413643836975,
-0.053279221057891846,
0.07395654916763306,
-0.01882455311715603,
-0.3656492829322815,
0.1622372269630432,
-0.2458510398864746,
0.046520303934812546,
-0.09226081520318985,
0.10767533630132675,
0.01315056812018156,
-0.1443544328212738,
-0.13494983315467834,
0.09093429893255234,
0.1966608613729477,
0.028983306139707565,
-0.14697575569152832,
-0.07482148706912994,
0.05895764380693436,
-0.26481345295906067,
0.06642424315214157,
-0.04291900619864464,
0.01599782332777977,
0.12305587530136108,
0.05103347450494766,
-0.026510613039135933,
0.11543025821447372,
0.06506406515836716,
0.14063914120197296,
-0.10080018639564514,
-0.07556077837944031,
-0.17473655939102173,
-0.11356441676616669,
-0.08850317448377609,
-0.18662850558757782,
0.040652792900800705,
0.05451231077313423,
0.2922765910625458,
-0.01850057765841484,
0.1074187383055687,
0.148373544216156,
-0.16042156517505646,
0.20570653676986694,
0.05327508971095085,
-0.11216297745704651,
0.060282085090875626,
-0.00428567361086607,
0.0949346274137497,
0.01632099226117134,
0.018171286210417747,
0.03989540785551071,
-0.025561939924955368,
-0.11000479757785797,
-0.0980750173330307,
-0.1482069343328476,
0.12108735740184784,
-0.05427119880914688,
-0.03400738164782524,
0.04964737966656685,
-0.0026271920651197433,
-0.04954906925559044,
0.05851852521300316,
-0.04191272333264351,
0.005541719496250153,
-0.083246611058712,
0.007141764275729656,
0.09982918947935104,
0.028162484988570213,
-0.023170292377471924,
-0.08410406857728958,
0.2541871964931488,
-0.11477341502904892,
0.1480032503604889,
-0.032434385269880295,
-0.18965595960617065,
0.05160818248987198,
0.09977548569440842,
-0.028696002438664436,
0.09358980506658554,
0.06853583455085754,
0.012567208148539066,
0.05467475950717926,
0.2720601260662079,
-0.03260061517357826,
0.1317867934703827,
-0.04473993927240372,
-0.051861848682165146,
-0.11533708870410919,
-0.04572579637169838,
0.07502108067274094,
0.3033381998538971,
0.028461072593927383,
-0.0017840549116954207,
-0.028462400659918785,
-0.043758898973464966,
0.002870123600587249,
0.11467404663562775,
0.17167870700359344,
-0.19823147356510162,
-0.11944282799959183,
0.049670588225126266,
0.053673580288887024,
0.06399723887443542,
0.0936398059129715,
0.014383088797330856,
0.06352849304676056,
0.06508859246969223,
-0.09923607856035233,
-0.0047540804371237755,
-0.05742458999156952,
0.04514175280928612,
0.019598491489887238,
-0.08565515279769897,
0.11361955106258392,
0.1723271906375885,
-0.16035102307796478,
0.018227336928248405,
-0.12370581924915314,
-0.05181503668427467,
0.09850537776947021,
0.00954920519143343,
-0.018743233755230904,
0.06473129987716675,
-0.03527146577835083,
-0.0060222879983484745,
-0.1326877772808075,
0.07681640982627869,
0.028305459767580032,
0.12828896939754486,
0.0001169014212791808,
-0.050364550203084946,
-0.1868916004896164,
0.0030957278795540333,
0.11223218590021133,
-0.1596020609140396,
-0.060077499598264694,
-0.26241493225097656,
0.034062061458826065,
0.021672619506716728,
-0.08914420008659363,
-0.006107049528509378,
0.02881179191172123,
0.1038798913359642,
-0.10835561156272888,
0.08086329698562622,
0.15206435322761536,
-0.10746954381465912,
-0.04045988991856575,
-0.07083974033594131,
-0.03261591121554375,
0.22179076075553894,
-0.08129820227622986,
0.0334557481110096,
-0.12470491230487823,
-0.058847714215517044,
0.09555039554834366,
0.03748607635498047,
0.2021704763174057,
0.16141244769096375,
0.039837367832660675,
0.0030565690249204636,
-0.043114110827445984,
0.06282529979944229,
0.029877744615077972,
-0.04382074251770973,
0.12454310804605484,
0.051726870238780975,
-0.1428653746843338,
-0.02487439475953579,
-0.12014105170965195,
0.1254451423883438,
0.022411834448575974,
-0.1870068460702896,
0.03793341666460037,
-0.022612057626247406,
-0.1200423538684845,
-0.04573524743318558,
-0.18170642852783203,
-0.1517433077096939,
-0.06818439811468124,
0.0675385370850563,
-0.06994743645191193,
-0.031171750277280807,
0.16995389759540558,
0.04280884191393852,
0.016574997454881668,
-0.028855515643954277,
0.0020058718509972095,
-0.17140136659145355,
-0.02297830767929554,
-0.19958098232746124,
0.042548395693302155,
-0.07029175758361816,
-0.06627409160137177,
0.018184706568717957,
-0.20315194129943848,
-0.061146169900894165,
0.07857035100460052,
0.06927110999822617,
0.004992673173546791,
-0.11488036066293716,
-0.11786935478448868,
-0.0019140919903293252,
-2.8632006671869925e-32,
0.041600510478019714,
-0.0009676503832451999,
-0.005743508227169514,
0.06253143399953842,
-0.024089768528938293,
-0.0037827116902917624,
0.05806175246834755,
-0.21225018799304962,
0.03519635275006294,
-0.14748695492744446,
0.018927382305264473,
0.006762230768799782,
0.034666262567043304,
0.10317184031009674,
-0.1379440575838089,
0.07157237082719803,
0.08858630806207657,
-0.10891584306955338,
-0.14178118109703064,
0.08383005857467651,
0.21889324486255646,
-0.10878229141235352,
-0.0640396699309349,
0.08936595171689987,
-0.05668723210692406,
0.11792784184217453,
-0.04785522073507309,
0.10878678411245346,
0.005720323417335749,
-0.1109788566827774,
-0.08276043832302094,
0.01628371886909008,
-0.050962451845407486,
0.0075422921217978,
0.014159517362713814,
0.05482931807637215,
-0.1746888905763626,
0.05939389020204544,
-0.08313722908496857,
-0.009052926674485207,
-0.021132605150341988,
0.017965814098715782,
-0.012936819344758987,
-0.039786431938409805,
0.055576141923666,
0.034896425902843475,
-0.029537536203861237,
0.12908941507339478,
-0.14248862862586975,
0.02047553099691868,
-0.03393595665693283,
0.14558175206184387,
-0.06513362377882004,
-0.03681590035557747,
0.11981207132339478,
0.03942526504397392,
0.04187474399805069,
0.008931823074817657,
0.093803770840168,
0.03841908648610115,
0.015593532472848892,
-0.032333604991436005,
-0.07361707836389542,
-0.055710047483444214,
0.1422671526670456,
0.01851939596235752,
0.2087581604719162,
-0.36131012439727783,
0.11385659873485565,
0.10561748594045639,
-0.02880493551492691,
-0.021955782547593117,
0.039616215974092484,
-0.018130645155906677,
0.015654796734452248,
0.020810788497328758,
0.0032897042110562325,
-0.09401835501194,
-0.07901402562856674,
-0.1595441997051239,
-0.12942470610141754,
-0.09412650763988495,
-0.004447006620466709,
0.04947350174188614,
0.06507382541894913,
0.09230989962816238,
-0.09769384562969208,
-0.04595772176980972,
0.12280876189470291,
-0.058193840086460114,
0.08841125667095184,
-0.030848411843180656,
0.022755831480026245,
0.08911046385765076,
0.03204530477523804,
-0.09474200755357742,
0.06961369514465332,
0.30321672558784485,
0.16154351830482483,
-0.07119008153676987,
0.10493993759155273,
0.03278918191790581,
-0.06330050528049469,
-0.05654763802886009,
0.06435412168502808,
-0.10847270488739014,
-0.04594604671001434,
0.2857763171195984,
-0.08945294469594955,
0.08294838666915894,
-0.09465337544679642,
-0.005644227843731642,
0.03846719115972519,
-0.04955118149518967,
0.03680991381406784,
-0.15935158729553223,
0.058665681630373,
0.08756466954946518,
-0.05206675827503204,
0.042780496180057526,
-0.25969547033309937,
-0.13002341985702515,
-0.13475550711154938,
-0.1039326936006546,
-0.10155102610588074,
-0.09358140826225281,
0.0357498936355114,
0.06807258725166321,
0.06135394796729088,
-0.15116505324840546,
-0.045578762888908386,
-0.037972092628479004,
7.193335136435053e-7,
-0.10880166292190552,
0.08324184268712997,
0.005437291227281094,
-0.09285296499729156,
0.041247669607400894,
0.017382459715008736,
-0.10421024262905121,
0.13712875545024872,
0.09324817359447479,
0.09920687228441238,
0.07194353640079498,
-0.11800272762775421,
-0.03380824998021126,
0.06838443130254745,
-0.05575660243630409,
-0.18791989982128143,
-0.005588301923125982,
-0.018147693946957588,
-0.13898608088493347,
0.06190294027328491,
0.26169267296791077,
0.19808942079544067,
0.055553000420331955,
0.06807754188776016,
0.02058565244078636,
-0.012239949777722359,
0.023558814078569412,
0.11132954061031342,
-0.1250329464673996,
-0.06851985305547714,
0.024861540645360947,
-0.04112093150615692,
-0.10293450951576233,
0.03456943854689598,
-0.1799182891845703,
-0.06310165673494339,
-0.07176505774259567,
0.06254461407661438,
-0.07445728033781052,
-0.0007890540873631835,
-0.11339225620031357,
0.014465706422924995,
-0.023588038980960846,
-0.024886583909392357,
0.08273330330848694,
0.01363752968609333,
-0.04492199048399925,
0.08479028195142746,
-0.2196589708328247,
-0.07599741220474243,
0.028371719643473625,
0.06952425092458725,
0.10086262226104736,
0.18960241973400116,
-0.09796348959207535,
-0.14319133758544922,
-0.026173798367381096,
-0.06900150328874588,
-0.008866611868143082,
-0.13568748533725739,
-0.045186325907707214,
0.018001466989517212,
-0.12457756698131561,
0.12092351168394089,
0.07383867353200912,
0.005563189275562763,
-0.08451754599809647,
6.321797713257093e-35,
0.029132600873708725,
-0.021073302254080772,
0.21908171474933624,
-0.1303592324256897,
-0.1701224446296692,
0.027813147753477097,
-0.05134700983762741,
-0.0007046412792988122,
0.06525486707687378,
-0.034370873123407364,
-0.05481795221567154
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | The streaming would work, but the video paths would require using `fsspec.open` to get the content. | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 16 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
The streaming would work, but the video paths would require using `fsspec.open` to get the content. | [
-0.12129917740821838,
0.16365103423595428,
0.005192614626139402,
-0.10811161994934082,
0.09771250188350677,
0.02392376959323883,
0.09724604338407516,
0.1645321100950241,
-0.028489531949162483,
-0.001977729145437479,
-0.020647792145609856,
0.042601730674505234,
-0.160288006067276,
0.23071549832820892,
0.12638744711875916,
-0.22533318400382996,
-0.1155700832605362,
0.05888751521706581,
0.006825183052569628,
0.032171767204999924,
0.11622307449579239,
-0.02513352409005165,
0.09746747463941574,
-0.16830076277256012,
-0.19639788568019867,
-0.04361434653401375,
-0.1162954643368721,
0.10634195804595947,
0.11813252419233322,
-0.19669514894485474,
-0.11819781363010406,
0.08403708040714264,
0.25495707988739014,
0.36503830552101135,
0.000005507719833985902,
-0.04455629363656044,
0.031995661556720734,
0.05564326047897339,
0.019149446859955788,
0.09406814724206924,
0.13016469776630402,
-0.11243906617164612,
-0.12817639112472534,
-0.00202574604190886,
0.13466355204582214,
-0.05246874690055847,
0.20485544204711914,
-0.20082424581050873,
0.21928949654102325,
-0.132573202252388,
0.001894902321510017,
0.01004208717495203,
-0.11167926341295242,
-0.03866908699274063,
0.0018846740713343024,
0.2329140454530716,
-0.06307919323444366,
0.11971759051084518,
0.16474740207195282,
0.05846609175205231,
-0.07112805545330048,
-0.006437877658754587,
0.0848143994808197,
-0.09349016845226288,
0.1986767202615738,
0.10708406567573547,
-0.18251915276050568,
-0.1501176655292511,
-0.057532038539648056,
0.17642991244792938,
-0.0725613683462143,
-0.11998551338911057,
-0.1355418711900711,
0.001432550372555852,
0.006273091305047274,
0.027163347229361534,
-0.13826750218868256,
0.05359995365142822,
-0.08656513690948486,
0.07960741221904755,
-0.17008629441261292,
-0.016430921852588654,
-0.07978631556034088,
-0.21546918153762817,
-0.0620146170258522,
-0.09959422796964645,
-0.004877153784036636,
-0.014298737049102783,
0.012149653397500515,
-0.11411193013191223,
0.06274203211069107,
0.030610879883170128,
0.11149120330810547,
0.06537279486656189,
0.03404354676604271,
-0.07371056079864502,
-0.045267827808856964,
0.021470556035637856,
0.030704092234373093,
-0.04251743108034134,
0.14797045290470123,
0.22093334794044495,
-0.28708043694496155,
0.12984022498130798,
-0.03249775990843773,
-0.05051005631685257,
-0.05998401716351509,
-0.2753450870513916,
0.22705349326133728,
0.1022782102227211,
-0.015508940443396568,
0.018246520310640335,
-0.09000439941883087,
-0.06627923995256424,
-0.17297843098640442,
-0.05097033455967903,
-0.03781299293041229,
0.1201813593506813,
-0.06174237281084061,
0.07832390069961548,
0.035964105278253555,
0.05643831193447113,
-0.03720741346478462,
0.12563654780387878,
-0.008006441406905651,
0.05769968777894974,
-0.15384306013584137,
-0.05537009611725807,
-0.026514237746596336,
-0.04474731162190437,
-0.009214247576892376,
-0.011871480382978916,
0.11178477108478546,
0.03175440430641174,
0.11766564100980759,
-0.13719375431537628,
0.09236083179712296,
-0.1188526600599289,
0.14066720008850098,
0.11223012953996658,
0.06561817973852158,
0.050884876400232315,
-0.0646345391869545,
-0.07781089842319489,
0.028155218809843063,
0.024769781157374382,
0.08280395716428757,
0.036320995539426804,
-0.15789686143398285,
0.047807544469833374,
0.22320379316806793,
0.1533101499080658,
-0.08244574815034866,
0.1180795207619667,
0.09231211990118027,
-0.02246287278831005,
-0.19472043216228485,
-0.10755077004432678,
-0.43565768003463745,
-0.050324540585279465,
0.007388802710920572,
0.01315366756170988,
0.041634656488895416,
0.06765476614236832,
0.04028962180018425,
0.14348062872886658,
0.10965532064437866,
0.1046295166015625,
0.06437038630247116,
0.18103617429733276,
-0.010137446224689484,
-0.0762806311249733,
-0.029588887467980385,
-0.06667638570070267,
-0.018837129697203636,
0.26050427556037903,
-0.011843833141028881,
-0.2227998971939087,
0.010880337096750736,
0.06622450053691864,
0.05526367947459221,
-0.10794208943843842,
0.0616615004837513,
0.2989617586135864,
0.26082950830459595,
-0.0347495898604393,
0.08900448679924011,
0.3035596013069153,
-0.043120402842760086,
0.06449761241674423,
-0.08638178557157516,
-0.06266293674707413,
-0.031928420066833496,
0.20155465602874756,
-0.018287790939211845,
-0.18846334517002106,
0.1333513855934143,
-0.20449626445770264,
0.06825435161590576,
-0.1900537610054016,
0.023817848414182663,
-0.020446769893169403,
-0.020417647436261177,
-0.0872623398900032,
-0.1280287653207779,
-0.12110638618469238,
-0.15104176104068756,
-0.025656258687376976,
0.2065563201904297,
-0.18403087556362152,
0.11149010062217712,
-0.03197906166315079,
-0.18973775207996368,
-0.17481473088264465,
0.0879504531621933,
-0.08284915238618851,
-0.08612194657325745,
0.03627045825123787,
-0.11709507554769516,
0.19399365782737732,
-0.08838897943496704,
0.19249241054058075,
0.2079850286245346,
0.04314357414841652,
0.07092054188251495,
0.06446846574544907,
0.09725093096494675,
0.10259556770324707,
0.1453126221895218,
0.01066278014332056,
-0.02283327281475067,
-0.0857287049293518,
0.1410313844680786,
0.0852133184671402,
0.004688431974500418,
0.10672814399003983,
0.3328249454498291,
0.06009349972009659,
0.10609348863363266,
-0.044442612677812576,
-0.199699267745018,
-0.06504404544830322,
-0.0526849590241909,
0.02478918619453907,
-0.0013163677649572492,
0.09124457091093063,
-0.09546379745006561,
-0.15564218163490295,
0.18926985561847687,
0.034479524940252304,
0.20309635996818542,
-0.048827383667230606,
0.030358845368027687,
0.16499483585357666,
0.10331471264362335,
-0.0846758708357811,
0.05233458802103996,
0.022319462150335312,
0.00719031784683466,
-0.08100417256355286,
0.18730688095092773,
-0.03577883541584015,
-0.047537192702293396,
0.05000404641032219,
-0.02044108510017395,
-0.1052527204155922,
0.07542476803064346,
-0.07058271765708923,
0.009035274386405945,
0.20612874627113342,
0.07909192144870758,
-0.05880216881632805,
0.07869207859039307,
-0.0588025264441967,
-0.06139688566327095,
-0.18581096827983856,
-0.14633876085281372,
0.09479063004255295,
0.03271039202809334,
-0.003174685873091221,
-0.05722510814666748,
0.06724057346582413,
0.05828789994120598,
-0.038613103330135345,
0.02779325097799301,
-0.10587513446807861,
-0.07485043257474899,
-0.08287268877029419,
0.039480045437812805,
-0.1378970742225647,
0.02245739847421646,
-0.03446553647518158,
0.13094249367713928,
0.03792734071612358,
0.05079349875450134,
-0.025198638439178467,
-0.029427697882056236,
0.045101188123226166,
-0.04782623425126076,
-0.0791005864739418,
-0.039542801678180695,
0.03205437958240509,
0.16309985518455505,
0.14307652413845062,
0.0526808463037014,
0.06345736980438232,
0.08558844774961472,
0.1363246738910675,
0.01720592752099037,
-0.2708525061607361,
-0.03534030169248581,
0.04422453045845032,
0.009118957445025444,
0.09380577504634857,
0.029074953868985176,
0.04777618497610092,
0.04030901938676834,
-0.04867622256278992,
-0.05472412705421448,
-0.05836990848183632,
0.03100123628973961,
0.019102763384580612,
0.14863452315330505,
0.003514261683449149,
-0.10560227930545807,
0.3398136496543884,
-0.09473234415054321,
-0.186192587018013,
0.17839618027210236,
-0.06344834715127945,
-0.08954906463623047,
-0.01641002669930458,
-0.05685766041278839,
0.06501388549804688,
0.0859021320939064,
-0.024497156962752342,
-0.05632350593805313,
-0.17272479832172394,
0.05125417560338974,
-0.14445315301418304,
0.012944757007062435,
-0.08021057397127151,
0.10055996477603912,
0.00338985794223845,
0.05151073634624481,
-0.2182607650756836,
-0.13002116978168488,
-0.13016672432422638,
0.058343224227428436,
0.06785150617361069,
-0.15876029431819916,
0.06354756653308868,
0.04026356339454651,
-0.07596652209758759,
0.10850732028484344,
0.002637578407302499,
-0.37038448452949524,
0.15580932796001434,
-0.24648432433605194,
0.011194565333425999,
-0.06493496894836426,
0.1160309836268425,
-0.016951585188508034,
-0.12867029011249542,
-0.1422698050737381,
0.10313499718904495,
0.16258937120437622,
0.021802321076393127,
-0.11015744507312775,
-0.08321240544319153,
0.04719284176826477,
-0.27339184284210205,
0.044399186968803406,
-0.024790935218334198,
0.03472327068448067,
0.12567797303199768,
0.039896756410598755,
-0.04851800575852394,
0.1235722154378891,
0.04966886341571808,
0.1324656456708908,
-0.0907202735543251,
-0.10350880026817322,
-0.18311603367328644,
-0.08878865838050842,
-0.07273156940937042,
-0.17562763392925262,
0.06934243440628052,
0.044036976993083954,
0.291638046503067,
-0.03509620577096939,
0.10829561203718185,
0.15349021553993225,
-0.17617681622505188,
0.19219276309013367,
0.05690685287117958,
-0.12099430710077286,
0.07148656249046326,
0.01084202155470848,
0.07861804962158203,
-0.02748539112508297,
0.05528929829597473,
0.08181831240653992,
-0.030610907822847366,
-0.14634685218334198,
-0.10198846459388733,
-0.17782722413539886,
0.1233377680182457,
-0.02294173464179039,
-0.05940243601799011,
0.051847174763679504,
0.046110592782497406,
-0.05075150355696678,
0.06577716022729874,
-0.03338075429201126,
-0.006022769026458263,
-0.06935464590787888,
0.03943203389644623,
0.11188282072544098,
0.03636225685477257,
-0.05069214105606079,
-0.07593054324388504,
0.24063898622989655,
-0.08785255253314972,
0.16619005799293518,
-0.027618959546089172,
-0.1694263368844986,
0.03869733586907387,
0.09421234577894211,
-0.024317672476172447,
0.08367651700973511,
0.09028563648462296,
0.008214027620851994,
-0.01034568715840578,
0.2763232886791229,
-0.056308113038539886,
0.164896622300148,
-0.04803222045302391,
-0.04255279153585434,
-0.04407259449362755,
-0.03516826778650284,
0.08497080951929092,
0.3105553686618805,
0.023799145594239235,
-0.015640001744031906,
-0.015403182245790958,
-0.043759554624557495,
-0.02881774865090847,
0.13362963497638702,
0.16899730265140533,
-0.21655061841011047,
-0.09861483424901962,
0.05079161748290062,
0.04641134291887283,
0.07609634846448898,
0.09975289553403854,
0.007165845483541489,
0.0964721143245697,
0.03233218565583229,
-0.0786532461643219,
-0.008303183130919933,
-0.06319016218185425,
0.04223090037703514,
0.05404719337821007,
-0.059490546584129333,
0.15954051911830902,
0.17362797260284424,
-0.19830861687660217,
0.019853591918945312,
-0.1275448501110077,
-0.0706728920340538,
0.08969560265541077,
0.0015779982786625624,
-0.024976437911391258,
0.056121576577425,
-0.027516957372426987,
0.037125591188669205,
-0.09904876351356506,
0.06350822001695633,
0.044065698981285095,
0.1420591026544571,
0.006204086355865002,
-0.04787684977054596,
-0.19510595500469208,
0.02035113237798214,
0.10533004254102707,
-0.18506890535354614,
-0.059947945177555084,
-0.2800351679325104,
0.04962962865829468,
0.002197236754000187,
-0.10018612444400787,
0.016593316569924355,
0.038031503558158875,
0.11324453353881836,
-0.10675925016403198,
0.0972607284784317,
0.10365603119134903,
-0.10989804565906525,
-0.07101301103830338,
-0.04681140556931496,
-0.07868127524852753,
0.21720708906650543,
-0.10087653249502182,
0.05407087877392769,
-0.1574486643075943,
-0.06776484847068787,
0.08491586893796921,
0.055499110370874405,
0.21213363111019135,
0.1384625881910324,
0.008157088421285152,
0.018905185163021088,
-0.08050237596035004,
0.06535595655441284,
0.02658691816031933,
-0.020764604210853577,
0.09561198204755783,
0.06402812153100967,
-0.1743377149105072,
-0.03193099424242973,
-0.08497410267591476,
0.11612722277641296,
-0.0030074294190853834,
-0.19728539884090424,
0.06304216384887695,
-0.04495459422469139,
-0.1290721297264099,
-0.018440796062350273,
-0.18489748239517212,
-0.12451902776956558,
-0.03304426372051239,
0.042360492050647736,
-0.05437367036938667,
-0.05208040401339531,
0.18573038280010223,
0.021603671833872795,
-0.01635448820888996,
-0.02486836351454258,
0.025977393612265587,
-0.1467980444431305,
-0.039885394275188446,
-0.1663786619901657,
0.06427588313817978,
-0.12093410640954971,
-0.04003171622753143,
0.05190962180495262,
-0.21655820310115814,
-0.06343021988868713,
0.07437826693058014,
0.093943752348423,
-0.010503456927835941,
-0.10672137141227722,
-0.15567684173583984,
-0.025559287518262863,
-2.7810386079155056e-32,
0.04481721669435501,
-0.014231177978217602,
-0.03675124794244766,
0.08682270348072052,
-0.005692881997674704,
0.004661689978092909,
0.027740906924009323,
-0.1978304535150528,
0.08415696769952774,
-0.14434660971164703,
0.014503682032227516,
-0.021052010357379913,
0.0447101965546608,
0.10868548601865768,
-0.1352229118347168,
0.0898888111114502,
0.0915195569396019,
-0.10841520130634308,
-0.13536226749420166,
0.04630518704652786,
0.23799003660678864,
-0.11259781569242477,
-0.029542483389377594,
0.07784179598093033,
-0.08214316517114639,
0.16506433486938477,
-0.017764024436473846,
0.08894845098257065,
0.06178736314177513,
-0.08023521304130554,
-0.05057898163795471,
0.05384979769587517,
-0.06684137135744095,
-0.0026747873052954674,
0.046338438987731934,
0.04033380001783371,
-0.18355052173137665,
0.048728153109550476,
-0.09366313368082047,
-0.02995367906987667,
-0.00620091799646616,
0.017121361568570137,
-0.047618839889764786,
-0.0345693901181221,
0.08833768963813782,
0.0704977735877037,
-0.017390882596373558,
0.15976013243198395,
-0.1329621523618698,
-0.0029151709750294685,
-0.07071025669574738,
0.16179770231246948,
-0.08464182913303375,
-0.030206697061657906,
0.12345802038908005,
0.045415088534355164,
0.05638651177287102,
-0.02546597644686699,
0.11321187019348145,
0.018918467685580254,
-0.022076373919844627,
-0.03610534593462944,
-0.0704401507973671,
-0.026227399706840515,
0.13539254665374756,
0.04672922566533089,
0.23972129821777344,
-0.35718023777008057,
0.12108387053012848,
0.0602131187915802,
-0.012656467035412788,
-0.022188203409314156,
0.005779019091278315,
-0.011546595953404903,
-0.012335036881268024,
0.013806107454001904,
-0.020918898284435272,
-0.09846460074186325,
-0.08532165735960007,
-0.15943554043769836,
-0.10804259777069092,
-0.094876229763031,
0.01809822767972946,
0.0789993479847908,
0.056836362928152084,
0.10334885120391846,
-0.08237289637327194,
-0.052443042397499084,
0.11702801287174225,
-0.033313848078250885,
0.07669798284769058,
-0.06437471508979797,
0.053279001265764236,
0.10526073724031448,
0.07291021943092346,
-0.09094919264316559,
0.06048166751861572,
0.316092848777771,
0.15180082619190216,
-0.09421096742153168,
0.11070643365383148,
-0.0045371875166893005,
-0.06906653940677643,
-0.07593606412410736,
0.08222278207540512,
-0.0973597913980484,
-0.0625074952840805,
0.28638899326324463,
-0.1061861515045166,
0.09022428840398788,
-0.09717060625553131,
-0.023297172039747238,
0.07005617767572403,
-0.04832914471626282,
0.0718303993344307,
-0.150194451212883,
0.05222305282950401,
0.06958375126123428,
-0.04091024026274681,
0.04837936535477638,
-0.2720296084880829,
-0.1224038228392601,
-0.10397906601428986,
-0.06409860402345657,
-0.13583749532699585,
-0.08770383894443512,
0.0376831591129303,
0.030246710404753685,
0.04041017219424248,
-0.1642913967370987,
-0.036914125084877014,
-0.02628382295370102,
7.119626275198243e-7,
-0.10745250433683395,
0.08533003181219101,
-0.007899414747953415,
-0.08386202156543732,
0.013606831431388855,
0.037892892956733704,
-0.09261345118284225,
0.09139445424079895,
0.10859160870313644,
0.08058402687311172,
0.07672318816184998,
-0.11663421988487244,
-0.016548719257116318,
0.08667038381099701,
-0.09024453908205032,
-0.18130330741405487,
0.009133509360253811,
0.006445800419896841,
-0.1455734670162201,
0.10062162578105927,
0.2484506517648697,
0.2063239961862564,
0.05143959820270538,
0.08782362192869186,
0.03774448111653328,
-0.019620226696133614,
0.03468990698456764,
0.13461191952228546,
-0.1291709989309311,
-0.08905277401208878,
-0.028011295944452286,
-0.06759294867515564,
-0.13070717453956604,
0.042242877185344696,
-0.18634459376335144,
-0.05596225708723068,
-0.06863335520029068,
0.014597072266042233,
-0.05873023346066475,
-0.016927706077694893,
-0.10049878060817719,
0.0041959346272051334,
-0.000017747372112353332,
-0.02089708298444748,
0.0362289696931839,
-0.007863733917474747,
-0.0510326586663723,
0.07740060240030289,
-0.20863190293312073,
-0.07649069279432297,
0.01990552991628647,
0.05537021905183792,
0.11381302028894424,
0.18389521539211273,
-0.10893870890140533,
-0.15240678191184998,
-0.041935913264751434,
-0.07417836040258408,
-0.02622421272099018,
-0.11708347499370575,
-0.014712590724229813,
0.027177222073078156,
-0.12163536250591278,
0.09193114191293716,
0.09862499684095383,
0.031105587258934975,
-0.09513543546199799,
6.11608447994764e-35,
0.048702482134103775,
-0.019158033654093742,
0.21729078888893127,
-0.10996124893426895,
-0.1588464081287384,
0.033709704875946045,
-0.03543592989444733,
0.008613692596554756,
0.028866851702332497,
-0.025752786546945572,
-0.08286212384700775
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | Not yet. The (open source) tooling for video is not great in terms of ease of use/performance, so we are discussing internally the best way to support it (one option is creating a new library for video IO, but this will require a lot of work) | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 46 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
Not yet. The (open source) tooling for video is not great in terms of ease of use/performance, so we are discussing internally the best way to support it (one option is creating a new library for video IO, but this will require a lot of work) | [
-0.11917555332183838,
0.17184141278266907,
0.013850407674908638,
-0.11546140164136887,
0.09016485512256622,
0.021471813321113586,
0.11938650161027908,
0.15776227414608002,
-0.03053566813468933,
-0.01703561656177044,
-0.017921067774295807,
0.03724141791462898,
-0.1694241315126419,
0.20345856249332428,
0.11840052902698517,
-0.21045894920825958,
-0.10230578482151031,
0.08649804443120956,
0.01874900981783867,
0.03644421324133873,
0.12609349191188812,
-0.03737911581993103,
0.07896232604980469,
-0.17370343208312988,
-0.18207979202270508,
-0.0484156534075737,
-0.1247873306274414,
0.11317052692174911,
0.1311868131160736,
-0.17416952550411224,
-0.12813302874565125,
0.09074126929044724,
0.2351183444261551,
0.3859662711620331,
0.000005609727395494701,
-0.05147535353899002,
0.038542650640010834,
0.03651990368962288,
0.029878228902816772,
0.09815829247236252,
0.14416293799877167,
-0.122874915599823,
-0.11949712783098221,
0.00019965512910857797,
0.13978280127048492,
-0.050881534814834595,
0.2096707671880722,
-0.17920807003974915,
0.24144604802131653,
-0.15269796550273895,
0.0031500612385571003,
-0.0017149830237030983,
-0.10035660862922668,
-0.03564237430691719,
0.022641394287347794,
0.25204986333847046,
-0.05582249164581299,
0.13491418957710266,
0.1778085082769394,
0.04114389792084694,
-0.06576496362686157,
0.016013624146580696,
0.0815199539065361,
-0.11052731424570084,
0.21538767218589783,
0.10143762081861496,
-0.21020002663135529,
-0.12246295809745789,
-0.027178628370165825,
0.15037879347801208,
-0.052853308618068695,
-0.12199725955724716,
-0.11154426634311676,
0.008534393273293972,
0.011807132512331009,
0.01012569572776556,
-0.15071409940719604,
0.04990113154053688,
-0.0941937118768692,
0.07623820006847382,
-0.1766054332256317,
-0.0005391941522248089,
-0.07871104031801224,
-0.22438880801200867,
-0.07632732391357422,
-0.09364968538284302,
-0.004603595472872257,
-0.014767778106033802,
-0.01940135844051838,
-0.1107773557305336,
0.07127014547586441,
0.020586945116519928,
0.0917447879910469,
0.08248358964920044,
0.024609584361314774,
-0.08350551873445511,
-0.07308630645275116,
0.007808047346770763,
0.0371365062892437,
-0.0637749433517456,
0.14630098640918732,
0.2110428810119629,
-0.2825522720813751,
0.1276305466890335,
-0.02210589312016964,
-0.03940644487738609,
-0.047965146601200104,
-0.27178335189819336,
0.21073606610298157,
0.09345752000808716,
-0.008894329890608788,
0.04008284583687782,
-0.10501650720834732,
-0.05016077309846878,
-0.14586348831653595,
-0.05327620729804039,
-0.05526992678642273,
0.12770885229110718,
-0.07212522625923157,
0.07060323655605316,
0.03484369441866875,
0.05128279700875282,
-0.032526250928640366,
0.1250249296426773,
-0.019651630893349648,
0.041813381016254425,
-0.15411823987960815,
-0.05112267658114433,
-0.024203427135944366,
-0.05202576145529747,
0.013157384470105171,
-0.012237221002578735,
0.13063335418701172,
0.01867184042930603,
0.1169905960559845,
-0.1363205760717392,
0.07898391783237457,
-0.0685940757393837,
0.14513826370239258,
0.11695096641778946,
0.07474576681852341,
0.06377437710762024,
-0.07920923829078674,
-0.10421638190746307,
0.026781363412737846,
0.022604871541261673,
0.08238981664180756,
0.023808300495147705,
-0.1528639942407608,
0.07542414218187332,
0.22111593186855316,
0.16410617530345917,
-0.05968395248055458,
0.12945738434791565,
0.08988745510578156,
-0.023138664662837982,
-0.16437065601348877,
-0.11395050585269928,
-0.3965914845466614,
-0.04344690218567848,
0.008270984515547752,
-0.0037573606241494417,
0.05920831859111786,
0.052052974700927734,
0.017012815922498703,
0.15518730878829956,
0.08765587210655212,
0.11310483515262604,
0.06878059357404709,
0.21302203834056854,
-0.009933295659720898,
-0.06605367362499237,
-0.013827724382281303,
-0.05865030363202095,
0.017805323004722595,
0.23457299172878265,
-0.008936289697885513,
-0.22291742265224457,
0.006724284030497074,
0.04575193300843239,
0.029765212908387184,
-0.10059456527233124,
0.03822789341211319,
0.30352410674095154,
0.25572237372398376,
-0.05208386480808258,
0.10237151384353638,
0.31346651911735535,
-0.060958147048950195,
0.07363591343164444,
-0.08973518759012222,
-0.03322512283921242,
-0.04320173338055611,
0.19601429998874664,
-0.009878860786557198,
-0.20126783847808838,
0.10874665528535843,
-0.21769879758358002,
0.06745440512895584,
-0.18154647946357727,
0.030242128297686577,
-0.020280154421925545,
-0.03134654462337494,
-0.0826038345694542,
-0.12039921432733536,
-0.10719449818134308,
-0.15341344475746155,
-0.042987190186977386,
0.21620599925518036,
-0.1848260462284088,
0.10691779106855392,
-0.024210184812545776,
-0.2185659557580948,
-0.17430174350738525,
0.09859085828065872,
-0.07508612424135208,
-0.08179720491170883,
0.044639986008405685,
-0.12600146234035492,
0.1985716074705124,
-0.10204444080591202,
0.16954118013381958,
0.2064705789089203,
0.043442025780677795,
0.09295127540826797,
0.04765744134783745,
0.11332954466342926,
0.11318431794643402,
0.1387077271938324,
0.014896374195814133,
-0.024080513045191765,
-0.08779996633529663,
0.133134663105011,
0.07980705797672272,
-0.033158283680677414,
0.09905228763818741,
0.34160006046295166,
0.07381650805473328,
0.13357488811016083,
-0.02984657511115074,
-0.18697839975357056,
-0.07771839946508408,
-0.06058644875884056,
0.013058473356068134,
0.019833510741591454,
0.08820632845163345,
-0.09102512896060944,
-0.15520495176315308,
0.15902003645896912,
0.029461296275258064,
0.18666023015975952,
-0.0464898906648159,
0.048289623111486435,
0.1426231861114502,
0.09093733131885529,
-0.08992663770914078,
0.05094035342335701,
0.02713349461555481,
0.030818169936537743,
-0.08863698691129684,
0.18244770169258118,
-0.0503353476524353,
-0.02696930430829525,
0.029428429901599884,
-0.03520205616950989,
-0.08343488723039627,
0.08222143352031708,
-0.07856281846761703,
0.025157688185572624,
0.19401638209819794,
0.08430396765470505,
-0.07627496123313904,
0.06181963160634041,
-0.058988966047763824,
-0.0741124078631401,
-0.1941516250371933,
-0.14614282548427582,
0.07686125487089157,
0.03152276575565338,
-0.0017036143690347672,
-0.06319655478000641,
0.07766436785459518,
0.056286126375198364,
-0.043987616896629333,
0.028875580057501793,
-0.1020195409655571,
-0.05896677449345589,
-0.06595342606306076,
0.034677840769290924,
-0.14978298544883728,
0.015912719070911407,
-0.03415041044354439,
0.1412583887577057,
0.022990215569734573,
0.04652636498212814,
-0.03298351913690567,
-0.014555109664797783,
0.05266205593943596,
-0.058257460594177246,
-0.11943333595991135,
-0.01951497048139572,
0.031370073556900024,
0.18128791451454163,
0.1442011147737503,
0.06620067358016968,
0.04153099283576012,
0.11616715788841248,
0.13052092492580414,
-0.021667588502168655,
-0.2608863115310669,
-0.055606476962566376,
0.048566434532403946,
0.00017927715089172125,
0.08602825552225113,
0.042129963636398315,
0.055765412747859955,
0.029789520427584648,
-0.043948233127593994,
-0.05301942303776741,
-0.03721458464860916,
0.024586960673332214,
-0.000827822950668633,
0.1484043151140213,
0.012103143148124218,
-0.10124502331018448,
0.3583078980445862,
-0.08810850232839584,
-0.1750648319721222,
0.17217963933944702,
-0.06902165710926056,
-0.09069376438856125,
-0.026139862835407257,
-0.05811217799782753,
0.05639413744211197,
0.07678346335887909,
-0.008790179155766964,
-0.04287199303507805,
-0.1540747731924057,
0.039973098784685135,
-0.15874914824962616,
0.00436692638322711,
-0.06031375378370285,
0.07730729877948761,
0.04489791393280029,
0.042183056473731995,
-0.21610137820243835,
-0.10909809172153473,
-0.13225997984409332,
0.0533553883433342,
0.08539584279060364,
-0.1688002645969391,
0.08284107595682144,
0.03169848397374153,
-0.052294354885816574,
0.11395598948001862,
0.007059925235807896,
-0.36563917994499207,
0.16243721544742584,
-0.23734527826309204,
0.0273008793592453,
-0.06027192994952202,
0.1025078222155571,
-0.01596054434776306,
-0.14768140017986298,
-0.15391139686107635,
0.08061986416578293,
0.17621029913425446,
0.010579834692180157,
-0.11411456018686295,
-0.07625115662813187,
0.031376101076602936,
-0.25366535782814026,
0.05871272832155228,
-0.026222355663776398,
0.016589075326919556,
0.10752065479755402,
0.04806457832455635,
-0.05757135897874832,
0.13898229598999023,
0.06763633340597153,
0.1350705623626709,
-0.09095091372728348,
-0.10749806463718414,
-0.17941011488437653,
-0.10848391801118851,
-0.07020233571529388,
-0.18984651565551758,
0.0513298325240612,
0.02085259184241295,
0.28597626090049744,
-0.05116858705878258,
0.10941534489393234,
0.17918755114078522,
-0.15708735585212708,
0.20520451664924622,
0.045820754021406174,
-0.09725983440876007,
0.059669096022844315,
-0.016078269109129906,
0.08041621744632721,
-0.03599602356553078,
0.03478523716330528,
0.06686132401227951,
-0.03160753473639488,
-0.13676908612251282,
-0.09479672461748123,
-0.1584375500679016,
0.12039409577846527,
-0.05540715530514717,
-0.07504444569349289,
0.08147820830345154,
0.06553390622138977,
-0.03540576994419098,
0.04959192872047424,
-0.020241430029273033,
0.00046537071466445923,
-0.10429870337247849,
0.014172662049531937,
0.10209012776613235,
0.020600149407982826,
-0.04257216677069664,
-0.07285787165164948,
0.2602272629737854,
-0.09680693596601486,
0.16659343242645264,
-0.04529318958520889,
-0.18025952577590942,
0.026700694113969803,
0.09012266248464584,
-0.01706581749022007,
0.06948497146368027,
0.08180071413516998,
0.025725359097123146,
0.004107968416064978,
0.28084471821784973,
-0.053075119853019714,
0.15501311421394348,
-0.05437304824590683,
-0.04476303234696388,
-0.07076616585254669,
-0.0402187742292881,
0.0970410406589508,
0.2847026586532593,
0.033694684505462646,
0.014449644833803177,
-0.04150979593396187,
-0.044494230300188065,
-0.023340998217463493,
0.11898936331272125,
0.15856829285621643,
-0.20303042232990265,
-0.1188194751739502,
0.0771070048213005,
0.04881079122424126,
0.0910402461886406,
0.10799814015626907,
-0.011463341303169727,
0.10940807312726974,
0.04417340084910393,
-0.09673211723566055,
0.006141413003206253,
-0.056656695902347565,
0.03817616403102875,
0.05690106749534607,
-0.07242738455533981,
0.1300116777420044,
0.1735919564962387,
-0.18787573277950287,
0.020050425082445145,
-0.1568993330001831,
-0.06760447472333908,
0.09906578809022903,
0.029045522212982178,
-0.04410296678543091,
0.052339546382427216,
-0.04210791364312172,
0.023077458143234253,
-0.13339567184448242,
0.07600648701190948,
0.028938116505742073,
0.12385957688093185,
0.019353114068508148,
-0.06367949396371841,
-0.16794869303703308,
0.01009669154882431,
0.11091228574514389,
-0.1761733889579773,
-0.0583818219602108,
-0.2585156559944153,
0.04218803346157074,
0.01776129938662052,
-0.07848428189754486,
0.008057108148932457,
0.06618382036685944,
0.10978429764509201,
-0.11200999468564987,
0.05885292962193489,
0.12704269587993622,
-0.1241728663444519,
-0.03821269050240517,
-0.07279834896326065,
-0.03727225959300995,
0.22993969917297363,
-0.09974360466003418,
0.038542889058589935,
-0.14940939843654633,
-0.05775919929146767,
0.10148908197879791,
0.0543326772749424,
0.19302566349506378,
0.13401053845882416,
0.0038318124134093523,
0.022357845678925514,
-0.08922389149665833,
0.07045896351337433,
0.005011952482163906,
-0.027554793283343315,
0.1126127690076828,
0.05224879831075668,
-0.1448432356119156,
-0.03836040571331978,
-0.09789200872182846,
0.1396322250366211,
0.008337005041539669,
-0.18757273256778717,
0.04500722512602806,
-0.03967032954096794,
-0.11759787797927856,
-0.0222464632242918,
-0.17493657767772675,
-0.1380116045475006,
-0.03620808944106102,
0.036448802798986435,
-0.03900035470724106,
-0.05172538012266159,
0.19921918213367462,
0.043910130858421326,
-0.006483395118266344,
-0.04009266942739487,
0.01433726865798235,
-0.16345787048339844,
-0.01354300044476986,
-0.2036769539117813,
0.057690225541591644,
-0.10184560716152191,
-0.0666966587305069,
0.04869312420487404,
-0.23445412516593933,
-0.074888676404953,
0.07821166515350342,
0.08287607133388519,
-0.006678225938230753,
-0.12403878569602966,
-0.15246421098709106,
-0.0021010313648730516,
-2.813605678905037e-32,
0.025184983387589455,
-0.015458591282367706,
-0.025608699768781662,
0.08439581096172333,
-0.013372885063290596,
-0.01057544443756342,
0.06686508655548096,
-0.18193361163139343,
0.07026142627000809,
-0.13694585859775543,
0.030020451173186302,
-0.026912419125437737,
0.04604301601648331,
0.08982837945222855,
-0.09764087945222855,
0.09903861582279205,
0.09961283206939697,
-0.09031535685062408,
-0.12229108810424805,
0.058809421956539154,
0.19329722225666046,
-0.09774619340896606,
-0.0383068323135376,
0.04509199410676956,
-0.06613561511039734,
0.15964245796203613,
-0.018809545785188675,
0.09099225699901581,
0.03427650034427643,
-0.08310025930404663,
-0.06806555390357971,
0.03945913910865784,
-0.07592703402042389,
-0.009670834057033062,
0.05276364088058472,
0.025449959561228752,
-0.1656883805990219,
0.05181112140417099,
-0.0933767557144165,
-0.013187156058847904,
-0.0048026894219219685,
-0.002459883689880371,
-0.05991026759147644,
-0.061253711581230164,
0.07909169048070908,
0.05482526496052742,
0.02577301487326622,
0.14100055396556854,
-0.14613211154937744,
0.009880647994577885,
-0.061897583305835724,
0.15322592854499817,
-0.07425735890865326,
-0.055120524019002914,
0.1222643032670021,
0.036861956119537354,
0.050613198429346085,
0.0011204695329070091,
0.08599338680505753,
-0.0010155721101909876,
-0.005308277439326048,
-0.04298446327447891,
-0.0586031936109066,
-0.008154870010912418,
0.11310887336730957,
0.04833165556192398,
0.24026457965373993,
-0.3583173453807831,
0.1109473928809166,
0.05907958745956421,
-0.023721378296613693,
-0.013767498545348644,
0.018645696341991425,
-0.009118826128542423,
0.010396218858659267,
0.038979627192020416,
-0.03318208083510399,
-0.09596148878335953,
-0.07917476445436478,
-0.13740386068820953,
-0.130059152841568,
-0.09566071629524231,
0.022078121080994606,
0.06402914971113205,
0.07541123032569885,
0.08714772015810013,
-0.09882324188947678,
-0.05483872443437576,
0.12203982472419739,
-0.037783484905958176,
0.08441050350666046,
-0.04456302151083946,
0.04746408388018608,
0.09143401682376862,
0.05962715297937393,
-0.09319927543401718,
0.06120426952838898,
0.3151085674762726,
0.15284736454486847,
-0.09171570837497711,
0.10756492614746094,
0.0012180148623883724,
-0.10297216475009918,
-0.06439197063446045,
0.07354805618524551,
-0.10853256285190582,
-0.04226095601916313,
0.27205392718315125,
-0.1135205551981926,
0.10639102756977081,
-0.09882526099681854,
-0.04131501540541649,
0.0461571030318737,
-0.03648946434259415,
0.03600731119513512,
-0.1587618589401245,
0.07650972157716751,
0.07807423174381256,
-0.01724204048514366,
0.04024394601583481,
-0.26239070296287537,
-0.13428689539432526,
-0.11655385047197342,
-0.09634553641080856,
-0.12023698538541794,
-0.07844056934118271,
0.03867067024111748,
0.0335107147693634,
0.03132264316082001,
-0.1408616006374359,
-0.03871014714241028,
-0.04677114635705948,
7.204471330624074e-7,
-0.1146979108452797,
0.09374231845140457,
0.0026314365677535534,
-0.10384875535964966,
0.009420127607882023,
0.04912178963422775,
-0.08411067724227905,
0.10087107121944427,
0.1205548644065857,
0.09438402205705643,
0.06954415887594223,
-0.12628795206546783,
-0.023045219480991364,
0.06914675980806351,
-0.06275194138288498,
-0.19157980382442474,
0.010327416472136974,
0.008177170529961586,
-0.15402312576770782,
0.09784350544214249,
0.2542191445827484,
0.20382197201251984,
0.062035996466875076,
0.06465764343738556,
0.013221674598753452,
-0.039720743894577026,
0.0498473085463047,
0.1047874316573143,
-0.1388382911682129,
-0.07215476781129837,
-0.0014932288322597742,
-0.053853269666433334,
-0.1326611191034317,
0.024021459743380547,
-0.16913938522338867,
-0.06779751181602478,
-0.06908787786960602,
0.03310251981019974,
-0.0688738077878952,
-0.0005314677255228162,
-0.0905095636844635,
-0.005585423670709133,
-0.013077625073492527,
-0.022471420466899872,
0.05568645894527435,
-0.005091278348118067,
-0.04895460605621338,
0.05954838544130325,
-0.21083536744117737,
-0.07118134200572968,
0.030843114480376244,
0.0395418219268322,
0.1277579814195633,
0.17288175225257874,
-0.09488119184970856,
-0.14048559963703156,
-0.04309076443314552,
-0.06644906103610992,
-0.015369933098554611,
-0.08703413605690002,
-0.029475774616003036,
0.034696221351623535,
-0.11930062621831894,
0.09144668281078339,
0.09907420724630356,
0.027772855013608932,
-0.08746813982725143,
5.530183198009272e-35,
0.05660687014460564,
-0.01902628131210804,
0.2306445837020874,
-0.08637533336877823,
-0.15585483610630035,
0.0432334840297699,
-0.05237821862101555,
0.007977286353707314,
0.043487850576639175,
-0.03380683809518814,
-0.07464354485273361
] |
https://github.com/huggingface/datasets/issues/5888 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset | True. I spend a good 4 months just mixing and matching existing solutions so I could get performance that would not IO bound my model training.
This is what I ended up with, in case it's useful
https://github.com/AntreasAntoniou/TALI/blob/045cf9e5aa75b1bf2c6d5351fb910fa10e3ff32c/tali/data/data_plus.py#L85 | **Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
| 38 | A way to upload and visualize .mp4 files (millions of them) as part of a dataset
**Is your feature request related to a problem? Please describe.**
I recently chose to use huggingface hub as the home for a large multi modal dataset I've been building. https://huggingface.co/datasets/Antreas/TALI
It combines images, text, audio and video. Now, I could very easily upload a dataset made via datasets.Dataset.from_generator, as long as it did not include video files. I found that including .mp4 files in the entries would not auto-upload those files.
Hence I tried to upload them myself. I quickly found out that uploading many small files is a very bad way to use git lfs, and that it would take ages, so, I resorted to using 7z to pack them all up. But then I had a new problem.
My dataset had a size of 1.9TB. Trying to upload such a large file with the default huggingface_hub API always resulted in time outs etc. So I decided to split the large files into chunks of 5GB each and reupload.
So, eventually it all worked out. But now the dataset can't be properly and natively used by the datasets API because of all the needed preprocessing -- and furthermore the hub is unable to visualize things.
**Describe the solution you'd like**
A native way to upload large datasets that include .mp4 or other video types.
**Describe alternatives you've considered**
Already explained earlier
**Additional context**
https://huggingface.co/datasets/Antreas/TALI
True. I spend a good 4 months just mixing and matching existing solutions so I could get performance that would not IO bound my model training.
This is what I ended up with, in case it's useful
https://github.com/AntreasAntoniou/TALI/blob/045cf9e5aa75b1bf2c6d5351fb910fa10e3ff32c/tali/data/data_plus.py#L85 | [
-0.13129955530166626,
0.22599929571151733,
0.026377590373158455,
-0.11479191482067108,
0.10877322405576706,
0.016584692522883415,
0.1277560293674469,
0.16141033172607422,
-0.021505312994122505,
-0.05096878483891487,
-0.044421643018722534,
0.03552115336060524,
-0.20158129930496216,
0.24046966433525085,
0.11232130974531174,
-0.19174836575984955,
-0.10516335070133209,
0.07442046701908112,
0.05676313117146492,
0.03888709098100662,
0.09883332997560501,
-0.052225567400455475,
0.09979453682899475,
-0.17250283062458038,
-0.20087984204292297,
-0.05167557671666145,
-0.1492612510919571,
0.11123808473348618,
0.07903251051902771,
-0.1559256762266159,
-0.13491438329219818,
0.0914900153875351,
0.22252066433429718,
0.38047558069229126,
0.000005626046913675964,
-0.038092028349637985,
0.027132205665111542,
0.021207422018051147,
0.0016942605143412948,
0.11576928943395615,
0.18339239060878754,
-0.12407126277685165,
-0.12194842100143433,
-0.030997969210147858,
0.13888855278491974,
-0.03834357485175133,
0.18616391718387604,
-0.14229625463485718,
0.22932104766368866,
-0.11542494595050812,
-0.009702949784696102,
0.024718821048736572,
-0.08197617530822754,
-0.03926177695393562,
-0.00244805752299726,
0.22513452172279358,
-0.07045189291238785,
0.1379048228263855,
0.17678895592689514,
0.041186410933732986,
-0.059716008603572845,
0.033025238662958145,
0.10167381167411804,
-0.11204808205366135,
0.23458801209926605,
0.10645674169063568,
-0.1730063259601593,
-0.1317189335823059,
-0.042976148426532745,
0.13687536120414734,
-0.07818631082773209,
-0.11969660967588425,
-0.15122658014297485,
-0.0037253741174936295,
0.02676716074347496,
0.0070687755942344666,
-0.143959179520607,
0.07834220677614212,
-0.06759355217218399,
0.03987233340740204,
-0.17629249393939972,
0.0020672546233981848,
-0.054470062255859375,
-0.17869682610034943,
-0.06109767407178879,
-0.11720109730958939,
0.009531770832836628,
-0.035048872232437134,
0.030912665650248528,
-0.09398124366998672,
0.0453958734869957,
0.020194150507450104,
0.11482768505811691,
0.0925065129995346,
0.009536135010421276,
-0.09018197655677795,
-0.045322518795728683,
-0.006506751291453838,
0.024636199697852135,
-0.08039677888154984,
0.17308543622493744,
0.21793070435523987,
-0.26416489481925964,
0.14030711352825165,
-0.05770057067275047,
-0.04421987384557724,
-0.09014252573251724,
-0.26591598987579346,
0.21414731442928314,
0.09847557544708252,
-0.012056549079716206,
0.013329481706023216,
-0.11943833529949188,
-0.04771578684449196,
-0.1602548360824585,
-0.06877119839191437,
-0.041558850556612015,
0.13299039006233215,
-0.06663385033607483,
0.05641980096697807,
0.031847499310970306,
0.06987501680850983,
-0.035368941724300385,
0.1277768611907959,
-0.005689803510904312,
0.05001046508550644,
-0.14549118280410767,
-0.058069586753845215,
-0.015393625944852829,
-0.08368189632892609,
0.009756101295351982,
-0.020976634696125984,
0.12649476528167725,
0.009715065360069275,
0.12519532442092896,
-0.09802786260843277,
0.05137454345822334,
-0.10597088187932968,
0.14751246571540833,
0.10299085825681686,
0.06301296502351761,
0.042458534240722656,
-0.05929064750671387,
-0.08614709228277206,
0.013677116483449936,
0.02580610290169716,
0.11394204944372177,
0.0029656661208719015,
-0.18817104399204254,
0.07533597946166992,
0.19065119326114655,
0.1564444601535797,
-0.0476125068962574,
0.11510229110717773,
0.08798053860664368,
-0.007951067760586739,
-0.18422621488571167,
-0.10270172357559204,
-0.3855285048484802,
-0.05246593803167343,
0.0009706334094516933,
-0.01911884918808937,
0.041599731892347336,
0.07841327041387558,
0.024875978007912636,
0.16504719853401184,
0.07322727888822556,
0.11953115463256836,
0.08738976716995239,
0.1912713646888733,
-0.005510346498340368,
-0.08639407157897949,
-0.01755022630095482,
-0.056049153208732605,
0.01978284679353237,
0.22637969255447388,
-0.03067559003829956,
-0.22765418887138367,
-0.0006973157287575305,
0.033241286873817444,
0.03689894080162048,
-0.09518686681985855,
0.056049782782793045,
0.2787225544452667,
0.24975761771202087,
-0.023900853469967842,
0.11268744617700577,
0.3275119662284851,
-0.06279689818620682,
0.06374052911996841,
-0.09290504455566406,
-0.07170245796442032,
-0.03361419215798378,
0.18662752211093903,
-0.024971511214971542,
-0.18843796849250793,
0.09711392968893051,
-0.2104632556438446,
0.08156456798315048,
-0.21234029531478882,
0.03443055599927902,
-0.016238071024417877,
-0.06366827338933945,
-0.08979447185993195,
-0.13099895417690277,
-0.08243658393621445,
-0.15099141001701355,
-0.015674225986003876,
0.19136908650398254,
-0.15702949464321136,
0.09433567523956299,
-0.03081713616847992,
-0.1571061760187149,
-0.1749996542930603,
0.07716140896081924,
-0.09587972611188889,
-0.07043256610631943,
0.023894885554909706,
-0.10901409387588501,
0.16424335539340973,
-0.0940445214509964,
0.18827836215496063,
0.19112762808799744,
0.04469599947333336,
0.041793420910835266,
0.043860018253326416,
0.08471830189228058,
0.10733327269554138,
0.12659616768360138,
-0.0024612057022750378,
-0.04658805951476097,
-0.09489179402589798,
0.14326931536197662,
0.0770961344242096,
-0.026004720479249954,
0.07620555907487869,
0.30598264932632446,
0.07309134304523468,
0.132887065410614,
-0.00006449294596677646,
-0.18381138145923615,
-0.05307689681649208,
-0.049194470047950745,
-0.010509169660508633,
0.009026404470205307,
0.07584919780492783,
-0.07282272726297379,
-0.13047383725643158,
0.16344642639160156,
0.04690003767609596,
0.20178867876529694,
-0.04579463601112366,
0.031527310609817505,
0.155106782913208,
0.1029970571398735,
-0.08774056285619736,
0.05464006960391998,
0.056636083871126175,
0.040604252368211746,
-0.08278139680624008,
0.2004094123840332,
-0.028806278482079506,
-0.04434754326939583,
0.05445583909749985,
-0.019367067143321037,
-0.10540084540843964,
0.049727026373147964,
-0.07393158227205276,
0.015792353078722954,
0.2036062330007553,
0.07347042113542557,
-0.09261661767959595,
0.070032499730587,
-0.05741899088025093,
-0.1036624014377594,
-0.1766936480998993,
-0.14028438925743103,
0.09942644834518433,
0.03433264419436455,
-0.020758481696248055,
-0.029116250574588776,
0.06833838671445847,
0.07283132523298264,
-0.0405576229095459,
0.05382721126079559,
-0.09170912951231003,
-0.07073405385017395,
-0.06449978798627853,
0.04681921750307083,
-0.13814857602119446,
0.008419732563197613,
-0.03136539086699486,
0.13275332748889923,
0.02644161880016327,
0.0570654459297657,
-0.017479341477155685,
-0.009801634587347507,
0.049066003412008286,
-0.06089228764176369,
-0.1315516084432602,
-0.017624707892537117,
0.04723748192191124,
0.14397862553596497,
0.12009087949991226,
0.06430383771657944,
0.020080341026186943,
0.08902116119861603,
0.11214367300271988,
-0.019167030230164528,
-0.24855974316596985,
-0.08187981694936752,
0.045443423092365265,
0.004951666574925184,
0.08985791355371475,
0.023912226781249046,
0.02387358248233795,
0.040958862751722336,
-0.06662926077842712,
-0.009443731047213078,
-0.03806788846850395,
0.04493457451462746,
-0.005840471014380455,
0.14053888618946075,
0.0034349439665675163,
-0.1101209744811058,
0.3373684883117676,
-0.08931247889995575,
-0.17602278292179108,
0.1574048399925232,
-0.031883083283901215,
-0.0722789466381073,
0.01604738086462021,
-0.03593965247273445,
0.03769434243440628,
0.07267135381698608,
-0.03299583122134209,
-0.034571900963783264,
-0.15263806283473969,
0.05974068120121956,
-0.12305500358343124,
0.001131855184212327,
-0.08067774772644043,
0.06476622074842453,
0.007529606577008963,
0.04133422300219536,
-0.21058806777000427,
-0.13064716756343842,
-0.14596906304359436,
0.06445804983377457,
0.08115016669034958,
-0.16647116839885712,
0.08877742290496826,
0.013674869202077389,
-0.07647871226072311,
0.10156615078449249,
0.02874992974102497,
-0.3335897624492645,
0.1438414603471756,
-0.22306077182292938,
0.02278701215982437,
-0.04821082949638367,
0.143098846077919,
0.01606430485844612,
-0.12584663927555084,
-0.1790515035390854,
0.09951819479465485,
0.19412876665592194,
0.035275738686323166,
-0.10359229892492294,
-0.08166851848363876,
0.0540834441781044,
-0.27143368124961853,
0.022505542263388634,
0.010692031122744083,
0.017651455476880074,
0.11468997597694397,
0.045812491327524185,
-0.05381844937801361,
0.1516430824995041,
0.052728015929460526,
0.14071661233901978,
-0.05933105945587158,
-0.1059178039431572,
-0.16339629888534546,
-0.09946586936712265,
-0.07214363664388657,
-0.1481938511133194,
0.04835604876279831,
0.019774848595261574,
0.30660387873649597,
-0.03997739404439926,
0.14279864728450775,
0.19553832709789276,
-0.15389494597911835,
0.16511182487010956,
0.02113407477736473,
-0.0981997698545456,
0.035317882895469666,
-0.028839409351348877,
0.08121932297945023,
-0.022341109812259674,
0.09090176224708557,
0.09540143609046936,
-0.05679386854171753,
-0.1526321917772293,
-0.11709081381559372,
-0.1548430621623993,
0.1005331501364708,
-0.03597520291805267,
-0.06822367012500763,
0.09353721886873245,
0.10154362767934799,
-0.03357158228754997,
0.04772770032286644,
-0.016500253230333328,
0.01759316772222519,
-0.0845443457365036,
0.04603065177798271,
0.10619247704744339,
0.01804194040596485,
-0.06760136783123016,
-0.08968888223171234,
0.2525443434715271,
-0.09015533328056335,
0.17809723317623138,
-0.03600584715604782,
-0.15661023557186127,
0.0030712545849382877,
0.09102684259414673,
-0.007508683949708939,
0.06823235750198364,
0.11551892012357712,
0.045130230486392975,
-0.004774286411702633,
0.2691238224506378,
-0.05964447557926178,
0.1701454073190689,
-0.06228061020374298,
-0.055869799107313156,
-0.05216190218925476,
-0.06237706542015076,
0.06720943003892899,
0.29370033740997314,
0.05565469712018967,
0.014896589331328869,
-0.05770457163453102,
-0.04759803041815758,
-0.05729832500219345,
0.14244389533996582,
0.14885887503623962,
-0.2344433218240738,
-0.09813476353883743,
0.0581946074962616,
0.07064484804868698,
0.07739569991827011,
0.10794175416231155,
-0.025303874164819717,
0.1025395318865776,
0.01975521445274353,
-0.0519646592438221,
0.007683272007852793,
-0.058247461915016174,
0.07405984401702881,
0.08886194229125977,
-0.07970184087753296,
0.1260126531124115,
0.16294659674167633,
-0.22004210948944092,
0.04302174970507622,
-0.12105543166399002,
-0.10212099552154541,
0.09408541023731232,
0.007543580606579781,
-0.05709706246852875,
0.06732005625963211,
-0.024303337559103966,
0.016168108209967613,
-0.12996502220630646,
0.060211557894945145,
0.008258859626948833,
0.14265765249729156,
0.012348785065114498,
-0.0497075691819191,
-0.16267235577106476,
0.009441579692065716,
0.13131344318389893,
-0.18343274295330048,
-0.025266850367188454,
-0.27071207761764526,
0.05240483582019806,
0.027587570250034332,
-0.05378761887550354,
-0.008677352219820023,
0.048071637749671936,
0.10420918464660645,
-0.10615398734807968,
0.05252961814403534,
0.11260563135147095,
-0.12047471851110458,
-0.05042659863829613,
-0.052701469510793686,
-0.07681247591972351,
0.21561521291732788,
-0.11578039079904556,
0.06924225389957428,
-0.15421552956104279,
-0.09435051679611206,
0.09304434061050415,
0.0715484470129013,
0.19659176468849182,
0.11311709135770798,
-0.018238145858049393,
0.05239347368478775,
-0.10932625085115433,
0.03427112102508545,
0.021885909140110016,
-0.036369673907756805,
0.07571499049663544,
0.04644280672073364,
-0.17089001834392548,
-0.03857582062482834,
-0.09895927459001541,
0.14056693017482758,
0.016796011477708817,
-0.19106529653072357,
0.02642228454351425,
-0.03660073131322861,
-0.12230895459651947,
0.018036413937807083,
-0.1934814602136612,
-0.13209277391433716,
-0.0002349447167944163,
0.056375499814748764,
-0.041094452142715454,
-0.05576985701918602,
0.20532262325286865,
0.03699669614434242,
-0.028821900486946106,
-0.03665473684668541,
0.03882937878370285,
-0.13674317300319672,
-0.051070086658000946,
-0.2149730771780014,
0.07514164596796036,
-0.10203813761472702,
-0.07208016514778137,
0.02822081185877323,
-0.23902836441993713,
-0.05113488808274269,
0.08885585516691208,
0.07759509980678558,
-0.01364859752357006,
-0.11459869891405106,
-0.15496008098125458,
-0.00959533080458641,
-2.818299721721458e-32,
0.019596358761191368,
-0.024312816560268402,
-0.008632157929241657,
0.06177980825304985,
-0.027593912556767464,
-0.017355160787701607,
0.050226517021656036,
-0.20986852049827576,
0.06410714983940125,
-0.1394680142402649,
0.0142961535602808,
-0.037508878856897354,
0.05262083187699318,
0.12350154668092728,
-0.09585948288440704,
0.11646025627851486,
0.09470762312412262,
-0.10351687669754028,
-0.14042401313781738,
0.04941314831376076,
0.20544026792049408,
-0.08410422503948212,
-0.05789586529135704,
0.04318545013666153,
-0.08341142535209656,
0.17298336327075958,
-0.026888320222496986,
0.08729813247919083,
0.035391829907894135,
-0.06575191020965576,
-0.05400896817445755,
0.02774924784898758,
-0.07659777998924255,
-0.03462579846382141,
0.053538307547569275,
0.018479304388165474,
-0.19351570308208466,
0.06783464550971985,
-0.10977969318628311,
-0.002405958715826273,
0.015307064168155193,
0.0029146841261535883,
-0.054687026888132095,
-0.061539120972156525,
0.10413692146539688,
0.05757416412234306,
0.005425176117569208,
0.12971755862236023,
-0.13721248507499695,
0.02905379608273506,
-0.08080121874809265,
0.15585672855377197,
-0.08372719585895538,
-0.05440477654337883,
0.12818507850170135,
0.02959367074072361,
0.07153172791004181,
-0.0034768511541187763,
0.09211700409650803,
-0.002210447797551751,
0.021418185904622078,
-0.03533809632062912,
-0.06271246820688248,
-0.009218506515026093,
0.0840768963098526,
0.028533313423395157,
0.2544691264629364,
-0.3286523222923279,
0.14151917397975922,
0.05486314743757248,
-0.0058347987942397594,
-0.03623739629983902,
0.010757176205515862,
-0.042241498827934265,
0.025094065815210342,
0.029983200132846832,
-0.031914085149765015,
-0.10703087598085403,
-0.05667643994092941,
-0.15340662002563477,
-0.10272417217493057,
-0.09241370856761932,
-0.017393432557582855,
0.10051794350147247,
0.059685755521059036,
0.11201361566781998,
-0.07451774924993515,
-0.052271004766225815,
0.11360959708690643,
-0.03433116152882576,
0.09089839458465576,
-0.04889349266886711,
0.08116734772920609,
0.09293924272060394,
0.06463469564914703,
-0.11555784195661545,
0.043113674968481064,
0.32564792037010193,
0.13776306807994843,
-0.09729274362325668,
0.132646381855011,
-0.005077744368463755,
-0.06627970933914185,
-0.059462789446115494,
0.09442219138145447,
-0.08166307955980301,
-0.018697001039981842,
0.28459635376930237,
-0.13698861002922058,
0.10577425360679626,
-0.10673893988132477,
-0.04576355591416359,
0.10635852813720703,
-0.028571294620633125,
0.04742184653878212,
-0.14732810854911804,
0.057222526520490646,
0.0877809152007103,
-0.05270764231681824,
0.06486078351736069,
-0.24564437568187714,
-0.13530822098255157,
-0.0835605263710022,
-0.10937805473804474,
-0.1131218895316124,
-0.0506906695663929,
0.03170232102274895,
0.03154600411653519,
0.03317071869969368,
-0.14991892874240875,
-0.03940071165561676,
-0.02836782857775688,
7.244494781843969e-7,
-0.09397004544734955,
0.09179248660802841,
0.017759820446372032,
-0.1137940064072609,
-0.01840348169207573,
0.07379959523677826,
-0.10633600503206253,
0.06450260430574417,
0.12857773900032043,
0.10887754708528519,
0.07057163864374161,
-0.13705360889434814,
-0.020362837240099907,
0.0901426151394844,
-0.04336398094892502,
-0.19795769453048706,
0.028786631301045418,
0.020306052640080452,
-0.1435125470161438,
0.07840622216463089,
0.20015546679496765,
0.24028562009334564,
0.023923324421048164,
0.04668918997049332,
0.022931108251214027,
-0.04912380129098892,
0.050128400325775146,
0.10568367689847946,
-0.14178532361984253,
-0.09331467002630234,
0.027088375762104988,
-0.0796789601445198,
-0.1585104763507843,
0.0230873916298151,
-0.17945411801338196,
-0.06627316772937775,
-0.06882129609584808,
0.0524616502225399,
-0.05777524411678314,
-0.015674429014325142,
-0.10148171335458755,
-0.002338758436962962,
-0.01399444229900837,
-0.0062630800530314445,
0.03267352655529976,
-0.007456518709659576,
-0.06161484494805336,
0.045061420649290085,
-0.20882856845855713,
-0.041199516505002975,
0.020002838224172592,
0.034548282623291016,
0.13757528364658356,
0.16715961694717407,
-0.08510944247245789,
-0.1445925533771515,
-0.03387974947690964,
-0.09401902556419373,
-0.004652534145861864,
-0.07714425027370453,
-0.02422485500574112,
0.04015388339757919,
-0.13768720626831055,
0.05557198449969292,
0.14446943998336792,
-0.0065654246136546135,
-0.1162363812327385,
8.559313901877004e-35,
0.04665883630514145,
-0.015006463043391705,
0.22104297578334808,
-0.05066085234284401,
-0.12761850655078888,
0.03507901728153229,
-0.018191654235124588,
-0.005640174727886915,
0.046180326491594315,
-0.04632088541984558,
-0.08810219913721085
] |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | cc @lhoestq in case you have any ideas here! Might need a multi-host set-up to debug (can give you access to a JAX one if you need) | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many workers
### Steps to reproduce the bug
Here, we have 2 JAX processes (`jax.process_count() = 2`) which we split the dataset over. The dataset loading script can be found here: https://huggingface.co/datasets/distil-whisper/librispeech_asr/blob/c6a1e805cbfeed5057400ac5937327d7e30281b8/librispeech_asr.py#L310
<details>
<summary> Code to reproduce </summary>
```python
from datasets import load_dataset
import jax
from datasets.distributed import split_dataset_by_node
from torch.utils.data import DataLoader
from tqdm import tqdm
# load an example dataset (https://huggingface.co/datasets/distil-whisper/librispeech_asr)
dataset = load_dataset("distil-whisper/librispeech_asr", "all", split="train.clean.100", streaming=True)
# just keep the text column -> no need to define a collator
dataset_text = dataset.remove_columns(set(dataset.features.keys()) - {"text"})
# define some constants
batch_size = 256
num_examples = 5 # works for 5 examples, doesn't for 8
num_workers = dataset_text.n_shards
# try with multiple workers
dataloader = DataLoader(dataset_text, batch_size=batch_size, num_workers=num_workers, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Multiple workers"):
if i == num_examples:
break
# try splitting by node (we can't do this with `dataset_text` since `split_dataset_by_node` expects the Audio column for an ASR dataset)
dataset = split_dataset_by_node(dataset, rank=jax.process_index(), world_size=jax.process_count())
# remove the text column again
dataset_text = dataset.remove_columns(set(dataset.features.keys()) - {"text"})
dataloader = DataLoader(dataset_text, batch_size=16, num_workers=num_workers // 2, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Split by node"):
if i == num_examples:
break
# too many workers
dataloader = DataLoader(dataset_text, batch_size=256, num_workers=num_workers, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Too many workers"):
if i == num_examples:
break
```
</details>
<details>
<summary> With 5 examples: </summary>
```
Multiple workers: 100%|███████████████████████████████████████████████████████████████████| 5/5 [00:16<00:00, 3.33s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Split by node: 100%|██████████████████████████████████████████████████████████████████████| 5/5 [00:13<00:00, 2.76s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Too many dataloader workers: 14 (max is dataset.n_shards=7). Stopping 7 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary t
o have a number of workers greater than dataset.n_shards=7. To enable more parallelism, please split the dataset in more
files than 7.
Too many workers: 100%|███████████████████████████████████████████████████████████████████| 5/5 [00:15<00:00, 3.03s/it]
```
</details>
<details>
<summary> With 7 examples: </summary>
```
Multiple workers: 100%|███████████████████████████████████████████████████████████████████| 8/8 [00:13<00:00, 1.71s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Split by node: 100%|██████████████████████████████████████████████████████████████████████| 8/8 [00:11<00:00, 1.38s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Too many dataloader workers: 14 (max is dataset.n_shards=7). Stopping 7 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=7. To enable more parallelism, please split the dataset in more files than 7.
Too many workers: 88%|██████████████████████████████████████████████████████████▋ | 7/8 [00:13<00:01, 1.89s/it]
Traceback (most recent call last):
File "distil-whisper/test_librispeech.py", line 36, in <module>
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Too many workers"):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 633, in __next__
data = self._next_data()
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
return self._process_data(data)
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 644, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 7.
Original Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
data.append(next(self.dataset_iter))
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 986, in __iter__
yield from self._iter_pytorch(ex_iterable)
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 920, in _iter_pytorch
for key, example in ex_iterable.shard_data_sources(worker_info.id, worker_info.num_workers):
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 540, in shard_data_sources
self.ex_iterable.shard_data_sources(worker_id, num_workers),
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 796, in shard_data_sources
self.ex_iterable.shard_data_sources(worker_id, num_workers),
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 126, in shard_data_sources
requested_gen_kwargs = _merge_gen_kwargs([gen_kwargs_list[i] for i in shard_indices])
File "/home/sanchitgandhi/datasets/src/datasets/utils/sharding.py", line 76, in _merge_gen_kwargs
for key in gen_kwargs_list[0]
IndexError: list index out of range
```
</details>
### Expected behavior
Should pass for both 5 and 7 examples
### Environment info
- `datasets` version: 2.12.1.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 27 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many workers
### Steps to reproduce the bug
Here, we have 2 JAX processes (`jax.process_count() = 2`) which we split the dataset over. The dataset loading script can be found here: https://huggingface.co/datasets/distil-whisper/librispeech_asr/blob/c6a1e805cbfeed5057400ac5937327d7e30281b8/librispeech_asr.py#L310
<details>
<summary> Code to reproduce </summary>
```python
from datasets import load_dataset
import jax
from datasets.distributed import split_dataset_by_node
from torch.utils.data import DataLoader
from tqdm import tqdm
# load an example dataset (https://huggingface.co/datasets/distil-whisper/librispeech_asr)
dataset = load_dataset("distil-whisper/librispeech_asr", "all", split="train.clean.100", streaming=True)
# just keep the text column -> no need to define a collator
dataset_text = dataset.remove_columns(set(dataset.features.keys()) - {"text"})
# define some constants
batch_size = 256
num_examples = 5 # works for 5 examples, doesn't for 8
num_workers = dataset_text.n_shards
# try with multiple workers
dataloader = DataLoader(dataset_text, batch_size=batch_size, num_workers=num_workers, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Multiple workers"):
if i == num_examples:
break
# try splitting by node (we can't do this with `dataset_text` since `split_dataset_by_node` expects the Audio column for an ASR dataset)
dataset = split_dataset_by_node(dataset, rank=jax.process_index(), world_size=jax.process_count())
# remove the text column again
dataset_text = dataset.remove_columns(set(dataset.features.keys()) - {"text"})
dataloader = DataLoader(dataset_text, batch_size=16, num_workers=num_workers // 2, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Split by node"):
if i == num_examples:
break
# too many workers
dataloader = DataLoader(dataset_text, batch_size=256, num_workers=num_workers, drop_last=True)
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Too many workers"):
if i == num_examples:
break
```
</details>
<details>
<summary> With 5 examples: </summary>
```
Multiple workers: 100%|███████████████████████████████████████████████████████████████████| 5/5 [00:16<00:00, 3.33s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Split by node: 100%|██████████████████████████████████████████████████████████████████████| 5/5 [00:13<00:00, 2.76s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Too many dataloader workers: 14 (max is dataset.n_shards=7). Stopping 7 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary t
o have a number of workers greater than dataset.n_shards=7. To enable more parallelism, please split the dataset in more
files than 7.
Too many workers: 100%|███████████████████████████████████████████████████████████████████| 5/5 [00:15<00:00, 3.03s/it]
```
</details>
<details>
<summary> With 7 examples: </summary>
```
Multiple workers: 100%|███████████████████████████████████████████████████████████████████| 8/8 [00:13<00:00, 1.71s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Split by node: 100%|██████████████████████████████████████████████████████████████████████| 8/8 [00:11<00:00, 1.38s/it]
Assigning 7 shards (or data sources) of the dataset to each node.
Too many dataloader workers: 14 (max is dataset.n_shards=7). Stopping 7 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=7. To enable more parallelism, please split the dataset in more files than 7.
Too many workers: 88%|██████████████████████████████████████████████████████████▋ | 7/8 [00:13<00:01, 1.89s/it]
Traceback (most recent call last):
File "distil-whisper/test_librispeech.py", line 36, in <module>
for i, batch in tqdm(enumerate(dataloader), total=num_examples, desc="Too many workers"):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 633, in __next__
data = self._next_data()
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
return self._process_data(data)
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 644, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 7.
Original Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
data.append(next(self.dataset_iter))
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 986, in __iter__
yield from self._iter_pytorch(ex_iterable)
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 920, in _iter_pytorch
for key, example in ex_iterable.shard_data_sources(worker_info.id, worker_info.num_workers):
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 540, in shard_data_sources
self.ex_iterable.shard_data_sources(worker_id, num_workers),
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 796, in shard_data_sources
self.ex_iterable.shard_data_sources(worker_id, num_workers),
File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 126, in shard_data_sources
requested_gen_kwargs = _merge_gen_kwargs([gen_kwargs_list[i] for i in shard_indices])
File "/home/sanchitgandhi/datasets/src/datasets/utils/sharding.py", line 76, in _merge_gen_kwargs
for key in gen_kwargs_list[0]
IndexError: list index out of range
```
</details>
### Expected behavior
Should pass for both 5 and 7 examples
### Environment info
- `datasets` version: 2.12.1.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
cc @lhoestq in case you have any ideas here! Might need a multi-host set-up to debug (can give you access to a JAX one if you need) | [
-0.06214360520243645,
0.045297250151634216,
-0.013454468920826912,
-0.053069595247507095,
-0.008188912644982338,
-0.10132548213005066,
0.3234979808330536,
0.170043483376503,
-0.05544796958565712,
0.15592138469219208,
-0.019626716151833534,
-0.10329588502645493,
-0.09056029468774796,
0.007402544375509024,
-0.12485983967781067,
-0.16796475648880005,
-0.023305436596274376,
-0.008693312294781208,
0.005436277948319912,
-0.054000336676836014,
-0.10387709736824036,
-0.00020072708139196038,
0.10820653289556503,
-0.10581963509321213,
-0.16968350112438202,
-0.28578856587409973,
-0.1394025832414627,
0.14005494117736816,
0.17373624444007874,
-0.04938545450568199,
0.07531095296144485,
-0.05883307754993439,
-0.08842229843139648,
0.12560796737670898,
0.000004594267466018209,
0.06069117411971092,
0.09223440289497375,
-0.026887649670243263,
0.03005160205066204,
0.003588950727134943,
0.05719509720802307,
0.01492013968527317,
-0.056987661868333817,
-0.027387646958231926,
-0.021469416096806526,
0.12009140849113464,
-0.1659119576215744,
0.16842631995677948,
0.20951634645462036,
0.015087181702256203,
-0.12376665323972702,
0.09520837664604187,
-0.004112072754651308,
0.029292084276676178,
-0.003408806398510933,
-0.1833002120256424,
0.022029699757695198,
-0.14184509217739105,
-0.10887852311134338,
0.07025434821844101,
-0.05358966812491417,
-0.08603892475366592,
0.14463046193122864,
0.07518284767866135,
-0.10142365097999573,
0.09580661356449127,
-0.17176593840122223,
-0.012279844842851162,
-0.07160507887601852,
0.08833886682987213,
-0.10864535719156265,
0.0516260527074337,
0.028588173910975456,
-0.030222386121749878,
-0.059163227677345276,
-0.2290535420179367,
-0.004412838723510504,
0.2519325315952301,
-0.1385108381509781,
0.06281028687953949,
-0.03460153192281723,
0.19609718024730682,
0.07830701768398285,
0.023496106266975403,
-0.07471977174282074,
-0.03827718645334244,
-0.010162563063204288,
0.1639212667942047,
-0.03331431746482849,
0.012797685340046883,
0.0961945503950119,
0.04968823492527008,
-0.1588049679994583,
-0.06680619716644287,
-0.1912042647600174,
-0.03320097550749779,
-0.02862841635942459,
-0.23522035777568817,
-0.04019930213689804,
-0.004802006296813488,
-0.0804954543709755,
-0.13242276012897491,
0.07900886982679367,
0.10570959746837616,
0.12386816740036011,
-0.13052093982696533,
0.08027862757444382,
-0.07770908623933792,
0.02672438882291317,
-0.04189736768603325,
-0.004503850359469652,
0.045590948313474655,
-0.12284921109676361,
-0.10881038010120392,
0.006418799515813589,
-0.001224121660925448,
0.12720565497875214,
0.09982200711965561,
-0.018554139882326126,
0.04489954188466072,
0.15754614770412445,
0.02949426881968975,
0.09721990674734116,
0.01871911995112896,
0.14258146286010742,
0.014399073086678982,
-0.061289913952350616,
0.011750146746635437,
-0.09263788908720016,
-0.10035529732704163,
-0.019934363663196564,
0.028359245508909225,
0.03305106610059738,
0.04465414956212044,
0.02453911118209362,
-0.1271003931760788,
0.057204391807317734,
-0.2221156358718872,
0.07382620871067047,
-0.0834336057305336,
0.016839182004332542,
-0.17392940819263458,
0.017985748127102852,
-0.04894234240055084,
0.1529686599969864,
0.015107743442058563,
0.03503582626581192,
-0.08793031424283981,
-0.027031512930989265,
-0.10565111041069031,
-0.051170431077480316,
-0.08404834568500519,
-0.19045843183994293,
0.16464798152446747,
-0.11129681020975113,
0.14721716940402985,
0.1675342321395874,
-0.04921218380331993,
-0.06207989528775215,
0.012585403397679329,
0.16915342211723328,
0.11492902785539627,
-0.16397546231746674,
-0.047191064804792404,
-0.07002474367618561,
-0.021292103454470634,
0.10994129627943039,
-0.017577461898326874,
-0.02881094068288803,
0.01678113080561161,
0.15448273718357086,
-0.03989020735025406,
-0.06332382559776306,
-0.06411054730415344,
0.03484926372766495,
0.2770966589450836,
-0.06201152130961418,
0.10285340249538422,
-0.35771724581718445,
0.2135244756937027,
-0.08796805143356323,
-0.12884432077407837,
0.11754359304904938,
-0.1602046638727188,
0.22867728769779205,
-0.15895581245422363,
0.10087909549474716,
0.07927702367305756,
-0.19391119480133057,
-0.009534124284982681,
0.0514269582927227,
0.13251511752605438,
-0.07740817219018936,
-0.10127876698970795,
0.09663566946983337,
-0.15517444908618927,
-0.06955228000879288,
-0.11853983253240585,
0.12422110140323639,
-0.23930150270462036,
-0.04551869258284569,
-0.056084223091602325,
0.05700145289301872,
0.03504914417862892,
0.0017016332130879164,
-0.13385240733623505,
-0.10943151265382767,
0.32559823989868164,
0.17334331572055817,
-0.20949091017246246,
-0.13486596941947937,
0.15492543578147888,
0.01929406262934208,
0.07989248633384705,
-0.11202725768089294,
0.05408373475074768,
-0.005463866982609034,
0.004320058040320873,
-0.07000460475683212,
-0.006152985617518425,
-0.02601286955177784,
-0.03002757392823696,
-0.12272319942712784,
0.00806704442948103,
0.04289202392101288,
0.1324900984764099,
-0.010902653448283672,
0.01700221747159958,
0.1092715784907341,
0.08938319236040115,
-0.10819008946418762,
-0.1363140493631363,
0.2319534868001938,
0.01975836604833603,
-0.076791912317276,
0.04710851237177849,
-0.004898260347545147,
-0.30608195066452026,
0.07549276202917099,
-0.049511514604091644,
-0.19198757410049438,
0.06778277456760406,
-0.1811092048883438,
-0.12169051170349121,
0.06574757397174835,
0.10252891480922699,
-0.09271474927663803,
0.02510712295770645,
-0.01992979645729065,
-0.11412369459867477,
0.049891553819179535,
0.030525103211402893,
0.026912260800600052,
0.08411375433206558,
-0.07819346338510513,
-0.27320995926856995,
0.01722763292491436,
0.020302899181842804,
0.07383684068918228,
-0.002940337872132659,
0.18416735529899597,
0.062371086329221725,
0.0014255294809117913,
-0.094639353454113,
-0.0009359128307551146,
-0.15172334015369415,
-0.03610320761799812,
0.13486747443675995,
0.03236164525151253,
0.038320545107126236,
0.22653880715370178,
-0.1547682136297226,
0.01401474978774786,
-0.06750492751598358,
0.005571459885686636,
-0.10186995565891266,
-0.04989594593644142,
0.1762651652097702,
-0.05241584777832031,
0.034489959478378296,
-0.015553787350654602,
0.04918678477406502,
0.2854841649532318,
-0.0055930460803210735,
0.048435721546411514,
0.03508124127984047,
-0.015417815186083317,
0.07186407595872879,
-0.27870726585388184,
0.04830464720726013,
0.0070510623045265675,
-0.25956207513809204,
-0.0926942229270935,
-0.13003163039684296,
0.05608309060335159,
0.03961871191859245,
-0.03442207723855972,
-0.02955751307308674,
0.0909838154911995,
0.06706615537405014,
-0.03224516659975052,
-0.040155936032533646,
0.160753533244133,
-0.06526389718055725,
-0.04018847644329071,
0.11429142206907272,
0.017815828323364258,
0.19782325625419617,
-0.1503341943025589,
-0.04746246710419655,
-0.04508310928940773,
-0.000021335345081752166,
0.06459629535675049,
0.09109529107809067,
0.24849021434783936,
-0.08646697551012039,
0.07403241097927094,
-0.1797950714826584,
0.050717681646347046,
-0.09266822040081024,
-0.12190123647451401,
0.2458152025938034,
-0.05876041203737259,
-0.05715251713991165,
0.00567436870187521,
-0.14037035405635834,
-0.17069828510284424,
-0.08368513733148575,
-0.035290446132421494,
0.08924821764230728,
0.038540393114089966,
0.0627378299832344,
-0.2130603790283203,
0.05027499794960022,
0.1491711288690567,
-0.14169460535049438,
-0.09889153391122818,
-0.07496120780706406,
0.26700034737586975,
-0.05978720635175705,
-0.11446983367204666,
-0.007253865245729685,
-0.10863985866308212,
-0.03319743275642395,
0.13229647278785706,
0.06020425260066986,
0.1167273223400116,
0.011898237280547619,
-0.1277874857187271,
0.1404225081205368,
0.05078372731804848,
0.07940376549959183,
-0.04375410079956055,
-0.024260586127638817,
-0.23520594835281372,
0.08360956609249115,
-0.13670337200164795,
0.07521898299455643,
0.025793690234422684,
-0.04565584659576416,
0.22620782256126404,
0.15205730497837067,
0.33686012029647827,
-0.16119815409183502,
-0.055421605706214905,
0.010835344903171062,
0.0558900460600853,
-0.14267507195472717,
0.07545780390501022,
-0.2831592559814453,
0.14332084357738495,
-0.07905715703964233,
-0.09395584464073181,
-0.07644069939851761,
-0.02543691359460354,
-0.041457630693912506,
0.008420615456998348,
-0.1104511022567749,
0.0546017661690712,
-0.1311718225479126,
0.03348146378993988,
-0.005808079149574041,
0.009049365296959877,
-0.0010806276695802808,
0.10169012099504471,
0.09336917102336884,
-0.007327325642108917,
-0.12089012563228607,
-0.1724415272474289,
0.20547311007976532,
-0.0486128069460392,
-0.03367353975772858,
0.08051333576440811,
-0.11579060554504395,
0.053947072476148605,
0.04467334225773811,
0.1643846035003662,
0.17998850345611572,
-0.026680514216423035,
-0.09965083003044128,
0.12946933507919312,
0.19421084225177765,
-0.007137272972613573,
0.016993138939142227,
-0.025073880329728127,
-0.005849051289260387,
-0.05535542964935303,
0.07797190546989441,
0.09011136740446091,
0.12356752902269363,
0.13662005960941315,
0.06888093054294586,
-0.0034477354492992163,
0.021340658888220787,
0.2782658636569977,
-0.0411435142159462,
-0.0740719810128212,
-0.17177246510982513,
0.08361649513244629,
-0.18102878332138062,
-0.08109021186828613,
-0.16657865047454834,
0.1284852921962738,
0.3128039240837097,
-0.021703418344259262,
0.02506028674542904,
-0.016712436452507973,
-0.05045349523425102,
0.07873180508613586,
0.017586128786206245,
-0.06397268176078796,
-0.01689857244491577,
0.2946682274341583,
0.05204349011182785,
0.19322796165943146,
0.020936276763677597,
0.1415567547082901,
-0.21545813977718353,
0.03696376830339432,
0.010141740553081036,
-0.1851881444454193,
0.06231701001524925,
0.2870979905128479,
-0.17362308502197266,
0.10768736153841019,
-0.048942118883132935,
0.03712517395615578,
0.1196647360920906,
0.07483339309692383,
0.1026865616440773,
-0.10852229595184326,
-0.11448977142572403,
-0.018475180491805077,
-0.20900623500347137,
0.07358504086732864,
0.06010190397500992,
0.08502552658319473,
-0.17211589217185974,
-0.006192712113261223,
0.0904783234000206,
-0.07645822316408157,
-0.04936353862285614,
0.004319808911532164,
-0.015131020918488503,
0.006792166270315647,
0.15925031900405884,
0.0889785885810852,
-0.06684761494398117,
0.019099321216344833,
0.03736809268593788,
-0.07684703171253204,
0.03235918655991554,
0.09932981431484222,
0.060606397688388824,
0.2510735094547272,
0.009900922887027264,
0.035852376371622086,
-0.12111195176839828,
0.11911645531654358,
-0.12697412073612213,
0.2868795692920685,
-0.10090430825948715,
0.001417360152117908,
-0.006114225834608078,
-0.01709434762597084,
0.20729058980941772,
-0.054595641791820526,
-0.11859828978776932,
-0.1324802190065384,
0.09215826541185379,
-0.1671421378850937,
0.06030254065990448,
-0.12647856771945953,
0.09568507969379425,
0.2784363031387329,
-0.049138836562633514,
-0.05029942840337753,
0.03394579142332077,
0.10018335282802582,
0.10126373171806335,
0.08913759887218475,
0.029897594824433327,
0.15683577954769135,
-0.1482715755701065,
0.030202293768525124,
-0.07760784029960632,
0.06152397394180298,
-0.06702353060245514,
0.12558715045452118,
-0.08996651321649551,
-0.18170776963233948,
0.08298511803150177,
-0.0939117893576622,
-0.14111760258674622,
0.10925078392028809,
-0.02031829208135605,
-0.16148784756660461,
0.10941597819328308,
0.007767134811729193,
-0.010030040517449379,
0.01009923405945301,
0.06523152440786362,
0.025416309013962746,
-0.06163858249783516,
-0.04065956920385361,
0.061590056866407394,
0.02740912139415741,
-0.010236435569822788,
0.12597717344760895,
0.21950972080230713,
0.16497470438480377,
0.07272423058748245,
0.2420877367258072,
-0.03486638516187668,
-0.04831746220588684,
0.0940924882888794,
0.10702676326036453,
-0.07403530925512314,
0.07612457126379013,
-0.22665423154830933,
0.07682273536920547,
-0.08468086272478104,
-0.0339839793741703,
0.13615839183330536,
0.12392451614141464,
0.03232783451676369,
-0.07663517445325851,
0.05100024491548538,
0.06969216465950012,
-0.11672057956457138,
0.050421345978975296,
0.06669683009386063,
0.13699854910373688,
-0.08555594831705093,
0.19461920857429504,
-2.3270083230142126e-32,
-0.044349994510412216,
-0.14042751491069794,
-0.11376229673624039,
0.13754378259181976,
-0.1409454494714737,
0.015906713902950287,
-0.15863722562789917,
-0.06964799016714096,
0.12236076593399048,
0.040561843663454056,
-0.24982166290283203,
0.13370810449123383,
0.061876073479652405,
0.009921170771121979,
0.05042767524719238,
-0.06417985260486603,
0.19764456152915955,
0.010852852836251259,
-0.0820048451423645,
-0.038490455597639084,
0.08063334226608276,
0.1240106150507927,
0.14228269457817078,
0.26432913541793823,
-0.14734560251235962,
0.011522682383656502,
-0.04764154180884361,
-0.152435302734375,
0.09161745011806488,
-0.30337804555892944,
-0.030323689803481102,
0.2683923542499542,
-0.0018751330208033323,
-0.023339632898569107,
-0.09861321747303009,
0.06565029174089432,
-0.1335570514202118,
-0.019062630832195282,
0.02098940499126911,
0.08989640325307846,
0.0012462909799069166,
0.13912682235240936,
0.08224949985742569,
-0.07002609223127365,
0.04618240147829056,
0.09814672917127609,
0.07144666463136673,
0.02721046656370163,
-0.027087945491075516,
-0.1852223426103592,
0.0988173559308052,
0.0728565976023674,
0.048037365078926086,
0.05332626774907112,
0.0042618499137461185,
-0.2267926186323166,
0.07528883963823318,
0.10528013110160828,
-0.3147204518318176,
0.09717400372028351,
0.19335055351257324,
-0.18346402049064636,
0.006713670212775469,
-0.01094836089760065,
-0.015580475330352783,
0.12275335937738419,
0.2680353820323944,
-0.0013787803472951055,
0.30783548951148987,
-0.10757357627153397,
-0.09458404034376144,
0.099390909075737,
-0.17585475742816925,
-0.08194255083799362,
-0.1108761578798294,
-0.01465112529695034,
-0.17935480177402496,
0.054266076534986496,
0.01857592724263668,
0.027840200811624527,
0.09082379192113876,
0.0787012055516243,
0.1428164690732956,
0.01886822283267975,
-0.031122364103794098,
0.02325919084250927,
0.06385200470685959,
0.04935676231980324,
-0.09818809479475021,
-0.04919969663023949,
-0.025861352682113647,
0.07723000645637512,
-0.08853762596845627,
-0.14615316689014435,
-0.11257670074701309,
0.18070416152477264,
-0.04649566486477852,
0.116621233522892,
-0.13851971924304962,
-0.053131602704524994,
-0.12078391015529633,
0.0470721535384655,
0.048319440335035324,
0.08506802469491959,
0.023167822510004044,
-0.14986084401607513,
0.14766378700733185,
-0.09075792133808136,
-0.09192140400409698,
0.053366340696811676,
-0.061328113079071045,
-0.0811811313033104,
0.09835292398929596,
0.14941847324371338,
0.20404283702373505,
-0.1269189715385437,
0.0922485962510109,
-0.1914103925228119,
0.24290195107460022,
0.12217901647090912,
-0.03725496679544449,
-0.07144515216350555,
-0.18170249462127686,
-0.08802744001150131,
0.01189708523452282,
0.09814908355474472,
-0.10095448046922684,
-0.07675345242023468,
0.12440933287143707,
-0.13640987873077393,
0.01975131221115589,
0.06381009519100189,
7.026936259535432e-7,
-0.19969627261161804,
0.052450310438871384,
-0.18047155439853668,
-0.09056393802165985,
-0.08010844886302948,
0.02424285002052784,
-0.15292921662330627,
0.04891950264573097,
-0.1202150359749794,
0.2666614353656769,
0.11827490478754044,
0.05263910070061684,
0.08644439280033112,
-0.08733123540878296,
-0.01304900087416172,
-0.09912773221731186,
-0.16061927378177643,
0.1138763427734375,
-0.07522065192461014,
-0.054035335779190063,
-0.08687572926282883,
0.026128113269805908,
0.07210655510425568,
-0.12412015348672867,
-0.06464187055826187,
0.08945503830909729,
-0.13644258677959442,
-0.01936938613653183,
-0.010147751308977604,
-0.03615471348166466,
0.05299049988389015,
-0.1845007836818695,
0.08580508828163147,
0.04923688620328903,
-0.00499554630368948,
0.0260159894824028,
-0.14060010015964508,
-0.14482712745666504,
-0.009296164847910404,
0.03726562485098839,
0.009663103148341179,
-0.041636452078819275,
0.005633723456412554,
-0.04557058960199356,
-0.013153346255421638,
0.204335018992424,
-0.07140567898750305,
0.2972351014614105,
-0.032306548207998276,
-0.11281217634677887,
-0.0757175013422966,
0.2494269758462906,
0.024478795006871223,
0.33998075127601624,
-0.10016459226608276,
-0.24562467634677887,
0.17411556839942932,
-0.3283173739910126,
0.05000050365924835,
-0.045254383236169815,
-0.09778526425361633,
-0.10169805586338043,
0.06136468052864075,
0.09483447670936584,
0.19634033739566803,
-0.043059077113866806,
-0.07864048331975937,
2.0562145521048038e-35,
0.05673840269446373,
0.08646678179502487,
-0.14527401328086853,
0.06829933822154999,
-0.06864948570728302,
-0.11897358298301697,
-0.17382051050662994,
0.15553930401802063,
-0.11805389821529388,
-0.31418249011039734,
-0.07759609073400497
] |
https://github.com/huggingface/datasets/issues/5880 | load_dataset from s3 file system through streaming can't not iterate data | This sounds related to #5281.
Can you try passing `storage_options=s3_client.storage_options` instead passing it to `use_auth_token=` ? | ### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
| 16 | load_dataset from s3 file system through streaming can't not iterate data
### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
This sounds related to #5281.
Can you try passing `storage_options=s3_client.storage_options` instead passing it to `use_auth_token=` ? | [
0.12874841690063477,
-0.007074485067278147,
-0.03872264549136162,
0.09189089387655258,
0.2389625757932663,
0.01679443009197712,
0.06029531732201576,
-0.10724210739135742,
0.04599570110440254,
0.13045640289783478,
-0.17914016544818878,
-0.06783029437065125,
0.06485654413700104,
-0.016166573390364647,
0.012949704192578793,
0.03803639858961105,
0.03862999752163887,
0.047957729548215866,
0.048498112708330154,
-0.06738287210464478,
-0.08253590017557144,
0.01021205447614193,
0.11260269582271576,
-0.07349223643541336,
0.04144372418522835,
0.010092749260365963,
-0.006053984630852938,
0.13309644162654877,
0.03243805095553398,
-0.18796826899051666,
0.019615162163972855,
-0.03945374861359596,
0.04490593820810318,
0.12635186314582825,
0.0000055817417887737975,
0.013085119426250458,
0.11563932150602341,
0.04920605570077896,
-0.10850086063146591,
-0.13094063103199005,
0.13588789105415344,
-0.13740715384483337,
-0.05911388620734215,
-0.06976346671581268,
-0.006768040359020233,
-0.07130812108516693,
-0.013171934522688389,
0.0036032756324857473,
0.08379463106393814,
0.041545797139406204,
-0.14242424070835114,
0.0734194740653038,
-0.14568783342838287,
-0.18319813907146454,
0.09945906698703766,
0.0909884050488472,
0.004867842886596918,
0.17607837915420532,
-0.11047318577766418,
0.032047078013420105,
-0.10704983025789261,
-0.08753634989261627,
-0.11245281249284744,
0.12782961130142212,
-0.03941285237669945,
0.05722937732934952,
-0.11760705709457397,
-0.18951614201068878,
-0.033936385065317154,
0.17376437783241272,
-0.056123778223991394,
0.23257318139076233,
-0.12272072583436966,
-0.052806250751018524,
-0.04968227818608284,
-0.03145166486501694,
-0.045973315834999084,
-0.0035472188610583544,
-0.08684144914150238,
0.10928547382354736,
-0.14027589559555054,
-0.03409727290272713,
-0.11011016368865967,
0.06163226440548897,
-0.14230313897132874,
0.004123110324144363,
-0.17197801172733307,
0.027210740372538567,
-0.02123997174203396,
-0.0447554811835289,
0.12858951091766357,
0.04536126181483269,
-0.15424349904060364,
-0.1928630769252777,
0.07954282313585281,
0.10243164002895355,
0.11164910346269608,
-0.08654555678367615,
-0.0005791618023067713,
0.014623710885643959,
0.02231251820921898,
-0.07772135734558105,
-0.031064463779330254,
0.10254158824682236,
0.09585773944854736,
-0.11879826337099075,
0.017259975895285606,
-0.06266842037439346,
0.0381888784468174,
0.12289918214082718,
0.029245581477880478,
0.04937288537621498,
-0.09810429811477661,
-0.09403561800718307,
0.056080613285303116,
-0.01562136597931385,
0.16666406393051147,
0.12826091051101685,
0.1341732144355774,
0.14857682585716248,
-0.07111341506242752,
0.05224009230732918,
-0.017123151570558548,
0.1932612806558609,
0.07816416770219803,
0.017628781497478485,
-0.08098379522562027,
0.03696953505277634,
-0.0609135664999485,
0.07111784815788269,
0.046983495354652405,
-0.08029308915138245,
-0.031160587444901466,
0.008827576413750648,
0.14385676383972168,
-0.17519517242908478,
0.08418262749910355,
-0.09301026165485382,
0.008778431452810764,
-0.09739220142364502,
0.00970376469194889,
-0.09167730063199997,
-0.06885384023189545,
0.09624378383159637,
0.08062151074409485,
0.009703240357339382,
0.046845220029354095,
-0.04232023283839226,
-0.04515776410698891,
-0.086182601749897,
-0.22425518929958344,
0.07442920655012131,
-0.29216599464416504,
-0.01951863057911396,
-0.2630307972431183,
-0.057247571647167206,
-0.21037228405475616,
-0.003542268881574273,
-0.19905154407024384,
0.0346151627600193,
0.13028691709041595,
0.04184119403362274,
-0.022332757711410522,
-0.08522921055555344,
0.22588205337524414,
0.04782718047499657,
0.09923195838928223,
-0.020460084080696106,
0.0005506188026629388,
0.02149009518325329,
0.05537065491080284,
0.023794354870915413,
0.02207815647125244,
-0.10821976512670517,
-0.26218730211257935,
0.2305039018392563,
-0.07097361236810684,
-0.06653274595737457,
-0.20791329443454742,
0.15214762091636658,
0.11177123337984085,
-0.0455622635781765,
0.015163149684667587,
-0.11846915632486343,
0.07456716150045395,
-0.04617973789572716,
-0.08570841699838638,
0.0894618108868599,
0.04008728638291359,
-0.11915670335292816,
0.0811200737953186,
0.020453061908483505,
-0.10325510799884796,
0.019634965807199478,
-0.07141420990228653,
-0.04633675515651703,
-0.001791756716556847,
-0.016113735735416412,
0.05043287202715874,
-0.19078853726387024,
-0.03744727745652199,
0.1155196875333786,
0.19800817966461182,
0.028062112629413605,
-0.01019861176609993,
0.00008547688776161522,
-0.09391281008720398,
0.10658903419971466,
0.276891827583313,
-0.21003198623657227,
-0.18911497294902802,
0.03940075263381004,
-0.10634464025497437,
0.04793332889676094,
-0.2726844251155853,
0.014187105931341648,
-0.16314123570919037,
0.1425827443599701,
-0.007430975325405598,
0.1411104053258896,
-0.0644194632768631,
0.06113447621464729,
0.11515829712152481,
-0.005255952477455139,
-0.04150695353746414,
0.15699118375778198,
-0.03739674761891365,
0.032325904816389084,
0.10120140761137009,
-0.011836962774395943,
-0.006052174139767885,
-0.05280016362667084,
0.1551022231578827,
0.11358354985713959,
0.004518773406744003,
0.1777326762676239,
0.021618550643324852,
-0.1728392243385315,
0.05991305783390999,
0.07524168491363525,
-0.10301274061203003,
0.0604436956346035,
0.03144669160246849,
-0.09659337997436523,
0.04898028075695038,
0.036522187292575836,
-0.07701506465673447,
0.1718319058418274,
-0.0715031772851944,
-0.02791718952357769,
0.2966555058956146,
0.14525531232357025,
-0.20668064057826996,
0.05092133954167366,
0.08340156823396683,
-0.11945151537656784,
0.04859664663672447,
0.18144498765468597,
-0.10338285565376282,
-0.0793861523270607,
0.27131450176239014,
-0.009417597204446793,
-0.0528949499130249,
0.01601880043745041,
0.15966486930847168,
-0.13479197025299072,
0.09284799546003342,
0.0811815857887268,
0.07490503042936325,
0.09790408611297607,
0.05556410178542137,
-0.15506461262702942,
-0.005913577042520046,
-0.12292654067277908,
0.04227159917354584,
0.02011810801923275,
0.001311402185820043,
-0.053608182817697525,
-0.03287459537386894,
-0.0019449410028755665,
-0.023473193868994713,
0.13584986329078674,
0.07144870609045029,
-0.1525949090719223,
0.10680792480707169,
0.06298777461051941,
-0.04778807982802391,
0.07851796597242355,
0.09992439299821854,
-0.08970139175653458,
0.05676735192537308,
-0.02998902089893818,
0.015937471762299538,
-0.09357161074876785,
0.06073876470327377,
-0.021635014563798904,
0.1573515683412552,
0.04767504706978798,
0.08529733866453171,
0.006806784775108099,
-0.16541323065757751,
0.0893336609005928,
0.006258570589125156,
0.07086613029241562,
0.07959158718585968,
0.06122767925262451,
0.15477484464645386,
0.14670924842357635,
-0.11721525341272354,
-0.09155271202325821,
-0.05102158337831497,
0.0005195533740334213,
0.051685456186532974,
0.14353451132774353,
0.08640678972005844,
0.005334986839443445,
-0.015431851148605347,
-0.16966615617275238,
0.13190814852714539,
0.0896526649594307,
-0.053713299334049225,
0.27468863129615784,
-0.08135096728801727,
-0.09830636531114578,
0.07608994096517563,
0.05969049781560898,
-0.031986359506845474,
-0.13335976004600525,
0.04898002743721008,
0.004419987089931965,
-0.07003135979175568,
0.010625242255628109,
-0.04496817663311958,
-0.007167767267674208,
-0.026826847344636917,
-0.20671357214450836,
-0.14753225445747375,
-0.11084597557783127,
0.3781021237373352,
-0.04343779385089874,
-0.048945341259241104,
-0.002418569289147854,
-0.017538459971547127,
-0.05711423233151436,
-0.013580364175140858,
-0.18767863512039185,
-0.08648893982172012,
-0.06406966596841812,
-0.16994601488113403,
-0.14779499173164368,
0.0372135266661644,
-0.06864611059427261,
-0.07362323254346848,
-0.047844793647527695,
-0.009390232153236866,
-0.012391802854835987,
-0.10945688933134079,
0.10031931847333908,
-0.030838996171951294,
0.18504548072814941,
0.07405651360750198,
0.030962597578763962,
-0.034945543855428696,
0.09611394256353378,
-0.010503270663321018,
0.24532562494277954,
0.059623997658491135,
0.0387948714196682,
0.022483311593532562,
-0.18411226570606232,
-0.021242644637823105,
-0.10260982811450958,
0.02104618027806282,
-0.019292492419481277,
-0.033494628965854645,
0.05400056019425392,
0.01690554991364479,
-0.18007664382457733,
0.07139379531145096,
-0.00012900833098683506,
-0.05977657064795494,
-0.16229397058486938,
-0.09404340386390686,
0.011304178275167942,
0.12605778872966766,
0.03534146770834923,
0.027658861130475998,
0.007846667431294918,
0.005374369211494923,
0.2315322458744049,
0.11118394136428833,
0.09424250572919846,
-0.022491464391350746,
-0.20139697194099426,
0.0870572179555893,
-0.057551026344299316,
0.11827950924634933,
0.16667602956295013,
0.01131377648562193,
0.0027333626057952642,
0.010358788073062897,
0.26615527272224426,
-0.009860420599579811,
0.15434958040714264,
-0.05378131568431854,
0.02844744548201561,
-0.06032014265656471,
-0.018298890441656113,
0.03586452826857567,
-0.0719485878944397,
0.06940941512584686,
0.16845954954624176,
-0.0015462423907592893,
-0.006786494981497526,
-0.0022568516433238983,
-0.11255589127540588,
-0.013638857752084732,
-0.13328415155410767,
-0.08497461676597595,
-0.06999325752258301,
-0.17022910714149475,
-0.252480149269104,
0.10502441972494125,
0.22590245306491852,
0.019042178988456726,
0.02072419412434101,
0.009704786352813244,
0.07476045191287994,
0.09595747292041779,
-0.04087343066930771,
0.05945386365056038,
0.017734315246343613,
0.17250198125839233,
0.02118099108338356,
0.005599256604909897,
0.036479316651821136,
0.42659687995910645,
0.11437693983316422,
-0.03953501209616661,
0.059438981115818024,
-0.17824330925941467,
-0.08184465020895004,
-0.05482959747314453,
-0.0751332938671112,
0.02479519136250019,
-0.06610127538442612,
-0.1750127375125885,
-0.024606825783848763,
0.0016844926867634058,
-0.09801525622606277,
-0.11689358204603195,
-0.0304337777197361,
-0.07501190900802612,
-0.15269184112548828,
0.021135713905096054,
-0.07796675711870193,
0.01593976654112339,
-0.06879067420959473,
0.08623353391885757,
0.06575889885425568,
-0.10661578178405762,
-0.09952518343925476,
-0.046488504856824875,
0.19040626287460327,
-0.01522864867001772,
0.05122918263077736,
0.23592640459537506,
-0.08189670741558075,
-0.15208426117897034,
0.10777955502271652,
0.003408310702070594,
0.11477849632501602,
-0.15298861265182495,
-0.023094790056347847,
0.1389276087284088,
-0.037014834582805634,
-0.047626394778490067,
0.035543058067560196,
0.04702827334403992,
-0.08868034929037094,
0.1726156622171402,
-0.06203417107462883,
0.07645098865032196,
-0.20693859457969666,
-0.1017843708395958,
0.13715851306915283,
0.15166693925857544,
0.006021690554916859,
-0.19270586967468262,
-0.02859671413898468,
0.11645732820034027,
-0.026865355670452118,
0.09744672477245331,
-0.08521739393472672,
-0.023670153692364693,
-0.062001992017030716,
-0.07738800346851349,
0.14897115528583527,
0.06469561904668808,
0.09570286422967911,
0.04328567907214165,
-0.17485903203487396,
-0.06736325472593307,
0.012646298855543137,
-0.04130762070417404,
-0.17872083187103271,
-0.004643735475838184,
-0.09830337762832642,
0.07053760439157486,
-0.029787924140691757,
-0.03589872270822525,
0.10196632891893387,
-0.11402661353349686,
0.03146675229072571,
0.13471278548240662,
-0.04883018881082535,
-0.14893266558647156,
-0.01610499620437622,
-0.020461665466427803,
0.041366271674633026,
0.10458522289991379,
-0.05545053258538246,
-0.004846072755753994,
-0.147894024848938,
-0.09079963713884354,
0.1402582824230194,
0.038680676370859146,
0.05427971109747887,
0.4447333514690399,
-0.043420303612947464,
0.04492861032485962,
0.027558695524930954,
0.15722273290157318,
0.02779196947813034,
-0.04738058149814606,
0.13490557670593262,
0.07413768023252487,
-0.032508961856365204,
0.022455884143710136,
0.20989371836185455,
0.019242359325289726,
-0.18765993416309357,
-0.07742548733949661,
0.12208462506532669,
0.004040914122015238,
0.25283345580101013,
0.005401505157351494,
-0.03896377608180046,
-0.044651228934526443,
-0.23749232292175293,
0.0031072075944393873,
0.1666622757911682,
-0.08209073543548584,
-0.01846158318221569,
-0.08807780593633652,
-2.543976368311587e-32,
0.009894091635942459,
-0.06815455108880997,
-0.10877661406993866,
0.017371920868754387,
-0.11195410043001175,
0.057122427970170975,
-0.0895574539899826,
-0.12558197975158691,
-0.1382695585489273,
-0.05242887884378433,
-0.06922955065965652,
-0.06492045521736145,
0.04894956946372986,
0.1822531819343567,
-0.16119298338890076,
-0.06220481917262077,
0.000515970285050571,
-0.11416932940483093,
-0.06864695250988007,
0.074039526283741,
0.043696559965610504,
0.07892192900180817,
-0.08205239474773407,
-0.010701744817197323,
0.08455771207809448,
-0.09827647358179092,
-0.011743777431547642,
-0.18479032814502716,
0.13067971169948578,
0.02518177591264248,
-0.05442158132791519,
0.030725445598363876,
-0.0019310889765620232,
-0.11041232943534851,
-0.01514851488173008,
0.0035655791871249676,
-0.1737642139196396,
-0.025355977937579155,
0.0935620665550232,
0.049512509256601334,
0.011731797829270363,
0.13386724889278412,
0.09183330088853836,
-0.22417093813419342,
0.06875993311405182,
0.03357994928956032,
0.02362016774713993,
0.10093201696872711,
-0.09915412217378616,
-0.11555907130241394,
-0.07004018127918243,
0.0029483307152986526,
0.013152659870684147,
0.005951051600277424,
0.01864403486251831,
-0.07597630470991135,
0.0584724098443985,
0.09703068435192108,
-0.00747752794995904,
-0.051982030272483826,
-0.09328044950962067,
-0.10503660887479782,
-0.07824769616127014,
-0.05003032460808754,
0.13651925325393677,
-0.10967906564474106,
0.2346084713935852,
0.030443057417869568,
-0.018856661394238472,
-0.09484503418207169,
0.2047586739063263,
0.1303364336490631,
-0.18934977054595947,
-0.13961297273635864,
-0.19289562106132507,
-0.1499483734369278,
-0.045029543340206146,
-0.13476605713367462,
-0.1520654261112213,
0.03543682023882866,
0.1582828164100647,
-0.07904170453548431,
-0.037098709493875504,
0.10019943118095398,
-0.07584555447101593,
-0.16561730206012726,
0.09361278265714645,
-0.033447496592998505,
-0.0682063102722168,
-0.14348484575748444,
0.025968244299292564,
-0.14136172831058502,
-0.029532626271247864,
-0.044822581112384796,
-0.07726377993822098,
0.05034134164452553,
-0.02543814666569233,
0.10065821558237076,
-0.1345251202583313,
0.14777854084968567,
-0.1545700877904892,
0.029431428760290146,
0.1163775771856308,
-0.02397686429321766,
0.10293979197740555,
0.10521852970123291,
0.2142692357301712,
0.0023570642806589603,
-0.05312313884496689,
-0.13537168502807617,
0.013052600435912609,
0.0749519094824791,
0.0999944880604744,
0.1345345675945282,
0.25714898109436035,
0.01863909512758255,
-0.1445477157831192,
-0.10721741616725922,
0.044152259826660156,
0.138834148645401,
-0.15001076459884644,
-0.09454324841499329,
-0.07355137914419174,
0.057384900748729706,
-0.06948419660329819,
0.1411823332309723,
-0.2729455232620239,
-0.11909706890583038,
-0.016574110835790634,
-0.016887838020920753,
0.08273730427026749,
-0.05804979428648949,
7.515762945331517e-7,
-0.31117624044418335,
0.13607855141162872,
-0.06530874222517014,
0.07767993956804276,
0.014627737924456596,
0.00209483178332448,
-0.2712552547454834,
0.003513527335599065,
0.020870700478553772,
0.1215224638581276,
0.2535744905471802,
0.04720385745167732,
-0.1586143672466278,
-0.03308764472603798,
-0.12536031007766724,
-0.09571275860071182,
-0.04796796664595604,
0.15303225815296173,
-0.027582867071032524,
-0.06105468049645424,
0.17206108570098877,
0.14018291234970093,
-0.021702660247683525,
0.008456062525510788,
0.03705933317542076,
-0.15930865705013275,
0.07108018547296524,
0.002833500038832426,
0.13785673677921295,
-0.06337220966815948,
0.005579919088631868,
0.29354050755500793,
-0.02320893108844757,
0.08911709487438202,
0.07587997615337372,
0.12577658891677856,
-0.16547860205173492,
-0.13413037359714508,
0.10325243324041367,
0.04273219779133797,
0.03494697064161301,
0.08471500128507614,
0.04195154830813408,
-0.08892358839511871,
0.1333182007074356,
0.09109008312225342,
-0.22378700971603394,
-0.029726892709732056,
0.04832775890827179,
0.19319923222064972,
0.04121965169906616,
0.13651734590530396,
-0.01636091247200966,
0.09178690612316132,
0.029103534296154976,
-0.07871055603027344,
-0.0137482276186347,
-0.21157416701316833,
0.058869581669569016,
-0.058571238070726395,
-0.08527227491140366,
0.05490869656205177,
0.15503966808319092,
0.010225629433989525,
0.08783023059368134,
-0.10454759746789932,
0.03877710923552513,
4.414632458402635e-35,
0.0397505983710289,
-0.12832245230674744,
0.13681401312351227,
-0.05008632689714432,
0.00019724990124814212,
-0.11053313314914703,
0.11603865772485733,
-0.021003123372793198,
0.051383137702941895,
-0.06645607203245163,
-0.04118173196911812
] |
https://github.com/huggingface/datasets/issues/5880 | load_dataset from s3 file system through streaming can't not iterate data | I tried `storage_options` before, but it doesn't work, I checked our source code and I found that we even didn't pass this parameter to the following process. if I use `storage_options` instead of `use_auth_token`, then I also need to change another place of the code. the last line of `streaming_download_manager.py`. our code only passes the `use_auth_token` to the following handler, but does nothing to the `storage_options`
<img width="1050" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5be90933-3331-4ecf-9e11-34f9852d8f92">
| ### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
| 70 | load_dataset from s3 file system through streaming can't not iterate data
### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
I tried `storage_options` before, but it doesn't work, I checked our source code and I found that we even didn't pass this parameter to the following process. if I use `storage_options` instead of `use_auth_token`, then I also need to change another place of the code. the last line of `streaming_download_manager.py`. our code only passes the `use_auth_token` to the following handler, but does nothing to the `storage_options`
<img width="1050" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5be90933-3331-4ecf-9e11-34f9852d8f92">
| [
0.12627017498016357,
0.00855939369648695,
-0.06253409385681152,
0.08628325909376144,
0.2407594472169876,
0.042221494019031525,
0.03807628154754639,
-0.10548093169927597,
0.056589994579553604,
0.1405418962240219,
-0.17244590818881989,
-0.05832655727863312,
0.08012663573026657,
-0.017013169825077057,
0.025903500616550446,
0.011300762183964252,
0.04860798642039299,
0.08198178559541702,
0.04852314665913582,
-0.050466571003198624,
-0.05241492763161659,
0.02326071448624134,
0.10100523382425308,
-0.09047094732522964,
0.07013054937124252,
0.005468486342579126,
-0.015310688875615597,
0.11176807433366776,
0.03779131919145584,
-0.21420574188232422,
0.019541751593351364,
-0.028061289340257645,
0.041106466203927994,
0.1036062240600586,
0.000005573287580773467,
0.01155377458781004,
0.08767756819725037,
0.05104953795671463,
-0.11083678901195526,
-0.12714923918247223,
0.15902011096477509,
-0.13180336356163025,
-0.07043930888175964,
-0.08586520701646805,
-0.013701539486646652,
-0.0833919420838356,
-0.016680976375937462,
0.0024666530080139637,
0.07375428080558777,
0.039218515157699585,
-0.12870590388774872,
0.059536609798669815,
-0.13581033051013947,
-0.201434925198555,
0.09866511076688766,
0.0647834911942482,
0.02245979569852352,
0.15443073213100433,
-0.119472436606884,
0.049253251403570175,
-0.131655752658844,
-0.11602449417114258,
-0.14169713854789734,
0.12558235228061676,
-0.04211629554629326,
0.05397845804691315,
-0.08688633143901825,
-0.2102411538362503,
-0.032402824610471725,
0.1766877919435501,
-0.04082983359694481,
0.19368892908096313,
-0.11675353348255157,
-0.03601539880037308,
-0.05039265379309654,
-0.04484948515892029,
-0.07817703485488892,
0.02232714183628559,
-0.10256248712539673,
0.1296330988407135,
-0.13663016259670258,
-0.046396221965551376,
-0.12332094460725784,
0.04831373691558838,
-0.11658229678869247,
0.019880244508385658,
-0.1760457456111908,
0.01587221398949623,
-0.02346181869506836,
-0.028245428577065468,
0.13414880633354187,
0.035564929246902466,
-0.1403983235359192,
-0.20965327322483063,
0.09502032399177551,
0.11950496584177017,
0.13469526171684265,
-0.07375966757535934,
-0.0007338976138271391,
0.005019150208681822,
0.0053657470270991325,
-0.07822481542825699,
0.00909263826906681,
0.11013448238372803,
0.10905502736568451,
-0.10593504458665848,
0.01216871663928032,
-0.06721346080303192,
0.009267774410545826,
0.15959002077579498,
0.011797924526035786,
0.07215191423892975,
-0.07654135674238205,
-0.08818066865205765,
0.07016376405954361,
-0.015293598175048828,
0.1626763641834259,
0.13151443004608154,
0.11570209264755249,
0.12824898958206177,
-0.0711807906627655,
0.05908653140068054,
-0.011834529228508472,
0.1910122185945511,
0.06746527552604675,
0.04066302627325058,
-0.11982104182243347,
0.05751634016633034,
-0.053403090685606,
0.09543263912200928,
0.04172879084944725,
-0.07970455288887024,
-0.03459552302956581,
0.0013554634060710669,
0.14458820223808289,
-0.17627987265586853,
0.09011527895927429,
-0.091466024518013,
-0.034699391573667526,
-0.07074303179979324,
0.04480981454253197,
-0.12276660650968552,
-0.10149990767240524,
0.10066129267215729,
0.0737568587064743,
-0.0014603117015212774,
0.04102808237075806,
-0.04538959637284279,
-0.04111707955598831,
-0.06047549471259117,
-0.22805900871753693,
0.06390266120433807,
-0.2791629135608673,
0.022006245329976082,
-0.2532522976398468,
-0.07069125026464462,
-0.24260728061199188,
-0.015903523191809654,
-0.20725959539413452,
0.010624930262565613,
0.12667493522167206,
0.03007788397371769,
-0.028058212250471115,
-0.10338712483644485,
0.21879184246063232,
0.08149396628141403,
0.09103494882583618,
-0.019151225686073303,
-0.01634010300040245,
-0.010335404425859451,
0.09113315492868423,
0.0008085109875537455,
0.02225681208074093,
-0.09167712926864624,
-0.27762076258659363,
0.23374852538108826,
-0.03691698983311653,
-0.04462828487157822,
-0.21712534129619598,
0.16686558723449707,
0.10846170783042908,
-0.03894556686282158,
0.04857337102293968,
-0.11687467247247696,
0.08294172585010529,
-0.028883948922157288,
-0.10289035737514496,
0.0907544270157814,
0.02580113522708416,
-0.11238924413919449,
0.08699309825897217,
0.01984858140349388,
-0.08003305643796921,
0.04686910659074783,
-0.06685428321361542,
-0.03729278966784477,
-0.0252559632062912,
0.012702450156211853,
0.04958758503198624,
-0.20012685656547546,
-0.04501130059361458,
0.09612330049276352,
0.2133214920759201,
0.01864883117377758,
-0.03415030986070633,
0.003172388533130288,
-0.09999506175518036,
0.09323660284280777,
0.2725633978843689,
-0.23162657022476196,
-0.1749049425125122,
0.03926756978034973,
-0.12186061590909958,
0.03386475518345833,
-0.2751418352127075,
0.008939129300415516,
-0.15270687639713287,
0.15436628460884094,
0.029206926003098488,
0.149690181016922,
-0.07087872177362442,
0.08262903243303299,
0.12540338933467865,
0.0069813355803489685,
-0.032190777361392975,
0.12778426706790924,
-0.04365959390997887,
0.014505448751151562,
0.1007157489657402,
-0.036462053656578064,
-0.01586678996682167,
-0.063735730946064,
0.17097684741020203,
0.14833927154541016,
0.048402734100818634,
0.1544564664363861,
0.0292047169059515,
-0.16982367634773254,
0.05372593179345131,
0.04738035425543785,
-0.10586812347173691,
0.0771235004067421,
0.04410760477185249,
-0.1169959232211113,
0.06876902282238007,
0.03893781825900078,
-0.0905391052365303,
0.16179406642913818,
-0.04341280460357666,
-0.05984886363148689,
0.3135450482368469,
0.13438065350055695,
-0.2019614577293396,
0.0541129894554615,
0.08972704410552979,
-0.10818549990653992,
0.058707863092422485,
0.18355324864387512,
-0.10768003761768341,
-0.0803043320775032,
0.24922694265842438,
-0.024018358439207077,
-0.024523625150322914,
0.03583317995071411,
0.17498493194580078,
-0.15589384734630585,
0.08006571233272552,
0.09019109606742859,
0.11433982104063034,
0.11041955649852753,
0.033006712794303894,
-0.12799550592899323,
-0.00016717243124730885,
-0.13220255076885223,
0.06215096265077591,
0.015403350815176964,
0.0055059646256268024,
-0.0729232057929039,
-0.0433666855096817,
-0.009419653564691544,
-0.016422366723418236,
0.14432178437709808,
0.05799585580825806,
-0.14568981528282166,
0.12205324321985245,
0.06933930516242981,
-0.04719696193933487,
0.061111919581890106,
0.09646593779325485,
-0.07754148542881012,
0.08250300586223602,
-0.018942683935165405,
0.02738807164132595,
-0.10839815437793732,
0.0678652748465538,
-0.021729866042733192,
0.12936142086982727,
0.056312769651412964,
0.07036077976226807,
0.004614055156707764,
-0.1557486206293106,
0.11587383598089218,
-0.015069513581693172,
0.0767851322889328,
0.05479232594370842,
0.06641186773777008,
0.15850241482257843,
0.15382501482963562,
-0.1305965632200241,
-0.08880869299173355,
-0.010963770560920238,
-0.005981965456157923,
0.03145161271095276,
0.1454637348651886,
0.07290346920490265,
0.006339728832244873,
-0.013257061131298542,
-0.1749027967453003,
0.0892365351319313,
0.1030244454741478,
-0.04006052017211914,
0.2552321255207062,
-0.0818471610546112,
-0.07708551734685898,
0.07633450627326965,
0.04436545446515083,
-0.07063686102628708,
-0.13609063625335693,
0.010169083252549171,
-0.011766272597014904,
-0.07341716438531876,
0.02255711890757084,
-0.04257172718644142,
-0.007227296009659767,
-0.00398071575909853,
-0.20668883621692657,
-0.1445203423500061,
-0.14438572525978088,
0.38649314641952515,
-0.05230730399489403,
-0.02378295548260212,
0.04250318929553032,
-0.03160528838634491,
-0.04646219313144684,
-0.006921251304447651,
-0.21537843346595764,
-0.08454526215791702,
-0.045320063829422,
-0.1636333018541336,
-0.126493901014328,
0.06383046507835388,
-0.0913015604019165,
-0.0806175097823143,
-0.039072539657354355,
0.020217351615428925,
-0.024151496589183807,
-0.09468604624271393,
0.10168389976024628,
-0.016352219507098198,
0.187631756067276,
0.0629991963505745,
0.03569190204143524,
-0.023637885227799416,
0.10930783301591873,
-0.018197787925601006,
0.27269431948661804,
0.06294822692871094,
0.022132370620965958,
0.03508889302611351,
-0.16971637308597565,
-0.03507862985134125,
-0.1011563166975975,
0.029140876606106758,
-0.024414347484707832,
-0.03301580995321274,
0.03846235200762749,
0.00829614419490099,
-0.16566884517669678,
0.07711043953895569,
0.01591254211962223,
-0.04400227218866348,
-0.11963086575269699,
-0.08031904697418213,
-0.009215814992785454,
0.13325530290603638,
0.06315478682518005,
0.020566169172525406,
0.006494792178273201,
0.008378728292882442,
0.22586332261562347,
0.14847134053707123,
0.12828657031059265,
-0.021837417036294937,
-0.19029904901981354,
0.07335036247968674,
-0.05315012112259865,
0.10430692136287689,
0.1867077797651291,
0.03141007944941521,
0.013260438106954098,
0.011941774748265743,
0.24101094901561737,
0.006479825358837843,
0.13850285112857819,
-0.05624711513519287,
0.015614358708262444,
-0.023452050983905792,
-0.05370158702135086,
0.02241767756640911,
-0.06376785039901733,
0.0580686591565609,
0.13528621196746826,
-0.040447551757097244,
-0.009044768288731575,
0.022429529577493668,
-0.10085411369800568,
0.005565499421209097,
-0.13631439208984375,
-0.09862440824508667,
-0.0834503173828125,
-0.18201228976249695,
-0.2529122829437256,
0.11016681790351868,
0.2438473105430603,
-0.00187199586071074,
0.008551595732569695,
0.03605962544679642,
0.060799721628427505,
0.0995652973651886,
-0.061036765575408936,
0.08206523954868317,
0.030883846804499626,
0.14669272303581238,
0.026583807542920113,
-0.017370881512761116,
0.018003061413764954,
0.4449910819530487,
0.11803159862756729,
-0.03441189229488373,
0.07237987965345383,
-0.139699324965477,
-0.10152179002761841,
-0.05658131465315819,
-0.06434325873851776,
-0.010266131721436977,
-0.05009455978870392,
-0.19044476747512817,
-0.02004297263920307,
-0.006432637106627226,
-0.07127809524536133,
-0.1444752812385559,
-0.011824180372059345,
-0.11524258553981781,
-0.14376547932624817,
0.019937792792916298,
-0.09523498266935349,
0.000871028401888907,
-0.06427974253892899,
0.08774084597826004,
0.06423117965459824,
-0.09590325504541397,
-0.1009477823972702,
-0.03537839651107788,
0.18545635044574738,
-0.00458979606628418,
0.017165346071124077,
0.20396120846271515,
-0.09015320241451263,
-0.11582648754119873,
0.1054396703839302,
0.00886403489857912,
0.12244698405265808,
-0.16296017169952393,
-0.022139500826597214,
0.1292899250984192,
-0.07051503658294678,
-0.04125910624861717,
0.02452627755701542,
0.07371921092271805,
-0.0713835284113884,
0.15196973085403442,
-0.0636330097913742,
0.08466838300228119,
-0.23227046430110931,
-0.09415365010499954,
0.12500816583633423,
0.1705118864774704,
-0.015002909116446972,
-0.1821044534444809,
-0.03841139003634453,
0.16152793169021606,
-0.06289000064134598,
0.11659508943557739,
-0.09728733450174332,
-0.012374648824334145,
-0.08195927739143372,
-0.05580631271004677,
0.13149258494377136,
0.07696972042322159,
0.06775211542844772,
0.026897849515080452,
-0.16400864720344543,
-0.07663863897323608,
0.014761817641556263,
-0.035911645740270615,
-0.15522430837154388,
-0.018047427758574486,
-0.09585656970739365,
0.0550958514213562,
-0.02506912872195244,
-0.0003875628171954304,
0.10321620106697083,
-0.1241932064294815,
0.030380183830857277,
0.14885129034519196,
-0.01754717528820038,
-0.1293868124485016,
-0.0393291637301445,
-0.012183006852865219,
0.05353357642889023,
0.12445776909589767,
-0.0748700499534607,
0.0009316873038187623,
-0.15975646674633026,
-0.062493614852428436,
0.14170978963375092,
0.024332446977496147,
0.05431297421455383,
0.4341886639595032,
-0.05035563185811043,
0.05544579029083252,
0.006582160480320454,
0.18247127532958984,
0.033386893570423126,
-0.05536431819200516,
0.13211871683597565,
0.041226577013731,
-0.017476869747042656,
0.015398127026855946,
0.21454516053199768,
0.024362409487366676,
-0.1864253431558609,
-0.08543961495161057,
0.11878134310245514,
-0.006145053543150425,
0.23531140387058258,
0.024818968027830124,
-0.04243908077478409,
-0.0670667439699173,
-0.22455964982509613,
-0.0058735692873597145,
0.15121102333068848,
-0.05788886547088623,
0.012642362155020237,
-0.1075548529624939,
-2.5275990871423434e-32,
0.0027197159361094236,
-0.0577823780477047,
-0.11548355966806412,
-0.005330026615411043,
-0.11646760255098343,
0.028619222342967987,
-0.08977221697568893,
-0.10716643184423447,
-0.14354486763477325,
-0.07108179479837418,
-0.04428796097636223,
-0.06929364800453186,
0.0434051938354969,
0.17076954245567322,
-0.1521814912557602,
-0.06796598434448242,
-0.023747971281409264,
-0.13124312460422516,
-0.057215720415115356,
0.0864463672041893,
0.031074488535523415,
0.10055352747440338,
-0.06806357949972153,
-0.005875378847122192,
0.07100234925746918,
-0.1198626235127449,
-0.025194818153977394,
-0.1959029883146286,
0.15070244669914246,
0.05950649827718735,
-0.06474853307008743,
0.023101774975657463,
-0.007672211620956659,
-0.10706391930580139,
-0.03127521649003029,
0.015444501303136349,
-0.2009795606136322,
-0.04436559975147247,
0.1025385782122612,
0.042204149067401886,
0.014632373116910458,
0.11091088503599167,
0.11298198997974396,
-0.20092450082302094,
0.05699373036623001,
0.013782116584479809,
0.015508177690207958,
0.08728808909654617,
-0.10119574517011642,
-0.09896010905504227,
-0.06048339605331421,
0.0033769053407013416,
0.023756738752126694,
0.016516754403710365,
0.031786445528268814,
-0.08699366450309753,
0.07161223143339157,
0.1112554743885994,
0.011887742206454277,
-0.048474378883838654,
-0.07992057502269745,
-0.07842935621738434,
-0.05237600952386856,
-0.08928241580724716,
0.1597687155008316,
-0.11568953096866608,
0.22644230723381042,
0.02116439677774906,
-0.012672148644924164,
-0.10444557666778564,
0.2165607064962387,
0.14063934981822968,
-0.19265039265155792,
-0.12647731602191925,
-0.1821933090686798,
-0.15824928879737854,
-0.04295024275779724,
-0.13216403126716614,
-0.1568794697523117,
0.027211280539631844,
0.14787021279335022,
-0.08387628197669983,
-0.06591218709945679,
0.08868177980184555,
-0.06545517593622208,
-0.16115932166576385,
0.08144039660692215,
-0.04190186783671379,
-0.06015046313405037,
-0.13662412762641907,
0.024274613708257675,
-0.15266913175582886,
-0.03631270304322243,
-0.0885288268327713,
-0.06730341166257858,
0.007266102824360132,
-0.05599319562315941,
0.09067890048027039,
-0.11947082728147507,
0.15556584298610687,
-0.14833058416843414,
0.02268427610397339,
0.11891300231218338,
-0.02841564454138279,
0.07380715012550354,
0.12071909010410309,
0.18653744459152222,
0.0056395698338747025,
-0.03595715016126633,
-0.13032914698123932,
0.009943054057657719,
0.06874176114797592,
0.11853297799825668,
0.12671425938606262,
0.22829502820968628,
0.014990534633398056,
-0.15806974470615387,
-0.1234908252954483,
0.049004096537828445,
0.12439403682947159,
-0.13794298470020294,
-0.09315717220306396,
-0.049165721982717514,
0.06979566067457199,
-0.07717451453208923,
0.15507489442825317,
-0.2979435920715332,
-0.10828167200088501,
-0.0029375560116022825,
-0.010088701732456684,
0.06258267909288406,
-0.02695465087890625,
7.422836461046245e-7,
-0.2939554452896118,
0.1464768946170807,
-0.0669931024312973,
0.09538760036230087,
-0.0121780289337039,
0.0006762233679182827,
-0.31507813930511475,
0.011445959098637104,
0.019366972148418427,
0.11083897948265076,
0.25148823857307434,
0.05670466646552086,
-0.16776058077812195,
-0.017283428460359573,
-0.13109777867794037,
-0.10125770419836044,
-0.019011380150914192,
0.15125341713428497,
-0.025533856824040413,
-0.07299017161130905,
0.19131505489349365,
0.1670154333114624,
-0.01588016003370285,
0.04056302458047867,
0.035471897572278976,
-0.15362732112407684,
0.0509796142578125,
-0.016901390627026558,
0.15202085673809052,
-0.05398295447230339,
-0.021961010992527008,
0.2968255281448364,
-0.04523677006363869,
0.0694655328989029,
0.0689389780163765,
0.11692000925540924,
-0.17027419805526733,
-0.10242729634046555,
0.10457251220941544,
0.005635293200612068,
0.07959513366222382,
0.07934851944446564,
0.05577137693762779,
-0.10221119970083237,
0.146084725856781,
0.11462689936161041,
-0.19599871337413788,
-0.05171499401330948,
0.045730605721473694,
0.18815244734287262,
0.027390848845243454,
0.1279429942369461,
-0.004622569307684898,
0.08236265182495117,
0.0387185662984848,
-0.06388604640960693,
-0.046435389667749405,
-0.1996152549982071,
0.07767345756292343,
-0.023707615211606026,
-0.08424662798643112,
0.046626072376966476,
0.15617315471172333,
0.012313256040215492,
0.0999583825469017,
-0.09750425815582275,
0.03807250037789345,
5.966824248042057e-35,
0.02783302590250969,
-0.1260051727294922,
0.14088934659957886,
-0.05348057672381401,
0.009473444893956184,
-0.12197870761156082,
0.11292922496795654,
-0.057720404118299484,
0.05343475565314293,
-0.08324147760868073,
-0.043927211314439774
] |
https://github.com/huggingface/datasets/issues/5880 | load_dataset from s3 file system through streaming can't not iterate data | Cloud storage support is still experimental indeed and you can expect some bugs.
I think we need to pass the storage options anywhere use_auth_token is passed in indeed. Let me know if you'd be interested in contributing a fix ! | ### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
| 40 | load_dataset from s3 file system through streaming can't not iterate data
### Describe the bug
I have a JSON file in my s3 file system(minio), I can use load_dataset to get the file link, but I can't iterate it
<img width="816" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/cc0778d3-36f3-45b5-ac68-4e7c664c2ed0">
<img width="1144" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/76872af3-8b3c-42ff-9f55-528c920a7af1">
we can change 4 lines to fix this bug, you can check whether it is ok for us.
<img width="941" alt="image" src="https://github.com/huggingface/datasets/assets/59083384/5a22155a-ece7-496c-8506-047e5c235cd3">
### Steps to reproduce the bug
1. storage a file in you s3 file system
2. use load_dataset to read it through streaming
3. iterate it
### Expected behavior
can iterate it successfully
### Environment info
- `datasets` version: 2.12.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Cloud storage support is still experimental indeed and you can expect some bugs.
I think we need to pass the storage options anywhere use_auth_token is passed in indeed. Let me know if you'd be interested in contributing a fix ! | [
0.12257875502109528,
0.012690991163253784,
-0.043649133294820786,
0.08710254728794098,
0.23064430058002472,
0.020625121891498566,
0.04118892550468445,
-0.10161247104406357,
0.04586739465594292,
0.13170890510082245,
-0.1716381311416626,
-0.0670485571026802,
0.05434245616197586,
0.0011521863052621484,
0.018984798341989517,
0.041667383164167404,
0.05169663578271866,
0.05816324055194855,
0.027176817879080772,
-0.06929219514131546,
-0.07729634642601013,
0.005507437512278557,
0.10889327526092529,
-0.08336499333381653,
0.03631038963794708,
0.00477151945233345,
-0.02315600961446762,
0.12049353867769241,
0.031547002494335175,
-0.17152701318264008,
0.018032189458608627,
-0.04853440821170807,
0.040333621203899384,
0.10555395483970642,
0.00000574264231545385,
0.013478466309607029,
0.0965161919593811,
0.05940461903810501,
-0.12009847164154053,
-0.13711433112621307,
0.13567836582660675,
-0.10845687240362167,
-0.06066618859767914,
-0.07080908119678497,
-0.020373456180095673,
-0.0698559358716011,
-0.016287237405776978,
-0.0006157942116260529,
0.0893051028251648,
0.03717567399144173,
-0.14270897209644318,
0.07490949332714081,
-0.1166541576385498,
-0.1731080263853073,
0.1035454124212265,
0.09874378144741058,
-0.006322790402919054,
0.15070785582065582,
-0.1079588383436203,
0.018734334036707878,
-0.10908672213554382,
-0.12105219811201096,
-0.11143416911363602,
0.13737638294696808,
-0.06307577341794968,
0.07403980940580368,
-0.10112517327070236,
-0.21177983283996582,
-0.015425723977386951,
0.15307120978832245,
-0.034313105046749115,
0.20627959072589874,
-0.13420581817626953,
-0.04855906218290329,
-0.05074399709701538,
-0.027598824352025986,
-0.05638112872838974,
0.023563534021377563,
-0.10119873285293579,
0.1315591186285019,
-0.13652895390987396,
-0.0350918285548687,
-0.12197436392307281,
0.10134951770305634,
-0.145328551530838,
-0.0036355650518089533,
-0.1719370037317276,
0.007520124316215515,
-0.027127396315336227,
-0.015404465608298779,
0.09369028359651566,
0.058551475405693054,
-0.14889061450958252,
-0.18409889936447144,
0.0861300453543663,
0.07932303100824356,
0.07845335453748703,
-0.08974197506904602,
0.02563018910586834,
0.011543777771294117,
0.03989803045988083,
-0.07116477191448212,
-0.03177878260612488,
0.09113698452711105,
0.11772460490465164,
-0.09638527035713196,
0.019884902983903885,
-0.07990873605012894,
0.04331052303314209,
0.13029354810714722,
0.0029272977262735367,
0.049200307577848434,
-0.11232046782970428,
-0.07947605103254318,
0.07569817453622818,
-0.02751445397734642,
0.16041743755340576,
0.1278069168329239,
0.1313222199678421,
0.15318147838115692,
-0.05662010982632637,
0.035234350711107254,
-0.015491602011024952,
0.20657455921173096,
0.05957067385315895,
0.021119240671396255,
-0.07658112794160843,
0.05203491076827049,
-0.0496751070022583,
0.06858275085687637,
0.06212826073169708,
-0.05913882330060005,
-0.022761721163988113,
0.008335386402904987,
0.14614775776863098,
-0.1817830502986908,
0.09241719543933868,
-0.10075714439153671,
0.024708617478609085,
-0.08898723125457764,
0.03274459391832352,
-0.1143726035952568,
-0.088444784283638,
0.09995488822460175,
0.07064998894929886,
-0.004487764090299606,
0.04604078829288483,
-0.04751024767756462,
-0.03903668001294136,
-0.06083497032523155,
-0.2455512285232544,
0.07515440136194229,
-0.3090197443962097,
-0.025085462257266045,
-0.2551618814468384,
-0.04935125634074211,
-0.22750714421272278,
-0.021113501861691475,
-0.20429036021232605,
0.007614881731569767,
0.13373950123786926,
0.03637548163533211,
0.01582837663590908,
-0.06436694413423538,
0.22420133650302887,
0.04384659230709076,
0.10268059372901917,
0.0028231206815689802,
-0.006089056842029095,
0.01193281915038824,
0.07110102474689484,
0.007916673086583614,
0.023638183251023293,
-0.07901028543710709,
-0.24610604345798492,
0.22408558428287506,
-0.03918151184916496,
-0.08213236927986145,
-0.19599659740924835,
0.16553546488285065,
0.0962783545255661,
-0.034456197172403336,
0.0037291236221790314,
-0.11626985669136047,
0.03663405403494835,
-0.01069127582013607,
-0.06070792302489281,
0.08653869479894638,
0.04396500438451767,
-0.11888185143470764,
0.07538814097642899,
0.018995480611920357,
-0.11267171800136566,
0.025474954396486282,
-0.07511592656373978,
-0.055826328694820404,
-0.00670757656916976,
-0.009339513257145882,
0.06601416319608688,
-0.1886141151189804,
-0.027111049741506577,
0.11287155002355576,
0.20552420616149902,
-0.007903875783085823,
-0.020352251827716827,
-0.0008287454256787896,
-0.12379547208547592,
0.08491721004247665,
0.2605118453502655,
-0.21130043268203735,
-0.18209849298000336,
0.053500816226005554,
-0.1135236844420433,
0.058194924145936966,
-0.26170915365219116,
0.006439459044486284,
-0.15991131961345673,
0.10958364605903625,
-0.00234196032397449,
0.16154418885707855,
-0.07664161175489426,
0.07126040011644363,
0.10682427138090134,
0.0059042396023869514,
-0.03455875441431999,
0.17446140944957733,
-0.056837018579244614,
0.015851469710469246,
0.09572635591030121,
-0.012351798824965954,
-0.02212751843035221,
-0.05230023339390755,
0.16157321631908417,
0.11417604982852936,
0.022556522861123085,
0.16234101355075836,
0.00886483769863844,
-0.16899555921554565,
0.06119357421994209,
0.0695090964436531,
-0.0953444093465805,
0.04509052261710167,
0.033742036670446396,
-0.09484177082777023,
0.05481627210974693,
0.028974665328860283,
-0.11785796284675598,
0.17268185317516327,
-0.04499155655503273,
-0.019481152296066284,
0.3039436638355255,
0.1411477029323578,
-0.19212457537651062,
0.043747808784246445,
0.09104686975479126,
-0.11984045058488846,
0.07069449126720428,
0.17539086937904358,
-0.09740178287029266,
-0.06744033843278885,
0.2654462158679962,
-0.02243594452738762,
-0.050138115882873535,
0.02654031477868557,
0.1642533391714096,
-0.14331302046775818,
0.08983702957630157,
0.06309623271226883,
0.08012449741363525,
0.11017245799303055,
0.048807043582201004,
-0.14003391563892365,
-0.0056325579062104225,
-0.12708249688148499,
0.05092594772577286,
0.005148995202034712,
-0.007295882795006037,
-0.04575203359127045,
-0.019867999479174614,
-0.01697702892124653,
-0.023917684331536293,
0.16121965646743774,
0.044674769043922424,
-0.15232867002487183,
0.11331401020288467,
0.05757028982043266,
-0.062027547508478165,
0.05701669678092003,
0.09388336539268494,
-0.08343827724456787,
0.06177062541246414,
-0.027369923889636993,
0.034091874957084656,
-0.08480110764503479,
0.05881807208061218,
-0.037501316517591476,
0.15455371141433716,
0.0468805655837059,
0.09163638949394226,
-0.004654767457395792,
-0.14700527489185333,
0.09051371365785599,
-0.005105170421302319,
0.08554378896951675,
0.06273357570171356,
0.06212075427174568,
0.1408381313085556,
0.13995365798473358,
-0.1237177848815918,
-0.09984224289655685,
-0.040364138782024384,
0.0046530975960195065,
0.0482991598546505,
0.16866087913513184,
0.060971736907958984,
0.007955971173942089,
-0.013449791818857193,
-0.15124742686748505,
0.10881204903125763,
0.09117048233747482,
-0.03829890489578247,
0.2655594050884247,
-0.083219014108181,
-0.09028566628694534,
0.08079570531845093,
0.06454697996377945,
-0.06395877152681351,
-0.1020888164639473,
0.03263465315103531,
0.008170298300683498,
-0.06359761208295822,
0.03089357353746891,
-0.03985334932804108,
-0.012736181728541851,
-0.013744545169174671,
-0.20059627294540405,
-0.14999479055404663,
-0.1360263079404831,
0.3884153664112091,
-0.045246805995702744,
-0.04318765550851822,
-0.008135895244777203,
-0.019723309203982353,
-0.06476219743490219,
-0.01613142527639866,
-0.18898384273052216,
-0.10481458157300949,
-0.04989282786846161,
-0.16075699031352997,
-0.13944093883037567,
0.026118798181414604,
-0.061498306691646576,
-0.07404474169015884,
-0.04734975844621658,
-0.0001564595295349136,
-0.03241387754678726,
-0.09608136117458344,
0.15229229629039764,
-0.016873858869075775,
0.1806294322013855,
0.05478560924530029,
0.04445922002196312,
-0.05301950126886368,
0.07817228883504868,
-0.02104675956070423,
0.26638421416282654,
0.07599158585071564,
0.023356899619102478,
0.006297277752310038,
-0.16699138283729553,
-0.018299618735909462,
-0.09731053560972214,
0.014422821812331676,
-0.005467573180794716,
-0.04171595349907875,
0.058458466082811356,
0.021675586700439453,
-0.17010633647441864,
0.03818672150373459,
0.01318318024277687,
-0.06008658558130264,
-0.1421501189470291,
-0.08703865855932236,
0.03029647096991539,
0.12028443068265915,
0.04223736748099327,
0.012420899234712124,
0.01427533756941557,
-0.02209416963160038,
0.24205198884010315,
0.10972129553556442,
0.11481837928295135,
-0.042669571936130524,
-0.16785043478012085,
0.08867063373327255,
-0.051600463688373566,
0.0985993966460228,
0.14259131252765656,
0.032386843115091324,
0.008706130087375641,
0.0038630429189652205,
0.2722586989402771,
0.006588637828826904,
0.1251070648431778,
-0.07525470852851868,
0.03209599107503891,
-0.0492783822119236,
-0.025492209941148758,
0.032437946647405624,
-0.05724068358540535,
0.05974793806672096,
0.1580456793308258,
0.006398390047252178,
-0.021482301875948906,
0.007882735691964626,
-0.08904500305652618,
-0.008043923415243626,
-0.1267848014831543,
-0.08591323345899582,
-0.04847346991300583,
-0.18295350670814514,
-0.2337200939655304,
0.12132316082715988,
0.2188776284456253,
0.0013781676534563303,
0.003554176539182663,
0.032466355711221695,
0.06386494636535645,
0.08741408586502075,
-0.041759341955184937,
0.06495856493711472,
0.014382909052073956,
0.15550433099269867,
0.024264095351099968,
-0.018616139888763428,
0.011448593810200691,
0.42451539635658264,
0.12657195329666138,
-0.01403190940618515,
0.05615213140845299,
-0.16998299956321716,
-0.09155607223510742,
-0.03532039374113083,
-0.07291380316019058,
-0.004004365298897028,
-0.027941972017288208,
-0.1885460615158081,
-0.022338133305311203,
-0.00024349085288122296,
-0.08549223095178604,
-0.11588882654905319,
-0.04417569935321808,
-0.08453113585710526,
-0.14475813508033752,
0.01777380146086216,
-0.07957057654857635,
0.0047103301621973515,
-0.03369245305657387,
0.08901777118444443,
0.0948835164308548,
-0.09329647570848465,
-0.0975884273648262,
-0.0677235946059227,
0.18732322752475739,
-0.03714938834309578,
0.0829339399933815,
0.21141159534454346,
-0.1515350043773651,
-0.1306067407131195,
0.11154872924089432,
0.0020932748448103666,
0.1097756028175354,
-0.1594482809305191,
-0.00621164683252573,
0.13786563277244568,
-0.038318876177072525,
-0.02154802903532982,
0.023202864453196526,
0.04030795022845268,
-0.08340080827474594,
0.1635369062423706,
-0.021843666210770607,
0.06336238980293274,
-0.17564000189304352,
-0.10800918191671371,
0.12065733969211578,
0.1628267765045166,
-0.014123027212917805,
-0.1937035769224167,
-0.010489645414054394,
0.1265805959701538,
-0.02650458551943302,
0.1009925976395607,
-0.081944540143013,
-0.006705974694341421,
-0.06946985423564911,
-0.09051584452390671,
0.14082838594913483,
0.07325010001659393,
0.08473160862922668,
0.05730649456381798,
-0.17043569684028625,
-0.06490118056535721,
0.00405877036973834,
-0.03761332482099533,
-0.18099357187747955,
-0.009320526383817196,
-0.08891638368368149,
0.06541956961154938,
-0.007523686625063419,
-0.007370355073362589,
0.0877385288476944,
-0.1169334352016449,
0.025076404213905334,
0.1403842717409134,
-0.06249256059527397,
-0.12376243621110916,
-0.02440975233912468,
-0.016530005261301994,
0.04658093675971031,
0.11223925650119781,
-0.07706218212842941,
-0.008184258826076984,
-0.12559697031974792,
-0.09014758467674255,
0.13711075484752655,
0.0341314896941185,
0.05102752894163132,
0.4561026394367218,
-0.053440604358911514,
0.03583025187253952,
0.014829244464635849,
0.15050356090068817,
0.032769955694675446,
-0.05448058620095253,
0.13191969692707062,
0.06619906425476074,
-0.005754017736762762,
0.011495216749608517,
0.2158706784248352,
0.0385768786072731,
-0.20475192368030548,
-0.07154040783643723,
0.11360520124435425,
0.0080312704667449,
0.22896361351013184,
0.0037616638001054525,
-0.051366109400987625,
-0.04040518403053284,
-0.20474234223365784,
-0.015217738226056099,
0.1801183521747589,
-0.07627026736736298,
-0.013583850115537643,
-0.07976219058036804,
-2.578749842197612e-32,
0.0034388781059533358,
-0.04906069114804268,
-0.0925140455365181,
0.03172249346971512,
-0.10535873472690582,
0.047996316105127335,
-0.08714138716459274,
-0.0995609313249588,
-0.15570184588432312,
-0.059242475777864456,
-0.06231580674648285,
-0.07515592873096466,
0.04688649997115135,
0.1713169515132904,
-0.14292502403259277,
-0.0879536047577858,
-0.018398888409137726,
-0.09399901330471039,
-0.07338108122348785,
0.07813698798418045,
0.021890709176659584,
0.08764630556106567,
-0.07245732843875885,
-0.02285061776638031,
0.08381940424442291,
-0.11060027778148651,
-0.028751946985721588,
-0.19476547837257385,
0.1100667342543602,
0.04639890044927597,
-0.05566156283020973,
0.022622503340244293,
-0.020502042025327682,
-0.10094445943832397,
-0.016568485647439957,
0.005789693910628557,
-0.17719224095344543,
-0.03998878598213196,
0.08552950620651245,
0.04933570697903633,
0.007375453133136034,
0.12129717320203781,
0.07227887958288193,
-0.23237420618534088,
0.06473315507173538,
0.025075361132621765,
0.017451541498303413,
0.09298219531774521,
-0.08247826248407364,
-0.13958720862865448,
-0.06437189877033234,
0.007647523190826178,
0.002455889480188489,
0.021542994305491447,
0.0368681363761425,
-0.08916846662759781,
0.07319376617670059,
0.10852733254432678,
-0.032974909991025925,
-0.05251583829522133,
-0.10146985203027725,
-0.09043946117162704,
-0.06715911626815796,
-0.08956927061080933,
0.13158254325389862,
-0.10798022150993347,
0.18993784487247467,
-0.000893455755431205,
-0.006575276143848896,
-0.062845878303051,
0.20666836202144623,
0.12941987812519073,
-0.1954370141029358,
-0.1396361142396927,
-0.16271667182445526,
-0.13089248538017273,
-0.03587205335497856,
-0.13289816677570343,
-0.16051344573497772,
0.040746260434389114,
0.16470327973365784,
-0.09069113433361053,
-0.03947014734148979,
0.0928276777267456,
-0.06873506307601929,
-0.1510191112756729,
0.0742330476641655,
-0.025586215779185295,
-0.05234290659427643,
-0.13569551706314087,
0.024486688897013664,
-0.12472458183765411,
-0.02817821130156517,
-0.050270333886146545,
-0.08590834587812424,
0.03300076350569725,
-0.0375090092420578,
0.09128280729055405,
-0.11303038150072098,
0.1475992202758789,
-0.15079694986343384,
0.01817098818719387,
0.11442241817712784,
-0.04118136316537857,
0.08824926614761353,
0.10154005140066147,
0.2026127427816391,
0.02824462577700615,
-0.05765463039278984,
-0.12238246947526932,
0.020807968452572823,
0.08463888615369797,
0.10145194083452225,
0.10394995659589767,
0.24445773661136627,
0.028903810307383537,
-0.15524277091026306,
-0.08792800456285477,
0.0626218318939209,
0.145212784409523,
-0.17453210055828094,
-0.08885497599840164,
-0.0677180215716362,
0.061150144785642624,
-0.06126489117741585,
0.14139924943447113,
-0.2703273296356201,
-0.11928535997867584,
-0.00992690958082676,
-0.03463515266776085,
0.0647241622209549,
-0.017508285120129585,
7.616256425535539e-7,
-0.29217472672462463,
0.1278955489397049,
-0.07953843474388123,
0.08414524793624878,
0.0010770098306238651,
0.007841046899557114,
-0.287813276052475,
0.01074665505439043,
-0.005404637195169926,
0.13538287580013275,
0.23955339193344116,
0.03995545580983162,
-0.16404886543750763,
-0.008000059053301811,
-0.11769591271877289,
-0.11205863207578659,
-0.040513262152671814,
0.15223300457000732,
-0.038871776312589645,
-0.046765584498643875,
0.180660679936409,
0.16906385123729706,
-0.031588420271873474,
0.017125451937317848,
0.02605154737830162,
-0.1521456241607666,
0.055737704038619995,
0.023210197687149048,
0.1453935205936432,
-0.06381826847791672,
-0.006353035103529692,
0.27110567688941956,
-0.03897859528660774,
0.07060693949460983,
0.07119469344615936,
0.12307517230510712,
-0.15776026248931885,
-0.13626980781555176,
0.13191260397434235,
0.05357355624437332,
0.02825653925538063,
0.06442297250032425,
0.0791587308049202,
-0.08519087731838226,
0.1280868798494339,
0.07194839417934418,
-0.23007696866989136,
-0.028956428170204163,
0.041222311556339264,
0.18482644855976105,
0.03277710825204849,
0.1234854906797409,
-0.017513452097773552,
0.06596244871616364,
0.040065329521894455,
-0.06914112716913223,
-0.02416914887726307,
-0.19319328665733337,
0.06501802057027817,
-0.054624661803245544,
-0.09458867460489273,
0.05579191446304321,
0.13479390740394592,
0.014113584533333778,
0.10655825585126877,
-0.072426438331604,
0.03377598524093628,
6.719006897127041e-35,
0.04034862294793129,
-0.10658573359251022,
0.14573392271995544,
-0.04029713198542595,
0.012362729758024216,
-0.11259674280881882,
0.11792817711830139,
-0.020429443567991257,
0.03884502500295639,
-0.07937894016504288,
-0.03968512639403343
] |