html_url
stringlengths 48
51
| title
stringlengths 5
280
| comments
stringlengths 63
51.8k
| body
stringlengths 0
36.2k
⌀ | comment_length
int64 16
1.52k
| text
stringlengths 159
54.1k
| embeddings
listlengths 768
768
|
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5987
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
|
Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`.
|
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
| 31
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`.
|
[
-0.3037678003311157,
-0.7298213243484497,
-0.06928098946809769,
0.5111607313156128,
0.18432703614234924,
-0.10994714498519897,
0.30907633900642395,
0.018674932420253754,
0.10166974365711212,
0.2664555311203003,
0.028241224586963654,
-0.1463250070810318,
-0.0025965003296732903,
0.17893894016742706,
0.057092756032943726,
-0.2780415415763855,
-0.06006283313035965,
-0.06695830821990967,
-0.1595606952905655,
0.2683841586112976,
-0.20223423838615417,
0.08674632012844086,
-0.1552298367023468,
-0.39063018560409546,
-0.260221391916275,
0.36226359009742737,
-0.2618880569934845,
0.2480534315109253,
-0.43026190996170044,
-0.11502312123775482,
0.422432541847229,
0.016470203176140785,
0.12431405484676361,
0.29284605383872986,
-0.00011548025213414803,
0.04472416639328003,
0.5764063000679016,
-0.20890121161937714,
-0.14684686064720154,
-0.26013946533203125,
-0.5297378301620483,
-0.1958787888288498,
-0.3873480260372162,
-0.07787798345088959,
0.16556903719902039,
0.22522400319576263,
-0.16950909793376923,
-0.061705365777015686,
0.1388460099697113,
0.2519296109676361,
0.19320380687713623,
0.15629138052463531,
0.19943343102931976,
-0.27533647418022156,
0.42668774724006653,
0.27399981021881104,
-0.1345144510269165,
0.27071094512939453,
0.2491375207901001,
0.319266676902771,
-0.148912250995636,
-0.21613089740276337,
0.03072728030383587,
-0.17256906628608704,
0.3943636119365692,
-0.09073617309331894,
-0.020497150719165802,
-0.05038342624902725,
0.14071637392044067,
0.2775045931339264,
0.4168965816497803,
-0.17273041605949402,
-0.1389809399843216,
-0.17238706350326538,
-0.1784697324037552,
-0.3842935562133789,
0.21206429600715637,
0.13093648850917816,
-0.1056305319070816,
0.2466060072183609,
-0.4801132082939148,
-0.3193548321723938,
-0.08492471277713776,
-0.05432002246379852,
-0.03822919726371765,
-0.21329814195632935,
-0.3366639316082001,
0.17785611748695374,
0.17263676226139069,
-0.32833921909332275,
-0.17826533317565918,
-0.02376813068985939,
-0.06322672963142395,
-0.0032380614429712296,
-0.5578321218490601,
-0.101862832903862,
-0.04254203289747238,
0.3681732416152954,
0.6974225044250488,
0.33042019605636597,
0.04940290004014969,
0.07651704549789429,
0.26954013109207153,
0.25464174151420593,
0.1651049256324768,
0.3033885061740875,
0.0111905038356781,
-0.12604443728923798,
-0.010770060122013092,
0.2396780550479889,
0.01103261485695839,
-0.05777553468942642,
0.19893001019954681,
-0.4074173867702484,
-0.20083366334438324,
-0.22635701298713684,
0.2049124836921692,
-0.18784388899803162,
0.25406453013420105,
-0.10189327597618103,
0.39042776823043823,
0.03443919122219086,
0.050787776708602905,
0.47865694761276245,
0.21433347463607788,
-0.21962904930114746,
-0.2852717638015747,
0.09329672902822495,
0.02579413913190365,
-0.4012404680252075,
-0.18153737485408783,
-0.0478891097009182,
-0.1768481582403183,
0.05335702747106552,
0.24264825880527496,
-0.19100423157215118,
0.121235691010952,
0.12389666587114334,
0.5075116157531738,
-0.05635180324316025,
-0.19612732529640198,
-0.2650638520717621,
0.026522107422351837,
0.40881630778312683,
-0.1423701047897339,
-0.32693246006965637,
-0.18210285902023315,
0.23701421916484833,
-0.10237693041563034,
0.2746996283531189,
-0.4196108281612396,
-0.4372299909591675,
0.04626162350177765,
0.128842294216156,
-0.140938401222229,
0.24924425780773163,
-0.7396464347839355,
0.09248417615890503,
0.193208247423172,
-0.10477876663208008,
-0.000163249671459198,
-0.11439366638660431,
-0.4180162847042084,
-0.4553455114364624,
0.3661041259765625,
0.2839333713054657,
0.01935218647122383,
0.053522124886512756,
-0.08474713563919067,
-0.21663932502269745,
0.03699258714914322,
0.2333235889673233,
-0.19514408707618713,
-0.2690199017524719,
-0.3867025375366211,
0.1488742083311081,
0.40299972891807556,
-0.013365216553211212,
-0.6267586350440979,
0.5122431516647339,
-0.01129705086350441,
0.05980941653251648,
0.42506182193756104,
-0.14720644056797028,
0.23599925637245178,
-0.12036117166280746,
-0.07595743238925934,
0.38693296909332275,
0.015949303284287453,
-0.18239489197731018,
-0.4478547275066376,
-0.30563676357269287,
-0.1567249447107315,
0.010700605809688568,
-0.069163978099823,
0.2993380129337311,
0.24482113122940063,
0.050146255642175674,
0.06952391564846039,
0.1795596182346344,
0.25253331661224365,
0.1165943294763565,
-0.0521894209086895,
-0.11055870354175568,
0.038741860538721085,
-0.2105160653591156,
-0.4932746887207031,
0.40316227078437805,
-0.3264389634132385,
-0.1692098081111908,
0.024540968239307404,
-0.2702142596244812,
-0.29581373929977417,
0.05336637794971466,
0.2187182456254959,
-0.11835470795631409,
-0.00160207599401474,
-0.012294508516788483,
0.25284430384635925,
-0.02826623246073723,
-0.03897757828235626,
0.023591618984937668,
-0.47683945298194885,
0.1322544515132904,
-0.2788611948490143,
0.11545625329017639,
-0.040955960750579834,
-0.04171048104763031,
0.050152137875556946,
-0.07811162620782852,
0.05122486501932144,
-0.09397469460964203,
-0.004807773977518082,
0.3958883285522461,
0.030704157426953316,
0.1816788613796234,
-0.22169002890586853,
0.09601031243801117,
0.07602405548095703,
0.0033257901668548584,
0.14010852575302124,
-0.19368083775043488,
0.009662539698183537,
-0.2004081904888153,
-0.13485270738601685,
0.20401480793952942,
-0.059718649834394455,
0.11961818486452103,
0.2334328442811966,
-0.11266863346099854,
-0.156561478972435,
-0.15288478136062622,
0.04250679910182953,
-0.30483362078666687,
0.09183099865913391,
0.03784050792455673,
0.35846471786499023,
0.11637774854898453,
0.03844960778951645,
-0.217187762260437,
0.48516687750816345,
-0.041831180453300476,
-0.13228565454483032,
0.4364606738090515,
0.16594558954238892,
-0.12499536573886871,
0.09102757275104523,
0.3536524176597595,
0.5531808137893677,
0.23890773952007294,
0.25763651728630066,
-0.004801813513040543,
0.1273406744003296,
-0.09798404574394226,
0.08541667461395264,
-0.010281898081302643,
0.02711350843310356,
0.1597016453742981,
0.0821920856833458,
-0.03218580782413483,
-0.04892284795641899,
-0.10229234397411346,
-0.013506441377103329,
0.0028350092470645905,
-0.3013257086277008,
-0.15247996151447296,
-0.08639726787805557,
-0.013204555958509445,
-0.23992425203323364,
0.2378109097480774,
-0.3801010251045227,
-0.04556763172149658,
-0.321510374546051,
0.09258994460105896,
0.15557406842708588,
-0.13685593008995056,
0.007208202034235001,
0.33265137672424316,
-0.008753493428230286,
0.19493600726127625,
-0.35859009623527527,
0.3413214385509491,
0.030411982908844948,
0.04322785511612892,
0.37482646107673645,
-0.1996341347694397,
0.18893370032310486,
-0.027380939573049545,
0.08921834826469421,
-0.005884235724806786,
-0.14843341708183289,
0.12231895327568054,
-0.22573043406009674,
0.335869163274765,
0.14849798381328583,
-0.07545429468154907,
0.004289910197257996,
0.3460901379585266,
0.18947473168373108,
-0.16215375065803528,
0.025828076526522636,
0.10348718613386154,
0.26848259568214417,
0.18490925431251526,
-0.3420790433883667,
0.060954395681619644,
0.023363566026091576,
-0.43324536085128784,
0.3950428366661072,
0.014671724289655685,
0.0661502480506897,
-0.0027488358318805695,
0.2196802794933319,
0.11635760962963104,
-0.175566166639328,
0.18934909999370575,
-0.09729519486427307,
-0.779508113861084,
0.20682527124881744,
-0.3149028420448303,
-0.4584676921367645,
-0.05364733189344406,
0.1872958242893219,
0.32844188809394836,
0.39028656482696533,
-0.5711508989334106,
0.2472291737794876,
-0.2822331190109253,
-0.06560409814119339,
-0.18627536296844482,
0.015799764543771744,
0.13217025995254517,
-0.29777148365974426,
0.09560491889715195,
-0.14338847994804382,
-0.04018889740109444,
-0.1115369126200676,
-0.20398679375648499,
0.1872907429933548,
0.5222952961921692,
0.27592235803604126,
0.3381624221801758,
0.8455045819282532,
0.18563249707221985,
0.13750286400318146,
0.3205505609512329,
0.060867227613925934,
0.30579474568367004,
-0.3747343122959137,
-0.15419140458106995,
0.1573570817708969,
-0.1262793242931366,
0.07066480815410614,
0.06468796730041504,
0.12993451952934265,
0.32512158155441284,
-0.041933171451091766,
-0.28370290994644165,
0.17365577816963196,
-0.16783128678798676,
0.2106519639492035,
0.016172418370842934,
0.1717449426651001,
-0.1558491587638855,
-0.06409928947687149,
0.17851756513118744,
0.02799089252948761,
-0.07298296689987183,
0.3663194179534912,
0.28244075179100037,
0.23133596777915955,
-0.1453647017478943,
0.22200371325016022,
-0.22331801056861877,
0.28977134823799133,
-0.009512224234640598,
0.12498880922794342,
-0.0991087555885315,
0.10188562422990799,
0.03812939673662186,
0.11353832483291626,
0.7157073616981506,
-0.03480430692434311,
0.12742014229297638,
0.23415163159370422,
-0.23238742351531982,
-0.06082189083099365,
0.14448082447052002,
0.19630472362041473,
0.15521623194217682,
0.07814498245716095,
0.10987453907728195,
-0.18015649914741516,
-0.09865383058786392,
-0.01246533915400505,
0.26448461413383484,
-0.09572018682956696,
-0.5172471404075623,
-0.21988457441329956,
0.045084670186042786,
-0.29422685503959656,
-0.10191003233194351,
0.2158253788948059,
0.2225460559129715,
-0.45260995626449585,
-0.02813362330198288,
-0.2727310359477997,
-0.023479696363210678,
0.019556984305381775,
-0.13035523891448975,
0.13553756475448608,
-0.15179036557674408,
0.15006330609321594,
-0.12605074048042297,
-0.11784783005714417,
0.3681774437427521,
0.5415818095207214,
0.07627899944782257,
-0.08728557825088501,
-0.1206010952591896,
-0.06996297836303711,
0.31442558765411377,
0.13731294870376587,
-0.2475605458021164,
0.07807164639234543,
-0.025790296494960785,
0.05408801883459091,
-0.3692156672477722,
-0.17900556325912476,
0.312572717666626,
-0.19377301633358002,
-0.33517080545425415,
-0.4346786439418793,
0.6217581033706665,
-0.05902570113539696,
0.1913757175207138,
0.3093474209308624,
0.40434056520462036,
-0.2353885918855667,
0.2339637726545334,
-0.15136560797691345,
0.9980385899543762,
-0.010022640228271484,
0.12012384831905365,
-0.06503994017839432,
0.20724134147167206,
0.08601977676153183,
-0.07900403439998627,
-0.05048421770334244,
-0.13101205229759216,
-0.1648639738559723,
-0.004446797072887421,
-0.27688589692115784,
0.4923436939716339,
0.2433350831270218,
-0.29472023248672485,
0.011902292259037495,
0.10215325653553009,
0.08974673599004745,
-0.019251273944973946,
0.3177008330821991,
-0.3185173273086548,
-0.13619758188724518,
-0.15929195284843445,
0.10304577648639679,
-0.04658793658018112,
-0.2225983440876007,
-0.060499273240566254,
0.016521703451871872,
0.02880839630961418,
-0.15124337375164032,
-0.24633684754371643,
-0.25871747732162476,
-0.07210233807563782,
0.02791009470820427,
-0.142220601439476,
-0.3905068039894104,
0.5492730140686035,
0.2552250325679779,
-0.23009587824344635,
0.23862481117248535,
-0.3772289752960205,
0.06674675643444061,
-0.09377806633710861,
0.022393938153982162,
0.012342958711087704,
-0.06801362335681915,
0.20008611679077148,
-0.05159430578351021,
-0.25989022850990295,
0.1006949245929718,
0.11119109392166138,
-0.279239296913147,
-0.19105668365955353,
-0.0396304577589035,
0.17553573846817017,
-0.3719819188117981,
-0.39926114678382874,
-0.240890771150589,
0.11609448492527008,
-0.21940086781978607,
0.10308445990085602,
0.2971832752227783,
0.07194513082504272,
-0.055948980152606964,
-0.012340035289525986,
-0.17721402645111084,
-0.055961716920137405,
0.47993332147598267,
-0.08098022639751434,
-0.19207052886486053,
0.016969475895166397,
0.09959281980991364,
-0.02214191108942032,
-0.040699370205402374,
0.1894170343875885,
-0.17268551886081696,
-0.3785788416862488,
0.07503782957792282,
-0.13622428476810455,
0.3648434281349182,
-0.4129067361354828,
0.103422611951828,
0.15373486280441284,
-0.22307640314102173,
0.03612842783331871,
-0.3481321334838867,
-0.422294020652771,
0.11330243945121765,
-0.21959243714809418,
0.1728886514902115,
0.09521207958459854,
-0.3092482089996338,
0.09687313437461853,
0.37936505675315857,
-0.27894890308380127,
0.17797087132930756,
0.16649304330348969,
-0.12887164950370789,
0.3127455711364746,
0.009940512478351593,
0.12251148372888565,
-0.0631331354379654,
-0.0330069363117218,
0.22940802574157715,
-0.21178661286830902,
-0.15718457102775574,
-0.07042409479618073,
0.14541685581207275,
0.0848684161901474,
0.052717387676239014,
-0.3722679913043976,
-0.3118845224380493,
-0.21982434391975403,
-0.01067049615085125,
0.2759127616882324,
0.1671644151210785,
-0.01407613605260849,
0.2187294065952301,
0.1553947478532791,
0.24055594205856323,
-0.29461246728897095,
0.07460823655128479,
0.2887774109840393,
0.32654938101768494,
0.050639376044273376,
0.18521952629089355,
-0.05304167419672012,
-0.05688241869211197,
-0.1795203536748886,
0.10555833578109741,
0.076620914041996,
-0.07114621251821518,
0.555084228515625,
-0.010892800986766815,
0.23770743608474731,
-0.23354123532772064,
0.3877568244934082,
0.2690412998199463,
-0.2618350088596344,
0.1980718970298767,
0.13094207644462585,
0.1402950882911682,
0.12734529376029968,
0.1815621554851532,
0.46855488419532776,
0.15357954800128937,
-0.09004121273756027,
0.1304515302181244,
0.22787296772003174,
0.0918329507112503,
-0.10617983341217041,
0.14033052325248718,
0.1669808179140091,
-0.28827983140945435,
-0.16658657789230347,
0.32869234681129456,
-0.025541331619024277,
0.2415250837802887,
0.40695297718048096,
0.4958411753177643,
0.4830809235572815,
0.4073949456214905,
-0.1368829607963562,
0.644269585609436,
-0.6152061820030212,
0.02436641976237297,
0.19477704167366028,
-0.6776179671287537,
0.24307703971862793,
0.3716718256473541,
-0.25317585468292236,
0.10485720634460449,
-0.26085761189460754,
0.5904410481452942,
0.20358194410800934,
-0.004713986534625292,
-0.18614651262760162,
-0.21037159860134125,
-0.22739911079406738,
-0.2485533356666565,
0.2740022540092468,
-0.16165055334568024,
-0.18575331568717957,
0.1420959085226059,
-0.036682914942502975,
-0.03652191907167435,
0.46708452701568604,
-0.11806131899356842,
0.010534562170505524,
-0.026386404410004616,
0.208446204662323,
0.25768378376960754,
-0.12248102575540543,
-0.34950122237205505,
0.2098887413740158,
0.24602358043193817,
0.1074066013097763,
0.3240200877189636,
0.11865325272083282,
0.46409231424331665,
0.13523238897323608,
0.1563614308834076,
-0.11260436475276947,
0.1300790011882782,
-0.044057637453079224,
-0.3556499481201172,
0.3854445815086365,
0.13836611807346344,
0.2417750358581543,
0.4953061640262604,
0.1450452208518982,
-0.15094535052776337,
-0.2081087976694107,
0.2393377274274826,
0.2392868995666504,
-0.548361599445343,
0.22805574536323547,
-0.23617801070213318,
-0.26534587144851685,
0.028694618493318558,
0.25831523537635803,
-0.4655766189098358,
-0.10290322452783585,
0.4992033839225769,
-0.029744243249297142,
-0.021847063675522804,
-0.28455179929733276,
0.036389339715242386,
0.1084626168012619,
0.3653969466686249,
0.29705530405044556,
0.031681906431913376,
-0.24985912442207336,
-0.12880700826644897,
-0.46972033381462097,
0.0821714848279953,
0.10124382376670837,
0.17497076094150543,
0.03414706885814667,
0.17425382137298584,
-0.07547935098409653,
-0.10846038162708282,
-0.07825011014938354,
-0.2450324147939682,
0.09892207384109497,
0.09081588685512543,
0.14856648445129395,
-0.3378028869628906,
-0.21409638226032257,
-0.20209619402885437,
-0.013827660121023655,
-0.21286413073539734,
0.3417031168937683,
-0.2527805268764496,
-0.06987261772155762,
-0.4279559254646301,
0.25349411368370056,
0.2305830419063568,
-0.002328544855117798,
0.45346346497535706,
0.09327893704175949,
0.3192340135574341,
-0.023303871974349022,
-0.16586428880691528,
-0.43221181631088257,
0.11313249915838242,
0.09667767584323883,
0.12440789490938187,
-0.08852608501911163,
0.14855271577835083,
-0.29946330189704895,
-0.3017142117023468,
-0.20100153982639313,
0.20561634004116058,
-0.2048441767692566,
-0.2917327880859375,
0.05395112931728363,
-0.09088993072509766,
-0.19421535730361938,
-0.03929838910698891,
0.27414193749427795,
0.3829701840877533,
-0.16279684007167816,
0.07334825396537781,
-0.1047903448343277,
-0.08515787869691849,
0.3333045244216919,
-0.2846679985523224,
-0.22148624062538147,
0.04174569249153137,
0.09631074219942093,
0.019435543566942215,
-0.29333263635635376,
-0.8238461017608643,
0.0529785081744194,
0.3016120493412018,
0.0790371298789978,
0.09365539252758026,
0.3963219225406647,
-0.08764524757862091,
0.14777779579162598,
-0.03208687901496887,
0.3220360279083252,
0.012733811512589455,
-0.20385955274105072,
0.05580606684088707,
-0.16934365034103394
] |
https://github.com/huggingface/datasets/issues/5987
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
|
In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background)
|
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
| 34
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background)
|
[
-0.3627934157848358,
-0.6249354481697083,
-0.041861627250909805,
0.4104882478713989,
0.08719854056835175,
-0.13526874780654907,
0.36134281754493713,
0.0005360990762710571,
0.0667373389005661,
0.2791599631309509,
-0.048482947051525116,
-0.13423429429531097,
0.08890246599912643,
0.3084559440612793,
0.046326152980327606,
-0.23880243301391602,
-0.1302359700202942,
-0.04183347523212433,
-0.10687296092510223,
0.25170034170150757,
-0.1490112990140915,
0.12604017555713654,
-0.1755872368812561,
-0.4193141460418701,
-0.25966188311576843,
0.3601217567920685,
-0.16235247254371643,
0.21230193972587585,
-0.49386346340179443,
-0.0322677306830883,
0.5251181125640869,
-0.02910739555954933,
0.1733296513557434,
0.23081618547439575,
-0.00011869394802488387,
0.05386094003915787,
0.556342601776123,
-0.22497756779193878,
-0.0854014903306961,
-0.25983142852783203,
-0.37235867977142334,
-0.1803111732006073,
-0.3082708716392517,
-0.046128325164318085,
0.16377323865890503,
0.20003895461559296,
-0.20157811045646667,
0.0736268162727356,
0.06551213562488556,
0.29844728112220764,
0.15950676798820496,
0.1663045734167099,
0.25860118865966797,
-0.20405025780200958,
0.37866073846817017,
0.1866036355495453,
-0.21112360060214996,
0.20314136147499084,
0.29829055070877075,
0.4063515067100525,
-0.2581673562526703,
-0.20037470757961273,
0.028426552191376686,
-0.019252687692642212,
0.3710598647594452,
-0.04734862968325615,
0.10220470279455185,
-0.061893291771411896,
0.15240460634231567,
0.22756412625312805,
0.3886958658695221,
-0.09897903352975845,
-0.10980848222970963,
-0.21199870109558105,
-0.1611490249633789,
-0.2395576536655426,
0.304654061794281,
0.14665235579013824,
-0.10843491554260254,
0.16781313717365265,
-0.44380536675453186,
-0.36157387495040894,
-0.14866261184215546,
0.06937875598669052,
0.018070563673973083,
-0.15333832800388336,
-0.2944979667663574,
0.12823617458343506,
0.11539612710475922,
-0.2560635805130005,
-0.016755785793066025,
-0.05038809776306152,
-0.19750681519508362,
-0.033666227012872696,
-0.7258873581886292,
-0.07398228347301483,
-0.1404818892478943,
0.36376428604125977,
0.7066556811332703,
0.44833123683929443,
0.14537189900875092,
0.11484499275684357,
0.1740735024213791,
0.22131049633026123,
0.10703058540821075,
0.3475818336009979,
0.06583249568939209,
-0.22053852677345276,
-0.009301364421844482,
0.2664327025413513,
0.1250041425228119,
0.010653935372829437,
0.29908841848373413,
-0.46228545904159546,
-0.2599392235279083,
-0.24557742476463318,
0.2702377438545227,
-0.122409887611866,
0.1560901701450348,
-0.15606430172920227,
0.41012683510780334,
0.1370166838169098,
0.1394229233264923,
0.4156839847564697,
0.20362743735313416,
-0.2738041579723358,
-0.3120300769805908,
0.152912437915802,
0.03695504367351532,
-0.5449607372283936,
-0.11526767164468765,
-0.03485924378037453,
-0.03710559010505676,
0.013828378170728683,
0.3254960775375366,
-0.34178707003593445,
0.14012853801250458,
0.11305811256170273,
0.5565052628517151,
-0.08050611615180969,
-0.19312602281570435,
-0.18835049867630005,
0.10202896595001221,
0.46738559007644653,
-0.026345327496528625,
-0.4339488446712494,
-0.25122755765914917,
0.13495026528835297,
-0.01970711350440979,
0.23965203762054443,
-0.4569357633590698,
-0.42559704184532166,
-0.17793932557106018,
0.07731100916862488,
-0.15712060034275055,
0.21316605806350708,
-0.7801946401596069,
0.1224624365568161,
0.2241184115409851,
-0.08807513117790222,
-0.03968793898820877,
-0.0704406350851059,
-0.39283132553100586,
-0.3504689335823059,
0.39083313941955566,
0.2024284303188324,
-0.030338924378156662,
0.1540522426366806,
-0.19615989923477173,
-0.15209577977657318,
0.0904926061630249,
0.167134627699852,
-0.14902836084365845,
-0.3141741156578064,
-0.4153299033641815,
0.20915307104587555,
0.2709570527076721,
0.06792499125003815,
-0.6676435470581055,
0.564005970954895,
-0.02566787600517273,
-0.06365915387868881,
0.4053266942501068,
-0.09550932049751282,
0.3566214144229889,
-0.12677285075187683,
-0.035239383578300476,
0.3932516574859619,
0.0016341116279363632,
-0.16502220928668976,
-0.42340731620788574,
-0.4060607850551605,
-0.32314127683639526,
0.019643064588308334,
-0.003777153789997101,
0.3302852213382721,
0.2812930941581726,
0.1480579525232315,
0.011249158531427383,
0.21131235361099243,
0.3061820864677429,
0.10536433756351471,
-0.10261724889278412,
-0.2211538702249527,
0.07207144796848297,
-0.21716710925102234,
-0.6982561349868774,
0.38043835759162903,
-0.3311344087123871,
-0.14237293601036072,
0.08052755147218704,
-0.23998823761940002,
-0.32006776332855225,
-0.0018411669880151749,
0.12892775237560272,
-0.03865751996636391,
-0.018639978021383286,
-0.12462368607521057,
0.2814139127731323,
-0.05850306153297424,
-0.010150432586669922,
-0.04022900015115738,
-0.5120619535446167,
0.14549541473388672,
-0.20554956793785095,
0.2608262598514557,
-0.0504533126950264,
-0.10835107415914536,
0.1514190286397934,
-0.07811539620161057,
0.08038803935050964,
-0.1116197258234024,
-0.03706887364387512,
0.3807614743709564,
-0.055385738611221313,
0.20423603057861328,
-0.2750896215438843,
0.04794223606586456,
0.13807326555252075,
0.14139072597026825,
0.08179210126399994,
-0.16395698487758636,
-0.03164629638195038,
-0.22995024919509888,
-0.0407118946313858,
0.15929675102233887,
-0.16896852850914001,
0.17271894216537476,
0.12315921485424042,
-0.04830796271562576,
-0.14629335701465607,
-0.15798042714595795,
0.12421203404664993,
-0.30587226152420044,
0.15614835917949677,
-0.055022675544023514,
0.35597312450408936,
0.04645790904760361,
0.058632075786590576,
-0.2053700089454651,
0.4640256464481354,
0.024716336280107498,
-0.059592053294181824,
0.4165842831134796,
0.19850648939609528,
-0.15159162878990173,
0.2039317637681961,
0.3439107835292816,
0.5334141254425049,
0.18947862088680267,
0.18587742745876312,
-0.012433307245373726,
0.0956215187907219,
-0.20842887461185455,
0.02924252301454544,
-0.017332889139652252,
0.080419160425663,
0.2597067356109619,
0.1990097165107727,
-0.10732872784137726,
-0.24208518862724304,
-0.03330874443054199,
0.14407135546207428,
-0.0016363263130187988,
-0.3112589716911316,
-0.1884082853794098,
-0.052376747131347656,
0.07007691264152527,
-0.12670081853866577,
0.17882750928401947,
-0.3728499114513397,
-0.15954051911830902,
-0.2561953663825989,
0.2150038182735443,
0.18083469569683075,
-0.1096566915512085,
0.007172703742980957,
0.28737208247184753,
0.0862705186009407,
0.017051341012120247,
-0.38572371006011963,
0.39219194650650024,
-0.006712827831506729,
-0.011570656672120094,
0.3628290295600891,
-0.21981464326381683,
0.1164618581533432,
0.008574400097131729,
0.07972264289855957,
-0.13461603224277496,
-0.23261520266532898,
0.15737053751945496,
-0.10033471882343292,
0.2737016975879669,
0.10300686210393906,
-0.1573764532804489,
0.03706861287355423,
0.3409421145915985,
0.10803355276584625,
-0.2020217478275299,
0.016644375398755074,
0.14678777754306793,
0.13604077696800232,
0.13173192739486694,
-0.33838462829589844,
0.05558309331536293,
-0.0040826257318258286,
-0.3548060655593872,
0.29822564125061035,
0.05599137768149376,
0.049770355224609375,
-0.1898440420627594,
0.1185293048620224,
0.03535906970500946,
-0.23252534866333008,
0.060357846319675446,
-0.04969321936368942,
-0.7956482768058777,
0.27464550733566284,
-0.3263143301010132,
-0.4922170341014862,
0.018902678042650223,
0.20271499454975128,
0.29270878434181213,
0.31894487142562866,
-0.523022472858429,
0.18834485113620758,
-0.3599744439125061,
-0.008794296532869339,
-0.23858654499053955,
-0.10484234988689423,
0.1464855968952179,
-0.35123303532600403,
0.13900327682495117,
-0.12976089119911194,
0.07305735349655151,
0.06499947607517242,
-0.12769341468811035,
0.21981754899024963,
0.4680961072444916,
0.1715717315673828,
0.35420724749565125,
0.6986225247383118,
0.10144813358783722,
0.04800756648182869,
0.35726580023765564,
0.019849061965942383,
0.17211653292179108,
-0.337081640958786,
-0.08103784173727036,
0.24849370121955872,
-0.1560644805431366,
0.06773277372121811,
0.043404657393693924,
0.09388039261102676,
0.3498639762401581,
-0.004165492951869965,
-0.24701249599456787,
0.20547181367874146,
-0.15955595672130585,
0.07815137505531311,
-0.06949562579393387,
0.08272402733564377,
-0.09585407376289368,
0.030351504683494568,
0.25193020701408386,
-0.12675917148590088,
-0.09213584661483765,
0.3541715741157532,
0.23847869038581848,
0.2867622673511505,
-0.029811756685376167,
0.2744027078151703,
-0.24061766266822815,
0.2900659739971161,
-0.0489930585026741,
0.1576385796070099,
-0.0874255821108818,
0.3058275580406189,
0.08053446561098099,
0.10069749504327774,
0.6271928548812866,
-0.019199853762984276,
0.2636893391609192,
0.07878980040550232,
-0.18324612081050873,
0.0039789117872715,
0.028574969619512558,
0.24384212493896484,
0.171161949634552,
0.22255712747573853,
0.1929420828819275,
-0.17557883262634277,
-0.013678064569830894,
0.025647997856140137,
0.16143982112407684,
-0.07806810736656189,
-0.47163891792297363,
-0.17256136238574982,
-0.01028294488787651,
-0.29256924986839294,
-0.1000770702958107,
0.2729150652885437,
0.28112488985061646,
-0.42225927114486694,
-0.028887886554002762,
-0.34816116094589233,
-0.04341147840023041,
-0.019345752894878387,
-0.1318718045949936,
0.09243758767843246,
-0.12886884808540344,
0.2055746465921402,
-0.1694883555173874,
-0.12958085536956787,
0.39224594831466675,
0.549095630645752,
0.21444344520568848,
-0.19976910948753357,
-0.07658488303422928,
-0.1545546054840088,
0.2801167964935303,
0.04102754592895508,
-0.3458067774772644,
0.0963311418890953,
-0.05967000871896744,
0.03189986199140549,
-0.29186663031578064,
-0.1476791948080063,
0.2368522733449936,
-0.1560720056295395,
-0.24721623957157135,
-0.26678353548049927,
0.6853672862052917,
-0.18232010304927826,
0.2970758080482483,
0.2405710518360138,
0.3862442374229431,
-0.20132280886173248,
0.2436085194349289,
-0.061373524367809296,
0.7177585363388062,
-0.025463439524173737,
0.03805909305810928,
-0.07124500721693039,
0.2984686493873596,
0.066017746925354,
-0.06034330651164055,
0.01715037226676941,
-0.13059775531291962,
-0.1770188808441162,
-0.0326831191778183,
-0.24714402854442596,
0.42346933484077454,
0.30355799198150635,
-0.24073508381843567,
0.003288446692749858,
0.12853068113327026,
0.16130787134170532,
0.05049138516187668,
0.36380162835121155,
-0.3466092646121979,
-0.22976276278495789,
-0.1270177662372589,
0.08172190189361572,
-0.1476862132549286,
-0.13031622767448425,
-0.013371948152780533,
-0.05691777169704437,
0.053262945264577866,
-0.12818637490272522,
-0.2554677724838257,
-0.07496117055416107,
-0.09377149492502213,
0.02936524897813797,
-0.15713001787662506,
-0.48630112409591675,
0.6127075552940369,
0.2697203755378723,
-0.2329525500535965,
0.2200901359319687,
-0.3856748938560486,
0.09902323782444,
-0.09933128207921982,
-0.07100202143192291,
0.027176344767212868,
-0.06754454970359802,
0.11371080577373505,
-0.06354859471321106,
-0.2452068030834198,
0.04872111976146698,
0.12614771723747253,
-0.2960311770439148,
-0.15976986289024353,
-0.02240072935819626,
0.18100959062576294,
-0.25843867659568787,
-0.3791526257991791,
-0.31215786933898926,
0.12079422175884247,
-0.29292818903923035,
0.05771744251251221,
0.24060243368148804,
0.07031181454658508,
-0.04301539063453674,
-0.02602890506386757,
-0.18830859661102295,
-0.0392087884247303,
0.4847419261932373,
-0.11632346361875534,
-0.16055074334144592,
0.09298405051231384,
0.13616028428077698,
0.0522698238492012,
-0.013757502660155296,
0.17412391304969788,
-0.3167847990989685,
-0.4009373188018799,
0.13161681592464447,
-0.2344071865081787,
0.3941592574119568,
-0.3110288083553314,
0.20345823466777802,
0.13729968667030334,
-0.19057586789131165,
-0.04134269803762436,
-0.43236565589904785,
-0.34193339943885803,
0.01032903790473938,
-0.23550285398960114,
0.07915158569812775,
0.11685105413198471,
-0.19873712956905365,
0.14575700461864471,
0.381714403629303,
-0.20777983963489532,
0.16812892258167267,
0.10756783932447433,
-0.15800155699253082,
0.16244882345199585,
0.016452085226774216,
0.16143269836902618,
-0.060846976935863495,
-0.11144502460956573,
0.22725442051887512,
-0.15068012475967407,
-0.11908997595310211,
-0.1288745254278183,
0.14970925450325012,
0.13544154167175293,
0.15941670536994934,
-0.48805904388427734,
-0.3275197148323059,
-0.4591656029224396,
0.0035356897860765457,
0.3733457624912262,
0.16985756158828735,
0.010480858385562897,
0.14465391635894775,
0.21574391424655914,
0.17371541261672974,
-0.3183925747871399,
0.020851366221904755,
0.25116562843322754,
0.35858315229415894,
-0.0023944610729813576,
0.27037984132766724,
-0.011554826982319355,
0.04420139640569687,
-0.12716300785541534,
0.06951147317886353,
0.018144041299819946,
-0.12826037406921387,
0.5173783302307129,
-0.18112537264823914,
0.22226828336715698,
-0.3543478548526764,
0.33733445405960083,
0.23633134365081787,
-0.16987481713294983,
0.08189179003238678,
-0.006634950637817383,
0.09306212514638901,
0.016373395919799805,
0.19826257228851318,
0.39191901683807373,
0.2646859884262085,
-0.0631943866610527,
0.08228598535060883,
0.21586573123931885,
0.042621299624443054,
-0.21715901792049408,
0.24956420063972473,
0.20727302134037018,
-0.2942923903465271,
-0.11550305783748627,
0.365975946187973,
-0.08157461881637573,
0.30774104595184326,
0.5387651324272156,
0.333947092294693,
0.3932975232601166,
0.425520658493042,
-0.10134794563055038,
0.6689580678939819,
-0.48373040556907654,
0.07017001509666443,
0.25256046652793884,
-0.6046140789985657,
0.14580971002578735,
0.35901135206222534,
-0.1923055648803711,
0.05447317659854889,
-0.21128353476524353,
0.5764553546905518,
0.28547075390815735,
-0.011195246130228043,
-0.3690982162952423,
-0.21907411515712738,
-0.24362888932228088,
-0.16893413662910461,
0.16590450704097748,
-0.16959430277347565,
-0.035975534468889236,
0.1655733287334442,
0.05859602242708206,
-0.001931697130203247,
0.49501141905784607,
-0.07395116984844208,
-0.05765402317047119,
-0.05844371020793915,
0.22011637687683105,
0.35305607318878174,
-0.1930595338344574,
-0.299286812543869,
0.2533654570579529,
0.3046230971813202,
0.07364806532859802,
0.28593504428863525,
0.04168415069580078,
0.4153042137622833,
0.1586463302373886,
0.18524423241615295,
-0.15331272780895233,
0.14561018347740173,
-0.08065392076969147,
-0.3505892753601074,
0.42646047472953796,
0.19759973883628845,
0.22126741707324982,
0.5854491591453552,
0.09975109994411469,
-0.13024766743183136,
-0.16837652027606964,
0.3178665041923523,
0.23741701245307922,
-0.3708663284778595,
0.3804270327091217,
-0.2592190206050873,
-0.24045857787132263,
-0.012729093432426453,
0.22263959050178528,
-0.3483426868915558,
-0.18358153104782104,
0.4854951798915863,
-0.0811384841799736,
0.009663041681051254,
-0.2786853611469269,
0.016415126621723175,
0.04199454188346863,
0.36075782775878906,
0.3019222915172577,
-0.020640753209590912,
-0.2708829939365387,
-0.0980987399816513,
-0.44227179884910583,
0.11355007439851761,
0.04983936622738838,
0.1855500340461731,
0.13660505414009094,
0.2387995570898056,
-0.06372221559286118,
-0.05644771456718445,
-0.002232767641544342,
-0.2321094423532486,
0.08427007496356964,
0.12775778770446777,
0.11159053444862366,
-0.2730080783367157,
-0.21575845777988434,
-0.2379840910434723,
-0.07149634510278702,
-0.32215842604637146,
0.3688073456287384,
-0.19567207992076874,
-0.10346201062202454,
-0.35591453313827515,
0.2622446119785309,
0.2702983319759369,
-0.1483151912689209,
0.4060007929801941,
0.09943018853664398,
0.3600395917892456,
-0.061897508800029755,
-0.02945507876574993,
-0.41824260354042053,
0.07764770835638046,
-0.002718095201998949,
0.08335044980049133,
-0.018200069665908813,
0.20641598105430603,
-0.2566773295402527,
-0.15991905331611633,
-0.24052704870700836,
0.2308262288570404,
-0.1916774958372116,
-0.28835535049438477,
-0.0471615344285965,
0.029188593849539757,
-0.22799402475357056,
0.040188100188970566,
0.25687870383262634,
0.28189775347709656,
-0.1522793024778366,
0.10328755527734756,
-0.04715617001056671,
-0.0782845988869667,
0.25925496220588684,
-0.25392112135887146,
-0.18536968529224396,
0.07286512106657028,
0.09743250906467438,
0.08999215811491013,
-0.35059478878974915,
-0.6529016494750977,
0.04969710856676102,
0.2868141531944275,
-0.027153681963682175,
0.16714392602443695,
0.3772071897983551,
-0.035391807556152344,
0.12514348328113556,
-0.05714496597647667,
0.17831702530384064,
0.09558860212564468,
-0.24210946261882782,
-0.01737123169004917,
-0.15817058086395264
] |
https://github.com/huggingface/datasets/issues/5987
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
|
But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files.
|
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
| 37
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files.
|
[
-0.2997311055660248,
-0.5392211675643921,
-0.031439632177352905,
0.49214619398117065,
0.06836823374032974,
-0.14852777123451233,
0.37754225730895996,
0.0601707361638546,
0.154785618185997,
0.19435274600982666,
0.052181124687194824,
-0.02918769232928753,
-0.027666907757520676,
0.11105682700872421,
0.05679638683795929,
-0.27790337800979614,
0.030735187232494354,
-0.026148274540901184,
-0.2354450523853302,
0.07628509402275085,
-0.16119515895843506,
0.09008863568305969,
-0.13875065743923187,
-0.3203093409538269,
-0.16899442672729492,
0.2830234169960022,
-0.1082664281129837,
0.22532400488853455,
-0.4388929307460785,
-0.18799777328968048,
0.4479502737522125,
-0.045211661607027054,
0.08544494211673737,
0.23340240120887756,
-0.00012065314513165504,
0.12824775278568268,
0.5903948545455933,
-0.16754665970802307,
-0.13512933254241943,
-0.21575172245502472,
-0.44110721349716187,
-0.20479343831539154,
-0.15471696853637695,
-0.03972446545958519,
0.21874314546585083,
0.026793982833623886,
-0.18356284499168396,
-0.19788858294487,
0.1987270563840866,
0.2634105980396271,
0.1398419886827469,
0.257920503616333,
0.2087622731924057,
-0.16362036764621735,
0.5473008751869202,
0.2298877090215683,
-0.20396539568901062,
0.28003212809562683,
0.11437221616506577,
0.28923559188842773,
-0.3396816551685333,
-0.03581497073173523,
0.06887583434581757,
-0.026872355490922928,
0.40121597051620483,
-0.05149324983358383,
-0.11871445924043655,
0.02007973939180374,
0.11170942336320877,
0.19861721992492676,
0.46260392665863037,
-0.20841577649116516,
-0.2644459307193756,
-0.21340018510818481,
-0.2742738723754883,
-0.35447943210601807,
0.2915821671485901,
0.168879896402359,
-0.09739716351032257,
0.21522150933742523,
-0.4061944782733917,
-0.2443276345729828,
-0.18938632309436798,
0.06995537132024765,
0.04855812340974808,
-0.1814010739326477,
-0.28519341349601746,
0.1957455277442932,
0.10027372092008591,
-0.293898344039917,
0.033304374665021896,
0.02741808444261551,
-0.16168135404586792,
0.05073107033967972,
-0.5555331110954285,
0.001476336270570755,
-0.030920736491680145,
0.37606436014175415,
0.6765165328979492,
0.4723374843597412,
0.12533797323703766,
0.15768808126449585,
0.1527492105960846,
0.24750563502311707,
0.12994098663330078,
0.431121289730072,
-0.0029907971620559692,
-0.08496753126382828,
-0.13900558650493622,
0.17084315419197083,
0.015256401151418686,
-0.06604397296905518,
0.1756308227777481,
-0.5306062698364258,
-0.15661519765853882,
-0.17578113079071045,
0.14159661531448364,
-0.1983548402786255,
0.31713569164276123,
-0.0527055561542511,
0.411817342042923,
0.0792846754193306,
0.06216488406062126,
0.4712861180305481,
0.19803304970264435,
-0.06525841355323792,
-0.34226906299591064,
0.23342415690422058,
0.03950555622577667,
-0.4183662533760071,
-0.1761074811220169,
-0.08976767957210541,
-0.20292794704437256,
0.08304373919963837,
0.19049789011478424,
-0.16959364712238312,
0.19251063466072083,
0.06009875237941742,
0.5454139113426208,
0.005024336278438568,
-0.13268683850765228,
-0.19433808326721191,
0.22394803166389465,
0.38386139273643494,
-0.23578667640686035,
-0.26524966955184937,
-0.07806761562824249,
0.22130794823169708,
-0.08183472603559494,
0.09992226958274841,
-0.4360617995262146,
-0.4846879541873932,
-0.047577597200870514,
0.05172084644436836,
-0.18511883914470673,
0.18353937566280365,
-0.7491333484649658,
0.01714964397251606,
0.23829808831214905,
-0.17294280230998993,
0.10116727650165558,
-0.0824737697839737,
-0.3494120240211487,
-0.4367702901363373,
0.3867305517196655,
0.32260024547576904,
-0.07379482686519623,
0.0747213065624237,
-0.13210463523864746,
-0.09577280282974243,
0.1052856594324112,
0.29311105608940125,
-0.31673991680145264,
-0.3364408016204834,
-0.36560291051864624,
0.17781241238117218,
0.4784480929374695,
-0.09316246211528778,
-0.700627326965332,
0.5014482140541077,
-0.0033795833587646484,
-0.12609706819057465,
0.42136824131011963,
-0.18966306746006012,
0.21323594450950623,
-0.0015787201700732112,
-0.14504140615463257,
0.3574219346046448,
0.015517289750277996,
-0.18580995500087738,
-0.4319610595703125,
-0.42816320061683655,
-0.23615239560604095,
-0.013144419528543949,
-0.005771268159151077,
0.2637813091278076,
0.408012717962265,
-0.17220433056354523,
0.045100994408130646,
0.21252873539924622,
0.333695650100708,
0.19873546063899994,
-0.12881268560886383,
-0.2110765427350998,
0.12279948592185974,
-0.1402500569820404,
-0.6237332820892334,
0.4199569523334503,
-0.33536791801452637,
-0.24477437138557434,
-0.13159288465976715,
-0.14336490631103516,
-0.31282877922058105,
0.14519689977169037,
0.07432831078767776,
-0.022239569574594498,
-0.03715503215789795,
0.015149533748626709,
0.2853575646877289,
-0.024783939123153687,
-0.11770443618297577,
-0.06355296820402145,
-0.3272272050380707,
0.10234438627958298,
-0.3154892921447754,
0.14764544367790222,
-0.0373043417930603,
-0.09872524440288544,
-0.03939911723136902,
-0.09613492339849472,
0.05399592965841293,
-0.11214254051446915,
-0.08351068943738937,
0.3741251826286316,
-0.06055310741066933,
0.3300851285457611,
-0.18558263778686523,
0.018283456563949585,
0.10793787986040115,
-0.12529560923576355,
0.14775553345680237,
-0.1870921105146408,
0.0000970344990491867,
-0.07857780158519745,
-0.1568230390548706,
0.31266850233078003,
-0.054666850715875626,
0.24006924033164978,
0.1224675178527832,
-0.06384194642305374,
-0.1132604107260704,
-0.07308781147003174,
0.0426468625664711,
-0.40304848551750183,
0.11395244300365448,
-0.05833945795893669,
0.44476741552352905,
0.08519189059734344,
-0.017730340361595154,
-0.04563092440366745,
0.5462354421615601,
0.08172814548015594,
-0.10246381908655167,
0.364599347114563,
0.10185004025697708,
-0.21524423360824585,
0.3191686272621155,
0.4634151756763458,
0.4290374517440796,
0.20238572359085083,
0.25816619396209717,
-0.04368600994348526,
0.1012197956442833,
-0.19408908486366272,
0.0917113795876503,
-0.10102462768554688,
0.0851900652050972,
0.22401824593544006,
0.11794130504131317,
-0.10183187574148178,
-0.0946294367313385,
-0.05405258387327194,
-0.011605089530348778,
-0.011502951383590698,
-0.2793651819229126,
-0.06948952376842499,
-0.1639096587896347,
0.02774350345134735,
-0.30372464656829834,
0.158136248588562,
-0.3624188303947449,
-0.09065091609954834,
-0.31030797958374023,
0.01029747724533081,
0.0028896108269691467,
-0.06019856035709381,
-0.19916042685508728,
0.22553476691246033,
0.06874501705169678,
-0.04440733790397644,
-0.38193413615226746,
0.1887856423854828,
0.01906917802989483,
-0.06027936562895775,
0.32802146673202515,
-0.12984254956245422,
0.10858587920665741,
-0.006847331300377846,
0.1372581571340561,
-0.157633975148201,
-0.05105718597769737,
0.1563454270362854,
-0.07278043776750565,
0.2308952957391739,
0.10435804724693298,
-0.06250108778476715,
-0.06244156137108803,
0.2804314196109772,
0.23719874024391174,
-0.27950456738471985,
-0.09618506580591202,
0.18503998219966888,
0.2054971158504486,
0.1528414636850357,
-0.27859702706336975,
0.035950593650341034,
-0.05268727242946625,
-0.4778009355068207,
0.4320486783981323,
0.15059086680412292,
0.08772400766611099,
0.0033542835153639317,
0.2810211479663849,
0.11598791927099228,
-0.2949191629886627,
0.16343766450881958,
-0.04867827892303467,
-0.7478062510490417,
0.31062060594558716,
-0.3143085241317749,
-0.45101916790008545,
-0.11688016355037689,
0.09411144256591797,
0.3713376224040985,
0.46531832218170166,
-0.5031164884567261,
0.2762511074542999,
-0.3787745237350464,
0.028311070054769516,
-0.11804984509944916,
-0.0012345854192972183,
0.3042188286781311,
-0.16202586889266968,
0.06868571788072586,
-0.17724484205245972,
0.03776903077960014,
0.072929747402668,
-0.2077564001083374,
0.11446544528007507,
0.5175453424453735,
0.3342636525630951,
0.2552601993083954,
1.0550884008407593,
0.15109996497631073,
0.13492286205291748,
0.4615359902381897,
-0.0269454475492239,
0.3378095328807831,
-0.3971196413040161,
-0.16495151817798615,
0.13172732293605804,
-0.17341923713684082,
0.0425281748175621,
-0.010942459106445312,
0.12785638868808746,
0.16234883666038513,
-0.05592891573905945,
-0.2988884747028351,
0.11814004927873611,
-0.18848760426044464,
0.20678089559078217,
-0.20590215921401978,
0.07000155001878738,
-0.09910888969898224,
-0.04607485979795456,
0.03795599564909935,
-0.06409569829702377,
0.01109866052865982,
0.1985553652048111,
0.18999268114566803,
0.30238738656044006,
-0.13213364779949188,
0.24754437804222107,
-0.20595887303352356,
0.28317126631736755,
0.05450058728456497,
0.18307726085186005,
-0.045463595539331436,
-0.05573562532663345,
0.023867696523666382,
0.03991839289665222,
0.5342404246330261,
-0.007632385939359665,
0.1710597574710846,
0.045695189386606216,
-0.01925298385322094,
-0.29705333709716797,
0.1286972314119339,
0.2651347517967224,
0.12688863277435303,
-0.12327948212623596,
0.16108492016792297,
-0.21015483140945435,
-0.12079411000013351,
-0.12395788729190826,
0.25113338232040405,
-0.06583727896213531,
-0.35867249965667725,
-0.25715547800064087,
0.19138959050178528,
-0.3571890890598297,
-0.11985816806554794,
0.19257980585098267,
0.12029383331537247,
-0.33630871772766113,
0.04058154299855232,
-0.30134594440460205,
-0.03748958557844162,
-0.18400327861309052,
-0.14462140202522278,
0.31128931045532227,
-0.2445373833179474,
0.07083870470523834,
-0.022320158779621124,
0.050551481544971466,
0.43172934651374817,
0.7621840238571167,
0.13518939912319183,
-0.14793018996715546,
-0.11691161245107651,
-0.07091952860355377,
0.21366000175476074,
0.22905854880809784,
-0.2683473527431488,
0.13584347069263458,
0.1072925478219986,
0.03854900225996971,
-0.25267770886421204,
-0.11605072766542435,
0.1278088241815567,
-0.2752186059951782,
-0.11086637526750565,
-0.32573455572128296,
0.7016730308532715,
-0.12082275748252869,
0.17610953748226166,
0.4007490277290344,
0.536243200302124,
-0.13236476480960846,
0.3922082781791687,
-0.012374363839626312,
1.024482250213623,
0.10856711864471436,
0.26325523853302,
0.04795779287815094,
0.13115786015987396,
0.16977901756763458,
0.031018204987049103,
-0.015859141945838928,
-0.14322280883789062,
0.03836226835846901,
-0.03978844732046127,
-0.35206565260887146,
0.2688438594341278,
0.21014897525310516,
-0.16628751158714294,
0.056991685181856155,
-0.00180719792842865,
0.19344277679920197,
-0.07472281903028488,
0.2611258924007416,
-0.29095229506492615,
-0.15604168176651,
-0.046889528632164,
0.05204034596681595,
0.020481377840042114,
-0.18294523656368256,
-0.0021331580355763435,
-0.14897756278514862,
-0.10134288668632507,
-0.19392886757850647,
-0.23434783518314362,
-0.08569398522377014,
-0.1403394639492035,
0.12680649757385254,
-0.073317751288414,
-0.5759211778640747,
0.4085395336151123,
0.22225572168827057,
-0.1339835673570633,
0.030165502801537514,
-0.3867588937282562,
0.06963247060775757,
0.04919130727648735,
-0.006647848058491945,
-0.060142673552036285,
-0.1428394615650177,
0.19962839782238007,
0.003666125237941742,
-0.19825993478298187,
-0.042001619935035706,
-0.016178596764802933,
-0.38020747900009155,
-0.1322946399450302,
0.08970286697149277,
0.10550270974636078,
-0.23815879225730896,
-0.2963903844356537,
-0.30790776014328003,
0.02098298817873001,
-0.21781939268112183,
0.06756056845188141,
0.26138418912887573,
0.17197458446025848,
-0.16562727093696594,
0.03064689412713051,
-0.1641179919242859,
-0.04644465073943138,
0.545104444026947,
-0.17093858122825623,
-0.13502949476242065,
0.22091419994831085,
0.0486929677426815,
-0.06275075674057007,
-0.04621683433651924,
0.1388094425201416,
0.12056781351566315,
-0.7278205156326294,
0.04764909669756889,
-0.3048963248729706,
0.24767251312732697,
-0.33052995800971985,
0.11305446922779083,
0.29059261083602905,
-0.14104223251342773,
-0.023534348234534264,
-0.2866211533546448,
-0.4785756766796112,
0.19172707200050354,
-0.4179452955722809,
0.10166013240814209,
0.00581374391913414,
-0.3602825701236725,
0.11655876040458679,
0.3483157157897949,
-0.2260262668132782,
0.13304105401039124,
0.14000184834003448,
-0.11937248706817627,
0.18847763538360596,
-0.016739867627620697,
0.22412851452827454,
-0.0548585020005703,
-0.08771517872810364,
0.15035906434059143,
-0.307071328163147,
-0.09399668872356415,
-0.08726924657821655,
0.16720236837863922,
0.1302344799041748,
-0.0005288226529955864,
-0.44274285435676575,
-0.31442564725875854,
-0.26220160722732544,
-0.08175524324178696,
0.22071491181850433,
0.07762544602155685,
-0.028082385659217834,
0.1337754875421524,
0.24439632892608643,
0.15514273941516876,
-0.3273995518684387,
0.06365132331848145,
0.3026893734931946,
0.2889728844165802,
-0.1684628576040268,
0.20177289843559265,
-0.047476876527071,
-0.06933866441249847,
-0.042486127465963364,
0.11642007529735565,
0.08080306649208069,
-0.09961839765310287,
0.48005765676498413,
-0.1211470514535904,
0.09097106754779816,
-0.26708829402923584,
0.485763818025589,
0.30543071031570435,
-0.1264350861310959,
0.08081036806106567,
0.21946775913238525,
0.09410098195075989,
0.042872726917266846,
0.059957049787044525,
0.359193354845047,
0.24760499596595764,
-0.0440627783536911,
0.042478956282138824,
0.28922712802886963,
-0.015685953199863434,
0.031701795756816864,
0.16657820343971252,
0.12031438946723938,
-0.35500776767730713,
-0.12688212096691132,
0.2500091791152954,
0.034100111573934555,
0.2149675339460373,
0.46638357639312744,
0.5405043959617615,
0.5852707624435425,
0.43997347354888916,
-0.16188541054725647,
0.5419871807098389,
-0.35220423340797424,
0.047516465187072754,
0.17739272117614746,
-0.6309183239936829,
0.17494188249111176,
0.2150982916355133,
-0.15950298309326172,
0.1172628104686737,
-0.17765012383460999,
0.7758632302284241,
0.33010515570640564,
-0.09184866398572922,
-0.1937551498413086,
-0.24800215661525726,
-0.1470518410205841,
-0.27088823914527893,
0.11116765439510345,
-0.25345662236213684,
-0.1501866728067398,
0.12478362023830414,
-0.05672856792807579,
0.026381559669971466,
0.4862326979637146,
-0.007200472056865692,
0.07343081384897232,
-0.08333279937505722,
0.24105021357536316,
0.35619115829467773,
-0.07506807893514633,
-0.3374808132648468,
0.323771208524704,
0.2782022953033447,
-0.03272188454866409,
0.2380933314561844,
0.09869140386581421,
0.4613385498523712,
0.1873917281627655,
0.08581137657165527,
-0.14997658133506775,
0.2661793529987335,
-0.16161583364009857,
-0.38785314559936523,
0.4313775897026062,
0.1809203326702118,
0.025671234354376793,
0.5314903855323792,
0.08902928233146667,
-0.12465542554855347,
-0.06151108071208,
0.17866873741149902,
0.2783714234828949,
-0.38848090171813965,
0.1848352700471878,
-0.3135344982147217,
-0.24330389499664307,
0.017546620219945908,
0.1412326693534851,
-0.5427680015563965,
-0.005783203989267349,
0.5448878407478333,
-0.06767632067203522,
0.028642497956752777,
-0.35659804940223694,
0.005015050992369652,
0.13009075820446014,
0.5973286628723145,
0.3929389715194702,
0.19889730215072632,
-0.1540144830942154,
-0.10547707229852676,
-0.4909420609474182,
0.20679065585136414,
0.08042847365140915,
0.3012205958366394,
0.04418248310685158,
0.368881493806839,
-0.02423640340566635,
0.04263710603117943,
0.017237506806850433,
-0.10265485942363739,
0.11649102717638016,
0.15211226046085358,
0.08218978345394135,
-0.19614635407924652,
0.0016375035047531128,
-0.18566589057445526,
0.026720229536294937,
-0.31022652983665466,
0.31146931648254395,
-0.23219045996665955,
-0.06470978260040283,
-0.2794352173805237,
0.1276562213897705,
0.1971876472234726,
-0.10202334821224213,
0.4719424843788147,
0.11361327022314072,
0.26513874530792236,
0.03318949043750763,
-0.1741034984588623,
-0.5991045236587524,
-0.061932336539030075,
-0.007213594391942024,
0.04149256646633148,
-0.07050815224647522,
0.22226449847221375,
-0.37718531489372253,
-0.2565375566482544,
-0.30187100172042847,
0.09129919856786728,
-0.18535619974136353,
-0.15896496176719666,
0.10930901020765305,
0.01179577223956585,
-0.21076062321662903,
-0.0749795064330101,
0.20743413269519806,
0.26587262749671936,
-0.07476446032524109,
0.07804583758115768,
-0.11607399582862854,
-0.1794070601463318,
0.4100766181945801,
-0.3568308651447296,
-0.1669767051935196,
0.24704192578792572,
0.06385532021522522,
0.2693374454975128,
-0.38289716839790344,
-0.7617343068122864,
0.077921561896801,
0.21038775146007538,
0.06581449508666992,
0.114105224609375,
0.1777440458536148,
-0.04197930172085762,
0.1507982611656189,
-0.09503988921642303,
0.4512644410133362,
0.0762408971786499,
-0.15270107984542847,
-0.007340442389249802,
-0.23046749830245972
] |
https://github.com/huggingface/datasets/issues/5987
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
|
Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`?
|
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
| 31
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`?
|
[
-0.3947969377040863,
-0.52030348777771,
-0.08260650932788849,
0.41540735960006714,
0.12109259516000748,
-0.10688069462776184,
0.41824963688850403,
0.0021099578589200974,
0.04208003357052803,
0.2065712809562683,
-0.006453440524637699,
-0.10002316534519196,
-0.12214674800634384,
0.3273208737373352,
0.039627715945243835,
-0.13935509324073792,
-0.12105629593133926,
0.04566540569067001,
-0.2131389081478119,
0.27034616470336914,
-0.15230047702789307,
0.1610756367444992,
-0.12313498556613922,
-0.24383391439914703,
-0.05888418108224869,
0.1645767092704773,
-0.10859650373458862,
0.23274675011634827,
-0.3673136830329895,
-0.30569204688072205,
0.5316643118858337,
0.15184286236763,
0.09969942271709442,
0.4086657762527466,
-0.00012393223005346954,
0.10797011852264404,
0.47001683712005615,
-0.17759446799755096,
-0.14618776738643646,
-0.13184188306331635,
-0.43017852306365967,
-0.20777031779289246,
-0.11204886436462402,
-0.02751123160123825,
0.2574487328529358,
-0.056447047740221024,
-0.16907666623592377,
-0.05273012816905975,
0.24400873482227325,
0.14061933755874634,
0.10948821902275085,
0.014903146773576736,
0.21351315081119537,
-0.12968750298023224,
0.28103840351104736,
0.2640940546989441,
-0.13988502323627472,
0.27123787999153137,
0.3543626070022583,
0.4239329695701599,
-0.3126998841762543,
-0.14971405267715454,
0.2003573775291443,
0.03493718057870865,
0.333215594291687,
-0.1651879996061325,
-0.05223270505666733,
-0.1242385059595108,
0.15258321166038513,
0.2772921621799469,
0.5342509746551514,
-0.3287014067173004,
-0.17267781496047974,
-0.3955729901790619,
-0.082156702876091,
-0.3651937246322632,
0.22978705167770386,
0.1005333885550499,
-0.08675791323184967,
0.17435799539089203,
-0.28916314244270325,
-0.29973456263542175,
-0.2750139832496643,
0.09528549015522003,
0.01667775958776474,
-0.14180389046669006,
-0.40049493312835693,
0.1865791380405426,
0.18504321575164795,
-0.3026522994041443,
0.05263381823897362,
0.08242030441761017,
-0.17599378526210785,
0.05043701082468033,
-0.5989404916763306,
-0.13046318292617798,
-0.13148868083953857,
0.24712255597114563,
0.7651265859603882,
0.48131823539733887,
0.23259292542934418,
0.10076570510864258,
0.16102537512779236,
0.06254446506500244,
0.3037448525428772,
0.3465222716331482,
-0.018207401037216187,
-0.06331842392683029,
-0.02179642766714096,
0.30675971508026123,
0.15718047320842743,
-0.0531235933303833,
0.09440449625253677,
-0.4918951094150543,
-0.1601053923368454,
-0.2358587384223938,
0.26829004287719727,
-0.0894087553024292,
0.245624840259552,
-0.24203702807426453,
0.3622381091117859,
-0.009666591882705688,
0.10163700580596924,
0.35346564650535583,
0.26693210005760193,
-0.08506201952695847,
-0.3975136876106262,
0.17408666014671326,
0.12313356250524521,
-0.38777995109558105,
-0.0709230825304985,
-0.08401471376419067,
-0.08450362831354141,
0.13808156549930573,
0.17534227669239044,
-0.2577442526817322,
0.10487660765647888,
0.12504136562347412,
0.41109293699264526,
-0.08525824546813965,
-0.09775323420763016,
-0.21290989220142365,
0.15155720710754395,
0.3731216788291931,
0.030879918485879898,
-0.14469583332538605,
-0.2625652551651001,
0.04763783514499664,
-0.16514673829078674,
0.16806356608867645,
-0.4682767391204834,
-0.5283670425415039,
-0.026054350659251213,
0.07537855952978134,
-0.21807129681110382,
0.24943199753761292,
-0.826421856880188,
0.17634911835193634,
0.27755239605903625,
-0.1841193437576294,
0.018387801945209503,
-0.08945107460021973,
-0.22118419408798218,
-0.43424150347709656,
0.30054932832717896,
0.287037193775177,
-0.23567360639572144,
0.0740770548582077,
-0.3384123742580414,
-0.12186288833618164,
0.030153699219226837,
0.26504063606262207,
-0.2737536132335663,
-0.05119685083627701,
-0.4984188377857208,
0.2596037983894348,
0.5543159246444702,
-0.0019660592079162598,
-0.7622240781784058,
0.586180567741394,
0.02343955636024475,
0.03103065676987171,
0.46224895119667053,
-0.22288954257965088,
0.2890704870223999,
-0.10576799511909485,
-0.21484145522117615,
0.30012738704681396,
-0.07202039659023285,
-0.2689482569694519,
-0.21515603363513947,
-0.3399989902973175,
-0.2635865807533264,
0.01902902126312256,
-0.03971533849835396,
0.2533646523952484,
0.2785027027130127,
-0.125983327627182,
0.22956380248069763,
0.13280591368675232,
0.2888680100440979,
0.227446049451828,
-0.1700512170791626,
-0.22626133263111115,
0.20872077345848083,
-0.22337546944618225,
-0.6536921262741089,
0.2374987006187439,
-0.2470344752073288,
-0.40602803230285645,
-0.14500516653060913,
-0.19760090112686157,
-0.38400012254714966,
0.11170407384634018,
-0.10011526942253113,
-0.0492425374686718,
-0.049642905592918396,
0.05099721625447273,
0.1969902217388153,
-0.19049717485904694,
-0.28158247470855713,
0.05725349485874176,
-0.4267469048500061,
0.08558623492717743,
-0.41058698296546936,
0.027317577973008156,
0.12289771437644958,
-0.13101480901241302,
0.0939917117357254,
-0.06803727895021439,
-0.15184623003005981,
-0.1955125480890274,
0.01172864530235529,
0.4092599153518677,
-0.019907953217625618,
0.21454580128192902,
-0.13487312197685242,
0.18885241448879242,
0.12245374917984009,
0.04038750007748604,
-0.02467537112534046,
-0.1297600418329239,
-0.04570157080888748,
-0.18429221212863922,
-0.1021389290690422,
0.31707632541656494,
-0.35317501425743103,
0.33897092938423157,
0.2308719903230667,
-0.08703671395778656,
0.018840374425053596,
-0.03239262104034424,
-0.0852271169424057,
-0.3074686527252197,
0.0812910720705986,
0.04312925413250923,
0.502583920955658,
0.15495330095291138,
0.0005115717649459839,
-0.05906877666711807,
0.5582443475723267,
-0.0009867511689662933,
-0.12522807717323303,
0.4531807005405426,
0.0634324848651886,
-0.07757362723350525,
0.16087062656879425,
0.5119166374206543,
0.5055262446403503,
0.14056237041950226,
0.24558798968791962,
-0.09521833807229996,
0.2503786087036133,
-0.170575350522995,
0.004531413316726685,
0.06499135494232178,
0.2143591046333313,
0.3996095657348633,
0.06201663985848427,
-0.13927777111530304,
-0.15422171354293823,
-0.22000883519649506,
-0.0951639711856842,
0.08654148876667023,
-0.2930835783481598,
-0.0705491155385971,
-0.05049563944339752,
0.05310776084661484,
-0.2206883281469345,
0.05351065471768379,
-0.40094664692878723,
-0.1777283102273941,
-0.28732728958129883,
0.158573180437088,
0.21034619212150574,
-0.05136438459157944,
-0.13349638879299164,
0.29766130447387695,
0.05843205004930496,
0.16279330849647522,
-0.37386950850486755,
0.3030252456665039,
-0.009361878037452698,
-0.05045200139284134,
0.35194453597068787,
-0.2875710129737854,
0.1641046702861786,
0.019542807713150978,
0.11849558353424072,
-0.03604760766029358,
-0.05775488168001175,
0.23693443834781647,
-0.0629425048828125,
0.17259114980697632,
0.3053392767906189,
0.021193228662014008,
0.019623268395662308,
0.23474271595478058,
0.07931775599718094,
-0.053283244371414185,
-0.029221579432487488,
0.14114710688591003,
-0.017871124669909477,
0.21407167613506317,
-0.13742513954639435,
0.11381665617227554,
-0.11340246349573135,
-0.4607151746749878,
0.5254045724868774,
0.17663241922855377,
0.15388363599777222,
0.004182334989309311,
0.1679563969373703,
0.10368921607732773,
-0.08181923627853394,
0.08495758473873138,
0.01178299356251955,
-0.6056603193283081,
0.2545481026172638,
-0.3328908383846283,
-0.34167978167533875,
-0.1312619298696518,
-0.01171875186264515,
0.45030540227890015,
0.4011620283126831,
-0.41763317584991455,
0.26004892587661743,
-0.3400919735431671,
-0.12765058875083923,
-0.23775482177734375,
0.01911913976073265,
0.24828940629959106,
-0.153817281126976,
0.1239318698644638,
-0.08177408576011658,
0.14556629955768585,
0.13518425822257996,
-0.30508336424827576,
0.0967244878411293,
0.5731111764907837,
0.2910284698009491,
0.32400599122047424,
0.9444125890731812,
0.32801008224487305,
0.18526595830917358,
0.2823182940483093,
-0.07269155234098434,
0.166881263256073,
-0.30865952372550964,
-0.16517989337444305,
0.07867593318223953,
-0.07462041079998016,
0.17686185240745544,
0.11256273090839386,
0.13333210349082947,
0.29583242535591125,
0.10484880208969116,
-0.24382612109184265,
0.12241444736719131,
-0.25893452763557434,
0.19801852107048035,
-0.11853381991386414,
0.11487384885549545,
-0.3058985471725464,
-0.14181026816368103,
0.1087060272693634,
-0.06979092955589294,
0.023161817342042923,
0.23788920044898987,
0.10633304715156555,
0.19139304757118225,
-0.11528553068637848,
0.17559173703193665,
-0.19263845682144165,
0.265999972820282,
-0.05796482786536217,
0.1830524206161499,
0.057098228484392166,
-0.04836491495370865,
0.15125808119773865,
0.009719286113977432,
0.7215023040771484,
0.10025930404663086,
0.02963387593626976,
0.08751612901687622,
-0.10067309439182281,
-0.24248914420604706,
0.14334626495838165,
0.17332541942596436,
0.45039835572242737,
0.1282758265733719,
0.24447515606880188,
-0.3014030158519745,
-0.14661458134651184,
-0.010604869574308395,
0.2606968581676483,
-0.16873055696487427,
-0.42531928420066833,
-0.17006376385688782,
-0.04837723821401596,
-0.33607181906700134,
-0.10507785528898239,
0.20689378678798676,
0.11871405690908432,
-0.3464270234107971,
-0.04058005288243294,
-0.41429993510246277,
-0.32472872734069824,
-0.11976449191570282,
-0.017371391877532005,
0.2025623619556427,
-0.20347611606121063,
0.051802750676870346,
0.03682774677872658,
-0.02154705673456192,
0.367535263299942,
0.6507940888404846,
0.29822787642478943,
-0.2249617576599121,
-0.011380568146705627,
-0.1867782175540924,
0.2908363938331604,
0.16826479136943817,
-0.3615816831588745,
0.12365366518497467,
0.05413999408483505,
0.007959850132465363,
-0.19985227286815643,
-0.15830621123313904,
0.21253956854343414,
-0.25001031160354614,
-0.3673495650291443,
-0.38764235377311707,
0.6146590709686279,
-0.046497028321027756,
0.09547130763530731,
0.6221742033958435,
0.46515047550201416,
-0.14464496076107025,
0.2648234963417053,
-0.1347479224205017,
0.9746037721633911,
-0.019900411367416382,
0.15102995932102203,
0.07225185632705688,
0.2238219529390335,
-0.0627625584602356,
-0.0428212471306324,
0.020709283649921417,
-0.2439219355583191,
-0.11180108040571213,
-0.0319385752081871,
-0.26233622431755066,
0.40635648369789124,
0.37710535526275635,
-0.14778517186641693,
0.06118698790669441,
0.10545021295547485,
0.02514026127755642,
-0.06570198386907578,
0.31062746047973633,
-0.39422348141670227,
-0.22649118304252625,
-0.1910487711429596,
-0.012503253296017647,
-0.11791181564331055,
-0.22297531366348267,
0.04164659604430199,
-0.15626274049282074,
0.11299116909503937,
-0.08483980596065521,
-0.20135727524757385,
-0.16658645868301392,
-0.2216167449951172,
0.021944455802440643,
-0.021828006953001022,
-0.620559573173523,
0.44360795617103577,
0.3002055883407593,
-0.1779688149690628,
0.006822060793638229,
-0.3320516347885132,
0.13571515679359436,
0.05233490467071533,
-0.013086637482047081,
-0.05951143056154251,
-0.015499837696552277,
0.15999779105186462,
-0.034190353006124496,
-0.08268819004297256,
0.10537570714950562,
0.15059620141983032,
-0.3759041428565979,
-0.08646245300769806,
-0.015454530715942383,
0.1842208057641983,
-0.38380298018455505,
-0.2722441256046295,
-0.25515928864479065,
0.044400427490472794,
-0.18588224053382874,
-0.008249465376138687,
0.2839280962944031,
0.146804541349411,
-0.0030127987265586853,
-0.05478346720337868,
-0.20553883910179138,
-0.04209813103079796,
0.40035054087638855,
-0.04878142476081848,
-0.06169778108596802,
0.31948408484458923,
0.1079523116350174,
0.03765959292650223,
-0.02476269006729126,
0.15027981996536255,
0.10204470902681351,
-0.6188820600509644,
0.14192168414592743,
-0.23682749271392822,
0.38756120204925537,
-0.23736995458602905,
0.1231321170926094,
0.2428228259086609,
-0.0906308963894844,
-0.1735887974500656,
-0.32589417695999146,
-0.4707145392894745,
0.06426084041595459,
-0.2007095366716385,
0.21489867568016052,
-0.03659731522202492,
-0.4410646855831146,
0.08468405157327652,
0.3961397707462311,
-0.17460286617279053,
0.006252137012779713,
0.12735767662525177,
-0.21013157069683075,
0.3213942348957062,
0.07565167546272278,
0.16635386645793915,
0.07029235363006592,
-0.10955198854207993,
0.12451031804084778,
-0.1867913454771042,
-0.08221659064292908,
-0.12078270316123962,
0.1910848319530487,
0.049776285886764526,
0.058032214641571045,
-0.35630500316619873,
-0.29827654361724854,
-0.3277284502983093,
-0.13346776366233826,
0.33363330364227295,
-0.09961533546447754,
0.027689862996339798,
0.1524224728345871,
0.3126586377620697,
0.028130624443292618,
-0.43459177017211914,
0.05107663944363594,
0.22681593894958496,
0.27637940645217896,
0.05972895398736,
0.3249063491821289,
0.03496422991156578,
-0.06274320185184479,
-0.1440197378396988,
0.1915307343006134,
0.255534827709198,
-0.10339348763227463,
0.3893437087535858,
-0.20826299488544464,
0.153259739279747,
-0.1966710239648819,
0.47633159160614014,
0.4929738938808441,
-0.21292422711849213,
0.10255542397499084,
-0.022920355200767517,
0.03912937641143799,
0.03948991745710373,
0.08003520220518112,
0.3279348313808441,
0.156145840883255,
-0.15383577346801758,
0.16120746731758118,
0.17497257888317108,
0.006657220423221588,
0.026952538639307022,
0.21167981624603271,
0.05107063427567482,
-0.3765864968299866,
-0.12588177621364594,
0.391508549451828,
-0.09793233126401901,
0.15239275991916656,
0.4963069558143616,
0.42970892786979675,
0.4807053208351135,
0.4899211525917053,
-0.26959526538848877,
0.5758868455886841,
-0.2996968626976013,
-0.05368592217564583,
0.26209890842437744,
-0.741790235042572,
0.01792360469698906,
0.16212314367294312,
-0.16658523678779602,
-0.012893490493297577,
0.026811499148607254,
0.6330057978630066,
0.362223356962204,
-0.10441955924034119,
-0.11789309978485107,
-0.3233461380004883,
-0.09860069304704666,
-0.2698782682418823,
0.05998317152261734,
-0.2731768786907196,
-0.1796627640724182,
0.06401148438453674,
-0.06916354596614838,
-0.0383666530251503,
0.5280498266220093,
-0.0149693563580513,
0.05811880901455879,
-0.36568954586982727,
0.3347817659378052,
0.2738700211048126,
-0.03612846881151199,
-0.31725722551345825,
0.31116825342178345,
0.2595894932746887,
0.08185843378305435,
0.2204931229352951,
0.06950819492340088,
0.359657347202301,
0.14607924222946167,
0.11836999654769897,
-0.105697400867939,
0.15231184661388397,
-0.15505070984363556,
-0.3187006711959839,
0.29315561056137085,
0.06979116052389145,
0.15182699263095856,
0.46499523520469666,
0.06161278486251831,
-0.07384531199932098,
-0.09735891222953796,
0.2205352932214737,
0.14796176552772522,
-0.45118361711502075,
0.17230522632598877,
-0.21979111433029175,
-0.3521153926849365,
0.030611464753746986,
0.2023732215166092,
-0.43910881876945496,
-0.14321653544902802,
0.6146395206451416,
-0.13989916443824768,
-0.016921639442443848,
-0.38356730341911316,
-0.013273864984512329,
0.08015787601470947,
0.38612163066864014,
0.3662396967411041,
0.18970391154289246,
-0.13347066938877106,
-0.10508640110492706,
-0.3998097777366638,
0.1304226666688919,
0.1195187121629715,
0.10866568982601166,
0.0803694948554039,
0.35086673498153687,
-0.07116947323083878,
-0.04402416944503784,
0.17748601734638214,
-0.22729139029979706,
0.15427814424037933,
0.3489028215408325,
0.139532670378685,
-0.32453498244285583,
-0.021600008010864258,
-0.04764100909233093,
-0.10151655226945877,
-0.31780338287353516,
0.20484846830368042,
-0.203535258769989,
-0.1138082817196846,
-0.16973437368869781,
0.09561192989349365,
0.30065348744392395,
-0.15632975101470947,
0.361261785030365,
0.10051281005144119,
0.14232805371284485,
-0.11558172106742859,
-0.028354695066809654,
-0.4772762656211853,
0.11899863928556442,
-0.10184959322214127,
0.3216780424118042,
0.009696753695607185,
0.09205708652734756,
-0.39233967661857605,
-0.1881275475025177,
-0.2737176716327667,
0.02550964616239071,
-0.13954445719718933,
-0.06097640097141266,
0.05560757964849472,
0.12810078263282776,
-0.1767314374446869,
0.08526290208101273,
0.21805883944034576,
0.3041745722293854,
-0.11143271625041962,
0.08098535239696503,
-0.05617062747478485,
-0.04872529208660126,
0.2814757823944092,
-0.3010857105255127,
-0.21150514483451843,
0.279452383518219,
0.055038802325725555,
0.25281745195388794,
-0.2917022705078125,
-0.6236255168914795,
0.04408153146505356,
0.3708059787750244,
-0.0558088943362236,
0.05947347357869148,
0.22501997649669647,
0.006132741458714008,
0.14596498012542725,
-0.12960438430309296,
0.5035660266876221,
0.11611706018447876,
-0.27912890911102295,
-0.06136743724346161,
-0.17410631477832794
] |
https://github.com/huggingface/datasets/issues/5987
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
|
Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR.
|
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
| 19
|
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR.
|
[
-0.3149162828922272,
-0.7279369831085205,
-0.04494945704936981,
0.4540121555328369,
0.22023165225982666,
-0.13597293198108673,
0.3097448945045471,
0.026849549263715744,
0.13989868760108948,
0.24466393887996674,
-0.04459383338689804,
-0.10497264564037323,
0.028703942894935608,
0.31513512134552,
0.09893335402011871,
-0.31869250535964966,
-0.0761198028922081,
-0.0799008309841156,
-0.22092950344085693,
0.23974372446537018,
-0.14927780628204346,
0.15449626743793488,
-0.15014740824699402,
-0.37666600942611694,
-0.19611206650733948,
0.3497489094734192,
-0.22297796607017517,
0.23607748746871948,
-0.45731374621391296,
-0.12842971086502075,
0.5216813683509827,
0.07682254165410995,
0.12528426945209503,
0.283010870218277,
-0.00011506950249895453,
0.09612621366977692,
0.5956634879112244,
-0.21448074281215668,
-0.0666433721780777,
-0.28497886657714844,
-0.3889371156692505,
-0.1772490292787552,
-0.25546708703041077,
-0.004835627973079681,
0.08935298770666122,
0.185598224401474,
-0.2604612112045288,
0.054358601570129395,
0.15051469206809998,
0.23017017543315887,
0.20367994904518127,
0.22753143310546875,
0.2706286907196045,
-0.2613920569419861,
0.39928701519966125,
0.28203898668289185,
-0.14494793117046356,
0.26395002007484436,
0.1577921360731125,
0.35633352398872375,
-0.1671014130115509,
-0.15631671249866486,
0.07888762652873993,
-0.1320343017578125,
0.3805078864097595,
-0.10019371658563614,
-0.03161992132663727,
-0.06201767921447754,
0.09252603352069855,
0.3021281659603119,
0.3441734313964844,
-0.19057148694992065,
-0.19593103229999542,
-0.22546130418777466,
-0.17832693457603455,
-0.3911260664463043,
0.28572264313697815,
0.09555211663246155,
-0.11741751432418823,
0.24824345111846924,
-0.42340949177742004,
-0.29386699199676514,
-0.08573684096336365,
-0.01607833057641983,
0.01588428020477295,
-0.14172376692295074,
-0.28836020827293396,
0.108663409948349,
0.19124002754688263,
-0.3117777705192566,
-0.17911511659622192,
0.03788028657436371,
-0.11325068771839142,
-0.04750710353255272,
-0.6067478060722351,
-0.09659656882286072,
-0.020924672484397888,
0.3818735182285309,
0.7130284309387207,
0.41402411460876465,
0.025134321302175522,
0.14018568396568298,
0.21921800076961517,
0.22494569420814514,
0.14141491055488586,
0.3309701979160309,
0.0565105602145195,
-0.15875943005084991,
-0.04262658208608627,
0.34253278374671936,
0.06506654620170593,
-0.00034572556614875793,
0.2724873125553131,
-0.4778470993041992,
-0.3224124014377594,
-0.17186853289604187,
0.2514961361885071,
-0.1576223075389862,
0.2688538432121277,
-0.13116586208343506,
0.4574568271636963,
0.08755675703287125,
0.07799980789422989,
0.4837401509284973,
0.19392049312591553,
-0.1628740131855011,
-0.258056640625,
0.19488263130187988,
-0.007913586683571339,
-0.4800778329372406,
-0.18840773403644562,
-0.030220821499824524,
-0.14778666198253632,
0.03016851842403412,
0.24520622193813324,
-0.25420498847961426,
0.13146165013313293,
0.15435901284217834,
0.6003401279449463,
-0.07314345985651016,
-0.20466603338718414,
-0.09607204794883728,
0.008116357028484344,
0.4685027599334717,
-0.11871512234210968,
-0.3215050995349884,
-0.12374483048915863,
0.1584295928478241,
-0.053178682923316956,
0.19291755557060242,
-0.3675634562969208,
-0.41533130407333374,
-0.024685287848114967,
0.11753145605325699,
-0.18009930849075317,
0.18258844316005707,
-0.7355442047119141,
0.10129190981388092,
0.20307281613349915,
-0.09557686746120453,
-0.023133762180805206,
-0.09661442041397095,
-0.3699348568916321,
-0.40115296840667725,
0.45597344636917114,
0.25500112771987915,
0.05350928381085396,
0.02329432964324951,
-0.10079468786716461,
-0.22308509051799774,
0.08119533956050873,
0.19507618248462677,
-0.16107933223247528,
-0.27716076374053955,
-0.39483198523521423,
0.17440439760684967,
0.36290597915649414,
0.02239176258444786,
-0.6342776417732239,
0.5064718723297119,
0.007748797535896301,
0.033016979694366455,
0.40690889954566956,
-0.2619033753871918,
0.19456547498703003,
-0.04824977368116379,
-0.0799163430929184,
0.40758198499679565,
-0.023124588653445244,
-0.17442624270915985,
-0.48594164848327637,
-0.34217125177383423,
-0.16458888351917267,
-0.010768710635602474,
-0.017304066568613052,
0.3462646007537842,
0.2500741481781006,
-0.01941853016614914,
0.07261718064546585,
0.22794237732887268,
0.22444042563438416,
0.15764881670475006,
-0.04393165186047554,
-0.12384840846061707,
0.021501736715435982,
-0.20962482690811157,
-0.4723086953163147,
0.38081079721450806,
-0.3216240406036377,
-0.10971072316169739,
0.01521415263414383,
-0.2840278148651123,
-0.38305726647377014,
0.07339970767498016,
0.169192835688591,
-0.16575811803340912,
0.025850102305412292,
-0.010330446064472198,
0.26892751455307007,
-0.04032929614186287,
-0.02649635262787342,
0.002963002771139145,
-0.4306694269180298,
0.18059948086738586,
-0.35449716448783875,
0.13972507417201996,
-0.08107520639896393,
-0.06617262959480286,
0.09571108222007751,
-0.03507419675588608,
0.06291518360376358,
-0.1278757005929947,
-0.012785656377673149,
0.4046860635280609,
0.002689819782972336,
0.1742890179157257,
-0.22318363189697266,
0.007767960429191589,
0.11537255346775055,
0.045223865658044815,
-0.01331654004752636,
-0.2022140920162201,
-0.06479022651910782,
-0.13377055525779724,
-0.08210355788469315,
0.2767285108566284,
-0.11929802596569061,
0.14344853162765503,
0.16602464020252228,
-0.04389212653040886,
-0.0564575269818306,
-0.12222975492477417,
0.04811311513185501,
-0.30946648120880127,
0.11905026435852051,
-0.02105475217103958,
0.345027893781662,
0.03390273079276085,
-0.0049283429980278015,
-0.17827686667442322,
0.4003637135028839,
0.03096488118171692,
-0.0550021156668663,
0.42469918727874756,
0.21160989999771118,
-0.129215806722641,
0.14484629034996033,
0.34386420249938965,
0.5069724321365356,
0.23131775856018066,
0.2173774540424347,
0.01201549731194973,
0.11422105133533478,
-0.1624491810798645,
0.04070131480693817,
-0.02923814207315445,
-0.03369694575667381,
0.21277159452438354,
0.12676872313022614,
-0.10453301668167114,
-0.15385428071022034,
0.004648122936487198,
-0.002455618232488632,
0.03754095360636711,
-0.34404006600379944,
-0.1666022539138794,
-0.12993834912776947,
0.0550614595413208,
-0.172968327999115,
0.1517399549484253,
-0.3906262218952179,
-0.12246190011501312,
-0.2558169364929199,
0.13969382643699646,
0.12442386150360107,
-0.0309028010815382,
0.032957371324300766,
0.24153995513916016,
0.028962517157197,
0.22561922669410706,
-0.42591235041618347,
0.31182822585105896,
0.0293940007686615,
0.020405814051628113,
0.3586505651473999,
-0.20469163358211517,
0.17014798521995544,
-0.03475130721926689,
0.05852455645799637,
0.017755264416337013,
-0.2535572350025177,
0.16108113527297974,
-0.20725519955158234,
0.3165842592716217,
0.1568630337715149,
-0.06491616368293762,
0.04627691209316254,
0.3233773410320282,
0.211948961019516,
-0.22732843458652496,
-0.044966429471969604,
0.19251114130020142,
0.22339266538619995,
0.18807978928089142,
-0.38339298963546753,
0.02101931720972061,
-0.01425798051059246,
-0.44022321701049805,
0.36284393072128296,
0.04831239953637123,
0.017667144536972046,
-0.03030308336019516,
0.21192233264446259,
0.04489772394299507,
-0.23908498883247375,
0.1432514488697052,
-0.10295218229293823,
-0.7922937273979187,
0.24160486459732056,
-0.3727496266365051,
-0.49143633246421814,
-0.07490308582782745,
0.15415211021900177,
0.33816495537757874,
0.29317426681518555,
-0.50200355052948,
0.19840893149375916,
-0.33711278438568115,
-0.036552030593156815,
-0.1616450846195221,
-0.0257756095379591,
0.182254821062088,
-0.28073057532310486,
0.08068566024303436,
-0.1583552360534668,
-0.01646096259355545,
-0.006253078579902649,
-0.2279391884803772,
0.17053714394569397,
0.39673298597335815,
0.30154260993003845,
0.29900678992271423,
0.7883570790290833,
0.14279325306415558,
0.1016630083322525,
0.3623993694782257,
-0.016399061307311058,
0.3062157928943634,
-0.36118945479393005,
-0.1728045791387558,
0.14488747715950012,
-0.10221308469772339,
0.15571695566177368,
0.0714903473854065,
0.13017278909683228,
0.31860923767089844,
-0.06425260752439499,
-0.24470432102680206,
0.1553441286087036,
-0.19947266578674316,
0.1391630470752716,
-0.02011362463235855,
0.07021930813789368,
-0.12245015799999237,
-0.009710650891065598,
0.16023853421211243,
-0.0013605779968202114,
-0.05371420457959175,
0.3608059883117676,
0.16777046024799347,
0.2523239850997925,
-0.12037123739719391,
0.24050593376159668,
-0.2339804768562317,
0.30294269323349,
-0.036188334226608276,
0.17419902980327606,
-0.0797102227807045,
0.06811999529600143,
0.045525118708610535,
0.14393728971481323,
0.7181301116943359,
-0.026170378550887108,
0.10081931948661804,
0.16472814977169037,
-0.23812039196491241,
-0.11427994817495346,
0.07985237240791321,
0.2315889298915863,
0.08996028453111649,
0.13389281928539276,
0.13568420708179474,
-0.25592029094696045,
-0.10574743151664734,
0.02050084061920643,
0.19542045891284943,
-0.11843135952949524,
-0.5138054490089417,
-0.28189048171043396,
0.02204308658838272,
-0.30695268511772156,
-0.05400111526250839,
0.2252861112356186,
0.23958663642406464,
-0.47606226801872253,
0.005602855235338211,
-0.26665741205215454,
-0.08356726914644241,
-0.025128230452537537,
-0.12402653694152832,
0.17384880781173706,
-0.12532737851142883,
0.12290649116039276,
-0.11399224400520325,
-0.07367618381977081,
0.3027065098285675,
0.5811296701431274,
0.13535982370376587,
-0.17482507228851318,
-0.09592495113611221,
-0.09535621106624603,
0.23954904079437256,
0.1537826508283615,
-0.29324451088905334,
0.13105598092079163,
-0.042111583054065704,
0.09317689388990402,
-0.3122263550758362,
-0.14834772050380707,
0.24220122396945953,
-0.20126822590827942,
-0.2523815333843231,
-0.3645639419555664,
0.5949630737304688,
-0.14987483620643616,
0.2115543633699417,
0.2682267725467682,
0.39679545164108276,
-0.21886137127876282,
0.27693361043930054,
-0.15640875697135925,
0.9931719899177551,
-0.013260871171951294,
0.08225682377815247,
0.03916439414024353,
0.18449492752552032,
0.17102020978927612,
-0.07068773359060287,
-0.015379715710878372,
-0.1747725009918213,
-0.2000403255224228,
0.01192142628133297,
-0.24044129252433777,
0.4258444011211395,
0.1740933358669281,
-0.29155418276786804,
0.00970786064863205,
0.015391960740089417,
0.07134202867746353,
-0.0329311266541481,
0.33734115958213806,
-0.31564387679100037,
-0.13947677612304688,
-0.19901014864444733,
0.10408499836921692,
-0.08554917573928833,
-0.13724124431610107,
-0.022912468761205673,
-0.05795523524284363,
0.0440538264811039,
-0.21313905715942383,
-0.26674288511276245,
-0.157379150390625,
-0.024038638919591904,
0.05937696248292923,
-0.03333120420575142,
-0.43876779079437256,
0.48735228180885315,
0.24706517159938812,
-0.09389729797840118,
0.18852810561656952,
-0.39368629455566406,
0.08108347654342651,
-0.12021174281835556,
-0.038486842066049576,
0.006523657590150833,
-0.031108569353818893,
0.19458647072315216,
-0.063106968998909,
-0.24434888362884521,
-0.014309555292129517,
0.15311984717845917,
-0.27962350845336914,
-0.20625430345535278,
-0.02075934410095215,
0.16248123347759247,
-0.38604429364204407,
-0.3432607352733612,
-0.28486064076423645,
0.1657891422510147,
-0.2923519015312195,
0.10605473816394806,
0.29323339462280273,
0.003653409657999873,
-0.10493845492601395,
0.01875499077141285,
-0.15807008743286133,
-0.07537534832954407,
0.5497907996177673,
-0.10193159431219101,
-0.1981896013021469,
0.046371132135391235,
0.19767820835113525,
-0.01721508800983429,
-0.057345952838659286,
0.18127796053886414,
-0.13929690420627594,
-0.46620050072669983,
0.09136337786912918,
-0.16413378715515137,
0.29198336601257324,
-0.3989706039428711,
0.14166373014450073,
0.14820167422294617,
-0.23027819395065308,
0.050387341529130936,
-0.3535584807395935,
-0.42796605825424194,
0.09894578158855438,
-0.26849403977394104,
0.11898370087146759,
0.1030549630522728,
-0.19295945763587952,
0.09597756713628769,
0.4334687292575836,
-0.2767994701862335,
0.10464688390493393,
0.1559356451034546,
-0.1819286346435547,
0.31249165534973145,
-0.028056815266609192,
0.16999685764312744,
-0.08661793172359467,
-0.024792779237031937,
0.2070089727640152,
-0.22838649153709412,
-0.1524648368358612,
-0.12431970238685608,
0.136831596493721,
0.05576423928141594,
0.1302586793899536,
-0.35356029868125916,
-0.2085290402173996,
-0.30687716603279114,
-0.007587688975036144,
0.29502007365226746,
0.15275299549102783,
0.01469365879893303,
0.20148637890815735,
0.20116335153579712,
0.21387365460395813,
-0.28490951657295227,
0.01563042216002941,
0.2449207305908203,
0.2978200614452362,
0.004675868432968855,
0.130027174949646,
-0.041636865586042404,
-0.03786030039191246,
-0.09774082899093628,
0.10196462273597717,
0.05399242416024208,
-0.045478515326976776,
0.5143769383430481,
-0.11550731956958771,
0.21994951367378235,
-0.2618081569671631,
0.4250944256782532,
0.23688757419586182,
-0.19168269634246826,
0.1818152368068695,
0.08363383263349533,
0.1436728835105896,
0.01600925624370575,
0.19649268686771393,
0.4720855951309204,
0.2535788118839264,
-0.09748232364654541,
0.08274195343255997,
0.1882510483264923,
0.0854453444480896,
-0.07527729868888855,
0.21709558367729187,
0.1451120376586914,
-0.27901899814605713,
-0.10572691261768341,
0.32505956292152405,
-0.09636449813842773,
0.2142827808856964,
0.4290485680103302,
0.4450584352016449,
0.4663046896457672,
0.39709872007369995,
-0.15644466876983643,
0.6594341993331909,
-0.6322688460350037,
0.03450874239206314,
0.21149614453315735,
-0.7041149735450745,
0.2115425169467926,
0.28624963760375977,
-0.17008846998214722,
0.08544513583183289,
-0.2526143193244934,
0.6917450428009033,
0.22537018358707428,
-0.054101619869470596,
-0.2914426028728485,
-0.16269107162952423,
-0.22593805193901062,
-0.24514584243297577,
0.1967921257019043,
-0.17985254526138306,
-0.17583176493644714,
0.08816765248775482,
0.01410820335149765,
-0.0373491570353508,
0.4880538284778595,
-0.08291484415531158,
0.01153518259525299,
-0.15238040685653687,
0.14031603932380676,
0.28602588176727295,
-0.12764552235603333,
-0.31315234303474426,
0.2596477270126343,
0.29061657190322876,
0.011705141514539719,
0.319742351770401,
0.07804302871227264,
0.4436260163784027,
0.14632640779018402,
0.14989642798900604,
-0.14666467905044556,
0.17483314871788025,
-0.07736299932003021,
-0.35789304971694946,
0.41448459029197693,
0.20893317461013794,
0.29753246903419495,
0.528572142124176,
0.147450789809227,
-0.16531938314437866,
-0.17661477625370026,
0.26680052280426025,
0.3060978651046753,
-0.4974580705165863,
0.3245326578617096,
-0.2542738914489746,
-0.20821428298950195,
-0.017703738063573837,
0.20682108402252197,
-0.4923507273197174,
-0.08637131005525589,
0.4555771052837372,
0.007712868973612785,
-0.0011082207784056664,
-0.35978856682777405,
0.034427884966135025,
0.11613550782203674,
0.4037932753562927,
0.32519254088401794,
-0.012408718466758728,
-0.2094130963087082,
-0.07606424391269684,
-0.46326467394828796,
0.17733828723430634,
0.1445973813533783,
0.2334454357624054,
0.057391099631786346,
0.21185876429080963,
-0.017755843698978424,
-0.031029991805553436,
-0.08952382206916809,
-0.2318761646747589,
0.09743888676166534,
0.10260426998138428,
0.13477620482444763,
-0.295425683259964,
-0.2807876467704773,
-0.24679487943649292,
-0.005245931446552277,
-0.18072888255119324,
0.32499104738235474,
-0.22354398667812347,
-0.043415140360593796,
-0.3444250226020813,
0.25016507506370544,
0.1986023336648941,
-0.09764368832111359,
0.3926134705543518,
0.15412458777427673,
0.37631356716156006,
-0.06282762438058853,
-0.13075755536556244,
-0.4427405595779419,
-0.02902008406817913,
0.011356848292052746,
0.17710497975349426,
-0.11867208778858185,
0.1977255493402481,
-0.2735372483730316,
-0.3280322551727295,
-0.29892492294311523,
0.24251283705234528,
-0.17171771824359894,
-0.27060991525650024,
0.010898128151893616,
-0.008840006776154041,
-0.17441874742507935,
-0.013631951995193958,
0.29219865798950195,
0.3445332646369934,
-0.171674907207489,
0.12509766221046448,
-0.059919536113739014,
-0.15441499650478363,
0.37381938099861145,
-0.3030199706554413,
-0.2362343966960907,
0.0426991805434227,
0.11229922622442245,
0.10148684680461884,
-0.3811706304550171,
-0.746852457523346,
0.09690728038549423,
0.22871403396129608,
0.059093523770570755,
0.15303902328014374,
0.4038102924823761,
-0.09560924768447876,
0.14941982924938202,
-0.05461626499891281,
0.3053143620491028,
0.09763513505458832,
-0.19616900384426117,
0.02305271103978157,
-0.141447514295578
] |
https://github.com/huggingface/datasets/issues/5985
|
Cannot reuse tokenizer object for dataset map
|
This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform)
|
### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 54
|
Cannot reuse tokenizer object for dataset map
### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform)
|
[
0.05622229352593422,
-0.2532830834388733,
0.16724401712417603,
0.24009670317173004,
0.31940537691116333,
-0.15103600919246674,
0.4339962601661682,
-0.10826817154884338,
-0.08094580471515656,
0.011936649680137634,
-0.17815017700195312,
0.34636056423187256,
-0.10086227208375931,
-0.057456254959106445,
0.07201871275901794,
0.061273589730262756,
0.028258636593818665,
0.1390923708677292,
-0.05358879268169403,
-0.02605556696653366,
0.058812856674194336,
0.07392365485429764,
-0.21467356383800507,
0.013768479228019714,
-0.5248543620109558,
0.18274208903312683,
-0.06622619181871414,
-0.2950444221496582,
-0.13928189873695374,
-0.5672500133514404,
0.2323039323091507,
0.24627870321273804,
0.13447590172290802,
0.46639353036880493,
-0.00012221411452628672,
0.15989559888839722,
0.021506022661924362,
0.1246105283498764,
0.11904871463775635,
-0.2334250658750534,
-0.057590924203395844,
-0.12612418830394745,
-0.09388355165719986,
-0.1858619749546051,
0.06012670695781708,
-0.12282267957925797,
-0.009289013221859932,
0.0492808073759079,
0.7078604698181152,
0.15059185028076172,
0.12822282314300537,
0.38679683208465576,
0.08516126871109009,
-0.006298799999058247,
-0.1389348804950714,
0.27934062480926514,
0.026571301743388176,
-0.26976075768470764,
-0.05313767492771149,
0.004599872976541519,
-0.29775169491767883,
0.19999706745147705,
0.03533526510000229,
-0.22018297016620636,
0.4552900791168213,
0.0015300773084163666,
-0.08364618569612503,
-0.025156214833259583,
0.2233051359653473,
0.12458135932683945,
0.29603442549705505,
-0.40190064907073975,
-0.34579017758369446,
-0.25806403160095215,
-0.30754855275154114,
0.06863909959793091,
0.13289180397987366,
-0.30182355642318726,
0.24588289856910706,
0.19567295908927917,
-0.5123326778411865,
-0.14219330251216888,
0.016852743923664093,
0.018181346356868744,
-0.06059765815734863,
0.19874274730682373,
-0.1807517260313034,
0.22322648763656616,
-0.021713335067033768,
-0.22361944615840912,
-0.15964612364768982,
-0.3305782973766327,
-0.09771077334880829,
0.2301385998725891,
-0.07985806465148926,
-0.1502719521522522,
0.11159077286720276,
-0.1548144817352295,
0.16877982020378113,
0.16108247637748718,
-0.04976629465818405,
0.3228411376476288,
-0.1708030104637146,
-0.05597314238548279,
0.30081304907798767,
0.43748822808265686,
0.20502638816833496,
0.44914311170578003,
0.0010928846895694733,
-0.004420846700668335,
-0.3609374761581421,
-0.25069117546081543,
-0.010258680209517479,
0.09034322947263718,
0.547346830368042,
-0.19746890664100647,
0.18087594211101532,
-0.1020311564207077,
0.200474351644516,
0.0915641263127327,
-0.42398741841316223,
0.0696696788072586,
0.2862999141216278,
0.24631813168525696,
-0.028760898858308792,
0.17433017492294312,
-0.09248113632202148,
0.03316734731197357,
-0.10141734778881073,
0.057920414954423904,
-0.28793713450431824,
-0.09104907512664795,
-0.3911210298538208,
0.09421665221452713,
-0.05863233283162117,
-0.03988487645983696,
0.2020006775856018,
0.33241140842437744,
0.12628768384456635,
-0.1964699625968933,
0.17626790702342987,
0.07213620841503143,
0.25593531131744385,
-0.13688091933727264,
-0.23518578708171844,
0.3754454553127289,
0.09869265556335449,
-0.007882773876190186,
-0.1825878620147705,
-0.043554745614528656,
-0.24974247813224792,
-0.2702154815196991,
0.16855642199516296,
0.09973116964101791,
-0.4623752236366272,
0.11324814707040787,
-0.01026599109172821,
-0.03264923766255379,
0.24100789427757263,
-0.005968902260065079,
0.09115439653396606,
-0.18133006989955902,
-0.4317283630371094,
-0.16962219774723053,
0.21394070982933044,
0.3006977438926697,
0.1360841989517212,
-0.4235871732234955,
-0.16128866374492645,
0.07817203551530838,
0.10175859928131104,
0.29524001479148865,
-0.3600955009460449,
0.29026368260383606,
-0.35464537143707275,
0.4715249538421631,
0.08550587296485901,
-0.44591930508613586,
-0.6842288374900818,
-0.034290604293346405,
0.0036479830741882324,
0.39429640769958496,
-0.07613689452409744,
-0.1666249781847,
0.21282058954238892,
-0.18729443848133087,
-0.1164293885231018,
-0.031227871775627136,
0.18537814915180206,
-0.02758065052330494,
-0.24209465086460114,
-0.17148324847221375,
0.0598578155040741,
-0.3322194516658783,
0.11884571611881256,
0.15599001944065094,
-0.07141939550638199,
0.31536969542503357,
0.00564827024936676,
-0.007727939635515213,
0.17472529411315918,
0.07754136621952057,
0.4062176048755646,
0.12810753285884857,
0.04617524892091751,
-0.17480602860450745,
-0.17164930701255798,
0.25580716133117676,
-0.015369260683655739,
0.0388135090470314,
-0.06841786205768585,
-0.35124701261520386,
-0.20868253707885742,
0.020476898178458214,
-0.20141719281673431,
-0.17622338235378265,
0.08250516653060913,
0.14015550911426544,
0.2951613962650299,
0.09327034652233124,
0.13448397815227509,
-0.11120819300413132,
0.3828689754009247,
0.23827874660491943,
-0.15632188320159912,
0.03373318910598755,
0.017847832292318344,
-0.021556224673986435,
-0.2284042239189148,
0.16883213818073273,
0.31506606936454773,
0.02625083178281784,
0.04099681228399277,
0.13420522212982178,
-0.05307772010564804,
0.15415161848068237,
-0.35875630378723145,
0.3672678470611572,
0.2828312814235687,
-0.178537055850029,
0.037581220269203186,
0.01044097263365984,
0.12544040381908417,
-0.2112399935722351,
0.12767720222473145,
0.47936761379241943,
0.22144511342048645,
-0.011168718338012695,
-0.09322936832904816,
0.07552431523799896,
0.030727604404091835,
-0.28288185596466064,
-0.23702140152454376,
-0.27814793586730957,
-0.22770459949970245,
0.22996792197227478,
0.24910764396190643,
0.2995856702327728,
0.1662389487028122,
0.1328791081905365,
0.470773309469223,
0.02497914806008339,
-0.07076377421617508,
0.09912761300802231,
-0.42376846075057983,
-0.13528317213058472,
0.014465447515249252,
-0.03976878151297569,
0.21266090869903564,
0.055391084402799606,
0.08485248684883118,
0.07313934713602066,
0.07457917928695679,
-0.01051131822168827,
0.10882677137851715,
0.035578399896621704,
-0.21465705335140228,
0.17667660117149353,
0.09422481060028076,
0.032202355563640594,
-0.16042616963386536,
0.07314732670783997,
0.06679083406925201,
0.13854166865348816,
-0.2068271040916443,
0.15710309147834778,
-0.4276392459869385,
0.1740264892578125,
-0.26496315002441406,
-0.3529859781265259,
-0.19875046610832214,
-0.24804523587226868,
-0.07796769589185715,
0.22821123898029327,
-0.08758586645126343,
0.36589550971984863,
0.01706525683403015,
0.1489488184452057,
-0.01580163463950157,
0.11477760225534439,
-0.26968759298324585,
-0.10928724706172943,
-0.3221454322338104,
-0.11767080426216125,
0.2489366978406906,
-0.1815098524093628,
0.10803330689668655,
0.08340036123991013,
0.039990462362766266,
-0.4346539378166199,
-0.4840888977050781,
0.22075864672660828,
0.012758834287524223,
0.21524973213672638,
0.17706352472305298,
-0.3097805976867676,
-0.2001679390668869,
-0.17663347721099854,
0.2569310665130615,
-0.35567688941955566,
-0.18397389352321625,
0.1156577467918396,
0.024238700047135353,
-0.06270886212587357,
0.07136473059654236,
0.06231827288866043,
-0.0032627470791339874,
0.045291367918252945,
0.3782379627227783,
-0.1144530177116394,
-0.08576570451259613,
0.3541877269744873,
-0.07665606588125229,
0.16030460596084595,
-0.4057091176509857,
-0.03251131623983383,
-0.28896281123161316,
-0.3546184003353119,
0.31846746802330017,
-0.02221355400979519,
-0.2270243912935257,
-0.16141796112060547,
-0.2173357754945755,
0.13116289675235748,
0.10948202759027481,
-0.28227493166923523,
-0.33255091309547424,
-0.3633034825325012,
0.1065756231546402,
-0.011097975075244904,
0.19066625833511353,
0.24744974076747894,
0.10910261422395706,
0.06256230175495148,
-0.04755137488245964,
-0.17429502308368683,
0.16962704062461853,
-0.19886144995689392,
0.09564271569252014,
0.04695013538002968,
0.20313316583633423,
0.3304530680179596,
0.7922287583351135,
0.18397489190101624,
-0.32070672512054443,
0.2638906240463257,
-0.1383906900882721,
0.17210063338279724,
-0.07724054902791977,
-0.5471529364585876,
-0.07629093527793884,
-0.12885397672653198,
-0.01256239227950573,
0.07813023030757904,
-0.031248077750205994,
0.32362642884254456,
0.27582576870918274,
-0.07249738276004791,
-0.12779995799064636,
-0.5932345390319824,
0.03125283122062683,
0.004899077117443085,
0.13313932716846466,
0.23718741536140442,
0.17863929271697998,
-0.4238682687282562,
-0.1433316171169281,
0.1838511824607849,
-0.09172762930393219,
0.1300567388534546,
0.08912989497184753,
-0.6237897276878357,
0.2041245698928833,
-0.41871583461761475,
0.2169477641582489,
0.002620153361931443,
0.4350831210613251,
0.11192475259304047,
-0.12403272092342377,
0.07488736510276794,
0.020691806450486183,
0.5727381110191345,
0.14070522785186768,
0.13375847041606903,
0.0659961998462677,
-0.6292661428451538,
-0.052579425275325775,
0.04229840263724327,
0.0132344551384449,
0.2657030522823334,
0.2877050042152405,
0.7374482154846191,
-0.3361368179321289,
-0.08449467271566391,
-0.2632151246070862,
0.06488741934299469,
-0.12748417258262634,
-0.032275088131427765,
-0.010098285973072052,
-0.13370221853256226,
-0.4028991460800171,
-0.039470456540584564,
0.11586613208055496,
0.22092759609222412,
0.3033561110496521,
0.10192686319351196,
-0.3169240951538086,
-0.3056217432022095,
0.15076513588428497,
0.17065228521823883,
0.35039007663726807,
-0.1982598751783371,
0.4152171015739441,
0.38041070103645325,
-0.20672908425331116,
0.12497229129076004,
0.278087854385376,
0.025052634999155998,
-0.663313627243042,
-0.20349228382110596,
0.32467398047447205,
0.10638418048620224,
0.2659146189689636,
-0.015943439677357674,
0.28473368287086487,
-0.049431800842285156,
0.014402255415916443,
-0.40832942724227905,
0.26538723707199097,
0.2041405737400055,
0.29831966757774353,
-0.4186215102672577,
-0.11691974103450775,
0.08562520146369934,
0.13086086511611938,
-0.08129250258207321,
0.2688288688659668,
0.32293832302093506,
-0.37521296739578247,
0.4034096598625183,
-0.0650617852807045,
1.1430519819259644,
-0.03956513851881027,
0.20891551673412323,
-0.0629640743136406,
0.21795706450939178,
0.4873279929161072,
0.03595765680074692,
-0.009410431608557701,
-0.46009504795074463,
-0.07352232187986374,
0.08539120107889175,
-0.08945640176534653,
0.17126306891441345,
0.1035272404551506,
-0.24535340070724487,
0.042237475514411926,
0.1649474948644638,
0.5919779539108276,
-0.0644630640745163,
0.3795720636844635,
-0.11080441623926163,
-0.09533120691776276,
0.22842131555080414,
0.09798987209796906,
0.22742855548858643,
0.3351524770259857,
0.026249732822179794,
-0.024908989667892456,
0.06045950576663017,
-0.4159287214279175,
-0.33899128437042236,
-0.1487717479467392,
-0.3173600435256958,
0.25592759251594543,
0.5608840584754944,
0.07153250277042389,
0.328276127576828,
0.1526905745267868,
0.294046014547348,
0.3312333822250366,
-0.23256811499595642,
0.22657719254493713,
-0.1614563763141632,
0.12686163187026978,
-0.10714323073625565,
-0.16442975401878357,
0.13832055032253265,
0.2616017162799835,
-0.17808029055595398,
0.07814959436655045,
0.1823640763759613,
-0.19917111098766327,
-0.41310831904411316,
-0.10311569273471832,
0.04364606365561485,
-0.5685128569602966,
0.02437213622033596,
-0.08613923192024231,
0.03242706134915352,
-0.20811760425567627,
0.08525633811950684,
-0.013871759176254272,
-0.24343237280845642,
0.13503721356391907,
-0.04827768728137016,
-0.10654041171073914,
0.08046828955411911,
0.5738258957862854,
-0.035332515835762024,
0.0015478543937206268,
0.41276878118515015,
-0.10676878690719604,
-0.09080015122890472,
-0.0635140985250473,
0.009418368339538574,
0.2948146164417267,
-0.3536636531352997,
0.12511762976646423,
-0.24944858253002167,
-0.021945521235466003,
-0.06578980386257172,
0.23526187241077423,
0.089972585439682,
-0.11850527673959732,
-0.060848169028759,
-0.17128542065620422,
-0.3334490656852722,
0.10103938728570938,
0.1293153464794159,
0.32536453008651733,
0.07450027763843536,
0.4399268627166748,
-0.46377599239349365,
0.3855644166469574,
-0.2583160996437073,
0.22373324632644653,
-0.03674161061644554,
0.14439848065376282,
-0.3073728680610657,
-0.55732661485672,
-0.01385839469730854,
-0.36520645022392273,
0.05963071435689926,
0.4152674078941345,
-0.15714898705482483,
-0.10524611175060272,
-0.37860703468322754,
0.14182953536510468,
0.34812024235725403,
-0.22256237268447876,
-0.1277083158493042,
0.2175455391407013,
0.29014939069747925,
-0.34001901745796204,
0.24304431676864624,
0.5508390069007874,
0.01327754557132721,
0.14480388164520264,
0.35258516669273376,
-0.028083927929401398,
0.03431021422147751,
-0.10086357593536377,
0.127301886677742,
0.11102768778800964,
0.3291769325733185,
0.27998724579811096,
-0.15427525341510773,
0.04126325249671936,
0.009498071856796741,
0.31807589530944824,
0.5038917660713196,
-0.08760500699281693,
0.18607652187347412,
0.08907761424779892,
-0.18877924978733063,
0.27184441685676575,
0.0915132388472557,
0.3492732346057892,
-0.2324870079755783,
-0.2666475772857666,
0.4175216555595398,
0.1361144781112671,
-0.08075059950351715,
-0.2252003252506256,
0.26969143748283386,
-0.13922715187072754,
0.006587307900190353,
0.19077569246292114,
-0.03807509317994118,
0.01790996640920639,
0.07002449035644531,
-0.024568162858486176,
0.6027130484580994,
-0.06985251605510712,
0.2687781751155853,
0.10662993043661118,
-0.20943905413150787,
0.05205385014414787,
0.5045721530914307,
0.253447949886322,
0.3417781889438629,
0.16454914212226868,
-0.23630595207214355,
0.2886880040168762,
-0.40695133805274963,
0.29469820857048035,
0.2555970549583435,
-0.3403068482875824,
-0.15000367164611816,
0.18088361620903015,
-0.03072667121887207,
0.2083202600479126,
-0.25481438636779785,
0.33651548624038696,
0.15995456278324127,
-0.12811914086341858,
-0.13717949390411377,
0.5331588387489319,
-0.34751471877098083,
-0.3987865746021271,
0.02950282394886017,
-0.20215767621994019,
-0.17307648062705994,
0.12038008868694305,
-0.03136724606156349,
-0.15303917229175568,
0.156807541847229,
-0.06609946489334106,
-0.2988031506538391,
-0.26005294919013977,
-0.24986597895622253,
-0.04643740504980087,
0.2479724884033203,
-0.22160781919956207,
0.16584762930870056,
-0.1506212204694748,
-0.055794358253479004,
0.05275530740618706,
0.27224332094192505,
0.33146291971206665,
0.10165911167860031,
0.1206374317407608,
0.24649320542812347,
-0.29363882541656494,
0.10332182049751282,
-0.18387602269649506,
0.3989430069923401,
-0.14444901049137115,
-0.040197860449552536,
-0.1651783138513565,
0.011948792263865471,
-0.14943750202655792,
-0.4360010623931885,
-0.1490257978439331,
0.1098966896533966,
-0.2837655246257782,
0.5075972080230713,
-0.06225807964801788,
-0.03727129474282265,
0.13446299731731415,
0.1797124296426773,
-0.21319550275802612,
-0.16676388680934906,
0.532921314239502,
0.09376820921897888,
0.25192752480506897,
-0.3705345094203949,
0.051091864705085754,
0.05692186579108238,
0.12721049785614014,
0.2446286529302597,
-0.36792972683906555,
-0.2813504636287689,
0.11000452935695648,
-0.5641725659370422,
0.25488540530204773,
-0.007548976689577103,
0.10557825863361359,
0.010202462784945965,
-0.10575535148382187,
-0.08971991389989853,
0.04244617745280266,
-0.038978591561317444,
0.18493814766407013,
-0.11717682331800461,
-0.06493653357028961,
0.0031636953353881836,
0.15519851446151733,
-0.14771971106529236,
-0.15830835700035095,
0.19171838462352753,
-0.21231544017791748,
0.37194424867630005,
0.10355954617261887,
0.03554333746433258,
-0.18642739951610565,
0.03297366201877594,
-0.17363351583480835,
-0.24225172400474548,
0.4609389901161194,
0.34413495659828186,
0.08669804036617279,
-0.017894718796014786,
0.1343521624803543,
-0.2900216281414032,
-0.05997743085026741,
-0.16890297830104828,
-0.0545261949300766,
-0.12047980725765228,
0.06138186901807785,
-0.23291979730129242,
0.02173500694334507,
-0.40294349193573,
-0.27791884541511536,
0.16907794773578644,
-0.3825908601284027,
-0.2789786159992218,
0.24731826782226562,
-0.33830928802490234,
0.18444986641407013,
-0.07841930538415909,
0.6553308367729187,
0.007547393441200256,
0.4297493100166321,
-0.23048654198646545,
-0.3368867337703705,
0.6993774175643921,
-0.7566096782684326,
-0.3246828317642212,
-0.021661441773176193,
-0.034899502992630005,
0.09452672302722931,
-0.4970177114009857,
-0.6477317810058594,
-0.08974616974592209,
0.27565374970436096,
-0.06104116141796112,
-0.19154475629329681,
-0.057169247418642044,
0.06338809430599213,
0.006393786519765854,
-0.12586139142513275,
0.6619149446487427,
0.257682204246521,
-0.08427664637565613,
0.4240940511226654,
-0.006645513698458672
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files.
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 86
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files.
|
[
-0.4180947244167328,
-0.1018841415643692,
-0.1456301063299179,
0.07439683377742767,
-0.30387377738952637,
-0.18333646655082703,
0.6748948693275452,
0.18633094429969788,
-0.15313720703125,
0.19728821516036987,
0.0617266446352005,
0.15588414669036865,
-0.30952316522598267,
-0.26801830530166626,
-0.10588076710700989,
-0.3101293742656708,
-0.05462821573019028,
-0.016843922436237335,
0.019290726631879807,
0.05132941156625748,
-0.09513554722070694,
0.15321746468544006,
-0.10278062522411346,
-0.24563713371753693,
-0.40005072951316833,
0.00923064537346363,
0.0071952324360609055,
0.16237786412239075,
0.14685474336147308,
-0.2603272795677185,
0.11384257674217224,
0.4136267602443695,
0.4048687517642975,
0.3920954167842865,
-0.00012678703933488578,
-0.09417687356472015,
0.2051483690738678,
0.03563635051250458,
-0.1409219205379486,
0.20213578641414642,
0.027537107467651367,
-0.2864728569984436,
0.12099823355674744,
-0.3306116461753845,
0.04740999639034271,
-0.2221064567565918,
0.1936522275209427,
-0.370129257440567,
0.3337956666946411,
-0.05678499862551689,
-0.03919336572289467,
0.13735908269882202,
-0.19031132757663727,
0.24026216566562653,
0.291593998670578,
0.01899387314915657,
-0.12642675638198853,
0.15527363121509552,
0.4718416929244995,
0.029717033728957176,
-0.5759141445159912,
0.3164943754673004,
-0.039607055485248566,
0.2824570834636688,
0.2542000114917755,
-0.07730980217456818,
-0.6629830598831177,
-0.4130008816719055,
-0.24250027537345886,
0.19750002026557922,
-0.08601584285497665,
-0.20833292603492737,
-0.23797787725925446,
-0.6421168446540833,
-0.14768719673156738,
-0.19573251903057098,
-0.004915751516819,
0.1036602258682251,
-0.18617083132266998,
-0.10543759167194366,
0.14726482331752777,
0.06430084258317947,
-0.2669353485107422,
0.18628515303134918,
0.3247652053833008,
0.17177429795265198,
-0.06975824385881424,
0.17292320728302002,
0.4674032926559448,
0.09684070199728012,
0.33905142545700073,
0.12992414832115173,
0.1748618483543396,
0.18334853649139404,
-0.27841731905937195,
-0.08155660331249237,
-0.09577178210020065,
-0.15199965238571167,
0.11442183703184128,
0.3988381624221802,
0.24822939932346344,
0.1453513354063034,
0.13246144354343414,
0.15227851271629333,
0.12195155024528503,
-0.3173047602176666,
0.030185654759407043,
-0.08471358567476273,
0.09740407019853592,
-0.015833169221878052,
-0.007142048329114914,
0.009128279983997345,
-0.04613923653960228,
-0.6856759786605835,
0.15644975006580353,
0.2271755039691925,
-0.026565803214907646,
0.14803169667720795,
0.027139602228999138,
-0.1815711259841919,
0.1309165060520172,
-0.32722681760787964,
0.09127553552389145,
0.08968999236822128,
0.17044614255428314,
0.002196064218878746,
-0.2580294609069824,
0.31144893169403076,
-0.2166643887758255,
-0.44384726881980896,
0.10042271763086319,
-0.15460993349552155,
-0.07115361094474792,
0.2710866928100586,
0.26790347695350647,
0.0358055904507637,
-0.03129223734140396,
-0.0746038556098938,
0.3320021629333496,
0.09251296520233154,
0.14862282574176788,
-0.2542508542537689,
0.1252976804971695,
0.019068848341703415,
-0.08453059196472168,
-0.14669908583164215,
0.021981626749038696,
0.28674352169036865,
-0.18513932824134827,
0.13181152939796448,
-0.08925611525774002,
-0.41281506419181824,
-0.010886291041970253,
-0.09289736300706863,
0.014153048396110535,
0.052330635488033295,
-0.415007621049881,
0.051712971180677414,
0.4773285984992981,
-0.22400236129760742,
0.17268455028533936,
-0.21024662256240845,
-0.1467961221933365,
-0.16126853227615356,
-0.008558697067201138,
0.536205530166626,
0.07554498314857483,
-0.01556359976530075,
-0.08236369490623474,
0.016663355752825737,
0.2855395972728729,
0.32015690207481384,
-0.17813122272491455,
-0.07293935865163803,
-0.10637382417917252,
0.51289302110672,
0.32321450114250183,
0.05212197080254555,
-0.43191957473754883,
0.5253541469573975,
-0.03772458806633949,
-0.011806456372141838,
0.6261826753616333,
0.23128706216812134,
0.4878212809562683,
-0.10098309069871902,
0.10943521559238434,
0.1943434625864029,
-0.045003004372119904,
-0.07100186496973038,
-0.3494341969490051,
-0.10040440410375595,
-0.1300826519727707,
0.3271670639514923,
0.26308298110961914,
-0.013416752219200134,
0.22699955105781555,
-0.5249655246734619,
0.5289517641067505,
-0.034994665533304214,
0.20477575063705444,
-0.1135919988155365,
-0.06387266516685486,
0.0025446712970733643,
0.3096318542957306,
-0.2596912086009979,
-0.3243789076805115,
0.14791718125343323,
-0.07426264882087708,
-0.18953047692775726,
-0.2628951668739319,
-0.15518417954444885,
0.2620711326599121,
-0.14430953562259674,
-0.2819811999797821,
0.15124918520450592,
-0.19804750382900238,
-0.09895844757556915,
0.06138895824551582,
-0.35280221700668335,
-0.3674214482307434,
0.02439485490322113,
-0.6146159768104553,
0.01810622029006481,
-0.37525320053100586,
0.2338012009859085,
0.3059064745903015,
-0.23060858249664307,
-0.06198514252901077,
0.08062373101711273,
-0.1196998730301857,
-0.30028852820396423,
0.04606873542070389,
0.1781686544418335,
0.11900579929351807,
0.1984550952911377,
0.04464874416589737,
0.4549584984779358,
0.17814190685749054,
0.01772741600871086,
0.11541668325662613,
0.0965266227722168,
-0.12812025845050812,
-0.10649939626455307,
-0.007596373558044434,
0.5443098545074463,
-0.4402858316898346,
0.3806759715080261,
-0.10226675868034363,
-0.08165930956602097,
0.2411765158176422,
0.09633433818817139,
-0.30252236127853394,
0.13811832666397095,
0.07314703613519669,
-0.11191345751285553,
0.19135110080242157,
-0.011456398293375969,
-0.281399130821228,
0.33094698190689087,
0.03090718388557434,
-0.05830540880560875,
-0.08084524422883987,
0.02116764523088932,
-0.010210998356342316,
0.07542748004198074,
0.37968721985816956,
0.49922963976860046,
0.30809667706489563,
0.14157593250274658,
0.04303266108036041,
-0.2878757119178772,
0.19324803352355957,
-0.1791275292634964,
-0.02686431258916855,
0.15056762099266052,
0.17915691435337067,
0.23812806606292725,
-0.18868407607078552,
0.022392742335796356,
-0.26582974195480347,
-0.643071174621582,
-0.11291714757680893,
0.0749972015619278,
-0.1472298502922058,
0.12261868268251419,
0.09565657377243042,
0.10513212531805038,
-0.2716955542564392,
0.00032028742134571075,
-0.04803677275776863,
-0.13586683571338654,
-0.021281380206346512,
0.5858290195465088,
-0.09629307687282562,
0.06520099937915802,
-0.07220000773668289,
0.4321025013923645,
0.02609025128185749,
-0.15031684935092926,
-0.24176561832427979,
0.06341635435819626,
0.19763171672821045,
-0.09680916368961334,
0.40453270077705383,
-0.05558140575885773,
0.1873970776796341,
0.06229265779256821,
-0.013366185128688812,
-0.3160095810890198,
0.2757650911808014,
-0.04470617324113846,
-0.037441812455654144,
-0.12399423122406006,
-0.0516846626996994,
-0.0545891672372818,
-0.009081171825528145,
-0.3572982847690582,
-0.025838399305939674,
-0.04932936280965805,
0.14956001937389374,
0.1480647474527359,
-0.0001590967585798353,
-0.019493283703923225,
0.17387814819812775,
-0.07135846465826035,
-0.407497763633728,
-0.2945410907268524,
0.32470178604125977,
0.28143996000289917,
0.3620145320892334,
-0.16782541573047638,
0.28286296129226685,
-0.09234243631362915,
0.14829178154468536,
-0.17300571501255035,
0.1321519911289215,
-0.5065522193908691,
0.42614713311195374,
-0.15880398452281952,
-0.17407213151454926,
-0.2525789141654968,
-0.09268304705619812,
-0.019273895770311356,
0.5241152048110962,
-0.17007431387901306,
0.07559245079755783,
-0.15804195404052734,
0.37024492025375366,
0.000054527074098587036,
-0.02369430847465992,
0.4781043231487274,
0.28258031606674194,
0.13409346342086792,
0.11514405161142349,
0.47305095195770264,
0.1335279792547226,
-0.31865012645721436,
-0.12095344811677933,
0.34560754895210266,
0.2827133536338806,
0.2544253468513489,
1.4203401803970337,
0.18028859794139862,
-0.08646835386753082,
0.2554663121700287,
-0.10612183064222336,
-0.33063313364982605,
0.011544138193130493,
-0.4002484977245331,
0.17255322635173798,
-0.2922123968601227,
0.008713394403457642,
0.147981196641922,
-0.12833496928215027,
-0.1596684604883194,
0.08198295533657074,
-0.17647789418697357,
-0.09006243944168091,
-0.43860924243927,
0.5040239691734314,
-0.2641056180000305,
0.28565019369125366,
-0.28358063101768494,
0.030750751495361328,
-0.13038378953933716,
-0.189883291721344,
-0.10035838186740875,
0.26668664813041687,
0.5507082939147949,
-0.11299634724855423,
-0.005791626870632172,
0.32428598403930664,
-0.4359806180000305,
0.24864274263381958,
0.10025304555892944,
0.2011151760816574,
0.30785036087036133,
-0.3809232711791992,
0.23601406812667847,
-0.013882901519536972,
0.3908289670944214,
0.2086486965417862,
-0.11239925026893616,
-0.10810159146785736,
-0.15302050113677979,
-0.09266319125890732,
0.003977898508310318,
-0.023574894294142723,
0.44678235054016113,
0.0657641813158989,
0.2033671736717224,
-0.23042085766792297,
-0.1887730360031128,
0.14982925355434418,
-0.10299612581729889,
-0.1555415540933609,
-0.21797293424606323,
-0.22501255571842194,
0.2279612123966217,
-0.378679096698761,
0.3121843636035919,
0.16476206481456757,
0.03854738920927048,
-0.20384584367275238,
-0.07872581481933594,
-0.25133758783340454,
-0.3699685037136078,
0.24165253341197968,
0.09786790609359741,
0.008467455394566059,
-0.2092573046684265,
0.11707983911037445,
0.18632197380065918,
-0.022548295557498932,
0.2571445405483246,
0.15665890276432037,
-0.07047003507614136,
-0.23645594716072083,
0.11281140893697739,
-0.026102732867002487,
0.3481347858905792,
0.31731903553009033,
-0.12548089027404785,
0.10002920776605606,
0.178186297416687,
0.346848726272583,
-0.26805272698402405,
-0.0485144779086113,
0.05165213346481323,
-0.0058970339596271515,
-0.18428966403007507,
-0.4176017642021179,
0.5490476489067078,
-0.12057486176490784,
-0.007349833846092224,
0.5192599296569824,
0.07306136190891266,
-0.057519420981407166,
0.411507248878479,
0.1549799144268036,
1.135405421257019,
-0.18021459877490997,
0.11738592386245728,
0.0006765332072973251,
0.45630204677581787,
-0.009175051935017109,
-0.4414355754852295,
0.2653678357601166,
-0.19897028803825378,
-0.1709533929824829,
-0.08222834765911102,
-0.020618561655282974,
0.15322181582450867,
0.39328551292419434,
0.1261821836233139,
0.037423815578222275,
0.06616058945655823,
-0.27087101340293884,
-0.23233254253864288,
0.301712304353714,
-0.4442083537578583,
-0.3189602792263031,
0.1893545687198639,
-0.13040989637374878,
0.06318086385726929,
0.16208867728710175,
0.0361185260117054,
-0.06431489437818527,
0.16064734756946564,
0.08003899455070496,
-0.13364852964878082,
-0.1124008372426033,
-0.043721623718738556,
0.31411510705947876,
0.04012223333120346,
-0.61238032579422,
0.04267577454447746,
0.17719747126102448,
-0.18344353139400482,
-0.4985257685184479,
0.08730458468198776,
-0.09596095979213715,
0.14271721243858337,
-0.20202812552452087,
-0.11955957114696503,
-0.13840381801128387,
0.25881490111351013,
-0.06927598267793655,
-0.15155860781669617,
-0.16083276271820068,
0.288297176361084,
-0.8112604022026062,
-0.1590692549943924,
0.33668607473373413,
0.2067299485206604,
-0.33932262659072876,
-0.07356671988964081,
0.22030121088027954,
-0.43681350350379944,
-0.13574136793613434,
-0.05066928640007973,
0.33414334058761597,
-0.1723787486553192,
0.2941126823425293,
-0.19469185173511505,
-0.07671421021223068,
-0.036708567291498184,
0.22005993127822876,
0.0466882660984993,
0.07638736814260483,
0.2948061227798462,
0.13083313405513763,
-0.23573659360408783,
-0.1392722725868225,
0.02581946551799774,
0.3689575791358948,
-0.597525954246521,
0.06249389424920082,
-0.1870546042919159,
0.17345328629016876,
-0.14337283372879028,
-0.17064860463142395,
0.20719380676746368,
0.12927637994289398,
-0.15514789521694183,
-0.370108962059021,
-0.25690802931785583,
0.19500672817230225,
-0.08537803590297699,
0.26496422290802,
-0.16140219569206238,
-0.16734817624092102,
-0.03681149333715439,
0.3051892817020416,
-0.13373729586601257,
0.1980239599943161,
0.21180759370326996,
0.01138296164572239,
0.2544105052947998,
-0.03589818626642227,
0.015427036210894585,
0.10267794132232666,
-0.11114121973514557,
0.1975964456796646,
-0.0073391590267419815,
-0.031695786863565445,
-0.10634517669677734,
0.20259656012058258,
-0.046203821897506714,
-0.09407321363687515,
-0.1863212287425995,
-0.1306924819946289,
-0.22517019510269165,
-0.2693021297454834,
0.05102739855647087,
-0.07577334344387054,
-0.10088564455509186,
0.05074213817715645,
0.7681761980056763,
-0.02810227870941162,
-0.278597891330719,
0.14752918481826782,
-0.0540541410446167,
0.09597595036029816,
-0.06037269905209541,
0.3817686140537262,
0.23755428194999695,
0.021345801651477814,
0.14403347671031952,
0.23867875337600708,
0.7026708126068115,
0.04333346709609032,
0.29035061597824097,
-0.10066898167133331,
0.012138962745666504,
-0.3175351321697235,
0.43146708607673645,
0.4617258310317993,
0.1056714579463005,
-0.22782407701015472,
0.13914754986763,
0.08676809817552567,
-0.10947670787572861,
-0.09926826506853104,
0.07060487568378448,
0.20910903811454773,
0.10003255307674408,
0.39078837633132935,
0.006811231374740601,
0.008540906012058258,
0.09923920035362244,
0.1267915964126587,
0.05647972226142883,
-0.525248110294342,
-0.005279093980789185,
-0.06816484034061432,
0.155044823884964,
-0.15751592814922333,
0.41130661964416504,
-0.138263538479805,
0.20103269815444946,
0.2544857859611511,
-0.2877104878425598,
0.7972636818885803,
0.2614799737930298,
0.004137933254241943,
0.003972440958023071,
-0.4873836636543274,
-0.3025180995464325,
-0.014445394277572632,
0.07338724285364151,
0.21001526713371277,
0.17768877744674683,
0.6834639310836792,
0.008848803117871284,
0.11485893279314041,
0.0511033833026886,
0.11490918695926666,
0.09908651560544968,
-0.21152199804782867,
-0.01709001138806343,
-0.33241385221481323,
-0.23017707467079163,
0.008245669305324554,
-0.0457184724509716,
0.005859795957803726,
0.4753943085670471,
0.2556082606315613,
0.10842829942703247,
-0.10383176058530807,
0.32804515957832336,
0.014132948592305183,
0.432073175907135,
-0.3184627294540405,
-0.12014289945363998,
0.12141918390989304,
0.11182208359241486,
0.023310687392950058,
0.04611682519316673,
0.20585060119628906,
0.21853625774383545,
-0.14213572442531586,
0.164398655295372,
-0.2187490016222,
0.02601347304880619,
-0.20701104402542114,
0.2275039106607437,
-0.15629209578037262,
0.10624179244041443,
0.26699933409690857,
-0.03751812130212784,
-0.05715368315577507,
0.001419268548488617,
0.1356966644525528,
-0.27925586700439453,
-0.2165490984916687,
0.3003496825695038,
-0.07730631530284882,
-0.522188663482666,
0.025118520483374596,
-0.12241900712251663,
-0.20978593826293945,
-0.17104552686214447,
0.3284614384174347,
-0.524677038192749,
-0.005183589644730091,
-0.11463530361652374,
-0.029512900859117508,
-0.13526199758052826,
0.410800576210022,
0.047786787152290344,
0.3818295896053314,
-0.23137018084526062,
-0.08325404673814774,
-0.18980728089809418,
-0.025748424232006073,
-0.19484072923660278,
0.13356417417526245,
0.027249615639448166,
0.5043753981590271,
-0.08123401552438736,
0.25250789523124695,
0.05035477876663208,
-0.27456241846084595,
-0.05902634933590889,
0.7533268928527832,
-0.2597292363643646,
0.2816290259361267,
-0.08350439369678497,
0.1325068473815918,
0.025096334517002106,
-0.44308024644851685,
0.21192613244056702,
-0.03798928111791611,
-0.154050812125206,
0.09651818871498108,
-0.24590735137462616,
0.4382439851760864,
-0.11848264932632446,
0.36125656962394714,
-0.008631199598312378,
0.0968572199344635,
0.0445624440908432,
0.1287367194890976,
-0.3874354064464569,
0.08657849580049515,
-0.20898468792438507,
0.17901788651943207,
0.31183353066444397,
0.27496427297592163,
-0.06374648213386536,
-0.17170444130897522,
-0.4018184244632721,
0.3659837245941162,
-0.15421178936958313,
0.1336192488670349,
-0.12684236466884613,
0.04061989486217499,
-0.21828150749206543,
0.39652130007743835,
-0.1791984587907791,
0.3160753548145294,
0.010678078979253769,
0.0966034084558487,
-0.28533604741096497,
-0.08938375115394592,
0.1398564577102661,
-0.47907349467277527,
-0.14951790869235992,
-0.20757223665714264,
0.22241462767124176,
0.374659925699234,
0.2588217556476593,
-0.3587636351585388,
-0.35474276542663574,
0.17456547915935516,
-0.15916764736175537,
0.19571857154369354,
0.17876571416854858,
0.45005884766578674,
-0.30681705474853516,
-0.08847668766975403,
0.061696842312812805,
0.030206691473722458,
-0.027284881100058556,
-0.1628321260213852,
-0.6532188653945923
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 34
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset
|
[
-0.4086936414241791,
-0.19826120138168335,
-0.14433157444000244,
0.12288492918014526,
-0.23263712227344513,
-0.1017850711941719,
0.595722496509552,
0.1270076483488083,
-0.023237178102135658,
0.24934926629066467,
0.1239146962761879,
0.30391815304756165,
-0.30772507190704346,
-0.1494923084974289,
-0.13273295760154724,
-0.20209035277366638,
-0.14679166674613953,
-0.010909736156463623,
0.06673271954059601,
0.056052982807159424,
-0.10264439880847931,
0.17645159363746643,
-0.056947723031044006,
-0.30264437198638916,
-0.3027735650539398,
0.05792291462421417,
0.03004944883286953,
0.04633629694581032,
0.2683170735836029,
-0.2059001624584198,
0.14427843689918518,
0.39603424072265625,
0.4547600746154785,
0.40370774269104004,
-0.0001230001071235165,
-0.12355697154998779,
0.09716104716062546,
0.10268118977546692,
-0.11947059631347656,
0.1109016165137291,
0.1177610382437706,
-0.3443603813648224,
0.17295366525650024,
-0.31085872650146484,
0.1477845013141632,
-0.13689038157463074,
0.21283741295337677,
-0.25962013006210327,
0.27884677052497864,
-0.21806679666042328,
0.01416725292801857,
0.2748747169971466,
-0.22009602189064026,
0.237082377076149,
0.009189285337924957,
0.03883042186498642,
-0.1188373938202858,
0.03221987187862396,
0.4259794354438782,
-0.05144256353378296,
-0.5139764547348022,
0.31511473655700684,
0.008911853656172752,
0.3032161295413971,
0.17035353183746338,
-0.1188214048743248,
-0.5731501579284668,
-0.5339154005050659,
-0.14577823877334595,
0.23070299625396729,
-0.08652786165475845,
-0.2585240304470062,
-0.18228982388973236,
-0.7031622529029846,
-0.1721198558807373,
-0.17031215131282806,
0.03916047513484955,
0.036181990057229996,
-0.1912785768508911,
-0.18470193445682526,
0.04492742568254471,
0.08190935105085373,
-0.17051903903484344,
0.1745004802942276,
0.33906012773513794,
0.3428330421447754,
-0.09273745864629745,
0.17503881454467773,
0.5841150879859924,
0.036972805857658386,
0.17129138112068176,
0.15372413396835327,
0.3227381408214569,
0.24785007536411285,
-0.4995885491371155,
-0.10037897527217865,
-0.10012634843587875,
-0.20221692323684692,
0.22495073080062866,
0.2513103485107422,
0.10381466895341873,
0.1604749858379364,
0.12677694857120514,
0.15822012722492218,
0.29259443283081055,
-0.2555956244468689,
0.0025414153933525085,
-0.05440869927406311,
0.04890267923474312,
-0.09604901075363159,
0.006796833127737045,
0.0017008967697620392,
-0.05308273434638977,
-0.7183887362480164,
0.403033047914505,
0.15870970487594604,
0.07131116092205048,
0.05976186320185661,
-0.06071577966213226,
-0.17790789902210236,
0.061606571078300476,
-0.2754933536052704,
0.17247048020362854,
0.1274631917476654,
0.06720338016748428,
0.07528896629810333,
-0.32458317279815674,
0.2546454966068268,
-0.33821791410446167,
-0.3379690945148468,
0.09219539165496826,
-0.08416752517223358,
-0.04183446988463402,
0.3369743227958679,
0.3799612820148468,
-0.012465618550777435,
0.01845311000943184,
0.005913755856454372,
0.3810623288154602,
-0.1027284562587738,
0.31445956230163574,
-0.30372798442840576,
0.060480743646621704,
0.09725958108901978,
0.008743997663259506,
0.037680014967918396,
-0.00949835404753685,
0.3379594683647156,
-0.1953093409538269,
0.19891786575317383,
-0.1538308560848236,
-0.4458587169647217,
0.03807753324508667,
0.0029878122732043266,
-0.13818317651748657,
-0.024909168481826782,
-0.40386632084846497,
0.06918412446975708,
0.6432811617851257,
-0.08179455995559692,
0.16563880443572998,
-0.1892995834350586,
-0.2485029101371765,
-0.05374973267316818,
0.05842909216880798,
0.5386546850204468,
0.2359658181667328,
-0.1149069294333458,
-0.19414405524730682,
-0.13018245995044708,
0.28650572896003723,
0.2722713053226471,
-0.12708865106105804,
0.07651743292808533,
-0.0759962797164917,
0.5040619373321533,
0.24539226293563843,
0.012018769979476929,
-0.39895814657211304,
0.5190487504005432,
-0.0786781832575798,
0.16282609105110168,
0.41849735379219055,
0.31373855471611023,
0.34058067202568054,
-0.10222132503986359,
-0.010285623371601105,
0.18625137209892273,
-0.06496893614530563,
-0.00823109969496727,
-0.3011709153652191,
-0.07369019836187363,
0.07017672061920166,
0.4836048483848572,
0.4128466844558716,
-0.05711745470762253,
0.03170313686132431,
-0.38903525471687317,
0.4961414039134979,
-0.010072123259305954,
0.23738904297351837,
0.019673414528369904,
-0.06425835192203522,
0.0021088197827339172,
0.36646008491516113,
-0.3767611086368561,
-0.3281400501728058,
0.2860744595527649,
-0.0249099750071764,
-0.18056222796440125,
-0.28064876794815063,
-0.04345683008432388,
0.3421335220336914,
-0.15447472035884857,
-0.4012574553489685,
0.02551468461751938,
-0.112314373254776,
-0.02022320032119751,
-0.07250487804412842,
-0.4303390681743622,
-0.3463825583457947,
0.13034382462501526,
-0.5291906595230103,
-0.02553749457001686,
-0.3930317163467407,
0.1752786487340927,
0.28938066959381104,
-0.17056061327457428,
-0.15148985385894775,
0.09397484362125397,
-0.041428036987781525,
-0.3203844428062439,
0.05362267047166824,
0.13408806920051575,
0.1688099205493927,
0.22748197615146637,
-0.09472974389791489,
0.4486501216888428,
0.1604613959789276,
0.029164504259824753,
-0.07862865924835205,
0.07486547529697418,
-0.1794033944606781,
-0.16395297646522522,
0.09048613160848618,
0.32908138632774353,
-0.4517218768596649,
0.3827444016933441,
-0.13539943099021912,
-0.0756097137928009,
0.2574620544910431,
-0.004844211041927338,
-0.2203950732946396,
0.05722083896398544,
0.16124284267425537,
-0.12803113460540771,
0.19965796172618866,
0.01173374243080616,
-0.26759573817253113,
0.25604742765426636,
-0.02826375886797905,
-0.0013556629419326782,
-0.031276196241378784,
0.030747519806027412,
0.01834680885076523,
0.08733120560646057,
0.3071904182434082,
0.2970369756221771,
0.27703428268432617,
0.05694206431508064,
0.041074443608522415,
-0.2117764949798584,
0.19544340670108795,
-0.08497484028339386,
-0.11779185384511948,
0.201117143034935,
0.3063303232192993,
0.2871437966823578,
-0.195454940199852,
0.10691427439451218,
-0.2826947569847107,
-0.516225278377533,
0.012664759531617165,
0.0935044214129448,
-0.14022395014762878,
0.11377238482236862,
0.04496286064386368,
0.20800882577896118,
-0.18829014897346497,
0.03882399573922157,
-0.11555114388465881,
-0.0952717512845993,
-0.04197674244642258,
0.6098243594169617,
-0.08718245476484299,
0.1464223861694336,
0.07989086210727692,
0.28624022006988525,
-0.00015751458704471588,
-0.2456226795911789,
-0.14384469389915466,
-0.07917487621307373,
0.26284167170524597,
-0.06375053524971008,
0.2312593162059784,
-0.2643575668334961,
0.22038784623146057,
0.011577146127820015,
-0.05502256751060486,
-0.4045511484146118,
0.15853402018547058,
-0.012220591306686401,
-0.016908563673496246,
-0.20483238995075226,
-0.047201886773109436,
-0.06058169901371002,
0.08836187422275543,
-0.2922273874282837,
-0.0259811133146286,
-0.09274807572364807,
0.10378514975309372,
0.15793801844120026,
0.06092851608991623,
-0.08060970157384872,
0.14079611003398895,
0.004206888377666473,
-0.4144012928009033,
-0.25107017159461975,
0.2651541233062744,
0.23673366010189056,
0.3862308859825134,
-0.1485217660665512,
0.14861446619033813,
-0.14619459211826324,
0.19290649890899658,
-0.14367640018463135,
0.056353610008955,
-0.5015797019004822,
0.37807413935661316,
-0.20631884038448334,
-0.14750206470489502,
-0.20785127580165863,
-0.004011472687125206,
0.12493827939033508,
0.4182584285736084,
-0.1992720514535904,
0.05993257835507393,
-0.23654235899448395,
0.34902921319007874,
-0.14128164947032928,
-0.03211540728807449,
0.4645606577396393,
0.3326224386692047,
0.1503077894449234,
0.10122910887002945,
0.27577728033065796,
0.16810005903244019,
-0.26492244005203247,
-0.09083964675664902,
0.14497743546962738,
0.2372533679008484,
0.33031344413757324,
1.183714747428894,
0.12554824352264404,
-0.14755523204803467,
0.29316550493240356,
-0.09601546823978424,
-0.3991023302078247,
0.13648898899555206,
-0.5351923108100891,
0.19840115308761597,
-0.3538713753223419,
0.015576798468828201,
0.14856261014938354,
-0.17692634463310242,
-0.19410833716392517,
0.10053417086601257,
-0.3863670229911804,
-0.10019803047180176,
-0.3250277638435364,
0.3609694540500641,
-0.23472148180007935,
0.31531545519828796,
-0.21998094022274017,
0.010545194149017334,
-0.2633403539657593,
-0.13982099294662476,
-0.0553591325879097,
0.28351670503616333,
0.44516268372535706,
-0.13045571744441986,
-0.030470354482531548,
0.3303614556789398,
-0.3753848969936371,
0.1933659017086029,
0.03124438412487507,
0.1681620180606842,
0.2480674535036087,
-0.3133724331855774,
0.1509748250246048,
-0.03657851740717888,
0.47981876134872437,
0.3024398684501648,
-0.029979616403579712,
-0.13574941456317902,
-0.3888756334781647,
0.004290930926799774,
0.02725357934832573,
0.02633078023791313,
0.5839142203330994,
0.11926837265491486,
0.2560259699821472,
-0.2282455563545227,
-0.2270044982433319,
0.1964625120162964,
-0.035030052065849304,
-0.25471097230911255,
-0.3905039429664612,
-0.24455106258392334,
0.13229000568389893,
-0.2944495975971222,
0.35657161474227905,
0.15227510035037994,
0.153798446059227,
-0.19876901805400848,
-0.05324555188417435,
-0.29154250025749207,
-0.3528410494327545,
0.2201928198337555,
0.1758262664079666,
-0.11408799141645432,
-0.24148273468017578,
0.2236756682395935,
0.1769176870584488,
-0.016848266124725342,
0.1725379377603531,
0.10968523472547531,
-0.1735180765390396,
-0.3718516230583191,
0.1353207528591156,
0.03330201655626297,
0.38664835691452026,
0.04566054791212082,
-0.11814370006322861,
0.07727736234664917,
0.1830686777830124,
0.35992228984832764,
-0.41496214270591736,
-0.007585813757032156,
0.10993427783250809,
0.09689440578222275,
-0.3572678565979004,
-0.381591260433197,
0.5145564675331116,
-0.07130523025989532,
-0.00571586936712265,
0.47009602189064026,
-0.10076124966144562,
-0.037768103182315826,
0.21158340573310852,
0.27511098980903625,
0.909813404083252,
-0.36506444215774536,
-0.07714618742465973,
-0.08776351064443588,
0.5812369585037231,
0.18111272156238556,
-0.5212215185165405,
0.29283303022384644,
-0.17349843680858612,
-0.3388212025165558,
-0.00348479300737381,
0.020822886377573013,
0.09737251698970795,
0.4366157054901123,
0.07033734023571014,
0.0706329494714737,
0.10567156970500946,
-0.1782514452934265,
-0.1257002353668213,
0.4100959002971649,
-0.2999861240386963,
-0.4134652614593506,
0.140330970287323,
-0.03931863233447075,
0.03964165598154068,
0.345481812953949,
-0.10297693312168121,
-0.038265615701675415,
0.5136816501617432,
0.016864676028490067,
-0.13687768578529358,
-0.049011021852493286,
-0.13057540357112885,
0.30291152000427246,
0.011396098881959915,
-0.44687092304229736,
0.13060541450977325,
0.21938888728618622,
0.04753758758306503,
-0.43198299407958984,
0.08627308905124664,
-0.02332933247089386,
0.02483273297548294,
-0.15022121369838715,
-0.15368570387363434,
-0.08808578550815582,
0.164000004529953,
-0.1554882824420929,
-0.16194705665111542,
-0.2510494589805603,
0.33847910165786743,
-0.7271618247032166,
-0.10295248031616211,
0.35197412967681885,
0.05576106533408165,
-0.26895657181739807,
0.03071247786283493,
0.23569521307945251,
-0.3195151090621948,
-0.19299949705600739,
-0.002609187737107277,
0.4090980291366577,
-0.23061072826385498,
0.33287131786346436,
-0.33512359857559204,
-0.12590689957141876,
-0.07129545509815216,
0.22061312198638916,
0.0529743917286396,
0.05087968707084656,
0.34856483340263367,
0.1749327927827835,
-0.16635261476039886,
-0.22519657015800476,
-0.11947129666805267,
0.2516615390777588,
-0.4776862859725952,
0.07512710243463516,
-0.1799878478050232,
0.1819525510072708,
-0.15945011377334595,
-0.1314733326435089,
0.11247396469116211,
0.004674263298511505,
-0.10713595151901245,
-0.4179545044898987,
-0.40218108892440796,
0.04940523952245712,
-0.1551663726568222,
0.20599141716957092,
-0.06071221083402634,
-0.057330820709466934,
0.00464983657002449,
0.4504778981208801,
-0.19130106270313263,
0.09422136843204498,
0.01761731691658497,
0.01587602123618126,
0.3464590609073639,
-0.08337637037038803,
0.08523613214492798,
0.06780305504798889,
-0.06854891031980515,
0.16929210722446442,
0.06556668877601624,
-0.10905361920595169,
-0.1775105595588684,
0.15474800765514374,
-0.04593081772327423,
-0.021280230954289436,
-0.20307964086532593,
-0.05866337567567825,
-0.12044136226177216,
-0.30530452728271484,
0.1777908056974411,
0.04019869118928909,
-0.09146760404109955,
0.24390585720539093,
0.6351053714752197,
-0.048219434916973114,
-0.36059296131134033,
0.07186809182167053,
-0.05935436487197876,
-0.010468259453773499,
-0.009648710489273071,
0.3963342308998108,
0.3495902121067047,
0.09936089813709259,
0.15875931084156036,
0.07439729571342468,
0.8183069229125977,
-0.09966807812452316,
0.18524056673049927,
-0.14389151334762573,
-0.019510986283421516,
-0.3185994625091553,
0.3792479336261749,
0.41895192861557007,
0.04208669066429138,
-0.10838623344898224,
0.10603972524404526,
0.14995402097702026,
-0.14887744188308716,
-0.11584131419658661,
0.1326054334640503,
0.17276236414909363,
0.09788574278354645,
0.46630510687828064,
-0.012393832206726074,
0.1149192601442337,
0.2706787586212158,
0.12169452756643295,
0.15467476844787598,
-0.5098347663879395,
0.07244783639907837,
-0.07012642920017242,
0.04998860880732536,
-0.1426999419927597,
0.3394719064235687,
0.0007356051355600357,
0.14710751175880432,
0.0933447927236557,
-0.3196828067302704,
0.8409628868103027,
0.16904383897781372,
-0.04234948381781578,
0.08606924116611481,
-0.4991264045238495,
-0.3496187627315521,
-0.00333307683467865,
0.013292990624904633,
0.08014696091413498,
0.0486946702003479,
0.5395020842552185,
0.07031979411840439,
0.05363622307777405,
-0.05799022316932678,
0.23682817816734314,
-0.04181697964668274,
-0.18265105783939362,
0.08802023530006409,
-0.2703306972980499,
-0.2429618537425995,
-0.051546260714530945,
0.038600318133831024,
-0.16783592104911804,
0.49232420325279236,
0.16195279359817505,
-0.02750653773546219,
-0.12650607526302338,
0.25102201104164124,
0.18880632519721985,
0.3549771308898926,
-0.2787732183933258,
-0.11347798258066177,
0.06981383264064789,
-0.0026712939143180847,
-0.17224924266338348,
0.11730723828077316,
0.18858779966831207,
0.3121790289878845,
-0.25061938166618347,
0.1589500606060028,
-0.17993952333927155,
0.0883924588561058,
-0.284890353679657,
0.24355602264404297,
-0.3163343667984009,
0.1643504798412323,
0.29742613434791565,
-0.03895282745361328,
-0.07971425354480743,
0.05230412632226944,
0.22192348539829254,
-0.18016460537910461,
-0.2845999300479889,
0.3868776857852936,
0.00012312456965446472,
-0.43847790360450745,
0.0354730524122715,
-0.015487998723983765,
-0.1169615387916565,
-0.2593977153301239,
0.3436836302280426,
-0.457496702671051,
0.00916207768023014,
-0.17376194894313812,
0.010972579941153526,
-0.14449672400951385,
0.457563579082489,
0.021494876593351364,
0.29597899317741394,
-0.36433422565460205,
0.05469571053981781,
-0.2830233871936798,
0.06631885468959808,
-0.2521621882915497,
0.08888989686965942,
0.0811210498213768,
0.4237464666366577,
-0.1758047342300415,
0.2871766686439514,
0.041027411818504333,
-0.2968407869338989,
0.059064991772174835,
0.6924176216125488,
-0.26322969794273376,
0.20358967781066895,
-0.21628312766551971,
0.10123953223228455,
0.18458129465579987,
-0.3362250328063965,
0.2284327745437622,
-0.14872080087661743,
-0.08097974956035614,
0.007404091767966747,
-0.15970340371131897,
0.34444674849510193,
-0.19531233608722687,
0.4300207793712616,
0.04408351331949234,
0.10007383674383163,
0.0050971619784832,
0.1593737006187439,
-0.31713157892227173,
0.1366249918937683,
-0.21158601343631744,
0.09207968413829803,
0.33067426085472107,
0.14343459904193878,
-0.07421287894248962,
0.0024918019771575928,
-0.5097652077674866,
0.26166626811027527,
-0.11930661648511887,
0.102493055164814,
-0.11033942550420761,
0.08620946109294891,
-0.06195791810750961,
0.40694543719291687,
-0.06968287378549576,
0.4759634733200073,
-0.008924774825572968,
0.11201733350753784,
-0.3490357995033264,
-0.07464569061994553,
0.10261838883161545,
-0.5262519717216492,
-0.21476002037525177,
-0.31927207112312317,
0.24749447405338287,
0.3319704532623291,
0.11297352612018585,
-0.3835209310054779,
-0.2557065784931183,
0.2460799217224121,
-0.12619709968566895,
0.11353723704814911,
0.1896742284297943,
0.3775525391101837,
-0.3548007011413574,
-0.03404705226421356,
0.027429450303316116,
0.07579700648784637,
0.05800950527191162,
0.02256843075156212,
-0.5760610103607178
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
> For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR.
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 166
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR.
|
[
-0.41506555676460266,
-0.11562807857990265,
-0.14575710892677307,
0.08082850277423859,
-0.2902185916900635,
-0.17778006196022034,
0.6815128326416016,
0.20298537611961365,
-0.16535790264606476,
0.19864997267723083,
0.05041089653968811,
0.16098451614379883,
-0.2835124433040619,
-0.2805774509906769,
-0.09504693746566772,
-0.3223939538002014,
-0.06563974171876907,
-0.02261708676815033,
0.026082288473844528,
0.054231688380241394,
-0.09020869433879852,
0.181948721408844,
-0.09504103660583496,
-0.2522923946380615,
-0.4211372137069702,
0.013568626716732979,
-0.0002842843532562256,
0.17423304915428162,
0.14680232107639313,
-0.2695399522781372,
0.10631158947944641,
0.4240681529045105,
0.40712934732437134,
0.4010787010192871,
-0.00012549023085739464,
-0.10242337733507156,
0.2063724845647812,
0.02192235179245472,
-0.15463301539421082,
0.19912216067314148,
0.03517378121614456,
-0.29964935779571533,
0.0997503399848938,
-0.3415411710739136,
0.02618749439716339,
-0.20901237428188324,
0.18012377619743347,
-0.3768196702003479,
0.32858437299728394,
-0.03313078731298447,
-0.027625899761915207,
0.14993754029273987,
-0.182547926902771,
0.22722677886486053,
0.2751045823097229,
0.004155956208705902,
-0.10356006026268005,
0.1478559821844101,
0.4638468325138092,
0.04897397756576538,
-0.5701154470443726,
0.3172672688961029,
-0.05149393528699875,
0.2792566418647766,
0.24503812193870544,
-0.08534146100282669,
-0.67441725730896,
-0.41318750381469727,
-0.2259017527103424,
0.17708054184913635,
-0.08485894650220871,
-0.2105908989906311,
-0.22107072174549103,
-0.6246183514595032,
-0.15994256734848022,
-0.18915344774723053,
0.0041210949420928955,
0.10406406223773956,
-0.19001509249210358,
-0.11540102958679199,
0.11974693834781647,
0.09337994456291199,
-0.2588103115558624,
0.19563816487789154,
0.31998875737190247,
0.1776088923215866,
-0.07523481547832489,
0.17057116329669952,
0.44866329431533813,
0.09937352687120438,
0.31574222445487976,
0.10817146301269531,
0.19159355759620667,
0.18030226230621338,
-0.28008925914764404,
-0.09168320894241333,
-0.08752325922250748,
-0.14501097798347473,
0.11982812732458115,
0.38680267333984375,
0.24145060777664185,
0.12887218594551086,
0.14315347373485565,
0.14970245957374573,
0.09806954860687256,
-0.3046201169490814,
0.05233822017908096,
-0.07011156529188156,
0.08480847626924515,
-0.024032318964600563,
0.0028481408953666687,
0.013574369251728058,
-0.03473157435655594,
-0.6897640824317932,
0.1786091923713684,
0.24712198972702026,
-0.01817438006401062,
0.12264473736286163,
0.017584847286343575,
-0.1858225017786026,
0.12716487050056458,
-0.3277636766433716,
0.08692775666713715,
0.07713021337985992,
0.14793141186237335,
-0.019118376076221466,
-0.24236227571964264,
0.2988790273666382,
-0.24657361209392548,
-0.44807299971580505,
0.09128251671791077,
-0.1339842975139618,
-0.0678098052740097,
0.2926331162452698,
0.2697370648384094,
0.017743533477187157,
-0.023028530180454254,
-0.0662284567952156,
0.32091885805130005,
0.07569649070501328,
0.14035888016223907,
-0.25606462359428406,
0.12718483805656433,
0.011601772159337997,
-0.08396139740943909,
-0.14613713324069977,
0.03954428434371948,
0.2836827039718628,
-0.1810285747051239,
0.13484151661396027,
-0.08054911345243454,
-0.4064007103443146,
-0.030923539772629738,
-0.07897184044122696,
0.0027544889599084854,
0.05990230292081833,
-0.39289194345474243,
0.06377391517162323,
0.4835245907306671,
-0.2174394130706787,
0.15221573412418365,
-0.2208053320646286,
-0.16494566202163696,
-0.1663404107093811,
0.01404459960758686,
0.545267641544342,
0.06470434367656708,
-0.0269344300031662,
-0.06419041007757187,
0.02118542045354843,
0.31020715832710266,
0.3143158555030823,
-0.16159498691558838,
-0.06390202790498734,
-0.10735903680324554,
0.5402749180793762,
0.30753645300865173,
0.06408722698688507,
-0.4448133707046509,
0.5294622778892517,
-0.05662759393453598,
0.0009126197546720505,
0.6265662908554077,
0.22054123878479004,
0.49746471643447876,
-0.09368482977151871,
0.10686659812927246,
0.20081579685211182,
-0.04647412151098251,
-0.06773082911968231,
-0.36879584193229675,
-0.08729357272386551,
-0.1384757161140442,
0.3213668763637543,
0.25320324301719666,
0.004726827144622803,
0.21412403881549835,
-0.5102080702781677,
0.5317636728286743,
-0.03628584370017052,
0.19592319428920746,
-0.0792429968714714,
-0.06927411258220673,
0.0026092901825904846,
0.3277013301849365,
-0.26294127106666565,
-0.32976770401000977,
0.15802308917045593,
-0.07360122352838516,
-0.16974887251853943,
-0.2927563190460205,
-0.1520482897758484,
0.23145177960395813,
-0.1696266233921051,
-0.2846565544605255,
0.1202823668718338,
-0.18328599631786346,
-0.07804505527019501,
0.0780894011259079,
-0.3622306287288666,
-0.3336784839630127,
0.029644034802913666,
-0.6032777428627014,
0.010772603563964367,
-0.40318113565444946,
0.24237461388111115,
0.30230894684791565,
-0.25116896629333496,
-0.053076788783073425,
0.07501273602247238,
-0.09021785110235214,
-0.30376431345939636,
0.026781653985381126,
0.1960899531841278,
0.13090914487838745,
0.19243502616882324,
0.02582467906177044,
0.45379841327667236,
0.16684776544570923,
0.04915068671107292,
0.11806678771972656,
0.12323558330535889,
-0.13840536773204803,
-0.10181031376123428,
-0.032316602766513824,
0.5415452122688293,
-0.435467392206192,
0.37554579973220825,
-0.11097550392150879,
-0.09975776821374893,
0.2479250729084015,
0.09175407886505127,
-0.3007912337779999,
0.14237014949321747,
0.08264896273612976,
-0.09257112443447113,
0.19898171722888947,
-0.01837857998907566,
-0.28475576639175415,
0.33994919061660767,
0.019811924546957016,
-0.07207740098237991,
-0.08542429655790329,
0.03979068249464035,
-0.026011720299720764,
0.06411385536193848,
0.39020660519599915,
0.4892542064189911,
0.32449349761009216,
0.1459474414587021,
0.04403070732951164,
-0.2808493673801422,
0.17902222275733948,
-0.17965643107891083,
-0.028995893895626068,
0.1442248374223709,
0.15277999639511108,
0.24057099223136902,
-0.18921276926994324,
0.019345302134752274,
-0.2891111671924591,
-0.6409369111061096,
-0.12237542122602463,
0.08717267215251923,
-0.15710945427417755,
0.13294468820095062,
0.07925260066986084,
0.11929050832986832,
-0.28671443462371826,
0.02109988033771515,
-0.05774810537695885,
-0.14068683981895447,
-0.0163988396525383,
0.5977984666824341,
-0.07322226464748383,
0.0733669102191925,
-0.028087496757507324,
0.4170551896095276,
0.05110006779432297,
-0.13434745371341705,
-0.23554006218910217,
0.06613456457853317,
0.1866016685962677,
-0.0946953296661377,
0.3890856206417084,
-0.06871850788593292,
0.2065211683511734,
0.041257262229919434,
-0.010248297825455666,
-0.3416635990142822,
0.2759917080402374,
-0.046564288437366486,
-0.04402553290128708,
-0.11480961740016937,
-0.037454620003700256,
-0.02269342541694641,
-0.005673103034496307,
-0.362849622964859,
-0.012801354750990868,
-0.02511213719844818,
0.15569740533828735,
0.15240277349948883,
-0.010036983527243137,
-0.0272419024258852,
0.16696232557296753,
-0.08521988242864609,
-0.39468613266944885,
-0.2934114336967468,
0.3189994692802429,
0.25627949833869934,
0.3640199899673462,
-0.15609274804592133,
0.2789131700992584,
-0.09323857724666595,
0.15655235946178436,
-0.1688414067029953,
0.10782156884670258,
-0.5392894744873047,
0.43509146571159363,
-0.1660047173500061,
-0.18540512025356293,
-0.2500111162662506,
-0.08360360562801361,
0.008006151765584946,
0.49528390169143677,
-0.1652657389640808,
0.06470835208892822,
-0.16696681082248688,
0.3680592477321625,
-0.011275436729192734,
-0.023324476554989815,
0.47251155972480774,
0.2804102897644043,
0.1244383454322815,
0.11662844568490982,
0.4517417550086975,
0.11305899173021317,
-0.32477182149887085,
-0.10700199753046036,
0.3273549973964691,
0.3035471737384796,
0.25562217831611633,
1.4036917686462402,
0.19273392856121063,
-0.10405060648918152,
0.24512498080730438,
-0.11108962446451187,
-0.34774351119995117,
0.008730895817279816,
-0.41165950894355774,
0.18192097544670105,
-0.30784326791763306,
0.024445869028568268,
0.16732075810432434,
-0.13045212626457214,
-0.1524287760257721,
0.0994492769241333,
-0.1989866942167282,
-0.08839385211467743,
-0.4383672773838043,
0.4949401617050171,
-0.25484755635261536,
0.28177177906036377,
-0.2830672562122345,
0.03507687896490097,
-0.15901429951190948,
-0.1947534680366516,
-0.09669187664985657,
0.2805714011192322,
0.5436877608299255,
-0.11635603755712509,
-0.021119367331266403,
0.3447622060775757,
-0.4384026527404785,
0.26199036836624146,
0.09683069586753845,
0.19742938876152039,
0.28803592920303345,
-0.3557111620903015,
0.23369279503822327,
0.006187791936099529,
0.4093632102012634,
0.20886342227458954,
-0.11834393441677094,
-0.09209409356117249,
-0.18411539494991302,
-0.08305288851261139,
-0.005568325519561768,
-0.020055292174220085,
0.4514947235584259,
0.07445495575666428,
0.21482490003108978,
-0.240223228931427,
-0.18857714533805847,
0.15318168699741364,
-0.0954592153429985,
-0.1473393738269806,
-0.24862608313560486,
-0.2411603331565857,
0.2187758982181549,
-0.3945128321647644,
0.3178929388523102,
0.16007348895072937,
0.06768748909235,
-0.1963190734386444,
-0.08583037555217743,
-0.2272823452949524,
-0.3856479227542877,
0.24669648706912994,
0.09934544563293457,
0.009482703171670437,
-0.1950356513261795,
0.09859158098697662,
0.19706761837005615,
-0.017856478691101074,
0.2331591099500656,
0.14067524671554565,
-0.09342721104621887,
-0.24296283721923828,
0.11956348270177841,
-0.028591729700565338,
0.3488956689834595,
0.3189530372619629,
-0.12762781977653503,
0.09862356632947922,
0.17994314432144165,
0.3621479272842407,
-0.28196287155151367,
-0.04227552190423012,
0.0628485232591629,
0.010808437131345272,
-0.1990830898284912,
-0.4271671772003174,
0.548088550567627,
-0.114517942070961,
0.00576028972864151,
0.5341789722442627,
0.046391092240810394,
-0.06276153773069382,
0.39394235610961914,
0.17053866386413574,
1.1382519006729126,
-0.21181775629520416,
0.10182152688503265,
0.005954030901193619,
0.47837769985198975,
0.0029561358969658613,
-0.4464558959007263,
0.2734859585762024,
-0.20231923460960388,
-0.19682341814041138,
-0.08034977316856384,
-0.01672017201781273,
0.17580059170722961,
0.3923696279525757,
0.08703723549842834,
0.044116608798503876,
0.05418744683265686,
-0.26026004552841187,
-0.22624540328979492,
0.3221205770969391,
-0.4364025592803955,
-0.32432764768600464,
0.16383937001228333,
-0.1129000261425972,
0.05086056888103485,
0.17866487801074982,
0.04115349426865578,
-0.06099343299865723,
0.17841659486293793,
0.068794384598732,
-0.12358047068119049,
-0.10122915357351303,
-0.05144832283258438,
0.322944700717926,
0.033198997378349304,
-0.6011416912078857,
0.040679529309272766,
0.19139306247234344,
-0.18019594252109528,
-0.4813331067562103,
0.08665911853313446,
-0.0972607433795929,
0.13049066066741943,
-0.20782996714115143,
-0.11983662843704224,
-0.14480264484882355,
0.25700026750564575,
-0.07750511169433594,
-0.14139632880687714,
-0.1672968864440918,
0.305069237947464,
-0.7965348958969116,
-0.1765318065881729,
0.32724034786224365,
0.23760917782783508,
-0.3639124035835266,
-0.07890810072422028,
0.19330036640167236,
-0.43569234013557434,
-0.14299507439136505,
-0.03878423199057579,
0.35183078050613403,
-0.1848977953195572,
0.2850145697593689,
-0.19496561586856842,
-0.0895756408572197,
-0.046143028885126114,
0.2476179599761963,
0.04080355539917946,
0.06892028450965881,
0.30704036355018616,
0.14520198106765747,
-0.2524760961532593,
-0.14305007457733154,
0.024061523377895355,
0.3652433454990387,
-0.5947431921958923,
0.05735206604003906,
-0.19286751747131348,
0.18900330364704132,
-0.15945471823215485,
-0.15578046441078186,
0.20129838585853577,
0.12437038123607635,
-0.15696029365062714,
-0.3686164617538452,
-0.2636990547180176,
0.15996922552585602,
-0.09859886765480042,
0.27008259296417236,
-0.14362064003944397,
-0.15763264894485474,
-0.042150914669036865,
0.3178614675998688,
-0.1526499092578888,
0.18210071325302124,
0.1876947432756424,
0.0239599347114563,
0.2614283561706543,
-0.03919418156147003,
0.014470946043729782,
0.10426735877990723,
-0.09330226480960846,
0.1994408518075943,
-0.011920187622308731,
-0.0478384830057621,
-0.12251205742359161,
0.1950632929801941,
-0.05204125493764877,
-0.09747008234262466,
-0.17870290577411652,
-0.11022843420505524,
-0.21849022805690765,
-0.2715664505958557,
0.0574931763112545,
-0.06815442442893982,
-0.09864912927150726,
0.06237950548529625,
0.7646510601043701,
-0.04910401254892349,
-0.26366955041885376,
0.11381877958774567,
-0.07752816379070282,
0.09298330545425415,
-0.06727327406406403,
0.38280370831489563,
0.21792468428611755,
0.020265541970729828,
0.1302533894777298,
0.2525661587715149,
0.7097480893135071,
0.05497852340340614,
0.2878897488117218,
-0.09830828011035919,
0.017967503517866135,
-0.32319092750549316,
0.4160262942314148,
0.437796413898468,
0.09907485544681549,
-0.22642453014850616,
0.136441171169281,
0.10072814673185349,
-0.09261175990104675,
-0.10520247370004654,
0.06661199033260345,
0.20266827940940857,
0.10377475619316101,
0.39098209142684937,
-0.005348533391952515,
0.026262030005455017,
0.12265157699584961,
0.12354300171136856,
0.08153149485588074,
-0.5286999940872192,
-0.017063602805137634,
-0.05511166527867317,
0.16546081006526947,
-0.14986251294612885,
0.4179256558418274,
-0.12957505881786346,
0.17649531364440918,
0.2220298945903778,
-0.2761688828468323,
0.8016800880432129,
0.24542051553726196,
0.019850224256515503,
-0.005429498851299286,
-0.49023786187171936,
-0.29898110032081604,
-0.006963267922401428,
0.05551231652498245,
0.19380486011505127,
0.17585626244544983,
0.664121687412262,
-0.0027663055807352066,
0.12882854044437408,
0.07699844986200333,
0.13652275502681732,
0.08128616213798523,
-0.20019693672657013,
-0.010105634108185768,
-0.3184617757797241,
-0.25292104482650757,
-0.005769900977611542,
-0.03578655794262886,
0.0020980313420295715,
0.46781402826309204,
0.24066461622714996,
0.09890734404325485,
-0.09993646293878555,
0.30381911993026733,
0.012006733566522598,
0.426082968711853,
-0.3287999927997589,
-0.11991950124502182,
0.10960813611745834,
0.11615309119224548,
0.018086571246385574,
0.04789043217897415,
0.229081928730011,
0.23448388278484344,
-0.13540509343147278,
0.1580537110567093,
-0.209860697388649,
0.025405580177903175,
-0.187584787607193,
0.22188717126846313,
-0.18162351846694946,
0.08868972957134247,
0.2727864682674408,
-0.025369737297296524,
-0.06493262946605682,
-0.011865004897117615,
0.1537889540195465,
-0.2983384132385254,
-0.20049253106117249,
0.3157925009727478,
-0.06784030050039291,
-0.5097523331642151,
0.01713005267083645,
-0.14168685674667358,
-0.23529624938964844,
-0.17446103692054749,
0.32793429493904114,
-0.49734029173851013,
-0.0038643106818199158,
-0.117058165371418,
-0.019841400906443596,
-0.13628621399402618,
0.408981055021286,
0.04447581619024277,
0.36874887347221375,
-0.2594122588634491,
-0.08295794576406479,
-0.17943784594535828,
-0.02842865139245987,
-0.19719770550727844,
0.1133330762386322,
0.026825666427612305,
0.49787360429763794,
-0.08967361599206924,
0.2539290189743042,
0.022043272852897644,
-0.2713718116283417,
-0.06955939531326294,
0.7498656511306763,
-0.2664782702922821,
0.2856709063053131,
-0.09294365346431732,
0.13599278032779694,
0.03255866840481758,
-0.42875441908836365,
0.23342670500278473,
-0.0430973581969738,
-0.13286885619163513,
0.08295771479606628,
-0.23504406213760376,
0.44535544514656067,
-0.11009165644645691,
0.33876803517341614,
-0.009523365646600723,
0.12403924763202667,
0.03412001579999924,
0.1198977455496788,
-0.3852521479129791,
0.11182577908039093,
-0.20131994783878326,
0.18331179022789001,
0.3257331848144531,
0.29929956793785095,
-0.04828952997922897,
-0.19190892577171326,
-0.41875842213630676,
0.41303473711013794,
-0.1584526002407074,
0.1259048730134964,
-0.11509014666080475,
0.05737507343292236,
-0.2081964910030365,
0.40456071496009827,
-0.16856780648231506,
0.33617010712623596,
0.018805477768182755,
0.1293582022190094,
-0.3037685751914978,
-0.10437009483575821,
0.15817688405513763,
-0.49689385294914246,
-0.16730256378650665,
-0.2128097265958786,
0.2142687439918518,
0.3608735203742981,
0.2614152431488037,
-0.36468639969825745,
-0.33950042724609375,
0.1820944845676422,
-0.1630062460899353,
0.1832866668701172,
0.1951640397310257,
0.480153888463974,
-0.28235799074172974,
-0.0809982419013977,
0.04185677319765091,
0.05386216193437576,
-0.025311103090643883,
-0.1539037525653839,
-0.6559446454048157
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
> Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 60
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
|
[
-0.4426667392253876,
-0.20271041989326477,
-0.12075890600681305,
0.07688793540000916,
-0.246957466006279,
-0.19033966958522797,
0.6777271032333374,
0.15579542517662048,
-0.08213489502668381,
0.22216877341270447,
0.1517815738916397,
0.24222159385681152,
-0.3038255274295807,
-0.1554233580827713,
-0.08632028847932816,
-0.32383352518081665,
-0.10458659380674362,
0.058002717792987823,
0.04037827253341675,
-0.010944981127977371,
-0.05777023732662201,
0.1516280621290207,
-0.05303673818707466,
-0.32770204544067383,
-0.39723679423332214,
0.07221601903438568,
-0.0774984285235405,
0.09501579403877258,
0.13540484011173248,
-0.213340625166893,
0.06896033883094788,
0.3788779675960541,
0.39832156896591187,
0.4721166491508484,
-0.0001258172414964065,
-0.1336231231689453,
0.0850776880979538,
-0.022145608440041542,
-0.20807121694087982,
0.10223451256752014,
-0.06031528860330582,
-0.3596002757549286,
0.12455131113529205,
-0.2925662100315094,
0.08365856111049652,
-0.22842036187648773,
0.21173056960105896,
-0.3925095498561859,
0.31721603870391846,
-0.12718509137630463,
-0.027234185487031937,
0.24468809366226196,
-0.23460398614406586,
0.22239592671394348,
0.1197226345539093,
0.09025666117668152,
-0.09154653549194336,
0.04685918986797333,
0.3886267840862274,
0.04831595718860626,
-0.5485360622406006,
0.3691908121109009,
-0.01797647401690483,
0.33150988817214966,
0.2793225944042206,
-0.07694145292043686,
-0.6023021936416626,
-0.49316659569740295,
-0.21841266751289368,
0.18902739882469177,
0.016864925622940063,
-0.25169557332992554,
-0.2197677046060562,
-0.7078967094421387,
-0.22182679176330566,
-0.2033645063638687,
0.0017548725008964539,
0.16616258025169373,
-0.16425462067127228,
-0.15943343937397003,
0.05942370742559433,
0.06392620503902435,
-0.2056301236152649,
0.2350204885005951,
0.3083275258541107,
0.38298600912094116,
-0.08768229186534882,
0.13412755727767944,
0.4723261296749115,
0.12454923242330551,
0.2612738013267517,
0.10560717433691025,
0.23440589010715485,
0.2095537781715393,
-0.36118394136428833,
-0.09189502149820328,
-0.16468116641044617,
-0.1915988028049469,
0.17786243557929993,
0.34387606382369995,
0.17225006222724915,
0.07970122247934341,
0.14181481301784515,
0.10242395102977753,
0.2847621440887451,
-0.2021370530128479,
0.06763565540313721,
0.016014274209737778,
-0.03549405187368393,
-0.08402650058269501,
0.038079503923654556,
-0.016533125191926956,
-0.03612066060304642,
-0.7313730716705322,
0.3081435561180115,
0.21831637620925903,
0.08338824659585953,
0.10943783819675446,
0.05168318748474121,
-0.20491959154605865,
0.053014062345027924,
-0.30795761942863464,
0.07284960150718689,
0.07174835354089737,
0.06428418308496475,
0.03820733726024628,
-0.3158872127532959,
0.32284170389175415,
-0.3111129105091095,
-0.359822154045105,
0.059986766427755356,
-0.09725075960159302,
-0.04222835600376129,
0.30747368931770325,
0.28521499037742615,
-0.03253980726003647,
0.07557902485132217,
-0.046216901391744614,
0.34952330589294434,
-0.07169055193662643,
0.24291273951530457,
-0.22652091085910797,
0.22713741660118103,
0.04680705443024635,
0.011641699820756912,
-0.002789746969938278,
-0.03428049013018608,
0.34168946743011475,
-0.17506545782089233,
0.14877255260944366,
-0.12642443180084229,
-0.4379079043865204,
-0.08611628413200378,
-0.040317874401807785,
-0.11912521719932556,
0.0476791113615036,
-0.42608627676963806,
0.02343912050127983,
0.5834336280822754,
-0.13831566274166107,
0.23460933566093445,
-0.17105697095394135,
-0.21020463109016418,
-0.09496130794286728,
0.033739253878593445,
0.5945019125938416,
0.120160311460495,
-0.129214346408844,
-0.14640893042087555,
-0.050945986062288284,
0.33896079659461975,
0.23347458243370056,
-0.11478503048419952,
-0.006578803062438965,
-0.09171963483095169,
0.5893856883049011,
0.2913634479045868,
0.023910608142614365,
-0.43439358472824097,
0.5746408700942993,
-0.2146429419517517,
0.07573933154344559,
0.5191311240196228,
0.22865881025791168,
0.480144739151001,
-0.08882062137126923,
-0.05636732280254364,
0.2085539996623993,
-0.09130270034074783,
-0.008052144199609756,
-0.3211096227169037,
-0.11440623551607132,
-0.04301414638757706,
0.38487130403518677,
0.2648034691810608,
-0.04558246582746506,
0.07480187714099884,
-0.34766650199890137,
0.5390463471412659,
-0.0029214508831501007,
0.2640845477581024,
-0.009487569332122803,
-0.0558335967361927,
0.017458871006965637,
0.3717373311519623,
-0.2904634475708008,
-0.36497950553894043,
0.17556694149971008,
-0.0028870683163404465,
-0.23557531833648682,
-0.3561166524887085,
-0.08073866367340088,
0.2814563512802124,
-0.18656812608242035,
-0.40244394540786743,
0.03520597890019417,
-0.17682646214962006,
0.015524975955486298,
0.02415243163704872,
-0.46109411120414734,
-0.31504833698272705,
0.08514340221881866,
-0.4752221405506134,
0.028561964631080627,
-0.41865870356559753,
0.15415099263191223,
0.3145994544029236,
-0.1912265419960022,
-0.08934719860553741,
0.08577393740415573,
0.02150895819067955,
-0.3003171682357788,
0.023164017125964165,
0.2509848475456238,
0.1705201268196106,
0.3184701204299927,
-0.07530414313077927,
0.3814670443534851,
0.1943364292383194,
-0.03424463048577309,
0.06293991953134537,
0.09008370339870453,
-0.1748109608888626,
-0.12032869458198547,
-0.05549909174442291,
0.35903608798980713,
-0.47312721610069275,
0.3783588707447052,
-0.14814743399620056,
-0.05088570713996887,
0.23822954297065735,
0.04458468034863472,
-0.3009780943393707,
-0.00551982969045639,
0.14439630508422852,
-0.17058944702148438,
0.15087276697158813,
0.017101742327213287,
-0.3092036247253418,
0.3709413409233093,
0.08430108428001404,
-0.0528748519718647,
-0.06534070521593094,
0.016497144475579262,
-0.04399062693119049,
0.04275467246770859,
0.32053342461586,
0.4184892475605011,
0.2814284861087799,
0.060212619602680206,
0.07517560571432114,
-0.2644670605659485,
0.2456488460302353,
-0.15865926444530487,
-0.025088541209697723,
0.17756375670433044,
0.19432614743709564,
0.2926126718521118,
-0.23495541512966156,
0.01983942836523056,
-0.22933614253997803,
-0.5173705816268921,
-0.06257421523332596,
0.10308171063661575,
-0.1652073860168457,
0.1463559865951538,
0.028838923200964928,
0.13741180300712585,
-0.3639111816883087,
-0.09279657155275345,
-0.058562953025102615,
-0.07888507843017578,
-0.018562745302915573,
0.519720733165741,
-0.11361640691757202,
0.17102128267288208,
0.06518153846263885,
0.33815908432006836,
-0.01689166948199272,
-0.16144423186779022,
-0.1411249339580536,
-0.0506630465388298,
0.27326884865760803,
-0.1119489073753357,
0.203977569937706,
-0.08554502576589584,
0.16484972834587097,
-0.010707591660320759,
-0.026197507977485657,
-0.43491747975349426,
0.2707047164440155,
-0.015898071229457855,
0.011954769492149353,
-0.19785745441913605,
0.020534388720989227,
0.021765805780887604,
0.05612712353467941,
-0.37700188159942627,
-0.10258972644805908,
-0.07284342497587204,
0.14621169865131378,
0.161600261926651,
0.009137707762420177,
-0.04214144125580788,
0.11785092949867249,
-0.07809145003557205,
-0.43510475754737854,
-0.25818389654159546,
0.2717996835708618,
0.2652139663696289,
0.37938982248306274,
-0.09567371755838394,
0.18684427440166473,
-0.2047547549009323,
0.1638830155134201,
-0.16398730874061584,
0.08815429359674454,
-0.5494393706321716,
0.4559657573699951,
-0.24505062401294708,
-0.13503670692443848,
-0.2041368931531906,
-0.05630923807621002,
-0.010036088526248932,
0.47370821237564087,
-0.14749878644943237,
0.08430705219507217,
-0.16551516950130463,
0.21102681756019592,
-0.04571104049682617,
-0.0019714701920747757,
0.4608033001422882,
0.3059811294078827,
0.18787091970443726,
0.03421126306056976,
0.3918195068836212,
0.1880885809659958,
-0.2644786536693573,
-0.005770862102508545,
0.11067633330821991,
0.26963311433792114,
0.2727668583393097,
1.2911181449890137,
0.16546238958835602,
-0.1284562200307846,
0.1603786200284958,
-0.1268794983625412,
-0.4246293008327484,
0.1097390428185463,
-0.4542444050312042,
0.2555370628833771,
-0.2747027277946472,
0.02130769193172455,
0.21113887429237366,
-0.19628429412841797,
-0.13326244056224823,
0.14520438015460968,
-0.2750948667526245,
-0.15913066267967224,
-0.3787771463394165,
0.3650415241718292,
-0.22160443663597107,
0.3003659248352051,
-0.24372729659080505,
0.06157299876213074,
-0.24788938462734222,
-0.18358495831489563,
-0.10745903849601746,
0.282253623008728,
0.4994492530822754,
-0.05903135985136032,
-0.061640601605176926,
0.3377220332622528,
-0.31334999203681946,
0.16278615593910217,
0.10714050382375717,
0.1903666853904724,
0.24027855694293976,
-0.3701184093952179,
0.15005818009376526,
0.047929927706718445,
0.512883186340332,
0.23058046400547028,
-0.03396722674369812,
-0.2124863862991333,
-0.22442220151424408,
-0.04726791009306908,
-0.0069853924214839935,
0.0033062249422073364,
0.5702310800552368,
0.037033259868621826,
0.24522557854652405,
-0.2514805495738983,
-0.17344476282596588,
0.22651642560958862,
-0.01194349117577076,
-0.14867186546325684,
-0.26487886905670166,
-0.22795021533966064,
0.1705407202243805,
-0.2900161147117615,
0.3184334635734558,
0.16471293568611145,
0.12041039019823074,
-0.17004799842834473,
-0.043044738471508026,
-0.1740274578332901,
-0.3303711414337158,
0.19317805767059326,
0.14479674398899078,
0.0398847833275795,
-0.14944489300251007,
0.10639253258705139,
0.306440144777298,
0.06506031006574631,
0.268533319234848,
0.13949033617973328,
-0.17613548040390015,
-0.3532325029373169,
0.20878258347511292,
-0.06753591448068619,
0.3995995819568634,
0.2732864320278168,
-0.12104158103466034,
0.12127389013767242,
0.28106623888015747,
0.34924477338790894,
-0.34278562664985657,
0.006231235805898905,
0.08864359557628632,
0.03207127004861832,
-0.32461944222450256,
-0.4624025523662567,
0.4900994896888733,
-0.09826268255710602,
0.05689604580402374,
0.536503791809082,
-0.06702549755573273,
-0.059832923114299774,
0.2996674180030823,
0.22342562675476074,
1.0874272584915161,
-0.18249689042568207,
-0.03090360388159752,
0.04660632088780403,
0.4660565257072449,
0.15539485216140747,
-0.42273420095443726,
0.3143332600593567,
-0.1710912585258484,
-0.2918221056461334,
-0.08824175596237183,
-0.051465559750795364,
0.07079781591892242,
0.4377317428588867,
0.00958935171365738,
0.050886038690805435,
0.011154308915138245,
-0.18509313464164734,
-0.19820234179496765,
0.4384947717189789,
-0.3697253465652466,
-0.4126168191432953,
0.13872671127319336,
-0.11765241622924805,
-0.0010485947132110596,
0.30676013231277466,
-0.03328665345907211,
-0.11651067435741425,
0.34269940853118896,
0.028236649930477142,
-0.11790839582681656,
-0.06084821745753288,
-0.1238662526011467,
0.25051265954971313,
0.0074199289083480835,
-0.5676656365394592,
0.08388300240039825,
0.19775794446468353,
-0.020320937037467957,
-0.43842875957489014,
0.1185375452041626,
-0.009984202682971954,
0.11216165125370026,
-0.16558557748794556,
-0.12549646198749542,
-0.10528545081615448,
0.17183595895767212,
-0.09796261787414551,
-0.15250642597675323,
-0.2719443738460541,
0.3126911222934723,
-0.7495589256286621,
-0.16166384518146515,
0.3128206133842468,
0.15592485666275024,
-0.31659242510795593,
-0.05919155851006508,
0.20107603073120117,
-0.36505386233329773,
-0.15832723677158356,
-0.02750137448310852,
0.3705591559410095,
-0.21460913121700287,
0.2555243670940399,
-0.28467410802841187,
-0.13256600499153137,
-0.09379492700099945,
0.2566477060317993,
-0.008464731276035309,
0.07892262935638428,
0.3693266212940216,
0.22017769515514374,
-0.1920882910490036,
-0.1755782961845398,
-0.058591678738594055,
0.3432996869087219,
-0.5996009111404419,
0.035325512290000916,
-0.23738276958465576,
0.20706023275852203,
-0.165570929646492,
-0.061094362288713455,
0.14411240816116333,
0.1586216688156128,
-0.15762579441070557,
-0.4201774597167969,
-0.26517584919929504,
0.08496582508087158,
-0.1835797280073166,
0.26495084166526794,
-0.057250794023275375,
-0.06872791051864624,
-0.06903514266014099,
0.39127257466316223,
-0.1657049059867859,
0.11363828182220459,
0.14009763300418854,
0.044282056391239166,
0.2588234543800354,
-0.06003423035144806,
0.09125476330518723,
0.0188556257635355,
-0.1154802143573761,
0.1586097776889801,
0.0565107986330986,
-0.057400867342948914,
-0.16935214400291443,
0.18115806579589844,
-0.06502530723810196,
-0.10089576244354248,
-0.22656318545341492,
-0.07572648674249649,
-0.14628571271896362,
-0.2837590277194977,
0.14995691180229187,
0.0037938356399536133,
-0.04232707619667053,
0.22220967710018158,
0.727514922618866,
-0.11280133575201035,
-0.3762807846069336,
0.007806574925780296,
-0.044280797243118286,
0.05091390386223793,
-0.044280730187892914,
0.4302687644958496,
0.2538934350013733,
0.04620875418186188,
0.18739132583141327,
0.19900035858154297,
0.7757994532585144,
0.07873815298080444,
0.18222086131572723,
-0.12668077647686005,
0.04999971017241478,
-0.31074047088623047,
0.426568865776062,
0.45871004462242126,
0.08447625488042831,
-0.16923891007900238,
0.07695553451776505,
0.12315429747104645,
-0.06132759153842926,
-0.15151670575141907,
0.1049913614988327,
0.19806866347789764,
0.08723606169223785,
0.42599934339523315,
-0.01586027443408966,
0.05831313133239746,
0.14353959262371063,
0.21596413850784302,
0.13266867399215698,
-0.5296974778175354,
0.10516512393951416,
0.051199764013290405,
0.07559818029403687,
-0.10416635870933533,
0.3463817238807678,
-0.003953125327825546,
0.21103057265281677,
0.12343139201402664,
-0.2678368091583252,
0.8402659893035889,
0.2875531315803528,
-0.055780623108148575,
0.0469309501349926,
-0.520819902420044,
-0.42686426639556885,
-0.006195977330207825,
0.00018586963415145874,
0.1193680465221405,
0.11462140083312988,
0.587641716003418,
-0.014786791987717152,
0.10141915827989578,
0.059117160737514496,
0.11844193935394287,
0.024296697229146957,
-0.1839190274477005,
-0.0674661248922348,
-0.26375406980514526,
-0.25367552042007446,
-0.06689758598804474,
0.013923056423664093,
-0.058401308953762054,
0.42837268114089966,
0.17967678606510162,
0.01870235800743103,
-0.05461398512125015,
0.31934019923210144,
0.10034023970365524,
0.3807404339313507,
-0.3300432860851288,
-0.08646917343139648,
0.08076497167348862,
0.06015930324792862,
-0.07272452116012573,
0.102318175137043,
0.185598224401474,
0.2515150308609009,
-0.1582346111536026,
0.15842533111572266,
-0.13536053895950317,
-0.013283083215355873,
-0.20266297459602356,
0.18005044758319855,
-0.2588900327682495,
-0.007550377398729324,
0.29952001571655273,
-0.013615133240818977,
-0.055977970361709595,
0.09756814688444138,
0.2962192893028259,
-0.24594539403915405,
-0.19678789377212524,
0.3150175213813782,
0.007300186902284622,
-0.455440491437912,
0.008185956627130508,
-0.1326543688774109,
-0.2091517448425293,
-0.24612604081630707,
0.3686164915561676,
-0.3859262466430664,
-0.013542619533836842,
-0.13100942969322205,
-0.015877505764365196,
-0.09465593099594116,
0.44876229763031006,
0.061742108315229416,
0.31933557987213135,
-0.31496462225914,
-0.02283812314271927,
-0.2006596326828003,
0.02258221060037613,
-0.2531072795391083,
0.02724810130894184,
0.05512486770749092,
0.5216025114059448,
-0.14671748876571655,
0.27362334728240967,
0.0007441490888595581,
-0.1831546574831009,
-0.03663397580385208,
0.7271950244903564,
-0.25770699977874756,
0.19378915429115295,
-0.14556927978992462,
0.23061880469322205,
0.17206953465938568,
-0.37744730710983276,
0.2634153664112091,
-0.09503062814474106,
-0.11945729702711105,
0.07539154589176178,
-0.1925414502620697,
0.40005791187286377,
-0.15169718861579895,
0.2795678973197937,
-0.00927087850868702,
0.07751987874507904,
-0.021351542323827744,
0.14175963401794434,
-0.40344223380088806,
0.14919413626194,
-0.26763156056404114,
0.16955271363258362,
0.3530430197715759,
0.28399282693862915,
-0.09049422293901443,
-0.025133024901151657,
-0.5126560926437378,
0.3124965727329254,
-0.1516425460577011,
0.12753891944885254,
-0.11207541823387146,
0.14036531746387482,
-0.16636750102043152,
0.35563287138938904,
-0.034189339727163315,
0.43230581283569336,
-0.01920446753501892,
0.09367148578166962,
-0.28021255135536194,
-0.08454669266939163,
0.12678872048854828,
-0.5239135026931763,
-0.2149941474199295,
-0.27824872732162476,
0.2525146007537842,
0.38887929916381836,
0.17263861000537872,
-0.4150135815143585,
-0.23937010765075684,
0.19653767347335815,
-0.13746953010559082,
0.14716656506061554,
0.13585737347602844,
0.48887842893600464,
-0.2357827126979828,
-0.050741493701934814,
0.11929558217525482,
0.14077183604240417,
-0.004999240860342979,
-0.05678413808345795,
-0.6075136661529541
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
> > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)?
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 158
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)?
|
[
-0.4670998454093933,
-0.17912635207176208,
-0.11632892489433289,
0.049152862280607224,
-0.2605697512626648,
-0.1728026121854782,
0.6774321794509888,
0.16799156367778778,
-0.0823461264371872,
0.2368314266204834,
0.11716002970933914,
0.24954700469970703,
-0.23069214820861816,
-0.20272217690944672,
-0.07892938703298569,
-0.3268377184867859,
-0.09764472395181656,
0.061803627759218216,
0.01672309637069702,
0.008218087255954742,
-0.08084357529878616,
0.12172073870897293,
-0.09854769706726074,
-0.33387017250061035,
-0.37182095646858215,
-0.021802319213747978,
-0.08079461753368378,
0.1166372299194336,
0.08335845917463303,
-0.2269607037305832,
0.0928950235247612,
0.356725811958313,
0.4370903968811035,
0.4442908465862274,
-0.0001233035436598584,
-0.13409870862960815,
0.08292285352945328,
-0.028627818450331688,
-0.24186570942401886,
0.11165669560432434,
-0.06680379807949066,
-0.3418002426624298,
0.08359036594629288,
-0.3267807066440582,
0.09842266887426376,
-0.24415330588817596,
0.21822340786457062,
-0.3822198808193207,
0.31092458963394165,
-0.10331500321626663,
-0.006927806884050369,
0.2834320068359375,
-0.2383963018655777,
0.19674493372440338,
0.13224762678146362,
0.051438964903354645,
-0.1034591868519783,
0.10990723967552185,
0.40380391478538513,
0.06482736021280289,
-0.6061632037162781,
0.3527306914329529,
-0.09032095968723297,
0.3489091396331787,
0.29029688239097595,
-0.05440838634967804,
-0.5406508445739746,
-0.4665955603122711,
-0.16274785995483398,
0.18149608373641968,
0.043740518391132355,
-0.2872779369354248,
-0.20227482914924622,
-0.732790470123291,
-0.2215367555618286,
-0.24705499410629272,
-0.017906755208969116,
0.16987934708595276,
-0.14752887189388275,
-0.11218060553073883,
0.06514039635658264,
0.10159420222043991,
-0.19023799896240234,
0.21403636038303375,
0.30002477765083313,
0.34040361642837524,
-0.07613706588745117,
0.12652260065078735,
0.4351046681404114,
0.17394477128982544,
0.3234546184539795,
0.017013410106301308,
0.2568745017051697,
0.20112907886505127,
-0.39252838492393494,
-0.05657877027988434,
-0.1433837115764618,
-0.13804754614830017,
0.17147371172904968,
0.33603155612945557,
0.18577927350997925,
0.08506526052951813,
0.2332097440958023,
0.09384886920452118,
0.2853561043739319,
-0.18725359439849854,
0.042778708040714264,
-0.001247911248356104,
-0.06867070496082306,
0.0038677759002894163,
0.08035722374916077,
0.0006769448518753052,
-0.010886204428970814,
-0.7157845497131348,
0.2798619270324707,
0.2540678083896637,
0.08032922446727753,
0.10069356858730316,
0.02248825691640377,
-0.2195233255624771,
0.0374586284160614,
-0.3272191882133484,
0.029523693025112152,
0.06315594166517258,
0.043662093579769135,
0.02317008562386036,
-0.3392708897590637,
0.33424103260040283,
-0.31094256043434143,
-0.32362401485443115,
0.04277071729302406,
-0.09669546782970428,
-0.06111396476626396,
0.3194003999233246,
0.262010782957077,
-0.03589136525988579,
0.06975042074918747,
-0.05369247868657112,
0.3471289277076721,
0.010874077677726746,
0.2543991208076477,
-0.2150866687297821,
0.2512460947036743,
0.06970657408237457,
0.048978645354509354,
-0.014151337556540966,
-0.04216909036040306,
0.33607470989227295,
-0.17292936146259308,
0.21340987086296082,
-0.09245794266462326,
-0.4653620719909668,
-0.06927847862243652,
-0.01859109103679657,
-0.15004278719425201,
0.03032638132572174,
-0.46742478013038635,
0.047973744571208954,
0.5654847025871277,
-0.17167909443378448,
0.24319979548454285,
-0.18049560487270355,
-0.2122565507888794,
-0.1542266607284546,
0.08542387932538986,
0.5544645190238953,
0.02767118439078331,
-0.09648949652910233,
-0.15772204101085663,
-0.02338545396924019,
0.384117066860199,
0.22282646596431732,
-0.10678394883871078,
0.04406864568591118,
-0.10123076289892197,
0.6192278861999512,
0.2579396069049835,
0.09721840918064117,
-0.47430920600891113,
0.524275004863739,
-0.22952678799629211,
0.14407703280448914,
0.5152024626731873,
0.15362952649593353,
0.4748739004135132,
-0.10271178930997849,
-0.07458953559398651,
0.20332284271717072,
-0.1502002775669098,
-0.005142606794834137,
-0.3455321192741394,
-0.09857248514890671,
-0.04476017504930496,
0.41371089220046997,
0.2535051703453064,
-0.04305791109800339,
0.07247517257928848,
-0.3609860837459564,
0.5523994565010071,
-0.04068535938858986,
0.2685281038284302,
-0.06396542489528656,
-0.09737412631511688,
0.018294431269168854,
0.36201560497283936,
-0.23676931858062744,
-0.41385459899902344,
0.19191709160804749,
-0.019140904769301414,
-0.21352669596672058,
-0.369081974029541,
-0.12535257637500763,
0.2676897644996643,
-0.22064441442489624,
-0.3611280918121338,
0.006179036572575569,
-0.15374109148979187,
0.016617469489574432,
0.03220424801111221,
-0.4617707431316376,
-0.32462891936302185,
0.07163878530263901,
-0.46845313906669617,
0.016957374289631844,
-0.4666295051574707,
0.1404019296169281,
0.28924211859703064,
-0.1665201187133789,
-0.07350262999534607,
0.11757494509220123,
0.022549651563167572,
-0.30435270071029663,
0.0434238463640213,
0.22664394974708557,
0.18944531679153442,
0.2764504551887512,
-0.10280030220746994,
0.3680460453033447,
0.15446747839450836,
-0.026062633842229843,
0.12119727581739426,
0.05665004253387451,
-0.15057186782360077,
-0.10755343735218048,
-0.09381213039159775,
0.3878163695335388,
-0.44503507018089294,
0.38491764664649963,
-0.16309699416160583,
-0.058745309710502625,
0.2182680070400238,
0.007761858403682709,
-0.28161555528640747,
0.036034777760505676,
0.16419978439807892,
-0.12406279146671295,
0.18268147110939026,
0.05024749040603638,
-0.34184905886650085,
0.392293781042099,
0.11268049478530884,
-0.07714531570672989,
-0.07482720166444778,
0.01631411723792553,
-0.05851488560438156,
-0.014880698174238205,
0.3294011056423187,
0.42751848697662354,
0.2784830927848816,
0.10323204100131989,
0.13477493822574615,
-0.2704533040523529,
0.23464228212833405,
-0.18938897550106049,
-0.030238963663578033,
0.19052821397781372,
0.22609981894493103,
0.2589511573314667,
-0.23871009051799774,
0.03725336492061615,
-0.2017909586429596,
-0.5255181789398193,
-0.08170124888420105,
0.1270136535167694,
-0.1816883236169815,
0.1419449895620346,
0.012389427050948143,
0.15831565856933594,
-0.35893407464027405,
-0.041047874838113785,
-0.0268232561647892,
-0.11275658756494522,
-0.006502360105514526,
0.4830235242843628,
-0.14387120306491852,
0.2051612287759781,
0.07800407707691193,
0.374397873878479,
-0.07364880293607712,
-0.1294965296983719,
-0.16907598078250885,
-0.0432237945497036,
0.21698954701423645,
-0.079912930727005,
0.22013290226459503,
-0.05398942902684212,
0.19062668085098267,
-0.018713807687163353,
-0.05675019696354866,
-0.3842846155166626,
0.26832908391952515,
-0.021608881652355194,
0.0038386471569538116,
-0.18689946830272675,
0.04228295385837555,
0.07174431532621384,
0.015081394463777542,
-0.3631868064403534,
-0.12539836764335632,
-0.024893367663025856,
0.1512407511472702,
0.14153313636779785,
-0.06961797922849655,
-0.020886503159999847,
0.12569552659988403,
-0.12126749008893967,
-0.43353012204170227,
-0.28095000982284546,
0.2677627205848694,
0.2341124266386032,
0.3505244255065918,
-0.10312287509441376,
0.1956847757101059,
-0.20710408687591553,
0.14636702835559845,
-0.1747233122587204,
0.094639353454113,
-0.5447436571121216,
0.46939441561698914,
-0.2322852611541748,
-0.1499643325805664,
-0.1804448813199997,
-0.09853360056877136,
-0.007806222885847092,
0.5124890804290771,
-0.20098425447940826,
0.06528443098068237,
-0.13046132028102875,
0.2167183756828308,
-0.04047902673482895,
0.013720167800784111,
0.43860429525375366,
0.2866731286048889,
0.17871829867362976,
0.0014224909245967865,
0.3670479953289032,
0.15715670585632324,
-0.29264184832572937,
0.008047014474868774,
0.13231366872787476,
0.24425211548805237,
0.293832927942276,
1.3324837684631348,
0.19023586809635162,
-0.09521441161632538,
0.1434289813041687,
-0.08686821162700653,
-0.39695146679878235,
0.07016390562057495,
-0.41430041193962097,
0.2832263112068176,
-0.26100584864616394,
0.00997680053114891,
0.23815979063510895,
-0.24277910590171814,
-0.18515615165233612,
0.166606143116951,
-0.2607942521572113,
-0.15927505493164062,
-0.3959507644176483,
0.40743306279182434,
-0.1876700222492218,
0.3250716030597687,
-0.20001251995563507,
0.05811632424592972,
-0.24906575679779053,
-0.1704190969467163,
-0.09018193185329437,
0.23721620440483093,
0.4888249635696411,
-0.028830094262957573,
-0.07059932500123978,
0.36162808537483215,
-0.3544318974018097,
0.22750167548656464,
0.10940679907798767,
0.14314115047454834,
0.2802290618419647,
-0.380277544260025,
0.15705618262290955,
0.07132738083600998,
0.5291087627410889,
0.2147216498851776,
-0.056437768042087555,
-0.18645572662353516,
-0.22182217240333557,
-0.05401887744665146,
-0.00004587695002555847,
-0.003464173525571823,
0.5660012364387512,
0.038450103253126144,
0.17829099297523499,
-0.30089154839515686,
-0.20241717994213104,
0.226150244474411,
0.04693806543946266,
-0.1089380756020546,
-0.28392496705055237,
-0.1789349764585495,
0.13416841626167297,
-0.3197627663612366,
0.31873440742492676,
0.18128791451454163,
0.11854238063097,
-0.16273777186870575,
-0.036064863204956055,
-0.13160674273967743,
-0.22676149010658264,
0.13699454069137573,
0.16863715648651123,
0.0573340579867363,
-0.1291389912366867,
0.06870542466640472,
0.312956303358078,
0.07982474565505981,
0.3399444818496704,
0.17354968190193176,
-0.18081063032150269,
-0.35968661308288574,
0.23043513298034668,
-0.11004623025655746,
0.37093111872673035,
0.31626859307289124,
-0.11982376128435135,
0.10699659585952759,
0.3068735897541046,
0.34720486402511597,
-0.2889314591884613,
-0.03323519229888916,
0.040264908224344254,
0.004930018447339535,
-0.27829545736312866,
-0.49352675676345825,
0.4236675798892975,
-0.10836023092269897,
0.04770992696285248,
0.4826386272907257,
-0.061405643820762634,
-0.04072140157222748,
0.3375159502029419,
0.2624569237232208,
1.091760516166687,
-0.1246514618396759,
0.004660487174987793,
0.12086035311222076,
0.4296879172325134,
0.19048760831356049,
-0.3933349847793579,
0.30487060546875,
-0.1835060715675354,
-0.2716366946697235,
-0.058877989649772644,
-0.04400118440389633,
0.09528912603855133,
0.46546679735183716,
0.031092245131731033,
0.09668701887130737,
0.056077390909194946,
-0.23581603169441223,
-0.15067821741104126,
0.37710556387901306,
-0.35346296429634094,
-0.43036535382270813,
0.13185355067253113,
-0.11058938503265381,
0.0014139264822006226,
0.18935002386569977,
-0.013139903545379639,
-0.10992703586816788,
0.2763631343841553,
0.03121303766965866,
-0.09144922345876694,
-0.07989928871393204,
-0.17791587114334106,
0.18577969074249268,
0.014722229912877083,
-0.5984680652618408,
0.1299257129430771,
0.17858238518238068,
-0.020512081682682037,
-0.4398479461669922,
0.10269580036401749,
-0.01673303171992302,
0.1114705353975296,
-0.14004355669021606,
-0.12656614184379578,
-0.13934747874736786,
0.23942990601062775,
-0.09332359582185745,
-0.1484205722808838,
-0.3118121325969696,
0.26215440034866333,
-0.7009746432304382,
-0.12266135215759277,
0.2959664463996887,
0.1720224916934967,
-0.29408955574035645,
-0.11343079805374146,
0.15451544523239136,
-0.316899836063385,
-0.1760093718767166,
-0.012772858142852783,
0.34482014179229736,
-0.20116497576236725,
0.2677871584892273,
-0.2896537482738495,
-0.14231128990650177,
-0.12918563187122345,
0.20440417528152466,
-0.016366928815841675,
0.08512701839208603,
0.37981030344963074,
0.29462939500808716,
-0.23747850954532623,
-0.1635686159133911,
-0.10471148788928986,
0.3809175193309784,
-0.6581723093986511,
-0.020637206733226776,
-0.2253962904214859,
0.23213563859462738,
-0.20215247571468353,
-0.051259126514196396,
0.16306793689727783,
0.13790275156497955,
-0.1992558389902115,
-0.36865267157554626,
-0.25763627886772156,
0.08164945244789124,
-0.13883644342422485,
0.29845649003982544,
0.014808159321546555,
-0.01867368072271347,
-0.06606239825487137,
0.3918915092945099,
-0.193121537566185,
0.1063564196228981,
0.1246238574385643,
0.0795765072107315,
0.23745468258857727,
-0.06615425646305084,
0.0876239761710167,
0.01458488404750824,
-0.10665236413478851,
0.1550516039133072,
0.009348638355731964,
-0.08278072625398636,
-0.1587759405374527,
0.1765487939119339,
-0.050345003604888916,
-0.13542553782463074,
-0.20590347051620483,
-0.06481367349624634,
-0.19469347596168518,
-0.32181769609451294,
0.16011318564414978,
-0.0273288507014513,
-0.030357718467712402,
0.18540988862514496,
0.7182660698890686,
-0.10309337824583054,
-0.42051565647125244,
-0.01196439191699028,
-0.06363148987293243,
0.026897810399532318,
-0.06731556355953217,
0.4304828345775604,
0.20954805612564087,
0.019252486526966095,
0.25268298387527466,
0.19203367829322815,
0.7552144527435303,
0.10992074012756348,
0.17164330184459686,
-0.10741384327411652,
0.04142216220498085,
-0.2953939437866211,
0.417913019657135,
0.4606068730354309,
0.09869317710399628,
-0.2245425432920456,
0.11269396543502808,
0.13319332897663116,
-0.08236570656299591,
-0.13317438960075378,
0.14821574091911316,
0.1741001456975937,
0.09780482947826385,
0.4194481074810028,
0.0024921633303165436,
0.07391421496868134,
0.12269806861877441,
0.19281840324401855,
0.1762756109237671,
-0.5144243240356445,
0.05703356862068176,
0.025176377967000008,
0.042082611471414566,
-0.059245605021715164,
0.3491409420967102,
0.04301995784044266,
0.227606862783432,
0.09503600001335144,
-0.2658492624759674,
0.814341127872467,
0.25588589906692505,
-0.0820935070514679,
-0.03512490540742874,
-0.6022727489471436,
-0.39120009541511536,
0.025256916880607605,
0.024647444486618042,
0.0784955695271492,
0.13911032676696777,
0.533101499080658,
0.03954623267054558,
0.1201399564743042,
0.12814845144748688,
0.06129654496908188,
0.02980477549135685,
-0.10450403392314911,
-0.12214608490467072,
-0.2487572729587555,
-0.23188330233097076,
-0.09543249011039734,
-0.020052973181009293,
-0.06293834745883942,
0.49282705783843994,
0.1112302914261818,
0.025212906301021576,
-0.06928599625825882,
0.2946869730949402,
0.06326080113649368,
0.3500076234340668,
-0.31029438972473145,
-0.1005856916308403,
0.07041041553020477,
0.06529784202575684,
-0.10343071818351746,
0.12297502905130386,
0.226392924785614,
0.2289041131734848,
-0.16772285103797913,
0.11747565865516663,
-0.06629408895969391,
-0.024758290499448776,
-0.22619770467281342,
0.14497622847557068,
-0.2199365496635437,
0.00847882404923439,
0.3311633765697479,
0.010225055739283562,
-0.07500912249088287,
0.13734722137451172,
0.3227645456790924,
-0.2827955484390259,
-0.17157962918281555,
0.2299012541770935,
0.043035149574279785,
-0.45745450258255005,
0.05268172174692154,
-0.138444185256958,
-0.21813812851905823,
-0.21864283084869385,
0.3440483510494232,
-0.4133237898349762,
-0.015989189967513084,
-0.14276045560836792,
-0.0030458755791187286,
-0.09593351185321808,
0.48234570026397705,
0.12179630994796753,
0.35182058811187744,
-0.3743186295032501,
-0.015425607562065125,
-0.24471385776996613,
0.06277970969676971,
-0.27858588099479675,
0.020902039483189583,
0.10883109271526337,
0.5068506598472595,
-0.0445312038064003,
0.29239362478256226,
-0.0022924989461898804,
-0.12587566673755646,
-0.032627254724502563,
0.7475149631500244,
-0.28449711203575134,
0.17546793818473816,
-0.08328153192996979,
0.2093471884727478,
0.13690856099128723,
-0.36369308829307556,
0.28673574328422546,
-0.06781817972660065,
-0.09285518527030945,
0.04166727513074875,
-0.17645405232906342,
0.45249152183532715,
-0.1346193552017212,
0.2666850686073303,
-0.0014431402087211609,
0.05832883343100548,
-0.05636638030409813,
0.1590586155653,
-0.41268831491470337,
0.20983316004276276,
-0.29453861713409424,
0.1921064704656601,
0.3169804811477661,
0.32185882329940796,
-0.07997440546751022,
-0.06990629434585571,
-0.4767921566963196,
0.3254620432853699,
-0.1344994306564331,
0.16146671772003174,
-0.10132664442062378,
0.2052915245294571,
-0.17964547872543335,
0.32026806473731995,
-0.027420436963438988,
0.37953102588653564,
0.01415509358048439,
0.10538415610790253,
-0.33196115493774414,
-0.06461217254400253,
0.13654029369354248,
-0.5438193678855896,
-0.22407777607440948,
-0.2692710757255554,
0.20935574173927307,
0.42645731568336487,
0.17333084344863892,
-0.4191592037677765,
-0.23766660690307617,
0.18438048660755157,
-0.14320576190948486,
0.09956519305706024,
0.13319234549999237,
0.44709017872810364,
-0.20936721563339233,
-0.0554073303937912,
0.10367808490991592,
0.10070422291755676,
-0.05833534151315689,
-0.128179669380188,
-0.649921715259552
] |
https://github.com/huggingface/datasets/issues/5984
|
AutoSharding IterableDataset's when num_workers > 1
|
> For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example.
|
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
| 110
|
AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 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=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example.
|
[
-0.5463468432426453,
-0.06826039403676987,
-0.12397490441799164,
0.021309081465005875,
-0.28132373094558716,
-0.16402281820774078,
0.6526509523391724,
0.1736842691898346,
0.033735036849975586,
0.2698054015636444,
0.10144916921854019,
0.2158355414867401,
-0.35457417368888855,
-0.2576068937778473,
-0.10230541229248047,
-0.17066265642642975,
-0.15324273705482483,
0.0722336620092392,
-0.059822216629981995,
0.006189383566379547,
-0.058782026171684265,
0.15543386340141296,
-0.08126367628574371,
-0.3289682865142822,
-0.330137699842453,
0.0023369528353214264,
0.00795602984726429,
0.16113978624343872,
0.13842593133449554,
-0.3258052170276642,
0.1914689689874649,
0.41156288981437683,
0.5270887613296509,
0.3501277565956116,
-0.0001210794725921005,
-0.1155351847410202,
0.1573168784379959,
0.08083800226449966,
-0.21067878603935242,
0.21452616155147552,
0.01468147337436676,
-0.4315880537033081,
0.14145591855049133,
-0.36290085315704346,
0.123849056661129,
-0.2051713466644287,
0.2744232416152954,
-0.17377260327339172,
0.22299033403396606,
-0.09839845448732376,
0.007351703941822052,
0.254692018032074,
-0.17847566306591034,
0.19898688793182373,
0.09166499972343445,
0.02523418515920639,
-0.0720205008983612,
0.1751052290201187,
0.44491738080978394,
0.003983819857239723,
-0.5654521584510803,
0.20857544243335724,
-0.07896914333105087,
0.3174324631690979,
0.2347022294998169,
-0.05799014866352081,
-0.4770258069038391,
-0.5079455375671387,
-0.244558185338974,
0.25321877002716064,
-0.06487097591161728,
-0.32882004976272583,
-0.1826631873846054,
-0.6428318023681641,
-0.15264511108398438,
-0.2437756061553955,
0.0565267875790596,
0.04253901541233063,
-0.18954616785049438,
-0.15925154089927673,
0.08684524148702621,
0.11491602659225464,
-0.19385075569152832,
0.16496646404266357,
0.34423285722732544,
0.28468266129493713,
-0.05977461487054825,
0.1166272759437561,
0.5844647288322449,
-0.023905549198389053,
0.30050012469291687,
0.06815174221992493,
0.2669333517551422,
0.2993042469024658,
-0.40369856357574463,
-0.14346198737621307,
-0.09739916771650314,
-0.152347594499588,
0.18965327739715576,
0.28919434547424316,
0.1482836753129959,
0.12459298968315125,
0.2244565486907959,
0.21031227707862854,
0.1546800434589386,
-0.16566818952560425,
-0.03518986701965332,
0.046989694237709045,
0.04921313375234604,
0.015507940202951431,
-0.03878088295459747,
0.06123894825577736,
-0.09180489182472229,
-0.7091234922409058,
0.41587910056114197,
0.19199299812316895,
0.020469199866056442,
0.11969731748104095,
-0.012047899886965752,
-0.19995717704296112,
0.09272784739732742,
-0.2936161160469055,
0.18093325197696686,
0.1533447802066803,
0.02594122290611267,
0.04960112273693085,
-0.27593082189559937,
0.18529237806797028,
-0.3713974952697754,
-0.32379451394081116,
0.06179558113217354,
-0.02745615690946579,
-0.02242283523082733,
0.38407644629478455,
0.3766690790653229,
-0.02080611139535904,
0.023818273097276688,
-0.008494901470839977,
0.39768290519714355,
0.05479191243648529,
0.31380873918533325,
-0.2706076204776764,
0.11693811416625977,
0.0808069258928299,
0.008974827826023102,
-0.025655310600996017,
-0.07339203357696533,
0.1584375649690628,
-0.20372769236564636,
0.1680360585451126,
-0.08802048116922379,
-0.43897926807403564,
-0.02103183977305889,
0.011121757328510284,
-0.14037522673606873,
0.05544813349843025,
-0.4604123532772064,
0.0372871533036232,
0.532794713973999,
-0.1516205221414566,
0.07489608973264694,
-0.20868071913719177,
-0.1513526886701584,
-0.09760535508394241,
0.14759346842765808,
0.5937554836273193,
0.17909324169158936,
-0.035461314022541046,
-0.18179190158843994,
-0.0987384021282196,
0.3105149269104004,
0.23858262598514557,
-0.1456364393234253,
0.11118990927934647,
-0.15984928607940674,
0.5455825328826904,
0.20070888102054596,
0.12188242375850677,
-0.39950406551361084,
0.44508370757102966,
-0.11796198785305023,
0.07163780182600021,
0.4335871934890747,
0.2944650650024414,
0.49293220043182373,
-0.15474309027194977,
-0.0629824697971344,
0.23778828978538513,
-0.08617735654115677,
0.03769652545452118,
-0.347682386636734,
-0.05652317404747009,
-0.0764167383313179,
0.4437199532985687,
0.26460185647010803,
0.06528689712285995,
0.04894840344786644,
-0.3651128113269806,
0.4801104962825775,
-0.03482415899634361,
0.24123303592205048,
0.02836322784423828,
-0.09505526721477509,
-0.05814680457115173,
0.33835259079933167,
-0.27447032928466797,
-0.42659977078437805,
0.2591540813446045,
-0.08348123729228973,
-0.1573111116886139,
-0.2982308864593506,
-0.07496535778045654,
0.30173322558403015,
-0.10477188229560852,
-0.3645034730434418,
0.1255248486995697,
-0.11114140599966049,
0.05301076918840408,
0.06389822065830231,
-0.4366277754306793,
-0.3225753605365753,
0.11286432296037674,
-0.5817338824272156,
-0.023565931245684624,
-0.47476455569267273,
0.15406011044979095,
0.24637116491794586,
-0.19224068522453308,
-0.0660070925951004,
0.0565471388399601,
-0.01901271939277649,
-0.3602103590965271,
0.11762810498476028,
0.11044219881296158,
0.07841473072767258,
0.27564889192581177,
-0.0419507771730423,
0.41146838665008545,
0.1609705090522766,
-0.022229276597499847,
0.014239557087421417,
0.0387272872030735,
-0.10305304825305939,
-0.13201174139976501,
0.09900149703025818,
0.43636244535446167,
-0.41064050793647766,
0.3182920217514038,
-0.09216909110546112,
-0.14361631870269775,
0.24557334184646606,
0.027740593999624252,
-0.2207670509815216,
0.14761222898960114,
0.15363603830337524,
-0.05127403512597084,
0.22453977167606354,
0.0727924332022667,
-0.2239171415567398,
0.25428828597068787,
0.02193405106663704,
-0.0853157490491867,
-0.04324769228696823,
0.0466039776802063,
-0.007946357131004333,
0.10241275280714035,
0.31605637073516846,
0.32210952043533325,
0.23980212211608887,
0.1205703467130661,
0.09884007275104523,
-0.25891226530075073,
0.19793444871902466,
-0.12676884233951569,
-0.02437899261713028,
0.11734098196029663,
0.20010429620742798,
0.22852763533592224,
-0.12304947525262833,
0.019187230616807938,
-0.3071018159389496,
-0.5647091269493103,
0.007842641323804855,
0.21569456160068512,
-0.14063198864459991,
0.10578625649213791,
0.106099933385849,
0.2638452351093292,
-0.21458710730075836,
0.04834144189953804,
-0.0739755928516388,
-0.08748292177915573,
-0.06730896234512329,
0.5774237513542175,
-0.07805071771144867,
0.15951810777187347,
0.07077205181121826,
0.29096519947052,
-0.031267568469047546,
-0.16351944208145142,
-0.18428698182106018,
0.02851308137178421,
0.20198774337768555,
-0.07035265862941742,
0.2803032398223877,
-0.14581327140331268,
0.22641465067863464,
0.07788499444723129,
-0.10519847273826599,
-0.3153153955936432,
0.22172346711158752,
-0.02666754275560379,
0.02498236484825611,
-0.2212940901517868,
-0.02930174022912979,
0.07142877578735352,
0.030146069824695587,
-0.40015071630477905,
-0.09892851114273071,
-0.050040505826473236,
0.08054935187101364,
0.19082880020141602,
-0.0538291335105896,
-0.10059219598770142,
0.17138276994228363,
-0.09780267626047134,
-0.40885335206985474,
-0.27757757902145386,
0.2468145191669464,
0.2534746527671814,
0.40962594747543335,
-0.11349446326494217,
0.2097918838262558,
-0.09248881787061691,
0.1289467066526413,
-0.18577054142951965,
0.13826730847358704,
-0.5670220255851746,
0.48345112800598145,
-0.18528884649276733,
-0.09963837265968323,
-0.23237314820289612,
-0.19044430553913116,
-0.013819482177495956,
0.38983476161956787,
-0.19890879094600677,
0.09643130004405975,
-0.24592794477939606,
0.41531771421432495,
-0.056834153831005096,
-0.03936266899108887,
0.49396634101867676,
0.27737829089164734,
0.12214477360248566,
0.09221381694078445,
0.29784080386161804,
0.1640269160270691,
-0.358074814081192,
-0.10309403389692307,
0.17321592569351196,
0.28600379824638367,
0.1686142086982727,
1.3290495872497559,
0.1526903510093689,
-0.1947876363992691,
0.23802927136421204,
-0.1436675786972046,
-0.39163246750831604,
0.10147880762815475,
-0.47466298937797546,
0.2193964719772339,
-0.2606053948402405,
-0.000014614313840866089,
0.1768931895494461,
-0.23095715045928955,
-0.2130342572927475,
0.08561524748802185,
-0.18430553376674652,
-0.07165496051311493,
-0.326508492231369,
0.36569398641586304,
-0.145288348197937,
0.35772505402565,
-0.23460878431797028,
-0.03525620698928833,
-0.28433480858802795,
-0.20787233114242554,
-0.10817579925060272,
0.16993483901023865,
0.4550325572490692,
-0.12597574293613434,
-0.03195112198591232,
0.3050098419189453,
-0.5213817358016968,
0.20983830094337463,
0.09898355603218079,
0.09723671525716782,
0.3131837248802185,
-0.32662516832351685,
0.14711855351924896,
-0.09120778739452362,
0.480817973613739,
0.26604163646698,
-0.014986634254455566,
-0.1309007853269577,
-0.22400705516338348,
-0.0018036793917417526,
0.01790425553917885,
0.025117848068475723,
0.5383632183074951,
0.061879631131887436,
0.21578538417816162,
-0.32666122913360596,
-0.16268964111804962,
0.21361657977104187,
0.010919294320046902,
-0.2070908397436142,
-0.32468855381011963,
-0.21138836443424225,
0.10186784714460373,
-0.3173512816429138,
0.3129957616329193,
0.08862919360399246,
0.11147768795490265,
-0.1924423724412918,
-0.07879726588726044,
-0.17651213705539703,
-0.2689898610115051,
0.20104452967643738,
0.2000918686389923,
-0.013050610199570656,
-0.1633552759885788,
0.29456377029418945,
0.16485098004341125,
-0.01852954924106598,
0.21727345883846283,
0.2197187840938568,
-0.1792547106742859,
-0.3395708501338959,
0.1486281454563141,
0.03745003044605255,
0.33610400557518005,
0.1425529420375824,
-0.09088315814733505,
0.08243608474731445,
0.23547637462615967,
0.3494150638580322,
-0.3289734721183777,
0.0018500438891351223,
0.07660957425832748,
-0.00039019621908664703,
-0.3192756772041321,
-0.3622780442237854,
0.5543584823608398,
-0.10579919815063477,
0.08742137253284454,
0.42998892068862915,
-0.12299191951751709,
-0.0040565477684140205,
0.24581216275691986,
0.22066396474838257,
0.9750773906707764,
-0.32784074544906616,
-0.04130132868885994,
0.010996298864483833,
0.5447685718536377,
0.18787172436714172,
-0.4275885820388794,
0.24729880690574646,
-0.2492072582244873,
-0.2660065293312073,
0.024631446227431297,
-0.03448270633816719,
0.056544229388237,
0.4636046290397644,
0.023696769028902054,
0.001059630187228322,
0.0690767765045166,
-0.1820131242275238,
-0.15741518139839172,
0.4702141284942627,
-0.3316323757171631,
-0.46670612692832947,
0.15130481123924255,
-0.049655403941869736,
0.007715053856372833,
0.1924847513437271,
-0.022041570395231247,
-0.08723793923854828,
0.44176605343818665,
0.0353824719786644,
-0.0905345231294632,
0.03007296472787857,
-0.12459339946508408,
0.2907504439353943,
0.11508862674236298,
-0.43543845415115356,
0.027066301554441452,
0.11675609648227692,
-0.035635970532894135,
-0.4128071367740631,
0.0984744131565094,
-0.03561027720570564,
0.11801181733608246,
-0.1728135645389557,
-0.17308372259140015,
-0.1450064778327942,
0.17831021547317505,
-0.1404094398021698,
-0.11829523742198944,
-0.2677994966506958,
0.27580979466438293,
-0.6885519623756409,
-0.12054379284381866,
0.34263211488723755,
0.22738081216812134,
-0.2169412225484848,
-0.0018734470941126347,
0.27195701003074646,
-0.43960270285606384,
-0.20219142735004425,
0.008709685876965523,
0.39860808849334717,
-0.2949140965938568,
0.3247998058795929,
-0.24482686817646027,
-0.09095223993062973,
-0.05051727220416069,
0.2869265377521515,
0.06055726110935211,
0.11799821257591248,
0.4663209617137909,
0.22427566349506378,
-0.24876804649829865,
-0.20688310265541077,
-0.12086133658885956,
0.3211349546909332,
-0.6146174669265747,
0.0827578753232956,
-0.10912478715181351,
0.17181862890720367,
-0.08193741738796234,
-0.04675770923495293,
0.09143403172492981,
-0.02043784409761429,
-0.14110861718654633,
-0.3658621907234192,
-0.38811609148979187,
0.023769240826368332,
-0.10513772070407867,
0.256070077419281,
-0.00036000460386276245,
-0.043742354959249496,
-0.08463587611913681,
0.3951651453971863,
-0.2112356722354889,
0.0725690945982933,
-0.0211678147315979,
0.06506992876529694,
0.23846711218357086,
-0.0722297728061676,
0.06632738560438156,
0.07482342422008514,
-0.03392297774553299,
0.2040320187807083,
0.030399613082408905,
-0.11503782123327255,
-0.1244206577539444,
0.1688801348209381,
-0.1017925962805748,
-0.08943210542201996,
-0.19014790654182434,
-0.053240031003952026,
-0.1868770718574524,
-0.32414713501930237,
0.14158883690834045,
-0.04576997086405754,
-0.12464866042137146,
0.0683128610253334,
0.6472152471542358,
-0.08102511614561081,
-0.3296334147453308,
0.0589350089430809,
-0.06131812930107117,
-0.07533261179924011,
-0.049867670983076096,
0.450535386800766,
0.2647808790206909,
0.04178107529878616,
0.21650061011314392,
0.15647946298122406,
0.726249635219574,
-0.07318133115768433,
0.286935418844223,
-0.20541973412036896,
-0.09376026690006256,
-0.3123657703399658,
0.38298600912094116,
0.36614567041397095,
0.08854061365127563,
-0.15359105169773102,
0.13077259063720703,
0.15417739748954773,
-0.17733831703662872,
-0.1577220857143402,
0.07363004982471466,
0.1714126616716385,
0.10684467852115631,
0.3512135446071625,
-0.09610728919506073,
-0.013402886688709259,
0.19818994402885437,
0.15724599361419678,
0.13064809143543243,
-0.5131985545158386,
-0.031393975019454956,
-0.07384054362773895,
0.07891874015331268,
-0.17257441580295563,
0.3698083460330963,
0.028786541894078255,
0.19585341215133667,
0.14043934643268585,
-0.2903199791908264,
0.8596498370170593,
0.14117035269737244,
-0.011807229369878769,
0.0050492063164711,
-0.6363873481750488,
-0.2854553759098053,
0.00036926567554473877,
0.042343538254499435,
0.09210672229528427,
0.11363689601421356,
0.542110025882721,
0.07418469339609146,
0.11144603788852692,
-0.031337346881628036,
0.16696488857269287,
-0.023151379078626633,
-0.13235272467136383,
0.05500812828540802,
-0.23880532383918762,
-0.1965174525976181,
-0.06831659376621246,
0.05995815992355347,
-0.11442922055721283,
0.4200925827026367,
0.20935310423374176,
-0.008104883134365082,
-0.13469241559505463,
0.2617281675338745,
0.16414061188697815,
0.35649374127388,
-0.30559903383255005,
-0.08151822537183762,
0.06817157566547394,
0.016505412757396698,
-0.1705997735261917,
0.1472136676311493,
0.22441847622394562,
0.3373045325279236,
-0.19384410977363586,
0.2342343032360077,
-0.18269412219524384,
0.05544709414243698,
-0.26925206184387207,
0.16867804527282715,
-0.2512523829936981,
0.08452745527029037,
0.29791611433029175,
-0.02322709932923317,
-0.07935154438018799,
-0.019740644842386246,
0.29626476764678955,
-0.2672131657600403,
-0.14726290106773376,
0.2805646061897278,
0.018330972641706467,
-0.42583876848220825,
-0.062404438853263855,
-0.02459881454706192,
-0.20412185788154602,
-0.20330575108528137,
0.3326115608215332,
-0.4782055914402008,
-0.004697743803262711,
-0.1849629282951355,
0.012803178280591965,
-0.24874189496040344,
0.4970054626464844,
0.09278301894664764,
0.3237658441066742,
-0.3540903329849243,
0.004110358655452728,
-0.2777792811393738,
0.020223461091518402,
-0.2980720102787018,
0.10301786661148071,
0.09873765707015991,
0.5605310797691345,
-0.12659111618995667,
0.2135266661643982,
-0.03133736550807953,
-0.11544066667556763,
-0.00420532189309597,
0.6807506084442139,
-0.2538987100124359,
0.15419675409793854,
-0.17944133281707764,
0.06297025084495544,
0.14343132078647614,
-0.4191538691520691,
0.23399348556995392,
-0.16846778988838196,
-0.05998912453651428,
0.05668533220887184,
-0.1764892339706421,
0.4249541461467743,
-0.07532408833503723,
0.3682159185409546,
0.00845304410904646,
0.14053550362586975,
-0.06703654676675797,
0.22257812321186066,
-0.3369857966899872,
0.128575399518013,
-0.22244130074977875,
0.08294230699539185,
0.35928282141685486,
0.18641440570354462,
-0.04604305326938629,
-0.01713503524661064,
-0.5203303098678589,
0.24370652437210083,
-0.0831097662448883,
0.09026005119085312,
-0.09218080341815948,
0.027205592021346092,
-0.14473940432071686,
0.4602433145046234,
-0.12429898977279663,
0.33347100019454956,
0.026558049023151398,
0.07309132814407349,
-0.3506818413734436,
-0.0931129977107048,
0.18301747739315033,
-0.5421229004859924,
-0.1654726266860962,
-0.3479841351509094,
0.2708057761192322,
0.30633002519607544,
0.14489206671714783,
-0.3397098481655121,
-0.21034687757492065,
0.22623834013938904,
-0.20712608098983765,
0.09986868500709534,
0.23699365556240082,
0.41248130798339844,
-0.19364775717258453,
-0.0504901185631752,
0.06897150725126266,
0.12735319137573242,
-0.01837872341275215,
-0.08178162574768066,
-0.5831461548805237
] |
https://github.com/huggingface/datasets/issues/5982
|
404 on Datasets Documentation Page
|
This wasn’t working for me a bit earlier, but it looks to be back up now
|
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
| 16
|
404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
This wasn’t working for me a bit earlier, but it looks to be back up now
|
[
0.23589254915714264,
-0.0897054374217987,
-0.03821307420730591,
0.1904316544532776,
0.17235994338989258,
0.229668527841568,
0.03032407909631729,
0.17348486185073853,
-0.08624786883592606,
0.11428413540124893,
-0.048721104860305786,
-0.02713678404688835,
-0.05816887319087982,
0.07129853218793869,
0.3687548041343689,
-0.15776990354061127,
-0.02312932163476944,
-0.029988303780555725,
0.012601196765899658,
0.14752183854579926,
-0.07333602756261826,
0.18295340240001678,
-0.21797223389148712,
0.2744942307472229,
-0.36102187633514404,
0.06908697634935379,
-0.06880812346935272,
0.32399266958236694,
-0.20868660509586334,
-0.436674028635025,
0.42414629459381104,
-0.2273191511631012,
0.10371588915586472,
0.7997450828552246,
-0.0001105529663618654,
0.02161339670419693,
0.37306296825408936,
0.21096424758434296,
-0.4069686532020569,
-0.16199715435504913,
-0.3535909354686737,
0.18881547451019287,
-0.040781691670417786,
0.13149648904800415,
-0.1856015920639038,
-0.14043258130550385,
-0.022911572828888893,
-0.03522172570228577,
-0.020610347390174866,
0.4144951403141022,
0.252856969833374,
0.3604271113872528,
0.15251757204532623,
-0.13128699362277985,
0.20378588140010834,
0.4740332365036011,
-0.10356386750936508,
0.2360621690750122,
-0.055372342467308044,
-0.12769757211208344,
0.1326039731502533,
0.4411166310310364,
0.12740632891654968,
-0.24519120156764984,
0.21589702367782593,
0.16313184797763824,
0.02243531122803688,
-0.08774057030677795,
0.07737748324871063,
0.29353010654449463,
0.5185799598693848,
-0.18485236167907715,
-0.29725512862205505,
-0.3005119562149048,
-0.07516016811132431,
0.010841546580195427,
0.17687302827835083,
-0.03560823202133179,
0.13474473357200623,
0.2569270730018616,
-0.3658650517463684,
-0.4301221966743469,
-0.14840161800384521,
0.15944066643714905,
-0.06621965020895004,
-0.005789183080196381,
-0.155050128698349,
-0.1535830795764923,
-0.1940489560365677,
-0.23668135702610016,
-0.12300875037908554,
0.09929352253675461,
-0.017991136759519577,
0.3363932967185974,
-0.008696254342794418,
-0.018829919397830963,
0.26304081082344055,
0.33533889055252075,
0.38785961270332336,
-0.12115141749382019,
-0.08122380077838898,
-0.17275279760360718,
-0.4035160541534424,
0.09354457259178162,
0.10483399033546448,
0.13066452741622925,
0.04381926357746124,
0.05453974008560181,
0.4211435914039612,
0.5263346433639526,
0.2881004214286804,
0.0017800815403461456,
0.2148781716823578,
-0.10271577537059784,
-0.2223900854587555,
-0.2597980201244354,
0.4777454733848572,
-0.2702706754207611,
-0.37015053629875183,
0.16726069152355194,
-0.11172250658273697,
-0.06857553869485855,
0.23354224860668182,
0.27720701694488525,
0.10587052255868912,
-0.10455109924077988,
0.15486407279968262,
-0.2446831911802292,
-0.22512561082839966,
-0.06683498620986938,
-0.2840093970298767,
-0.07424432039260864,
-0.1870025098323822,
0.2477908432483673,
0.03753991797566414,
-0.07007470726966858,
0.3641278147697449,
0.015149119310081005,
0.13090547919273376,
0.01366892084479332,
-0.20472359657287598,
0.3203528821468353,
0.1704375296831131,
0.16658087074756622,
0.0123542919754982,
0.12557275593280792,
-0.02018994465470314,
-0.26852864027023315,
0.04479966312646866,
-0.12125813215970993,
-0.4756712317466736,
-0.21830493211746216,
-0.05853322148323059,
0.18611164391040802,
0.036794379353523254,
0.05605483800172806,
0.052855752408504486,
0.03872402012348175,
-0.11644680052995682,
-0.06988038867712021,
0.1334235519170761,
0.29633837938308716,
-0.057062286883592606,
-0.08215247094631195,
0.3716960549354553,
0.4870901107788086,
0.20939698815345764,
-0.1886381208896637,
0.24451474845409393,
-0.06599622964859009,
-0.21862316131591797,
0.2803041338920593,
-0.11744780838489532,
0.2787688076496124,
-0.6120811700820923,
-0.06678495556116104,
0.04121028631925583,
-0.47803643345832825,
-0.23454418778419495,
-0.0414264053106308,
-0.3101933002471924,
0.062110647559165955,
-0.2179860770702362,
-0.2686786651611328,
-0.23113878071308136,
-0.013174876570701599,
0.3389805257320404,
0.08032464981079102,
0.005401797592639923,
-0.023825451731681824,
-0.33228200674057007,
-0.12048394978046417,
-0.05133359879255295,
-0.15408235788345337,
-0.018185492604970932,
-0.05262681096792221,
0.1298806071281433,
-0.09839263558387756,
0.31193259358406067,
-0.06597787141799927,
-0.03886565566062927,
0.6114988923072815,
0.366131991147995,
0.007724478840827942,
0.19344520568847656,
-0.21073248982429504,
-0.317895770072937,
-0.007054682821035385,
0.11716845631599426,
-0.05603537708520889,
0.18005716800689697,
-0.3373836278915405,
-0.45705175399780273,
-0.03439324349164963,
-0.23601140081882477,
-0.36700233817100525,
0.14197038114070892,
0.14200997352600098,
0.08650343120098114,
0.46587279438972473,
-0.2643246352672577,
0.24019643664360046,
-0.17219901084899902,
0.32767432928085327,
-0.4238031506538391,
0.31252726912498474,
0.030927201732993126,
-0.07272585481405258,
0.05008922517299652,
0.25127366185188293,
0.23265022039413452,
0.03014192171394825,
0.13831323385238647,
0.3939719796180725,
0.05406973883509636,
0.2676181495189667,
0.5152706503868103,
-0.0698239803314209,
0.2916313707828522,
-0.343715101480484,
-0.13332228362560272,
0.21180501580238342,
-0.04507917910814285,
0.19289326667785645,
-0.2522503137588501,
-0.04100850224494934,
-0.25112712383270264,
0.25201326608657837,
0.21789799630641937,
0.09621965885162354,
0.1759391874074936,
-0.1076400876045227,
-0.27727052569389343,
-0.36650457978248596,
0.23068198561668396,
-0.285795658826828,
0.14697489142417908,
-0.16094954311847687,
-0.3387962877750397,
0.07363535463809967,
0.13775917887687683,
0.01264026015996933,
0.04442805051803589,
0.2389327883720398,
-0.20602068305015564,
0.03328468278050423,
0.23164893686771393,
0.12729887664318085,
-0.019564270973205566,
0.17575688660144806,
0.20392577350139618,
0.19190408289432526,
0.016038380563259125,
-0.08984705805778503,
0.15527720749378204,
-0.11809495091438293,
-0.19039233028888702,
0.11305427551269531,
0.02422594092786312,
0.05110835283994675,
-0.3355223834514618,
-0.053357359021902084,
-0.3738155663013458,
-0.023145025596022606,
-0.5386224985122681,
-0.11404336988925934,
-0.34968820214271545,
-0.4803524911403656,
-0.20945334434509277,
-0.2580667734146118,
-0.46764543652534485,
-0.20268554985523224,
-0.050877027213573456,
-0.10490453243255615,
-0.10600060224533081,
-0.0839971974492073,
-0.12686197459697723,
0.14001406729221344,
0.011564025655388832,
0.16414771974086761,
-0.3962228298187256,
0.13612258434295654,
-0.30020126700401306,
0.03869752213358879,
-0.08296816796064377,
-0.0201669093221426,
0.26963067054748535,
-0.4076397120952606,
0.014774570241570473,
-0.6578965783119202,
-0.6409285068511963,
0.17581424117088318,
0.1531447470188141,
0.2668730616569519,
0.28635627031326294,
0.1569179892539978,
0.041930221021175385,
-0.04001222178339958,
0.20152629911899567,
-0.012740247882902622,
-0.1762022078037262,
-0.20889167487621307,
0.12303321808576584,
0.0730636790394783,
-0.1459185630083084,
-0.12177637964487076,
0.11941683292388916,
-0.1413615643978119,
0.08895403891801834,
-0.15309858322143555,
-0.09612073004245758,
0.07085084915161133,
-0.04559043049812317,
0.4365537464618683,
-0.36478206515312195,
-0.08035760372877121,
-0.20024922490119934,
-0.6014854311943054,
0.18455174565315247,
-0.2811174690723419,
-0.23756711184978485,
0.1963064968585968,
0.11954759061336517,
0.1987704634666443,
-0.024824179708957672,
-0.48359358310699463,
0.022324036806821823,
-0.15562613308429718,
0.09715275466442108,
0.17486277222633362,
0.18078140914440155,
0.20691291987895966,
0.131235733628273,
-0.07683591544628143,
0.01259736716747284,
-0.3872063159942627,
-0.28714507818222046,
-0.037470437586307526,
0.5342723727226257,
-0.032296374440193176,
0.16802340745925903,
0.20305906236171722,
0.2666133642196655,
0.30942803621292114,
0.2027069330215454,
0.4106009900569916,
0.027589160948991776,
0.7114124894142151,
-0.11942625790834427,
-0.30298978090286255,
0.011780036613345146,
0.11739444732666016,
-0.038190584629774094,
0.08100226521492004,
0.5543354749679565,
0.19726838171482086,
-0.24262578785419464,
-0.4284078776836395,
-0.20109823346138,
-0.2903527319431305,
-0.46868544816970825,
0.09713904559612274,
0.2340843379497528,
0.14641384780406952,
0.0636419728398323,
0.20545081794261932,
-0.035537634044885635,
0.2844792306423187,
0.6286877393722534,
0.2582840025424957,
0.12336204946041107,
-0.23688633739948273,
0.17526306211948395,
-0.580103874206543,
-0.017108097672462463,
-0.023666229099035263,
0.10280223190784454,
-0.14689019322395325,
-0.10029635578393936,
0.015328720211982727,
-0.015290528535842896,
0.4778980016708374,
-0.06823599338531494,
0.19020646810531616,
-0.18602073192596436,
-0.025864897295832634,
-0.2031574845314026,
0.1251140683889389,
0.18613380193710327,
0.2551979124546051,
0.20266929268836975,
0.6379334330558777,
-0.23148608207702637,
-0.1707177460193634,
0.22307708859443665,
-0.28488677740097046,
0.008656919002532959,
-0.0035884431563317776,
-0.2054036557674408,
-0.3391839861869812,
0.18706879019737244,
-0.03803952783346176,
-0.018333811312913895,
-0.11338445544242859,
0.1788184642791748,
-0.17940814793109894,
0.021024486050009727,
-0.13019275665283203,
-0.060851842164993286,
0.0270865298807621,
0.33282601833343506,
-0.16459928452968597,
0.1557816118001938,
0.6371235847473145,
0.32690542936325073,
0.47110745310783386,
0.1722477823495865,
-0.2896093428134918,
-0.45481979846954346,
-0.07869088649749756,
-0.026679743081331253,
0.42835089564323425,
0.44845205545425415,
-0.11288794130086899,
-0.06877831369638443,
0.2501293420791626,
0.11170348525047302,
-0.3570893704891205,
0.08168665319681168,
0.3385058641433716,
0.07782883942127228,
-0.24291718006134033,
0.010334189981222153,
0.24902531504631042,
0.1020854115486145,
-0.0627889335155487,
0.45066291093826294,
0.7809156179428101,
-0.48299506306648254,
-0.17854319512844086,
0.012751281261444092,
0.7987290620803833,
0.09032654762268066,
0.12308089435100555,
0.3206462860107422,
-0.4183877110481262,
0.32981932163238525,
0.10445055365562439,
0.08152420073747635,
-0.15730077028274536,
0.05232970044016838,
-0.04464155435562134,
-0.10112461447715759,
0.10000932216644287,
-0.2899777293205261,
-0.019900880753993988,
0.3092707693576813,
-0.15842501819133759,
0.26930809020996094,
0.18234968185424805,
0.2344382405281067,
0.02493663877248764,
0.08448465168476105,
-0.1760389506816864,
0.1936914473772049,
0.03841014206409454,
0.2502777874469757,
-0.1901092529296875,
-0.1322837769985199,
-0.1775061935186386,
-0.3729146122932434,
-0.13302527368068695,
-0.03557511046528816,
0.0997471734881401,
-0.1828991025686264,
0.16739755868911743,
-0.3912889361381531,
-0.0006631631404161453,
0.36601021885871887,
0.19402319192886353,
0.18551822006702423,
-0.6834620237350464,
0.2970138490200043,
-0.3603397011756897,
0.005854841787368059,
-0.1743634045124054,
-0.2012777179479599,
-0.015077570453286171,
0.0015598386526107788,
-0.18419431149959564,
-0.057819098234176636,
-0.009515570476651192,
-0.09188082814216614,
-0.3150827884674072,
0.07175184786319733,
-0.30984312295913696,
-0.25586599111557007,
0.17604058980941772,
0.022775165736675262,
0.23065105080604553,
-0.28756222128868103,
0.15772873163223267,
0.11841952800750732,
-0.0812087133526802,
-0.2491774559020996,
0.47263267636299133,
-0.01137588918209076,
-0.09542432427406311,
0.3498033881187439,
-0.34718766808509827,
0.10101249814033508,
0.11546101421117783,
-0.00021475180983543396,
-0.28611916303634644,
-0.15853379666805267,
0.06429805606603622,
0.4268845021724701,
-0.07175977528095245,
0.10193529725074768,
-0.03871149197220802,
0.27879613637924194,
0.07918684929609299,
-0.16250258684158325,
-0.0006848014891147614,
-0.4412097930908203,
-0.20524120330810547,
-0.1895514577627182,
-0.05737242102622986,
0.3408595323562622,
-0.2651303708553314,
0.17395226657390594,
0.00642046332359314,
-0.08332529664039612,
0.11955469846725464,
-0.33571359515190125,
-0.31708765029907227,
0.18476402759552002,
-0.1669495701789856,
-0.05421090126037598,
0.14713317155838013,
-0.015330411493778229,
0.2402535229921341,
-0.21398423612117767,
0.09852152317762375,
-0.08630654215812683,
0.03260120004415512,
-0.16980299353599548,
-0.04289711266756058,
0.07028795778751373,
0.033053092658519745,
-0.09861046820878983,
0.13251163065433502,
0.030908484011888504,
-0.026928327977657318,
-0.16304033994674683,
0.06250157952308655,
0.23387247323989868,
0.1341472715139389,
-0.07950612157583237,
-0.0919947475194931,
-0.05022571235895157,
0.13026033341884613,
0.21892479062080383,
0.06349080055952072,
0.12317121028900146,
0.1281505674123764,
-0.06395157426595688,
-0.35607895255088806,
-0.012785829603672028,
0.34052032232284546,
0.14642572402954102,
0.04462501406669617,
0.09801574051380157,
0.34645888209342957,
-0.3235003352165222,
-0.1621858775615692,
0.19622686505317688,
0.3122427463531494,
0.09250737726688385,
-0.2614195942878723,
0.013639835640788078,
0.28127342462539673,
0.16435804963111877,
-0.03474711626768112,
-0.19010627269744873,
0.41746804118156433,
0.1507273018360138,
-0.07366842031478882,
-0.03768087178468704,
0.0027970150113105774,
-0.030256107449531555,
-0.01984281837940216,
0.14897248148918152,
0.5036076903343201,
0.06833209097385406,
0.09024222195148468,
0.04888506233692169,
-0.14829955995082855,
0.06535162776708603,
0.00782705657184124,
-0.03192325308918953,
0.05435778200626373,
0.20132647454738617,
0.00115145742893219,
0.05368727818131447,
-0.02012643590569496,
0.43883341550827026,
0.07455702126026154,
-0.19495713710784912,
-0.13505925238132477,
-0.2385443150997162,
-0.016546644270420074,
-0.025436140596866608,
-0.03549669682979584,
0.38526588678359985,
0.039211735129356384,
-0.04635889455676079,
-0.16046415269374847,
0.07691371440887451,
-0.1803857386112213,
0.07742339372634888,
0.08613114804029465,
-0.2748890221118927,
0.2592451870441437,
-0.0370209626853466,
0.02281377464532852,
-0.2824123501777649,
-0.08205749094486237,
-0.2657693028450012,
-0.058452293276786804,
-0.6629730463027954,
0.1529550403356552,
0.16208034753799438,
0.2382659614086151,
0.033530574291944504,
0.13093240559101105,
-0.040295034646987915,
-0.08155347406864166,
-0.04337495192885399,
0.34914496541023254,
0.28772175312042236,
0.1543758362531662,
0.15566666424274445,
-0.00470717903226614,
-0.0906069427728653,
-0.15116384625434875,
0.014166619628667831,
0.21421295404434204,
-0.12426084280014038,
-0.31060248613357544,
0.17915312945842743,
0.18916885554790497,
-0.16996167600154877,
-0.08610416948795319,
-0.15309184789657593,
0.42571526765823364,
-0.23964756727218628,
-0.15682518482208252,
-0.5501757860183716,
0.06262517720460892,
-0.1979713886976242,
-0.044024817645549774,
-0.2958122789859772,
0.12245675176382065,
0.4433967173099518,
-0.04443516582250595,
0.06000744551420212,
-0.11514205485582352,
0.06442302465438843,
0.14799949526786804,
0.3571911156177521,
0.4549407362937927,
0.20900097489356995,
0.06576649099588394,
-0.38973546028137207,
-0.5351763367652893,
0.07485982775688171,
-0.14718244969844818,
0.13996580243110657,
-0.007876459509134293,
0.009922076016664505,
-0.49464622139930725,
-0.17272301018238068,
0.5708697438240051,
-0.03785675764083862,
0.17313924431800842,
-0.06885407865047455,
-0.11621731519699097,
0.01446753740310669,
-0.07973599433898926,
-0.04724907875061035,
-0.017973948270082474,
0.01705886423587799,
0.32638460397720337,
0.018623653799295425,
-0.016488052904605865,
-0.002477632835507393,
0.40896257758140564,
-0.39176496863365173,
0.029491020366549492,
0.33492958545684814,
0.28249216079711914,
-0.07868777215480804,
-0.015584655106067657,
-0.2912624180316925,
-0.4010619521141052,
-0.1158451959490776,
-0.028255127370357513,
0.24629634618759155,
-0.03756285086274147,
0.020348291844129562,
-0.3037318289279938,
-0.5745707750320435,
-0.2735132873058319,
0.6165809035301208,
0.2743690609931946,
0.16564688086509705,
-0.11789358407258987,
0.1537449061870575,
-0.06248884275555611,
-0.1302751898765564,
0.17529378831386566,
0.03632378578186035,
-0.07412347197532654,
-0.024922383949160576,
0.03157733380794525,
-0.2592107951641083,
0.6405750513076782,
-0.26853761076927185,
0.19093278050422668,
-0.07530246675014496,
0.28764447569847107,
0.5616582036018372,
-0.36974263191223145,
-0.5462666749954224,
-0.20811393857002258,
0.2865467667579651,
0.32074174284935,
-0.253161758184433,
0.14213018119335175,
-0.17359864711761475,
0.08093319833278656,
0.07189919054508209,
0.4320235252380371,
0.28558748960494995,
-0.14543400704860687,
0.48679736256599426,
-0.029744626954197884
] |
https://github.com/huggingface/datasets/issues/5982
|
404 on Datasets Documentation Page
|
We had a minor issue updating the docs after the latest release. It should work now :).
|
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
| 17
|
404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
We had a minor issue updating the docs after the latest release. It should work now :).
|
[
0.17083492875099182,
-0.21462565660476685,
-0.02505417726933956,
0.2500724792480469,
0.152494877576828,
0.20869526267051697,
0.030402973294258118,
0.18846730887889862,
-0.06417588889598846,
0.19951122999191284,
-0.07982710003852844,
0.026617802679538727,
-0.0725262463092804,
0.1539389044046402,
0.28752434253692627,
-0.15732547640800476,
-0.005507774651050568,
-0.025754079222679138,
-0.045685626566410065,
0.15444621443748474,
-0.04824574664235115,
0.2265162318944931,
-0.21269086003303528,
0.2709042727947235,
-0.39380887150764465,
0.061470724642276764,
-0.12297260761260986,
0.32301875948905945,
-0.24686123430728912,
-0.3856655955314636,
0.3487170934677124,
-0.2341831922531128,
0.09790147095918655,
0.8085321187973022,
-0.00010863085481105372,
0.014598056674003601,
0.325660765171051,
0.17292135953903198,
-0.3276683986186981,
-0.175569549202919,
-0.2646692097187042,
0.17784176766872406,
-0.04830546677112579,
0.128953218460083,
-0.2175832986831665,
-0.14697472751140594,
-0.017465485259890556,
-0.050312627106904984,
0.0783693715929985,
0.40506404638290405,
0.27068760991096497,
0.373561829328537,
0.18000051379203796,
-0.1939009726047516,
0.16646984219551086,
0.4595189690589905,
-0.13528232276439667,
0.24556811153888702,
-0.09868539869785309,
-0.1146431490778923,
0.15986093878746033,
0.42340287566185,
0.1812421977519989,
-0.25498443841934204,
0.2631858289241791,
0.13649272918701172,
-0.018449313938617706,
-0.1283077597618103,
0.061615802347660065,
0.3086143136024475,
0.5172634124755859,
-0.13829779624938965,
-0.2982845604419708,
-0.2963026165962219,
-0.08211665600538254,
0.013097522780299187,
0.19598957896232605,
0.009781384840607643,
0.17493227124214172,
0.21686901152133942,
-0.4178925156593323,
-0.38955527544021606,
-0.17827077209949493,
0.14494842290878296,
0.017218247056007385,
-0.10622042417526245,
-0.16793543100357056,
-0.08384203165769577,
-0.130330428481102,
-0.27791720628738403,
-0.1760987788438797,
0.0956309363245964,
-0.007179431617259979,
0.3315158486366272,
-0.049569021910429,
-0.06756332516670227,
0.19156679511070251,
0.3185608386993408,
0.3769626319408417,
-0.1279493272304535,
-0.047824427485466,
-0.20935115218162537,
-0.3360865116119385,
0.13374824821949005,
0.0978790670633316,
0.12738613784313202,
0.07804834097623825,
-0.007045871578156948,
0.39414167404174805,
0.44509488344192505,
0.304715096950531,
-0.034218788146972656,
0.24054445326328278,
-0.07182230055332184,
-0.23962727189064026,
-0.27070194482803345,
0.39630192518234253,
-0.2730698585510254,
-0.3430832326412201,
0.07469455897808075,
-0.06450820714235306,
-0.03782866522669792,
0.22546736896038055,
0.3127290904521942,
0.08011837303638458,
-0.18296971917152405,
0.10564583539962769,
-0.22304610908031464,
-0.20374344289302826,
-0.09826324135065079,
-0.3051563501358032,
-0.060905616730451584,
-0.156297504901886,
0.22854873538017273,
0.055595461279153824,
-0.17924144864082336,
0.4017210304737091,
0.014287968166172504,
0.13947702944278717,
0.08163462579250336,
-0.19052112102508545,
0.30483362078666687,
0.12700149416923523,
0.17405134439468384,
0.04819856956601143,
0.05672227591276169,
-0.004582352936267853,
-0.2428109347820282,
0.04340825229883194,
-0.11979413777589798,
-0.4092506468296051,
-0.24403440952301025,
-0.08894619345664978,
0.19598929584026337,
0.015823591500520706,
0.06508131325244904,
0.023207373917102814,
0.07102082669734955,
-0.12424438446760178,
-0.11597241461277008,
0.09263520687818527,
0.26051807403564453,
-0.11454346776008606,
-0.09929735213518143,
0.3369387090206146,
0.4579518437385559,
0.1446247398853302,
-0.16653546690940857,
0.2241916060447693,
-0.09284800291061401,
-0.22507286071777344,
0.3126605153083801,
-0.06103988364338875,
0.20282526314258575,
-0.6137978434562683,
-0.026824746280908585,
0.031025104224681854,
-0.41405192017555237,
-0.2022695541381836,
-0.05096526816487312,
-0.2923239469528198,
0.023103145882487297,
-0.22899824380874634,
-0.25115224719047546,
-0.2025778591632843,
-0.03690100088715553,
0.2920535206794739,
0.08304300904273987,
-0.0017689801752567291,
-0.03972514346241951,
-0.30238664150238037,
-0.0958728939294815,
-0.010343354195356369,
-0.1308164894580841,
-0.07180877029895782,
-0.06096617132425308,
0.20911571383476257,
-0.1524309366941452,
0.19799920916557312,
-0.04587099328637123,
-0.04492490738630295,
0.615623950958252,
0.40920233726501465,
0.04558791592717171,
0.19244402647018433,
-0.18882086873054504,
-0.32259830832481384,
0.007278043776750565,
0.04249221831560135,
-0.08720161020755768,
0.16086572408676147,
-0.32943665981292725,
-0.4322134256362915,
-0.05034397915005684,
-0.20090480148792267,
-0.3372347950935364,
0.15477778017520905,
0.12335013598203659,
0.186662957072258,
0.4352382719516754,
-0.23590245842933655,
0.31435009837150574,
-0.12642526626586914,
0.2807331681251526,
-0.46755343675613403,
0.3496986925601959,
-0.026522694155573845,
-0.13791874051094055,
0.11521412432193756,
0.26147133111953735,
0.21989327669143677,
0.009455298073589802,
0.09856384247541428,
0.4353470504283905,
0.0022429851815104485,
0.20931333303451538,
0.5080897808074951,
-0.08200885355472565,
0.2897412180900574,
-0.3669907748699188,
-0.15041957795619965,
0.1827680766582489,
-0.06897721439599991,
0.19798696041107178,
-0.29381757974624634,
-0.04053586721420288,
-0.25536879897117615,
0.2118852734565735,
0.1580122858285904,
0.10715042799711227,
0.18303105235099792,
-0.05849987268447876,
-0.27614131569862366,
-0.32675790786743164,
0.24669665098190308,
-0.3296694755554199,
0.17124181985855103,
-0.12302780151367188,
-0.4194224774837494,
0.08702262490987778,
0.27293115854263306,
0.07362423837184906,
-0.0018591061234474182,
0.27827906608581543,
-0.17101609706878662,
0.0236046239733696,
0.24156305193901062,
0.05988040938973427,
0.048604272305965424,
0.1777142733335495,
0.16843731701374054,
0.1949864625930786,
0.05569615215063095,
-0.04600431025028229,
0.11827191710472107,
-0.12127012014389038,
-0.16546575725078583,
0.05470047518610954,
0.0466638058423996,
0.036664191633462906,
-0.35666772723197937,
-0.05544870346784592,
-0.3483198583126068,
-0.0000644586980342865,
-0.503751814365387,
-0.16808943450450897,
-0.3276216983795166,
-0.480301171541214,
-0.17042496800422668,
-0.2916581332683563,
-0.5376357436180115,
-0.16298437118530273,
0.006736503913998604,
-0.08918525278568268,
-0.13085602223873138,
-0.05434326082468033,
-0.014374235644936562,
0.22025445103645325,
0.03562618046998978,
0.1644127517938614,
-0.4420100152492523,
0.17592783272266388,
-0.2972375750541687,
0.056755196303129196,
-0.11769278347492218,
-0.013849752023816109,
0.30850446224212646,
-0.405699759721756,
0.0570378452539444,
-0.6185843348503113,
-0.6367940902709961,
0.17159974575042725,
0.054708294570446014,
0.2897636592388153,
0.27236366271972656,
0.20163032412528992,
-0.037368614226579666,
-0.04067666828632355,
0.20377996563911438,
-0.09579594433307648,
-0.22799715399742126,
-0.1795220673084259,
0.1540949046611786,
0.044390302151441574,
-0.19924235343933105,
-0.13926640152931213,
0.008323433808982372,
-0.1544979363679886,
0.18769988417625427,
-0.15880805253982544,
-0.10668554902076721,
0.05481825768947601,
-0.012163663282990456,
0.45856550335884094,
-0.36818286776542664,
-0.025669323280453682,
-0.19828373193740845,
-0.6351597309112549,
0.23090380430221558,
-0.3633301556110382,
-0.3235818147659302,
0.26800337433815,
0.16745971143245697,
0.1585736721754074,
-0.10148424655199051,
-0.4973874092102051,
-0.07642028480768204,
-0.1690143644809723,
0.09049488604068756,
0.16522216796875,
0.14738819003105164,
0.23422443866729736,
0.12678326666355133,
-0.07358744740486145,
-0.024022581055760384,
-0.41557222604751587,
-0.20350801944732666,
-0.06431657075881958,
0.5440760254859924,
-0.03562309220433235,
0.21796351671218872,
0.23907563090324402,
0.20885701477527618,
0.3520108461380005,
0.17837965488433838,
0.3505597412586212,
0.031236449256539345,
0.6998934149742126,
-0.19908982515335083,
-0.29051896929740906,
0.11616147309541702,
0.08921919763088226,
0.025606002658605576,
0.087682344019413,
0.5532734990119934,
0.20540083944797516,
-0.27454984188079834,
-0.4230624735355377,
-0.18003734946250916,
-0.2447405755519867,
-0.49639585614204407,
0.13986331224441528,
0.2023514211177826,
0.13377739489078522,
-0.007391113787889481,
0.19971351325511932,
-0.05916604399681091,
0.28508374094963074,
0.6326462626457214,
0.24958288669586182,
0.20506970584392548,
-0.20462441444396973,
0.16740819811820984,
-0.581271231174469,
0.04668965935707092,
-0.06209086626768112,
0.0806385800242424,
-0.1940930038690567,
-0.04377841204404831,
0.019110076129436493,
0.01312771812081337,
0.4793340563774109,
-0.028049396350979805,
0.14808249473571777,
-0.23054972290992737,
-0.09141263365745544,
-0.251036673784256,
0.15681858360767365,
0.1639048308134079,
0.18254731595516205,
0.22892138361930847,
0.6182610392570496,
-0.3066772520542145,
-0.18047060072422028,
0.20717182755470276,
-0.22606608271598816,
-0.01013578474521637,
-0.10765335708856583,
-0.19762423634529114,
-0.3147267997264862,
0.13238684833049774,
-0.06569776684045792,
0.001387113705277443,
-0.05586831644177437,
0.16036292910575867,
-0.1823377162218094,
0.022374354302883148,
-0.15195372700691223,
-0.03831368684768677,
0.032108549028635025,
0.3510653078556061,
-0.164692685008049,
0.18304593861103058,
0.6060042381286621,
0.348640114068985,
0.39502638578414917,
0.19764357805252075,
-0.23932552337646484,
-0.4837660789489746,
-0.07946482300758362,
-0.09974352270364761,
0.3963398039340973,
0.3116840422153473,
-0.15124072134494781,
-0.05709914118051529,
0.1917814463376999,
0.21410755813121796,
-0.28298601508140564,
0.1262732446193695,
0.3202808201313019,
0.053677886724472046,
-0.24826787412166595,
0.02362665720283985,
0.2397516965866089,
0.07987423241138458,
0.030931085348129272,
0.4518754780292511,
0.7317607402801514,
-0.38986268639564514,
-0.13839855790138245,
-0.05602208524942398,
0.8059660792350769,
0.05492521822452545,
0.09238652884960175,
0.29032018780708313,
-0.4160752296447754,
0.3491605520248413,
0.1557660847902298,
0.06278077512979507,
-0.16585686802864075,
-0.03226732462644577,
-0.03493305668234825,
-0.05374940112233162,
0.06374922394752502,
-0.2580200433731079,
-0.06851854920387268,
0.3196520507335663,
-0.09435125440359116,
0.251393586397171,
0.12244029343128204,
0.2636532783508301,
0.014228811487555504,
0.03201662749052048,
-0.18303312361240387,
0.1987249106168747,
0.01010928675532341,
0.21589840948581696,
-0.10790364444255829,
-0.1875605285167694,
-0.12921670079231262,
-0.34425073862075806,
-0.08894532173871994,
-0.0393969789147377,
0.0876762792468071,
-0.19257311522960663,
0.2130989283323288,
-0.3731386661529541,
0.047594185918569565,
0.3951851427555084,
0.19591361284255981,
0.20265331864356995,
-0.6617406606674194,
0.23481333255767822,
-0.3443647623062134,
-0.08563001453876495,
-0.19844543933868408,
-0.1381453424692154,
-0.03310997784137726,
-0.05427391082048416,
-0.18698860704898834,
-0.04953271895647049,
-0.0077185481786727905,
-0.0800369381904602,
-0.24944880604743958,
0.04162486270070076,
-0.3566972017288208,
-0.21107900142669678,
0.14232969284057617,
-0.0429534912109375,
0.20663002133369446,
-0.26026982069015503,
0.180439755320549,
0.1333661675453186,
-0.10231712460517883,
-0.21268880367279053,
0.4541756510734558,
-0.0538046695291996,
-0.12459003925323486,
0.3473363518714905,
-0.43828949332237244,
0.08266244828701019,
0.13620051741600037,
0.04397865757346153,
-0.29654163122177124,
-0.13695187866687775,
0.05335555970668793,
0.4148108661174774,
-0.15562859177589417,
0.10687786340713501,
-0.0241971705108881,
0.3134647011756897,
0.05792437493801117,
-0.08630868792533875,
0.03903915360569954,
-0.4620785117149353,
-0.1412002146244049,
-0.21134905517101288,
-0.14518438279628754,
0.2969249486923218,
-0.25488534569740295,
0.16761718690395355,
0.017047692090272903,
-0.0614059679210186,
0.1497247964143753,
-0.28938791155815125,
-0.34577107429504395,
0.1639803797006607,
-0.19077031314373016,
-0.052331604063510895,
0.18912507593631744,
-0.040237411856651306,
0.2553178071975708,
-0.19665691256523132,
0.11173535883426666,
-0.01910339668393135,
-0.01737195812165737,
-0.17409932613372803,
-0.03411312401294708,
0.07477650046348572,
0.03156903758645058,
-0.09913653880357742,
0.09368207305669785,
-0.01594334840774536,
-0.08550241589546204,
-0.11500509083271027,
0.06788130104541779,
0.2369709312915802,
0.09759592264890671,
-0.08889324218034744,
-0.14502279460430145,
-0.05121282488107681,
0.13791799545288086,
0.18415023386478424,
0.1455366611480713,
0.11635170876979828,
0.09876495599746704,
-0.07972943037748337,
-0.35337573289871216,
-0.04050157591700554,
0.34867942333221436,
0.08379638195037842,
0.03933626413345337,
0.07920655608177185,
0.35008206963539124,
-0.30828750133514404,
-0.10201923549175262,
0.1509055197238922,
0.35723456740379333,
0.037503890693187714,
-0.26942697167396545,
0.06879743933677673,
0.3300487697124481,
0.16831888258457184,
-0.0811484158039093,
-0.12466185539960861,
0.3970915675163269,
0.2382323443889618,
-0.05314251780509949,
-0.025387100875377655,
0.03200962767004967,
0.022951096296310425,
-0.026074931025505066,
0.20077833533287048,
0.5306114554405212,
0.030742188915610313,
0.04406662657856941,
0.051620833575725555,
-0.14169783890247345,
0.05677815526723862,
0.0838349461555481,
0.045875102281570435,
0.02749110758304596,
0.21892832219600677,
-0.061774320900440216,
0.06030172109603882,
-0.07141765207052231,
0.40959644317626953,
0.11471862345933914,
-0.19380615651607513,
-0.09794332087039948,
-0.17540812492370605,
0.006286494433879852,
-0.056632764637470245,
-0.052719056606292725,
0.42927420139312744,
-0.03795122355222702,
-0.10574093461036682,
-0.19132009148597717,
0.09201286733150482,
-0.15557271242141724,
0.08700565993785858,
0.08141641318798065,
-0.235629141330719,
0.20085638761520386,
-0.014958374202251434,
0.06961370259523392,
-0.26130175590515137,
-0.007211014628410339,
-0.24516253173351288,
-0.02358977496623993,
-0.617376983165741,
0.11534475535154343,
0.18352758884429932,
0.21830639243125916,
0.026281502097845078,
0.1508031040430069,
0.0016557350754737854,
-0.07308860123157501,
0.007761441171169281,
0.3319757282733917,
0.32330629229545593,
0.12362536787986755,
0.17914028465747833,
0.06004628166556358,
-0.07843409478664398,
-0.18747344613075256,
0.03763141483068466,
0.2624311149120331,
-0.08954477310180664,
-0.29104921221733093,
0.24138231575489044,
0.1865188330411911,
-0.18395082652568817,
-0.014997579157352448,
-0.19232667982578278,
0.518912136554718,
-0.2516397535800934,
-0.1494225561618805,
-0.5544776916503906,
0.07618065923452377,
-0.22716078162193298,
-0.07534957677125931,
-0.3417670726776123,
0.14122360944747925,
0.41996002197265625,
-0.026833869516849518,
0.016317497938871384,
-0.16051538288593292,
0.07368258386850357,
0.14098584651947021,
0.3732883036136627,
0.47125282883644104,
0.23410239815711975,
0.060117367655038834,
-0.3857864737510681,
-0.5060359835624695,
0.06352788209915161,
-0.11261677742004395,
0.20417222380638123,
-0.031008604913949966,
0.02475164271891117,
-0.5017666816711426,
-0.15102487802505493,
0.6063295006752014,
-0.012999285012483597,
0.1620899885892868,
-0.06189902871847153,
-0.1343579739332199,
0.013689672574400902,
-0.12402693927288055,
-0.03967501223087311,
0.057319268584251404,
0.10339253395795822,
0.32403212785720825,
0.013417360372841358,
0.0056779645383358,
0.021443352103233337,
0.39358603954315186,
-0.4024098217487335,
0.01505594328045845,
0.2810049057006836,
0.2790301740169525,
-0.06793287396430969,
-0.027276037260890007,
-0.22724997997283936,
-0.3012128174304962,
-0.11742880940437317,
-0.07175514847040176,
0.1952490210533142,
-0.0053029730916023254,
0.08909396082162857,
-0.3084309995174408,
-0.567932665348053,
-0.2874445617198944,
0.6011558771133423,
0.24802596867084503,
0.15851953625679016,
-0.1053021177649498,
0.17762070894241333,
-0.02113831788301468,
-0.1353914439678192,
0.20413754880428314,
0.030484111979603767,
-0.07336615025997162,
-0.06419914960861206,
0.01983948051929474,
-0.23512418568134308,
0.68965083360672,
-0.2782968282699585,
0.155634343624115,
-0.08358994871377945,
0.21172896027565002,
0.5868428945541382,
-0.4007369875907898,
-0.5804283618927002,
-0.14767786860466003,
0.25918012857437134,
0.3000960648059845,
-0.18141700327396393,
0.13394847512245178,
-0.23464715480804443,
0.09483526647090912,
0.0765555202960968,
0.48273470997810364,
0.3336281180381775,
-0.12617053091526031,
0.5193459987640381,
-0.04855656251311302
] |
https://github.com/huggingface/datasets/issues/5981
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
|
I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625
|
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
| 32
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625
|
[
-0.16755035519599915,
-0.6986504197120667,
-0.006346721202135086,
0.34194016456604004,
-0.08470852673053741,
-0.29069221019744873,
0.1730157881975174,
0.061168983578681946,
0.3615242838859558,
0.22394250333309174,
-0.09223693609237671,
0.6258038282394409,
0.17458605766296387,
0.04712958633899689,
-0.15570199489593506,
0.09349606931209564,
0.2597579061985016,
0.09132016450166702,
-0.014752388000488281,
-0.0016264021396636963,
-0.14717361330986023,
0.569740891456604,
-0.044189877808094025,
-0.22750578820705414,
-0.21884804964065552,
0.22291795909404755,
0.3187255561351776,
0.2357380986213684,
0.30357715487480164,
-0.25117555260658264,
-0.05000893771648407,
0.007014431059360504,
-0.0880642682313919,
0.2589001953601837,
-0.00012594714644365013,
0.11561626195907593,
-0.06171482801437378,
0.23891404271125793,
-0.08154544234275818,
-0.17547719180583954,
0.3536317050457001,
-0.1928819715976715,
0.038531333208084106,
-0.12212024629116058,
-0.30290400981903076,
0.4861271381378174,
-0.3716070353984833,
-0.23718059062957764,
0.308594673871994,
0.17213578522205353,
0.05802081525325775,
0.4175127446651459,
-0.004450179636478424,
0.05619688332080841,
0.06778086721897125,
0.21470695734024048,
-0.14013664424419403,
0.02477344311773777,
0.37184497714042664,
-0.08645063638687134,
0.1393410563468933,
0.5126335620880127,
-0.003106962889432907,
0.2944209575653076,
0.509089469909668,
0.05375659465789795,
-0.0000985264778137207,
-0.4114381968975067,
0.19149991869926453,
0.03795601427555084,
-0.4234708845615387,
0.07123395055532455,
0.03592678904533386,
-0.354982852935791,
-0.3954256772994995,
-0.4700080156326294,
0.3046013414859772,
-0.10609222948551178,
-0.2368672639131546,
-0.19592490792274475,
0.03730453923344612,
-0.059571824967861176,
-0.08281923085451126,
-0.028198011219501495,
0.18876387178897858,
0.6050974130630493,
0.041893694549798965,
0.21363285183906555,
0.4926724433898926,
0.3435564637184143,
-0.5149456262588501,
0.13165098428726196,
0.1421860158443451,
-0.09987649321556091,
-0.5186395049095154,
0.21083009243011475,
0.13703960180282593,
0.3251980245113373,
-0.2749982476234436,
0.2440337836742401,
0.2057739496231079,
0.3358210325241089,
0.18528535962104797,
0.1094668060541153,
-0.0026434045284986496,
-0.14175228774547577,
0.3818320035934448,
0.02461225911974907,
0.18078795075416565,
0.4418835937976837,
0.1224837601184845,
0.023855019360780716,
0.17043502628803253,
-0.36308830976486206,
0.2770889103412628,
-0.06825113296508789,
-0.0760982483625412,
-0.1712741255760193,
-0.04197290539741516,
-0.16879208385944366,
-0.23263424634933472,
-0.30993086099624634,
0.2369099259376526,
0.35408952832221985,
-0.20479322969913483,
0.4334057569503784,
0.030126437544822693,
0.04654741659760475,
-0.36486661434173584,
-0.30633029341697693,
0.006807399448007345,
0.2171049416065216,
-0.17813213169574738,
-0.05087072402238846,
0.328602135181427,
-1.1836503744125366,
0.3341868817806244,
0.3067311644554138,
0.1511766016483307,
-0.2961544394493103,
0.2762027680873871,
-0.12762978672981262,
0.11381664872169495,
0.43685224652290344,
-0.009458290413022041,
0.21055999398231506,
0.09604275226593018,
-0.14690709114074707,
-0.032373372465372086,
0.07420863211154938,
-0.20594793558120728,
-0.07026471197605133,
0.15110163390636444,
0.023022431880235672,
-0.027961060404777527,
0.05663271248340607,
-0.09761691838502884,
0.07164578139781952,
0.34537652134895325,
-0.24088925123214722,
-0.10857059806585312,
-0.2629580497741699,
-0.48174145817756653,
-0.027572182938456535,
0.2532956600189209,
0.04846598953008652,
-0.37525925040245056,
-0.15073564648628235,
-0.2380603402853012,
0.1895875334739685,
0.2902009189128876,
0.5502300262451172,
-0.07792461663484573,
-0.14209312200546265,
-0.045923542231321335,
0.03262206166982651,
0.015198178589344025,
-0.17302130162715912,
-0.41295239329338074,
-0.181135892868042,
0.02426886558532715,
0.04614201933145523,
0.14437703788280487,
-0.0807209461927414,
0.0003861989825963974,
0.0870424136519432,
0.10258475691080093,
-0.07854093611240387,
0.08438166975975037,
0.10219184309244156,
-0.278136283159256,
0.25062137842178345,
0.062096890062093735,
0.0844888687133789,
0.2900055944919586,
-0.032452620565891266,
-0.1484774649143219,
-0.3623166084289551,
0.2916419804096222,
-0.17664921283721924,
0.13860377669334412,
0.23318293690681458,
0.22191594541072845,
-0.037878744304180145,
0.17506016790866852,
-0.060112401843070984,
0.1503220796585083,
0.44838470220565796,
-0.31591832637786865,
0.1461883783340454,
0.3172476291656494,
0.25957053899765015,
-0.06558462977409363,
0.050643570721149445,
-0.1051781177520752,
-0.2340914011001587,
-0.06013105809688568,
0.11327436566352844,
-0.027338474988937378,
-0.26313093304634094,
-0.20023715496063232,
0.3465353846549988,
0.18037410080432892,
0.30154967308044434,
-0.3823426067829132,
0.3745153844356537,
-0.05726274847984314,
-0.17985235154628754,
-0.5665242671966553,
-0.10348951071500778,
0.18869063258171082,
0.09171534329652786,
0.057704437524080276,
-0.13892850279808044,
0.19250890612602234,
-0.20686553418636322,
-0.5815450549125671,
0.10098596662282944,
0.22425523400306702,
0.07753391563892365,
-0.06599561125040054,
-0.03545840457081795,
0.21565736830234528,
-0.11531314253807068,
0.025299284607172012,
0.13263243436813354,
0.2541452646255493,
0.4391956627368927,
-0.028974251821637154,
-0.016284553334116936,
-0.0774005651473999,
0.0764312893152237,
-0.03592667728662491,
-0.17280137538909912,
0.34796062111854553,
-0.02759654074907303,
0.031152542680501938,
-0.048492833971977234,
0.0981927216053009,
0.1618242859840393,
0.040770575404167175,
0.34221750497817993,
0.04295314848423004,
-0.00650598481297493,
-0.3560294210910797,
-0.19295495748519897,
0.17010512948036194,
0.2291135936975479,
0.20064297318458557,
0.06894781440496445,
0.14837846159934998,
0.040451910346746445,
-0.25843948125839233,
-0.19759845733642578,
0.13474233448505402,
0.2668246626853943,
0.15734024345874786,
-0.07699871808290482,
-0.08361273258924484,
-0.04154077544808388,
-0.24381789565086365,
-0.3197508454322815,
0.15829499065876007,
0.10002770274877548,
-0.46896877884864807,
0.11640120297670364,
-0.06907820701599121,
0.1630358099937439,
0.09799528867006302,
0.2946355640888214,
-0.12374284863471985,
-0.08740993589162827,
-0.013595182448625565,
0.6839890480041504,
-0.05031496286392212,
-0.10471847653388977,
0.32239654660224915,
0.2717876732349396,
-0.5399824380874634,
0.22735349833965302,
-0.3279076814651489,
-0.07819303870201111,
-0.14974376559257507,
0.004619915038347244,
-0.0390603132545948,
-0.0581500381231308,
0.10995310544967651,
-0.14548595249652863,
-0.4386258125305176,
-0.18573063611984253,
-0.3309849500656128,
0.03732888773083687,
0.0911789983510971,
-0.012550661340355873,
-0.16083085536956787,
0.09225831925868988,
-0.11902019381523132,
0.040067099034786224,
0.36409056186676025,
-0.12670014798641205,
-0.1537533402442932,
0.23047499358654022,
-0.17340031266212463,
0.06579401344060898,
-0.11128246784210205,
0.02078820765018463,
0.08264503628015518,
-0.09718915820121765,
0.013551633805036545,
-0.03350181132555008,
0.22395791113376617,
0.3547845780849457,
-0.08028237521648407,
-0.17788517475128174,
-0.382151335477829,
0.08083163946866989,
-0.1620432436466217,
-0.042716071009635925,
0.1663937270641327,
-0.09557431191205978,
-0.27453070878982544,
0.365707665681839,
-0.16432739794254303,
0.6303596496582031,
-0.07376835495233536,
-0.14120957255363464,
-0.10794638842344284,
-0.4066726863384247,
-0.08982676267623901,
-0.06282248347997665,
0.3144051730632782,
0.35032418370246887,
0.08278241008520126,
0.05651043355464935,
-0.008612986654043198,
-0.48253560066223145,
0.2524814307689667,
0.055241648107767105,
-0.026551954448223114,
0.09758742153644562,
0.6147056818008423,
0.21903738379478455,
0.5580422878265381,
0.3113149404525757,
0.020785223692655563,
0.4120352864265442,
0.09247142821550369,
-0.027552839368581772,
0.17524270713329315,
-0.41056302189826965,
0.021795222535729408,
-0.09490619599819183,
-0.0471082404255867,
-0.026612073183059692,
-0.02026568353176117,
-0.005924507975578308,
-0.14093051850795746,
0.23368749022483826,
-0.18647238612174988,
-0.12780264019966125,
0.20395417511463165,
0.14549432694911957,
0.08530710637569427,
0.04069383069872856,
0.20278114080429077,
-0.14790448546409607,
0.07923709601163864,
0.012099578976631165,
-0.008961625397205353,
0.17138323187828064,
-0.11534037441015244,
-0.2953701913356781,
-0.35899755358695984,
-0.4614044427871704,
0.3243698477745056,
-0.11308728903532028,
0.1359916478395462,
-0.14938686788082123,
-0.20632615685462952,
0.273608922958374,
-0.02251678891479969,
0.18910148739814758,
-0.004032021388411522,
0.04639434069395065,
0.10419109463691711,
-0.9458629488945007,
-0.3781389594078064,
-0.11380554735660553,
-0.15350578725337982,
-0.43944185972213745,
0.21921789646148682,
0.04916536062955856,
-0.17075231671333313,
-0.16027094423770905,
-0.09802813827991486,
-0.2910841405391693,
-0.18124958872795105,
0.04201937094330788,
-0.35018664598464966,
-0.20988032221794128,
-0.16848166286945343,
0.11323660612106323,
0.21275025606155396,
0.17986378073692322,
0.08546403795480728,
0.14877232909202576,
0.2437444031238556,
-0.31550920009613037,
0.15804463624954224,
0.23186418414115906,
0.17843234539031982,
0.15637511014938354,
0.17870014905929565,
0.3092805743217468,
0.25530806183815,
-0.2976888120174408,
0.42251649498939514,
0.06013251841068268,
-0.5345933437347412,
0.21955889463424683,
0.44763994216918945,
0.37091004848480225,
0.22269077599048615,
0.09498635679483414,
0.3413625657558441,
0.3266235888004303,
0.4090948700904846,
-0.10226462036371231,
0.11942597478628159,
0.21166999638080597,
0.29341986775398254,
-0.050648003816604614,
-0.17214380204677582,
-0.004834979772567749,
0.2297060340642929,
-0.1687144637107849,
0.08717836439609528,
-0.22764848172664642,
-0.016049915924668312,
0.06589698046445847,
0.21395999193191528,
0.5341173410415649,
-0.1259104460477829,
0.025123124942183495,
0.20831379294395447,
-0.3521554470062256,
0.6169136762619019,
-0.23791615664958954,
0.296833872795105,
-0.5036658048629761,
-0.23872114717960358,
0.12907111644744873,
-0.18320946395397186,
0.1893603503704071,
-0.015863753855228424,
0.3014727532863617,
0.08892772346735,
0.13270843029022217,
0.06748007982969284,
0.0181681290268898,
0.03677847981452942,
-0.16139686107635498,
-0.18813233077526093,
0.200062096118927,
0.03001057356595993,
-0.32802915573120117,
0.3722355365753174,
0.06901004910469055,
0.21019862592220306,
0.059897299855947495,
-0.22350549697875977,
-0.35993844270706177,
0.10370359569787979,
-0.2865425944328308,
-0.1208021491765976,
0.09676843881607056,
-0.2593979239463806,
0.4770154058933258,
0.111236572265625,
0.48610007762908936,
-0.1499965786933899,
0.02274332381784916,
0.1229967325925827,
-0.08561427146196365,
0.1860051155090332,
0.14351704716682434,
-0.13491615653038025,
0.10110308229923248,
-0.36445507407188416,
-0.283987432718277,
0.07691007852554321,
-0.1776479035615921,
-0.33933085203170776,
-0.16607603430747986,
0.5274009108543396,
-0.051678068935871124,
0.07935205101966858,
0.3858921229839325,
0.26587221026420593,
0.2849251627922058,
-0.24701689183712006,
-0.005394091829657555,
0.43523281812667847,
-0.19511887431144714,
0.08613387495279312,
-0.2630140781402588,
-0.24414069950580597,
-0.017888806760311127,
0.4316059947013855,
0.010936079546809196,
-0.3647684156894684,
0.3113822937011719,
0.27732017636299133,
-0.05492158234119415,
-0.0409218892455101,
-0.4625175893306732,
0.4252670705318451,
-0.3762222230434418,
0.17752860486507416,
0.2705884873867035,
-0.3437148332595825,
0.11655502021312714,
0.3220577836036682,
0.11927824467420578,
-0.1256798803806305,
-0.4278185963630676,
-0.1900840550661087,
-0.264367014169693,
0.011766791343688965,
-0.09658369421958923,
0.06113807111978531,
0.04109853506088257,
-0.45756441354751587,
-0.05302184075117111,
0.26558709144592285,
-0.16830061376094818,
-0.15652094781398773,
0.5043365359306335,
-0.08257444202899933,
-0.35325926542282104,
-0.34824708104133606,
0.0589778758585453,
0.10180886089801788,
-0.025634847581386566,
0.03128833696246147,
-0.045986004173755646,
-0.11096400022506714,
-0.21360157430171967,
0.11458510160446167,
-0.09910918027162552,
-0.4500662386417389,
-0.18241898715496063,
0.03042101487517357,
-0.0026199258863925934,
-0.2306775152683258,
0.3101109266281128,
0.019071999937295914,
-0.05363982170820236,
0.18421195447444916,
0.24711202085018158,
-0.08767861872911453,
-0.22095340490341187,
0.06258144229650497,
0.014663979411125183,
-0.10698610544204712,
0.07465141266584396,
0.08349823951721191,
0.21960578858852386,
-0.030500415712594986,
-0.14771702885627747,
-0.07124771922826767,
0.04914763569831848,
-0.014510709792375565,
0.2511480748653412,
-0.4152624011039734,
0.04192309454083443,
-0.1019769012928009,
0.3578322231769562,
0.2977595329284668,
0.32833823561668396,
0.17596979439258575,
0.03876378387212753,
0.15941353142261505,
-0.14759212732315063,
-0.2924681305885315,
0.0903119295835495,
0.3376339077949524,
0.17473165690898895,
0.25125494599342346,
0.03405868634581566,
0.07690413296222687,
0.4129948019981384,
0.02806343138217926,
0.0885072574019432,
-0.08162472397089005,
0.17479410767555237,
-0.04119272157549858,
0.1456955075263977,
0.23189635574817657,
0.16495904326438904,
-0.22305431962013245,
0.08545173704624176,
-0.08325022459030151,
0.2342974841594696,
0.5687851905822754,
-0.24706074595451355,
0.2031111866235733,
0.27574270963668823,
-0.41039231419563293,
-0.0886368602514267,
-0.07350413501262665,
-0.5387392640113831,
0.13394901156425476,
0.09134194254875183,
0.4218244254589081,
-0.19690877199172974,
-0.33323991298675537,
-0.4716387391090393,
0.1983216404914856,
-0.30183273553848267,
-0.03966972231864929,
-0.3949424624443054,
-0.15116800367832184,
0.0027229562401771545,
0.14525441825389862,
0.09118112921714783,
0.0321183018386364,
0.3849498927593231,
0.006842024624347687,
-0.34423553943634033,
0.11780653148889542,
-0.7008729577064514,
0.19166868925094604,
0.27146559953689575,
-0.08304035663604736,
-0.01144462265074253,
0.18397559225559235,
-0.42398369312286377,
-0.2117638885974884,
0.12064734101295471,
0.37077608704566956,
-0.1374603509902954,
0.24347086250782013,
0.02358783408999443,
-0.061858709901571274,
0.10698378086090088,
-0.30977848172187805,
0.12271207571029663,
0.20236113667488098,
0.15063995122909546,
-0.13288496434688568,
0.016763919964432716,
-0.15667739510536194,
-0.06241973862051964,
-0.3311355412006378,
0.25544166564941406,
-0.12919066846370697,
0.2894626557826996,
-0.31174540519714355,
-0.10926736891269684,
-0.06267835944890976,
-0.12078545242547989,
-0.04793349653482437,
-0.13844215869903564,
0.31623923778533936,
0.08018876612186432,
-0.15220800042152405,
-0.33290696144104004,
-0.005494715645909309,
0.25093480944633484,
0.03478982299566269,
-0.08480478823184967,
-0.3747170865535736,
-0.3651249408721924,
-0.0437387116253376,
-0.07620050013065338,
0.06299442052841187,
-0.054330628365278244,
0.13010206818580627,
0.051188983023166656,
-0.03352215513586998,
0.20249012112617493,
-0.04690779000520706,
0.5382411479949951,
-0.197623610496521,
0.09022867679595947,
0.49398383498191833,
-0.3627367913722992,
0.2795082628726959,
0.16395926475524902,
-0.2450251579284668,
0.2411540150642395,
0.15305164456367493,
0.3409076929092407,
-0.10938047617673874,
-0.07653093338012695,
-0.21919704973697662,
-0.0032131336629390717,
0.3299884498119354,
-0.46644213795661926,
0.1051136702299118,
0.14424502849578857,
0.2913297414779663,
0.1362026333808899,
-0.008001212030649185,
-0.04775695875287056,
0.2985225319862366,
-0.09537903219461441,
0.08609268814325333,
-0.16800418496131897,
0.7948809862136841,
0.028456253930926323,
-0.17186544835567474,
-0.280181348323822,
0.07175157219171524,
-0.15389317274093628,
-0.47346144914627075,
0.005076808854937553,
0.19420044124126434,
0.0417243093252182,
0.48122522234916687,
0.27765756845474243,
0.3077526390552521,
0.19574809074401855,
-0.2464265674352646,
-0.7180582880973816,
-0.3511047959327698,
0.25718969106674194,
-0.422203004360199,
-0.2306496649980545,
-0.4947853982448578,
0.518513560295105,
-0.14063936471939087,
-0.16896982491016388,
0.09716515988111496,
-0.5443719625473022,
-0.18181973695755005,
-0.057702697813510895,
-0.23249702155590057,
0.13984635472297668,
0.0678665041923523,
0.021183591336011887,
-0.06836210191249847,
0.4693089425563812,
0.15435034036636353,
-0.17502515017986298,
-0.09918545186519623,
-0.16265545785427094
] |
https://github.com/huggingface/datasets/issues/5981
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
|
From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration.
|
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
| 49
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration.
|
[
-0.16755035519599915,
-0.6986504197120667,
-0.006346721202135086,
0.34194016456604004,
-0.08470852673053741,
-0.29069221019744873,
0.1730157881975174,
0.061168983578681946,
0.3615242838859558,
0.22394250333309174,
-0.09223693609237671,
0.6258038282394409,
0.17458605766296387,
0.04712958633899689,
-0.15570199489593506,
0.09349606931209564,
0.2597579061985016,
0.09132016450166702,
-0.014752388000488281,
-0.0016264021396636963,
-0.14717361330986023,
0.569740891456604,
-0.044189877808094025,
-0.22750578820705414,
-0.21884804964065552,
0.22291795909404755,
0.3187255561351776,
0.2357380986213684,
0.30357715487480164,
-0.25117555260658264,
-0.05000893771648407,
0.007014431059360504,
-0.0880642682313919,
0.2589001953601837,
-0.00012594714644365013,
0.11561626195907593,
-0.06171482801437378,
0.23891404271125793,
-0.08154544234275818,
-0.17547719180583954,
0.3536317050457001,
-0.1928819715976715,
0.038531333208084106,
-0.12212024629116058,
-0.30290400981903076,
0.4861271381378174,
-0.3716070353984833,
-0.23718059062957764,
0.308594673871994,
0.17213578522205353,
0.05802081525325775,
0.4175127446651459,
-0.004450179636478424,
0.05619688332080841,
0.06778086721897125,
0.21470695734024048,
-0.14013664424419403,
0.02477344311773777,
0.37184497714042664,
-0.08645063638687134,
0.1393410563468933,
0.5126335620880127,
-0.003106962889432907,
0.2944209575653076,
0.509089469909668,
0.05375659465789795,
-0.0000985264778137207,
-0.4114381968975067,
0.19149991869926453,
0.03795601427555084,
-0.4234708845615387,
0.07123395055532455,
0.03592678904533386,
-0.354982852935791,
-0.3954256772994995,
-0.4700080156326294,
0.3046013414859772,
-0.10609222948551178,
-0.2368672639131546,
-0.19592490792274475,
0.03730453923344612,
-0.059571824967861176,
-0.08281923085451126,
-0.028198011219501495,
0.18876387178897858,
0.6050974130630493,
0.041893694549798965,
0.21363285183906555,
0.4926724433898926,
0.3435564637184143,
-0.5149456262588501,
0.13165098428726196,
0.1421860158443451,
-0.09987649321556091,
-0.5186395049095154,
0.21083009243011475,
0.13703960180282593,
0.3251980245113373,
-0.2749982476234436,
0.2440337836742401,
0.2057739496231079,
0.3358210325241089,
0.18528535962104797,
0.1094668060541153,
-0.0026434045284986496,
-0.14175228774547577,
0.3818320035934448,
0.02461225911974907,
0.18078795075416565,
0.4418835937976837,
0.1224837601184845,
0.023855019360780716,
0.17043502628803253,
-0.36308830976486206,
0.2770889103412628,
-0.06825113296508789,
-0.0760982483625412,
-0.1712741255760193,
-0.04197290539741516,
-0.16879208385944366,
-0.23263424634933472,
-0.30993086099624634,
0.2369099259376526,
0.35408952832221985,
-0.20479322969913483,
0.4334057569503784,
0.030126437544822693,
0.04654741659760475,
-0.36486661434173584,
-0.30633029341697693,
0.006807399448007345,
0.2171049416065216,
-0.17813213169574738,
-0.05087072402238846,
0.328602135181427,
-1.1836503744125366,
0.3341868817806244,
0.3067311644554138,
0.1511766016483307,
-0.2961544394493103,
0.2762027680873871,
-0.12762978672981262,
0.11381664872169495,
0.43685224652290344,
-0.009458290413022041,
0.21055999398231506,
0.09604275226593018,
-0.14690709114074707,
-0.032373372465372086,
0.07420863211154938,
-0.20594793558120728,
-0.07026471197605133,
0.15110163390636444,
0.023022431880235672,
-0.027961060404777527,
0.05663271248340607,
-0.09761691838502884,
0.07164578139781952,
0.34537652134895325,
-0.24088925123214722,
-0.10857059806585312,
-0.2629580497741699,
-0.48174145817756653,
-0.027572182938456535,
0.2532956600189209,
0.04846598953008652,
-0.37525925040245056,
-0.15073564648628235,
-0.2380603402853012,
0.1895875334739685,
0.2902009189128876,
0.5502300262451172,
-0.07792461663484573,
-0.14209312200546265,
-0.045923542231321335,
0.03262206166982651,
0.015198178589344025,
-0.17302130162715912,
-0.41295239329338074,
-0.181135892868042,
0.02426886558532715,
0.04614201933145523,
0.14437703788280487,
-0.0807209461927414,
0.0003861989825963974,
0.0870424136519432,
0.10258475691080093,
-0.07854093611240387,
0.08438166975975037,
0.10219184309244156,
-0.278136283159256,
0.25062137842178345,
0.062096890062093735,
0.0844888687133789,
0.2900055944919586,
-0.032452620565891266,
-0.1484774649143219,
-0.3623166084289551,
0.2916419804096222,
-0.17664921283721924,
0.13860377669334412,
0.23318293690681458,
0.22191594541072845,
-0.037878744304180145,
0.17506016790866852,
-0.060112401843070984,
0.1503220796585083,
0.44838470220565796,
-0.31591832637786865,
0.1461883783340454,
0.3172476291656494,
0.25957053899765015,
-0.06558462977409363,
0.050643570721149445,
-0.1051781177520752,
-0.2340914011001587,
-0.06013105809688568,
0.11327436566352844,
-0.027338474988937378,
-0.26313093304634094,
-0.20023715496063232,
0.3465353846549988,
0.18037410080432892,
0.30154967308044434,
-0.3823426067829132,
0.3745153844356537,
-0.05726274847984314,
-0.17985235154628754,
-0.5665242671966553,
-0.10348951071500778,
0.18869063258171082,
0.09171534329652786,
0.057704437524080276,
-0.13892850279808044,
0.19250890612602234,
-0.20686553418636322,
-0.5815450549125671,
0.10098596662282944,
0.22425523400306702,
0.07753391563892365,
-0.06599561125040054,
-0.03545840457081795,
0.21565736830234528,
-0.11531314253807068,
0.025299284607172012,
0.13263243436813354,
0.2541452646255493,
0.4391956627368927,
-0.028974251821637154,
-0.016284553334116936,
-0.0774005651473999,
0.0764312893152237,
-0.03592667728662491,
-0.17280137538909912,
0.34796062111854553,
-0.02759654074907303,
0.031152542680501938,
-0.048492833971977234,
0.0981927216053009,
0.1618242859840393,
0.040770575404167175,
0.34221750497817993,
0.04295314848423004,
-0.00650598481297493,
-0.3560294210910797,
-0.19295495748519897,
0.17010512948036194,
0.2291135936975479,
0.20064297318458557,
0.06894781440496445,
0.14837846159934998,
0.040451910346746445,
-0.25843948125839233,
-0.19759845733642578,
0.13474233448505402,
0.2668246626853943,
0.15734024345874786,
-0.07699871808290482,
-0.08361273258924484,
-0.04154077544808388,
-0.24381789565086365,
-0.3197508454322815,
0.15829499065876007,
0.10002770274877548,
-0.46896877884864807,
0.11640120297670364,
-0.06907820701599121,
0.1630358099937439,
0.09799528867006302,
0.2946355640888214,
-0.12374284863471985,
-0.08740993589162827,
-0.013595182448625565,
0.6839890480041504,
-0.05031496286392212,
-0.10471847653388977,
0.32239654660224915,
0.2717876732349396,
-0.5399824380874634,
0.22735349833965302,
-0.3279076814651489,
-0.07819303870201111,
-0.14974376559257507,
0.004619915038347244,
-0.0390603132545948,
-0.0581500381231308,
0.10995310544967651,
-0.14548595249652863,
-0.4386258125305176,
-0.18573063611984253,
-0.3309849500656128,
0.03732888773083687,
0.0911789983510971,
-0.012550661340355873,
-0.16083085536956787,
0.09225831925868988,
-0.11902019381523132,
0.040067099034786224,
0.36409056186676025,
-0.12670014798641205,
-0.1537533402442932,
0.23047499358654022,
-0.17340031266212463,
0.06579401344060898,
-0.11128246784210205,
0.02078820765018463,
0.08264503628015518,
-0.09718915820121765,
0.013551633805036545,
-0.03350181132555008,
0.22395791113376617,
0.3547845780849457,
-0.08028237521648407,
-0.17788517475128174,
-0.382151335477829,
0.08083163946866989,
-0.1620432436466217,
-0.042716071009635925,
0.1663937270641327,
-0.09557431191205978,
-0.27453070878982544,
0.365707665681839,
-0.16432739794254303,
0.6303596496582031,
-0.07376835495233536,
-0.14120957255363464,
-0.10794638842344284,
-0.4066726863384247,
-0.08982676267623901,
-0.06282248347997665,
0.3144051730632782,
0.35032418370246887,
0.08278241008520126,
0.05651043355464935,
-0.008612986654043198,
-0.48253560066223145,
0.2524814307689667,
0.055241648107767105,
-0.026551954448223114,
0.09758742153644562,
0.6147056818008423,
0.21903738379478455,
0.5580422878265381,
0.3113149404525757,
0.020785223692655563,
0.4120352864265442,
0.09247142821550369,
-0.027552839368581772,
0.17524270713329315,
-0.41056302189826965,
0.021795222535729408,
-0.09490619599819183,
-0.0471082404255867,
-0.026612073183059692,
-0.02026568353176117,
-0.005924507975578308,
-0.14093051850795746,
0.23368749022483826,
-0.18647238612174988,
-0.12780264019966125,
0.20395417511463165,
0.14549432694911957,
0.08530710637569427,
0.04069383069872856,
0.20278114080429077,
-0.14790448546409607,
0.07923709601163864,
0.012099578976631165,
-0.008961625397205353,
0.17138323187828064,
-0.11534037441015244,
-0.2953701913356781,
-0.35899755358695984,
-0.4614044427871704,
0.3243698477745056,
-0.11308728903532028,
0.1359916478395462,
-0.14938686788082123,
-0.20632615685462952,
0.273608922958374,
-0.02251678891479969,
0.18910148739814758,
-0.004032021388411522,
0.04639434069395065,
0.10419109463691711,
-0.9458629488945007,
-0.3781389594078064,
-0.11380554735660553,
-0.15350578725337982,
-0.43944185972213745,
0.21921789646148682,
0.04916536062955856,
-0.17075231671333313,
-0.16027094423770905,
-0.09802813827991486,
-0.2910841405391693,
-0.18124958872795105,
0.04201937094330788,
-0.35018664598464966,
-0.20988032221794128,
-0.16848166286945343,
0.11323660612106323,
0.21275025606155396,
0.17986378073692322,
0.08546403795480728,
0.14877232909202576,
0.2437444031238556,
-0.31550920009613037,
0.15804463624954224,
0.23186418414115906,
0.17843234539031982,
0.15637511014938354,
0.17870014905929565,
0.3092805743217468,
0.25530806183815,
-0.2976888120174408,
0.42251649498939514,
0.06013251841068268,
-0.5345933437347412,
0.21955889463424683,
0.44763994216918945,
0.37091004848480225,
0.22269077599048615,
0.09498635679483414,
0.3413625657558441,
0.3266235888004303,
0.4090948700904846,
-0.10226462036371231,
0.11942597478628159,
0.21166999638080597,
0.29341986775398254,
-0.050648003816604614,
-0.17214380204677582,
-0.004834979772567749,
0.2297060340642929,
-0.1687144637107849,
0.08717836439609528,
-0.22764848172664642,
-0.016049915924668312,
0.06589698046445847,
0.21395999193191528,
0.5341173410415649,
-0.1259104460477829,
0.025123124942183495,
0.20831379294395447,
-0.3521554470062256,
0.6169136762619019,
-0.23791615664958954,
0.296833872795105,
-0.5036658048629761,
-0.23872114717960358,
0.12907111644744873,
-0.18320946395397186,
0.1893603503704071,
-0.015863753855228424,
0.3014727532863617,
0.08892772346735,
0.13270843029022217,
0.06748007982969284,
0.0181681290268898,
0.03677847981452942,
-0.16139686107635498,
-0.18813233077526093,
0.200062096118927,
0.03001057356595993,
-0.32802915573120117,
0.3722355365753174,
0.06901004910469055,
0.21019862592220306,
0.059897299855947495,
-0.22350549697875977,
-0.35993844270706177,
0.10370359569787979,
-0.2865425944328308,
-0.1208021491765976,
0.09676843881607056,
-0.2593979239463806,
0.4770154058933258,
0.111236572265625,
0.48610007762908936,
-0.1499965786933899,
0.02274332381784916,
0.1229967325925827,
-0.08561427146196365,
0.1860051155090332,
0.14351704716682434,
-0.13491615653038025,
0.10110308229923248,
-0.36445507407188416,
-0.283987432718277,
0.07691007852554321,
-0.1776479035615921,
-0.33933085203170776,
-0.16607603430747986,
0.5274009108543396,
-0.051678068935871124,
0.07935205101966858,
0.3858921229839325,
0.26587221026420593,
0.2849251627922058,
-0.24701689183712006,
-0.005394091829657555,
0.43523281812667847,
-0.19511887431144714,
0.08613387495279312,
-0.2630140781402588,
-0.24414069950580597,
-0.017888806760311127,
0.4316059947013855,
0.010936079546809196,
-0.3647684156894684,
0.3113822937011719,
0.27732017636299133,
-0.05492158234119415,
-0.0409218892455101,
-0.4625175893306732,
0.4252670705318451,
-0.3762222230434418,
0.17752860486507416,
0.2705884873867035,
-0.3437148332595825,
0.11655502021312714,
0.3220577836036682,
0.11927824467420578,
-0.1256798803806305,
-0.4278185963630676,
-0.1900840550661087,
-0.264367014169693,
0.011766791343688965,
-0.09658369421958923,
0.06113807111978531,
0.04109853506088257,
-0.45756441354751587,
-0.05302184075117111,
0.26558709144592285,
-0.16830061376094818,
-0.15652094781398773,
0.5043365359306335,
-0.08257444202899933,
-0.35325926542282104,
-0.34824708104133606,
0.0589778758585453,
0.10180886089801788,
-0.025634847581386566,
0.03128833696246147,
-0.045986004173755646,
-0.11096400022506714,
-0.21360157430171967,
0.11458510160446167,
-0.09910918027162552,
-0.4500662386417389,
-0.18241898715496063,
0.03042101487517357,
-0.0026199258863925934,
-0.2306775152683258,
0.3101109266281128,
0.019071999937295914,
-0.05363982170820236,
0.18421195447444916,
0.24711202085018158,
-0.08767861872911453,
-0.22095340490341187,
0.06258144229650497,
0.014663979411125183,
-0.10698610544204712,
0.07465141266584396,
0.08349823951721191,
0.21960578858852386,
-0.030500415712594986,
-0.14771702885627747,
-0.07124771922826767,
0.04914763569831848,
-0.014510709792375565,
0.2511480748653412,
-0.4152624011039734,
0.04192309454083443,
-0.1019769012928009,
0.3578322231769562,
0.2977595329284668,
0.32833823561668396,
0.17596979439258575,
0.03876378387212753,
0.15941353142261505,
-0.14759212732315063,
-0.2924681305885315,
0.0903119295835495,
0.3376339077949524,
0.17473165690898895,
0.25125494599342346,
0.03405868634581566,
0.07690413296222687,
0.4129948019981384,
0.02806343138217926,
0.0885072574019432,
-0.08162472397089005,
0.17479410767555237,
-0.04119272157549858,
0.1456955075263977,
0.23189635574817657,
0.16495904326438904,
-0.22305431962013245,
0.08545173704624176,
-0.08325022459030151,
0.2342974841594696,
0.5687851905822754,
-0.24706074595451355,
0.2031111866235733,
0.27574270963668823,
-0.41039231419563293,
-0.0886368602514267,
-0.07350413501262665,
-0.5387392640113831,
0.13394901156425476,
0.09134194254875183,
0.4218244254589081,
-0.19690877199172974,
-0.33323991298675537,
-0.4716387391090393,
0.1983216404914856,
-0.30183273553848267,
-0.03966972231864929,
-0.3949424624443054,
-0.15116800367832184,
0.0027229562401771545,
0.14525441825389862,
0.09118112921714783,
0.0321183018386364,
0.3849498927593231,
0.006842024624347687,
-0.34423553943634033,
0.11780653148889542,
-0.7008729577064514,
0.19166868925094604,
0.27146559953689575,
-0.08304035663604736,
-0.01144462265074253,
0.18397559225559235,
-0.42398369312286377,
-0.2117638885974884,
0.12064734101295471,
0.37077608704566956,
-0.1374603509902954,
0.24347086250782013,
0.02358783408999443,
-0.061858709901571274,
0.10698378086090088,
-0.30977848172187805,
0.12271207571029663,
0.20236113667488098,
0.15063995122909546,
-0.13288496434688568,
0.016763919964432716,
-0.15667739510536194,
-0.06241973862051964,
-0.3311355412006378,
0.25544166564941406,
-0.12919066846370697,
0.2894626557826996,
-0.31174540519714355,
-0.10926736891269684,
-0.06267835944890976,
-0.12078545242547989,
-0.04793349653482437,
-0.13844215869903564,
0.31623923778533936,
0.08018876612186432,
-0.15220800042152405,
-0.33290696144104004,
-0.005494715645909309,
0.25093480944633484,
0.03478982299566269,
-0.08480478823184967,
-0.3747170865535736,
-0.3651249408721924,
-0.0437387116253376,
-0.07620050013065338,
0.06299442052841187,
-0.054330628365278244,
0.13010206818580627,
0.051188983023166656,
-0.03352215513586998,
0.20249012112617493,
-0.04690779000520706,
0.5382411479949951,
-0.197623610496521,
0.09022867679595947,
0.49398383498191833,
-0.3627367913722992,
0.2795082628726959,
0.16395926475524902,
-0.2450251579284668,
0.2411540150642395,
0.15305164456367493,
0.3409076929092407,
-0.10938047617673874,
-0.07653093338012695,
-0.21919704973697662,
-0.0032131336629390717,
0.3299884498119354,
-0.46644213795661926,
0.1051136702299118,
0.14424502849578857,
0.2913297414779663,
0.1362026333808899,
-0.008001212030649185,
-0.04775695875287056,
0.2985225319862366,
-0.09537903219461441,
0.08609268814325333,
-0.16800418496131897,
0.7948809862136841,
0.028456253930926323,
-0.17186544835567474,
-0.280181348323822,
0.07175157219171524,
-0.15389317274093628,
-0.47346144914627075,
0.005076808854937553,
0.19420044124126434,
0.0417243093252182,
0.48122522234916687,
0.27765756845474243,
0.3077526390552521,
0.19574809074401855,
-0.2464265674352646,
-0.7180582880973816,
-0.3511047959327698,
0.25718969106674194,
-0.422203004360199,
-0.2306496649980545,
-0.4947853982448578,
0.518513560295105,
-0.14063936471939087,
-0.16896982491016388,
0.09716515988111496,
-0.5443719625473022,
-0.18181973695755005,
-0.057702697813510895,
-0.23249702155590057,
0.13984635472297668,
0.0678665041923523,
0.021183591336011887,
-0.06836210191249847,
0.4693089425563812,
0.15435034036636353,
-0.17502515017986298,
-0.09918545186519623,
-0.16265545785427094
] |
https://github.com/huggingface/datasets/issues/5981
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
|
@mariosasko @mmr-crexi I had the exact same problem on my kubernetes cluster. the datasets subprocess only user 1 and 17 core
|
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
| 21
|
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.

When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
@mariosasko @mmr-crexi I had the exact same problem on my kubernetes cluster. the datasets subprocess only user 1 and 17 core
|
[
-0.16755035519599915,
-0.6986504197120667,
-0.006346721202135086,
0.34194016456604004,
-0.08470852673053741,
-0.29069221019744873,
0.1730157881975174,
0.061168983578681946,
0.3615242838859558,
0.22394250333309174,
-0.09223693609237671,
0.6258038282394409,
0.17458605766296387,
0.04712958633899689,
-0.15570199489593506,
0.09349606931209564,
0.2597579061985016,
0.09132016450166702,
-0.014752388000488281,
-0.0016264021396636963,
-0.14717361330986023,
0.569740891456604,
-0.044189877808094025,
-0.22750578820705414,
-0.21884804964065552,
0.22291795909404755,
0.3187255561351776,
0.2357380986213684,
0.30357715487480164,
-0.25117555260658264,
-0.05000893771648407,
0.007014431059360504,
-0.0880642682313919,
0.2589001953601837,
-0.00012594714644365013,
0.11561626195907593,
-0.06171482801437378,
0.23891404271125793,
-0.08154544234275818,
-0.17547719180583954,
0.3536317050457001,
-0.1928819715976715,
0.038531333208084106,
-0.12212024629116058,
-0.30290400981903076,
0.4861271381378174,
-0.3716070353984833,
-0.23718059062957764,
0.308594673871994,
0.17213578522205353,
0.05802081525325775,
0.4175127446651459,
-0.004450179636478424,
0.05619688332080841,
0.06778086721897125,
0.21470695734024048,
-0.14013664424419403,
0.02477344311773777,
0.37184497714042664,
-0.08645063638687134,
0.1393410563468933,
0.5126335620880127,
-0.003106962889432907,
0.2944209575653076,
0.509089469909668,
0.05375659465789795,
-0.0000985264778137207,
-0.4114381968975067,
0.19149991869926453,
0.03795601427555084,
-0.4234708845615387,
0.07123395055532455,
0.03592678904533386,
-0.354982852935791,
-0.3954256772994995,
-0.4700080156326294,
0.3046013414859772,
-0.10609222948551178,
-0.2368672639131546,
-0.19592490792274475,
0.03730453923344612,
-0.059571824967861176,
-0.08281923085451126,
-0.028198011219501495,
0.18876387178897858,
0.6050974130630493,
0.041893694549798965,
0.21363285183906555,
0.4926724433898926,
0.3435564637184143,
-0.5149456262588501,
0.13165098428726196,
0.1421860158443451,
-0.09987649321556091,
-0.5186395049095154,
0.21083009243011475,
0.13703960180282593,
0.3251980245113373,
-0.2749982476234436,
0.2440337836742401,
0.2057739496231079,
0.3358210325241089,
0.18528535962104797,
0.1094668060541153,
-0.0026434045284986496,
-0.14175228774547577,
0.3818320035934448,
0.02461225911974907,
0.18078795075416565,
0.4418835937976837,
0.1224837601184845,
0.023855019360780716,
0.17043502628803253,
-0.36308830976486206,
0.2770889103412628,
-0.06825113296508789,
-0.0760982483625412,
-0.1712741255760193,
-0.04197290539741516,
-0.16879208385944366,
-0.23263424634933472,
-0.30993086099624634,
0.2369099259376526,
0.35408952832221985,
-0.20479322969913483,
0.4334057569503784,
0.030126437544822693,
0.04654741659760475,
-0.36486661434173584,
-0.30633029341697693,
0.006807399448007345,
0.2171049416065216,
-0.17813213169574738,
-0.05087072402238846,
0.328602135181427,
-1.1836503744125366,
0.3341868817806244,
0.3067311644554138,
0.1511766016483307,
-0.2961544394493103,
0.2762027680873871,
-0.12762978672981262,
0.11381664872169495,
0.43685224652290344,
-0.009458290413022041,
0.21055999398231506,
0.09604275226593018,
-0.14690709114074707,
-0.032373372465372086,
0.07420863211154938,
-0.20594793558120728,
-0.07026471197605133,
0.15110163390636444,
0.023022431880235672,
-0.027961060404777527,
0.05663271248340607,
-0.09761691838502884,
0.07164578139781952,
0.34537652134895325,
-0.24088925123214722,
-0.10857059806585312,
-0.2629580497741699,
-0.48174145817756653,
-0.027572182938456535,
0.2532956600189209,
0.04846598953008652,
-0.37525925040245056,
-0.15073564648628235,
-0.2380603402853012,
0.1895875334739685,
0.2902009189128876,
0.5502300262451172,
-0.07792461663484573,
-0.14209312200546265,
-0.045923542231321335,
0.03262206166982651,
0.015198178589344025,
-0.17302130162715912,
-0.41295239329338074,
-0.181135892868042,
0.02426886558532715,
0.04614201933145523,
0.14437703788280487,
-0.0807209461927414,
0.0003861989825963974,
0.0870424136519432,
0.10258475691080093,
-0.07854093611240387,
0.08438166975975037,
0.10219184309244156,
-0.278136283159256,
0.25062137842178345,
0.062096890062093735,
0.0844888687133789,
0.2900055944919586,
-0.032452620565891266,
-0.1484774649143219,
-0.3623166084289551,
0.2916419804096222,
-0.17664921283721924,
0.13860377669334412,
0.23318293690681458,
0.22191594541072845,
-0.037878744304180145,
0.17506016790866852,
-0.060112401843070984,
0.1503220796585083,
0.44838470220565796,
-0.31591832637786865,
0.1461883783340454,
0.3172476291656494,
0.25957053899765015,
-0.06558462977409363,
0.050643570721149445,
-0.1051781177520752,
-0.2340914011001587,
-0.06013105809688568,
0.11327436566352844,
-0.027338474988937378,
-0.26313093304634094,
-0.20023715496063232,
0.3465353846549988,
0.18037410080432892,
0.30154967308044434,
-0.3823426067829132,
0.3745153844356537,
-0.05726274847984314,
-0.17985235154628754,
-0.5665242671966553,
-0.10348951071500778,
0.18869063258171082,
0.09171534329652786,
0.057704437524080276,
-0.13892850279808044,
0.19250890612602234,
-0.20686553418636322,
-0.5815450549125671,
0.10098596662282944,
0.22425523400306702,
0.07753391563892365,
-0.06599561125040054,
-0.03545840457081795,
0.21565736830234528,
-0.11531314253807068,
0.025299284607172012,
0.13263243436813354,
0.2541452646255493,
0.4391956627368927,
-0.028974251821637154,
-0.016284553334116936,
-0.0774005651473999,
0.0764312893152237,
-0.03592667728662491,
-0.17280137538909912,
0.34796062111854553,
-0.02759654074907303,
0.031152542680501938,
-0.048492833971977234,
0.0981927216053009,
0.1618242859840393,
0.040770575404167175,
0.34221750497817993,
0.04295314848423004,
-0.00650598481297493,
-0.3560294210910797,
-0.19295495748519897,
0.17010512948036194,
0.2291135936975479,
0.20064297318458557,
0.06894781440496445,
0.14837846159934998,
0.040451910346746445,
-0.25843948125839233,
-0.19759845733642578,
0.13474233448505402,
0.2668246626853943,
0.15734024345874786,
-0.07699871808290482,
-0.08361273258924484,
-0.04154077544808388,
-0.24381789565086365,
-0.3197508454322815,
0.15829499065876007,
0.10002770274877548,
-0.46896877884864807,
0.11640120297670364,
-0.06907820701599121,
0.1630358099937439,
0.09799528867006302,
0.2946355640888214,
-0.12374284863471985,
-0.08740993589162827,
-0.013595182448625565,
0.6839890480041504,
-0.05031496286392212,
-0.10471847653388977,
0.32239654660224915,
0.2717876732349396,
-0.5399824380874634,
0.22735349833965302,
-0.3279076814651489,
-0.07819303870201111,
-0.14974376559257507,
0.004619915038347244,
-0.0390603132545948,
-0.0581500381231308,
0.10995310544967651,
-0.14548595249652863,
-0.4386258125305176,
-0.18573063611984253,
-0.3309849500656128,
0.03732888773083687,
0.0911789983510971,
-0.012550661340355873,
-0.16083085536956787,
0.09225831925868988,
-0.11902019381523132,
0.040067099034786224,
0.36409056186676025,
-0.12670014798641205,
-0.1537533402442932,
0.23047499358654022,
-0.17340031266212463,
0.06579401344060898,
-0.11128246784210205,
0.02078820765018463,
0.08264503628015518,
-0.09718915820121765,
0.013551633805036545,
-0.03350181132555008,
0.22395791113376617,
0.3547845780849457,
-0.08028237521648407,
-0.17788517475128174,
-0.382151335477829,
0.08083163946866989,
-0.1620432436466217,
-0.042716071009635925,
0.1663937270641327,
-0.09557431191205978,
-0.27453070878982544,
0.365707665681839,
-0.16432739794254303,
0.6303596496582031,
-0.07376835495233536,
-0.14120957255363464,
-0.10794638842344284,
-0.4066726863384247,
-0.08982676267623901,
-0.06282248347997665,
0.3144051730632782,
0.35032418370246887,
0.08278241008520126,
0.05651043355464935,
-0.008612986654043198,
-0.48253560066223145,
0.2524814307689667,
0.055241648107767105,
-0.026551954448223114,
0.09758742153644562,
0.6147056818008423,
0.21903738379478455,
0.5580422878265381,
0.3113149404525757,
0.020785223692655563,
0.4120352864265442,
0.09247142821550369,
-0.027552839368581772,
0.17524270713329315,
-0.41056302189826965,
0.021795222535729408,
-0.09490619599819183,
-0.0471082404255867,
-0.026612073183059692,
-0.02026568353176117,
-0.005924507975578308,
-0.14093051850795746,
0.23368749022483826,
-0.18647238612174988,
-0.12780264019966125,
0.20395417511463165,
0.14549432694911957,
0.08530710637569427,
0.04069383069872856,
0.20278114080429077,
-0.14790448546409607,
0.07923709601163864,
0.012099578976631165,
-0.008961625397205353,
0.17138323187828064,
-0.11534037441015244,
-0.2953701913356781,
-0.35899755358695984,
-0.4614044427871704,
0.3243698477745056,
-0.11308728903532028,
0.1359916478395462,
-0.14938686788082123,
-0.20632615685462952,
0.273608922958374,
-0.02251678891479969,
0.18910148739814758,
-0.004032021388411522,
0.04639434069395065,
0.10419109463691711,
-0.9458629488945007,
-0.3781389594078064,
-0.11380554735660553,
-0.15350578725337982,
-0.43944185972213745,
0.21921789646148682,
0.04916536062955856,
-0.17075231671333313,
-0.16027094423770905,
-0.09802813827991486,
-0.2910841405391693,
-0.18124958872795105,
0.04201937094330788,
-0.35018664598464966,
-0.20988032221794128,
-0.16848166286945343,
0.11323660612106323,
0.21275025606155396,
0.17986378073692322,
0.08546403795480728,
0.14877232909202576,
0.2437444031238556,
-0.31550920009613037,
0.15804463624954224,
0.23186418414115906,
0.17843234539031982,
0.15637511014938354,
0.17870014905929565,
0.3092805743217468,
0.25530806183815,
-0.2976888120174408,
0.42251649498939514,
0.06013251841068268,
-0.5345933437347412,
0.21955889463424683,
0.44763994216918945,
0.37091004848480225,
0.22269077599048615,
0.09498635679483414,
0.3413625657558441,
0.3266235888004303,
0.4090948700904846,
-0.10226462036371231,
0.11942597478628159,
0.21166999638080597,
0.29341986775398254,
-0.050648003816604614,
-0.17214380204677582,
-0.004834979772567749,
0.2297060340642929,
-0.1687144637107849,
0.08717836439609528,
-0.22764848172664642,
-0.016049915924668312,
0.06589698046445847,
0.21395999193191528,
0.5341173410415649,
-0.1259104460477829,
0.025123124942183495,
0.20831379294395447,
-0.3521554470062256,
0.6169136762619019,
-0.23791615664958954,
0.296833872795105,
-0.5036658048629761,
-0.23872114717960358,
0.12907111644744873,
-0.18320946395397186,
0.1893603503704071,
-0.015863753855228424,
0.3014727532863617,
0.08892772346735,
0.13270843029022217,
0.06748007982969284,
0.0181681290268898,
0.03677847981452942,
-0.16139686107635498,
-0.18813233077526093,
0.200062096118927,
0.03001057356595993,
-0.32802915573120117,
0.3722355365753174,
0.06901004910469055,
0.21019862592220306,
0.059897299855947495,
-0.22350549697875977,
-0.35993844270706177,
0.10370359569787979,
-0.2865425944328308,
-0.1208021491765976,
0.09676843881607056,
-0.2593979239463806,
0.4770154058933258,
0.111236572265625,
0.48610007762908936,
-0.1499965786933899,
0.02274332381784916,
0.1229967325925827,
-0.08561427146196365,
0.1860051155090332,
0.14351704716682434,
-0.13491615653038025,
0.10110308229923248,
-0.36445507407188416,
-0.283987432718277,
0.07691007852554321,
-0.1776479035615921,
-0.33933085203170776,
-0.16607603430747986,
0.5274009108543396,
-0.051678068935871124,
0.07935205101966858,
0.3858921229839325,
0.26587221026420593,
0.2849251627922058,
-0.24701689183712006,
-0.005394091829657555,
0.43523281812667847,
-0.19511887431144714,
0.08613387495279312,
-0.2630140781402588,
-0.24414069950580597,
-0.017888806760311127,
0.4316059947013855,
0.010936079546809196,
-0.3647684156894684,
0.3113822937011719,
0.27732017636299133,
-0.05492158234119415,
-0.0409218892455101,
-0.4625175893306732,
0.4252670705318451,
-0.3762222230434418,
0.17752860486507416,
0.2705884873867035,
-0.3437148332595825,
0.11655502021312714,
0.3220577836036682,
0.11927824467420578,
-0.1256798803806305,
-0.4278185963630676,
-0.1900840550661087,
-0.264367014169693,
0.011766791343688965,
-0.09658369421958923,
0.06113807111978531,
0.04109853506088257,
-0.45756441354751587,
-0.05302184075117111,
0.26558709144592285,
-0.16830061376094818,
-0.15652094781398773,
0.5043365359306335,
-0.08257444202899933,
-0.35325926542282104,
-0.34824708104133606,
0.0589778758585453,
0.10180886089801788,
-0.025634847581386566,
0.03128833696246147,
-0.045986004173755646,
-0.11096400022506714,
-0.21360157430171967,
0.11458510160446167,
-0.09910918027162552,
-0.4500662386417389,
-0.18241898715496063,
0.03042101487517357,
-0.0026199258863925934,
-0.2306775152683258,
0.3101109266281128,
0.019071999937295914,
-0.05363982170820236,
0.18421195447444916,
0.24711202085018158,
-0.08767861872911453,
-0.22095340490341187,
0.06258144229650497,
0.014663979411125183,
-0.10698610544204712,
0.07465141266584396,
0.08349823951721191,
0.21960578858852386,
-0.030500415712594986,
-0.14771702885627747,
-0.07124771922826767,
0.04914763569831848,
-0.014510709792375565,
0.2511480748653412,
-0.4152624011039734,
0.04192309454083443,
-0.1019769012928009,
0.3578322231769562,
0.2977595329284668,
0.32833823561668396,
0.17596979439258575,
0.03876378387212753,
0.15941353142261505,
-0.14759212732315063,
-0.2924681305885315,
0.0903119295835495,
0.3376339077949524,
0.17473165690898895,
0.25125494599342346,
0.03405868634581566,
0.07690413296222687,
0.4129948019981384,
0.02806343138217926,
0.0885072574019432,
-0.08162472397089005,
0.17479410767555237,
-0.04119272157549858,
0.1456955075263977,
0.23189635574817657,
0.16495904326438904,
-0.22305431962013245,
0.08545173704624176,
-0.08325022459030151,
0.2342974841594696,
0.5687851905822754,
-0.24706074595451355,
0.2031111866235733,
0.27574270963668823,
-0.41039231419563293,
-0.0886368602514267,
-0.07350413501262665,
-0.5387392640113831,
0.13394901156425476,
0.09134194254875183,
0.4218244254589081,
-0.19690877199172974,
-0.33323991298675537,
-0.4716387391090393,
0.1983216404914856,
-0.30183273553848267,
-0.03966972231864929,
-0.3949424624443054,
-0.15116800367832184,
0.0027229562401771545,
0.14525441825389862,
0.09118112921714783,
0.0321183018386364,
0.3849498927593231,
0.006842024624347687,
-0.34423553943634033,
0.11780653148889542,
-0.7008729577064514,
0.19166868925094604,
0.27146559953689575,
-0.08304035663604736,
-0.01144462265074253,
0.18397559225559235,
-0.42398369312286377,
-0.2117638885974884,
0.12064734101295471,
0.37077608704566956,
-0.1374603509902954,
0.24347086250782013,
0.02358783408999443,
-0.061858709901571274,
0.10698378086090088,
-0.30977848172187805,
0.12271207571029663,
0.20236113667488098,
0.15063995122909546,
-0.13288496434688568,
0.016763919964432716,
-0.15667739510536194,
-0.06241973862051964,
-0.3311355412006378,
0.25544166564941406,
-0.12919066846370697,
0.2894626557826996,
-0.31174540519714355,
-0.10926736891269684,
-0.06267835944890976,
-0.12078545242547989,
-0.04793349653482437,
-0.13844215869903564,
0.31623923778533936,
0.08018876612186432,
-0.15220800042152405,
-0.33290696144104004,
-0.005494715645909309,
0.25093480944633484,
0.03478982299566269,
-0.08480478823184967,
-0.3747170865535736,
-0.3651249408721924,
-0.0437387116253376,
-0.07620050013065338,
0.06299442052841187,
-0.054330628365278244,
0.13010206818580627,
0.051188983023166656,
-0.03352215513586998,
0.20249012112617493,
-0.04690779000520706,
0.5382411479949951,
-0.197623610496521,
0.09022867679595947,
0.49398383498191833,
-0.3627367913722992,
0.2795082628726959,
0.16395926475524902,
-0.2450251579284668,
0.2411540150642395,
0.15305164456367493,
0.3409076929092407,
-0.10938047617673874,
-0.07653093338012695,
-0.21919704973697662,
-0.0032131336629390717,
0.3299884498119354,
-0.46644213795661926,
0.1051136702299118,
0.14424502849578857,
0.2913297414779663,
0.1362026333808899,
-0.008001212030649185,
-0.04775695875287056,
0.2985225319862366,
-0.09537903219461441,
0.08609268814325333,
-0.16800418496131897,
0.7948809862136841,
0.028456253930926323,
-0.17186544835567474,
-0.280181348323822,
0.07175157219171524,
-0.15389317274093628,
-0.47346144914627075,
0.005076808854937553,
0.19420044124126434,
0.0417243093252182,
0.48122522234916687,
0.27765756845474243,
0.3077526390552521,
0.19574809074401855,
-0.2464265674352646,
-0.7180582880973816,
-0.3511047959327698,
0.25718969106674194,
-0.422203004360199,
-0.2306496649980545,
-0.4947853982448578,
0.518513560295105,
-0.14063936471939087,
-0.16896982491016388,
0.09716515988111496,
-0.5443719625473022,
-0.18181973695755005,
-0.057702697813510895,
-0.23249702155590057,
0.13984635472297668,
0.0678665041923523,
0.021183591336011887,
-0.06836210191249847,
0.4693089425563812,
0.15435034036636353,
-0.17502515017986298,
-0.09918545186519623,
-0.16265545785427094
] |
https://github.com/huggingface/datasets/issues/5980
|
Viewing dataset card returns “502 Bad Gateway”
|
Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning.
|
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
| 24
|
Viewing dataset card returns “502 Bad Gateway”
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning.
|
[
-0.30455005168914795,
-0.08470264077186584,
0.019787874072790146,
0.2753649353981018,
0.3716282248497009,
-0.18100419640541077,
-0.011788371950387955,
0.2689247727394104,
-0.1532786786556244,
-0.15398772060871124,
-0.10853340476751328,
0.07101288437843323,
0.28865236043930054,
0.6164693832397461,
0.1357528567314148,
0.04945028945803642,
-0.012608222663402557,
-0.26572301983833313,
-0.37917396426200867,
0.22044549882411957,
-0.016524937003850937,
0.17678500711917877,
-0.15904712677001953,
0.2065846025943756,
-0.46274545788764954,
-0.01619906909763813,
0.1197277158498764,
0.3615230619907379,
-0.446132093667984,
-0.4015692472457886,
-0.02798483893275261,
0.12138792872428894,
0.10331346839666367,
0.31192031502723694,
-0.0001263004814973101,
0.30490344762802124,
0.3413514494895935,
0.19265905022621155,
-0.5125751495361328,
-0.3138466477394104,
-0.3566749691963196,
0.0016518812626600266,
0.04186929762363434,
0.15745314955711365,
-0.11467102915048599,
-0.2724040448665619,
0.08575531840324402,
-0.009921208024024963,
0.30820614099502563,
0.01972765102982521,
0.1010989397764206,
-0.14076757431030273,
0.10659493505954742,
-0.18044711649417877,
0.049472834914922714,
0.15255644917488098,
-0.1189005896449089,
0.4033038318157196,
0.13680163025856018,
0.12111733853816986,
-0.007000520825386047,
0.24814558029174805,
0.19837553799152374,
-0.05358167365193367,
0.16606734693050385,
-0.004198127426207066,
0.3541654050350189,
-0.04728951305150986,
0.17878630757331848,
0.3133968114852905,
0.23532170057296753,
0.10359947383403778,
-0.3172881305217743,
-0.11135776340961456,
-0.164866641163826,
-0.1411857306957245,
0.4760662317276001,
-0.15772347152233124,
0.12675471603870392,
0.35377100110054016,
-0.03773520886898041,
-0.25962117314338684,
-0.4127187728881836,
0.16127772629261017,
-0.07364415377378464,
0.16146403551101685,
-0.07936648279428482,
0.142331063747406,
0.1501472443342209,
-0.006994985044002533,
0.04625750705599785,
0.4559931457042694,
-0.4763794243335724,
-0.08560332655906677,
-0.38973432779312134,
0.2457486391067505,
0.09569796919822693,
0.2906293272972107,
-0.05278606712818146,
0.3016132712364197,
0.1983228176832199,
0.3897441625595093,
-0.09434796869754791,
0.16573907434940338,
0.35581085085868835,
0.05277096852660179,
-0.12740972638130188,
0.04346837103366852,
0.3955800533294678,
0.5346032381057739,
0.16190001368522644,
0.04191455990076065,
-0.01185833103954792,
-0.18171872198581696,
-0.4165523946285248,
-0.06745702773332596,
0.19985707104206085,
-0.4373277425765991,
-0.12826339900493622,
-0.02447286620736122,
0.11098352819681168,
-0.13764087855815887,
0.36970773339271545,
0.2877134084701538,
-0.18027560412883759,
0.3872918486595154,
-0.059189073741436005,
-0.20088687539100647,
-0.10038506984710693,
-0.32600152492523193,
-0.07079754024744034,
0.053894080221652985,
-0.5079113245010376,
0.0659915953874588,
0.2665913999080658,
-0.10800611972808838,
0.0369441881775856,
-0.11514464765787125,
0.00832383707165718,
-0.0879053995013237,
0.031960949301719666,
-0.10044991970062256,
0.39073094725608826,
0.18714775145053864,
0.011499691754579544,
0.2778914272785187,
0.23987960815429688,
0.14055873453617096,
0.19746482372283936,
-0.12651100754737854,
-0.152084618806839,
-0.34540483355522156,
-0.09902523458003998,
0.054588433355093,
-0.2433689683675766,
0.09491604566574097,
-0.4390835464000702,
0.10105723142623901,
-0.41471943259239197,
-0.4117025136947632,
-0.25555309653282166,
0.22859987616539001,
-0.21354228258132935,
-0.08406145870685577,
0.40525129437446594,
0.23859013617038727,
-0.46601924300193787,
-0.06482510268688202,
-0.006912090815603733,
-0.0840902179479599,
0.008350059390068054,
0.31625157594680786,
-0.08031797409057617,
-0.21086385846138,
-0.255883127450943,
-0.16872090101242065,
0.25329703092575073,
-0.2221957892179489,
-0.44827336072921753,
0.3749241232872009,
-0.2196601927280426,
-0.34770748019218445,
-0.03508283942937851,
0.1464124470949173,
0.03331915661692619,
0.008507826365530491,
0.08169186860322952,
-0.05588367581367493,
0.3327183425426483,
-0.08318499475717545,
-0.2511982023715973,
-0.24012762308120728,
-0.15511441230773926,
0.0158466175198555,
0.06913450360298157,
0.0527191199362278,
-0.017146147787570953,
-0.40118059515953064,
0.3792784512042999,
0.10662836581468582,
0.025533705949783325,
0.24723106622695923,
0.5742747783660889,
0.12221184372901917,
0.32271715998649597,
-0.0233406201004982,
0.06724128872156143,
0.21036332845687866,
-0.4262334406375885,
-0.07456350326538086,
-0.1556176096200943,
-0.021890345960855484,
-0.4174184203147888,
0.009240755811333656,
0.09621678292751312,
0.18788938224315643,
-0.009333327412605286,
0.03193969652056694,
-0.02176915481686592,
0.35353800654411316,
-0.2437216341495514,
0.1869433969259262,
-0.2955031394958496,
0.21345049142837524,
-0.23795126378536224,
0.2607472240924835,
-0.06294435262680054,
0.02319420874118805,
0.05778735131025314,
-0.22933116555213928,
0.34236446022987366,
-0.12804070115089417,
-0.058300524950027466,
0.3623226583003998,
-0.15286271274089813,
0.05496716871857643,
0.23051217198371887,
0.2978942394256592,
0.4421079158782959,
-0.4142111539840698,
-0.2245531976222992,
-0.06293651461601257,
-0.03985714912414551,
0.0975474938750267,
-0.18876639008522034,
0.021551325917243958,
-0.35200151801109314,
0.10365696251392365,
0.09965565800666809,
0.19171802699565887,
0.16018356382846832,
0.18821795284748077,
-0.10100069642066956,
0.002272956073284149,
0.28007203340530396,
0.15634191036224365,
-0.2974216938018799,
-0.16823118925094604,
0.20721369981765747,
0.15790659189224243,
-0.13052719831466675,
0.11895821988582611,
-0.10859221965074539,
-0.1552525758743286,
0.054803065955638885,
-0.1599017083644867,
0.37495580315589905,
0.5386202335357666,
-0.0626678317785263,
0.03295709192752838,
0.007174607366323471,
0.35512077808380127,
-0.2015688419342041,
0.05977087467908859,
0.14443399012088776,
0.0764961764216423,
0.1325681358575821,
-0.08357440680265427,
-0.1139039546251297,
-0.18392543494701385,
-0.2362338900566101,
-0.06767164170742035,
0.3218698799610138,
0.4108898937702179,
-0.521179735660553,
-0.0033427011221647263,
-0.2360997051000595,
-0.9295298457145691,
0.3704569935798645,
-0.1626548320055008,
0.1249600350856781,
-0.5312139391899109,
-0.19290070235729218,
0.4079391658306122,
-0.17545995116233826,
0.09662685543298721,
-0.41324296593666077,
0.09623046964406967,
-0.10763989388942719,
0.06299030780792236,
-0.18131795525550842,
-0.22190779447555542,
-0.08977515250444412,
0.04815729334950447,
0.2052413821220398,
0.21311867237091064,
0.011437606066465378,
-0.2560478150844574,
-0.2642010450363159,
-0.38600271940231323,
-0.36674070358276367,
0.2810963988304138,
-0.18259766697883606,
0.30453798174858093,
0.16732215881347656,
0.33023539185523987,
-0.4244982600212097,
0.3104456961154938,
0.4805697798728943,
-0.2595153748989105,
-0.0014080274850130081,
-0.14951519668102264,
-0.20337718725204468,
-0.09648758172988892,
0.013635501265525818,
-0.3006132245063782,
0.25647300481796265,
-0.21398822963237762,
0.15563607215881348,
-0.17488498985767365,
0.06550410389900208,
0.19736522436141968,
0.13070088624954224,
-0.056709472090005875,
0.06975921243429184,
0.03378839045763016,
-0.21750319004058838,
-0.6194819211959839,
0.09194433689117432,
-0.0881182923913002,
-0.3850501775741577,
0.3859245777130127,
0.24795259535312653,
0.34686365723609924,
0.10767222195863724,
-0.38727182149887085,
-0.3524670898914337,
-0.19385018944740295,
-0.3277113139629364,
-0.04592491686344147,
-0.3186802268028259,
0.021696656942367554,
-0.1530197411775589,
-0.14294938743114471,
0.051840730011463165,
-0.03448780998587608,
-0.11957710236310959,
0.07881130278110504,
0.38400354981422424,
0.042507268488407135,
0.38109591603279114,
0.25679659843444824,
0.04663041979074478,
0.10467813909053802,
0.2431396096944809,
0.2764173150062561,
-0.23167985677719116,
0.4423372447490692,
0.1854129135608673,
-0.18013815581798553,
-0.048684459179639816,
-0.11585158109664917,
-0.025625357404351234,
-0.11632180213928223,
0.29881981015205383,
0.03546547889709473,
-0.3997957110404968,
-0.14929895102977753,
-0.4659785330295563,
-0.1349535435438156,
0.026056423783302307,
0.06867130100727081,
0.05626189708709717,
0.2437334656715393,
0.3572356104850769,
0.059434596449136734,
-0.17403250932693481,
0.2088461071252823,
0.1220327764749527,
0.16564959287643433,
0.004736341070383787,
-0.1947111338376999,
-0.0586850680410862,
-0.2897363603115082,
0.1413111686706543,
0.017412954941391945,
0.34751954674720764,
-0.3732067048549652,
0.05216953158378601,
0.30777686834335327,
-0.18677733838558197,
0.448091983795166,
-0.3366478681564331,
0.3045550584793091,
0.2702639102935791,
-0.14450696110725403,
-0.49745726585388184,
0.10444320738315582,
0.16143164038658142,
0.13146157562732697,
0.5968834757804871,
-0.03318384289741516,
-0.21120581030845642,
-0.0659170001745224,
0.15861085057258606,
-0.3153964877128601,
-0.053499508649110794,
0.0011649709194898605,
-0.19146905839443207,
-0.18428659439086914,
-0.04244564101099968,
-0.2190646231174469,
0.12882550060749054,
0.050335027277469635,
0.009142578579485416,
-0.13499580323696136,
0.2509390413761139,
-0.13671818375587463,
0.026927225291728973,
0.381602942943573,
0.2030031383037567,
-0.03533441573381424,
0.05532937869429588,
0.7571618556976318,
0.6979151964187622,
0.0692073330283165,
0.7083930969238281,
0.23398876190185547,
-0.10728621482849121,
0.1802186667919159,
0.05901699140667915,
-0.08144962042570114,
0.35884010791778564,
-0.14398221671581268,
0.14961718022823334,
0.42550620436668396,
0.020446721464395523,
-0.19791488349437714,
0.11262234300374985,
0.4837383031845093,
0.07409117370843887,
-0.486927330493927,
-0.22718608379364014,
0.37301161885261536,
0.12700121104717255,
-0.26490408182144165,
0.6205258965492249,
0.534790575504303,
0.08783304691314697,
-0.03209224343299866,
-0.04890836030244827,
0.9178367257118225,
-0.016273051500320435,
0.020424652844667435,
0.033012211322784424,
-0.14009997248649597,
0.38876432180404663,
0.21300296485424042,
0.15901483595371246,
-0.3518597185611725,
-0.08975255489349365,
-0.13925746083259583,
-0.010561559349298477,
0.01080542802810669,
-0.18405017256736755,
0.08160027861595154,
0.14489775896072388,
0.031097956001758575,
0.24363543093204498,
-0.06846919655799866,
-0.05122266709804535,
-0.20685167610645294,
0.23907265067100525,
-0.09642408788204193,
0.046937279403209686,
-0.07735030353069305,
0.015158198773860931,
-0.21619808673858643,
-0.05458129942417145,
-0.2731420695781708,
-0.031214438378810883,
-0.31868845224380493,
-0.0072723254561424255,
-0.27694424986839294,
0.24142546951770782,
-0.1648305505514145,
-0.28488868474960327,
0.11047029495239258,
0.05778059735894203,
0.09853298962116241,
0.005853228271007538,
-0.47420650720596313,
0.29493945837020874,
-0.5396025776863098,
-0.02031824365258217,
0.04417399689555168,
0.037315815687179565,
0.0762224867939949,
0.013214688748121262,
-0.39344707131385803,
0.0694478452205658,
0.14243875443935394,
0.01735730469226837,
-0.3150576055049896,
0.09741273522377014,
0.03177125006914139,
-0.124088354408741,
0.3202788233757019,
-0.28513067960739136,
-0.23054121434688568,
-0.26824289560317993,
0.031759753823280334,
0.19886155426502228,
0.024277906864881516,
0.18425032496452332,
0.463689386844635,
-0.1588324010372162,
0.0002962220460176468,
0.4449673593044281,
-0.3965670168399811,
-0.11721547693014145,
0.13376674056053162,
0.2441588193178177,
-0.1617470383644104,
-0.04796205833554268,
-0.07575315982103348,
-0.18636658787727356,
-0.20261240005493164,
-0.07829370349645615,
0.15110979974269867,
0.22070278227329254,
0.17037557065486908,
-0.010930154472589493,
0.21905659139156342,
0.060078565031290054,
-0.18878978490829468,
-0.38380569219589233,
-0.10522336512804031,
0.3209524154663086,
-0.2614007294178009,
0.07819667458534241,
-0.16724467277526855,
-0.2544642984867096,
0.27123621106147766,
-0.33839350938796997,
-0.19618001580238342,
0.1653904765844345,
-0.1538517028093338,
-0.1728721559047699,
-0.09367742389440536,
0.04068334028124809,
0.35110142827033997,
-0.37508493661880493,
-0.05065470188856125,
0.042766325175762177,
-0.13789667189121246,
-0.0012852568179368973,
-0.0965728759765625,
0.11131422966718674,
0.07014772295951843,
-0.3717036247253418,
-0.056794680655002594,
-0.061541128903627396,
-0.07468540966510773,
0.11768209934234619,
-0.09955255687236786,
0.22542500495910645,
0.204771026968956,
-0.1946120262145996,
-0.3576391339302063,
-0.18638253211975098,
-0.0023663192987442017,
0.5131639838218689,
0.07646346092224121,
0.2148323953151703,
0.2505907416343689,
0.10803481936454773,
0.12958334386348724,
-0.21901772916316986,
-0.1577783226966858,
-0.09723152965307236,
-0.09055672585964203,
-0.15646979212760925,
0.5716461539268494,
-0.33791297674179077,
0.10858143866062164,
-0.023505983874201775,
0.5846176147460938,
0.14269843697547913,
0.22787171602249146,
0.039729975163936615,
0.1335187554359436,
0.12521110475063324,
-0.01705765724182129,
0.040516383945941925,
0.21667413413524628,
0.14464862644672394,
0.0734138935804367,
-0.17041859030723572,
0.34308889508247375,
-0.25895369052886963,
-0.15660318732261658,
0.09993670880794525,
0.37417173385620117,
-0.031293146312236786,
0.18367117643356323,
-0.04725554957985878,
-0.01955094188451767,
-0.11251130700111389,
-0.07377631217241287,
0.06272773444652557,
0.16245625913143158,
0.546224057674408,
0.01237756758928299,
0.15709121525287628,
-0.3323865234851837,
0.5001969933509827,
-0.3105209469795227,
-0.24960163235664368,
-0.29132962226867676,
0.3266277015209198,
-0.5067829489707947,
-0.061478860676288605,
-0.11868831515312195,
0.5589180588722229,
0.026305483654141426,
0.0950549766421318,
-0.30338728427886963,
0.08115421235561371,
0.03690307214856148,
0.026519887149333954,
-0.7527365684509277,
-0.18130911886692047,
0.0020201876759529114,
0.09318329393863678,
0.05499231815338135,
0.04731859266757965,
-0.12152513861656189,
0.17749226093292236,
-0.08210217952728271,
-0.5208656787872314,
-0.13072988390922546,
0.23375293612480164,
0.3731474280357361,
-0.044223442673683167,
0.0012987460941076279,
0.2727487087249756,
-0.07536672055721283,
0.376666396856308,
0.32147324085235596,
0.48605287075042725,
-0.0773206576704979,
0.19195447862148285,
0.005612227134406567,
-0.2616093158721924,
-0.007388228550553322,
-0.2026209533214569,
0.0694982036948204,
0.2535250782966614,
-0.19509348273277283,
0.288186252117157,
0.06851288676261902,
-0.07668890804052353,
0.08112452924251556,
-0.3625647723674774,
0.36672839522361755,
0.19135388731956482,
0.20026814937591553,
-0.31944021582603455,
-0.11998587846755981,
-0.13231860101222992,
-0.2863597869873047,
-0.4358305335044861,
0.0348152294754982,
0.3101215064525604,
-0.1490548551082611,
0.1466791033744812,
-0.12298256903886795,
-0.021620897576212883,
-0.01632138341665268,
0.49414539337158203,
0.3594266176223755,
0.39824697375297546,
0.03912360966205597,
-0.38769495487213135,
-0.3825308382511139,
0.07739084959030151,
-0.11501564085483551,
0.24582061171531677,
0.05454164370894432,
0.013996066525578499,
-0.116154246032238,
-0.0489431768655777,
0.6672637462615967,
0.30391764640808105,
-0.29469066858291626,
0.19662845134735107,
-0.36446958780288696,
0.11346334218978882,
0.1354469358921051,
0.17681504786014557,
-0.3705221116542816,
0.018763720989227295,
0.414192795753479,
0.05869823321700096,
-0.1479547917842865,
-0.06737207621335983,
0.057472772896289825,
-0.6192582249641418,
-0.38906028866767883,
0.3055414855480194,
0.40655818581581116,
0.4150024950504303,
0.1840575933456421,
0.0122488122433424,
-0.6105978488922119,
-0.45740190148353577,
0.12771070003509521,
0.25310149788856506,
0.46537843346595764,
0.4028535783290863,
0.11238103359937668,
-0.24721382558345795,
-0.09039294719696045,
0.39561259746551514,
-0.027358515188097954,
0.10167044401168823,
-0.16993969678878784,
-0.13427558541297913,
-0.018430404365062714,
0.11880044639110565,
0.03137148171663284,
0.014526069164276123,
0.16539855301380157,
0.03333012014627457,
0.0024092793464660645,
-0.3692001402378082,
0.49135836958885193,
-0.37167391180992126,
0.10721799731254578,
-0.2585362493991852,
0.24905674159526825,
0.25181663036346436,
0.1560692936182022,
0.042076848447322845,
-0.06816574931144714,
-0.03333910182118416,
0.18735858798027039,
0.008942574262619019,
0.2566308081150055,
-0.18747495114803314,
0.12745139002799988,
-0.10492360591888428,
0.19930347800254822,
-0.07553689181804657,
-0.24611102044582367,
0.04783264920115471,
0.08947725594043732
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 28
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables
|
[
-0.20426923036575317,
-0.12143205851316452,
0.09346702694892883,
-0.11213943362236023,
0.3825293183326721,
0.020822659134864807,
0.13100329041481018,
0.12659212946891785,
-0.06272535771131516,
0.13656212389469147,
0.07379933446645737,
-0.17025944590568542,
0.20303985476493835,
0.0988144651055336,
0.11162304878234863,
-0.07560831308364868,
0.08502167463302612,
-0.08466209471225739,
-0.01537005603313446,
0.15250805020332336,
0.00432843342423439,
0.04321904107928276,
-0.10512727499008179,
-0.07527841627597809,
-0.03528634086251259,
-0.023391282185912132,
0.05624130368232727,
0.3531201183795929,
-0.21631385385990143,
0.06892178952693939,
0.23245097696781158,
0.11022672057151794,
-0.01473076082766056,
0.5418378114700317,
-0.00012808898463845253,
0.18010260164737701,
0.3985251784324646,
-0.19876764714717865,
-0.30223551392555237,
-0.35648059844970703,
-0.374220609664917,
0.025195566937327385,
-0.017462067306041718,
-0.04454425349831581,
-0.0041061993688344955,
-0.06256517022848129,
0.33182790875434875,
-0.5658835768699646,
0.39569365978240967,
0.290321946144104,
0.06492439657449722,
0.14576013386249542,
-0.06535033136606216,
0.3334336280822754,
-0.05877210944890976,
0.07031429558992386,
-0.23478376865386963,
-0.036087408661842346,
0.2091001272201538,
0.09337964653968811,
0.1936873197555542,
0.4084996283054352,
-0.36347487568855286,
0.011075124144554138,
0.45136818289756775,
-0.12768541276454926,
-0.14484891295433044,
-0.37434452772140503,
-0.05993308126926422,
0.5890178680419922,
0.5121992230415344,
-0.29557502269744873,
-0.5465813875198364,
-0.2975996434688568,
0.04363647848367691,
-0.1178027093410492,
0.26182249188423157,
0.25693315267562866,
-0.057283736765384674,
0.1519845575094223,
-0.006707037799060345,
-0.1700061559677124,
-0.2250123769044876,
0.09692612290382385,
0.09679445624351501,
0.3142452836036682,
-0.050729475915431976,
0.16361039876937866,
0.03464261442422867,
-0.04994802922010422,
-0.22555845975875854,
-0.36171895265579224,
-0.18163013458251953,
0.1437319815158844,
-0.2393888682126999,
0.1515968292951584,
0.00007967650890350342,
0.1993553638458252,
0.1269811987876892,
0.22331546247005463,
-0.027217596769332886,
0.13300848007202148,
-0.27792856097221375,
0.17310191690921783,
0.08010276407003403,
0.1604243665933609,
-0.019433684647083282,
0.20534001290798187,
0.3491918444633484,
0.2384384721517563,
0.06217693164944649,
-0.19419610500335693,
0.3821061849594116,
0.026277661323547363,
-0.4878254234790802,
-0.07403306663036346,
0.7425768375396729,
-0.24107804894447327,
-0.3629046678543091,
0.16079460084438324,
-0.47972485423088074,
0.09179169684648514,
0.16180245578289032,
0.39721396565437317,
-0.22836308181285858,
0.398549884557724,
0.1670866757631302,
0.31268852949142456,
-0.21478913724422455,
-0.2069440633058548,
-0.08731389790773392,
-0.1753106266260147,
0.07219256460666656,
0.12940378487110138,
-0.015256920829415321,
-0.15104460716247559,
0.33977025747299194,
-0.038357943296432495,
0.23550377786159515,
0.023957356810569763,
0.030208101496100426,
-0.07147243618965149,
-0.010753579437732697,
0.3719325065612793,
-0.03268112614750862,
0.13717392086982727,
0.19700169563293457,
-0.14984174072742462,
0.05729614943265915,
-0.016422845423221588,
-0.04463762044906616,
-0.2710598409175873,
-0.095393106341362,
0.0371612012386322,
-0.24821287393569946,
-0.09266938269138336,
-0.39922383427619934,
0.1805303543806076,
-0.283490389585495,
-0.2126094549894333,
0.2007475644350052,
0.09516482055187225,
-0.25021371245384216,
0.16292858123779297,
0.31512829661369324,
0.7508364915847778,
-0.2944329082965851,
-0.18382802605628967,
0.11789628118276596,
-0.20439745485782623,
0.4262455105781555,
0.11164313554763794,
0.007502006366848946,
-0.2771199345588684,
-0.1387520134449005,
0.19628898799419403,
0.24538898468017578,
-0.3456040322780609,
-0.5485817193984985,
0.3150630295276642,
-0.1760641485452652,
0.43365538120269775,
0.35271012783050537,
0.20045864582061768,
-0.02099589630961418,
-0.011880644597113132,
-0.1239176094532013,
0.47471606731414795,
-0.26094284653663635,
0.12874335050582886,
-0.18347470462322235,
-0.29063841700553894,
0.06766340136528015,
0.07216392457485199,
-0.21172554790973663,
0.2595530152320862,
-0.048920102417469025,
-0.1037638932466507,
0.26232263445854187,
-0.06793980300426483,
0.06775190681219101,
0.30633217096328735,
0.3224102258682251,
0.49773913621902466,
-0.10878073424100876,
-0.11765877157449722,
-0.29174718260765076,
0.026078149676322937,
0.24913084506988525,
-0.08402174711227417,
-0.12529318034648895,
-0.2952367067337036,
-0.14236941933631897,
-0.13278217613697052,
-0.12233610451221466,
-0.21126598119735718,
-0.10008711367845535,
0.3999805152416229,
-0.0016389284282922745,
0.17791956663131714,
-0.25796136260032654,
0.6626657247543335,
-0.3690185248851776,
0.0793953686952591,
-0.2932070791721344,
0.23653768002986908,
0.07125198096036911,
-0.09767170250415802,
-0.10898379236459732,
0.01615845412015915,
0.2977716326713562,
-0.12356827408075333,
-0.24563390016555786,
0.4923401176929474,
0.04356364905834198,
0.3722555637359619,
0.21949100494384766,
0.07198718190193176,
0.21030250191688538,
-0.21569116413593292,
-0.06631889194250107,
0.44727903604507446,
0.2528984546661377,
0.06633057445287704,
-0.04218841344118118,
0.1399664282798767,
0.22879421710968018,
0.3094944357872009,
0.023082733154296875,
0.0047753602266311646,
0.35261327028274536,
0.0919465720653534,
-0.3894207179546356,
-0.029828909784555435,
0.4949888586997986,
-0.2215951681137085,
0.27128875255584717,
-0.17593805491924286,
-0.43449488282203674,
0.10358105599880219,
-0.11054541170597076,
0.05289314314723015,
0.022268138825893402,
-0.006390426307916641,
-0.09601930528879166,
0.06777268648147583,
0.013367078267037868,
0.2893185317516327,
0.3282047510147095,
0.019313756376504898,
-0.29944169521331787,
0.20164041221141815,
0.09912659972906113,
-0.16884420812129974,
0.1275254487991333,
0.08343588560819626,
0.025074301287531853,
-0.06791358441114426,
0.07589273154735565,
-0.0028245458379387856,
-0.2122061550617218,
-0.250230073928833,
-0.20776444673538208,
0.029133372008800507,
-0.5222564339637756,
0.3779042661190033,
-0.3264787793159485,
-0.5768654346466064,
-0.0014843009412288666,
-0.08389157056808472,
-0.2722349166870117,
-0.38048499822616577,
-0.10530033707618713,
0.42004844546318054,
-0.21180395781993866,
0.2092932164669037,
-0.5415737628936768,
0.1482161581516266,
0.14504560828208923,
-0.2936742305755615,
-0.35543403029441833,
0.0835447609424591,
-0.08371161669492722,
-0.09616601467132568,
0.11766402423381805,
-0.08551722764968872,
0.3166118860244751,
-0.07667743414640427,
-0.46047860383987427,
-0.4318907856941223,
-0.215940922498703,
-0.0663025975227356,
0.010557295754551888,
0.536932647228241,
-0.04852557182312012,
0.45699435472488403,
-0.10047668218612671,
-0.15383093059062958,
0.23353657126426697,
-0.03388208895921707,
0.0075272805988788605,
-0.12755553424358368,
0.08540652692317963,
0.13718292117118835,
-0.026189345866441727,
0.008008517324924469,
-0.3043273687362671,
-0.27915510535240173,
-0.04635979235172272,
-0.40694600343704224,
-0.03395120054483414,
0.31610801815986633,
-0.13638071715831757,
0.014688109047710896,
-0.25350135564804077,
-0.032187916338443756,
-0.10049828886985779,
-0.5724442005157471,
0.32522183656692505,
0.03080645203590393,
-0.167659193277359,
0.22356590628623962,
0.15448348224163055,
-0.45502912998199463,
0.2599550485610962,
-0.43295884132385254,
-0.48739150166511536,
-0.04338802397251129,
-0.026162533089518547,
-0.08900091052055359,
-0.14091740548610687,
0.12566639482975006,
-0.3310079276561737,
0.1593407243490219,
-0.29882919788360596,
-0.176735520362854,
-0.12134132534265518,
0.08354710042476654,
0.3874213993549347,
0.08030377328395844,
0.633512556552887,
-0.03178905323147774,
0.7957072854042053,
0.21677759289741516,
0.23160779476165771,
0.5836790800094604,
-0.09050257503986359,
0.39913445711135864,
-0.011576645076274872,
-0.2328522801399231,
0.255206435918808,
0.13247564435005188,
-0.1511593610048294,
-0.049718305468559265,
0.07988542318344116,
0.17601720988750458,
-0.18679915368556976,
0.09500403702259064,
-0.18644267320632935,
-0.1632579118013382,
-0.09828879684209824,
-0.052250660955905914,
0.09921345859766006,
0.1641487032175064,
0.18781712651252747,
0.09641465544700623,
-0.1831779181957245,
-0.10502244532108307,
0.5957019329071045,
0.264849990606308,
0.20652541518211365,
-0.0004936344921588898,
-0.10860063880681992,
-0.7079076170921326,
0.34741878509521484,
0.17640246450901031,
0.37916862964630127,
-0.24330589175224304,
0.06251610815525055,
0.08915822952985764,
-0.060984108597040176,
0.6994501948356628,
-0.11644881218671799,
0.1804620325565338,
-0.08101710677146912,
-0.05426348000764847,
-0.33724871277809143,
-0.15362395346164703,
0.13404668867588043,
0.3538964092731476,
0.26247578859329224,
-0.1631631702184677,
-0.334548681974411,
0.00886785238981247,
0.028691105544567108,
-0.10188023746013641,
0.0805836021900177,
-0.0018649715930223465,
-0.4174274802207947,
-0.3597964942455292,
-0.1029304787516594,
-0.016411513090133667,
-0.06725068390369415,
0.0928453654050827,
0.09554146230220795,
0.12337872385978699,
0.0008392967283725739,
0.14775457978248596,
-0.07309156656265259,
-0.05394398048520088,
0.2324676811695099,
0.10661303997039795,
0.0663910061120987,
0.20124408602714539,
0.3504939675331116,
0.16822823882102966,
0.5492626428604126,
0.414893239736557,
-0.590219259262085,
-0.06777088344097137,
0.23978208005428314,
-0.02743256837129593,
0.47829294204711914,
-0.05966939404606819,
0.15344086289405823,
0.5290064811706543,
0.22837714850902557,
-0.2155630886554718,
0.23687784373760223,
0.37307870388031006,
0.0721762627363205,
-0.01883649453520775,
-0.6389553546905518,
0.41277626156806946,
0.0746450126171112,
0.13488778471946716,
0.5197599530220032,
0.40318846702575684,
-0.1936061531305313,
-0.03785106912255287,
-0.22302153706550598,
0.8972418308258057,
0.1589348167181015,
0.04382934048771858,
0.29168766736984253,
-0.07760317623615265,
0.35511210560798645,
-0.3130272626876831,
0.2500156760215759,
0.009959135204553604,
-0.3734777569770813,
-0.19530588388442993,
-0.07049432396888733,
0.30509236454963684,
-0.4498366117477417,
-0.171587273478508,
0.3134850561618805,
-0.04011544585227966,
0.16221289336681366,
0.028922762721776962,
-0.05287013202905655,
-0.5711421370506287,
-0.1358572244644165,
-0.6279260516166687,
-0.008879298344254494,
-0.3099336624145508,
0.35560402274131775,
-0.0008082613348960876,
-0.047067295759916306,
-0.09857998788356781,
-0.14023149013519287,
-0.46108049154281616,
0.30298224091529846,
-0.49259182810783386,
-0.1969025433063507,
-0.22539064288139343,
-0.09722664207220078,
0.00002755597233772278,
0.03669075295329094,
-0.0745098739862442,
-0.0770171582698822,
-0.41895821690559387,
0.474785178899765,
-0.2069099247455597,
0.03946470469236374,
0.028470756486058235,
-0.09820882230997086,
0.21657636761665344,
0.016176067292690277,
-0.2528989315032959,
0.047644250094890594,
-0.13343173265457153,
-0.33319270610809326,
0.05337560176849365,
-0.24627886712551117,
0.3316119909286499,
0.04311898350715637,
-0.19267401099205017,
-0.01123000681400299,
0.2171967625617981,
-0.11340980231761932,
0.002114688977599144,
-0.07843698561191559,
-0.266009122133255,
-0.0451727956533432,
-0.05566055700182915,
-0.25395339727401733,
-0.11721783876419067,
0.5241880416870117,
-0.38500335812568665,
0.2627107501029968,
0.5709682703018188,
0.15849877893924713,
-0.07981236279010773,
-0.026387352496385574,
0.06330866366624832,
-0.2734282910823822,
-0.0006909668445587158,
0.17192058265209198,
0.04779353737831116,
0.03866676986217499,
-0.2633732855319977,
0.046253643929958344,
-0.21833191812038422,
-0.18579891324043274,
-0.017371390014886856,
-0.5469328165054321,
-0.04572479426860809,
0.06724012643098831,
-0.1986846923828125,
-0.015486929565668106,
0.23901841044425964,
0.15027767419815063,
0.2064884454011917,
-0.12611833214759827,
-0.1505686491727829,
-0.15347610414028168,
-0.09648467600345612,
0.0815887376666069,
0.278469443321228,
0.27389129996299744,
0.3941863775253296,
-0.2100612223148346,
-0.08768850564956665,
0.07579895853996277,
-0.26138538122177124,
-0.041963979601860046,
-0.21109792590141296,
0.21409322321414948,
0.10951778292655945,
-0.5341967940330505,
-0.10583864897489548,
-0.4233165383338928,
-0.13777944445610046,
-0.1446225792169571,
0.14999282360076904,
0.4923091530799866,
0.058521922677755356,
-0.22163143754005432,
-0.04694544896483421,
0.13248105347156525,
-0.10136407613754272,
0.09205105900764465,
-0.04765497148036957,
0.3551616668701172,
0.09766922891139984,
0.05615955963730812,
-0.019578341394662857,
0.015476353466510773,
-0.15528710186481476,
-0.11716226488351822,
0.06610782444477081,
0.2890385687351227,
0.38922828435897827,
-0.16859708726406097,
0.03901699557900429,
0.2515721619129181,
0.33129599690437317,
0.2934025824069977,
-0.13197985291481018,
0.01205575279891491,
0.3021545708179474,
0.023649096488952637,
-0.02592981792986393,
0.06347117573022842,
0.5482989549636841,
0.2320566326379776,
0.16172082722187042,
0.019244275987148285,
-0.08165646344423294,
0.04012598097324371,
0.018783286213874817,
0.09549712389707565,
0.4451165795326233,
0.20387935638427734,
0.554786741733551,
0.10101234912872314,
0.06398992240428925,
0.21777355670928955,
-0.15503941476345062,
0.14141610264778137,
0.1989082396030426,
0.3944428563117981,
0.029094528406858444,
0.2721705138683319,
-0.0398373156785965,
0.12045891582965851,
-0.29054176807403564,
-0.42626750469207764,
-0.09979081153869629,
0.04546225816011429,
-0.2606077492237091,
0.39487361907958984,
0.019810691475868225,
-0.014401540160179138,
-0.471906453371048,
-0.06989012658596039,
-0.21132643520832062,
0.2172963172197342,
0.05441682040691376,
-0.17191752791404724,
-0.16437645256519318,
-0.028853461146354675,
0.18137884140014648,
0.15519224107265472,
0.07738670706748962,
-0.01608242839574814,
-0.0016748607158660889,
0.09134021401405334,
-0.06367456912994385,
-0.32380035519599915,
0.004448810592293739,
0.0891968160867691,
0.497991681098938,
-0.18063636124134064,
0.23819385468959808,
0.08742780238389969,
0.031822897493839264,
0.30997827649116516,
0.3777470886707306,
0.37978219985961914,
0.27201420068740845,
0.03165888041257858,
0.17813007533550262,
0.1881284862756729,
-0.048546262085437775,
0.06228462606668472,
0.01429974939674139,
0.047867655754089355,
-0.2169131636619568,
0.19694717228412628,
0.03083457611501217,
-0.04295431822538376,
0.12238243222236633,
-0.01656842604279518,
0.4625835716724396,
-0.45218712091445923,
0.02850663661956787,
-0.39643484354019165,
0.4233803451061249,
-0.34725016355514526,
-0.03976013511419296,
-0.27361151576042175,
0.4078325927257538,
0.18574367463588715,
-0.06776834279298782,
0.1464982032775879,
0.005294168833643198,
-0.037717707455158234,
-0.12656868994235992,
0.22744181752204895,
0.523918628692627,
-0.1338074803352356,
-0.18565553426742554,
-0.022338636219501495,
-0.3326876163482666,
0.10639312118291855,
-0.17148473858833313,
-0.3622102737426758,
-0.10863946378231049,
0.1943119466304779,
-0.008535586297512054,
0.07906468212604523,
0.19606199860572815,
0.11895345896482468,
0.08584452420473099,
0.05144505947828293,
-0.17309151589870453,
-0.3285684883594513,
-0.4262298345565796,
0.21814818680286407,
-0.044727519154548645,
-0.24079859256744385,
0.14393970370292664,
0.09456425905227661,
-0.10059615224599838,
0.2048950344324112,
-0.29745611548423767,
-0.2603102922439575,
-0.36910682916641235,
0.2541768550872803,
0.08928262442350388,
0.19252488017082214,
-0.08499454706907272,
-0.08509746938943863,
-0.28183040022850037,
-0.17750802636146545,
-0.29629501700401306,
-0.3125944435596466,
-0.21050119400024414,
0.41876962780952454,
-0.3003455102443695,
-0.042552489787340164,
-0.4294651448726654,
0.5008692145347595,
0.022198542952537537,
-0.14184615015983582,
-0.2155671864748001,
0.15845754742622375,
-0.2753881812095642,
0.1947609782218933,
-0.30027273297309875,
0.07857365906238556,
-0.14928555488586426,
0.12046492099761963,
-0.21925309300422668,
-0.15452854335308075,
0.7189846038818359,
-0.3295634388923645,
-0.057588957250118256,
-0.18018107116222382,
0.11928202211856842,
0.32721295952796936,
0.03687752038240433,
-0.22702747583389282,
0.32964637875556946,
0.08596370369195938,
0.06782033294439316,
-0.08173660933971405,
-0.004433033987879753,
-0.10790011286735535,
0.11802288889884949,
-0.06753937900066376,
-0.08890344202518463,
0.1428062915802002,
-0.06298273056745529,
0.4813258945941925,
-0.05599839985370636
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 62
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
|
[
-0.1559554636478424,
-0.09131598472595215,
0.09897123277187347,
-0.10627833008766174,
0.39636754989624023,
-0.004847139120101929,
0.11199110746383667,
0.07572492957115173,
0.031647346913814545,
0.15219254791736603,
0.08398032933473587,
-0.2124066799879074,
0.17867860198020935,
0.16441498696804047,
0.11753101646900177,
-0.05936216562986374,
0.06601665914058685,
-0.08707571029663086,
-0.01852589100599289,
0.1428113579750061,
-0.021386299282312393,
0.07532365620136261,
-0.11778221279382706,
-0.17152531445026398,
-0.040591467171907425,
0.007949251681566238,
0.034168586134910583,
0.3309136927127838,
-0.22331753373146057,
0.05180487036705017,
0.23454849421977997,
0.11952489614486694,
-0.03845740482211113,
0.5335403680801392,
-0.00013006935478188097,
0.19265542924404144,
0.36282604932785034,
-0.21521548926830292,
-0.3137785792350769,
-0.4074127674102783,
-0.32015806436538696,
-0.029922321438789368,
-0.025486597791314125,
-0.0011267438530921936,
-0.03248070925474167,
-0.09635749459266663,
0.34380149841308594,
-0.5672945976257324,
0.355787992477417,
0.25780653953552246,
0.04479922354221344,
0.10701897740364075,
-0.03676265478134155,
0.33295518159866333,
-0.003160126507282257,
0.09398585557937622,
-0.24240776896476746,
0.06954269111156464,
0.19521036744117737,
0.07143834233283997,
0.2042403370141983,
0.4041765034198761,
-0.35363444685935974,
0.02702360413968563,
0.5253281593322754,
-0.119293712079525,
-0.2252160906791687,
-0.3824129104614258,
-0.08124382048845291,
0.5652778148651123,
0.5512085556983948,
-0.31665873527526855,
-0.5345050692558289,
-0.304705947637558,
0.008191226050257683,
-0.10826214402914047,
0.27288565039634705,
0.24227547645568848,
-0.06122536584734917,
0.1767500340938568,
-0.14173321425914764,
-0.24039793014526367,
-0.20164868235588074,
0.08208974450826645,
0.058272071182727814,
0.28515514731407166,
-0.026218146085739136,
0.1402595043182373,
0.009762432426214218,
0.007531549781560898,
-0.24727991223335266,
-0.36681613326072693,
-0.21053260564804077,
0.1497458666563034,
-0.2681582570075989,
0.15199199318885803,
0.020355001091957092,
0.1645318865776062,
0.17158454656600952,
0.23874197900295258,
-0.03377313166856766,
0.13947227597236633,
-0.279602974653244,
0.16697125136852264,
0.11601671576499939,
0.17578363418579102,
-0.08098248392343521,
0.22417856752872467,
0.323284387588501,
0.2613964080810547,
0.09812641143798828,
-0.20257920026779175,
0.4506736993789673,
0.025068264454603195,
-0.47776126861572266,
-0.05504518002271652,
0.7072630524635315,
-0.2410465031862259,
-0.37462612986564636,
0.17586655914783478,
-0.5214483141899109,
0.08877671509981155,
0.15633954107761383,
0.37457582354545593,
-0.25887608528137207,
0.36126407980918884,
0.18539011478424072,
0.3158632516860962,
-0.21650910377502441,
-0.1635150909423828,
-0.07764176279306412,
-0.12298333644866943,
0.049553316086530685,
0.16888581216335297,
0.04583955183625221,
-0.1790219098329544,
0.32811883091926575,
-0.02441905438899994,
0.18563683331012726,
0.060672178864479065,
0.04107378423213959,
-0.13378696143627167,
0.019068315625190735,
0.3735668957233429,
-0.026931077241897583,
0.12292274087667465,
0.20193910598754883,
-0.08588650822639465,
0.04335407167673111,
-0.04871626943349838,
-0.01674628257751465,
-0.2858099937438965,
-0.06537900865077972,
0.024860307574272156,
-0.2755628824234009,
-0.07508300244808197,
-0.41799959540367126,
0.2121153026819229,
-0.3034561574459076,
-0.21286135911941528,
0.17301973700523376,
0.11995814740657806,
-0.2734266221523285,
0.13214771449565887,
0.3656613826751709,
0.7913833856582642,
-0.328418105840683,
-0.17769767343997955,
0.14922979474067688,
-0.21403701603412628,
0.4181658625602722,
0.09011833369731903,
0.04036964103579521,
-0.22183862328529358,
-0.17303216457366943,
0.14631186425685883,
0.14756828546524048,
-0.25927552580833435,
-0.5617656111717224,
0.3360725939273834,
-0.1639670580625534,
0.4638229310512543,
0.2994549870491028,
0.17882688343524933,
0.0034136963076889515,
0.04953837767243385,
-0.1182231605052948,
0.49411284923553467,
-0.2546047866344452,
0.12279174476861954,
-0.18940004706382751,
-0.3260513246059418,
0.01887468434870243,
0.05897562578320503,
-0.13293901085853577,
0.29226741194725037,
-0.011418841779232025,
-0.10582692921161652,
0.20318293571472168,
-0.05393191799521446,
0.1005806103348732,
0.3541354537010193,
0.3483226001262665,
0.4678308367729187,
-0.09932808578014374,
-0.11468853056430817,
-0.3537766635417938,
0.06988849490880966,
0.19959332048892975,
-0.07809998095035553,
-0.13870638608932495,
-0.268365740776062,
-0.12387312203645706,
-0.1432662010192871,
-0.0870741605758667,
-0.24901214241981506,
-0.11857138574123383,
0.39604559540748596,
0.0036004260182380676,
0.17636145651340485,
-0.2658732235431671,
0.639387845993042,
-0.3186115026473999,
0.061000775545835495,
-0.3019166886806488,
0.30141299962997437,
0.05991588905453682,
-0.13050490617752075,
-0.10210055112838745,
-0.022536836564540863,
0.2787618339061737,
-0.09656839072704315,
-0.21312245726585388,
0.4885713756084442,
0.018277866765856743,
0.4105372428894043,
0.18724513053894043,
0.09544670581817627,
0.2722935676574707,
-0.24799194931983948,
-0.041487447917461395,
0.44997280836105347,
0.226685032248497,
0.07008557766675949,
-0.0877012386918068,
0.12327951192855835,
0.24726350605487823,
0.2865808308124542,
0.051411524415016174,
-0.006056339479982853,
0.29323679208755493,
0.10857483744621277,
-0.346303790807724,
-0.05431143939495087,
0.48972436785697937,
-0.11189407110214233,
0.2648696005344391,
-0.19466808438301086,
-0.42578548192977905,
0.15394876897335052,
-0.0957324355840683,
0.1113351434469223,
0.013101913034915924,
-0.003088477998971939,
-0.0748092457652092,
0.0058615244925022125,
0.05193213373422623,
0.25232547521591187,
0.3115648329257965,
-0.01837155595421791,
-0.2542419731616974,
0.2217639982700348,
0.09340261667966843,
-0.15413658320903778,
0.07437168061733246,
0.05678485333919525,
0.04973744973540306,
0.01658809185028076,
0.0455743707716465,
0.0025352323427796364,
-0.19373464584350586,
-0.22862307727336884,
-0.19361910223960876,
0.009835164994001389,
-0.5198339223861694,
0.3572041690349579,
-0.353407084941864,
-0.49214592576026917,
0.014846695587038994,
-0.13658349215984344,
-0.2671591341495514,
-0.3771859109401703,
-0.12223619222640991,
0.4715439975261688,
-0.21716712415218353,
0.16640020906925201,
-0.5109536051750183,
0.17193374037742615,
0.11267788708209991,
-0.3379652500152588,
-0.33097442984580994,
0.10914763808250427,
-0.03597516566514969,
-0.11254556477069855,
0.10672074556350708,
-0.05993431434035301,
0.28408339619636536,
-0.06663506478071213,
-0.4694820046424866,
-0.5087413787841797,
-0.20518359541893005,
-0.03810328245162964,
0.029673190787434578,
0.522558867931366,
-0.01656895875930786,
0.46536368131637573,
-0.10716742277145386,
-0.08887873589992523,
0.21313048899173737,
-0.0439290776848793,
-0.01582619734108448,
-0.12940722703933716,
0.07348907738924026,
0.1572694629430771,
-0.047974634915590286,
-0.009570620954036713,
-0.34680238366127014,
-0.25839823484420776,
-0.042235538363456726,
-0.3777872920036316,
-0.049678459763526917,
0.2819637656211853,
-0.10396330058574677,
0.020743153989315033,
-0.18435639142990112,
-0.07806429266929626,
-0.06888076663017273,
-0.5564314723014832,
0.3532792329788208,
0.023914914578199387,
-0.1616552323102951,
0.2634568214416504,
0.11919806897640228,
-0.503672182559967,
0.3749120235443115,
-0.4734151363372803,
-0.4362352788448334,
-0.05623854696750641,
-0.05165277421474457,
-0.07301139086484909,
-0.1622205227613449,
0.1671171933412552,
-0.32644084095954895,
0.18020552396774292,
-0.2923555374145508,
-0.20417118072509766,
-0.1211358979344368,
0.09198516607284546,
0.41350653767585754,
0.12279494106769562,
0.6361837387084961,
-0.03371419757604599,
0.8097466230392456,
0.19238443672657013,
0.28448376059532166,
0.6442714929580688,
-0.06357777118682861,
0.4439908564090729,
-0.014252036809921265,
-0.1984058916568756,
0.2640276849269867,
0.09141957759857178,
-0.19199806451797485,
-0.05450265109539032,
0.07857753336429596,
0.2048240303993225,
-0.19224587082862854,
0.0817730575799942,
-0.14770403504371643,
-0.14725814759731293,
-0.08205125480890274,
-0.04392477869987488,
0.15505576133728027,
0.13787977397441864,
0.19112321734428406,
0.11964966356754303,
-0.19039496779441833,
-0.1374277025461197,
0.5725866556167603,
0.33096277713775635,
0.2182995080947876,
0.018692385405302048,
-0.11186423152685165,
-0.732609748840332,
0.29975858330726624,
0.1647832989692688,
0.3512275815010071,
-0.24682874977588654,
0.0518137589097023,
0.07836928963661194,
-0.09931664168834686,
0.6698225736618042,
-0.11627984791994095,
0.11729464679956436,
-0.11533911526203156,
-0.09199686348438263,
-0.2875906229019165,
-0.19314289093017578,
0.1556267887353897,
0.2828916013240814,
0.19825492799282074,
-0.14355634152889252,
-0.3589897155761719,
0.03347008675336838,
0.08453790098428726,
-0.06683330237865448,
0.07454626262187958,
0.015949133783578873,
-0.41321861743927,
-0.3991960287094116,
-0.12368059903383255,
-0.0383002832531929,
-0.07449126243591309,
0.05933663621544838,
0.07914166897535324,
0.10366064310073853,
0.029738232493400574,
0.18867290019989014,
-0.08149930834770203,
-0.10599294304847717,
0.28247928619384766,
0.07840129733085632,
0.07351936399936676,
0.23874586820602417,
0.3420650064945221,
0.22921639680862427,
0.5957341194152832,
0.41135719418525696,
-0.511263906955719,
0.0013469047844409943,
0.24158525466918945,
-0.0746392086148262,
0.49271360039711,
-0.05890442803502083,
0.1928623765707016,
0.46069255471229553,
0.193262979388237,
-0.21321868896484375,
0.17057007551193237,
0.3289293646812439,
0.033993691205978394,
-0.009577926248311996,
-0.6224262714385986,
0.445357084274292,
0.06868751347064972,
0.14599494636058807,
0.4809643626213074,
0.3823704123497009,
-0.1978546530008316,
-0.07449240982532501,
-0.15219616889953613,
0.88569575548172,
0.14778971672058105,
0.048653244972229004,
0.2856976389884949,
-0.04988395795226097,
0.31344056129455566,
-0.3313172459602356,
0.2697737216949463,
-0.019001618027687073,
-0.4241788387298584,
-0.2316114455461502,
-0.08144542574882507,
0.3001324236392975,
-0.41983431577682495,
-0.17819365859031677,
0.33797183632850647,
-0.04328726977109909,
0.23284216225147247,
0.011147532612085342,
-0.051212210208177567,
-0.6122786998748779,
-0.13023817539215088,
-0.5711682438850403,
-0.01338057592511177,
-0.285042941570282,
0.4063897132873535,
-0.029033422470092773,
-0.0457121916115284,
-0.11252574622631073,
-0.14181140065193176,
-0.4725225567817688,
0.3033987581729889,
-0.4665411114692688,
-0.19101503491401672,
-0.20046405494213104,
-0.07982315123081207,
-0.011392598040401936,
0.03219578415155411,
-0.06702098250389099,
-0.06274351477622986,
-0.4360836446285248,
0.4418431520462036,
-0.2514432370662689,
0.028273405507206917,
0.030583342537283897,
-0.07340601831674576,
0.24602660536766052,
0.016985900700092316,
-0.29494982957839966,
0.037844445556402206,
-0.17173141241073608,
-0.3569762110710144,
-0.004943445324897766,
-0.26824331283569336,
0.2908986806869507,
0.08898565173149109,
-0.1919977068901062,
0.027112841606140137,
0.20365558564662933,
-0.10106374323368073,
-0.017244961112737656,
-0.09220567345619202,
-0.19862809777259827,
-0.017172515392303467,
-0.1052909791469574,
-0.2538662254810333,
-0.1587079018354416,
0.5447163581848145,
-0.38050246238708496,
0.22664672136306763,
0.5702148675918579,
0.17955870926380157,
-0.10336829721927643,
-0.008485522121191025,
0.03860343247652054,
-0.257952481508255,
0.05907774716615677,
0.1564469188451767,
-0.0396108441054821,
0.10123409330844879,
-0.2726489007472992,
0.045873112976551056,
-0.1716374307870865,
-0.19686803221702576,
-0.0057060495018959045,
-0.5415007472038269,
-0.035688646137714386,
0.10218562185764313,
-0.20001278817653656,
0.012526262551546097,
0.19362476468086243,
0.12256218492984772,
0.272361159324646,
-0.13317181169986725,
-0.13572020828723907,
-0.1408829689025879,
-0.08889815956354141,
0.06313508749008179,
0.2425931692123413,
0.2519436776638031,
0.37871456146240234,
-0.26431795954704285,
-0.11579826474189758,
0.05025218427181244,
-0.26661500334739685,
-0.007369501516222954,
-0.17502057552337646,
0.22707214951515198,
0.1405574232339859,
-0.5417366027832031,
-0.11123544722795486,
-0.4127587676048279,
-0.14369076490402222,
-0.12595219910144806,
0.20505693554878235,
0.5221760869026184,
0.06806515157222748,
-0.2387286275625229,
-0.05070007964968681,
0.17075172066688538,
-0.1569824516773224,
0.0851573646068573,
0.02572372555732727,
0.38146358728408813,
0.08140092343091965,
0.04413285106420517,
0.018702656030654907,
0.04744616150856018,
-0.16720546782016754,
-0.07642228156328201,
0.10248488187789917,
0.2926218807697296,
0.3963328003883362,
-0.12957875430583954,
0.07302936911582947,
0.18113350868225098,
0.3608209490776062,
0.27693241834640503,
-0.1401568055152893,
0.011937027797102928,
0.3113398849964142,
0.01085629127919674,
-0.01711946353316307,
0.09953983873128891,
0.5429457426071167,
0.19248108565807343,
0.15985076129436493,
0.02136942744255066,
0.009058456867933273,
0.09680898487567902,
0.05148584023118019,
0.11094605177640915,
0.42475396394729614,
0.20157606899738312,
0.5247812271118164,
0.06940457224845886,
0.07087799906730652,
0.23955358564853668,
-0.13596612215042114,
0.14895574748516083,
0.21341384947299957,
0.3273271322250366,
0.016567572951316833,
0.23784203827381134,
-0.12476366013288498,
0.12519428133964539,
-0.3074849843978882,
-0.49894052743911743,
-0.11067523062229156,
0.09819486737251282,
-0.2523828148841858,
0.40589773654937744,
-0.0070861876010894775,
-0.018189579248428345,
-0.5140802264213562,
-0.1140260398387909,
-0.22755654156208038,
0.29173406958580017,
0.05445042997598648,
-0.15321634709835052,
-0.15801486372947693,
-0.061500586569309235,
0.09048409759998322,
0.20758792757987976,
0.0783281922340393,
-0.05697057396173477,
-0.016229398548603058,
0.09173736721277237,
-0.12991531193256378,
-0.3375058174133301,
0.12310359627008438,
0.07195776700973511,
0.48645246028900146,
-0.1704697459936142,
0.22671201825141907,
0.058544497936964035,
0.0408502072095871,
0.25169652700424194,
0.415048211812973,
0.30279219150543213,
0.3085763454437256,
0.021969188004732132,
0.13410381972789764,
0.20314449071884155,
-0.03935101255774498,
0.08114547282457352,
0.024596309289336205,
-0.010314486920833588,
-0.30269211530685425,
0.19157978892326355,
0.0057610515505075455,
-0.0354754775762558,
0.1737690418958664,
0.01704699918627739,
0.49748939275741577,
-0.41587722301483154,
0.08380281925201416,
-0.3526502251625061,
0.42445847392082214,
-0.2758948504924774,
-0.07595547288656235,
-0.32217442989349365,
0.3379386067390442,
0.20330172777175903,
-0.07486050575971603,
0.16839274764060974,
0.0209696926176548,
-0.05283621698617935,
-0.1094026118516922,
0.195835143327713,
0.547353982925415,
-0.12171661108732224,
-0.21197788417339325,
-0.027938567101955414,
-0.3379739820957184,
0.0806235820055008,
-0.18405404686927795,
-0.3288503587245941,
-0.09832551330327988,
0.21972694993019104,
-0.03285621106624603,
0.08736250549554825,
0.15391221642494202,
0.17360232770442963,
0.07434515655040741,
0.04297415167093277,
-0.17887505888938904,
-0.3183065354824066,
-0.4250456690788269,
0.21004344522953033,
-0.09047726541757584,
-0.26409274339675903,
0.15006661415100098,
0.06015781685709953,
-0.1069352924823761,
0.18346092104911804,
-0.2458215206861496,
-0.24378405511379242,
-0.35281476378440857,
0.24494603276252747,
0.07287788391113281,
0.19186508655548096,
-0.09948743134737015,
-0.12613213062286377,
-0.296836793422699,
-0.1773199737071991,
-0.26815715432167053,
-0.2933932840824127,
-0.18538124859333038,
0.44717341661453247,
-0.25901952385902405,
-0.04443894699215889,
-0.43544554710388184,
0.529657781124115,
0.04116983711719513,
-0.12763477861881256,
-0.18079492449760437,
0.16495081782341003,
-0.29735061526298523,
0.1852571815252304,
-0.2817496359348297,
0.10100400447845459,
-0.11996258795261383,
0.1545013040304184,
-0.27835267782211304,
-0.10703794658184052,
0.6600873470306396,
-0.254776269197464,
-0.02424188330769539,
-0.1685936450958252,
0.09382383525371552,
0.33538734912872314,
0.025000136345624924,
-0.2232799232006073,
0.3371049761772156,
0.0839371383190155,
0.03737562522292137,
-0.051083557307720184,
-0.009901918470859528,
-0.10042557120323181,
0.1100519448518753,
-0.09022822976112366,
-0.07541842758655548,
0.12850138545036316,
-0.07691317796707153,
0.4253575801849365,
-0.03925784304738045
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ?
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 16
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ?
|
[
-0.25485289096832275,
-0.0679941326379776,
0.09301556646823883,
-0.12202969193458557,
0.3035862445831299,
-0.011668950319290161,
0.1310207098722458,
0.15154777467250824,
0.00972307100892067,
0.11705359071493149,
0.04780633747577667,
-0.19018323719501495,
0.24057243764400482,
0.158457413315773,
0.12638409435749054,
-0.06325507909059525,
0.0704955905675888,
-0.03340268135070801,
-0.011101879179477692,
0.1261492371559143,
-0.0016213618218898773,
0.07834213227033615,
-0.0951741486787796,
-0.059965699911117554,
-0.028240038082003593,
-0.006688589230179787,
0.05022253096103668,
0.327989399433136,
-0.26006942987442017,
0.08810137957334518,
0.2749716639518738,
0.10635411739349365,
-0.02096652425825596,
0.5173511505126953,
-0.00012835876259487122,
0.21518941223621368,
0.395513653755188,
-0.16481943428516388,
-0.2988995909690857,
-0.38257700204849243,
-0.3947518467903137,
0.058920323848724365,
-0.03892149031162262,
-0.03436066582798958,
-0.0419364869594574,
0.015423089265823364,
0.3620910048484802,
-0.577726423740387,
0.40667080879211426,
0.35023319721221924,
0.0560770109295845,
0.1672687977552414,
-0.033778995275497437,
0.3104455769062042,
0.022353585809469223,
0.1329624503850937,
-0.20773881673812866,
0.021428357809782028,
0.1954209953546524,
0.04560738801956177,
0.23984354734420776,
0.44224104285240173,
-0.32544925808906555,
0.02044905349612236,
0.43810492753982544,
-0.11027146130800247,
-0.08763299137353897,
-0.3467651903629303,
-0.08158066123723984,
0.5822422504425049,
0.5361003279685974,
-0.28196901082992554,
-0.5143096446990967,
-0.25845491886138916,
0.02203918620944023,
-0.09558570384979248,
0.19085273146629333,
0.22794228792190552,
-0.10929867625236511,
0.16024549305438995,
-0.003515826305374503,
-0.24663980305194855,
-0.2547300457954407,
0.11477053165435791,
0.08618435263633728,
0.2873610258102417,
-0.03199997916817665,
0.1237533688545227,
-0.009771298617124557,
-0.031748004257678986,
-0.27544814348220825,
-0.3083643317222595,
-0.22380414605140686,
0.19126835465431213,
-0.27610504627227783,
0.10826526582241058,
0.02482835203409195,
0.13819271326065063,
0.1564185917377472,
0.2562394142150879,
0.10188179463148117,
0.12732817232608795,
-0.3787652254104614,
0.18128806352615356,
0.11254087090492249,
0.18733976781368256,
-0.03492805361747742,
0.22002916038036346,
0.30574658513069153,
0.27334561944007874,
0.02700262889266014,
-0.24923565983772278,
0.40536245703697205,
0.0803324282169342,
-0.47827935218811035,
-0.11516193300485611,
0.7189835906028748,
-0.2683655619621277,
-0.37433549761772156,
0.09216871857643127,
-0.5356884598731995,
0.06310877948999405,
0.16677965223789215,
0.34312549233436584,
-0.23161017894744873,
0.3805818557739258,
0.21369142830371857,
0.2982192039489746,
-0.30679383873939514,
-0.21054357290267944,
-0.09740326553583145,
-0.13348378241062164,
0.08926759660243988,
0.16761495172977448,
-0.021627584472298622,
-0.09458886086940765,
0.31999990344047546,
-0.10820265114307404,
0.28200995922088623,
0.04716796427965164,
0.1325318068265915,
-0.07100129127502441,
-0.026667408645153046,
0.38754016160964966,
-0.04115065932273865,
0.028775161132216454,
0.17228055000305176,
-0.13918352127075195,
0.01535002887248993,
-0.051249973475933075,
-0.04562801122665405,
-0.30696943402290344,
-0.040650077164173126,
0.04443808272480965,
-0.21225111186504364,
-0.11546997725963593,
-0.47551146149635315,
0.21367155015468597,
-0.28208833932876587,
-0.27104225754737854,
0.17877136170864105,
0.14108240604400635,
-0.30158042907714844,
0.16862018406391144,
0.32687193155288696,
0.7478629946708679,
-0.2125450074672699,
-0.262686550617218,
0.054100871086120605,
-0.21609614789485931,
0.3805183470249176,
0.12351459264755249,
-0.014523938298225403,
-0.19426602125167847,
-0.16141843795776367,
0.20005010068416595,
0.26193946599960327,
-0.33364078402519226,
-0.5404018759727478,
0.2769482135772705,
-0.15816465020179749,
0.4353747069835663,
0.3159644603729248,
0.20547367632389069,
-0.01256030797958374,
0.0044731018133461475,
-0.06564068794250488,
0.48041588068008423,
-0.22042959928512573,
0.0937238484621048,
-0.18463289737701416,
-0.31038737297058105,
0.02814902737736702,
0.13832633197307587,
-0.18787190318107605,
0.34458309412002563,
-0.023907572031021118,
-0.12181061506271362,
0.2673889398574829,
0.006932929158210754,
0.0600905567407608,
0.23083224892616272,
0.3508782684803009,
0.4617130756378174,
-0.11692275106906891,
-0.16008350253105164,
-0.2803901135921478,
0.017209667712450027,
0.17117857933044434,
-0.05110171437263489,
-0.07274799048900604,
-0.29691582918167114,
-0.13483533263206482,
-0.13151584565639496,
-0.05956164374947548,
-0.2196560502052307,
-0.10138925164937973,
0.35043513774871826,
0.0901632010936737,
0.21242684125900269,
-0.29681873321533203,
0.740935742855072,
-0.35748374462127686,
0.055936895310878754,
-0.366328626871109,
0.3129921853542328,
0.09481485188007355,
-0.058411113917827606,
-0.06865859776735306,
0.03707033023238182,
0.23353850841522217,
-0.11782032251358032,
-0.22966742515563965,
0.47875580191612244,
-0.018301459029316902,
0.34912925958633423,
0.24501723051071167,
0.11856240034103394,
0.27022725343704224,
-0.2088754028081894,
-0.051767438650131226,
0.4253581762313843,
0.22966942191123962,
0.06429199129343033,
-0.03468739986419678,
0.18130983412265778,
0.2501019537448883,
0.2899768054485321,
0.08872956037521362,
0.015427516773343086,
0.36905157566070557,
0.050774503499269485,
-0.4012986421585083,
-0.027096226811408997,
0.4491640031337738,
-0.1517392247915268,
0.213371142745018,
-0.18089306354522705,
-0.37724509835243225,
0.14100003242492676,
-0.06964989006519318,
0.06339144706726074,
-0.023253776133060455,
0.04274580627679825,
-0.06552494317293167,
0.0634741559624672,
0.019016318023204803,
0.27379435300827026,
0.39166563749313354,
0.018293071538209915,
-0.288485586643219,
0.17671440541744232,
0.0918562114238739,
-0.17220082879066467,
0.09032761305570602,
0.08256064355373383,
0.023453155532479286,
-0.07713989168405533,
0.06464271247386932,
-0.007650894112884998,
-0.178261399269104,
-0.30622220039367676,
-0.22846411168575287,
0.06715147197246552,
-0.4570556879043579,
0.3566012382507324,
-0.3019278645515442,
-0.5832083821296692,
-0.01892492175102234,
-0.1297825574874878,
-0.28196024894714355,
-0.33183255791664124,
-0.08205355703830719,
0.39676758646965027,
-0.18337568640708923,
0.19795465469360352,
-0.5522578954696655,
0.21367141604423523,
0.10214157402515411,
-0.22994844615459442,
-0.3387553095817566,
0.09179408103227615,
-0.09583158046007156,
-0.09497112035751343,
0.11297013610601425,
0.010707519948482513,
0.3038294315338135,
-0.13832272589206696,
-0.4833219051361084,
-0.40015655755996704,
-0.1473197042942047,
-0.045264773070812225,
0.07807652652263641,
0.4302937686443329,
-0.09931375086307526,
0.43672889471054077,
-0.08639220893383026,
-0.10857108980417252,
0.2146909385919571,
-0.053830936551094055,
-0.04742743447422981,
-0.14420688152313232,
0.07628761976957321,
0.15259556472301483,
-0.01881358027458191,
-0.016848452389240265,
-0.35726049542427063,
-0.2728409171104431,
-0.021499663591384888,
-0.35989272594451904,
0.005946118384599686,
0.33045363426208496,
-0.1029246523976326,
0.045434482395648956,
-0.19996710121631622,
-0.053598642349243164,
-0.09208901226520538,
-0.6476784944534302,
0.31313955783843994,
0.020028503611683846,
-0.15218117833137512,
0.23168054223060608,
0.12992224097251892,
-0.47883933782577515,
0.3009644150733948,
-0.44851815700531006,
-0.5348345041275024,
-0.0643639788031578,
-0.03699745982885361,
-0.13487568497657776,
-0.15451015532016754,
0.17343315482139587,
-0.4053310751914978,
0.1658015102148056,
-0.2662445604801178,
-0.143064484000206,
-0.048142023384571075,
0.09283100068569183,
0.3535299599170685,
0.1553424894809723,
0.63555508852005,
-0.05156116932630539,
0.7824607491493225,
0.2623155415058136,
0.23490504920482635,
0.5516068935394287,
-0.07996659725904465,
0.37884533405303955,
-0.0542103573679924,
-0.20890115201473236,
0.19909024238586426,
0.1360035389661789,
-0.16414779424667358,
-0.08217121660709381,
0.11900953948497772,
0.20531414449214935,
-0.1985982060432434,
0.0862981528043747,
-0.1372930407524109,
-0.1766376942396164,
-0.12911441922187805,
-0.0923391729593277,
0.15060904622077942,
0.18045932054519653,
0.1517116129398346,
0.07501889765262604,
-0.13105064630508423,
-0.08868877589702606,
0.6299218535423279,
0.24518802762031555,
0.23101846873760223,
-0.00788915902376175,
-0.1440068930387497,
-0.7553697824478149,
0.3377346992492676,
0.16362884640693665,
0.33289480209350586,
-0.25331243872642517,
0.038214556872844696,
0.09974562376737595,
-0.1019149124622345,
0.6535336971282959,
-0.08837289363145828,
0.19327028095722198,
-0.052542757242918015,
-0.0355752594769001,
-0.2181829810142517,
-0.10949385166168213,
0.18742570281028748,
0.3656909763813019,
0.3486122488975525,
-0.10041466355323792,
-0.31971681118011475,
-0.0012482774909585714,
0.06046627089381218,
-0.17273247241973877,
0.08751720190048218,
0.027194958180189133,
-0.40934059023857117,
-0.34650811553001404,
-0.10290062427520752,
-0.050638504326343536,
-0.052502453327178955,
0.07608816027641296,
0.12263693660497665,
0.12374421954154968,
0.0067332349717617035,
0.15762493014335632,
-0.11242026090621948,
-0.05532423406839371,
0.22820568084716797,
0.10588642954826355,
0.10240957140922546,
0.24625730514526367,
0.28463923931121826,
0.22933430969715118,
0.6301499605178833,
0.4172744154930115,
-0.6241886019706726,
-0.13886725902557373,
0.2507901191711426,
-0.09537316113710403,
0.42630016803741455,
0.004633786156773567,
0.13904249668121338,
0.5199469923973083,
0.19976338744163513,
-0.1697695255279541,
0.22278308868408203,
0.28853392601013184,
0.04583917558193207,
-0.008740554563701153,
-0.6681575775146484,
0.4424512982368469,
0.03994295746088028,
0.12808023393154144,
0.47436392307281494,
0.3218564987182617,
-0.19014610350131989,
-0.0012702024541795254,
-0.24355819821357727,
0.8671125173568726,
0.18183642625808716,
0.06154670566320419,
0.28682905435562134,
-0.10790959745645523,
0.32400551438331604,
-0.31463825702667236,
0.2540501356124878,
0.015349838882684708,
-0.3384111225605011,
-0.2049349546432495,
-0.0477471724152565,
0.2805878818035126,
-0.4235292673110962,
-0.17838220298290253,
0.21979086101055145,
0.051871880888938904,
0.1572640985250473,
0.04411976784467697,
0.006011065095663071,
-0.5665916204452515,
-0.14063766598701477,
-0.6195981502532959,
-0.01257161982357502,
-0.31361591815948486,
0.38751220703125,
0.001512729562819004,
-0.08049315959215164,
-0.10158969461917877,
-0.13461089134216309,
-0.499112606048584,
0.29976239800453186,
-0.45435306429862976,
-0.19394171237945557,
-0.14905565977096558,
-0.11811842024326324,
-0.016671311110258102,
-0.04057478532195091,
-0.10500800609588623,
-0.1286003738641739,
-0.4269960820674896,
0.4746740162372589,
-0.1570514738559723,
0.04083029553294182,
0.05741438642144203,
-0.09926372021436691,
0.23292142152786255,
0.0040430836379528046,
-0.2606016993522644,
0.05476035177707672,
-0.12495536357164383,
-0.4067996144294739,
0.03174768388271332,
-0.23611895740032196,
0.42357510328292847,
0.11603936553001404,
-0.13648013770580292,
0.057816699147224426,
0.20523197948932648,
-0.0975152850151062,
0.0010187998414039612,
-0.032724276185035706,
-0.2802918255329132,
-0.08243971318006516,
-0.12199738621711731,
-0.2401081770658493,
-0.12336184084415436,
0.5221765637397766,
-0.3541639745235443,
0.23764654994010925,
0.5825176239013672,
0.12625904381275177,
-0.04002766311168671,
-0.033310629427433014,
0.09652545303106308,
-0.22387075424194336,
0.04518992453813553,
0.18061156570911407,
0.015808774158358574,
0.08851586282253265,
-0.26387038826942444,
0.06614301353693008,
-0.21965758502483368,
-0.2159026563167572,
-0.0222957544028759,
-0.6196463108062744,
-0.054678335785865784,
0.06204982474446297,
-0.13129790127277374,
-0.008271168917417526,
0.2206057608127594,
0.15196464955806732,
0.2083740383386612,
-0.09780435264110565,
-0.1384257972240448,
-0.13663335144519806,
-0.06115781515836716,
0.06448196619749069,
0.22936195135116577,
0.25043779611587524,
0.3732159435749054,
-0.19790521264076233,
-0.12128458172082901,
0.04709568992257118,
-0.2678675651550293,
-0.03486994653940201,
-0.2301759570837021,
0.21605715155601501,
0.11026589572429657,
-0.5382694602012634,
-0.11086122691631317,
-0.402706503868103,
-0.1407730132341385,
-0.07736141234636307,
0.1200840175151825,
0.4844138026237488,
0.012150771915912628,
-0.23615877330303192,
0.015500158071517944,
0.12687167525291443,
-0.09559731185436249,
0.12506218254566193,
-0.025527119636535645,
0.35035377740859985,
0.08364760130643845,
0.07040974497795105,
-0.044216372072696686,
0.007701613008975983,
-0.10769688338041306,
-0.11157795041799545,
0.036168187856674194,
0.28789690136909485,
0.3961707651615143,
-0.15644511580467224,
0.0909573882818222,
0.22706644237041473,
0.280595064163208,
0.25447386503219604,
-0.0864349752664566,
0.05531536787748337,
0.2883831262588501,
0.008849303238093853,
-0.047058627009391785,
0.05499507486820221,
0.6184448003768921,
0.18095102906227112,
0.15196068584918976,
0.004340745508670807,
-0.135152667760849,
0.08560895919799805,
0.08611641824245453,
0.08397656679153442,
0.4119195342063904,
0.2173091322183609,
0.5268340110778809,
0.017742734402418137,
0.04920485243201256,
0.216178759932518,
-0.19962549209594727,
0.16032275557518005,
0.2508021295070648,
0.4170072078704834,
0.008394002914428711,
0.22009585797786713,
-0.06611789762973785,
0.10225722193717957,
-0.3458928167819977,
-0.4662320911884308,
-0.21166546642780304,
0.05217526853084564,
-0.2703710198402405,
0.4678967297077179,
0.06669853627681732,
0.03287914767861366,
-0.47563493251800537,
-0.03315506875514984,
-0.21596746146678925,
0.19333282113075256,
0.08934695273637772,
-0.13935443758964539,
-0.24967321753501892,
-0.0064086392521858215,
0.12252901494503021,
0.1473158448934555,
0.12594003975391388,
0.03389135003089905,
0.03240884840488434,
0.08457084745168686,
-0.11250177025794983,
-0.2839389443397522,
0.05200281739234924,
0.05402570962905884,
0.46500933170318604,
-0.1588025540113449,
0.20599456131458282,
0.0509776696562767,
0.03511980175971985,
0.33952566981315613,
0.3813146948814392,
0.3338768780231476,
0.26824885606765747,
0.04201440140604973,
0.21941444277763367,
0.21230140328407288,
-0.03796987608075142,
0.026060208678245544,
-0.00037958472967147827,
0.058576587587594986,
-0.2694116532802582,
0.2002226859331131,
0.012416286394000053,
-0.0352490060031414,
0.15692706406116486,
-0.035437870770692825,
0.45507341623306274,
-0.5133913159370422,
0.15149635076522827,
-0.43971702456474304,
0.35769137740135193,
-0.39232927560806274,
-0.006429500877857208,
-0.2749637961387634,
0.3610381484031677,
0.058353718370199203,
-0.10818072408437729,
0.11224759370088577,
-0.014202920719981194,
-0.045075055211782455,
-0.1943824589252472,
0.22096261382102966,
0.5453586578369141,
-0.12345948070287704,
-0.16855370998382568,
-0.04976784437894821,
-0.31038177013397217,
0.09255945682525635,
-0.20332922041416168,
-0.34443458914756775,
-0.09467187523841858,
0.23504658043384552,
-0.04308588057756424,
0.08240209519863129,
0.17692096531391144,
0.08999554067850113,
0.030836697667837143,
0.03664376586675644,
-0.19043278694152832,
-0.338907390832901,
-0.4501997232437134,
0.20930151641368866,
-0.0634782463312149,
-0.23799338936805725,
0.13506673276424408,
0.10450127720832825,
-0.09794700145721436,
0.2497720867395401,
-0.3384404480457306,
-0.2593418061733246,
-0.4481135904788971,
0.2235420197248459,
0.10371827334165573,
0.1005229651927948,
-0.07595136016607285,
-0.07616320997476578,
-0.24131423234939575,
-0.14875918626785278,
-0.3422445058822632,
-0.2913527488708496,
-0.23155146837234497,
0.47618743777275085,
-0.3301975131034851,
-0.029334913939237595,
-0.38015154004096985,
0.4957687258720398,
0.016418099403381348,
-0.2694438099861145,
-0.20152243971824646,
0.16027803719043732,
-0.2719659209251404,
0.18079513311386108,
-0.2863699197769165,
0.1279098093509674,
-0.15503740310668945,
0.09211499989032745,
-0.24440895020961761,
-0.030068501830101013,
0.6342716813087463,
-0.36897012591362,
-0.027999376878142357,
-0.17888055741786957,
0.13447296619415283,
0.2991255521774292,
-0.009094713255763054,
-0.21572130918502808,
0.29700350761413574,
0.10024342685937881,
0.05728554353117943,
-0.03428061306476593,
-0.0003622164949774742,
-0.06059909984469414,
0.12615224719047546,
-0.07628853619098663,
0.015560999512672424,
0.13428473472595215,
-0.06592942029237747,
0.4707764685153961,
-0.026283076032996178
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context.
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 98
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context.
|
[
-0.28758227825164795,
0.02724406123161316,
0.11844801902770996,
-0.1200261265039444,
0.3153189420700073,
-0.058953844010829926,
0.21909654140472412,
0.13560570776462555,
0.06980398297309875,
0.1013474389910698,
0.01768678054213524,
-0.15127579867839813,
0.30918818712234497,
0.10330628603696823,
0.06411487609148026,
-0.030433490872383118,
0.08692114055156708,
-0.016449548304080963,
-0.07547225058078766,
0.08454655110836029,
-0.049613967537879944,
0.0419565811753273,
-0.06435906141996384,
-0.08269084990024567,
-0.03027304820716381,
-0.04597505182027817,
-0.023161523044109344,
0.3384641110897064,
-0.26901644468307495,
0.06510783731937408,
0.2688085436820984,
0.12579599022865295,
-0.01907099038362503,
0.4736975431442261,
-0.00012997914745938033,
0.2002047747373581,
0.3660103678703308,
-0.1885906457901001,
-0.2828079164028168,
-0.3031100034713745,
-0.4383731484413147,
0.044497355818748474,
0.0190444216132164,
-0.062259841710329056,
0.0052386559545993805,
0.08578362315893173,
0.26611194014549255,
-0.5526943802833557,
0.4056169390678406,
0.37997978925704956,
0.02772177755832672,
0.2247471958398819,
-0.12446479499340057,
0.2689836919307709,
-0.07701050490140915,
0.09576009958982468,
-0.2529129385948181,
-0.05861147865653038,
0.12657475471496582,
0.0518248975276947,
0.18677052855491638,
0.38246986269950867,
-0.3818768262863159,
0.020064441487193108,
0.4437078535556793,
-0.131357342004776,
-0.06459193676710129,
-0.35403692722320557,
-0.0810966044664383,
0.5376147627830505,
0.5055757164955139,
-0.25530099868774414,
-0.5192908644676208,
-0.2912532091140747,
0.005758054554462433,
-0.11850413680076599,
0.24511092901229858,
0.2707846760749817,
-0.1203511506319046,
0.15749959647655487,
0.020053666085004807,
-0.13408879935741425,
-0.22064681351184845,
0.14923174679279327,
0.07825769484043121,
0.3097984194755554,
0.0018021888099610806,
0.1614636778831482,
0.053708214312791824,
-0.0039247311651706696,
-0.21572530269622803,
-0.35301506519317627,
-0.19170334935188293,
0.122137650847435,
-0.31137531995773315,
0.11173616349697113,
0.08343032747507095,
0.16618472337722778,
0.19149452447891235,
0.24852538108825684,
0.02104470506310463,
0.07144604623317719,
-0.32972443103790283,
0.18186703324317932,
0.0881417989730835,
0.25282400846481323,
-0.013511180877685547,
0.18717476725578308,
0.2906966209411621,
0.29688549041748047,
0.07730169594287872,
-0.1802423894405365,
0.36333179473876953,
0.09889061748981476,
-0.5101185441017151,
-0.09525053203105927,
0.6986410617828369,
-0.23817197978496552,
-0.43780526518821716,
0.12658816576004028,
-0.5200266242027283,
0.051849186420440674,
0.16906726360321045,
0.3741734027862549,
-0.21034708619117737,
0.40654245018959045,
0.19018560647964478,
0.3334472179412842,
-0.3053760528564453,
-0.23938700556755066,
-0.0965411514043808,
-0.17144301533699036,
0.04305463656783104,
0.19014222919940948,
0.014501303434371948,
-0.08978767693042755,
0.3559153974056244,
-0.11986380815505981,
0.22858676314353943,
0.05509837716817856,
0.11444152891635895,
-0.052668966352939606,
0.034042518585920334,
0.41240233182907104,
-0.04860987514257431,
0.015706447884440422,
0.22089257836341858,
-0.18840152025222778,
0.001528903841972351,
-0.006544329226016998,
-0.013074569404125214,
-0.24742034077644348,
-0.07483146339654922,
0.0032280124723911285,
-0.3121030926704407,
-0.13053679466247559,
-0.3645783066749573,
0.14359848201274872,
-0.24960389733314514,
-0.18823851644992828,
0.2163970172405243,
0.11044883728027344,
-0.27902692556381226,
0.16895270347595215,
0.32830020785331726,
0.7954018115997314,
-0.14228172600269318,
-0.23792481422424316,
0.054952312260866165,
-0.2557689845561981,
0.32117757201194763,
0.18239226937294006,
0.011792931705713272,
-0.19373592734336853,
-0.12685514986515045,
0.18570397794246674,
0.2448531985282898,
-0.2800661325454712,
-0.6652675867080688,
0.2961389124393463,
-0.11082903295755386,
0.4385596513748169,
0.3287801146507263,
0.24695612490177155,
0.07062695920467377,
0.022355826571583748,
-0.08315713703632355,
0.5041970014572144,
-0.20593631267547607,
0.1127205416560173,
-0.2212558388710022,
-0.3422158658504486,
0.022260000929236412,
0.09839579463005066,
-0.19084952771663666,
0.3988696336746216,
-0.022103138267993927,
-0.17152026295661926,
0.2769882380962372,
-0.023624446243047714,
0.06000341475009918,
0.1591511219739914,
0.35739606618881226,
0.39716142416000366,
-0.11056479066610336,
-0.007019525393843651,
-0.33045074343681335,
0.01329781487584114,
0.21061991155147552,
-0.012759454548358917,
-0.16707433760166168,
-0.28780776262283325,
-0.11525490880012512,
-0.11817804723978043,
-0.13077089190483093,
-0.23708993196487427,
-0.14556913077831268,
0.4354550540447235,
0.030286721885204315,
0.20108215510845184,
-0.2469208836555481,
0.7550530433654785,
-0.34114888310432434,
0.08704874664545059,
-0.30551931262016296,
0.26945164799690247,
0.10625188052654266,
-0.09595156461000443,
-0.07785694301128387,
-0.003074832260608673,
0.2907935380935669,
-0.0968746617436409,
-0.23532941937446594,
0.49178415536880493,
-0.010984497144818306,
0.3259328007698059,
0.17565767467021942,
0.12284937500953674,
0.2554022967815399,
-0.20311199128627777,
-0.019899269565939903,
0.40364348888397217,
0.21812090277671814,
0.11407584697008133,
-0.09353000670671463,
0.20027095079421997,
0.23937508463859558,
0.2571449875831604,
0.04392483830451965,
0.08443393558263779,
0.340609073638916,
0.04286355897784233,
-0.43608081340789795,
-0.014979962259531021,
0.4454366862773895,
-0.17983469367027283,
0.20192459225654602,
-0.14527574181556702,
-0.3445194661617279,
0.1364906132221222,
-0.09736321866512299,
0.05270449444651604,
0.06232316792011261,
0.013492178171873093,
-0.006765343248844147,
0.06672248989343643,
0.11743715405464172,
0.26799747347831726,
0.4094740152359009,
-0.035611048340797424,
-0.25661176443099976,
0.1917468160390854,
0.0033228672109544277,
-0.17565807700157166,
0.06672857701778412,
0.050908975303173065,
0.024030374363064766,
-0.08410251885652542,
0.05118453502655029,
-0.03703882545232773,
-0.24846795201301575,
-0.2846260070800781,
-0.17177417874336243,
0.11789948493242264,
-0.46264368295669556,
0.3321765661239624,
-0.29458242654800415,
-0.5101010799407959,
0.05475464463233948,
-0.08402208238840103,
-0.22607356309890747,
-0.3519807755947113,
-0.12610343098640442,
0.4494335353374481,
-0.20076607167720795,
0.23288588225841522,
-0.6433824300765991,
0.18466055393218994,
0.16363592445850372,
-0.2923722267150879,
-0.34154385328292847,
0.09264121949672699,
-0.03582920879125595,
-0.12346117198467255,
0.10800738632678986,
-0.10204459726810455,
0.33036482334136963,
-0.10261517018079758,
-0.42088621854782104,
-0.38583052158355713,
-0.203027606010437,
-0.037140749394893646,
0.04044974595308304,
0.43909531831741333,
-0.11553843319416046,
0.4180715084075928,
-0.09459766745567322,
-0.1272687464952469,
0.25519928336143494,
-0.04415719211101532,
-0.030258571729063988,
-0.15035757422447205,
0.08636544644832611,
0.10272267460823059,
-0.029903432354331017,
-0.031043775379657745,
-0.26802343130111694,
-0.22525335848331451,
0.011155914515256882,
-0.4000980257987976,
-0.0012698695063591003,
0.30025190114974976,
-0.05274610593914986,
0.0452268049120903,
-0.2503373920917511,
-0.05994615703821182,
-0.10479092597961426,
-0.6273651123046875,
0.33207836747169495,
0.00890246219933033,
-0.15571731328964233,
0.19863158464431763,
0.07635428756475449,
-0.40987807512283325,
0.31822359561920166,
-0.4576832056045532,
-0.4885158836841583,
-0.08228756487369537,
0.009641345590353012,
-0.14824341237545013,
-0.2093420773744583,
0.21147313714027405,
-0.3764541745185852,
0.19273337721824646,
-0.3048478066921234,
-0.1911066323518753,
0.010575376451015472,
0.11927507817745209,
0.3884246349334717,
0.044498175382614136,
0.641800582408905,
-0.0003148317337036133,
0.7394344210624695,
0.27356380224227905,
0.21128329634666443,
0.5890887975692749,
-0.08199791610240936,
0.3647737503051758,
-0.018379539251327515,
-0.21306993067264557,
0.20174363255500793,
0.16287405788898468,
-0.16309881210327148,
-0.07972294092178345,
0.09379981458187103,
0.13662894070148468,
-0.21440422534942627,
0.09774518013000488,
-0.1310076117515564,
-0.18778295814990997,
-0.1390209197998047,
-0.10692307353019714,
0.211971253156662,
0.177208811044693,
0.2504187822341919,
0.08484800159931183,
-0.17140847444534302,
-0.06774958968162537,
0.6514857411384583,
0.26331132650375366,
0.22377504408359528,
0.015921372920274734,
-0.08602778613567352,
-0.7701787948608398,
0.31782299280166626,
0.12159182131290436,
0.42616909742355347,
-0.2938910126686096,
0.009241729974746704,
0.09542486816644669,
-0.05490569770336151,
0.6786897778511047,
-0.12776495516300201,
0.14529399573802948,
-0.07243847846984863,
-0.01164373941719532,
-0.2692525386810303,
-0.10587325692176819,
0.17700837552547455,
0.2541053295135498,
0.24762023985385895,
-0.12003085017204285,
-0.3202492892742157,
-0.0018640289781615138,
0.029605092480778694,
-0.1889694333076477,
0.10185565054416656,
0.003203142434358597,
-0.4370676577091217,
-0.4377336800098419,
-0.1332610547542572,
0.06525789946317673,
-0.11365769058465958,
0.06415414065122604,
0.09320840984582901,
0.17192040383815765,
0.011411202140152454,
0.20208942890167236,
-0.0846097469329834,
-0.06695884466171265,
0.2351498007774353,
0.13849779963493347,
0.12528567016124725,
0.20329588651657104,
0.3870130181312561,
0.219094917178154,
0.6664083003997803,
0.40209102630615234,
-0.6179786920547485,
-0.08807658404111862,
0.19788837432861328,
-0.09302545338869095,
0.48490670323371887,
-0.009413307532668114,
0.13974322378635406,
0.5089596509933472,
0.16277551651000977,
-0.1128552109003067,
0.2643011212348938,
0.3122568130493164,
0.014021812938153744,
0.016173865646123886,
-0.5830571055412292,
0.37440118193626404,
-0.03380395844578743,
0.12867321074008942,
0.4754869341850281,
0.3070470690727234,
-0.14235757291316986,
-0.014431091025471687,
-0.20155182480812073,
0.8852341771125793,
0.16753222048282623,
0.10993437469005585,
0.3998146951198578,
-0.11089271306991577,
0.3392440974712372,
-0.27801191806793213,
0.2636103928089142,
0.01078144833445549,
-0.2915249764919281,
-0.2220764458179474,
-0.10006701201200485,
0.35131967067718506,
-0.44284796714782715,
-0.19356468319892883,
0.19708867371082306,
0.005940169095993042,
0.13983751833438873,
0.10706803947687149,
0.025301620364189148,
-0.5911833643913269,
-0.18045072257518768,
-0.5158854722976685,
-0.016098693013191223,
-0.28450483083724976,
0.3840656876564026,
0.04457555338740349,
-0.09884706139564514,
-0.08430802077054977,
-0.12554532289505005,
-0.3890981674194336,
0.3532536029815674,
-0.45243239402770996,
-0.18725799024105072,
-0.19711001217365265,
-0.12800061702728271,
0.005548592656850815,
0.013945996761322021,
-0.09474100172519684,
-0.16440391540527344,
-0.4103242754936218,
0.4665672183036804,
-0.19355052709579468,
0.08847570419311523,
0.09245797991752625,
-0.12853103876113892,
0.25435885787010193,
0.0583326518535614,
-0.2664485275745392,
0.03322260454297066,
-0.14327214658260345,
-0.4031791687011719,
0.015667393803596497,
-0.24520094692707062,
0.47499310970306396,
0.03300837427377701,
-0.11434808373451233,
0.05146355926990509,
0.14194051921367645,
-0.08571761846542358,
-0.028341561555862427,
0.011968117207288742,
-0.23009821772575378,
-0.06195086985826492,
-0.16647353768348694,
-0.31589484214782715,
-0.10047529637813568,
0.5472275018692017,
-0.35423609614372253,
0.2031097412109375,
0.6014679670333862,
0.08958297967910767,
-0.03244360536336899,
-0.03965834528207779,
0.0470738559961319,
-0.30239421129226685,
-0.0044124796986579895,
0.09305524080991745,
-0.05249108746647835,
0.05476856231689453,
-0.32974615693092346,
0.07830950617790222,
-0.26247620582580566,
-0.14074915647506714,
-0.002538483589887619,
-0.5732517242431641,
-0.08049698919057846,
0.060208145529031754,
-0.1767026036977768,
-0.0011585988104343414,
0.19007617235183716,
0.19600868225097656,
0.2403886914253235,
-0.16034777462482452,
-0.1116996705532074,
-0.15305329859256744,
-0.049602754414081573,
0.07511071115732193,
0.24537217617034912,
0.26563599705696106,
0.40265563130378723,
-0.21226917207241058,
-0.1422054022550583,
0.08465296030044556,
-0.27372854948043823,
-0.011059518903493881,
-0.2732086777687073,
0.23682305216789246,
0.1661737859249115,
-0.5137071013450623,
-0.07676400244235992,
-0.44999635219573975,
-0.1330152302980423,
-0.1087137907743454,
0.14211750030517578,
0.444497287273407,
-0.04806353151798248,
-0.22702477872371674,
-0.06498309969902039,
0.18971973657608032,
-0.07853496819734573,
0.05618833005428314,
-0.04977582395076752,
0.2471943348646164,
0.0364832766354084,
0.06165892258286476,
-0.0725894644856453,
0.041578277945518494,
-0.09370250254869461,
-0.07410580664873123,
0.07863626629114151,
0.28965067863464355,
0.3994978070259094,
-0.17136089503765106,
0.08005622029304504,
0.12910395860671997,
0.3026490807533264,
0.2231576293706894,
-0.10493776947259903,
0.01135346107184887,
0.3000420928001404,
-0.009212872013449669,
-0.01577315293252468,
0.10796217620372772,
0.5596539378166199,
0.24294979870319366,
0.17000892758369446,
0.03610057383775711,
-0.12294971942901611,
0.055669426918029785,
0.08448293805122375,
0.06259520351886749,
0.3833703100681305,
0.22210031747817993,
0.4794512391090393,
0.11189280450344086,
-0.027652757242321968,
0.30368080735206604,
-0.14065884053707123,
0.09225957095623016,
0.20249050855636597,
0.3752078413963318,
-0.009400501847267151,
0.21915867924690247,
-0.056978464126586914,
0.11002011597156525,
-0.3429383933544159,
-0.42542675137519836,
-0.20232611894607544,
-0.09060110151767731,
-0.25053560733795166,
0.39952677488327026,
0.0021353960037231445,
0.06859596818685532,
-0.48599934577941895,
-0.031098995357751846,
-0.2566043734550476,
0.18477392196655273,
0.04203686863183975,
-0.14927978813648224,
-0.2724076509475708,
-0.032540954649448395,
0.1407976895570755,
0.14640378952026367,
0.08230212330818176,
0.01365676149725914,
0.06973355263471603,
0.0825703963637352,
-0.1262121945619583,
-0.30183255672454834,
-0.0026279017329216003,
0.14602723717689514,
0.3980371654033661,
-0.1751226782798767,
0.26095062494277954,
0.056505244225263596,
0.024262160062789917,
0.28386661410331726,
0.3920014500617981,
0.32519060373306274,
0.2894267737865448,
0.09021218121051788,
0.19123505055904388,
0.207303985953331,
0.015978699550032616,
0.026378266513347626,
0.022733129560947418,
0.13008832931518555,
-0.19694222509860992,
0.2175500988960266,
-0.015268133953213692,
-0.02419726736843586,
0.16919757425785065,
-0.045455802232027054,
0.44880008697509766,
-0.4622076749801636,
0.20385047793388367,
-0.42190736532211304,
0.3880385160446167,
-0.3111531138420105,
-0.01797623187303543,
-0.2624402940273285,
0.34717756509780884,
0.11402779817581177,
-0.0827377587556839,
0.1483077108860016,
-0.06758052110671997,
-0.063479945063591,
-0.2329549789428711,
0.22226600348949432,
0.5271817445755005,
-0.1305297613143921,
-0.2308434247970581,
-0.0140572190284729,
-0.3439655303955078,
0.1547497808933258,
-0.20106810331344604,
-0.41031527519226074,
-0.10641812533140182,
0.23523740470409393,
0.004464089870452881,
0.11610729247331619,
0.1561555564403534,
0.09030992537736893,
0.061736948788166046,
0.02778375893831253,
-0.15109972655773163,
-0.3129264712333679,
-0.4150558114051819,
0.20892785489559174,
-0.034022118896245956,
-0.27602124214172363,
0.1922527551651001,
0.10988930612802505,
-0.10974302887916565,
0.24728530645370483,
-0.33541905879974365,
-0.23000626266002655,
-0.4198145866394043,
0.2799169719219208,
0.1405619978904724,
0.20607081055641174,
-0.05974602326750755,
-0.06417399644851685,
-0.23808011412620544,
-0.17509421706199646,
-0.31843358278274536,
-0.31256428360939026,
-0.2317950427532196,
0.4786410629749298,
-0.3227100968360901,
-0.0006080903112888336,
-0.4156283736228943,
0.4951573610305786,
0.03788553178310394,
-0.26509466767311096,
-0.2028563916683197,
0.15756133198738098,
-0.2653771936893463,
0.21736513078212738,
-0.2752906084060669,
0.1420416384935379,
-0.1613447368144989,
0.14967964589595795,
-0.24128875136375427,
-0.04840408265590668,
0.6578291654586792,
-0.3743444085121155,
-0.023261599242687225,
-0.16609662771224976,
0.13851502537727356,
0.3137156665325165,
-0.016921909525990486,
-0.20381441712379456,
0.2743012011051178,
0.06383693218231201,
0.01356549747288227,
-0.13981711864471436,
-0.0337565615773201,
-0.057302843779325485,
0.1416703462600708,
-0.09460747241973877,
-0.007228575646877289,
0.13378426432609558,
-0.1324949860572815,
0.5061248540878296,
-0.05902709811925888
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env`
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 32
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env`
|
[
-0.2205500453710556,
-0.04736749082803726,
0.09124645590782166,
-0.10017770528793335,
0.3697274923324585,
-0.011571042239665985,
0.10142414271831512,
0.1315038651227951,
0.010005585849285126,
0.11178182810544968,
0.09104399383068085,
-0.15345293283462524,
0.20461544394493103,
0.1252300888299942,
0.09859023988246918,
-0.04407048225402832,
0.09984462708234787,
-0.07929842174053192,
-0.016665466129779816,
0.12072040140628815,
-0.015000822022557259,
0.02689395099878311,
-0.06800152361392975,
-0.14309410750865936,
-0.056348301470279694,
-0.006186114624142647,
0.013352053239941597,
0.36634358763694763,
-0.22724317014217377,
0.04320574179291725,
0.26426950097084045,
0.13172504305839539,
-0.018481682986021042,
0.5819856524467468,
-0.00012685544788837433,
0.18022982776165009,
0.40589821338653564,
-0.1852678507566452,
-0.3239503502845764,
-0.34377312660217285,
-0.3755214810371399,
-0.03069332242012024,
-0.005020577926188707,
-0.05166492611169815,
-0.031451232731342316,
-0.07742579281330109,
0.32573866844177246,
-0.5772078633308411,
0.4002199172973633,
0.2731664478778839,
0.07545264065265656,
0.21947139501571655,
-0.0512554831802845,
0.29955723881721497,
-0.019078001379966736,
0.11066484451293945,
-0.21691200137138367,
-0.009342391043901443,
0.15023872256278992,
0.06377000361680984,
0.1713094562292099,
0.4026278555393219,
-0.37419915199279785,
0.009272064082324505,
0.5120875239372253,
-0.17036353051662445,
-0.14143407344818115,
-0.37655505537986755,
-0.09337861090898514,
0.5573855042457581,
0.48189759254455566,
-0.2973979711532593,
-0.5032280683517456,
-0.3070560097694397,
0.010923248715698719,
-0.06187210977077484,
0.22652119398117065,
0.2248147577047348,
-0.06923605501651764,
0.12155215442180634,
-0.09645447880029678,
-0.2098371833562851,
-0.17439477145671844,
0.0793549120426178,
0.06762374937534332,
0.27800557017326355,
-0.021482642740011215,
0.1584102213382721,
0.05322278290987015,
-0.004797119647264481,
-0.26395660638809204,
-0.3398747742176056,
-0.20295393466949463,
0.12693290412425995,
-0.23834989964962006,
0.14426523447036743,
0.06788909435272217,
0.1989809274673462,
0.16114482283592224,
0.29415905475616455,
-0.11599457263946533,
0.11055033653974533,
-0.31992605328559875,
0.17154809832572937,
0.12234187126159668,
0.14225660264492035,
-0.05361316353082657,
0.24262164533138275,
0.30188459157943726,
0.25483039021492004,
0.07353180646896362,
-0.17808151245117188,
0.4067763686180115,
0.05128701031208038,
-0.4613521993160248,
-0.06640752404928207,
0.7208117842674255,
-0.21110554039478302,
-0.3479103744029999,
0.1590574085712433,
-0.4583157002925873,
0.09801144152879715,
0.18045330047607422,
0.40269380807876587,
-0.26530706882476807,
0.36766472458839417,
0.1840684562921524,
0.2774059772491455,
-0.23836100101470947,
-0.22402940690517426,
-0.1241496130824089,
-0.16895422339439392,
0.03939252719283104,
0.10911239683628082,
0.018408969044685364,
-0.20556963980197906,
0.3481583297252655,
-0.05666901171207428,
0.2028515636920929,
0.06379847973585129,
0.044930629432201385,
-0.062491387128829956,
0.003198489546775818,
0.39684662222862244,
-0.046029411256313324,
0.12413238734006882,
0.23966984450817108,
-0.10610217601060867,
0.050734080374240875,
-0.03487010300159454,
-0.059714771807193756,
-0.2677774131298065,
-0.06241169571876526,
0.05373459309339523,
-0.29239362478256226,
-0.102495476603508,
-0.38293200731277466,
0.16820669174194336,
-0.25632330775260925,
-0.21644684672355652,
0.19081297516822815,
0.08525348454713821,
-0.2668301463127136,
0.12901635468006134,
0.3564683198928833,
0.7964464426040649,
-0.25238245725631714,
-0.19665531814098358,
0.12153702229261398,
-0.24289187788963318,
0.3859177231788635,
0.11210040748119354,
0.004918793682008982,
-0.23665204644203186,
-0.14214907586574554,
0.18743793666362762,
0.18269109725952148,
-0.3376232385635376,
-0.5380033254623413,
0.31374403834342957,
-0.1635529100894928,
0.4373376667499542,
0.23557204008102417,
0.20316703617572784,
0.02567267417907715,
0.0007041990756988525,
-0.13568934798240662,
0.4889138340950012,
-0.27409183979034424,
0.15315082669258118,
-0.20893628895282745,
-0.31611377000808716,
0.08325724303722382,
0.08381721377372742,
-0.18136796355247498,
0.26191818714141846,
-0.021784156560897827,
-0.10075072199106216,
0.23911914229393005,
-0.05261379852890968,
0.07085345685482025,
0.2810479402542114,
0.3777710795402527,
0.4594760537147522,
-0.10086184740066528,
-0.10459957271814346,
-0.29036879539489746,
0.030614301562309265,
0.26581913232803345,
-0.06436074525117874,
-0.1116686463356018,
-0.3167188763618469,
-0.1286156177520752,
-0.10997796803712845,
-0.11751788854598999,
-0.22270843386650085,
-0.09198331087827682,
0.4097803831100464,
-0.025444261729717255,
0.2134222388267517,
-0.25137054920196533,
0.6161835789680481,
-0.3511029779911041,
0.10269227623939514,
-0.31830528378486633,
0.2899017333984375,
0.0906028151512146,
-0.09075332432985306,
-0.12029954046010971,
0.026061009615659714,
0.2942104935646057,
-0.1166519746184349,
-0.2147950530052185,
0.5232264995574951,
0.010871734470129013,
0.3674161434173584,
0.1811562180519104,
0.08763222396373749,
0.241008922457695,
-0.2724899351596832,
-0.037033386528491974,
0.4587964713573456,
0.2268170565366745,
0.07915819436311722,
-0.03358609974384308,
0.15591152012348175,
0.17692488431930542,
0.2986302077770233,
0.02971509099006653,
0.02932196669280529,
0.2982774078845978,
0.0872039943933487,
-0.4232672452926636,
-0.006521880626678467,
0.4784795343875885,
-0.2148403823375702,
0.22207827866077423,
-0.16436649858951569,
-0.375299870967865,
0.14298854768276215,
-0.10680323839187622,
0.08919146656990051,
-0.00044596195220947266,
-0.024722948670387268,
-0.07335352152585983,
0.04802611470222473,
0.0737663060426712,
0.31762978434562683,
0.334042489528656,
0.010599670931696892,
-0.2615334689617157,
0.20629359781742096,
0.037980884313583374,
-0.14414560794830322,
0.08678223192691803,
0.04840449243783951,
0.03980831056833267,
-0.03039415180683136,
0.058296747505664825,
-0.008988886140286922,
-0.22075825929641724,
-0.23385706543922424,
-0.21336527168750763,
0.05873335897922516,
-0.48976391553878784,
0.38673868775367737,
-0.33451077342033386,
-0.5597391128540039,
-0.0015240488573908806,
-0.14421206712722778,
-0.28728657960891724,
-0.37817084789276123,
-0.11074317991733551,
0.3969349265098572,
-0.23111765086650848,
0.18329663574695587,
-0.6000173687934875,
0.15594828128814697,
0.14710769057273865,
-0.2948973774909973,
-0.3484518826007843,
0.10016515851020813,
-0.06877598166465759,
-0.09057918190956116,
0.13047544658184052,
-0.0820189118385315,
0.3493204116821289,
-0.07277209311723709,
-0.4423544406890869,
-0.4367188811302185,
-0.213882178068161,
-0.056249894201755524,
-0.00010265782475471497,
0.5094892978668213,
-0.03692139685153961,
0.4647282361984253,
-0.08407500386238098,
-0.1389920860528946,
0.23109643161296844,
-0.06399647891521454,
-0.006196712143719196,
-0.15751345455646515,
0.07927344739437103,
0.13952204585075378,
-0.06124059855937958,
-0.009761281311511993,
-0.2967836856842041,
-0.2406364381313324,
-0.017132937908172607,
-0.35425782203674316,
-0.07371717691421509,
0.380439817905426,
-0.08514795452356339,
0.011052367277443409,
-0.22459259629249573,
-0.018990060314536095,
-0.0965096727013588,
-0.5695589184761047,
0.30656546354293823,
0.026601625606417656,
-0.15297111868858337,
0.28105640411376953,
0.11038157343864441,
-0.4449238181114197,
0.3142818808555603,
-0.4709927439689636,
-0.4378410577774048,
-0.019322993233799934,
-0.012441778555512428,
-0.09205310046672821,
-0.13613776862621307,
0.13655562698841095,
-0.34074971079826355,
0.18293024599552155,
-0.28152090311050415,
-0.17201168835163116,
-0.12335831671953201,
0.015538306906819344,
0.44016513228416443,
0.03516004607081413,
0.629437267780304,
-0.017089085653424263,
0.8042043447494507,
0.21987266838550568,
0.20904961228370667,
0.5509271025657654,
-0.08818154036998749,
0.466283917427063,
-0.0018019825220108032,
-0.24667885899543762,
0.2675909996032715,
0.14980685710906982,
-0.18223878741264343,
-0.06845584511756897,
0.09467097371816635,
0.1968178004026413,
-0.1637457013130188,
0.09162768721580505,
-0.13911733031272888,
-0.17503094673156738,
-0.12476034462451935,
-0.10269145667552948,
0.12541481852531433,
0.1521276831626892,
0.2284276783466339,
0.10685727000236511,
-0.1963300108909607,
-0.11712317168712616,
0.6097623705863953,
0.2833751142024994,
0.20276236534118652,
-0.030664244666695595,
-0.08968807011842728,
-0.71510249376297,
0.27508074045181274,
0.10654161870479584,
0.3583052158355713,
-0.22953128814697266,
0.033161818981170654,
0.06603273004293442,
-0.09434760361909866,
0.6981890797615051,
-0.1293255239725113,
0.13735418021678925,
-0.12773236632347107,
-0.06478050351142883,
-0.3292619287967682,
-0.16608133912086487,
0.16445273160934448,
0.3291347026824951,
0.22386996448040009,
-0.1761072874069214,
-0.33635130524635315,
0.038086436688899994,
0.1137566789984703,
-0.10688235610723495,
0.06845024228096008,
0.016932185739278793,
-0.4136267602443695,
-0.4078786075115204,
-0.1178220808506012,
-0.022444605827331543,
-0.07398729771375656,
0.0648031160235405,
0.04813741147518158,
0.14365682005882263,
-0.013389194384217262,
0.18889349699020386,
-0.07602566480636597,
-0.09040617942810059,
0.24956414103507996,
0.12594260275363922,
0.09242920577526093,
0.23616251349449158,
0.3323677182197571,
0.20765365660190582,
0.5836690068244934,
0.39507460594177246,
-0.5749267339706421,
-0.0953855887055397,
0.25126177072525024,
-0.06787999719381332,
0.4999538064002991,
-0.03753267601132393,
0.13151775300502777,
0.5415209531784058,
0.17417991161346436,
-0.206656813621521,
0.22688795626163483,
0.35362207889556885,
0.03008335456252098,
-0.0275200754404068,
-0.6421123743057251,
0.36144715547561646,
0.06704743206501007,
0.17600761353969574,
0.48235148191452026,
0.31863701343536377,
-0.1775275468826294,
-0.021055836230516434,
-0.2021102011203766,
0.8771012425422668,
0.1605602502822876,
0.043016962707042694,
0.33756476640701294,
-0.0025655142962932587,
0.3713519871234894,
-0.3908814787864685,
0.22389280796051025,
-0.04001862555742264,
-0.38356906175613403,
-0.21361052989959717,
-0.06025540083646774,
0.2803700268268585,
-0.49527591466903687,
-0.14458902180194855,
0.28626748919487,
0.017175033688545227,
0.19254614412784576,
-0.0021717017516493797,
-0.03868579491972923,
-0.5366079211235046,
-0.11686387658119202,
-0.5492490530014038,
0.0224953293800354,
-0.2942531704902649,
0.37605926394462585,
-0.033136408776044846,
-0.04924958571791649,
-0.0816647857427597,
-0.15019795298576355,
-0.44939279556274414,
0.31774839758872986,
-0.44233274459838867,
-0.2058793306350708,
-0.1305178701877594,
-0.06730768084526062,
-0.022606002166867256,
0.0239961426705122,
-0.055200204253196716,
-0.03395475819706917,
-0.44063034653663635,
0.47820037603378296,
-0.22056332230567932,
0.009214102290570736,
0.031086299568414688,
-0.11240053176879883,
0.2338506430387497,
0.03540927171707153,
-0.27612051367759705,
0.06074383854866028,
-0.14901232719421387,
-0.3736459016799927,
0.033268511295318604,
-0.23706598579883575,
0.3328601121902466,
0.06264834105968475,
-0.17126068472862244,
0.031741928309202194,
0.25265949964523315,
-0.08939219266176224,
0.012652633711695671,
-0.05410072207450867,
-0.23248225450515747,
-0.06269913166761398,
-0.06590695679187775,
-0.2426489293575287,
-0.13323040306568146,
0.5322275161743164,
-0.3766012191772461,
0.19658981263637543,
0.5268015265464783,
0.17223891615867615,
-0.08340957015752792,
-0.02794024907052517,
0.049701616168022156,
-0.24812832474708557,
0.022032663226127625,
0.10728642344474792,
-0.020763332024216652,
0.0927848070859909,
-0.25214090943336487,
0.06935666501522064,
-0.2073751538991928,
-0.2291852831840515,
-0.005109235644340515,
-0.5217727422714233,
-0.06548060476779938,
0.09548027068376541,
-0.18155881762504578,
0.0015387088060379028,
0.20448794960975647,
0.1498287320137024,
0.1996971070766449,
-0.12778399884700775,
-0.1602621078491211,
-0.13893307745456696,
-0.05830187350511551,
0.060999296605587006,
0.2654883563518524,
0.26507431268692017,
0.37140172719955444,
-0.22957012057304382,
-0.08741135150194168,
0.07171498239040375,
-0.2767575681209564,
-0.045055776834487915,
-0.19227050244808197,
0.20975929498672485,
0.14403417706489563,
-0.5231113433837891,
-0.10424444079399109,
-0.4103921055793762,
-0.16173076629638672,
-0.13336491584777832,
0.13333240151405334,
0.4855347275733948,
0.03993374854326248,
-0.23977170884609222,
-0.016424525529146194,
0.18259000778198242,
-0.06890566647052765,
0.08938141167163849,
-0.01299595832824707,
0.36141061782836914,
0.044229473918676376,
0.05336220562458038,
-0.0551227405667305,
0.018710948526859283,
-0.15952637791633606,
-0.07331255823373795,
0.10709233582019806,
0.3322896361351013,
0.39323341846466064,
-0.14775528013706207,
0.07525293529033661,
0.20580078661441803,
0.38559824228286743,
0.28318920731544495,
-0.16699694097042084,
0.02909761108458042,
0.3160628080368042,
0.039452143013477325,
-0.0004890169948339462,
0.10150808095932007,
0.5911044478416443,
0.27450206875801086,
0.14788687229156494,
0.0382721871137619,
-0.06870615482330322,
0.06886139512062073,
0.07354564219713211,
0.11700079590082169,
0.4315027892589569,
0.18080489337444305,
0.5821758508682251,
0.07322394102811813,
0.02326871082186699,
0.20847144722938538,
-0.13025745749473572,
0.10225139558315277,
0.20037725567817688,
0.3891315460205078,
-0.011406920850276947,
0.2761196494102478,
-0.04411115497350693,
0.06318545341491699,
-0.30915769934654236,
-0.44003012776374817,
-0.06494244933128357,
0.0076789408922195435,
-0.23622733354568481,
0.3707540035247803,
0.028148837387561798,
0.06497019529342651,
-0.5025319457054138,
-0.10366041213274002,
-0.2644060552120209,
0.2753007411956787,
0.023334048688411713,
-0.1532992124557495,
-0.17146936058998108,
-0.06701955944299698,
0.15561243891716003,
0.17729192972183228,
0.07587067037820816,
-0.047672197222709656,
0.01176348328590393,
0.072217658162117,
-0.12217085063457489,
-0.3665158748626709,
0.06889448314905167,
0.06596507877111435,
0.447126179933548,
-0.13818982243537903,
0.20775960385799408,
0.054358746856451035,
0.03965865075588226,
0.3099214732646942,
0.39628326892852783,
0.35930147767066956,
0.29964542388916016,
0.05443953722715378,
0.15793925523757935,
0.18424174189567566,
-0.02994776889681816,
0.046501561999320984,
0.04475007206201553,
0.0001066550612449646,
-0.24022288620471954,
0.18004697561264038,
0.04263646900653839,
-0.0612780787050724,
0.16121934354305267,
-0.039252620190382004,
0.45105651021003723,
-0.4387146532535553,
0.11504160612821579,
-0.41017791628837585,
0.43093445897102356,
-0.3415164649486542,
-0.06548314541578293,
-0.28299903869628906,
0.349018394947052,
0.1969842165708542,
-0.0391034260392189,
0.1696675419807434,
-0.057492922991514206,
-0.029325474053621292,
-0.18111471831798553,
0.1799522042274475,
0.515819787979126,
-0.1362312138080597,
-0.17575642466545105,
-0.006124868988990784,
-0.35250112414360046,
0.12746191024780273,
-0.207452654838562,
-0.3842219412326813,
-0.1253669410943985,
0.19987796247005463,
-0.033287227153778076,
0.09240779280662537,
0.15523894131183624,
0.10947902500629425,
0.14183521270751953,
0.03115028329193592,
-0.13781090080738068,
-0.3190211355686188,
-0.4815000295639038,
0.16023871302604675,
-0.04132077097892761,
-0.23385974764823914,
0.14294177293777466,
0.08502448350191116,
-0.09535790979862213,
0.22877685725688934,
-0.33458399772644043,
-0.23096872866153717,
-0.38967132568359375,
0.2543822228908539,
0.0657440721988678,
0.23778575658798218,
-0.08696043491363525,
-0.10901175439357758,
-0.3150496482849121,
-0.19082564115524292,
-0.30670255422592163,
-0.27112478017807007,
-0.22323477268218994,
0.44633421301841736,
-0.2732635736465454,
-0.0540117584168911,
-0.44246432185173035,
0.47280436754226685,
0.051843687891960144,
-0.15566276013851166,
-0.2414979487657547,
0.1712372899055481,
-0.3009801506996155,
0.1909770965576172,
-0.2786649167537689,
0.07748177647590637,
-0.13924746215343475,
0.16828621923923492,
-0.20443210005760193,
-0.11534245312213898,
0.6962776780128479,
-0.33675041794776917,
-0.001744583249092102,
-0.18237970769405365,
0.09035848081111908,
0.3266209065914154,
-0.02466370351612568,
-0.25397372245788574,
0.32958829402923584,
0.07675205916166306,
0.022488627582788467,
-0.08482194691896439,
-0.010286448523402214,
-0.14776171743869781,
0.1291472464799881,
-0.0764743983745575,
-0.04735380411148071,
0.13362902402877808,
-0.08920396864414215,
0.5417450666427612,
-0.021538347005844116
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 282
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
|
[
-0.24882738292217255,
-0.05979369580745697,
0.10071597993373871,
-0.1020842045545578,
0.24106338620185852,
-0.006721943616867065,
0.1711813509464264,
0.06702056527137756,
-0.02042454108595848,
0.12281379103660583,
0.11307927221059799,
-0.21383555233478546,
0.2762971520423889,
0.0067338887602090836,
0.07609734684228897,
0.024944517761468887,
0.058038219809532166,
-0.07915326952934265,
-0.023750342428684235,
0.1624048948287964,
0.04177107661962509,
-0.026761149987578392,
-0.13535358011722565,
-0.12524324655532837,
0.03942658379673958,
-0.10102317482233047,
0.06038112938404083,
0.2064029574394226,
-0.2620925009250641,
-0.050325073301792145,
0.2178485095500946,
0.11256441473960876,
-0.039984241127967834,
0.42803922295570374,
-0.00012739948579110205,
0.19163163006305695,
0.42635124921798706,
-0.14920172095298767,
-0.34510287642478943,
-0.3361908197402954,
-0.45278868079185486,
-0.01960190199315548,
0.02500396966934204,
-0.02162840962409973,
0.020996015518903732,
-0.13919515907764435,
0.19024714827537537,
-0.5174444913864136,
0.42188769578933716,
0.3194417357444763,
0.0557638518512249,
0.22001169621944427,
-0.10203883796930313,
0.4404272437095642,
-0.1949528455734253,
0.06058673560619354,
-0.16426044702529907,
0.05716996639966965,
0.10532943904399872,
0.07503975927829742,
0.17765086889266968,
0.477705717086792,
-0.38238105177879333,
-0.04632258042693138,
0.4585987329483032,
-0.17960622906684875,
-0.13827601075172424,
-0.44983935356140137,
0.04958910495042801,
0.6405588984489441,
0.5654538869857788,
-0.3172783851623535,
-0.4939989745616913,
-0.2375892996788025,
0.04841296002268791,
0.050206683576107025,
0.3548155128955841,
0.33010929822921753,
-0.09288200736045837,
0.1431681513786316,
-0.09661403298377991,
-0.18650716543197632,
-0.13014401495456696,
0.011366639286279678,
0.04487799108028412,
0.2680962085723877,
0.015370779670774937,
0.11462260037660599,
0.1314995139837265,
-0.07180875539779663,
-0.185865119099617,
-0.45313045382499695,
-0.24197962880134583,
0.1410767287015915,
-0.2905599772930145,
0.05733668804168701,
-0.008250713348388672,
0.1569833606481552,
0.1288509964942932,
0.277231901884079,
0.050150785595178604,
0.13279634714126587,
-0.20860259234905243,
0.13592883944511414,
0.06632304936647415,
0.16351889073848724,
-0.037418365478515625,
0.22584566473960876,
0.36661338806152344,
0.3107093274593353,
0.17331866919994354,
-0.1015930101275444,
0.4558316171169281,
0.004885316826403141,
-0.36947688460350037,
-0.009889721870422363,
0.6486762762069702,
-0.27449557185173035,
-0.3863508701324463,
0.2095421552658081,
-0.5609046816825867,
0.053431347012519836,
0.24340412020683289,
0.36243537068367004,
-0.17870980501174927,
0.3705243766307831,
0.11259007453918457,
0.18998022377490997,
-0.15770766139030457,
-0.13995708525180817,
-0.06468825787305832,
-0.09168703854084015,
0.17733441293239594,
0.18380790948867798,
0.04053642973303795,
-0.25125652551651,
0.3021911680698395,
0.005073691718280315,
0.12962764501571655,
-0.010639313608407974,
0.06467980891466141,
-0.15131577849388123,
0.12653568387031555,
0.3846639394760132,
-0.10068877041339874,
0.053170256316661835,
0.15502801537513733,
-0.08286243677139282,
0.01372440904378891,
0.028003200888633728,
0.023990657180547714,
-0.2588460445404053,
-0.02734636329114437,
0.04195235297083855,
-0.3606194853782654,
-0.06618428230285645,
-0.19571775197982788,
0.16099968552589417,
-0.35139164328575134,
-0.24477960169315338,
0.23546704649925232,
0.06504969298839569,
-0.21792730689048767,
0.22188736498355865,
0.31559786200523376,
0.7515557408332825,
-0.3696877062320709,
-0.18162783980369568,
0.10262084007263184,
-0.26936063170433044,
0.3242017924785614,
0.09934446215629578,
-0.030085373669862747,
-0.22464832663536072,
-0.1554211676120758,
0.21495355665683746,
0.23808813095092773,
-0.3808966279029846,
-0.6100171804428101,
0.3565932512283325,
-0.030600521713495255,
0.46143823862075806,
0.2511877119541168,
0.2366591989994049,
-0.035579390823841095,
0.037763841450214386,
-0.25247952342033386,
0.3314530849456787,
-0.19045981764793396,
0.1081562265753746,
-0.2617119550704956,
-0.301289439201355,
0.1061527207493782,
0.02859480306506157,
-0.27406689524650574,
0.2593287229537964,
-0.0621931329369545,
-0.1162026971578598,
0.17814236879348755,
-0.13603702187538147,
0.014689472503960133,
0.29081088304519653,
0.4122832715511322,
0.39128077030181885,
-0.1063154861330986,
-0.053993109613657,
-0.32709088921546936,
0.011603914201259613,
0.3047710061073303,
0.013726308941841125,
-0.23547206819057465,
-0.2994009852409363,
-0.05077566206455231,
-0.1391754299402237,
-0.12857292592525482,
-0.26319220662117004,
-0.10173112154006958,
0.36412543058395386,
0.09313513338565826,
0.20634189248085022,
-0.24076294898986816,
0.6099975109100342,
-0.3229310214519501,
0.05064582824707031,
-0.34433767199516296,
0.19630005955696106,
0.03163322061300278,
0.035982582718133926,
-0.019204096868634224,
0.05630391091108322,
0.2643362879753113,
-0.0963558554649353,
-0.16940274834632874,
0.5057211518287659,
0.07117541879415512,
0.2845444679260254,
0.11478526890277863,
0.1375018209218979,
0.21900276839733124,
-0.3110170364379883,
-0.06951630115509033,
0.34593454003334045,
0.2229502648115158,
0.16741031408309937,
-0.03972453624010086,
0.19231480360031128,
0.13871806859970093,
0.2822490632534027,
0.04071930795907974,
-0.03666696697473526,
0.35066771507263184,
0.04824676737189293,
-0.5566169619560242,
-0.03241176903247833,
0.4437922239303589,
-0.22352999448776245,
0.3038416802883148,
-0.13178949058055878,
-0.34223464131355286,
0.04197254404425621,
-0.0792836844921112,
0.05272473767399788,
0.07467769086360931,
0.0032176338136196136,
-0.059785984456539154,
0.004848118871450424,
0.05604937672615051,
0.39876389503479004,
0.3243664503097534,
-0.04362628608942032,
-0.2055947482585907,
0.23962697386741638,
-0.005819779820740223,
-0.1616457998752594,
0.14888697862625122,
0.012082844972610474,
-0.027110621333122253,
0.04722454398870468,
0.06651020795106888,
-0.019936926662921906,
-0.31449735164642334,
-0.2155512273311615,
-0.17114189267158508,
0.057669565081596375,
-0.4243879020214081,
0.4368795156478882,
-0.3941163718700409,
-0.5177329778671265,
0.031563349068164825,
-0.07544784992933273,
-0.3397493064403534,
-0.3137631416320801,
-0.024422302842140198,
0.40341439843177795,
-0.21321053802967072,
0.19919928908348083,
-0.5954261422157288,
0.1828998625278473,
0.1689361035823822,
-0.3598981499671936,
-0.2871137857437134,
0.06405548006296158,
-0.08359314501285553,
-0.07423998415470123,
0.2168348878622055,
-0.052423350512981415,
0.34942540526390076,
-0.03093094192445278,
-0.4940991997718811,
-0.4889468550682068,
-0.19222405552864075,
-0.03683505952358246,
0.058276914060115814,
0.42721912264823914,
-0.02251403033733368,
0.43548309803009033,
-0.043853044509887695,
-0.14444600045681,
0.1592015027999878,
0.003997620195150375,
-0.04420957714319229,
-0.12879151105880737,
-0.03286980465054512,
0.21425466239452362,
-0.06492193043231964,
-0.004197120666503906,
-0.23335547745227814,
-0.1537441909313202,
-0.05619385093450546,
-0.4606465995311737,
-0.010288096964359283,
0.36485913395881653,
-0.08068008720874786,
-0.0037107025273144245,
-0.27491071820259094,
-0.055872395634651184,
-0.13583584129810333,
-0.6150717735290527,
0.34477290511131287,
0.10884564369916916,
-0.19578135013580322,
0.2277182638645172,
0.06554865092039108,
-0.30689918994903564,
0.27527493238449097,
-0.5503800511360168,
-0.5611276626586914,
-0.06716287136077881,
0.03342478349804878,
-0.1840231567621231,
-0.26560941338539124,
0.13940943777561188,
-0.31365102529525757,
0.16947191953659058,
-0.25383272767066956,
-0.14619052410125732,
-0.07420655339956284,
-0.04591144621372223,
0.49339786171913147,
0.037194181233644485,
0.6148653626441956,
0.05017000064253807,
0.7884121537208557,
0.190118208527565,
0.09670504927635193,
0.4604693055152893,
-0.029802026227116585,
0.4189074635505676,
0.05916418507695198,
-0.1757485419511795,
0.17363998293876648,
0.15689468383789062,
-0.10698902606964111,
-0.1070786714553833,
-0.026571348309516907,
0.2333829253911972,
-0.2077002376317978,
0.2435310184955597,
-0.16456791758537292,
-0.19942189753055573,
-0.0927320271730423,
-0.2207314670085907,
0.22626715898513794,
0.2142852246761322,
0.2661907374858856,
0.14425267279148102,
-0.16770118474960327,
-0.09376093745231628,
0.6643581390380859,
0.39820596575737,
0.1670011729001999,
-0.07870978116989136,
-0.13579735159873962,
-0.6752009987831116,
0.2917376756668091,
0.21466195583343506,
0.5342477560043335,
-0.29443418979644775,
0.0662696361541748,
0.0725894644856453,
-0.11504941433668137,
0.6723254323005676,
-0.1043153777718544,
0.1612900197505951,
-0.12772656977176666,
-0.03889952600002289,
-0.24678194522857666,
-0.16075406968593597,
0.11686056852340698,
0.18950030207633972,
0.2740074694156647,
-0.17832839488983154,
-0.39312127232551575,
0.07373365014791489,
0.015786921605467796,
-0.06675375998020172,
0.06719540059566498,
-0.003232699353247881,
-0.49776819348335266,
-0.41464918851852417,
-0.06000620871782303,
-0.017284907400608063,
-0.09863079339265823,
0.05886058881878853,
-0.027201803401112556,
0.18622854351997375,
0.11991371214389801,
0.12132274359464645,
-0.01158083975315094,
0.04499083757400513,
0.22160062193870544,
0.07239401340484619,
0.038552265614271164,
0.2427985519170761,
0.3459901511669159,
0.1874055564403534,
0.5330177545547485,
0.46901506185531616,
-0.5702399611473083,
-0.048660747706890106,
0.23235712945461273,
-0.19867974519729614,
0.4296029508113861,
-0.09593623131513596,
0.2421538233757019,
0.5350134372711182,
0.15773186087608337,
-0.25884950160980225,
0.15631546080112457,
0.30673739314079285,
0.14544662833213806,
0.00009011814836412668,
-0.5183591246604919,
0.2889796793460846,
0.0341450534760952,
0.1759411245584488,
0.43517184257507324,
0.2617245316505432,
-0.18400338292121887,
-0.08950452506542206,
-0.13698342442512512,
0.8281609416007996,
0.2485513985157013,
-0.08546940982341766,
0.36428672075271606,
0.013311028480529785,
0.48086634278297424,
-0.42061710357666016,
0.3049829602241516,
-0.006013963371515274,
-0.3974352777004242,
-0.23462273180484772,
-0.1471119374036789,
0.38415050506591797,
-0.4397050142288208,
-0.17422106862068176,
0.2826062738895416,
0.07594311237335205,
0.1282355785369873,
0.039093516767024994,
0.06543624401092529,
-0.628583550453186,
-0.02664932981133461,
-0.5401321649551392,
0.012173347175121307,
-0.25976747274398804,
0.3771546483039856,
-0.04651244729757309,
-0.03649783506989479,
-0.037766117602586746,
-0.23709063231945038,
-0.4835875630378723,
0.29786884784698486,
-0.34487059712409973,
-0.13129685819149017,
-0.14123991131782532,
-0.07382329553365707,
0.09949624538421631,
0.03501562774181366,
-0.010989435017108917,
-0.03651099279522896,
-0.4253229796886444,
0.44266754388809204,
-0.20529508590698242,
0.09806329011917114,
-0.06046729534864426,
-0.09620390832424164,
0.2049383670091629,
-0.04367592930793762,
-0.29308652877807617,
0.011289194226264954,
-0.14638347923755646,
-0.37433040142059326,
0.12741565704345703,
-0.23991058766841888,
0.32846003770828247,
0.08517055213451385,
-0.04682864248752594,
-0.0243159681558609,
0.22117182612419128,
-0.08456160873174667,
-0.005311708897352219,
-0.10846829414367676,
-0.2683010995388031,
0.020317867398262024,
-0.03352559730410576,
-0.26755374670028687,
-0.05953657999634743,
0.5291216969490051,
-0.3625129759311676,
0.2616458535194397,
0.6128162145614624,
0.12275572121143341,
-0.07071667909622192,
-0.10402505844831467,
0.06005588173866272,
-0.37425270676612854,
0.05311872065067291,
0.06523638218641281,
0.05949019640684128,
0.09677720069885254,
-0.3498816192150116,
0.012446515262126923,
-0.20583654940128326,
-0.07710853964090347,
-0.07415873557329178,
-0.5295745134353638,
0.04013621807098389,
0.05515611916780472,
-0.20086422562599182,
0.012912482023239136,
0.1266322135925293,
0.34394538402557373,
0.1539156287908554,
-0.07966826111078262,
-0.13732187449932098,
-0.12679173052310944,
-0.19461728632450104,
0.13863703608512878,
0.23105968534946442,
0.22981205582618713,
0.37740373611450195,
-0.17790742218494415,
-0.0991406962275505,
0.1321142464876175,
-0.258927583694458,
-0.04288981109857559,
-0.160344198346138,
0.20380839705467224,
0.11613306403160095,
-0.5617787837982178,
-0.16466645896434784,
-0.3186533451080322,
-0.1719343066215515,
-0.02033582143485546,
0.1126050353050232,
0.41866424679756165,
0.026146572083234787,
-0.13017722964286804,
-0.14658008515834808,
0.16760268807411194,
-0.12873664498329163,
0.04059953987598419,
-0.12715131044387817,
0.33121457695961,
0.16717272996902466,
0.08395017683506012,
0.01009391900151968,
-0.0011555477976799011,
-0.25944554805755615,
-0.0018455460667610168,
0.10813071578741074,
0.17633149027824402,
0.2794688045978546,
-0.0435958206653595,
0.08866344392299652,
0.06466373056173325,
0.3432035744190216,
0.34844112396240234,
-0.1756497323513031,
-0.029559411108493805,
0.2716706693172455,
0.01811007782816887,
-0.04533020406961441,
0.09575051069259644,
0.42150112986564636,
0.1296936422586441,
0.17925506830215454,
-0.010465182363986969,
-0.07693999260663986,
0.1100110411643982,
0.12504079937934875,
0.029201816767454147,
0.38439762592315674,
0.2040240615606308,
0.5632764101028442,
0.212149515748024,
-0.017831072211265564,
0.22603775560855865,
-0.06585602462291718,
-0.021789275109767914,
0.0782213807106018,
0.29784899950027466,
-0.039552733302116394,
0.2451009452342987,
-0.08638519048690796,
0.16174940764904022,
-0.30644866824150085,
-0.4786066710948944,
-0.037660811096429825,
-0.0031824707984924316,
-0.21151232719421387,
0.24135929346084595,
0.042505018413066864,
-0.06511107832193375,
-0.44183972477912903,
-0.07637262344360352,
-0.22786667943000793,
0.22585414350032806,
0.05121336877346039,
-0.19542749226093292,
-0.24341924488544464,
-0.09979872405529022,
0.2577138841152191,
0.18406757712364197,
0.16958235204219818,
0.016742225736379623,
-0.08279961347579956,
0.07484515011310577,
-0.17695282399654388,
-0.31952807307243347,
-0.02853512018918991,
0.12209763377904892,
0.4052656590938568,
-0.12293966114521027,
0.21742577850818634,
0.1416996270418167,
0.04749121889472008,
0.30851221084594727,
0.3864172697067261,
0.2866663336753845,
0.27227890491485596,
0.1677858978509903,
0.19616679847240448,
0.09829433262348175,
-0.015749942511320114,
0.05001235008239746,
0.12403968721628189,
0.03731336444616318,
-0.3180476427078247,
0.3018350303173065,
0.013355672359466553,
-0.01082129031419754,
0.16894051432609558,
-0.11530134081840515,
0.4396657645702362,
-0.4485436975955963,
0.08867687731981277,
-0.35679230093955994,
0.4718174934387207,
-0.39349502325057983,
0.002363838255405426,
-0.21980559825897217,
0.3044019341468811,
0.13293729722499847,
-0.0834980309009552,
0.1777726113796234,
-0.11014536023139954,
-0.02767951786518097,
-0.2414121925830841,
0.24238117039203644,
0.5545063018798828,
-0.144019216299057,
-0.192891925573349,
-0.015583530068397522,
-0.437270849943161,
0.05535607412457466,
-0.15223045647144318,
-0.3405739665031433,
-0.21492178738117218,
0.25694572925567627,
-0.08427739888429642,
0.2149842530488968,
0.08720815181732178,
0.1675470471382141,
0.0928114578127861,
0.06805373728275299,
-0.11794844269752502,
-0.19480948150157928,
-0.4890574812889099,
0.23153363168239594,
-0.1505950689315796,
-0.2279423475265503,
0.2644839882850647,
0.1106109544634819,
-0.07235634326934814,
0.3044695258140564,
-0.33968260884284973,
-0.2854662537574768,
-0.16795878112316132,
0.2590194344520569,
0.25135883688926697,
0.3061864674091339,
-0.05230572447180748,
-0.11875223368406296,
-0.22409024834632874,
-0.1333894580602646,
-0.2181362807750702,
-0.19406795501708984,
-0.16041968762874603,
0.4224042594432831,
-0.16593651473522186,
0.011602895334362984,
-0.42703235149383545,
0.6022760272026062,
0.018398888409137726,
-0.19621261954307556,
-0.30337315797805786,
0.03594295680522919,
-0.22796028852462769,
0.23263311386108398,
-0.2769629955291748,
0.02471492439508438,
-0.07126915454864502,
0.09690625220537186,
-0.30793094635009766,
-0.08447518199682236,
0.62752366065979,
-0.34614837169647217,
0.08076508343219757,
-0.18081367015838623,
0.21000006794929504,
0.32588449120521545,
-0.050789639353752136,
-0.2372397780418396,
0.2536505162715912,
0.12685398757457733,
-0.031060688197612762,
-0.017238330096006393,
-0.02911727875471115,
-0.1549602448940277,
0.20886601507663727,
-0.1311543881893158,
-0.13455438613891602,
0.11319910734891891,
-0.045484140515327454,
0.45787444710731506,
-0.04479411244392395
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
> Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues.
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 54
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
> Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues.
|
[
-0.2545451819896698,
-0.015846043825149536,
0.1071447879076004,
-0.10625253617763519,
0.23831477761268616,
-0.01865294575691223,
0.13900771737098694,
0.0758848488330841,
0.08188807964324951,
0.13150744140148163,
0.12248232960700989,
-0.24985411763191223,
0.3034822344779968,
0.17006522417068481,
0.06800574064254761,
0.08820012956857681,
0.08650316298007965,
-0.016591951251029968,
-0.07093760371208191,
0.15153184533119202,
0.0811835527420044,
-0.036833152174949646,
-0.1242973804473877,
-0.15579010546207428,
-0.0049905553460121155,
-0.0530506893992424,
0.05781815946102142,
0.21560406684875488,
-0.3002259135246277,
-0.09027764201164246,
0.26595163345336914,
0.08883464336395264,
-0.07677638530731201,
0.3581045866012573,
-0.0001295732072321698,
0.22270755469799042,
0.39856046438217163,
-0.1547427475452423,
-0.25756731629371643,
-0.27477651834487915,
-0.4934389591217041,
-0.019067445769906044,
0.033668071031570435,
-0.01799682527780533,
0.04663579910993576,
-0.08487777411937714,
0.22977854311466217,
-0.48033684492111206,
0.43908095359802246,
0.36409130692481995,
0.03149525076150894,
0.1896936595439911,
-0.06492575258016586,
0.45306190848350525,
-0.17349648475646973,
0.05113992094993591,
-0.1713038980960846,
-0.016314737498760223,
0.052816279232501984,
0.01337508112192154,
0.13048839569091797,
0.4404281675815582,
-0.3077158033847809,
-0.023538347333669662,
0.4568747580051422,
-0.17532312870025635,
-0.13867971301078796,
-0.43999195098876953,
-0.011722665280103683,
0.624660849571228,
0.5270358920097351,
-0.28360071778297424,
-0.47329193353652954,
-0.22625842690467834,
0.03941579535603523,
0.059129536151885986,
0.3324511647224426,
0.29179906845092773,
-0.132003054022789,
0.1690984070301056,
-0.09295453876256943,
-0.2552562952041626,
-0.23363378643989563,
0.05659734457731247,
0.04707976430654526,
0.2116568684577942,
0.014294292777776718,
0.07973502576351166,
0.09370756894350052,
-0.06337784230709076,
-0.2550796568393707,
-0.4084673523902893,
-0.21812623739242554,
0.1534246951341629,
-0.28624117374420166,
0.027264811098575592,
0.022496026009321213,
0.19000020623207092,
0.15160953998565674,
0.2481471300125122,
0.024995844811201096,
0.16430267691612244,
-0.24362176656723022,
0.13204903900623322,
0.103170245885849,
0.2179514616727829,
-0.03567872196435928,
0.14769597351551056,
0.358980655670166,
0.3027358949184418,
0.07476095855236053,
-0.11404702812433243,
0.5204869508743286,
0.034888483583927155,
-0.38257160782814026,
-0.04656841605901718,
0.6366826295852661,
-0.3309638500213623,
-0.33809521794319153,
0.19608983397483826,
-0.5464265942573547,
0.025877205654978752,
0.1638498306274414,
0.3301028311252594,
-0.20471453666687012,
0.43342530727386475,
0.08713242411613464,
0.16579517722129822,
-0.24976330995559692,
-0.19024115800857544,
-0.06849860399961472,
-0.11534865200519562,
0.10292616486549377,
0.19255027174949646,
0.04779352620244026,
-0.21934449672698975,
0.2682148218154907,
-0.03058921918272972,
0.18611526489257812,
0.05702705681324005,
0.0602872297167778,
-0.11827504634857178,
0.11046779155731201,
0.42893290519714355,
-0.11533947288990021,
-0.030141662806272507,
0.16507743299007416,
-0.10830478370189667,
0.022844769060611725,
0.00016260147094726562,
0.017022348940372467,
-0.2728416621685028,
0.010369347408413887,
0.01596379652619362,
-0.36588019132614136,
-0.1290610134601593,
-0.2678905725479126,
0.16047871112823486,
-0.38194337487220764,
-0.23006312549114227,
0.20253115892410278,
0.11658354103565216,
-0.19607657194137573,
0.1804552674293518,
0.30983400344848633,
0.7481933832168579,
-0.32728061079978943,
-0.22694800794124603,
0.029537279158830643,
-0.3057963252067566,
0.3164246082305908,
0.16941401362419128,
0.01229193713515997,
-0.18676963448524475,
-0.16308899223804474,
0.21909670531749725,
0.2735302150249481,
-0.3108151853084564,
-0.6442461013793945,
0.3925577402114868,
0.01878754049539566,
0.45253515243530273,
0.2796308994293213,
0.23893260955810547,
-0.049079012125730515,
0.02553911693394184,
-0.3016294240951538,
0.3563193678855896,
-0.2255978286266327,
0.06287489831447601,
-0.2389792501926422,
-0.3538372218608856,
0.07897191494703293,
0.061215583235025406,
-0.2236749678850174,
0.336257666349411,
-0.01132243126630783,
-0.1706794798374176,
0.19694846868515015,
-0.09728299081325531,
0.009131193161010742,
0.25704920291900635,
0.4694175124168396,
0.3782861828804016,
-0.11998245120048523,
-0.09775317460298538,
-0.4065062403678894,
0.03172867000102997,
0.23281067609786987,
0.01719558984041214,
-0.18373911082744598,
-0.2739201486110687,
-0.017245788127183914,
-0.16099148988723755,
-0.06671282649040222,
-0.22934603691101074,
-0.12832608819007874,
0.3008212149143219,
0.13705673813819885,
0.19341450929641724,
-0.2940356731414795,
0.6863006353378296,
-0.30514368414878845,
0.07081219553947449,
-0.3717897832393646,
0.2366916686296463,
0.05105827748775482,
0.006870114244520664,
-0.07852711528539658,
0.04120418056845665,
0.23251289129257202,
-0.08656373620033264,
-0.14033576846122742,
0.46839094161987305,
0.10060933232307434,
0.2659912705421448,
0.17660284042358398,
0.2685253620147705,
0.22547224164009094,
-0.3566972017288208,
-0.07005621492862701,
0.3651374280452728,
0.1976359486579895,
0.17550873756408691,
-0.023839741945266724,
0.18165385723114014,
0.15008608996868134,
0.2828916609287262,
0.0871644914150238,
-0.0307903029024601,
0.36396294832229614,
0.0038830824196338654,
-0.5234501361846924,
-0.05749965086579323,
0.43152910470962524,
-0.16235318779945374,
0.23871557414531708,
-0.09205671399831772,
-0.30385273694992065,
0.09215287119150162,
-0.06947492063045502,
0.0743509978055954,
0.04839525744318962,
0.0416722297668457,
-0.029453545808792114,
-0.009471673518419266,
0.07228982448577881,
0.3546005189418793,
0.3788360357284546,
-0.01270082127302885,
-0.21157029271125793,
0.2541165351867676,
0.0006033731624484062,
-0.15068656206130981,
0.11847091466188431,
0.004828229546546936,
-0.07041012495756149,
-0.009660355746746063,
0.06401970982551575,
-0.029502537101507187,
-0.31305992603302,
-0.20257215201854706,
-0.21689265966415405,
0.05872930586338043,
-0.4485142230987549,
0.4454350471496582,
-0.40527766942977905,
-0.5653455257415771,
0.01846749521791935,
-0.04878620430827141,
-0.3547225296497345,
-0.2707952558994293,
-0.01622319221496582,
0.37951013445854187,
-0.2039252370595932,
0.19588971138000488,
-0.600707471370697,
0.21995986998081207,
0.12941992282867432,
-0.29318273067474365,
-0.33905816078186035,
0.08985145390033722,
-0.0952068641781807,
-0.09461389482021332,
0.25832271575927734,
-0.011705960147082806,
0.3471640944480896,
-0.020807618275284767,
-0.5158297419548035,
-0.4679381847381592,
-0.198288232088089,
-0.04583398252725601,
0.035333480685949326,
0.3899111747741699,
-0.06647150218486786,
0.46053028106689453,
-0.012533450499176979,
-0.030095301568508148,
0.1350608617067337,
-0.04033949226140976,
-0.07207009941339493,
-0.10338795185089111,
-0.02592165768146515,
0.2370215356349945,
-0.04953524097800255,
-0.0326945036649704,
-0.23496033251285553,
-0.13377048075199127,
-0.011289641261100769,
-0.46408793330192566,
0.003023069351911545,
0.3139154016971588,
-0.05737195536494255,
-0.02128937840461731,
-0.3004584014415741,
-0.14234009385108948,
-0.06121379882097244,
-0.6345278024673462,
0.3362955152988434,
0.11600348353385925,
-0.192963108420372,
0.27874860167503357,
0.10559514164924622,
-0.39921247959136963,
0.2707673907279968,
-0.5855135917663574,
-0.5052725076675415,
-0.15956948697566986,
0.027225028723478317,
-0.22771310806274414,
-0.21328352391719818,
0.2197694331407547,
-0.31817933917045593,
0.16114167869091034,
-0.2553677558898926,
-0.07961362600326538,
-0.025070413947105408,
-0.0007652640342712402,
0.4518962800502777,
0.042815230786800385,
0.5616500973701477,
0.06558391451835632,
0.8205007314682007,
0.21493004262447357,
0.08858998119831085,
0.4976067841053009,
-0.046424537897109985,
0.39636725187301636,
0.05823744088411331,
-0.14689935743808746,
0.1992570012807846,
0.12429825961589813,
-0.11648095399141312,
-0.08048573136329651,
0.010393165983259678,
0.2370886504650116,
-0.2070128321647644,
0.26906004548072815,
-0.13785016536712646,
-0.17051687836647034,
-0.05500449240207672,
-0.15904715657234192,
0.24005386233329773,
0.209793820977211,
0.18626290559768677,
0.16656923294067383,
-0.18228963017463684,
-0.06828764081001282,
0.6304000616073608,
0.3678894639015198,
0.17493009567260742,
-0.036669597029685974,
-0.19314159452915192,
-0.7105089426040649,
0.29716891050338745,
0.21040622889995575,
0.4318806827068329,
-0.29625627398490906,
0.04068122059106827,
0.08683338761329651,
-0.11527509242296219,
0.6273049712181091,
-0.12411624938249588,
0.217834010720253,
-0.114739790558815,
-0.026297030970454216,
-0.20975293219089508,
-0.13147422671318054,
0.12135395407676697,
0.1280285269021988,
0.28708598017692566,
-0.16725853085517883,
-0.3939546048641205,
0.0456797331571579,
-0.05082862079143524,
-0.12194976955652237,
0.05893538519740105,
0.010953563265502453,
-0.5033318400382996,
-0.3310927748680115,
-0.04441671073436737,
-0.007002443075180054,
-0.11019250005483627,
0.004280854482203722,
-0.010924088768661022,
0.1731698364019394,
0.0631454661488533,
0.13728579878807068,
-0.042991191148757935,
0.04215867072343826,
0.1793237030506134,
0.04945877566933632,
0.04169454798102379,
0.2323983609676361,
0.3497580289840698,
0.24606408178806305,
0.5960572361946106,
0.4537307024002075,
-0.635794460773468,
-0.12311331182718277,
0.30459967255592346,
-0.18657171726226807,
0.41817671060562134,
-0.06349097192287445,
0.2448885142803192,
0.5421735048294067,
0.17297160625457764,
-0.24338117241859436,
0.20604820549488068,
0.2699083387851715,
0.11285629868507385,
0.007003790233284235,
-0.4966081976890564,
0.3562620282173157,
-0.03258444368839264,
0.19150470197200775,
0.4107919931411743,
0.34038394689559937,
-0.17424631118774414,
-0.06861148774623871,
-0.1493557095527649,
0.8668528199195862,
0.2524368464946747,
0.001088954508304596,
0.320096880197525,
-0.06381556391716003,
0.451774924993515,
-0.44048774242401123,
0.2757006883621216,
0.001963239163160324,
-0.36575230956077576,
-0.25795379281044006,
-0.13488715887069702,
0.4531390368938446,
-0.3794453740119934,
-0.17344656586647034,
0.27132514119148254,
0.08145210146903992,
0.07214020192623138,
0.07137078791856766,
0.08152718842029572,
-0.607792317867279,
-0.054120589047670364,
-0.5584074854850769,
-0.006684863939881325,
-0.25171756744384766,
0.3327946662902832,
-0.04480110481381416,
-0.022919565439224243,
0.005046766251325607,
-0.23040297627449036,
-0.5240871906280518,
0.3110753893852234,
-0.36146751046180725,
-0.13031411170959473,
-0.12125350534915924,
-0.006129555404186249,
0.11628258228302002,
0.027588406577706337,
-0.02274392545223236,
-0.10193412005901337,
-0.44308844208717346,
0.4491593837738037,
-0.14258268475532532,
0.07239986211061478,
-0.02268279902637005,
-0.10211659222841263,
0.19870328903198242,
-0.051899656653404236,
-0.2976951003074646,
-0.015856638550758362,
-0.15305468440055847,
-0.4098657965660095,
0.16522973775863647,
-0.23726092278957367,
0.39148813486099243,
0.06690852344036102,
-0.010310458950698376,
0.034364908933639526,
0.24081501364707947,
-0.06566992402076721,
-0.02754221484065056,
-0.0369134396314621,
-0.24916523694992065,
0.07771553099155426,
-0.07895660400390625,
-0.2744631767272949,
-0.06553301215171814,
0.5469278693199158,
-0.341461718082428,
0.2307206094264984,
0.5941978693008423,
0.08021475374698639,
-0.06975632905960083,
-0.11603960394859314,
0.1171071007847786,
-0.32287827134132385,
0.06265706568956375,
0.047320276498794556,
0.08824121206998825,
0.0783216655254364,
-0.3549876809120178,
0.10621306300163269,
-0.20839519798755646,
-0.11199908703565598,
-0.05826520174741745,
-0.5173856019973755,
0.027745617553591728,
0.05639107525348663,
-0.15027537941932678,
0.004569448530673981,
0.11407250910997391,
0.29154765605926514,
0.12058700621128082,
-0.07757672667503357,
-0.11775017529726028,
-0.10237810760736465,
-0.15796338021755219,
0.08773954212665558,
0.21248118579387665,
0.2632851302623749,
0.4320738613605499,
-0.2266789674758911,
-0.13007330894470215,
0.09517442435026169,
-0.2799115478992462,
-0.03583179786801338,
-0.1394658237695694,
0.22041331231594086,
0.13228274881839752,
-0.5290850400924683,
-0.15499632060527802,
-0.338564395904541,
-0.19680172204971313,
0.01478960458189249,
0.13860158622264862,
0.4406140148639679,
-0.014631956815719604,
-0.08855165541172028,
-0.06495675444602966,
0.11395642906427383,
-0.163990318775177,
0.061192747205495834,
-0.10406425595283508,
0.32763803005218506,
0.16031514108181,
0.053770504891872406,
-0.027944227680563927,
0.016456350684165955,
-0.162209153175354,
-0.005068555474281311,
0.15867134928703308,
0.22678658366203308,
0.26476606726646423,
-0.06874966621398926,
0.07735523581504822,
0.045758672058582306,
0.3258591890335083,
0.2921127676963806,
-0.11112278699874878,
-0.0252300463616848,
0.3389659523963928,
-0.0026370584964752197,
-0.07767827808856964,
0.0741792693734169,
0.5075781345367432,
0.17326514422893524,
0.17900919914245605,
-0.027245350182056427,
-0.1275644302368164,
0.1250889152288437,
0.12782078981399536,
0.020984206348657608,
0.2529301345348358,
0.29017525911331177,
0.5099721550941467,
0.12535952031612396,
0.021071385592222214,
0.19304749369621277,
-0.14831817150115967,
-0.0008631721138954163,
0.10482486337423325,
0.3542754054069519,
0.03972623124718666,
0.2387469857931137,
-0.1256515383720398,
0.1724325716495514,
-0.38265666365623474,
-0.5039659142494202,
-0.09367431700229645,
-0.05072912573814392,
-0.25041520595550537,
0.2874145805835724,
0.06447380781173706,
0.03355301171541214,
-0.38454464077949524,
-0.1378670185804367,
-0.23748047649860382,
0.18486051261425018,
0.11755678802728653,
-0.14764438569545746,
-0.18556107580661774,
-0.03879198431968689,
0.2626872956752777,
0.20295819640159607,
0.193077951669693,
0.0014565736055374146,
0.03465045988559723,
0.1389877200126648,
-0.18939845263957977,
-0.2906589210033417,
-0.04039888083934784,
0.10994327813386917,
0.46079784631729126,
-0.0822310522198677,
0.19798950850963593,
0.07087275385856628,
-0.002567008137702942,
0.29867780208587646,
0.4395715594291687,
0.23403550684452057,
0.19179509580135345,
0.1662326604127884,
0.20278489589691162,
0.1445295363664627,
-0.00872262567281723,
0.03717589005827904,
0.12305502593517303,
0.038577381521463394,
-0.26749616861343384,
0.24809856712818146,
-0.02940734289586544,
0.0010627452284097672,
0.12825985252857208,
-0.16381047666072845,
0.39605244994163513,
-0.48486918210983276,
0.1629488468170166,
-0.3180466294288635,
0.45986372232437134,
-0.40575164556503296,
0.04037412628531456,
-0.27339038252830505,
0.24477837979793549,
0.11641158163547516,
-0.11197438836097717,
0.13935422897338867,
-0.09674148261547089,
-0.04242455214262009,
-0.26033565402030945,
0.32180166244506836,
0.5625675916671753,
-0.10044219344854355,
-0.17542704939842224,
-0.03949707746505737,
-0.4222317636013031,
0.07328523695468903,
-0.17528869211673737,
-0.2842896282672882,
-0.19806630909442902,
0.2379203587770462,
-0.08663169294595718,
0.18204161524772644,
0.12385236471891403,
0.12783505022525787,
0.07689261436462402,
0.1131114587187767,
-0.12313184142112732,
-0.15931865572929382,
-0.4755592942237854,
0.2274843007326126,
-0.18572787940502167,
-0.24834012985229492,
0.26006218791007996,
0.1458168923854828,
-0.09085899591445923,
0.39459770917892456,
-0.3444446325302124,
-0.2727071940898895,
-0.29622259736061096,
0.319067120552063,
0.2265111804008484,
0.28705716133117676,
-0.03783906251192093,
-0.1527528166770935,
-0.1327369213104248,
-0.13906247913837433,
-0.29265379905700684,
-0.2139415740966797,
-0.18445579707622528,
0.4318348169326782,
-0.2876613736152649,
0.08708562701940536,
-0.39415404200553894,
0.5657058954238892,
0.04359760135412216,
-0.24497756361961365,
-0.27903831005096436,
0.051455020904541016,
-0.216228187084198,
0.2638595402240753,
-0.285783588886261,
0.06821885704994202,
-0.09454368054866791,
0.05963905155658722,
-0.2920549511909485,
-0.014502516947686672,
0.6116695404052734,
-0.38665202260017395,
0.06096844747662544,
-0.19049207866191864,
0.24531812965869904,
0.28220006823539734,
-0.08612760901451111,
-0.24998575448989868,
0.19214171171188354,
0.08614907413721085,
-0.014992382377386093,
-0.04826229065656662,
-0.005429565906524658,
-0.19748786091804504,
0.2116415947675705,
-0.14763471484184265,
0.01991797611117363,
0.0974411591887474,
-0.010974230244755745,
0.46001097559928894,
-0.04082176834344864
] |
https://github.com/huggingface/datasets/issues/5975
|
Streaming Dataset behind Proxy - FileNotFoundError
|
Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections.
|
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 29
|
Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections.
|
[
-0.22630561888217926,
-0.08385402709245682,
0.0878797322511673,
-0.11146001517772675,
0.3125814199447632,
-0.019106566905975342,
0.11751818656921387,
0.11087314784526825,
-0.0013585686683654785,
0.05213019251823425,
0.09835315495729446,
-0.17861925065517426,
0.2117951214313507,
0.14290660619735718,
0.1175554096698761,
-0.07167559862136841,
0.0880468562245369,
-0.10730290412902832,
-0.06993797421455383,
0.1374867856502533,
0.004770245403051376,
0.03324263170361519,
-0.07876899093389511,
-0.14767271280288696,
-0.0008922226261347532,
-0.04170924425125122,
0.02626027725636959,
0.32652944326400757,
-0.18827161192893982,
0.03481408581137657,
0.21156084537506104,
0.09885735809803009,
0.0118284672498703,
0.5143144130706787,
-0.0001276810944546014,
0.1904909759759903,
0.39412176609039307,
-0.18129783868789673,
-0.2830961346626282,
-0.3325624465942383,
-0.3295993506908417,
-0.06006235629320145,
0.033986084163188934,
-0.02864827960729599,
-0.0357641763985157,
-0.11546912789344788,
0.31361809372901917,
-0.5326493382453918,
0.41432350873947144,
0.2474314272403717,
0.07745599001646042,
0.16388271749019623,
-0.1019584909081459,
0.37501075863838196,
-0.07522258907556534,
0.12437833845615387,
-0.23847436904907227,
0.03581565245985985,
0.2625827193260193,
0.028557511046528816,
0.18742723762989044,
0.4428535997867584,
-0.38943687081336975,
-0.011940903961658478,
0.561415433883667,
-0.12242396920919418,
-0.13167747855186462,
-0.37291276454925537,
-0.06942077726125717,
0.5815668702125549,
0.5081965923309326,
-0.2810818552970886,
-0.48487821221351624,
-0.32179123163223267,
0.026788312941789627,
-0.06030941754579544,
0.26348212361335754,
0.2519247531890869,
-0.10059817135334015,
0.12197130918502808,
-0.04208826273679733,
-0.21851347386837006,
-0.19758838415145874,
0.093699611723423,
0.10914911329746246,
0.35140031576156616,
-0.017891623079776764,
0.14775089919567108,
0.06547607481479645,
-0.049977295100688934,
-0.25769227743148804,
-0.32345154881477356,
-0.1916067898273468,
0.12722356617450714,
-0.25652289390563965,
0.14491306245326996,
0.02112581580877304,
0.16582725942134857,
0.10770311206579208,
0.2752408981323242,
-0.029305651783943176,
0.10059640556573868,
-0.29088789224624634,
0.1367044597864151,
0.11195342242717743,
0.16541814804077148,
-0.03831788897514343,
0.22843705117702484,
0.3279682993888855,
0.26784729957580566,
0.08777658641338348,
-0.15232127904891968,
0.4230113923549652,
0.03175289183855057,
-0.46164044737815857,
-0.06403572112321854,
0.7162262201309204,
-0.1985093355178833,
-0.34046366810798645,
0.20683839917182922,
-0.4840276539325714,
0.07152373343706131,
0.1878318041563034,
0.402401328086853,
-0.25960782170295715,
0.3639211356639862,
0.1963605135679245,
0.27632346749305725,
-0.22252124547958374,
-0.14531704783439636,
-0.08374223113059998,
-0.13882334530353546,
0.09264591336250305,
0.12257396429777145,
-0.0038731060922145844,
-0.1496816724538803,
0.3244177997112274,
-0.045211728662252426,
0.16220593452453613,
0.05214370787143707,
0.05265206843614578,
-0.04440562054514885,
0.03787205368280411,
0.3925516903400421,
-0.05118970572948456,
0.0950445681810379,
0.21119633316993713,
-0.11564711481332779,
0.020102910697460175,
-0.006001636385917664,
-0.02949364483356476,
-0.25447678565979004,
-0.056897133588790894,
0.04819028079509735,
-0.29451441764831543,
-0.11574350297451019,
-0.32110264897346497,
0.20006710290908813,
-0.34209173917770386,
-0.21442252397537231,
0.20015034079551697,
0.07369827479124069,
-0.24719054996967316,
0.1551746279001236,
0.3310156464576721,
0.7855743765830994,
-0.34099578857421875,
-0.1967495083808899,
0.14200805127620697,
-0.23525792360305786,
0.4272807240486145,
0.07222595810890198,
0.031479593366384506,
-0.23816248774528503,
-0.10820773243904114,
0.1998516470193863,
0.22828522324562073,
-0.296453058719635,
-0.561314582824707,
0.35266706347465515,
-0.14336556196212769,
0.44181379675865173,
0.28740599751472473,
0.26898765563964844,
-0.005271988920867443,
0.06553152203559875,
-0.17969411611557007,
0.4532622694969177,
-0.23916053771972656,
0.11519864946603775,
-0.2198299765586853,
-0.34234923124313354,
0.06566031277179718,
0.09123247861862183,
-0.20260341465473175,
0.24514901638031006,
-0.08431690186262131,
-0.13469812273979187,
0.2462330162525177,
-0.044118691235780716,
0.08285793662071228,
0.29879599809646606,
0.3639187812805176,
0.514323353767395,
-0.08729245513677597,
-0.06006339192390442,
-0.3157566487789154,
0.0052017830312252045,
0.25948259234428406,
-0.058767326176166534,
-0.1406969428062439,
-0.3046279549598694,
-0.1126827597618103,
-0.11181582510471344,
-0.13014860451221466,
-0.27176007628440857,
-0.08974544703960419,
0.3570285737514496,
0.010405942797660828,
0.1581805944442749,
-0.25205445289611816,
0.6394380927085876,
-0.3057326078414917,
0.07030165195465088,
-0.3293744921684265,
0.2819627821445465,
0.055268093943595886,
-0.1244458556175232,
-0.1017763614654541,
0.027834054082632065,
0.25616466999053955,
-0.13299432396888733,
-0.22694513201713562,
0.477621853351593,
-0.02378958836197853,
0.36797910928726196,
0.17905917763710022,
0.1054614931344986,
0.22582142055034637,
-0.29266151785850525,
-0.05371847003698349,
0.4521891474723816,
0.20454078912734985,
0.0787130668759346,
-0.08813067525625229,
0.13728946447372437,
0.17434008419513702,
0.3208802342414856,
0.0136636421084404,
0.026938369497656822,
0.30296826362609863,
0.06580956280231476,
-0.4229332208633423,
-0.005398966372013092,
0.4917127788066864,
-0.19737263023853302,
0.2704208195209503,
-0.1842365860939026,
-0.4081288278102875,
0.15870733559131622,
-0.20295315980911255,
0.0701594352722168,
0.05083383247256279,
0.014218013733625412,
-0.06943700462579727,
0.05411193519830704,
0.07339256256818771,
0.3189176619052887,
0.3305712938308716,
-0.006642068270593882,
-0.2977484166622162,
0.2573307156562805,
0.06817422062158585,
-0.15044724941253662,
0.07311990112066269,
0.022162973880767822,
-0.011639726348221302,
-0.03772319108247757,
0.05463016405701637,
0.0008874675258994102,
-0.2215486764907837,
-0.2435809075832367,
-0.24473482370376587,
0.1067606657743454,
-0.4775199890136719,
0.3995356857776642,
-0.3138960897922516,
-0.5643341541290283,
0.01919287070631981,
-0.07295654714107513,
-0.28453528881073,
-0.35705485939979553,
-0.10267265141010284,
0.4141715168952942,
-0.28820133209228516,
0.16599655151367188,
-0.5722604393959045,
0.15811750292778015,
0.1636090874671936,
-0.3355870842933655,
-0.3579125702381134,
0.058412276208400726,
-0.07350145280361176,
-0.08514095097780228,
0.1652892380952835,
-0.0355474054813385,
0.3410629332065582,
-0.07309354841709137,
-0.47140979766845703,
-0.4781946539878845,
-0.2081873118877411,
-0.06612640619277954,
0.014708170667290688,
0.5140274167060852,
-0.006328992545604706,
0.5018916130065918,
-0.12682601809501648,
-0.1772175431251526,
0.25401735305786133,
-0.09444309771060944,
0.01403123326599598,
-0.1727750599384308,
0.004988132975995541,
0.15125782787799835,
-0.05306189879775047,
-0.024127572774887085,
-0.32584789395332336,
-0.25894832611083984,
-0.011732608079910278,
-0.3907434344291687,
-0.04173333942890167,
0.32463008165359497,
-0.050387512892484665,
-0.018216975033283234,
-0.24578821659088135,
-0.026792502030730247,
-0.067633718252182,
-0.5982412099838257,
0.34345322847366333,
0.04736877232789993,
-0.20433203876018524,
0.2584226131439209,
0.08849801123142242,
-0.45148733258247375,
0.2561368942260742,
-0.5263524055480957,
-0.5181405544281006,
-0.04981432110071182,
-0.0140577033162117,
-0.11052611470222473,
-0.14799712598323822,
0.09859883785247803,
-0.33299797773361206,
0.17147697508335114,
-0.2641914486885071,
-0.17315258085727692,
-0.07384616881608963,
0.03454485163092613,
0.4313579797744751,
0.07520588487386703,
0.6518543362617493,
-0.02830781787633896,
0.8042612075805664,
0.1960766613483429,
0.21522760391235352,
0.5497758984565735,
-0.0850156918168068,
0.4102330207824707,
0.02721908688545227,
-0.23114220798015594,
0.2414570301771164,
0.1659611463546753,
-0.1362738311290741,
-0.057194456458091736,
0.11027584969997406,
0.21696534752845764,
-0.15429580211639404,
0.1275825798511505,
-0.18968579173088074,
-0.16426102817058563,
-0.06129952520132065,
-0.06209178268909454,
0.13856515288352966,
0.1330103576183319,
0.18598315119743347,
0.09935097396373749,
-0.18954306840896606,
-0.09456239640712738,
0.6295561790466309,
0.2866297960281372,
0.21403931081295013,
-0.03604826703667641,
-0.1440133899450302,
-0.7486257553100586,
0.2981639802455902,
0.15430912375450134,
0.3730793297290802,
-0.27808642387390137,
0.02771683782339096,
0.08902592211961746,
-0.1099562719464302,
0.6914042234420776,
-0.06526249647140503,
0.13821011781692505,
-0.09940749406814575,
-0.06432313472032547,
-0.33944758772850037,
-0.15999582409858704,
0.1887342780828476,
0.2967723608016968,
0.29124921560287476,
-0.20315134525299072,
-0.33582770824432373,
0.04433257132768631,
0.08181804418563843,
-0.08669121563434601,
0.046353962272405624,
-0.034692682325839996,
-0.43408727645874023,
-0.41527098417282104,
-0.10895133763551712,
-0.027813173830509186,
-0.0962955579161644,
0.06542099267244339,
0.10489105433225632,
0.1297174096107483,
0.09827707707881927,
0.12349625676870346,
-0.0706552267074585,
-0.018357153981924057,
0.23386269807815552,
0.11111120879650116,
0.09225812554359436,
0.22619612514972687,
0.347057580947876,
0.17038394510746002,
0.5770358443260193,
0.41242292523384094,
-0.5341936349868774,
-0.058585986495018005,
0.22237102687358856,
-0.11988126486539841,
0.4620577394962311,
-0.06681036949157715,
0.19214186072349548,
0.507703423500061,
0.2222345620393753,
-0.22025680541992188,
0.24350927770137787,
0.302141934633255,
0.09978308528661728,
0.035008013248443604,
-0.6277348399162292,
0.39327630400657654,
0.045145656913518906,
0.1554362177848816,
0.45664089918136597,
0.3093756437301636,
-0.15918388962745667,
-0.04190213978290558,
-0.1870274841785431,
0.8713448643684387,
0.16481813788414001,
0.02237245999276638,
0.3445112705230713,
-0.012229111045598984,
0.4007854163646698,
-0.37134432792663574,
0.22326673567295074,
-0.03362716734409332,
-0.341948926448822,
-0.18955166637897491,
-0.08342184126377106,
0.31712207198143005,
-0.47779160737991333,
-0.1712820678949356,
0.28384003043174744,
0.005573093891143799,
0.12781712412834167,
0.0040321992710232735,
-0.022304706275463104,
-0.5851511359214783,
-0.08045096695423126,
-0.5809130072593689,
0.011067792773246765,
-0.2836141586303711,
0.3891548216342926,
-0.049625493586063385,
-0.049176596105098724,
-0.1495353728532791,
-0.14421074092388153,
-0.4271499514579773,
0.29393303394317627,
-0.4051874279975891,
-0.2057487666606903,
-0.12972792983055115,
-0.11670172214508057,
-0.03941747546195984,
0.055534761399030685,
-0.05598415434360504,
-0.11051683127880096,
-0.4734385907649994,
0.45937713980674744,
-0.25109124183654785,
0.045286789536476135,
0.018292827531695366,
-0.12708690762519836,
0.21478056907653809,
-0.005614042282104492,
-0.2422834038734436,
0.055638864636421204,
-0.12896648049354553,
-0.3658446669578552,
0.05535353720188141,
-0.23731796443462372,
0.36384207010269165,
0.0667131245136261,
-0.16304101049900055,
0.003580905497074127,
0.2350212037563324,
-0.09015578031539917,
0.0032515749335289,
-0.013541780412197113,
-0.257998526096344,
-0.015209905803203583,
-0.06457503139972687,
-0.23074844479560852,
-0.13290897011756897,
0.4881933629512787,
-0.380135178565979,
0.24069535732269287,
0.5710018873214722,
0.2048700600862503,
-0.0689048171043396,
-0.025461118668317795,
0.08251025527715683,
-0.27205437421798706,
0.015977703034877777,
0.1387665867805481,
-0.00516526959836483,
0.05170522630214691,
-0.27615007758140564,
0.08198622614145279,
-0.19120775163173676,
-0.1806897222995758,
-0.028650816529989243,
-0.5192693471908569,
-0.0712227150797844,
0.08393634855747223,
-0.1523621380329132,
-0.010510370135307312,
0.2039644420146942,
0.22296056151390076,
0.1999986320734024,
-0.14250260591506958,
-0.15014402568340302,
-0.15816423296928406,
-0.09050054103136063,
0.08599887788295746,
0.26247990131378174,
0.2624162435531616,
0.3306564688682556,
-0.20345982909202576,
-0.10135084390640259,
0.05732449144124985,
-0.2693980634212494,
-0.041144974529743195,
-0.21865388751029968,
0.20948323607444763,
0.11903095990419388,
-0.5831354260444641,
-0.1230720803141594,
-0.41080015897750854,
-0.12000495195388794,
-0.10699072480201721,
0.1341533064842224,
0.4345017671585083,
0.009177036583423615,
-0.2215777039527893,
-0.0492766834795475,
0.16359567642211914,
-0.12737832963466644,
0.11096783727407455,
-0.09455724060535431,
0.40347546339035034,
0.11157158017158508,
0.041781675070524216,
-0.0001772744581103325,
0.01688218116760254,
-0.13877180218696594,
-0.07492019981145859,
0.061373863369226456,
0.2736937701702118,
0.39140748977661133,
-0.0882711112499237,
0.08422611653804779,
0.21510274708271027,
0.3742964267730713,
0.31192225217819214,
-0.13973000645637512,
0.06658415496349335,
0.3002007007598877,
0.0346335731446743,
-0.01514191459864378,
0.08403583616018295,
0.5395730137825012,
0.25284871459007263,
0.16998925805091858,
0.017166145145893097,
-0.05850005894899368,
0.07377001643180847,
0.06089148670434952,
0.12014757841825485,
0.3990536630153656,
0.2622544765472412,
0.5537481904029846,
0.128143772482872,
0.00828501209616661,
0.23516693711280823,
-0.1417223960161209,
0.04428496211767197,
0.15443632006645203,
0.345451295375824,
0.01884622871875763,
0.2825024425983429,
-0.05330604314804077,
0.1519160121679306,
-0.30623576045036316,
-0.4586215019226074,
-0.06160437688231468,
-0.028906598687171936,
-0.22461044788360596,
0.35942861437797546,
0.029127705842256546,
-0.012788474559783936,
-0.4952595829963684,
-0.1059771478176117,
-0.18335990607738495,
0.26627323031425476,
0.04095602035522461,
-0.18169893324375153,
-0.18351022899150848,
-0.046698372811079025,
0.21435928344726562,
0.1973019391298294,
0.10935427248477936,
-0.06273084878921509,
-0.03622719645500183,
0.06180589646100998,
-0.11912484467029572,
-0.3412232995033264,
0.023230332881212234,
0.06114281713962555,
0.4330645799636841,
-0.13788099586963654,
0.20345664024353027,
0.12746746838092804,
0.005427651107311249,
0.2837378978729248,
0.385642945766449,
0.339618444442749,
0.3086746037006378,
0.06298178434371948,
0.1916944831609726,
0.16035759449005127,
-0.02682204358279705,
-0.004735574126243591,
0.024374298751354218,
0.03020327165722847,
-0.25993669033050537,
0.1845434308052063,
0.034545257687568665,
-0.055585894733667374,
0.1711714267730713,
-0.06106087937951088,
0.4467427730560303,
-0.4171770513057709,
0.0543627068400383,
-0.3791080117225647,
0.4014616012573242,
-0.3366186320781708,
-0.06298746913671494,
-0.2657662034034729,
0.3551000952720642,
0.18091405928134918,
-0.08654630929231644,
0.17016050219535828,
-0.057842567563056946,
-0.0369463786482811,
-0.1602458506822586,
0.24721874296665192,
0.5211946964263916,
-0.07462000101804733,
-0.17821098864078522,
-0.010812558233737946,
-0.38100188970565796,
0.10462459176778793,
-0.1917697638273239,
-0.3865775167942047,
-0.15450255572795868,
0.20595979690551758,
-0.06904689222574234,
0.10094758123159409,
0.19281379878520966,
0.12849527597427368,
0.11017515510320663,
0.02285049855709076,
-0.1505296677350998,
-0.3202499449253082,
-0.4517921805381775,
0.23446449637413025,
-0.0759897455573082,
-0.21759501099586487,
0.19065609574317932,
0.0807882621884346,
-0.09141796827316284,
0.20512926578521729,
-0.3578541576862335,
-0.2908976376056671,
-0.289370596408844,
0.26487261056900024,
0.12521342933177948,
0.2236546128988266,
-0.07140032947063446,
-0.12250421196222305,
-0.30515891313552856,
-0.19684338569641113,
-0.24632567167282104,
-0.30150163173675537,
-0.18703562021255493,
0.46260491013526917,
-0.2979002594947815,
-0.028592895716428757,
-0.4277483820915222,
0.49970418214797974,
0.03703344613313675,
-0.14751090109348297,
-0.2633834779262543,
0.17361792922019958,
-0.2586236894130707,
0.20853225886821747,
-0.2898416817188263,
0.09477396309375763,
-0.14014549553394318,
0.08165714889764786,
-0.2362300306558609,
-0.09587222337722778,
0.6885058879852295,
-0.32255619764328003,
-0.0036636199802160263,
-0.19606377184391022,
0.06136802211403847,
0.3289847671985626,
0.05358194559812546,
-0.20811960101127625,
0.2891071140766144,
0.07484690845012665,
0.05828762799501419,
-0.06614535301923752,
-0.02067946270108223,
-0.13006146252155304,
0.10724557936191559,
-0.07857798784971237,
-0.08427758514881134,
0.16932746767997742,
-0.07491435110569,
0.5188896059989929,
-0.05309772491455078
] |
https://github.com/huggingface/datasets/issues/5971
|
Docs: make "repository structure" easier to find
|
Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu
|
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
| 27
|
Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu
|
[
-0.23497644066810608,
0.09987041354179382,
-0.10136644542217255,
0.3153049349784851,
0.13123160600662231,
-0.038294240832328796,
-0.04323809966444969,
0.4511716663837433,
0.034013573080301285,
0.5910804867744446,
0.01932925172150135,
0.1766022890806198,
0.1995178908109665,
0.22822009027004242,
0.4531806409358978,
0.07239323109388351,
-0.06094677001237869,
0.3619298040866852,
0.18767200410366058,
-0.2102428376674652,
-0.061390601098537445,
0.014494581148028374,
0.1232042908668518,
-0.02506173402070999,
0.05693693831562996,
0.2903304994106293,
-0.16520477831363678,
0.36364617943763733,
-0.3361737132072449,
-0.5364773869514465,
0.01417745091021061,
0.26376163959503174,
0.18511565029621124,
0.1457807421684265,
-0.00010614944039843976,
0.02502485364675522,
0.2375291883945465,
-0.08279546350240707,
-0.5580796599388123,
-0.0047615766525268555,
-0.43448594212532043,
-0.3924466073513031,
0.2181418538093567,
-0.32484981417655945,
-0.09820722788572311,
-0.1443803310394287,
0.3790060877799988,
0.011681586503982544,
-0.1884935051202774,
-0.05856425687670708,
0.22374367713928223,
0.4013548195362091,
-0.07454989105463028,
-0.01591077260673046,
0.3784424364566803,
0.4688219428062439,
-0.3496817350387573,
0.3213329315185547,
0.2869696319103241,
-0.06904805451631546,
-0.2175869643688202,
0.3714772164821625,
-0.10011505335569382,
0.007411397993564606,
0.3197554349899292,
0.39628177881240845,
0.2255060374736786,
-0.30143362283706665,
-0.010382212698459625,
0.32531100511550903,
0.6926309466362,
-0.25570422410964966,
-0.1854020059108734,
-0.43163248896598816,
-0.17501479387283325,
0.15386147797107697,
0.03339890390634537,
0.2124764323234558,
-0.06624642759561539,
0.44045379757881165,
-0.2377498894929886,
-0.4529699981212616,
-0.01339665800333023,
0.13106957077980042,
0.2951143980026245,
-0.011103518307209015,
-0.06703436374664307,
-0.15857192873954773,
0.21737056970596313,
-0.06485328823328018,
-0.06400685012340546,
-0.11842423677444458,
0.1205710619688034,
0.3139347732067108,
0.18295122683048248,
-0.18194003403186798,
0.16563601791858673,
0.2007361650466919,
0.475963830947876,
0.08199695497751236,
0.1135207861661911,
-0.020384017378091812,
-0.20433837175369263,
0.23667770624160767,
-0.01973140239715576,
0.06549875438213348,
0.06054864078760147,
0.02365177497267723,
0.4081622362136841,
0.1858607530593872,
0.2662402093410492,
-0.13399678468704224,
-0.2162700593471527,
-0.03200317546725273,
-0.153519406914711,
-0.163428395986557,
0.3423566222190857,
-0.13603350520133972,
-0.050884515047073364,
-0.10657864063978195,
-0.03980129584670067,
-0.26234808564186096,
0.1947282999753952,
0.33407649397850037,
0.1576990932226181,
0.14984402060508728,
-0.16885781288146973,
-0.19563740491867065,
-0.2546025216579437,
-0.1451970785856247,
-0.19657690823078156,
0.03186367452144623,
-0.022457759827375412,
0.33917108178138733,
0.14462457597255707,
-0.41860032081604004,
0.35397833585739136,
-0.24230214953422546,
0.027335401624441147,
0.09859265387058258,
-0.05590749531984329,
0.23850113153457642,
0.2845384478569031,
0.46577170491218567,
0.142919659614563,
-0.14790982007980347,
0.039306044578552246,
-0.20717981457710266,
-0.4158889651298523,
0.000053375959396362305,
-0.38105589151382446,
-0.5211611390113831,
-0.23772631585597992,
0.20924530923366547,
0.08394289761781693,
0.06380224972963333,
-0.3569624722003937,
0.3678334057331085,
-0.13074278831481934,
-0.06304661929607391,
0.0037842467427253723,
0.4485313892364502,
-0.2977164089679718,
-0.19582822918891907,
0.23337629437446594,
0.7245702147483826,
-0.022273248061537743,
-0.16196799278259277,
0.023151572793722153,
-0.31814277172088623,
-0.06297623366117477,
0.038494132459163666,
-0.257493793964386,
0.49147963523864746,
-0.38637790083885193,
0.15948621928691864,
0.3613603115081787,
-0.4690038561820984,
-0.2996062934398651,
0.35472753643989563,
-0.28753364086151123,
-0.031304605305194855,
0.03109946846961975,
0.04211399331688881,
0.0499335341155529,
-0.23386847972869873,
-0.14510369300842285,
-0.11264431476593018,
-0.16275626420974731,
0.3207055628299713,
-0.11206367611885071,
-0.3001294434070587,
-0.1318192481994629,
0.07727399468421936,
-0.05995466932654381,
0.37445011734962463,
0.15089979767799377,
-0.05875207111239433,
0.3948713541030884,
-0.061606112867593765,
-0.08741861581802368,
0.2384539246559143,
0.5275776982307434,
0.061264317482709885,
0.0611099898815155,
-0.05478622019290924,
-0.5702184438705444,
0.06488031148910522,
0.16686755418777466,
-0.023028075695037842,
-0.13823696970939636,
-0.46258002519607544,
-0.145725280046463,
0.0006926320493221283,
-0.08688059449195862,
0.07121933996677399,
0.09147563576698303,
0.01692623272538185,
0.12566401064395905,
-0.09331293404102325,
-0.22246798872947693,
-0.009128067642450333,
-0.1848653107881546,
0.30639833211898804,
-0.4138408303260803,
0.11583100259304047,
0.12202391028404236,
0.28817445039749146,
-0.006854336708784103,
0.011954765766859055,
0.16702990233898163,
-0.27094775438308716,
0.09572247415781021,
0.3927839696407318,
0.05886467546224594,
0.002222709357738495,
0.3353510797023773,
0.6731250286102295,
0.14518500864505768,
0.005373906344175339,
0.16247746348381042,
-0.3677408993244171,
-0.08513572812080383,
0.15284129977226257,
-0.3771335780620575,
-0.14247940480709076,
0.1523316651582718,
0.08572102338075638,
0.06923829019069672,
-0.08438324183225632,
0.29624542593955994,
0.009451813995838165,
-0.10073835402727127,
-0.46781376004219055,
0.063571996986866,
0.31947630643844604,
0.27790191769599915,
0.14893417060375214,
-0.35486531257629395,
0.4865253269672394,
0.2813977599143982,
-0.2572001814842224,
-0.18795901536941528,
0.39062145352363586,
0.10032666474580765,
0.051351398229599,
0.030069731175899506,
-0.02106623724102974,
0.08199909329414368,
0.29149460792541504,
0.06110941991209984,
0.09233206510543823,
0.23761335015296936,
-0.15309928357601166,
0.04118458926677704,
0.0613972470164299,
-0.012448650784790516,
-0.12359248846769333,
0.02676498144865036,
0.004182534292340279,
-0.3399944007396698,
-0.2031535655260086,
-0.26049184799194336,
0.20517979562282562,
-0.20966960489749908,
-0.04778796434402466,
0.048270441591739655,
-0.36048898100852966,
-0.15704762935638428,
0.08040541410446167,
-0.04321059212088585,
-0.35522395372390747,
0.21861177682876587,
-0.08768084645271301,
-0.21368835866451263,
-0.029475269839167595,
0.036386001855134964,
0.5780839323997498,
-0.18255066871643066,
0.14753136038780212,
-0.06200188025832176,
0.002382709411904216,
0.021434510126709938,
0.015693236142396927,
0.2528844177722931,
0.0900738462805748,
0.4281047284603119,
-0.7599073052406311,
0.25703173875808716,
-0.6589004397392273,
-0.4431586265563965,
0.516497015953064,
0.03854318708181381,
-0.004700981080532074,
0.2048613727092743,
0.29823991656303406,
0.1559683382511139,
-0.14251531660556793,
-0.09363369643688202,
0.0542188361287117,
-0.3447907269001007,
-0.07996319234371185,
0.026182452216744423,
-0.233186736702919,
-0.3735678195953369,
-0.3997865319252014,
-0.021798377856612206,
-0.29788893461227417,
0.16066068410873413,
0.17221379280090332,
0.34730327129364014,
0.04194779321551323,
-0.15426939725875854,
0.06642679125070572,
-0.1849476546049118,
0.16903901100158691,
-0.13154728710651398,
-0.4852115511894226,
0.16917337477207184,
-0.32688969373703003,
-0.18674109876155853,
-0.048277873545885086,
-0.20601804554462433,
-0.13038785755634308,
-0.0145708117634058,
-0.435186505317688,
-0.1628856509923935,
-0.32671356201171875,
0.16937576234340668,
0.15539303421974182,
0.1872013807296753,
0.4840029776096344,
0.16244907677173615,
-0.14728178083896637,
0.10747673362493515,
-0.19402818381786346,
-0.17202642560005188,
0.08505134284496307,
0.10374514758586884,
-0.023292437195777893,
0.04114049673080444,
-0.11910855770111084,
0.6001499891281128,
0.03206325322389603,
0.15078726410865784,
-0.0041732341051101685,
-0.22489693760871887,
0.5355381965637207,
-0.1484108567237854,
-0.029742518439888954,
0.01574717089533806,
0.10024294257164001,
-0.16792039573192596,
0.3426661491394043,
0.31417399644851685,
0.10760129988193512,
-0.07762664556503296,
-0.05091526359319687,
-0.3459695279598236,
-0.270552396774292,
0.047794148325920105,
0.06994292140007019,
0.16675281524658203,
0.1778692752122879,
0.18357154726982117,
0.014511585235595703,
-0.04102957621216774,
-0.00006052665412425995,
0.7014216184616089,
0.30122998356819153,
0.030036045238375664,
-0.2138776183128357,
0.2842532694339752,
-0.5628052353858948,
-0.02820013463497162,
0.024648169055581093,
-0.2557915151119232,
-0.1085403561592102,
-0.23258158564567566,
0.0564274825155735,
0.01503143273293972,
0.3179229199886322,
-0.1100604310631752,
-0.15390969812870026,
-0.1421242356300354,
-0.3517743647098541,
0.24969582259655,
0.00912688672542572,
0.02341010794043541,
0.14764493703842163,
0.022949788719415665,
0.7447546124458313,
-0.45562511682510376,
-0.4550970494747162,
0.4525599181652069,
0.19571229815483093,
-0.28863927721977234,
-0.08688795566558838,
-0.17550115287303925,
-0.3108001947402954,
-0.10857383161783218,
-0.20925506949424744,
-0.010392040945589542,
-0.1499623954296112,
0.062351688742637634,
0.09137441217899323,
0.14128686487674713,
0.23368990421295166,
0.11892804503440857,
0.3715742528438568,
0.25280797481536865,
0.16509738564491272,
0.0624096505343914,
0.7294909954071045,
0.45321398973464966,
0.3301856219768524,
0.6313199400901794,
-0.40748360753059387,
-0.24348369240760803,
0.044724367558956146,
-0.12446964532136917,
0.3932477533817291,
0.5258291959762573,
-0.009724410250782967,
-0.2025274932384491,
0.11728668212890625,
0.009164966642856598,
-0.6129087209701538,
0.11278454959392548,
-0.043157681822776794,
-0.17619015276432037,
-0.2620672881603241,
-0.6412106156349182,
0.48786571621894836,
0.036801114678382874,
-0.2297302633523941,
0.17744415998458862,
0.3633840084075928,
-0.02728440798819065,
0.06766021996736526,
-0.18510597944259644,
0.9303101897239685,
-0.34686166048049927,
0.17197398841381073,
0.2535092532634735,
-0.0841464102268219,
0.12816151976585388,
-0.48075544834136963,
-0.057692259550094604,
-0.3484138250350952,
-0.028013817965984344,
-0.1363019198179245,
-0.03186286985874176,
-0.25821709632873535,
0.04316527396440506,
-0.14937689900398254,
0.3347136676311493,
-0.0758126825094223,
0.28436270356178284,
-0.13140033185482025,
0.4886779189109802,
0.11878415942192078,
-0.23654639720916748,
-0.07339265942573547,
0.12928332388401031,
0.03736310824751854,
0.2931237518787384,
-0.00914059765636921,
-0.14656393229961395,
-0.12567132711410522,
-0.2889956831932068,
-0.13075383007526398,
-0.28884443640708923,
0.11716679483652115,
0.12564697861671448,
0.34701958298683167,
-0.14732713997364044,
-0.26605817675590515,
0.34780487418174744,
0.09779869019985199,
0.24933429062366486,
-0.37036681175231934,
-0.04690101370215416,
-0.021317891776561737,
0.04802026227116585,
0.07048165053129196,
-0.2025832235813141,
0.10649755597114563,
0.12207693606615067,
-0.09570470452308655,
-0.30484792590141296,
-0.277503103017807,
-0.22212344408035278,
-0.14996778964996338,
0.020533964037895203,
-0.026349082589149475,
-0.2312038540840149,
-0.13175109028816223,
0.04486314207315445,
-0.14756129682064056,
-0.08302679657936096,
0.10693061351776123,
0.25673454999923706,
0.14600344002246857,
-0.4020254909992218,
0.574577271938324,
-0.1354319453239441,
-0.034707631915807724,
0.09075233340263367,
-0.03169857710599899,
-0.17831942439079285,
-0.16241994500160217,
-0.16279177367687225,
-0.31183046102523804,
-0.22388532757759094,
0.14564865827560425,
0.29341793060302734,
-0.06847339123487473,
0.06842482089996338,
0.08740174770355225,
-0.014816656708717346,
0.00246481504291296,
0.17687702178955078,
-0.07862934470176697,
-0.2895137369632721,
-0.11807584762573242,
-0.13867102563381195,
-0.2916897237300873,
0.26366370916366577,
-0.2185654491186142,
0.29195436835289,
0.18195253610610962,
-0.18211053311824799,
-0.15826791524887085,
-0.023353764787316322,
-0.3697085380554199,
-0.14002637565135956,
-0.28757402300834656,
-0.13453665375709534,
0.1646037995815277,
0.4767988324165344,
0.22966723144054413,
-0.26673001050949097,
0.04651009291410446,
-0.27363044023513794,
-0.18418143689632416,
-0.1991766095161438,
-0.031583890318870544,
0.13479772210121155,
-0.1499943733215332,
-0.025213351473212242,
0.21176013350486755,
0.1630673110485077,
-0.03437583148479462,
-0.381879985332489,
0.31335970759391785,
0.211879700422287,
0.21121035516262054,
0.23175285756587982,
0.050901077687740326,
-0.06799041479825974,
0.1795801818370819,
0.30840951204299927,
-0.015708908438682556,
0.4418785572052002,
0.002014614176005125,
-0.14600278437137604,
-0.7250000238418579,
-0.05657774209976196,
0.4781627953052521,
0.3827945590019226,
0.2905619740486145,
0.2875738739967346,
0.052446313202381134,
0.12518316507339478,
0.2104514241218567,
0.23844259977340698,
0.09773387759923935,
0.06403300911188126,
-0.3629048466682434,
0.16014736890792847,
0.11468084901571274,
0.20034722983837128,
-0.26238328218460083,
-0.21003344655036926,
0.2384595423936844,
-0.061516351997852325,
0.14323052763938904,
0.28998708724975586,
0.28464850783348083,
0.035707034170627594,
0.03586442023515701,
-0.00635685957968235,
0.18055231869220734,
0.06253562122583389,
-0.12719768285751343,
0.15400953590869904,
-0.044568371027708054,
0.22209487855434418,
0.20249472558498383,
0.14475278556346893,
0.12554703652858734,
0.2405930906534195,
0.0026892274618148804,
0.23329007625579834,
0.12235089391469955,
0.3260018825531006,
0.06112264469265938,
-0.07647732645273209,
0.13774441182613373,
0.0734112560749054,
0.06733641028404236,
-0.2534084916114807,
0.03552485257387161,
0.07328836619853973,
0.21893978118896484,
0.1716848611831665,
-0.06300261616706848,
-0.19645358622074127,
-0.1497572660446167,
0.012631528079509735,
0.26580461859703064,
-0.10747929662466049,
0.17971345782279968,
-0.08645385503768921,
-0.014457609504461288,
-0.48050975799560547,
0.028557054698467255,
-0.2442123144865036,
0.28610748052597046,
-0.1020258367061615,
0.5188660025596619,
0.07431362569332123,
0.1730673909187317,
-0.1701359897851944,
-0.11139846593141556,
-0.2223537117242813,
0.01311909407377243,
0.06389541178941727,
0.4556400775909424,
0.1337679922580719,
0.3740900456905365,
0.30547139048576355,
-0.1626003384590149,
-0.12111297249794006,
-0.05912706255912781,
-0.14237940311431885,
-0.04442691057920456,
-0.31173571944236755,
-0.0975199043750763,
0.2863536477088928,
0.10197282582521439,
-0.14637789130210876,
0.09742575138807297,
0.13752174377441406,
-0.019994426518678665,
0.03597990795969963,
-0.09473656862974167,
-0.05556342005729675,
-0.12053903937339783,
-0.10829295217990875,
0.0772867351770401,
-0.14307379722595215,
-0.00784373376518488,
0.36387771368026733,
0.15999682247638702,
0.2166382372379303,
-0.06817100942134857,
0.10903915762901306,
0.31785085797309875,
0.2860395610332489,
0.49387744069099426,
0.017952505499124527,
-0.04771008715033531,
-0.2051527202129364,
-0.6347189545631409,
-0.04578819125890732,
-0.3792934715747833,
-0.21978263556957245,
0.17809811234474182,
0.2527488172054291,
0.11358824372291565,
0.24399253726005554,
-0.10047562420368195,
-0.21514128148555756,
0.008768183179199696,
-0.2787795960903168,
-0.13661913573741913,
-0.4497315287590027,
-0.039228931069374084,
-0.031105050817131996,
0.02581663802266121,
-0.2503540813922882,
0.18972733616828918,
-0.1787916123867035,
0.03984180837869644,
-0.23885409533977509,
0.4441967010498047,
-0.001313457265496254,
0.07664446532726288,
0.10399915277957916,
-0.14766258001327515,
-0.07550713419914246,
-0.2721320688724518,
-0.27747833728790283,
-0.19922301173210144,
-0.025299446657299995,
-0.07588046789169312,
0.3593100905418396,
-0.056513939052820206,
-0.11654823273420334,
-0.28624314069747925,
-0.10092286765575409,
-0.35860833525657654,
-0.0055661192163825035,
0.20846839249134064,
0.039263539016246796,
-0.20723234117031097,
0.12236233800649643,
0.04847900569438934,
-0.07872695475816727,
0.06940047442913055,
-0.01086195558309555,
-0.10501031577587128,
-0.2936946749687195,
0.21783728897571564,
-0.28090763092041016,
0.5382223129272461,
0.021911848336458206,
0.03474922105669975,
0.04951823130249977,
0.0597120076417923,
0.26477333903312683,
0.008093287236988544,
-0.3543660044670105,
0.05744888633489609,
0.21832089126110077,
-0.16173484921455383,
-0.19921661913394928,
0.1935262829065323,
-0.07396729290485382,
0.03219655528664589,
-0.1653355360031128,
0.2933835983276367,
0.17099079489707947,
-0.13140323758125305,
-0.14448387920856476,
-0.32738882303237915
] |
https://github.com/huggingface/datasets/issues/5971
|
Docs: make "repository structure" easier to find
|
@benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability.
|
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
| 16
|
Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
@benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability.
|
[
-0.0566098652780056,
0.039408668875694275,
-0.15528461337089539,
0.2259989231824875,
0.10666603595018387,
0.005891963839530945,
-0.1854541003704071,
0.4604346752166748,
-0.10095630586147308,
0.320556104183197,
0.030891181901097298,
0.16898560523986816,
0.09326280653476715,
0.14402465522289276,
0.47957363724708557,
0.05772511288523674,
-0.060044191777706146,
0.3289251923561096,
0.27292412519454956,
-0.16913047432899475,
0.060984350740909576,
0.028877176344394684,
-0.07842028886079788,
-0.045318156480789185,
0.08154034614562988,
0.18047629296779633,
-0.22014206647872925,
0.2924168109893799,
-0.4437291920185089,
-0.309132844209671,
0.11709147691726685,
0.3496449291706085,
0.08199139684438705,
0.33758875727653503,
-0.00010365179332438856,
-0.14871488511562347,
0.07739034295082092,
-0.011992857791483402,
-0.4549085199832916,
0.06586910039186478,
-0.340274453163147,
-0.2534888982772827,
-0.048603035509586334,
-0.27915066480636597,
-0.18305227160453796,
0.11050520837306976,
0.22256681323051453,
0.09828761219978333,
-0.18152914941310883,
0.0006301477551460266,
0.2796695828437805,
0.34777548909187317,
0.23077400028705597,
0.12370152026414871,
0.3566064238548279,
0.42596352100372314,
-0.5681791305541992,
0.3248271048069,
0.214154914021492,
0.0080131646245718,
-0.0018275603652000427,
0.2023342400789261,
-0.15184557437896729,
-0.1683512032032013,
0.4394797682762146,
0.31623920798301697,
0.22658154368400574,
-0.25639960169792175,
-0.01602458953857422,
0.39164382219314575,
0.6722385883331299,
-0.3259146511554718,
-0.13987430930137634,
-0.29716241359710693,
-0.15527425706386566,
0.10447520017623901,
-0.13113892078399658,
0.1957971751689911,
-0.025509312748908997,
0.30138692259788513,
-0.20970222353935242,
-0.6142021417617798,
-0.011553563177585602,
0.026524681597948074,
0.21006116271018982,
-0.02951335906982422,
-0.08004322648048401,
-0.2876899242401123,
0.27776363492012024,
-0.10234284400939941,
-0.12386264652013779,
-0.04254981875419617,
-0.0007364228367805481,
0.2105085849761963,
0.12245269864797592,
-0.30315402150154114,
0.18965786695480347,
0.11727143824100494,
0.4749009609222412,
0.09174379706382751,
0.07773412019014359,
0.014621233567595482,
-0.1274256408214569,
0.07965124398469925,
0.019323939457535744,
0.11980219185352325,
-0.01705876737833023,
0.21512959897518158,
0.33469122648239136,
0.27979400753974915,
0.20991763472557068,
-0.006080448627471924,
-0.2547837793827057,
-0.0835535004734993,
-0.01769820787012577,
-0.2463342249393463,
0.2690938115119934,
-0.15188437700271606,
-0.0014268383383750916,
-0.1709333211183548,
-0.21899330615997314,
-0.22687259316444397,
0.1447289139032364,
0.2864539325237274,
0.3171754479408264,
0.03206310048699379,
-0.16159436106681824,
-0.10128055512905121,
-0.3975014090538025,
-0.08432682603597641,
-0.13785654306411743,
0.21936605870723724,
-0.08730778098106384,
0.19753631949424744,
0.0014644227921962738,
-0.3824462890625,
0.05245447903871536,
-0.2665576934814453,
0.026119831949472427,
-0.018048850819468498,
-0.033068083226680756,
0.3801765441894531,
0.3548186421394348,
0.3042868375778198,
0.1195497065782547,
-0.1928233504295349,
0.01569702848792076,
-0.17211183905601501,
-0.41494640707969666,
-0.09861239045858383,
-0.23606908321380615,
-0.41101059317588806,
-0.14637206494808197,
0.21265855431556702,
0.1647278070449829,
0.008268170058727264,
-0.23888784646987915,
0.2969564199447632,
0.09410354495048523,
-0.07603298872709274,
0.11490489542484283,
0.4810718894004822,
-0.22227273881435394,
-0.2375367134809494,
0.19894397258758545,
0.6126274466514587,
0.19877541065216064,
-0.05084117129445076,
0.06821077316999435,
-0.1665382981300354,
-0.17129027843475342,
0.0471237376332283,
-0.07121845334768295,
0.41949784755706787,
-0.26575425267219543,
0.15623535215854645,
0.2798657715320587,
-0.3699140250682831,
-0.3498355746269226,
0.17956995964050293,
-0.23434822261333466,
0.0006765928119421005,
-0.03241980820894241,
0.04493836313486099,
0.11606020480394363,
-0.311576783657074,
-0.19626039266586304,
-0.20929397642612457,
-0.18968549370765686,
0.2041948437690735,
-0.153251051902771,
-0.09163796156644821,
-0.12326693534851074,
-0.11320403218269348,
-0.017141055315732956,
0.2884667217731476,
0.008029840886592865,
0.0536845326423645,
0.3369278311729431,
-0.10458654165267944,
-0.013201158493757248,
0.340689480304718,
0.5500689148902893,
0.01245667040348053,
0.0326244942843914,
-0.0921858698129654,
-0.4710767865180969,
-0.11751727014780045,
0.3627777695655823,
0.0837211161851883,
0.0477910153567791,
-0.41456764936447144,
-0.10234692692756653,
-0.1880520135164261,
-0.017060991376638412,
-0.10055354237556458,
0.1550656110048294,
-0.07729479670524597,
0.12169259786605835,
-0.1009877622127533,
-0.2269308716058731,
-0.03361952304840088,
-0.07293706387281418,
0.3089476227760315,
-0.4592280983924866,
0.18875837326049805,
0.0895112082362175,
0.2571461796760559,
0.1200249195098877,
0.14732085168361664,
0.12710094451904297,
-0.24705927073955536,
0.16644668579101562,
0.2575943171977997,
0.05584193021059036,
-0.06502942740917206,
0.23348990082740784,
0.6606757044792175,
0.24429084360599518,
-0.10871875286102295,
0.14656992256641388,
-0.30964234471321106,
-0.10328681021928787,
-0.01694858819246292,
-0.1566426157951355,
-0.10534091293811798,
0.10684432089328766,
0.09655440598726273,
0.2040616124868393,
0.13168272376060486,
0.23665520548820496,
-0.08061059564352036,
-0.18592527508735657,
-0.2981295585632324,
0.09184914827346802,
0.12374615669250488,
0.2175777703523636,
0.01030653901398182,
-0.21092957258224487,
0.5631030797958374,
0.10227781534194946,
-0.27184852957725525,
-0.046502478420734406,
0.4293611943721771,
0.04836142063140869,
0.015413288027048111,
-0.15713265538215637,
-0.033951882272958755,
0.014843694865703583,
0.2511061728000641,
0.1872839331626892,
0.18047475814819336,
0.24460330605506897,
0.0010831411927938461,
0.13307900726795197,
0.07534290850162506,
-0.015472290106117725,
-0.188066303730011,
-0.002181574236601591,
0.14444418251514435,
-0.3046443462371826,
-0.08525247871875763,
-0.2866320013999939,
0.1975851207971573,
-0.3222300708293915,
0.02247127704322338,
0.13088469207286835,
-0.23365217447280884,
-0.057715192437171936,
-0.03873302415013313,
0.020518114790320396,
-0.29303234815597534,
0.17410209774971008,
-0.12587487697601318,
-0.031199218705296516,
0.011895519681274891,
0.019986096769571304,
0.5935892462730408,
-0.18325687944889069,
0.2388847917318344,
-0.04518846049904823,
-0.019922776147723198,
0.036880750209093094,
0.08237342536449432,
0.2787199914455414,
0.11736367642879486,
0.5337477922439575,
-0.6603463888168335,
0.24659736454486847,
-0.8284755945205688,
-0.5493704080581665,
0.529637336730957,
-0.04387158900499344,
-0.10544151067733765,
0.39467543363571167,
0.22884145379066467,
-0.03853660076856613,
-0.05045648664236069,
-0.1695200502872467,
-0.1728111058473587,
-0.3408341705799103,
-0.07008196413516998,
-0.05160071328282356,
-0.3479861915111542,
-0.30032551288604736,
-0.3488866686820984,
0.10027157515287399,
-0.2488873153924942,
0.09445708245038986,
0.20928803086280823,
0.22397136688232422,
-0.026621170341968536,
-0.1742480993270874,
-0.010042458772659302,
-0.06383480876684189,
0.15439777076244354,
-0.14490728080272675,
-0.33476683497428894,
0.15048624575138092,
-0.3320499658584595,
-0.1920555680990219,
-0.07002981752157211,
-0.1975734680891037,
-0.003235138952732086,
-0.013823933899402618,
-0.2818794846534729,
-0.031366121023893356,
-0.2196262776851654,
0.015140820294618607,
0.24141310155391693,
0.2330552190542221,
0.35394296050071716,
0.16180962324142456,
-0.1031869575381279,
0.12888717651367188,
-0.1809144765138626,
-0.13745474815368652,
0.06808173656463623,
0.25638410449028015,
-0.06511976569890976,
0.05916551500558853,
-0.06713569909334183,
0.5099901556968689,
0.1542118787765503,
0.13732586801052094,
-0.08878760039806366,
-0.30694419145584106,
0.47483453154563904,
0.06817572563886642,
-0.12459558993577957,
0.08097127079963684,
0.06254616379737854,
-0.19032390415668488,
0.3037639260292053,
0.38804665207862854,
-0.024166369810700417,
0.027210772037506104,
-0.14855898916721344,
-0.3478217124938965,
-0.313035786151886,
-0.09479691088199615,
-0.015447605401277542,
0.21227309107780457,
0.21878758072853088,
0.10008988529443741,
-0.03903144970536232,
0.0018522553145885468,
0.06226654723286629,
0.6387028098106384,
0.2858194410800934,
-0.03290450945496559,
-0.16949790716171265,
0.42096632719039917,
-0.6882842183113098,
-0.08863924443721771,
-0.016216754913330078,
-0.41877877712249756,
-0.0015707798302173615,
-0.10863284021615982,
-0.023951120674610138,
-0.10041456669569016,
0.3825373649597168,
-0.140862375497818,
-0.20384453237056732,
0.05424390360713005,
-0.26637333631515503,
0.2505347430706024,
0.09733700752258301,
0.0004645101726055145,
0.12177372723817825,
0.17909830808639526,
0.4269086420536041,
-0.48834261298179626,
-0.2472042590379715,
0.4812246263027191,
-0.026224879547953606,
-0.19815321266651154,
0.03385530039668083,
-0.1533091813325882,
-0.5423573851585388,
-0.018378132954239845,
-0.16653558611869812,
0.019597375765442848,
-0.21802540123462677,
0.14077027142047882,
-0.011108426377177238,
0.1815444976091385,
0.15882056951522827,
0.14723727107048035,
0.35307639837265015,
0.37063711881637573,
-0.007675269618630409,
0.18969276547431946,
0.7164771556854248,
0.2568669319152832,
0.3202575743198395,
0.5360453724861145,
-0.3480255901813507,
-0.18490570783615112,
0.01704200729727745,
-0.09659922122955322,
0.38064485788345337,
0.42574745416641235,
0.08329054713249207,
-0.28718310594558716,
0.014226460829377174,
-0.024260006844997406,
-0.519060492515564,
-0.15507879853248596,
0.17547787725925446,
-0.1504420042037964,
-0.43858230113983154,
-0.6949371695518494,
0.42250269651412964,
0.1177675873041153,
-0.13509969413280487,
0.1526050865650177,
0.6516662240028381,
-0.08916857093572617,
-0.0701674297451973,
0.01864171028137207,
0.950974702835083,
-0.2642655372619629,
0.1813466101884842,
0.4826376736164093,
-0.16623516380786896,
0.07671640813350677,
-0.5019401907920837,
-0.03568488731980324,
-0.4684807062149048,
0.032746512442827225,
-0.1677323281764984,
-0.08103688061237335,
-0.30636194348335266,
0.00573885440826416,
-0.2891002893447876,
0.3166728913784027,
-0.19337163865566254,
0.3002333641052246,
-0.11378218233585358,
0.337357759475708,
0.1684187352657318,
-0.09802034497261047,
0.028920847922563553,
0.17506010830402374,
0.15421822667121887,
0.2105002999305725,
-0.1263197660446167,
-0.20996569097042084,
-0.10678358376026154,
-0.2818343937397003,
-0.3437246084213257,
-0.28508663177490234,
0.21949467062950134,
0.05611680448055267,
0.45422112941741943,
-0.009693719446659088,
0.022117968648672104,
0.18741263449192047,
0.17826321721076965,
0.1675734519958496,
-0.3372000753879547,
0.11722174286842346,
0.18094074726104736,
0.02241942472755909,
0.19660331308841705,
-0.12312088161706924,
-0.01615835912525654,
0.11212276667356491,
-0.06680602580308914,
-0.32545068860054016,
-0.1616419404745102,
-0.2025970220565796,
-0.212083637714386,
-0.005303442478179932,
0.0389326736330986,
-0.20918723940849304,
-0.062274396419525146,
0.22570405900478363,
-0.27820712327957153,
-0.2119179219007492,
0.1608557105064392,
0.1644337922334671,
0.19284017384052277,
-0.34211137890815735,
0.5992845296859741,
0.009337097406387329,
0.05931316688656807,
-0.0018527880311012268,
-0.01445135846734047,
-0.1145385205745697,
-0.20486953854560852,
-0.09764730930328369,
-0.4382632374763489,
-0.33137047290802,
0.10844843834638596,
0.20220863819122314,
-0.013300284743309021,
0.10569969564676285,
0.0037390345241874456,
-0.026273027062416077,
0.16983523964881897,
0.21804551780223846,
-0.06728031486272812,
-0.18731749057769775,
-0.23728016018867493,
0.040634602308273315,
-0.006586811505258083,
0.186142235994339,
-0.14189966022968292,
0.29797250032424927,
0.011346332728862762,
-0.22666186094284058,
-0.21458536386489868,
0.035473816096782684,
-0.4079415798187256,
-0.1646784096956253,
-0.19749824702739716,
-0.28943994641304016,
0.12366601824760437,
0.4080091714859009,
0.046742282807826996,
-0.4035496711730957,
0.10006752610206604,
-0.1537242978811264,
-0.12121738493442535,
-0.25582826137542725,
-0.05826566740870476,
0.11067941039800644,
-0.19557785987854004,
-0.18336521089076996,
0.3434065282344818,
0.2929649353027344,
-0.27828866243362427,
-0.36714571714401245,
0.1482800394296646,
0.26652348041534424,
0.25637224316596985,
0.015073227696120739,
-0.022633906453847885,
-0.21543624997138977,
0.11817674338817596,
0.27877962589263916,
0.006750874221324921,
0.42377591133117676,
0.1360064148902893,
-0.12822061777114868,
-0.5903525352478027,
-0.05171296000480652,
0.4532254636287689,
0.46897223591804504,
0.31737855076789856,
0.21211642026901245,
0.1653989851474762,
0.06425338238477707,
0.18322163820266724,
0.15644842386245728,
0.13502947986125946,
0.22336235642433167,
-0.41261211037635803,
0.192893847823143,
-0.0033473772928118706,
0.22065652906894684,
-0.24508479237556458,
-0.18485373258590698,
0.1733429729938507,
-0.09075015038251877,
0.1623539924621582,
0.321994811296463,
0.1255163997411728,
0.011041946709156036,
-0.16939233243465424,
-0.061126142740249634,
0.3771953284740448,
-0.07101574540138245,
-0.012109963223338127,
0.08471588045358658,
-0.046466246247291565,
0.08297079801559448,
0.18995696306228638,
0.1030573844909668,
0.05482732504606247,
0.13837626576423645,
0.18619927763938904,
0.29174166917800903,
0.1387113332748413,
0.32068824768066406,
0.048513419926166534,
0.22484837472438812,
0.12930260598659515,
0.14282777905464172,
0.06466017663478851,
-0.2607986032962799,
0.1291223168373108,
-0.09097423404455185,
0.28912442922592163,
0.09728413820266724,
-0.15295511484146118,
-0.06893029808998108,
-0.04026973247528076,
0.07940231263637543,
0.3429047465324402,
-0.09239433705806732,
0.2630388140678406,
-0.18163010478019714,
-0.050340715795755386,
-0.4448423981666565,
-0.018361374735832214,
-0.15578347444534302,
0.4477390646934509,
-0.1411469727754593,
0.5276247262954712,
-0.11648380011320114,
0.2623649835586548,
-0.13531357049942017,
-0.15900981426239014,
-0.26479071378707886,
0.07801498472690582,
-0.1394495815038681,
0.496070921421051,
0.22748872637748718,
0.2843184471130371,
0.15855222940444946,
-0.22471605241298676,
-0.20260192453861237,
-0.014447285793721676,
-0.035250186920166016,
-0.0805339440703392,
-0.21885371208190918,
-0.26757100224494934,
0.12585894763469696,
0.12370352447032928,
-0.18421684205532074,
0.10951383411884308,
0.21956953406333923,
-0.10714645683765411,
0.09042325615882874,
-0.12104343622922897,
-0.28796228766441345,
-0.0247645303606987,
-0.18032681941986084,
0.0708051547408104,
-0.06135544180870056,
0.021841831505298615,
0.33324503898620605,
0.020111069083213806,
0.2193520963191986,
-0.037930041551589966,
0.12856505811214447,
0.4497194290161133,
0.35126709938049316,
0.3756359815597534,
-0.03722437471151352,
0.0636676549911499,
-0.23367395997047424,
-0.5817908048629761,
0.021347977221012115,
-0.47196054458618164,
-0.37174269556999207,
0.16483329236507416,
0.2571278214454651,
0.08039993047714233,
0.17285390198230743,
0.019479721784591675,
-0.24105532467365265,
-0.09680410474538803,
-0.3115656077861786,
-0.1216171383857727,
-0.2551642060279846,
0.02709163725376129,
-0.019947821274399757,
-0.09297782927751541,
-0.21939125657081604,
0.1584865301847458,
-0.16802366077899933,
0.06783143430948257,
-0.15782542526721954,
0.511743426322937,
-0.0777314305305481,
0.1085248813033104,
-0.00019131600856781006,
-0.21827533841133118,
-0.00022736191749572754,
-0.28943121433258057,
-0.39048969745635986,
-0.17876112461090088,
0.014660341665148735,
0.010754945687949657,
0.3825942575931549,
0.02397274598479271,
-0.22030945122241974,
-0.2121756374835968,
-0.12278591096401215,
-0.31974560022354126,
-0.06669145077466965,
0.24669577181339264,
0.16589567065238953,
-0.4661393165588379,
0.2587147057056427,
0.22269561886787415,
-0.09746428579092026,
-0.019138868898153305,
0.04077756404876709,
-0.2744535207748413,
-0.2320663332939148,
0.16890694200992584,
-0.23846496641635895,
0.6202182769775391,
0.09992361813783646,
0.046583425253629684,
0.05931819975376129,
0.10335873812437057,
0.31320008635520935,
-0.13857287168502808,
-0.2961835563182831,
-0.036062560975551605,
0.1304793357849121,
-0.11288077384233475,
-0.28642991185188293,
0.25344419479370117,
0.023784905672073364,
0.014029372483491898,
-0.10311086475849152,
0.4179482161998749,
0.014511406421661377,
-0.0460512638092041,
0.03018321469426155,
-0.22051167488098145
] |
https://github.com/huggingface/datasets/issues/5971
|
Docs: make "repository structure" easier to find
|
I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options.
|
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
| 77
|
Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options.
|
[
-0.022013463079929352,
-0.1737280935049057,
-0.02575739473104477,
0.12676504254341125,
0.11845479905605316,
0.15033045411109924,
-0.09882140159606934,
0.09547270834445953,
-0.1797148734331131,
0.3140157461166382,
0.13280032575130463,
0.15143823623657227,
0.13749270141124725,
0.284512460231781,
0.23392929136753082,
-0.0441352054476738,
0.030300162732601166,
0.23887033760547638,
0.21589967608451843,
-0.012626715004444122,
0.1500590443611145,
0.02570646069943905,
-0.059963710606098175,
-0.050951436161994934,
-0.19393767416477203,
0.04043674096465111,
-0.19208568334579468,
0.34640756249427795,
-0.2406143993139267,
-0.48443108797073364,
0.21912294626235962,
0.30943942070007324,
0.1442868560552597,
0.292214572429657,
-0.00010850355465663597,
-0.16301044821739197,
0.07075436413288116,
-0.12989982962608337,
-0.4333963990211487,
-0.1578938215970993,
-0.2816939055919647,
-0.060845836997032166,
0.20896202325820923,
-0.11086492240428925,
-0.09574249386787415,
0.3095289170742035,
0.36340633034706116,
0.17678828537464142,
-0.0003291517496109009,
-0.06512095779180527,
0.2073836773633957,
0.35271742939949036,
0.1689274162054062,
-0.2544989287853241,
0.04762329161167145,
0.3297339677810669,
-0.5399630665779114,
0.6020950078964233,
0.4539926052093506,
0.1402815282344818,
-0.016318723559379578,
0.27784109115600586,
0.10156901180744171,
-0.13141950964927673,
0.4599159061908722,
0.13277971744537354,
-0.10895850509405136,
-0.25792863965034485,
-0.06178157031536102,
0.202223539352417,
0.5590136051177979,
-0.29757651686668396,
-0.2192685455083847,
-0.35720837116241455,
0.03705873712897301,
0.09690125286579132,
-0.18329393863677979,
0.17714622616767883,
-0.017706329002976418,
0.35994747281074524,
-0.20548957586288452,
-0.5314759612083435,
-0.06291624903678894,
0.2357695996761322,
0.3782070577144623,
-0.003724329173564911,
-0.15556026995182037,
-0.04762398451566696,
0.3224866986274719,
-0.1847895085811615,
-0.13915793597698212,
-0.08427473157644272,
0.11777031421661377,
0.04541182518005371,
0.16912108659744263,
-0.2532811760902405,
0.27546876668930054,
0.31128910183906555,
0.4202944040298462,
0.13206715881824493,
-0.03777027130126953,
0.0350777767598629,
-0.024548357352614403,
0.1599402129650116,
0.07732097059488297,
-0.019165199249982834,
0.12387573719024658,
0.10047174245119095,
0.3440462350845337,
0.30243635177612305,
0.32602012157440186,
-0.15221527218818665,
-0.25200003385543823,
0.08554026484489441,
-0.20738208293914795,
-0.19497349858283997,
0.28200817108154297,
-0.10006152093410492,
-0.04198800399899483,
-0.48080259561538696,
0.010167408734560013,
-0.06257154792547226,
0.24541902542114258,
0.19520767033100128,
0.3130757808685303,
0.025431271642446518,
-0.2921891212463379,
0.07493570446968079,
-0.15947632491588593,
-0.05140062794089317,
-0.15015548467636108,
0.1520013064146042,
-0.19251616299152374,
0.42088449001312256,
0.1501164585351944,
-0.5015674233436584,
0.1912563145160675,
-0.00718908803537488,
0.18157774209976196,
-0.07138354331254959,
-0.00942046009004116,
0.24244455993175507,
0.07069908827543259,
0.1697556972503662,
-0.051637545228004456,
0.03090825490653515,
-0.024812448769807816,
-0.09272323548793793,
-0.3813982903957367,
-0.2775612771511078,
-0.5353766679763794,
-0.5192660689353943,
-0.33608999848365784,
0.1468219757080078,
0.20781952142715454,
0.03749938681721687,
-0.3679702579975128,
0.31982311606407166,
-0.22182396054267883,
0.018091924488544464,
0.016506977379322052,
0.5832975506782532,
-0.06888546794652939,
-0.24373434484004974,
0.16258655488491058,
0.6091052889823914,
0.303011417388916,
-0.16031275689601898,
-0.045648716390132904,
-0.019893493503332138,
-0.178964763879776,
-0.04137652739882469,
-0.28252676129341125,
0.43268275260925293,
-0.35409149527549744,
0.22280384600162506,
0.3623684048652649,
-0.7067709565162659,
-0.29205355048179626,
0.16019828617572784,
-0.27852341532707214,
-0.12354103475809097,
-0.016147255897521973,
0.11219613254070282,
0.09484584629535675,
-0.29239118099212646,
-0.17446142435073853,
-0.03668878227472305,
-0.16519437730312347,
0.2596327066421509,
-0.0075121596455574036,
-0.2284763604402542,
-0.18354856967926025,
-0.007244745269417763,
-0.3739766776561737,
0.24577435851097107,
0.0768951028585434,
0.19462710618972778,
0.10898655652999878,
-0.12456762790679932,
-0.00787106528878212,
0.1739192008972168,
0.4740654230117798,
0.0012505725026130676,
-0.1582454890012741,
-0.0726507231593132,
-0.4774233102798462,
0.030330650508403778,
0.2637897729873657,
0.010335315018892288,
-0.112063929438591,
-0.5108378529548645,
-0.34285855293273926,
-0.32155197858810425,
-0.04754050448536873,
-0.16833770275115967,
0.1068747341632843,
-0.21567484736442566,
0.1830819547176361,
-0.07584922760725021,
-0.13584043085575104,
0.16044683754444122,
-0.1696367859840393,
0.4478556215763092,
-0.4935036301612854,
0.2706299126148224,
-0.025080783292651176,
0.06908097118139267,
0.17097018659114838,
0.13345500826835632,
0.22023817896842957,
-0.15319745242595673,
0.07181574404239655,
0.48684144020080566,
-0.10343466699123383,
0.2651582956314087,
0.2050573229789734,
0.6089351177215576,
0.262996643781662,
0.018604572862386703,
-0.005531074479222298,
-0.389422744512558,
-0.10998483747243881,
0.19313445687294006,
-0.44369247555732727,
-0.09546814858913422,
0.15123024582862854,
0.11229082942008972,
0.1719171702861786,
0.13408002257347107,
0.03698355704545975,
-0.039840105921030045,
-0.18962764739990234,
-0.3191351294517517,
-0.13716693222522736,
0.11684609949588776,
0.0904947966337204,
-0.03783342242240906,
-0.294988751411438,
0.5033543109893799,
0.39314404129981995,
-0.15525546669960022,
0.1222337931394577,
0.3834407329559326,
-0.0034876391291618347,
0.1067885234951973,
0.2609153091907501,
-0.10475893318653107,
0.0366797000169754,
0.21111492812633514,
0.11332721263170242,
0.10822077095508575,
0.0924045518040657,
-0.14077427983283997,
0.09085807204246521,
0.10238892585039139,
0.04721797630190849,
-0.3527800142765045,
0.013720231130719185,
0.07274563610553741,
-0.11178905516862869,
-0.20040009915828705,
-0.3363644480705261,
0.08654366433620453,
-0.29046913981437683,
0.011188330128788948,
0.0021399985998868942,
-0.16324827075004578,
-0.03355446830391884,
-0.07032392919063568,
0.025405868887901306,
-0.35792580246925354,
0.17675822973251343,
0.16823223233222961,
-0.12220828235149384,
0.010233736597001553,
0.033604513853788376,
0.4283669590950012,
-0.2444731444120407,
0.3793520927429199,
-0.08968661725521088,
0.11924269050359726,
-0.006890643388032913,
0.06692352890968323,
0.27971982955932617,
0.2059900164604187,
0.4685060381889343,
-0.6191544532775879,
0.28271275758743286,
-0.6539960503578186,
-0.5511392951011658,
0.3760800361633301,
0.003174055367708206,
-0.00756438821554184,
0.34193044900894165,
0.1310800462961197,
-0.211868017911911,
-0.38949939608573914,
-0.11349153518676758,
-0.10586578398942947,
-0.20198102295398712,
-0.1029084175825119,
-0.10001766681671143,
-0.19045227766036987,
-0.21888113021850586,
-0.37833282351493835,
0.06539145112037659,
-0.5057637691497803,
0.22748823463916779,
-0.042828842997550964,
0.25125300884246826,
-0.04819399490952492,
0.005165835842490196,
0.13408443331718445,
-0.42157578468322754,
0.1610996425151825,
-0.0980258360505104,
-0.5900624394416809,
0.11010374128818512,
-0.4686383605003357,
-0.08917699754238129,
0.1042642891407013,
-0.10660973191261292,
0.10932791233062744,
-0.2132592797279358,
-0.24623160064220428,
-0.35456573963165283,
-0.18682685494422913,
0.2312292456626892,
0.13719265162944794,
0.3456256091594696,
0.297174870967865,
0.08585504442453384,
-0.015924274921417236,
0.19361981749534607,
-0.12390561401844025,
-0.20686519145965576,
0.13887470960617065,
0.14370298385620117,
-0.018772877752780914,
-0.012506987899541855,
0.045949455350637436,
0.6105441451072693,
0.30923378467559814,
0.06567609310150146,
-0.03437858819961548,
0.027457213029265404,
0.4548444449901581,
-0.10972710698843002,
-0.14047834277153015,
0.17546634376049042,
0.09732913970947266,
0.26144182682037354,
0.31486427783966064,
0.4601326286792755,
0.34435534477233887,
0.14080578088760376,
-0.21452508866786957,
-0.31560415029525757,
-0.36479315161705017,
-0.06746067851781845,
-0.07787999510765076,
0.17918427288532257,
-0.0535176545381546,
0.028982333838939667,
-0.07193097472190857,
0.059113554656505585,
0.0007322439923882484,
0.5912653207778931,
0.2683461010456085,
0.07738649100065231,
-0.24746544659137726,
0.1282607764005661,
-0.5583100318908691,
-0.0626932680606842,
-0.08311957120895386,
-0.2587651312351227,
-0.0732448473572731,
-0.0025898776948451996,
0.01555519551038742,
0.08216321468353271,
0.37114810943603516,
-0.12410026043653488,
-0.2917628884315491,
-0.18013103306293488,
-0.2573931813240051,
0.004670672118663788,
0.2840457260608673,
0.03475694730877876,
0.35294073820114136,
0.11579686403274536,
0.5739752650260925,
-0.6456436514854431,
-0.40376418828964233,
0.40069225430488586,
-0.010715712793171406,
0.02553781494498253,
0.06283195316791534,
0.07104426622390747,
-0.38656869530677795,
-0.3497515022754669,
-0.035314299166202545,
0.14093941450119019,
-0.13229668140411377,
0.012926192954182625,
-0.056672655045986176,
0.21077121794223785,
0.22914859652519226,
0.12427886575460434,
0.2885544002056122,
0.38239920139312744,
0.19724911451339722,
0.08392901718616486,
0.5912729501724243,
0.12777374684810638,
0.3888297379016876,
0.43678903579711914,
-0.02748861163854599,
-0.06254678964614868,
0.18060904741287231,
0.04845799505710602,
0.3845488131046295,
0.46092599630355835,
0.1268070936203003,
0.03267841413617134,
-0.05937846750020981,
0.1642264574766159,
-0.594757616519928,
-0.006596770137548447,
0.13096539676189423,
-0.02671586349606514,
-0.34691837430000305,
-0.27875521779060364,
0.44214582443237305,
0.18079546093940735,
-0.15538978576660156,
0.11305598169565201,
0.6324250102043152,
-0.18658815324306488,
-0.09066098928451538,
-0.11299943178892136,
0.9929137229919434,
-0.011919863522052765,
0.3918606638908386,
0.1436951756477356,
-0.2161531001329422,
0.255990207195282,
-0.3148896098136902,
-0.22996871173381805,
-0.22131669521331787,
0.058702368289232254,
-0.14381419122219086,
-0.06263478100299835,
-0.05488572269678116,
-0.04976815730333328,
-0.5112786889076233,
0.35250088572502136,
-0.18888676166534424,
0.4438197910785675,
-0.11459727585315704,
0.4621620774269104,
-0.19301998615264893,
-0.3535062372684479,
-0.10520743578672409,
0.1549493819475174,
0.20120826363563538,
0.07601362466812134,
-0.04453528672456741,
-0.1568724513053894,
-0.20746448636054993,
-0.19312021136283875,
-0.2088509202003479,
-0.25829365849494934,
0.12672868371009827,
0.04801581799983978,
0.23392225801944733,
0.05033273994922638,
0.2593114674091339,
0.21030890941619873,
0.36402279138565063,
0.2532717287540436,
-0.5078848004341125,
0.03537680208683014,
-0.19767436385154724,
-0.1481776237487793,
-0.05604585260152817,
-0.21118219196796417,
0.08370640128850937,
0.0031615570187568665,
-0.16534966230392456,
-0.14373403787612915,
-0.05083976686000824,
-0.09677539765834808,
-0.40098410844802856,
-0.15535908937454224,
-0.07241316139698029,
-0.383718878030777,
-0.1964530348777771,
0.09757156670093536,
-0.21856792271137238,
-0.2540181279182434,
0.10899941623210907,
0.24794529378414154,
0.10446081310510635,
-0.34214454889297485,
0.46770188212394714,
0.1371219903230667,
-0.10401983559131622,
-0.025279484689235687,
-0.1722288429737091,
-0.22653059661388397,
-0.11849552392959595,
-0.17044563591480255,
-0.20682667195796967,
-0.20567283034324646,
0.13050013780593872,
0.3400004208087921,
-0.1889447569847107,
0.06146819144487381,
0.07831596583127975,
-0.10965350270271301,
-0.03379688411951065,
0.04056869447231293,
-0.09298104047775269,
-0.22338572144508362,
-0.19081993401050568,
0.05407992750406265,
-0.29375171661376953,
0.3657146096229553,
0.02942170947790146,
0.22239580750465393,
-0.21802452206611633,
0.05827275663614273,
-0.01929890550673008,
0.1108410656452179,
-0.3782743811607361,
0.055466316640377045,
-0.3421837091445923,
-0.10562430322170258,
0.11199487745761871,
0.2915993928909302,
0.1120762750506401,
-0.3344566226005554,
0.01803511194884777,
-0.10848559439182281,
-0.1637915074825287,
-0.18742811679840088,
-0.16270585358142853,
0.13012920320034027,
-0.031339000910520554,
-0.11748641729354858,
0.34726682305336,
0.20801451802253723,
0.02403605356812477,
-0.28813034296035767,
0.34572774171829224,
0.2973947525024414,
0.30410176515579224,
0.16369026899337769,
0.15147517621517181,
0.08375642448663712,
0.2226382941007614,
0.11339771002531052,
0.17984429001808167,
0.4509585499763489,
0.059509072452783585,
-0.04292408376932144,
-0.5686363577842712,
-0.08729352802038193,
0.3781929910182953,
0.4033966064453125,
0.4979577660560608,
0.16764968633651733,
0.12805767357349396,
0.39389508962631226,
-0.01667099818587303,
0.0762602761387825,
-0.006300424225628376,
-0.14427542686462402,
-0.2918497323989868,
0.16826598346233368,
0.14012843370437622,
0.1770748496055603,
-0.004819624125957489,
-0.12149600684642792,
0.18742212653160095,
-0.2112693190574646,
0.21915289759635925,
0.23529018461704254,
0.2547183036804199,
0.16412658989429474,
-0.14356258511543274,
-0.051045551896095276,
0.2873710095882416,
0.10048021376132965,
0.2926797568798065,
0.05487988144159317,
-0.16010357439517975,
0.10952571034431458,
0.2761474847793579,
0.0050605591386556625,
0.23653662204742432,
-0.14719490706920624,
0.0663357749581337,
0.6450891494750977,
-0.023071229457855225,
0.07908240705728531,
0.4300098419189453,
0.201649472117424,
0.05457167699933052,
0.08427932858467102,
0.14976856112480164,
-0.22366365790367126,
-0.03789924830198288,
0.12364863604307175,
0.05137757956981659,
-0.14955630898475647,
0.04423736780881882,
-0.007961031049489975,
-0.03044544905424118,
-0.12439768016338348,
0.24896591901779175,
-0.06997296959161758,
-0.04210306704044342,
-0.26899322867393494,
-0.1249740719795227,
-0.5708942413330078,
0.23689432442188263,
-0.3313543200492859,
0.2570502758026123,
-0.15281225740909576,
0.38933876156806946,
0.17848676443099976,
0.30813777446746826,
0.07347437739372253,
-0.027520323172211647,
-0.15850891172885895,
0.004464641213417053,
-0.13046354055404663,
0.5101006627082825,
0.3391336500644684,
0.08999568969011307,
0.2215384840965271,
0.02572569251060486,
0.1844416707754135,
-0.02393237128853798,
0.020687483251094818,
-0.13192081451416016,
-0.2786633372306824,
-0.1681184321641922,
0.004739509895443916,
0.16047817468643188,
-0.24656914174556732,
-0.01813950389623642,
-0.1244698315858841,
-0.1453571915626526,
-0.14802028238773346,
-0.004889920353889465,
-0.2976977825164795,
-0.18480485677719116,
0.12310543656349182,
0.2153589427471161,
-0.1501697599887848,
0.07754936069250107,
0.4357052445411682,
-0.0735308974981308,
-0.028722181916236877,
-0.29517862200737,
0.10662804543972015,
0.514180600643158,
0.2949736714363098,
0.3489455282688141,
0.05890743061900139,
-0.12813587486743927,
-0.329980731010437,
-0.42579373717308044,
-0.0196596160531044,
-0.36839017271995544,
-0.14042578637599945,
0.17128461599349976,
0.1157807856798172,
0.01396699994802475,
0.15485405921936035,
-0.008824571967124939,
-0.15607543289661407,
-0.07175413519144058,
-0.32299450039863586,
-0.1006036251783371,
-0.24146141111850739,
-0.011616721749305725,
-0.06420429050922394,
0.02166515216231346,
-0.09799085557460785,
0.13026565313339233,
-0.022617008537054062,
-0.023523563519120216,
-0.21912406384944916,
0.5357428193092346,
0.15173940360546112,
-0.16973501443862915,
0.12726075947284698,
-0.04684404283761978,
-0.1116086095571518,
-0.2581930160522461,
-0.4622068703174591,
-0.23571351170539856,
-0.1700151413679123,
-0.007062034215778112,
0.0707724541425705,
-0.08950631320476532,
0.0184868685901165,
-0.3307636082172394,
-0.31174537539482117,
-0.30575230717658997,
-0.14731259644031525,
0.13850967586040497,
0.042829517275094986,
-0.1252000480890274,
0.3445906937122345,
0.07867830246686935,
-0.08423719555139542,
0.09332830458879471,
0.19736704230308533,
-0.31973326206207275,
-0.13267409801483154,
0.07821290194988251,
-0.3445887565612793,
0.3875954747200012,
0.19485117495059967,
0.011796887964010239,
0.13492558896541595,
0.07016067206859589,
0.13128525018692017,
-0.06845758110284805,
-0.48478972911834717,
0.01697656512260437,
0.10778197646141052,
0.0050630588084459305,
-0.17939899861812592,
0.3292776048183441,
0.10717205703258514,
-0.14260371029376984,
-0.07854994386434555,
0.4314460754394531,
0.13321931660175323,
-0.12522797286510468,
0.2416715919971466,
-0.21517056226730347
] |
https://github.com/huggingface/datasets/issues/5970
|
description disappearing from Info when Uploading a Dataset Created with `from_dict`
|
Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
|
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 37
|
description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
|
[
0.20387275516986847,
0.06310252845287323,
0.08928710222244263,
0.23943349719047546,
0.43252241611480713,
-0.08675282448530197,
0.1411249190568924,
0.22590771317481995,
-0.4692801237106323,
0.09071235358715057,
0.34117433428764343,
0.14465253055095673,
0.31798192858695984,
0.36237746477127075,
0.05406622588634491,
-0.13739439845085144,
0.10540081560611725,
0.13376711308956146,
-0.09870210289955139,
0.04092603921890259,
0.0374511182308197,
-0.011511972174048424,
-0.13642704486846924,
-0.0738203376531601,
-0.18263693153858185,
0.098542220890522,
-0.3010251522064209,
0.11811155080795288,
-0.023705830797553062,
-0.6718785762786865,
0.11284187436103821,
-0.012212667614221573,
-0.06628468632698059,
-0.12658679485321045,
-0.00012048562348354608,
-0.10562765598297119,
0.30360734462738037,
-0.0794455036520958,
-0.3645422160625458,
-0.18111665546894073,
-0.0478023923933506,
-0.35814428329467773,
0.4143652021884918,
-0.09796430170536041,
-0.20932570099830627,
-0.025440961122512817,
-0.008211987093091011,
-0.18150478601455688,
0.06158946827054024,
0.008053542114794254,
0.08259527385234833,
0.23516589403152466,
0.007253225892782211,
-0.11401085555553436,
0.0596654899418354,
0.8775287866592407,
-0.2114475667476654,
-0.08650949597358704,
0.23205848038196564,
-0.11132705211639404,
0.08780623227357864,
0.3145628273487091,
0.02697223611176014,
0.06355632841587067,
0.2694621682167053,
0.2583255469799042,
-0.016983792185783386,
-0.02763400226831436,
0.05760720744729042,
0.1407589465379715,
0.6420246362686157,
-0.37436148524284363,
-0.5635889172554016,
-0.5048782825469971,
0.08715653419494629,
-0.14637614786624908,
0.205316424369812,
0.16197000443935394,
-0.26914992928504944,
0.26122865080833435,
-0.006030676886439323,
0.09469450265169144,
-0.10233696550130844,
0.04752524942159653,
-0.16504868865013123,
-0.07487767934799194,
-0.049680713564157486,
0.11035862565040588,
-0.2119670957326889,
-0.49363183975219727,
-0.33247536420822144,
-0.14817281067371368,
-0.3352220952510834,
0.2710834741592407,
0.10882391780614853,
-0.06460097432136536,
0.2765165865421295,
-0.3941909074783325,
0.3042238652706146,
-0.03030940145254135,
-0.17210660874843597,
-0.26581189036369324,
-0.24161449074745178,
-0.001325514167547226,
0.771003246307373,
0.18807964026927948,
0.2748740315437317,
0.1253720223903656,
-0.19468124210834503,
0.13089138269424438,
-0.10879676043987274,
-0.18954047560691833,
0.18629419803619385,
0.45609188079833984,
0.2646969258785248,
-0.2413511872291565,
0.3666257858276367,
0.021086376160383224,
-0.4874340891838074,
0.1349882334470749,
-0.3258036971092224,
0.13894334435462952,
-0.17296981811523438,
0.21446430683135986,
-0.28700199723243713,
-0.03917549550533295,
0.2610892057418823,
0.09764564037322998,
0.0020960625261068344,
-0.111470066010952,
-0.25531598925590515,
-0.05667582526803017,
-0.20581191778182983,
0.09721330553293228,
0.009374670684337616,
0.057764530181884766,
0.3670000731945038,
0.16188892722129822,
0.3825382590293884,
-0.17065253853797913,
-0.4038139879703522,
-0.11633311212062836,
0.1698773056268692,
0.3579099774360657,
-0.25515273213386536,
0.17792542278766632,
0.12366849184036255,
-0.4074127674102783,
-0.058688245713710785,
0.2726479768753052,
-0.008055001497268677,
0.07809032499790192,
-0.4202110171318054,
0.10635773837566376,
-0.41621649265289307,
0.013818558305501938,
0.023979507386684418,
-0.05688634142279625,
0.05612969025969505,
0.09188573062419891,
0.02236165851354599,
0.07293625921010971,
-0.027685577049851418,
-0.07655155658721924,
0.2997628152370453,
0.7388948798179626,
-0.325899600982666,
-0.18118882179260254,
-0.07147951424121857,
0.02163458988070488,
0.28654104471206665,
-0.09913979470729828,
-0.030073320493102074,
0.33360838890075684,
-0.2630007863044739,
0.26190418004989624,
-0.03577307611703873,
-0.5211702585220337,
-0.1409783512353897,
0.5474479794502258,
-0.13819725811481476,
0.42846059799194336,
0.044099360704422,
-0.05170627683401108,
0.3025563955307007,
0.18884357810020447,
0.11546652019023895,
0.1903291493654251,
0.2572590112686157,
0.00271758995950222,
-0.1900027096271515,
-0.21809574961662292,
0.08424242585897446,
-0.124317467212677,
-0.20029230415821075,
0.2690885663032532,
0.11425335705280304,
0.04480651393532753,
0.5834053754806519,
0.33068379759788513,
0.2479431927204132,
0.2887760400772095,
0.3513016700744629,
0.19452688097953796,
0.04926833137869835,
0.03762459754943848,
-0.22902148962020874,
0.19353845715522766,
0.030276089906692505,
0.29787492752075195,
-0.513776421546936,
-0.2106950432062149,
-0.17493250966072083,
0.3523804843425751,
-0.3796669840812683,
-0.5211960077285767,
0.11020801961421967,
0.1519332230091095,
-0.11757716536521912,
0.1541694849729538,
0.08065859973430634,
0.2510654628276825,
-0.30470937490463257,
0.2669773995876312,
-0.08930584788322449,
-0.03273472934961319,
0.015623030252754688,
-0.2654043734073639,
-0.1803477704524994,
0.17666515707969666,
0.2636697292327881,
0.25085970759391785,
-0.1295899748802185,
0.3930702805519104,
0.2738272547721863,
0.41634780168533325,
-0.16612187027931213,
-0.09610630571842194,
0.1655227094888687,
-0.20181754231452942,
0.18097619712352753,
0.14187103509902954,
0.13870543241500854,
0.010734930634498596,
-0.3431425094604492,
0.1665496528148651,
0.10261371731758118,
0.008502461016178131,
-0.03008587472140789,
0.033132538199424744,
0.3093075156211853,
0.035660598427057266,
-0.08197763562202454,
-0.5925229787826538,
-0.1448790580034256,
0.3098282516002655,
0.03633234277367592,
-0.018007328733801842,
-0.4379969537258148,
0.2649025022983551,
0.40413960814476013,
0.11803241074085236,
0.07253607362508774,
0.00048628076910972595,
-0.3096090257167816,
-0.21588030457496643,
0.12206738442182541,
-0.09702083468437195,
0.25703704357147217,
0.04600777477025986,
-0.10519920289516449,
0.09031634032726288,
0.14854341745376587,
-0.08137203752994537,
0.25687795877456665,
-0.08623632788658142,
-0.04098162800073624,
0.07871291041374207,
0.3097377121448517,
0.27968481183052063,
-0.032956816256046295,
-0.046941496431827545,
-0.23281021416187286,
0.28006044030189514,
-0.2571345865726471,
0.03411997854709625,
-0.22738035023212433,
-0.32139554619789124,
-0.19179807603359222,
-0.2617303133010864,
-0.4359314739704132,
-0.12962445616722107,
-0.19152401387691498,
-0.13426993787288666,
-0.2990304231643677,
0.048268988728523254,
-0.0848660096526146,
-0.23011942207813263,
0.22194086015224457,
-0.34296461939811707,
0.13652823865413666,
0.0751984715461731,
-0.02310742437839508,
-0.07464917749166489,
-0.15919195115566254,
-0.05656822770833969,
0.1798379123210907,
-0.022094136103987694,
-0.11285287141799927,
-0.23202556371688843,
-0.3187534809112549,
0.2280970960855484,
-0.03952552378177643,
0.34698182344436646,
0.04013556241989136,
0.3698093295097351,
-0.05990436300635338,
-0.190460205078125,
0.26060566306114197,
0.1784919649362564,
-0.4470251500606537,
0.011989347636699677,
-0.012537172064185143,
0.16011030972003937,
-0.2682921886444092,
-0.18506285548210144,
-0.03755100071430206,
-0.1593073308467865,
0.44201117753982544,
0.003411434590816498,
0.09420004487037659,
0.7326538562774658,
-0.01043018139898777,
0.2170683741569519,
-0.2847174406051636,
0.40712296962738037,
-0.09869586676359177,
-0.48685646057128906,
-0.11067815124988556,
-0.0016993045574054122,
-0.26836442947387695,
-0.04031655937433243,
-0.1212700605392456,
-0.12159457802772522,
-0.030537329614162445,
-0.44637906551361084,
-0.07440152764320374,
-0.05808713287115097,
0.3907676339149475,
0.0594046488404274,
-0.2614456117153168,
0.4095500707626343,
-0.037353429943323135,
-0.009404415264725685,
-0.1826164722442627,
-0.3723744750022888,
0.1983078122138977,
0.18484187126159668,
0.181317538022995,
-0.22665590047836304,
-0.08328521996736526,
-0.03952919319272041,
0.3764287233352661,
0.13879427313804626,
0.12214507162570953,
0.1791018843650818,
-0.17778144776821136,
0.3039509952068329,
-0.2960496246814728,
-0.3563900589942932,
-0.06698384135961533,
0.013508260250091553,
-0.3219744563102722,
0.07982127368450165,
-0.09445052593946457,
0.14663678407669067,
-0.06483104825019836,
0.23925259709358215,
-0.47193238139152527,
-0.14607374370098114,
-0.1086372435092926,
-0.10589830577373505,
0.4643024504184723,
-0.047318652272224426,
0.15279144048690796,
0.06856614351272583,
-0.060271769762039185,
-0.13733194768428802,
0.27725949883461,
0.26185089349746704,
-0.11486051231622696,
-0.3629002869129181,
-0.4857655167579651,
-0.11943962424993515,
-0.331271767616272,
0.3119020164012909,
0.2080407440662384,
-0.1369888335466385,
-0.5420897603034973,
0.1744827926158905,
0.15184296667575836,
0.4807465076446533,
0.1905454397201538,
0.09547130763530731,
0.13117052614688873,
-0.22500228881835938,
-0.2789967954158783,
-0.07667513936758041,
-0.06175275146961212,
-0.2022581249475479,
0.3083099126815796,
0.5411053895950317,
-0.1613607406616211,
-0.21593597531318665,
0.1492728739976883,
0.028771093115210533,
-0.019729994237422943,
0.006036561913788319,
-0.23588883876800537,
-0.054933808743953705,
-0.018825257197022438,
-0.1527942419052124,
0.026689978316426277,
0.4444893002510071,
0.1287044882774353,
0.06949116289615631,
0.08568911254405975,
0.29614391922950745,
-0.055297449231147766,
0.028914134949445724,
0.5823785662651062,
-0.2943842113018036,
0.5571117401123047,
0.1172422468662262,
0.26127511262893677,
0.46714887022972107,
0.5835773944854736,
0.14001572132110596,
-0.40892672538757324,
-0.13840541243553162,
-0.06731574982404709,
0.2855021059513092,
0.4260834753513336,
0.2654332220554352,
0.3539852499961853,
-0.08210265636444092,
-0.05698695778846741,
-0.7506711483001709,
-0.0028260862454771996,
0.30905798077583313,
-0.29335954785346985,
0.21081534028053284,
-0.3051315248012543,
0.3404768109321594,
-0.2524350583553314,
0.005992107093334198,
0.06636294722557068,
0.11680211126804352,
-0.20387794077396393,
0.13766798377037048,
-0.0221501886844635,
0.9581755995750427,
0.4218285083770752,
0.24605724215507507,
0.13411933183670044,
-0.14678388833999634,
0.25737491250038147,
0.11785472929477692,
-0.017365220934152603,
-0.4227907657623291,
0.1396450251340866,
0.004084261134266853,
-0.10889202356338501,
0.3849791884422302,
-0.22072423994541168,
-0.13948199152946472,
-0.3779003322124481,
-0.2882605195045471,
0.31643006205558777,
-0.00332561694085598,
0.039463743567466736,
-0.16094864904880524,
-0.30105918645858765,
-0.20077329874038696,
-0.027114711701869965,
-0.2098677009344101,
0.35527995228767395,
0.1351046860218048,
-0.22898763418197632,
-0.13751961290836334,
-0.0381205677986145,
-0.530616044998169,
0.20803245902061462,
-0.0018083690665662289,
-0.07261263579130173,
0.31538745760917664,
-0.49498820304870605,
-0.09194327890872955,
0.14165879786014557,
0.2033776342868805,
0.24553613364696503,
-0.12669099867343903,
0.18950487673282623,
-0.20920825004577637,
0.0525529645383358,
0.01124386303126812,
0.12428000569343567,
0.5116011500358582,
-0.022049259394407272,
-0.31624308228492737,
-0.12659406661987305,
-0.17523212730884552,
0.18689481914043427,
-0.1900443732738495,
-0.1968184858560562,
-0.1294499635696411,
-0.2991430461406708,
0.03362863138318062,
0.2599039673805237,
0.5818397998809814,
-0.34083980321884155,
0.09422090649604797,
0.4274601936340332,
-0.2712438106536865,
-0.05312686413526535,
0.050976671278476715,
-0.18174567818641663,
-0.10324175655841827,
0.20246288180351257,
0.2100418508052826,
0.05028612166643143,
0.5404573678970337,
-0.032170653343200684,
-0.10450063645839691,
-0.16171737015247345,
0.5481776595115662,
-0.19384637475013733,
-0.001837804913520813,
0.1172909289598465,
0.2094045728445053,
0.09008955955505371,
-0.34390100836753845,
0.21270763874053955,
-0.19143453240394592,
-0.1123259887099266,
-0.1241271048784256,
-0.29756051301956177,
-0.17713254690170288,
0.2772556245326996,
-0.14458100497722626,
-0.04051663354039192,
-0.14503175020217896,
0.4447419047355652,
0.4050675630569458,
0.14739511907100677,
-0.2276158183813095,
-0.1001095399260521,
0.024835536256432533,
0.1993921399116516,
0.3057958483695984,
0.07151784002780914,
0.37126609683036804,
-0.2286226898431778,
0.03745733201503754,
0.04220079258084297,
0.09393364936113358,
-0.027151521295309067,
-0.3381611406803131,
0.1283937692642212,
-0.003839448094367981,
-0.02322978712618351,
0.12641145288944244,
-0.08870231360197067,
0.0951756089925766,
-0.15010614693164825,
0.2968483567237854,
0.1664416790008545,
-0.10429471731185913,
0.5835214257240295,
-0.15957219898700714,
0.5103874206542969,
0.0455428883433342,
-0.09570866823196411,
0.10217729210853577,
0.29157108068466187,
0.14201202988624573,
0.11246330291032791,
-0.40013930201530457,
-0.019004501402378082,
0.06500614434480667,
0.04143154248595238,
-0.5805737376213074,
0.20873332023620605,
0.2949698865413666,
-0.06736677885055542,
-0.0777926817536354,
-0.043977171182632446,
0.3626687824726105,
-0.17784680426120758,
-0.1615740954875946,
-0.07330066710710526,
0.1400853395462036,
0.13992683589458466,
-0.203763946890831,
-0.00942817609757185,
-0.043789807707071304,
-0.1824612021446228,
-0.040634799748659134,
0.06036636233329773,
-0.0898616686463356,
0.015223994851112366,
-0.1935996562242508,
0.055439382791519165,
0.2834441065788269,
0.05627386271953583,
0.01562970131635666,
0.42015135288238525,
-0.007565654814243317,
0.011576533317565918,
0.10913275182247162,
0.3366411030292511,
0.2581543028354645,
0.5147814750671387,
0.31277063488960266,
0.24097752571105957,
0.09984179586172104,
-0.13678079843521118,
0.037896785885095596,
-0.2477194368839264,
0.22850646078586578,
0.1128419041633606,
-0.4398723840713501,
0.05912851169705391,
0.010083317756652832,
0.2849757671356201,
-0.15948717296123505,
0.16587084531784058,
0.03790567070245743,
-0.050689902156591415,
-0.37784484028816223,
-0.06905476003885269,
0.013295896351337433,
-0.12208694219589233,
0.1737401783466339,
-0.23846319317817688,
0.3160956799983978,
-0.3339923620223999,
0.2784373164176941,
-0.19102101027965546,
-0.17165769636631012,
-0.29429560899734497,
0.01458016037940979,
0.05844249948859215,
0.2491171956062317,
-0.2807348966598511,
-0.0844569131731987,
0.14747017621994019,
-0.09073346853256226,
0.015391847118735313,
0.36441659927368164,
0.616519570350647,
0.05463568493723869,
0.049382083117961884,
0.02398030459880829,
-0.18440330028533936,
-0.24212399125099182,
0.07192762941122055,
0.23965847492218018,
0.02650517225265503,
-0.055355969816446304,
0.11081446707248688,
0.012795969843864441,
-0.06866516172885895,
-0.0994306355714798,
0.4855174720287323,
0.15778794884681702,
-0.4909501075744629,
0.3804679811000824,
-0.12890367209911346,
-0.21163377165794373,
0.04503294453024864,
0.09304289519786835,
-0.14946505427360535,
-0.42224445939064026,
0.5878379940986633,
0.2681103050708771,
0.08153438568115234,
-0.20183855295181274,
0.02928512915968895,
0.013952663168311119,
0.22414934635162354,
0.5113011002540588,
-0.2010311782360077,
-0.028245240449905396,
-0.07937991619110107,
-0.43322476744651794,
0.08864425122737885,
-0.04237544909119606,
-0.2124665230512619,
0.1281564086675644,
0.37587568163871765,
-0.01650979369878769,
0.03706594929099083,
-0.024197250604629517,
0.14206378161907196,
-0.23431728780269623,
-0.1581382155418396,
-0.20012179017066956,
-0.31401312351226807,
-0.18350188434123993,
0.010601875372231007,
-0.04990202933549881,
0.034771643579006195,
0.12698763608932495,
-0.11863508820533752,
0.03251291811466217,
-0.17739149928092957,
-0.14322257041931152,
0.1254757046699524,
0.01349334791302681,
0.1865529716014862,
0.13036952912807465,
0.188740536570549,
0.04607270658016205,
-0.4858161211013794,
0.1675267070531845,
-0.23970314860343933,
0.029153231531381607,
0.3180193603038788,
0.021623466163873672,
0.5560774803161621,
0.08252932876348495,
-0.23207725584506989,
-0.09139062464237213,
0.2559233009815216,
-0.11727087944746017,
-0.7371388077735901,
-0.32963255047798157,
-0.030138516798615456,
0.04232320189476013,
0.06409287452697754,
-0.09338728338479996,
0.025029586628079414,
-0.038834042847156525,
0.1193763017654419,
-0.24730528891086578,
-0.5278254747390747,
0.23389771580696106,
-0.19820521771907806,
-0.21734881401062012,
-0.14342007040977478,
0.17329344153404236,
-0.4479069709777832,
0.06122010946273804,
-0.7910566926002502,
0.07841787487268448,
0.3812605142593384,
-0.042073145508766174,
-0.015168050304055214,
-0.029381465166807175,
-0.21297523379325867,
0.025464918464422226,
0.046618398278951645,
0.5954334735870361,
0.1184007078409195,
0.054299935698509216,
0.3326317369937897,
-0.012653173878788948
] |
https://github.com/huggingface/datasets/issues/5970
|
description disappearing from Info when Uploading a Dataset Created with `from_dict`
|
Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon)
|
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 50
|
description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon)
|
[
0.20387275516986847,
0.06310252845287323,
0.08928710222244263,
0.23943349719047546,
0.43252241611480713,
-0.08675282448530197,
0.1411249190568924,
0.22590771317481995,
-0.4692801237106323,
0.09071235358715057,
0.34117433428764343,
0.14465253055095673,
0.31798192858695984,
0.36237746477127075,
0.05406622588634491,
-0.13739439845085144,
0.10540081560611725,
0.13376711308956146,
-0.09870210289955139,
0.04092603921890259,
0.0374511182308197,
-0.011511972174048424,
-0.13642704486846924,
-0.0738203376531601,
-0.18263693153858185,
0.098542220890522,
-0.3010251522064209,
0.11811155080795288,
-0.023705830797553062,
-0.6718785762786865,
0.11284187436103821,
-0.012212667614221573,
-0.06628468632698059,
-0.12658679485321045,
-0.00012048562348354608,
-0.10562765598297119,
0.30360734462738037,
-0.0794455036520958,
-0.3645422160625458,
-0.18111665546894073,
-0.0478023923933506,
-0.35814428329467773,
0.4143652021884918,
-0.09796430170536041,
-0.20932570099830627,
-0.025440961122512817,
-0.008211987093091011,
-0.18150478601455688,
0.06158946827054024,
0.008053542114794254,
0.08259527385234833,
0.23516589403152466,
0.007253225892782211,
-0.11401085555553436,
0.0596654899418354,
0.8775287866592407,
-0.2114475667476654,
-0.08650949597358704,
0.23205848038196564,
-0.11132705211639404,
0.08780623227357864,
0.3145628273487091,
0.02697223611176014,
0.06355632841587067,
0.2694621682167053,
0.2583255469799042,
-0.016983792185783386,
-0.02763400226831436,
0.05760720744729042,
0.1407589465379715,
0.6420246362686157,
-0.37436148524284363,
-0.5635889172554016,
-0.5048782825469971,
0.08715653419494629,
-0.14637614786624908,
0.205316424369812,
0.16197000443935394,
-0.26914992928504944,
0.26122865080833435,
-0.006030676886439323,
0.09469450265169144,
-0.10233696550130844,
0.04752524942159653,
-0.16504868865013123,
-0.07487767934799194,
-0.049680713564157486,
0.11035862565040588,
-0.2119670957326889,
-0.49363183975219727,
-0.33247536420822144,
-0.14817281067371368,
-0.3352220952510834,
0.2710834741592407,
0.10882391780614853,
-0.06460097432136536,
0.2765165865421295,
-0.3941909074783325,
0.3042238652706146,
-0.03030940145254135,
-0.17210660874843597,
-0.26581189036369324,
-0.24161449074745178,
-0.001325514167547226,
0.771003246307373,
0.18807964026927948,
0.2748740315437317,
0.1253720223903656,
-0.19468124210834503,
0.13089138269424438,
-0.10879676043987274,
-0.18954047560691833,
0.18629419803619385,
0.45609188079833984,
0.2646969258785248,
-0.2413511872291565,
0.3666257858276367,
0.021086376160383224,
-0.4874340891838074,
0.1349882334470749,
-0.3258036971092224,
0.13894334435462952,
-0.17296981811523438,
0.21446430683135986,
-0.28700199723243713,
-0.03917549550533295,
0.2610892057418823,
0.09764564037322998,
0.0020960625261068344,
-0.111470066010952,
-0.25531598925590515,
-0.05667582526803017,
-0.20581191778182983,
0.09721330553293228,
0.009374670684337616,
0.057764530181884766,
0.3670000731945038,
0.16188892722129822,
0.3825382590293884,
-0.17065253853797913,
-0.4038139879703522,
-0.11633311212062836,
0.1698773056268692,
0.3579099774360657,
-0.25515273213386536,
0.17792542278766632,
0.12366849184036255,
-0.4074127674102783,
-0.058688245713710785,
0.2726479768753052,
-0.008055001497268677,
0.07809032499790192,
-0.4202110171318054,
0.10635773837566376,
-0.41621649265289307,
0.013818558305501938,
0.023979507386684418,
-0.05688634142279625,
0.05612969025969505,
0.09188573062419891,
0.02236165851354599,
0.07293625921010971,
-0.027685577049851418,
-0.07655155658721924,
0.2997628152370453,
0.7388948798179626,
-0.325899600982666,
-0.18118882179260254,
-0.07147951424121857,
0.02163458988070488,
0.28654104471206665,
-0.09913979470729828,
-0.030073320493102074,
0.33360838890075684,
-0.2630007863044739,
0.26190418004989624,
-0.03577307611703873,
-0.5211702585220337,
-0.1409783512353897,
0.5474479794502258,
-0.13819725811481476,
0.42846059799194336,
0.044099360704422,
-0.05170627683401108,
0.3025563955307007,
0.18884357810020447,
0.11546652019023895,
0.1903291493654251,
0.2572590112686157,
0.00271758995950222,
-0.1900027096271515,
-0.21809574961662292,
0.08424242585897446,
-0.124317467212677,
-0.20029230415821075,
0.2690885663032532,
0.11425335705280304,
0.04480651393532753,
0.5834053754806519,
0.33068379759788513,
0.2479431927204132,
0.2887760400772095,
0.3513016700744629,
0.19452688097953796,
0.04926833137869835,
0.03762459754943848,
-0.22902148962020874,
0.19353845715522766,
0.030276089906692505,
0.29787492752075195,
-0.513776421546936,
-0.2106950432062149,
-0.17493250966072083,
0.3523804843425751,
-0.3796669840812683,
-0.5211960077285767,
0.11020801961421967,
0.1519332230091095,
-0.11757716536521912,
0.1541694849729538,
0.08065859973430634,
0.2510654628276825,
-0.30470937490463257,
0.2669773995876312,
-0.08930584788322449,
-0.03273472934961319,
0.015623030252754688,
-0.2654043734073639,
-0.1803477704524994,
0.17666515707969666,
0.2636697292327881,
0.25085970759391785,
-0.1295899748802185,
0.3930702805519104,
0.2738272547721863,
0.41634780168533325,
-0.16612187027931213,
-0.09610630571842194,
0.1655227094888687,
-0.20181754231452942,
0.18097619712352753,
0.14187103509902954,
0.13870543241500854,
0.010734930634498596,
-0.3431425094604492,
0.1665496528148651,
0.10261371731758118,
0.008502461016178131,
-0.03008587472140789,
0.033132538199424744,
0.3093075156211853,
0.035660598427057266,
-0.08197763562202454,
-0.5925229787826538,
-0.1448790580034256,
0.3098282516002655,
0.03633234277367592,
-0.018007328733801842,
-0.4379969537258148,
0.2649025022983551,
0.40413960814476013,
0.11803241074085236,
0.07253607362508774,
0.00048628076910972595,
-0.3096090257167816,
-0.21588030457496643,
0.12206738442182541,
-0.09702083468437195,
0.25703704357147217,
0.04600777477025986,
-0.10519920289516449,
0.09031634032726288,
0.14854341745376587,
-0.08137203752994537,
0.25687795877456665,
-0.08623632788658142,
-0.04098162800073624,
0.07871291041374207,
0.3097377121448517,
0.27968481183052063,
-0.032956816256046295,
-0.046941496431827545,
-0.23281021416187286,
0.28006044030189514,
-0.2571345865726471,
0.03411997854709625,
-0.22738035023212433,
-0.32139554619789124,
-0.19179807603359222,
-0.2617303133010864,
-0.4359314739704132,
-0.12962445616722107,
-0.19152401387691498,
-0.13426993787288666,
-0.2990304231643677,
0.048268988728523254,
-0.0848660096526146,
-0.23011942207813263,
0.22194086015224457,
-0.34296461939811707,
0.13652823865413666,
0.0751984715461731,
-0.02310742437839508,
-0.07464917749166489,
-0.15919195115566254,
-0.05656822770833969,
0.1798379123210907,
-0.022094136103987694,
-0.11285287141799927,
-0.23202556371688843,
-0.3187534809112549,
0.2280970960855484,
-0.03952552378177643,
0.34698182344436646,
0.04013556241989136,
0.3698093295097351,
-0.05990436300635338,
-0.190460205078125,
0.26060566306114197,
0.1784919649362564,
-0.4470251500606537,
0.011989347636699677,
-0.012537172064185143,
0.16011030972003937,
-0.2682921886444092,
-0.18506285548210144,
-0.03755100071430206,
-0.1593073308467865,
0.44201117753982544,
0.003411434590816498,
0.09420004487037659,
0.7326538562774658,
-0.01043018139898777,
0.2170683741569519,
-0.2847174406051636,
0.40712296962738037,
-0.09869586676359177,
-0.48685646057128906,
-0.11067815124988556,
-0.0016993045574054122,
-0.26836442947387695,
-0.04031655937433243,
-0.1212700605392456,
-0.12159457802772522,
-0.030537329614162445,
-0.44637906551361084,
-0.07440152764320374,
-0.05808713287115097,
0.3907676339149475,
0.0594046488404274,
-0.2614456117153168,
0.4095500707626343,
-0.037353429943323135,
-0.009404415264725685,
-0.1826164722442627,
-0.3723744750022888,
0.1983078122138977,
0.18484187126159668,
0.181317538022995,
-0.22665590047836304,
-0.08328521996736526,
-0.03952919319272041,
0.3764287233352661,
0.13879427313804626,
0.12214507162570953,
0.1791018843650818,
-0.17778144776821136,
0.3039509952068329,
-0.2960496246814728,
-0.3563900589942932,
-0.06698384135961533,
0.013508260250091553,
-0.3219744563102722,
0.07982127368450165,
-0.09445052593946457,
0.14663678407669067,
-0.06483104825019836,
0.23925259709358215,
-0.47193238139152527,
-0.14607374370098114,
-0.1086372435092926,
-0.10589830577373505,
0.4643024504184723,
-0.047318652272224426,
0.15279144048690796,
0.06856614351272583,
-0.060271769762039185,
-0.13733194768428802,
0.27725949883461,
0.26185089349746704,
-0.11486051231622696,
-0.3629002869129181,
-0.4857655167579651,
-0.11943962424993515,
-0.331271767616272,
0.3119020164012909,
0.2080407440662384,
-0.1369888335466385,
-0.5420897603034973,
0.1744827926158905,
0.15184296667575836,
0.4807465076446533,
0.1905454397201538,
0.09547130763530731,
0.13117052614688873,
-0.22500228881835938,
-0.2789967954158783,
-0.07667513936758041,
-0.06175275146961212,
-0.2022581249475479,
0.3083099126815796,
0.5411053895950317,
-0.1613607406616211,
-0.21593597531318665,
0.1492728739976883,
0.028771093115210533,
-0.019729994237422943,
0.006036561913788319,
-0.23588883876800537,
-0.054933808743953705,
-0.018825257197022438,
-0.1527942419052124,
0.026689978316426277,
0.4444893002510071,
0.1287044882774353,
0.06949116289615631,
0.08568911254405975,
0.29614391922950745,
-0.055297449231147766,
0.028914134949445724,
0.5823785662651062,
-0.2943842113018036,
0.5571117401123047,
0.1172422468662262,
0.26127511262893677,
0.46714887022972107,
0.5835773944854736,
0.14001572132110596,
-0.40892672538757324,
-0.13840541243553162,
-0.06731574982404709,
0.2855021059513092,
0.4260834753513336,
0.2654332220554352,
0.3539852499961853,
-0.08210265636444092,
-0.05698695778846741,
-0.7506711483001709,
-0.0028260862454771996,
0.30905798077583313,
-0.29335954785346985,
0.21081534028053284,
-0.3051315248012543,
0.3404768109321594,
-0.2524350583553314,
0.005992107093334198,
0.06636294722557068,
0.11680211126804352,
-0.20387794077396393,
0.13766798377037048,
-0.0221501886844635,
0.9581755995750427,
0.4218285083770752,
0.24605724215507507,
0.13411933183670044,
-0.14678388833999634,
0.25737491250038147,
0.11785472929477692,
-0.017365220934152603,
-0.4227907657623291,
0.1396450251340866,
0.004084261134266853,
-0.10889202356338501,
0.3849791884422302,
-0.22072423994541168,
-0.13948199152946472,
-0.3779003322124481,
-0.2882605195045471,
0.31643006205558777,
-0.00332561694085598,
0.039463743567466736,
-0.16094864904880524,
-0.30105918645858765,
-0.20077329874038696,
-0.027114711701869965,
-0.2098677009344101,
0.35527995228767395,
0.1351046860218048,
-0.22898763418197632,
-0.13751961290836334,
-0.0381205677986145,
-0.530616044998169,
0.20803245902061462,
-0.0018083690665662289,
-0.07261263579130173,
0.31538745760917664,
-0.49498820304870605,
-0.09194327890872955,
0.14165879786014557,
0.2033776342868805,
0.24553613364696503,
-0.12669099867343903,
0.18950487673282623,
-0.20920825004577637,
0.0525529645383358,
0.01124386303126812,
0.12428000569343567,
0.5116011500358582,
-0.022049259394407272,
-0.31624308228492737,
-0.12659406661987305,
-0.17523212730884552,
0.18689481914043427,
-0.1900443732738495,
-0.1968184858560562,
-0.1294499635696411,
-0.2991430461406708,
0.03362863138318062,
0.2599039673805237,
0.5818397998809814,
-0.34083980321884155,
0.09422090649604797,
0.4274601936340332,
-0.2712438106536865,
-0.05312686413526535,
0.050976671278476715,
-0.18174567818641663,
-0.10324175655841827,
0.20246288180351257,
0.2100418508052826,
0.05028612166643143,
0.5404573678970337,
-0.032170653343200684,
-0.10450063645839691,
-0.16171737015247345,
0.5481776595115662,
-0.19384637475013733,
-0.001837804913520813,
0.1172909289598465,
0.2094045728445053,
0.09008955955505371,
-0.34390100836753845,
0.21270763874053955,
-0.19143453240394592,
-0.1123259887099266,
-0.1241271048784256,
-0.29756051301956177,
-0.17713254690170288,
0.2772556245326996,
-0.14458100497722626,
-0.04051663354039192,
-0.14503175020217896,
0.4447419047355652,
0.4050675630569458,
0.14739511907100677,
-0.2276158183813095,
-0.1001095399260521,
0.024835536256432533,
0.1993921399116516,
0.3057958483695984,
0.07151784002780914,
0.37126609683036804,
-0.2286226898431778,
0.03745733201503754,
0.04220079258084297,
0.09393364936113358,
-0.027151521295309067,
-0.3381611406803131,
0.1283937692642212,
-0.003839448094367981,
-0.02322978712618351,
0.12641145288944244,
-0.08870231360197067,
0.0951756089925766,
-0.15010614693164825,
0.2968483567237854,
0.1664416790008545,
-0.10429471731185913,
0.5835214257240295,
-0.15957219898700714,
0.5103874206542969,
0.0455428883433342,
-0.09570866823196411,
0.10217729210853577,
0.29157108068466187,
0.14201202988624573,
0.11246330291032791,
-0.40013930201530457,
-0.019004501402378082,
0.06500614434480667,
0.04143154248595238,
-0.5805737376213074,
0.20873332023620605,
0.2949698865413666,
-0.06736677885055542,
-0.0777926817536354,
-0.043977171182632446,
0.3626687824726105,
-0.17784680426120758,
-0.1615740954875946,
-0.07330066710710526,
0.1400853395462036,
0.13992683589458466,
-0.203763946890831,
-0.00942817609757185,
-0.043789807707071304,
-0.1824612021446228,
-0.040634799748659134,
0.06036636233329773,
-0.0898616686463356,
0.015223994851112366,
-0.1935996562242508,
0.055439382791519165,
0.2834441065788269,
0.05627386271953583,
0.01562970131635666,
0.42015135288238525,
-0.007565654814243317,
0.011576533317565918,
0.10913275182247162,
0.3366411030292511,
0.2581543028354645,
0.5147814750671387,
0.31277063488960266,
0.24097752571105957,
0.09984179586172104,
-0.13678079843521118,
0.037896785885095596,
-0.2477194368839264,
0.22850646078586578,
0.1128419041633606,
-0.4398723840713501,
0.05912851169705391,
0.010083317756652832,
0.2849757671356201,
-0.15948717296123505,
0.16587084531784058,
0.03790567070245743,
-0.050689902156591415,
-0.37784484028816223,
-0.06905476003885269,
0.013295896351337433,
-0.12208694219589233,
0.1737401783466339,
-0.23846319317817688,
0.3160956799983978,
-0.3339923620223999,
0.2784373164176941,
-0.19102101027965546,
-0.17165769636631012,
-0.29429560899734497,
0.01458016037940979,
0.05844249948859215,
0.2491171956062317,
-0.2807348966598511,
-0.0844569131731987,
0.14747017621994019,
-0.09073346853256226,
0.015391847118735313,
0.36441659927368164,
0.616519570350647,
0.05463568493723869,
0.049382083117961884,
0.02398030459880829,
-0.18440330028533936,
-0.24212399125099182,
0.07192762941122055,
0.23965847492218018,
0.02650517225265503,
-0.055355969816446304,
0.11081446707248688,
0.012795969843864441,
-0.06866516172885895,
-0.0994306355714798,
0.4855174720287323,
0.15778794884681702,
-0.4909501075744629,
0.3804679811000824,
-0.12890367209911346,
-0.21163377165794373,
0.04503294453024864,
0.09304289519786835,
-0.14946505427360535,
-0.42224445939064026,
0.5878379940986633,
0.2681103050708771,
0.08153438568115234,
-0.20183855295181274,
0.02928512915968895,
0.013952663168311119,
0.22414934635162354,
0.5113011002540588,
-0.2010311782360077,
-0.028245240449905396,
-0.07937991619110107,
-0.43322476744651794,
0.08864425122737885,
-0.04237544909119606,
-0.2124665230512619,
0.1281564086675644,
0.37587568163871765,
-0.01650979369878769,
0.03706594929099083,
-0.024197250604629517,
0.14206378161907196,
-0.23431728780269623,
-0.1581382155418396,
-0.20012179017066956,
-0.31401312351226807,
-0.18350188434123993,
0.010601875372231007,
-0.04990202933549881,
0.034771643579006195,
0.12698763608932495,
-0.11863508820533752,
0.03251291811466217,
-0.17739149928092957,
-0.14322257041931152,
0.1254757046699524,
0.01349334791302681,
0.1865529716014862,
0.13036952912807465,
0.188740536570549,
0.04607270658016205,
-0.4858161211013794,
0.1675267070531845,
-0.23970314860343933,
0.029153231531381607,
0.3180193603038788,
0.021623466163873672,
0.5560774803161621,
0.08252932876348495,
-0.23207725584506989,
-0.09139062464237213,
0.2559233009815216,
-0.11727087944746017,
-0.7371388077735901,
-0.32963255047798157,
-0.030138516798615456,
0.04232320189476013,
0.06409287452697754,
-0.09338728338479996,
0.025029586628079414,
-0.038834042847156525,
0.1193763017654419,
-0.24730528891086578,
-0.5278254747390747,
0.23389771580696106,
-0.19820521771907806,
-0.21734881401062012,
-0.14342007040977478,
0.17329344153404236,
-0.4479069709777832,
0.06122010946273804,
-0.7910566926002502,
0.07841787487268448,
0.3812605142593384,
-0.042073145508766174,
-0.015168050304055214,
-0.029381465166807175,
-0.21297523379325867,
0.025464918464422226,
0.046618398278951645,
0.5954334735870361,
0.1184007078409195,
0.054299935698509216,
0.3326317369937897,
-0.012653173878788948
] |
https://github.com/huggingface/datasets/issues/5968
|
Common Voice datasets still need `use_auth_token=True`
|
The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152
|
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.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
```
| 17
|
Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.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
```
The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152
|
[
-0.1996699571609497,
0.011859729886054993,
0.15256021916866302,
-0.005796566605567932,
0.4470815658569336,
0.052654512226581573,
0.5136600732803345,
0.12041829526424408,
0.031704582273960114,
-0.0473194420337677,
-0.5297960042953491,
0.04294753074645996,
0.03492225334048271,
-0.029982831329107285,
0.02069869264960289,
0.14064541459083557,
0.05893797427415848,
-0.10698094964027405,
0.07509632408618927,
-0.12610076367855072,
-0.17410771548748016,
0.1578248143196106,
-0.26827502250671387,
0.20281130075454712,
-0.2894443869590759,
-0.15474840998649597,
0.09749996662139893,
0.3590671718120575,
0.03130509331822395,
-0.2894134223461151,
0.34424981474876404,
0.3093810975551605,
0.07892804592847824,
0.2494393289089203,
-0.00011565392196644098,
0.13892380893230438,
0.20841440558433533,
-0.1705234795808792,
-0.2634652554988861,
-0.22062857449054718,
-0.1679939329624176,
0.1901746243238449,
-0.03443849831819534,
0.018202684819698334,
0.041380636394023895,
-0.27716824412345886,
-0.08910617232322693,
-0.46677887439727783,
0.7673097848892212,
0.4816012978553772,
0.14320008456707,
0.20158424973487854,
0.03570326045155525,
-0.09997839480638504,
-0.13640105724334717,
0.11183890700340271,
0.007706033065915108,
0.455178827047348,
0.2252429574728012,
-0.0697302296757698,
0.23236870765686035,
0.18818767368793488,
-0.13062821328639984,
-0.15648411214351654,
0.43282026052474976,
-0.13590532541275024,
-0.3640202581882477,
-0.4451352655887604,
-0.0068959519267082214,
0.3984825313091278,
0.08575991541147232,
-0.27323997020721436,
-0.27649617195129395,
-0.27056118845939636,
0.025980819016695023,
0.04118601977825165,
0.14899806678295135,
0.24406789243221283,
-0.20735669136047363,
0.332773894071579,
-0.3612254858016968,
-0.11593423783779144,
0.0740315169095993,
0.016671471297740936,
0.10027703642845154,
0.3666418194770813,
0.06504806876182556,
0.1214994490146637,
0.21577021479606628,
-0.06989682465791702,
-0.07613378018140793,
0.03132183477282524,
-0.06653738021850586,
0.275959312915802,
-0.08914947509765625,
0.05096346139907837,
-0.06763701885938644,
0.034167271107435226,
0.423444002866745,
0.07835085690021515,
-0.2892242670059204,
0.03150973469018936,
-0.2260107696056366,
0.024575036019086838,
0.030801361426711082,
0.204035222530365,
0.18980208039283752,
0.1754000186920166,
0.319069504737854,
0.3023643493652344,
0.131431445479393,
-0.034445084631443024,
-0.08615481108427048,
-0.004106641281396151,
-0.03888900950551033,
0.0013002995401620865,
0.28918105363845825,
-0.19829805195331573,
-0.3359889090061188,
0.025807911530137062,
-0.2545512616634369,
-0.02693668007850647,
0.18037892878055573,
0.5603330731391907,
0.03483735769987106,
-0.046851299703121185,
0.038884446024894714,
0.2961574196815491,
-0.11830485612154007,
-0.4381723403930664,
-0.11431089788675308,
-0.17002472281455994,
-0.05773323029279709,
0.15411290526390076,
0.18270616233348846,
-0.5052295327186584,
0.22740688920021057,
0.12611599266529083,
0.140664204955101,
-0.0846354216337204,
-0.11264541000127792,
0.17380531132221222,
0.07481810450553894,
0.14526423811912537,
0.09010876715183258,
0.21376946568489075,
0.24497078359127045,
-0.13199181854724884,
-0.2026575207710266,
0.06523390114307404,
-0.3044465184211731,
-0.4268866777420044,
0.04217512533068657,
0.11779516190290451,
-0.2843024730682373,
-0.11914893984794617,
0.1461658924818039,
0.02629409357905388,
0.18836641311645508,
-0.22172896564006805,
0.05738384276628494,
-0.17395679652690887,
-0.3223363161087036,
0.06878120452165604,
0.35103943943977356,
0.4556269645690918,
-0.12060415744781494,
-0.348954439163208,
-0.13473956286907196,
-0.31339192390441895,
0.031409069895744324,
0.19831599295139313,
-0.31044745445251465,
0.12080329656600952,
-0.2684648036956787,
0.4227362871170044,
0.3624856472015381,
-0.5514575839042664,
-0.6021077632904053,
0.18462754786014557,
0.14460603892803192,
0.1832572966814041,
0.08488768339157104,
-0.17177395522594452,
0.1975497454404831,
0.06572526693344116,
0.17060527205467224,
0.36899369955062866,
0.1409316509962082,
0.10046344250440598,
-0.06605395674705505,
-0.32099348306655884,
0.16932354867458344,
0.1240571141242981,
-0.10097292065620422,
0.17603108286857605,
0.26679784059524536,
0.023716147989034653,
0.4700654447078705,
-0.06798148155212402,
0.014473003335297108,
0.01203487254679203,
0.36196470260620117,
-0.12593910098075867,
0.029019229114055634,
-0.01592511683702469,
-0.364452987909317,
0.2727113664150238,
0.025430981069803238,
0.2714281976222992,
-0.2721700668334961,
-0.3569616675376892,
-0.42294934391975403,
-0.009532312862575054,
-0.4269680678844452,
-0.17386126518249512,
-0.06345450133085251,
-0.028615958988666534,
-0.03021228313446045,
0.06766913831233978,
-0.08704162389039993,
0.32233622670173645,
-0.026391316205263138,
0.2965118885040283,
0.005537437275052071,
0.10166678577661514,
-0.06268030405044556,
0.047805305570364,
-0.024524196982383728,
0.1766943335533142,
0.20490339398384094,
0.003915543667972088,
-0.127713143825531,
0.566652238368988,
-0.11672654002904892,
0.17162109911441803,
-0.49502071738243103,
0.05301818251609802,
0.15459242463111877,
-0.21098797023296356,
-0.045613691210746765,
0.2166629135608673,
0.048259247094392776,
0.02726627141237259,
-0.035030364990234375,
0.49335652589797974,
0.42567622661590576,
0.10818310081958771,
0.010803185403347015,
0.23293909430503845,
0.17597191035747528,
-0.01610056310892105,
-0.09042464941740036,
-0.22068484127521515,
0.09842075407505035,
-0.17809462547302246,
0.2690632939338684,
-0.06360108405351639,
-0.12641841173171997,
0.009929165244102478,
0.5413867235183716,
-0.00404907763004303,
0.23355761170387268,
-0.03538277745246887,
-0.12833741307258606,
-0.01953960210084915,
0.3000519871711731,
0.15062610805034637,
0.4296998977661133,
0.08026877045631409,
-0.011373218148946762,
0.40636080503463745,
-0.042352210730314255,
-0.23258717358112335,
0.26402848958969116,
-0.004371859133243561,
-0.21981893479824066,
0.043411724269390106,
-0.06802742183208466,
-0.0570935495197773,
-0.519913375377655,
-0.29388052225112915,
-0.044296588748693466,
0.09537141770124435,
-0.6486209630966187,
0.12149598449468613,
-0.2761074900627136,
0.015122566372156143,
-0.08642198890447617,
-0.044163577258586884,
-0.423196941614151,
-0.2736911177635193,
-0.026466581970453262,
0.2257346361875534,
0.13003851473331451,
0.4081447720527649,
-0.4250079095363617,
0.23459798097610474,
-0.025326861068606377,
-0.11870015412569046,
-0.1535988748073578,
0.06970041245222092,
-0.30035102367401123,
-0.0025767143815755844,
0.40417322516441345,
-0.1604374200105667,
-0.006615465506911278,
-0.11792959272861481,
-0.03689514100551605,
-0.25702139735221863,
-0.20097681879997253,
0.1987278312444687,
-0.12010820209980011,
0.30650779604911804,
-0.03897564113140106,
-0.10216684639453888,
0.20781683921813965,
-0.07300874590873718,
0.1150398924946785,
-0.0660010576248169,
-0.2151748687028885,
0.006825437769293785,
-0.12549270689487457,
-0.05413598194718361,
-0.38757723569869995,
-0.3322804868221283,
-0.1355535387992859,
-0.34376707673072815,
0.21948818862438202,
-0.1865273416042328,
0.05617855116724968,
0.4111562967300415,
0.08236382901668549,
0.11105427891016006,
-0.47452500462532043,
0.22359095513820648,
-0.33409765362739563,
-0.3026637136936188,
0.30157220363616943,
-0.11320153623819351,
-0.3077274262905121,
-0.03173058480024338,
-0.0449315644800663,
0.4257041811943054,
0.014718223363161087,
-0.2878657877445221,
-0.13129040598869324,
-0.21888209879398346,
0.2950291335582733,
-0.09061147272586823,
0.09235266596078873,
0.17561273276805878,
-0.010371081531047821,
0.09061386436223984,
-0.061478666961193085,
0.013962309807538986,
0.045049119740724564,
-0.1622224748134613,
0.195220947265625,
-0.08335349708795547,
0.44173648953437805,
0.015525493770837784,
0.850153923034668,
0.19012996554374695,
0.09351076930761337,
0.29445043206214905,
-0.23492199182510376,
0.559988796710968,
-0.08920561522245407,
-0.3922700881958008,
0.05138418450951576,
0.11191706359386444,
0.20929764211177826,
0.24674808979034424,
0.0689777210354805,
0.14828985929489136,
-0.23459218442440033,
-0.2100013941526413,
-0.01695612072944641,
-0.40014639496803284,
-0.17632454633712769,
0.005128990858793259,
0.12115682661533356,
0.2561870813369751,
0.5062918663024902,
0.03335510194301605,
-0.16310176253318787,
0.21697935461997986,
0.2571480870246887,
0.0018927082419395447,
0.14376971125602722,
-0.2520863711833954,
0.15048739314079285,
-0.3330164849758148,
0.29866495728492737,
0.09876107424497604,
0.368665486574173,
-0.2123396247625351,
-0.19410377740859985,
0.08048002421855927,
0.12260133773088455,
0.2642035484313965,
0.11692124605178833,
0.11307951807975769,
-0.15154330432415009,
0.22230660915374756,
-0.26481330394744873,
-0.13444548845291138,
0.0025171712040901184,
-0.3443148732185364,
0.5452451109886169,
0.29770076274871826,
-0.2791062295436859,
-0.07800821214914322,
-0.21444228291511536,
-0.01828637160360813,
-0.1518147736787796,
-0.09318777918815613,
-0.3340601325035095,
-0.35054585337638855,
-0.603384256362915,
0.19472961127758026,
0.21342439949512482,
0.14876125752925873,
-0.31903770565986633,
0.07938320934772491,
0.15556564927101135,
-0.272976279258728,
0.32469624280929565,
0.23410578072071075,
0.062297459691762924,
0.013998514972627163,
0.2631851136684418,
0.3190918564796448,
-0.03266574442386627,
0.03649502247571945,
0.7873033285140991,
0.19610880315303802,
-0.4849246144294739,
-0.2022513747215271,
0.14487190544605255,
0.27517765760421753,
0.4503682851791382,
-0.14811864495277405,
0.028916403651237488,
0.6284188032150269,
0.0769433006644249,
0.011515576392412186,
0.201149582862854,
0.2624664306640625,
-0.0034241708926856518,
-0.27144381403923035,
-0.36012744903564453,
0.03732616454362869,
-0.08375634253025055,
-0.10339862108230591,
0.07546474784612656,
0.29165348410606384,
-0.2175336629152298,
-0.13652385771274567,
-0.2748103141784668,
1.0740818977355957,
0.19549697637557983,
0.4446517527103424,
0.5033268928527832,
0.035273365676403046,
0.14284023642539978,
-0.10791918635368347,
0.029965072870254517,
-0.10831557214260101,
-0.03227986767888069,
-0.0990610346198082,
-0.0867048054933548,
0.035906121134757996,
-0.1029706597328186,
-0.1062212660908699,
0.2995842397212982,
-0.09211349487304688,
0.1310001015663147,
0.24259229004383087,
0.3117239773273468,
-0.5273438096046448,
-0.14761056005954742,
0.11428206413984299,
0.06708879768848419,
0.054430656135082245,
0.3862069845199585,
-0.018736332654953003,
-0.23199281096458435,
-0.1312173455953598,
-0.4715611934661865,
-0.2218976765871048,
0.3695475459098816,
-0.31387972831726074,
0.18511152267456055,
0.3833572566509247,
0.17527543008327484,
0.4832409918308258,
0.125568687915802,
0.2565736174583435,
0.1694881021976471,
-0.3778197169303894,
0.22592750191688538,
0.13496965169906616,
-0.031000753864645958,
0.048578787595033646,
0.042212825268507004,
0.506051778793335,
-0.045548513531684875,
-0.31226950883865356,
-0.03264479339122772,
-0.045698877424001694,
-0.2386975735425949,
-0.505777895450592,
0.006926260888576508,
0.14704963564872742,
-0.5170871019363403,
0.07443000376224518,
-0.038891181349754333,
0.2722446322441101,
-0.21121101081371307,
0.03308327868580818,
0.08952049911022186,
-0.011412394233047962,
-0.047339558601379395,
0.06289052963256836,
-0.17490896582603455,
-0.1259436458349228,
0.3988235294818878,
-0.178350031375885,
-0.0011381767690181732,
0.693265438079834,
-0.02608984336256981,
-0.10399646311998367,
-0.12633085250854492,
-0.11838886886835098,
0.2908560633659363,
-0.4218578636646271,
0.013024703599512577,
0.041769880801439285,
-0.05384004861116409,
-0.3729834258556366,
0.3259013295173645,
-0.06062490493059158,
0.0739620253443718,
0.1795777678489685,
-0.3744763135910034,
-0.37010276317596436,
0.053916797041893005,
-0.20053116977214813,
-0.004916094243526459,
0.02701769769191742,
0.30996257066726685,
-0.062499456107616425,
-0.06647869944572449,
-0.251819372177124,
0.062203168869018555,
0.13959211111068726,
-0.17382429540157318,
0.313693106174469,
-0.12835147976875305,
0.14822274446487427,
-0.039778415113687515,
0.04763191193342209,
0.1475273072719574,
-0.22904038429260254,
-0.12589888274669647,
-0.4106471538543701,
0.18540985882282257,
0.2093929648399353,
-0.32747867703437805,
0.11082456260919571,
0.02064848318696022,
-0.24978119134902954,
-0.058696433901786804,
0.1814056634902954,
0.3759946823120117,
0.07538431137800217,
-0.07915283739566803,
0.04726290702819824,
0.2755190134048462,
-0.09205734729766846,
-0.011703923344612122,
-0.18151003122329712,
0.029789507389068604,
0.055318716913461685,
0.1491052359342575,
-0.37387555837631226,
-0.038200974464416504,
-0.27218183875083923,
0.17634066939353943,
0.4776914119720459,
0.13782614469528198,
0.3850649893283844,
-0.026482969522476196,
-0.06083047389984131,
0.07602568715810776,
0.3296377956867218,
0.28741300106048584,
-0.28762373328208923,
-0.020112181082367897,
0.3103317320346832,
0.12153324484825134,
-0.38855189085006714,
-0.0007529039867222309,
-0.16480053961277008,
-0.025443531572818756,
-0.07070375978946686,
0.20175698399543762,
-0.032427191734313965,
-0.08234541863203049,
0.10291897505521774,
-0.1449163258075714,
0.14552846550941467,
0.3210325241088867,
0.188053697347641,
0.101949542760849,
-0.26014459133148193,
0.04655800759792328,
0.5241190195083618,
-0.19081994891166687,
0.13957355916500092,
0.21581584215164185,
-0.6616793274879456,
0.1511509269475937,
-0.1769384741783142,
0.117123544216156,
0.370809942483902,
-0.45415177941322327,
-0.033408042043447495,
-0.210379958152771,
-0.2355901598930359,
-0.1341802477836609,
-0.18206751346588135,
0.6025291681289673,
-0.28915685415267944,
-0.1701844483613968,
-0.25215351581573486,
0.4041590690612793,
-0.17790639400482178,
-0.09773418307304382,
0.028941892087459564,
-0.20534026622772217,
-0.16711075603961945,
-0.0047299787402153015,
-0.039212916046381,
-0.38948583602905273,
0.00036635249853134155,
0.05489945411682129,
-0.21836425364017487,
-0.2811691164970398,
-0.18298912048339844,
0.2422577142715454,
0.09259140491485596,
-0.2535918951034546,
0.17036567628383636,
0.030361734330654144,
-0.22968456149101257,
0.28095191717147827,
0.31932657957077026,
0.5767747759819031,
0.2158162146806717,
0.366152822971344,
0.09250261634588242,
0.051686905324459076,
0.17888577282428741,
0.09042177349328995,
0.36525216698646545,
0.4726826846599579,
0.4953444302082062,
0.18124744296073914,
0.0653543472290039,
-0.12230445444583893,
-0.2784472107887268,
-0.1927614063024521,
0.1271560937166214,
-0.29729142785072327,
0.6858861446380615,
-0.36700645089149475,
-0.03732054680585861,
-0.38561147451400757,
0.1451577991247177,
-0.252149760723114,
0.1365252137184143,
0.28817757964134216,
0.23117144405841827,
0.27045708894729614,
-0.7385328412055969,
0.015625715255737305,
0.09784430265426636,
0.19733531773090363,
0.36551398038864136,
-0.018189623951911926,
-0.061131551861763,
0.09633779525756836,
-0.687636137008667,
0.275363564491272,
0.01908433623611927,
0.05523107945919037,
-0.24654176831245422,
-0.16592255234718323,
0.031693749129772186,
0.06631029397249222,
0.005911059677600861,
0.07694986462593079,
-0.21926328539848328,
-0.2612326443195343,
0.038160670548677444,
-0.007691927254199982,
-0.10218788683414459,
0.04495442658662796,
0.07196720689535141,
-0.4490252435207367,
0.3801150918006897,
-0.44360682368278503,
-0.04878239333629608,
0.22464075684547424,
-0.07538579404354095,
-0.026186088100075722,
-0.14401455223560333,
0.4932452142238617,
0.10055309534072876,
0.5112241506576538,
0.12986910343170166,
0.04314170032739639,
-0.3018604516983032,
-0.13398477435112,
-0.2425844669342041,
0.1318936049938202,
-0.10363295674324036,
0.27182769775390625,
-0.07748723775148392,
-0.241079643368721,
-0.3769108057022095,
0.43450772762298584,
0.08869375288486481,
-0.5133835077285767,
-0.24393330514431,
0.10267490893602371,
-0.33140885829925537,
0.2083013355731964,
0.13505350053310394,
0.028670798987150192,
-0.23297157883644104,
0.06446409970521927,
-0.37713634967803955,
-0.515961229801178,
0.5932906866073608,
-0.38067227602005005,
-0.1650964319705963,
-0.311968058347702,
0.39829760789871216,
0.386066734790802,
-0.33376291394233704,
-0.38375505805015564,
0.12109660357236862,
0.28536921739578247,
-0.11066826432943344,
-0.10271166265010834,
0.03913214057683945,
-0.1656140685081482,
0.02460283413529396,
-0.14857117831707,
0.2408539205789566,
0.1569119095802307,
-0.42410725355148315,
0.3962043225765228,
-0.13980847597122192
] |
https://github.com/huggingface/datasets/issues/5968
|
Common Voice datasets still need `use_auth_token=True`
|
Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7)
|
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.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
```
| 38
|
Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.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
```
Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7)
|
[
-0.1996699571609497,
0.011859729886054993,
0.15256021916866302,
-0.005796566605567932,
0.4470815658569336,
0.052654512226581573,
0.5136600732803345,
0.12041829526424408,
0.031704582273960114,
-0.0473194420337677,
-0.5297960042953491,
0.04294753074645996,
0.03492225334048271,
-0.029982831329107285,
0.02069869264960289,
0.14064541459083557,
0.05893797427415848,
-0.10698094964027405,
0.07509632408618927,
-0.12610076367855072,
-0.17410771548748016,
0.1578248143196106,
-0.26827502250671387,
0.20281130075454712,
-0.2894443869590759,
-0.15474840998649597,
0.09749996662139893,
0.3590671718120575,
0.03130509331822395,
-0.2894134223461151,
0.34424981474876404,
0.3093810975551605,
0.07892804592847824,
0.2494393289089203,
-0.00011565392196644098,
0.13892380893230438,
0.20841440558433533,
-0.1705234795808792,
-0.2634652554988861,
-0.22062857449054718,
-0.1679939329624176,
0.1901746243238449,
-0.03443849831819534,
0.018202684819698334,
0.041380636394023895,
-0.27716824412345886,
-0.08910617232322693,
-0.46677887439727783,
0.7673097848892212,
0.4816012978553772,
0.14320008456707,
0.20158424973487854,
0.03570326045155525,
-0.09997839480638504,
-0.13640105724334717,
0.11183890700340271,
0.007706033065915108,
0.455178827047348,
0.2252429574728012,
-0.0697302296757698,
0.23236870765686035,
0.18818767368793488,
-0.13062821328639984,
-0.15648411214351654,
0.43282026052474976,
-0.13590532541275024,
-0.3640202581882477,
-0.4451352655887604,
-0.0068959519267082214,
0.3984825313091278,
0.08575991541147232,
-0.27323997020721436,
-0.27649617195129395,
-0.27056118845939636,
0.025980819016695023,
0.04118601977825165,
0.14899806678295135,
0.24406789243221283,
-0.20735669136047363,
0.332773894071579,
-0.3612254858016968,
-0.11593423783779144,
0.0740315169095993,
0.016671471297740936,
0.10027703642845154,
0.3666418194770813,
0.06504806876182556,
0.1214994490146637,
0.21577021479606628,
-0.06989682465791702,
-0.07613378018140793,
0.03132183477282524,
-0.06653738021850586,
0.275959312915802,
-0.08914947509765625,
0.05096346139907837,
-0.06763701885938644,
0.034167271107435226,
0.423444002866745,
0.07835085690021515,
-0.2892242670059204,
0.03150973469018936,
-0.2260107696056366,
0.024575036019086838,
0.030801361426711082,
0.204035222530365,
0.18980208039283752,
0.1754000186920166,
0.319069504737854,
0.3023643493652344,
0.131431445479393,
-0.034445084631443024,
-0.08615481108427048,
-0.004106641281396151,
-0.03888900950551033,
0.0013002995401620865,
0.28918105363845825,
-0.19829805195331573,
-0.3359889090061188,
0.025807911530137062,
-0.2545512616634369,
-0.02693668007850647,
0.18037892878055573,
0.5603330731391907,
0.03483735769987106,
-0.046851299703121185,
0.038884446024894714,
0.2961574196815491,
-0.11830485612154007,
-0.4381723403930664,
-0.11431089788675308,
-0.17002472281455994,
-0.05773323029279709,
0.15411290526390076,
0.18270616233348846,
-0.5052295327186584,
0.22740688920021057,
0.12611599266529083,
0.140664204955101,
-0.0846354216337204,
-0.11264541000127792,
0.17380531132221222,
0.07481810450553894,
0.14526423811912537,
0.09010876715183258,
0.21376946568489075,
0.24497078359127045,
-0.13199181854724884,
-0.2026575207710266,
0.06523390114307404,
-0.3044465184211731,
-0.4268866777420044,
0.04217512533068657,
0.11779516190290451,
-0.2843024730682373,
-0.11914893984794617,
0.1461658924818039,
0.02629409357905388,
0.18836641311645508,
-0.22172896564006805,
0.05738384276628494,
-0.17395679652690887,
-0.3223363161087036,
0.06878120452165604,
0.35103943943977356,
0.4556269645690918,
-0.12060415744781494,
-0.348954439163208,
-0.13473956286907196,
-0.31339192390441895,
0.031409069895744324,
0.19831599295139313,
-0.31044745445251465,
0.12080329656600952,
-0.2684648036956787,
0.4227362871170044,
0.3624856472015381,
-0.5514575839042664,
-0.6021077632904053,
0.18462754786014557,
0.14460603892803192,
0.1832572966814041,
0.08488768339157104,
-0.17177395522594452,
0.1975497454404831,
0.06572526693344116,
0.17060527205467224,
0.36899369955062866,
0.1409316509962082,
0.10046344250440598,
-0.06605395674705505,
-0.32099348306655884,
0.16932354867458344,
0.1240571141242981,
-0.10097292065620422,
0.17603108286857605,
0.26679784059524536,
0.023716147989034653,
0.4700654447078705,
-0.06798148155212402,
0.014473003335297108,
0.01203487254679203,
0.36196470260620117,
-0.12593910098075867,
0.029019229114055634,
-0.01592511683702469,
-0.364452987909317,
0.2727113664150238,
0.025430981069803238,
0.2714281976222992,
-0.2721700668334961,
-0.3569616675376892,
-0.42294934391975403,
-0.009532312862575054,
-0.4269680678844452,
-0.17386126518249512,
-0.06345450133085251,
-0.028615958988666534,
-0.03021228313446045,
0.06766913831233978,
-0.08704162389039993,
0.32233622670173645,
-0.026391316205263138,
0.2965118885040283,
0.005537437275052071,
0.10166678577661514,
-0.06268030405044556,
0.047805305570364,
-0.024524196982383728,
0.1766943335533142,
0.20490339398384094,
0.003915543667972088,
-0.127713143825531,
0.566652238368988,
-0.11672654002904892,
0.17162109911441803,
-0.49502071738243103,
0.05301818251609802,
0.15459242463111877,
-0.21098797023296356,
-0.045613691210746765,
0.2166629135608673,
0.048259247094392776,
0.02726627141237259,
-0.035030364990234375,
0.49335652589797974,
0.42567622661590576,
0.10818310081958771,
0.010803185403347015,
0.23293909430503845,
0.17597191035747528,
-0.01610056310892105,
-0.09042464941740036,
-0.22068484127521515,
0.09842075407505035,
-0.17809462547302246,
0.2690632939338684,
-0.06360108405351639,
-0.12641841173171997,
0.009929165244102478,
0.5413867235183716,
-0.00404907763004303,
0.23355761170387268,
-0.03538277745246887,
-0.12833741307258606,
-0.01953960210084915,
0.3000519871711731,
0.15062610805034637,
0.4296998977661133,
0.08026877045631409,
-0.011373218148946762,
0.40636080503463745,
-0.042352210730314255,
-0.23258717358112335,
0.26402848958969116,
-0.004371859133243561,
-0.21981893479824066,
0.043411724269390106,
-0.06802742183208466,
-0.0570935495197773,
-0.519913375377655,
-0.29388052225112915,
-0.044296588748693466,
0.09537141770124435,
-0.6486209630966187,
0.12149598449468613,
-0.2761074900627136,
0.015122566372156143,
-0.08642198890447617,
-0.044163577258586884,
-0.423196941614151,
-0.2736911177635193,
-0.026466581970453262,
0.2257346361875534,
0.13003851473331451,
0.4081447720527649,
-0.4250079095363617,
0.23459798097610474,
-0.025326861068606377,
-0.11870015412569046,
-0.1535988748073578,
0.06970041245222092,
-0.30035102367401123,
-0.0025767143815755844,
0.40417322516441345,
-0.1604374200105667,
-0.006615465506911278,
-0.11792959272861481,
-0.03689514100551605,
-0.25702139735221863,
-0.20097681879997253,
0.1987278312444687,
-0.12010820209980011,
0.30650779604911804,
-0.03897564113140106,
-0.10216684639453888,
0.20781683921813965,
-0.07300874590873718,
0.1150398924946785,
-0.0660010576248169,
-0.2151748687028885,
0.006825437769293785,
-0.12549270689487457,
-0.05413598194718361,
-0.38757723569869995,
-0.3322804868221283,
-0.1355535387992859,
-0.34376707673072815,
0.21948818862438202,
-0.1865273416042328,
0.05617855116724968,
0.4111562967300415,
0.08236382901668549,
0.11105427891016006,
-0.47452500462532043,
0.22359095513820648,
-0.33409765362739563,
-0.3026637136936188,
0.30157220363616943,
-0.11320153623819351,
-0.3077274262905121,
-0.03173058480024338,
-0.0449315644800663,
0.4257041811943054,
0.014718223363161087,
-0.2878657877445221,
-0.13129040598869324,
-0.21888209879398346,
0.2950291335582733,
-0.09061147272586823,
0.09235266596078873,
0.17561273276805878,
-0.010371081531047821,
0.09061386436223984,
-0.061478666961193085,
0.013962309807538986,
0.045049119740724564,
-0.1622224748134613,
0.195220947265625,
-0.08335349708795547,
0.44173648953437805,
0.015525493770837784,
0.850153923034668,
0.19012996554374695,
0.09351076930761337,
0.29445043206214905,
-0.23492199182510376,
0.559988796710968,
-0.08920561522245407,
-0.3922700881958008,
0.05138418450951576,
0.11191706359386444,
0.20929764211177826,
0.24674808979034424,
0.0689777210354805,
0.14828985929489136,
-0.23459218442440033,
-0.2100013941526413,
-0.01695612072944641,
-0.40014639496803284,
-0.17632454633712769,
0.005128990858793259,
0.12115682661533356,
0.2561870813369751,
0.5062918663024902,
0.03335510194301605,
-0.16310176253318787,
0.21697935461997986,
0.2571480870246887,
0.0018927082419395447,
0.14376971125602722,
-0.2520863711833954,
0.15048739314079285,
-0.3330164849758148,
0.29866495728492737,
0.09876107424497604,
0.368665486574173,
-0.2123396247625351,
-0.19410377740859985,
0.08048002421855927,
0.12260133773088455,
0.2642035484313965,
0.11692124605178833,
0.11307951807975769,
-0.15154330432415009,
0.22230660915374756,
-0.26481330394744873,
-0.13444548845291138,
0.0025171712040901184,
-0.3443148732185364,
0.5452451109886169,
0.29770076274871826,
-0.2791062295436859,
-0.07800821214914322,
-0.21444228291511536,
-0.01828637160360813,
-0.1518147736787796,
-0.09318777918815613,
-0.3340601325035095,
-0.35054585337638855,
-0.603384256362915,
0.19472961127758026,
0.21342439949512482,
0.14876125752925873,
-0.31903770565986633,
0.07938320934772491,
0.15556564927101135,
-0.272976279258728,
0.32469624280929565,
0.23410578072071075,
0.062297459691762924,
0.013998514972627163,
0.2631851136684418,
0.3190918564796448,
-0.03266574442386627,
0.03649502247571945,
0.7873033285140991,
0.19610880315303802,
-0.4849246144294739,
-0.2022513747215271,
0.14487190544605255,
0.27517765760421753,
0.4503682851791382,
-0.14811864495277405,
0.028916403651237488,
0.6284188032150269,
0.0769433006644249,
0.011515576392412186,
0.201149582862854,
0.2624664306640625,
-0.0034241708926856518,
-0.27144381403923035,
-0.36012744903564453,
0.03732616454362869,
-0.08375634253025055,
-0.10339862108230591,
0.07546474784612656,
0.29165348410606384,
-0.2175336629152298,
-0.13652385771274567,
-0.2748103141784668,
1.0740818977355957,
0.19549697637557983,
0.4446517527103424,
0.5033268928527832,
0.035273365676403046,
0.14284023642539978,
-0.10791918635368347,
0.029965072870254517,
-0.10831557214260101,
-0.03227986767888069,
-0.0990610346198082,
-0.0867048054933548,
0.035906121134757996,
-0.1029706597328186,
-0.1062212660908699,
0.2995842397212982,
-0.09211349487304688,
0.1310001015663147,
0.24259229004383087,
0.3117239773273468,
-0.5273438096046448,
-0.14761056005954742,
0.11428206413984299,
0.06708879768848419,
0.054430656135082245,
0.3862069845199585,
-0.018736332654953003,
-0.23199281096458435,
-0.1312173455953598,
-0.4715611934661865,
-0.2218976765871048,
0.3695475459098816,
-0.31387972831726074,
0.18511152267456055,
0.3833572566509247,
0.17527543008327484,
0.4832409918308258,
0.125568687915802,
0.2565736174583435,
0.1694881021976471,
-0.3778197169303894,
0.22592750191688538,
0.13496965169906616,
-0.031000753864645958,
0.048578787595033646,
0.042212825268507004,
0.506051778793335,
-0.045548513531684875,
-0.31226950883865356,
-0.03264479339122772,
-0.045698877424001694,
-0.2386975735425949,
-0.505777895450592,
0.006926260888576508,
0.14704963564872742,
-0.5170871019363403,
0.07443000376224518,
-0.038891181349754333,
0.2722446322441101,
-0.21121101081371307,
0.03308327868580818,
0.08952049911022186,
-0.011412394233047962,
-0.047339558601379395,
0.06289052963256836,
-0.17490896582603455,
-0.1259436458349228,
0.3988235294818878,
-0.178350031375885,
-0.0011381767690181732,
0.693265438079834,
-0.02608984336256981,
-0.10399646311998367,
-0.12633085250854492,
-0.11838886886835098,
0.2908560633659363,
-0.4218578636646271,
0.013024703599512577,
0.041769880801439285,
-0.05384004861116409,
-0.3729834258556366,
0.3259013295173645,
-0.06062490493059158,
0.0739620253443718,
0.1795777678489685,
-0.3744763135910034,
-0.37010276317596436,
0.053916797041893005,
-0.20053116977214813,
-0.004916094243526459,
0.02701769769191742,
0.30996257066726685,
-0.062499456107616425,
-0.06647869944572449,
-0.251819372177124,
0.062203168869018555,
0.13959211111068726,
-0.17382429540157318,
0.313693106174469,
-0.12835147976875305,
0.14822274446487427,
-0.039778415113687515,
0.04763191193342209,
0.1475273072719574,
-0.22904038429260254,
-0.12589888274669647,
-0.4106471538543701,
0.18540985882282257,
0.2093929648399353,
-0.32747867703437805,
0.11082456260919571,
0.02064848318696022,
-0.24978119134902954,
-0.058696433901786804,
0.1814056634902954,
0.3759946823120117,
0.07538431137800217,
-0.07915283739566803,
0.04726290702819824,
0.2755190134048462,
-0.09205734729766846,
-0.011703923344612122,
-0.18151003122329712,
0.029789507389068604,
0.055318716913461685,
0.1491052359342575,
-0.37387555837631226,
-0.038200974464416504,
-0.27218183875083923,
0.17634066939353943,
0.4776914119720459,
0.13782614469528198,
0.3850649893283844,
-0.026482969522476196,
-0.06083047389984131,
0.07602568715810776,
0.3296377956867218,
0.28741300106048584,
-0.28762373328208923,
-0.020112181082367897,
0.3103317320346832,
0.12153324484825134,
-0.38855189085006714,
-0.0007529039867222309,
-0.16480053961277008,
-0.025443531572818756,
-0.07070375978946686,
0.20175698399543762,
-0.032427191734313965,
-0.08234541863203049,
0.10291897505521774,
-0.1449163258075714,
0.14552846550941467,
0.3210325241088867,
0.188053697347641,
0.101949542760849,
-0.26014459133148193,
0.04655800759792328,
0.5241190195083618,
-0.19081994891166687,
0.13957355916500092,
0.21581584215164185,
-0.6616793274879456,
0.1511509269475937,
-0.1769384741783142,
0.117123544216156,
0.370809942483902,
-0.45415177941322327,
-0.033408042043447495,
-0.210379958152771,
-0.2355901598930359,
-0.1341802477836609,
-0.18206751346588135,
0.6025291681289673,
-0.28915685415267944,
-0.1701844483613968,
-0.25215351581573486,
0.4041590690612793,
-0.17790639400482178,
-0.09773418307304382,
0.028941892087459564,
-0.20534026622772217,
-0.16711075603961945,
-0.0047299787402153015,
-0.039212916046381,
-0.38948583602905273,
0.00036635249853134155,
0.05489945411682129,
-0.21836425364017487,
-0.2811691164970398,
-0.18298912048339844,
0.2422577142715454,
0.09259140491485596,
-0.2535918951034546,
0.17036567628383636,
0.030361734330654144,
-0.22968456149101257,
0.28095191717147827,
0.31932657957077026,
0.5767747759819031,
0.2158162146806717,
0.366152822971344,
0.09250261634588242,
0.051686905324459076,
0.17888577282428741,
0.09042177349328995,
0.36525216698646545,
0.4726826846599579,
0.4953444302082062,
0.18124744296073914,
0.0653543472290039,
-0.12230445444583893,
-0.2784472107887268,
-0.1927614063024521,
0.1271560937166214,
-0.29729142785072327,
0.6858861446380615,
-0.36700645089149475,
-0.03732054680585861,
-0.38561147451400757,
0.1451577991247177,
-0.252149760723114,
0.1365252137184143,
0.28817757964134216,
0.23117144405841827,
0.27045708894729614,
-0.7385328412055969,
0.015625715255737305,
0.09784430265426636,
0.19733531773090363,
0.36551398038864136,
-0.018189623951911926,
-0.061131551861763,
0.09633779525756836,
-0.687636137008667,
0.275363564491272,
0.01908433623611927,
0.05523107945919037,
-0.24654176831245422,
-0.16592255234718323,
0.031693749129772186,
0.06631029397249222,
0.005911059677600861,
0.07694986462593079,
-0.21926328539848328,
-0.2612326443195343,
0.038160670548677444,
-0.007691927254199982,
-0.10218788683414459,
0.04495442658662796,
0.07196720689535141,
-0.4490252435207367,
0.3801150918006897,
-0.44360682368278503,
-0.04878239333629608,
0.22464075684547424,
-0.07538579404354095,
-0.026186088100075722,
-0.14401455223560333,
0.4932452142238617,
0.10055309534072876,
0.5112241506576538,
0.12986910343170166,
0.04314170032739639,
-0.3018604516983032,
-0.13398477435112,
-0.2425844669342041,
0.1318936049938202,
-0.10363295674324036,
0.27182769775390625,
-0.07748723775148392,
-0.241079643368721,
-0.3769108057022095,
0.43450772762298584,
0.08869375288486481,
-0.5133835077285767,
-0.24393330514431,
0.10267490893602371,
-0.33140885829925537,
0.2083013355731964,
0.13505350053310394,
0.028670798987150192,
-0.23297157883644104,
0.06446409970521927,
-0.37713634967803955,
-0.515961229801178,
0.5932906866073608,
-0.38067227602005005,
-0.1650964319705963,
-0.311968058347702,
0.39829760789871216,
0.386066734790802,
-0.33376291394233704,
-0.38375505805015564,
0.12109660357236862,
0.28536921739578247,
-0.11066826432943344,
-0.10271166265010834,
0.03913214057683945,
-0.1656140685081482,
0.02460283413529396,
-0.14857117831707,
0.2408539205789566,
0.1569119095802307,
-0.42410725355148315,
0.3962043225765228,
-0.13980847597122192
] |
https://github.com/huggingface/datasets/issues/5967
|
Config name / split name lost after map with multiproc
|
This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split
|
### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
| 46
|
Config name / split name lost after map with multiproc
### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split
|
[
-0.3114314675331116,
-0.3305574655532837,
0.0021505169570446014,
0.09281017631292343,
0.29288196563720703,
-0.11196540296077728,
0.5943196415901184,
0.1308251917362213,
-0.08384805172681808,
0.6229398846626282,
0.04151303321123123,
0.5787533521652222,
-0.13195466995239258,
0.30740663409233093,
-0.07507703453302383,
-0.06175047904253006,
-0.0971054807305336,
-0.055916860699653625,
0.09768249839544296,
-0.005231749266386032,
-0.13479401171207428,
0.18270370364189148,
-0.36322158575057983,
0.19126075506210327,
-0.4240996837615967,
0.07106445729732513,
-0.07250956445932388,
0.16130927205085754,
0.2618001699447632,
-0.15846320986747742,
-0.012004528194665909,
-0.22846931219100952,
-0.1707533299922943,
0.4436555802822113,
-0.00011207082570763305,
-0.04711240530014038,
0.17090897262096405,
-0.1741630584001541,
0.19318778812885284,
-0.02894464135169983,
-0.35838785767555237,
0.18766042590141296,
-0.1462676227092743,
-0.3391841650009155,
-0.1459302008152008,
0.3824142813682556,
-0.18607084453105927,
-0.4379938542842865,
-0.061998412013053894,
0.16610832512378693,
0.2328605353832245,
0.15535949170589447,
-0.14405427873134613,
0.047840557992458344,
-0.03900209069252014,
0.01955372840166092,
-0.12594453990459442,
-0.1241535097360611,
0.024082813411951065,
-0.2091742306947708,
-0.03665750473737717,
0.36285561323165894,
-0.07661318778991699,
-0.07666854560375214,
-0.27326294779777527,
-0.03417757526040077,
0.007048323750495911,
-0.41208821535110474,
0.23202523589134216,
0.14820855855941772,
-0.10643047839403152,
-0.25351211428642273,
-0.01729472726583481,
-0.03664353862404823,
0.033739302307367325,
-0.19189707934856415,
0.009437702596187592,
0.027865160256624222,
-0.00849022064357996,
-0.04240136221051216,
-0.3123698830604553,
-0.040473539382219315,
0.17416633665561676,
-0.03438040614128113,
-0.08552812039852142,
0.43796640634536743,
-0.010209930129349232,
0.3469557464122772,
0.10514020174741745,
-0.05091004818677902,
-0.2000037133693695,
-0.07784245908260345,
0.04219847917556763,
0.1526942104101181,
-0.09991142153739929,
-0.1648719310760498,
0.07929787784814835,
-0.42767712473869324,
-0.16760104894638062,
-0.20689238607883453,
-0.13359107077121735,
0.03617993742227554,
0.03015824407339096,
0.28508612513542175,
0.0747869461774826,
-0.06401067227125168,
0.23253482580184937,
0.4675111174583435,
0.1354602873325348,
0.007148148026317358,
-0.2907125651836395,
-0.02434886246919632,
0.392811119556427,
-0.06647451221942902,
0.022998958826065063,
0.15475407242774963,
0.09606194496154785,
-0.17573213577270508,
-0.17199350893497467,
-0.03408844396471977,
-0.4200858771800995,
-0.07457347959280014,
0.15495114028453827,
0.21955883502960205,
0.2381269633769989,
0.30761662125587463,
-0.033384017646312714,
0.014388667419552803,
-0.21978341042995453,
0.059656981378793716,
-0.2842373549938202,
-0.11894619464874268,
-0.2355620414018631,
0.23103921115398407,
0.08211776614189148,
0.04397998005151749,
0.35531067848205566,
-0.07203385978937149,
-0.08337898552417755,
-0.33527567982673645,
-0.04485553503036499,
0.018165303394198418,
0.25006216764450073,
0.19846747815608978,
-0.08304217457771301,
0.052154265344142914,
-0.15309911966323853,
-0.14834755659103394,
-0.11560004949569702,
-0.027078986167907715,
-0.3154427111148834,
-0.1761431246995926,
0.07359085232019424,
0.2729667127132416,
0.14094115793704987,
0.35270169377326965,
0.21190571784973145,
-0.024094145745038986,
0.48316359519958496,
-0.1325753778219223,
0.1581612378358841,
-0.17023451626300812,
-0.2515758275985718,
-0.1576627492904663,
0.10577597469091415,
0.06209409236907959,
0.10244691371917725,
-0.29972270131111145,
0.03461621329188347,
-0.020603980869054794,
0.22277690470218658,
0.03567219153046608,
-0.09572428464889526,
0.14417299628257751,
-0.09502020478248596,
0.4506308436393738,
0.2056538164615631,
-0.2909030020236969,
-0.12640300393104553,
0.2287597358226776,
-0.29284679889678955,
0.073363296687603,
-0.014492638409137726,
-0.30182698369026184,
0.1095285564661026,
-0.03764411062002182,
0.38741248846054077,
0.21082819998264313,
-0.08257642388343811,
0.2044399380683899,
-0.19538569450378418,
-0.29730460047721863,
-0.31743788719177246,
-0.08449945598840714,
0.13046137988567352,
0.09567964822053909,
0.20875069499015808,
-0.12517966330051422,
0.6217348575592041,
-0.03561880812048912,
0.2007400244474411,
0.2808498740196228,
0.12019145488739014,
-0.06580965220928192,
-0.10279087722301483,
-0.430474191904068,
-0.1445988416671753,
0.08793481439352036,
-0.014770947396755219,
-0.12332357466220856,
0.02347838133573532,
-0.20285704731941223,
0.15068086981773376,
-0.09720537811517715,
-0.10835345089435577,
-0.3769397437572479,
0.1296856552362442,
0.4743817448616028,
-0.3494531512260437,
-0.25730836391448975,
0.0785793662071228,
0.1716042309999466,
0.37025222182273865,
-0.13133025169372559,
-0.3236474394798279,
0.17834922671318054,
-0.0788261815905571,
-0.1715676188468933,
-0.28656286001205444,
0.3531731963157654,
0.2506340444087982,
-0.02052255906164646,
-0.23921158909797668,
0.5454872250556946,
0.2164573073387146,
-0.15690170228481293,
-0.16024494171142578,
-0.15596447885036469,
0.11722550541162491,
-0.17815344035625458,
-0.009177980944514275,
0.07692373543977737,
0.09295973926782608,
-0.1654757857322693,
-0.023172013461589813,
0.3189655542373657,
0.20712238550186157,
0.1513206958770752,
0.004177480936050415,
0.1360994130373001,
0.08691222965717316,
-0.1253596395254135,
0.11823957413434982,
-0.3132402300834656,
-0.2641691267490387,
-0.0018236208707094193,
0.17096926271915436,
0.10589203238487244,
-0.2744392156600952,
-0.031681858003139496,
0.7665870785713196,
-0.04950306564569473,
-0.27993959188461304,
-0.22416400909423828,
-0.15869411826133728,
0.044758155941963196,
0.2210569679737091,
0.2456124871969223,
0.5302680134773254,
0.17067094147205353,
-0.07036192715167999,
-0.1906815469264984,
-0.17511668801307678,
-0.010965839959681034,
0.17983730137348175,
0.04574812576174736,
0.29704001545906067,
0.17474351823329926,
0.16124896705150604,
-0.04150478541851044,
-0.07682037353515625,
-0.32563909888267517,
0.24134030938148499,
-0.18522270023822784,
-0.25579729676246643,
0.1775907725095749,
-0.11934176832437515,
0.4270596206188202,
-0.20226095616817474,
-0.4261835217475891,
-0.07344730198383331,
-0.23688188195228577,
-0.09705846011638641,
0.16880464553833008,
-0.34315183758735657,
0.3308435380458832,
0.0036185141652822495,
-0.3241546154022217,
-0.0748903825879097,
-0.3449426293373108,
0.19808804988861084,
0.09739691764116287,
-0.23216655850410461,
0.0012186896055936813,
-0.08761850744485855,
-0.21615755558013916,
0.03598833829164505,
0.3346644341945648,
-0.3896886110305786,
-0.20235784351825714,
-0.013673219829797745,
0.18071281909942627,
-0.01032283529639244,
0.0925838053226471,
0.04162641614675522,
-0.27975738048553467,
0.1626216322183609,
-0.5951728224754333,
0.11847753077745438,
0.0015152785927057266,
0.022146204486489296,
0.11199595034122467,
0.22140632569789886,
-0.16661357879638672,
-0.4209424555301666,
-0.4349072277545929,
-0.26037731766700745,
-0.1785244643688202,
0.1990385800600052,
-0.3029165267944336,
0.19270998239517212,
0.27400973439216614,
-0.07459888607263565,
0.06859593838453293,
-0.13715963065624237,
-0.08322034031152725,
-0.34335827827453613,
0.04115505889058113,
-0.12592121958732605,
-0.1899893581867218,
0.09833747893571854,
-0.23750676214694977,
-0.022201742976903915,
0.11268298327922821,
0.22509771585464478,
-0.09457895159721375,
0.10970556735992432,
-0.014723604544997215,
0.3000328838825226,
0.17931810021400452,
0.11007417738437653,
0.3949923813343048,
0.47893476486206055,
-0.12602528929710388,
-0.18554872274398804,
-0.2967081069946289,
0.2627181112766266,
0.21895885467529297,
0.2459663450717926,
0.052257418632507324,
-0.07995298504829407,
-0.11580429971218109,
0.5007699131965637,
0.21185414493083954,
-0.2190636843442917,
0.06501858681440353,
-0.17945225536823273,
-0.13480542600154877,
-0.21548759937286377,
-0.3458092510700226,
0.07493569701910019,
-0.17748430371284485,
0.009540729224681854,
0.1988716721534729,
-0.0286310575902462,
-0.5573023557662964,
-0.02405949868261814,
0.2607629895210266,
-0.21212983131408691,
-0.41751059889793396,
-0.07489936053752899,
-0.03479577600955963,
0.25590255856513977,
0.09693169593811035,
0.2685830593109131,
-0.08252419531345367,
0.10862882435321808,
0.09295614063739777,
-0.1604699343442917,
-0.17303380370140076,
-0.3231144845485687,
-0.414186030626297,
-0.12492036819458008,
-0.08002076297998428,
0.3220706582069397,
0.2157631516456604,
0.364542692899704,
-0.12114432454109192,
-0.3216427266597748,
-0.06946669518947601,
0.15855848789215088,
0.40738052129745483,
-0.41885167360305786,
0.07418370991945267,
0.37828388810157776,
0.2235562801361084,
0.10126703232526779,
-0.2628273665904999,
-0.31292927265167236,
0.2724955081939697,
0.47532257437705994,
0.5593694448471069,
0.0031737536191940308,
-0.34585222601890564,
0.4115963280200958,
-0.0033992240205407143,
0.025233488529920578,
0.2671125531196594,
-0.08941507339477539,
-0.05508891120553017,
0.01300307922065258,
-0.02714695781469345,
-0.11036625504493713,
0.2128148376941681,
-0.17453773319721222,
-0.2602201998233795,
0.1958460509777069,
-0.2029469609260559,
0.10354754328727722,
0.11760088801383972,
0.2261570692062378,
0.07893056422472,
0.2423708438873291,
-0.029693230986595154,
0.17400790750980377,
0.05362685024738312,
0.2244851440191269,
-0.4126131534576416,
-0.0021404698491096497,
0.23516064882278442,
-0.15842340886592865,
0.465029239654541,
0.36983221769332886,
0.04127531871199608,
0.07456815242767334,
-0.05713875591754913,
0.5412482619285583,
-0.16332264244556427,
0.11946132779121399,
0.40044546127319336,
0.249565988779068,
-0.15795303881168365,
-0.23462648689746857,
0.2528689503669739,
0.06221221014857292,
-0.3034294843673706,
0.5142508149147034,
-0.2793351411819458,
-0.3818325400352478,
0.4123767018318176,
-0.2737233638763428,
0.6523386836051941,
0.06447326391935349,
-0.04853685572743416,
0.0005215797573328018,
-0.12173175066709518,
-0.24826237559318542,
-0.09908682852983475,
0.20903225243091583,
-0.17135493457317352,
-0.07658403366804123,
0.09227123856544495,
-0.06306704878807068,
0.20011094212532043,
0.2793566584587097,
-0.3361169099807739,
0.3477395176887512,
0.09093597531318665,
0.18017956614494324,
0.012197993695735931,
-0.017111357301473618,
0.25025278329849243,
-0.44202741980552673,
0.19045329093933105,
0.07118696719408035,
0.059942543506622314,
0.15537084639072418,
0.23483788967132568,
-0.07894451916217804,
0.16361083090305328,
-0.2586476802825928,
-0.11141224950551987,
0.31956392526626587,
-0.5948038697242737,
0.21893659234046936,
-0.003616970032453537,
0.15469709038734436,
-0.018935957923531532,
0.21688969433307648,
-0.31638848781585693,
0.3416557013988495,
-0.032302580773830414,
0.16292545199394226,
0.48819267749786377,
0.4127606153488159,
0.04620308056473732,
-0.07049790024757385,
0.3014470636844635,
0.1497420370578766,
-0.43448102474212646,
0.10563533008098602,
-0.1434362679719925,
0.00023597478866577148,
0.027171581983566284,
0.18200242519378662,
0.2226783037185669,
-0.398468941450119,
0.09558211266994476,
0.21156005561351776,
0.0796956866979599,
-0.27658534049987793,
0.14879220724105835,
-0.11759985983371735,
-0.543903648853302,
0.4628024995326996,
-0.11079417169094086,
-0.3251749277114868,
-0.07013764977455139,
0.22892418503761292,
0.0541258305311203,
0.15496070683002472,
0.1630757600069046,
-0.29666057229042053,
-0.0668177455663681,
-0.3340549170970917,
0.04797040671110153,
-0.2513703405857086,
-0.10031284391880035,
-0.049852143973112106,
-0.08908279240131378,
-0.4859743118286133,
0.1018867939710617,
-0.06820586323738098,
-0.15005157887935638,
0.3670766055583954,
-0.3248286247253418,
-0.16470390558242798,
-0.24839484691619873,
0.014401160180568695,
-0.08318597078323364,
0.21436746418476105,
-0.01755165308713913,
0.504021942615509,
-0.0629345253109932,
0.3284987509250641,
-0.3257564604282379,
0.16056564450263977,
-0.1568152904510498,
0.5510051846504211,
0.017687635496258736,
-0.014450140297412872,
0.22639259696006775,
-0.2101595401763916,
0.3344842195510864,
-0.032172515988349915,
-0.05196317285299301,
-0.21500477194786072,
-0.2596544921398163,
0.04150862991809845,
-0.15244516730308533,
0.12930142879486084,
-0.005451378878206015,
0.050912387669086456,
-0.08703397214412689,
-0.30370068550109863,
0.25080570578575134,
0.25678640604019165,
0.04131368547677994,
0.3326075077056885,
0.12818585336208344,
-0.20600098371505737,
0.10973146557807922,
0.06716607511043549,
-0.14384639263153076,
0.07799366861581802,
-0.028121452778577805,
0.37634167075157166,
-0.31007120013237,
-0.08587974309921265,
-0.1243964433670044,
-0.16769665479660034,
-0.24506400525569916,
0.32462581992149353,
0.058014415204524994,
-0.07504592835903168,
-0.29225245118141174,
0.03259759768843651,
0.15538524091243744,
0.014781065285205841,
-0.20012415945529938,
-0.14050763845443726,
0.06405337899923325,
0.3192163407802582,
-0.12836477160453796,
-0.19685903191566467,
0.10340647399425507,
-0.10140302777290344,
0.3214143216609955,
0.33320483565330505,
-0.027051810175180435,
-0.05958006531000137,
0.06096623092889786,
0.025167450308799744,
-0.17862044274806976,
0.0012374911457300186,
0.21375703811645508,
0.4601646363735199,
-0.0497858040034771,
0.2265116572380066,
0.19300034642219543,
-0.18651577830314636,
0.05291198194026947,
0.40799301862716675,
0.310763955116272,
0.25682681798934937,
0.11297370493412018,
-0.03442032262682915,
0.20294208824634552,
-0.28229236602783203,
-0.06854802370071411,
-0.10118177533149719,
-0.4493275284767151,
0.44228899478912354,
0.07166857272386551,
0.23900911211967468,
-0.46801215410232544,
-0.2603045105934143,
0.15454180538654327,
0.29727140069007874,
-0.2952025830745697,
-0.31238648295402527,
0.2530469596385956,
-0.03883081302046776,
-0.10793136805295944,
0.07458749413490295,
0.2944087088108063,
0.3323732018470764,
1.0903174877166748,
0.08352614939212799,
-0.04952247440814972,
0.2520177960395813,
-0.27917739748954773,
0.1279905140399933,
0.43594688177108765,
-0.3676643967628479,
0.2873719036579132,
-0.0958402007818222,
0.05237992852926254,
-0.13823319971561432,
-0.014571288600564003,
0.19225464761257172,
-0.06302943080663681,
-0.11354230344295502,
-0.005356106907129288,
0.18581034243106842,
-0.10059932619333267,
0.04262508079409599,
-0.05115277320146561,
0.10882987082004547,
-0.03430810943245888,
0.2122490555047989,
0.17029805481433868,
-0.17734627425670624,
-0.17136986553668976,
0.3800872266292572,
0.27650800347328186,
-0.16090627014636993,
0.4408350884914398,
0.05458468198776245,
-0.3453039228916168,
-0.05800198018550873,
-0.14957910776138306,
-0.41530895233154297,
0.03746999055147171,
0.4576585292816162,
-0.27448761463165283,
0.4436611235141754,
0.1549864113330841,
0.08364976197481155,
0.06018122285604477,
0.09318214654922485,
-0.11356526613235474,
-0.10811255127191544,
-0.2506400942802429,
-0.160129576921463,
-0.1442069709300995,
-0.15930038690567017,
-0.04033207520842552,
-0.06357679516077042,
-0.10788846760988235,
0.18283849954605103,
0.05919302999973297,
-0.1662236452102661,
0.15260788798332214,
-0.23858852684497833,
0.3655456602573395,
0.39302095770835876,
-0.5613917708396912,
-0.029050443321466446,
-0.15241065621376038,
0.10538975149393082,
0.4545228183269501,
-0.6810575127601624,
0.05485020577907562,
0.08395519852638245,
0.08062262088060379,
-0.04513663798570633,
-0.05469328910112381,
0.21007615327835083,
0.03841812536120415,
0.29791635274887085,
0.004547294229269028,
0.18285202980041504,
-0.44572004675865173,
-0.11970687657594681,
-0.016377795487642288,
0.07530153542757034,
-0.058623164892196655,
-0.20186102390289307,
0.19868972897529602,
0.3921845853328705,
-0.02594776824116707,
0.1912880688905716,
-0.2520635426044464,
0.08724585920572281,
0.14274846017360687,
0.07628068327903748,
-0.2156534194946289,
0.1325942724943161,
0.010182082653045654,
0.12023480236530304,
0.014796930365264416,
0.4529857039451599,
-0.15637372434139252,
0.23479200899600983,
-0.1359851360321045,
-0.4163438677787781,
0.6493303775787354,
0.05638108402490616,
-0.36834919452667236,
-0.26599088311195374,
0.5468186140060425,
-0.27326640486717224,
0.04149722680449486,
-0.5601429343223572,
-0.2209298312664032,
0.3590868413448334,
-0.1025194451212883,
-0.6033435463905334,
0.023712752386927605,
-0.05007660388946533,
-0.11060639470815659,
0.06052839383482933,
0.321514368057251,
0.20186775922775269,
-0.36171600222587585,
0.2860020101070404,
0.016084767878055573
] |
https://github.com/huggingface/datasets/issues/5965
|
"Couldn't cast array of type" in complex datasets
|
Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution.
|
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
| 61
|
"Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution.
|
[
-0.39829856157302856,
-0.05690281093120575,
-0.040337610989809036,
0.17765285074710846,
0.4318234324455261,
0.22664892673492432,
0.3325989246368408,
0.331497460603714,
0.37672656774520874,
-0.01937851309776306,
0.023040397092700005,
0.34318873286247253,
-0.15088239312171936,
0.024865319952368736,
0.0309312604367733,
-0.08824318647384644,
0.14028768241405487,
0.19609183073043823,
-0.2151281237602234,
-0.037983208894729614,
-0.22037768363952637,
-0.06677935272455215,
-0.38688528537750244,
-0.01987341046333313,
0.08640698343515396,
-0.33641114830970764,
-0.14185680449008942,
-0.12421461194753647,
-0.10955864936113358,
-0.3847692310810089,
0.3289000391960144,
-0.3240497410297394,
0.15686482191085815,
0.29766950011253357,
-0.00011155124957440421,
0.15764421224594116,
0.3483610153198242,
0.03217858076095581,
-0.18421407043933868,
-0.12119774520397186,
-0.3748067021369934,
-0.22268882393836975,
-0.15669173002243042,
-0.30277493596076965,
0.0871158018708229,
-0.07472161948680878,
-0.04051624983549118,
-0.3684496581554413,
-0.1689341515302658,
0.177866131067276,
0.18865817785263062,
0.49822595715522766,
0.0013314709067344666,
-0.18427933752536774,
0.1527513861656189,
0.06477800756692886,
-0.19486726820468903,
-0.122675821185112,
0.3001415729522705,
0.15865197777748108,
0.04994955286383629,
-0.0008361175423488021,
-0.4528651237487793,
-0.21816283464431763,
0.13382568955421448,
-0.043922945857048035,
0.27628934383392334,
-0.29041504859924316,
-0.16900134086608887,
0.12227422744035721,
0.3683265447616577,
-0.26357120275497437,
-0.2773510813713074,
-0.2502697706222534,
-0.1747446358203888,
0.09625454246997833,
-0.047291114926338196,
0.04677432030439377,
0.02491242066025734,
0.1941065937280655,
-0.3556506931781769,
0.31640660762786865,
0.10978043079376221,
0.22104138135910034,
-0.0005163624882698059,
0.01565808802843094,
0.09858246892690659,
0.17983639240264893,
-0.09532909095287323,
-0.22516264021396637,
0.16425886750221252,
-0.5122120976448059,
-0.09868550300598145,
0.29808568954467773,
-0.08567574620246887,
-0.11584600806236267,
0.22477561235427856,
0.008556723594665527,
0.2393513321876526,
-0.17544078826904297,
0.03513961657881737,
0.004304124042391777,
0.07433370500802994,
0.18096256256103516,
0.5464468002319336,
0.10346768796443939,
0.038617365062236786,
0.013715456239879131,
0.022139843553304672,
-0.12523002922534943,
-0.01890295371413231,
0.027756813913583755,
0.042470455169677734,
-0.02523684874176979,
0.19580963253974915,
0.12534521520137787,
0.28559136390686035,
-0.01752607524394989,
-0.21408160030841827,
0.14586293697357178,
-0.4794706702232361,
0.1987740844488144,
0.21111494302749634,
0.25706085562705994,
0.04072050005197525,
0.3958664834499359,
0.04163499176502228,
0.1814594715833664,
-0.050427839159965515,
-0.23049677908420563,
-0.20012012124061584,
-0.18854671716690063,
-0.31509333848953247,
-0.3272949159145355,
0.04260461404919624,
0.1447654366493225,
0.06247816979885101,
0.14164116978645325,
-0.22406388819217682,
0.08633247017860413,
-0.10320786386728287,
-0.16692788898944855,
0.2768692672252655,
0.3331473767757416,
0.2218860685825348,
0.29027092456817627,
0.24772751331329346,
-0.06066577136516571,
-0.1569901704788208,
0.36035093665122986,
-0.18982601165771484,
-0.19694112241268158,
-0.04336221516132355,
0.18081513047218323,
-0.2734301686286926,
0.07437364757061005,
-0.7257795333862305,
0.03204686567187309,
0.4068141281604767,
-0.26759153604507446,
0.03590213507413864,
-0.3142436742782593,
0.18733860552310944,
-0.36399412155151367,
-0.04399935156106949,
0.18830569088459015,
-0.22907742857933044,
0.16144736111164093,
-0.22987106442451477,
-0.11316461861133575,
0.08068522810935974,
0.45653942227363586,
-0.15648844838142395,
0.41344091296195984,
-0.3676363527774811,
0.46825820207595825,
0.2069474160671234,
0.05799561366438866,
-0.22534018754959106,
0.21765801310539246,
0.2775035500526428,
0.17585895955562592,
-0.19049936532974243,
0.20879989862442017,
0.30955228209495544,
-0.34630948305130005,
-0.15015265345573425,
0.32662105560302734,
-0.3492157459259033,
0.23000025749206543,
-0.3290558159351349,
-0.07702218741178513,
0.2706645727157593,
-0.054391853511333466,
0.1969929337501526,
0.3359840214252472,
0.05667370185256004,
0.021988194435834885,
0.220619797706604,
-0.2835448682308197,
0.2941349446773529,
0.05711395666003227,
0.35328757762908936,
0.05356033518910408,
0.0018460322171449661,
-0.3505328595638275,
-0.5408240556716919,
0.19890806078910828,
-0.06351973861455917,
0.09549211710691452,
-0.07192057371139526,
-0.1694038361310959,
-0.06845704466104507,
0.1443493515253067,
-0.0926862359046936,
0.3304097354412079,
0.1288316696882248,
-0.060203611850738525,
-0.025531938299536705,
-0.12558768689632416,
-0.03622164577245712,
-0.17406895756721497,
-0.1351388394832611,
-0.1767246425151825,
-0.26409465074539185,
0.2201033979654312,
-0.1886913776397705,
-0.22206874191761017,
-0.2813766300678253,
0.048333555459976196,
0.21039673686027527,
-0.0340828113257885,
0.008475293405354023,
0.22081619501113892,
-0.0831625908613205,
-0.1552075296640396,
-0.23698660731315613,
0.24950248003005981,
-0.16290920972824097,
-0.3530404269695282,
-0.11512971669435501,
0.2624945640563965,
0.31696584820747375,
-0.1625695824623108,
0.025055766105651855,
0.3321640193462372,
0.01520371064543724,
0.21822670102119446,
-0.23309223353862762,
0.20974811911582947,
0.32370898127555847,
-0.043808359652757645,
-0.02371923066675663,
-0.1645180881023407,
-0.11386571824550629,
0.002190912142395973,
0.05366935953497887,
0.12204889953136444,
-0.25387680530548096,
0.04448116198182106,
0.31824392080307007,
-0.19456587731838226,
0.23211777210235596,
-0.03633126616477966,
-0.0012290775775909424,
0.06682416796684265,
0.10088973492383957,
-0.04176848381757736,
0.266743004322052,
0.1249142736196518,
-0.09167824685573578,
-0.027591491118073463,
-0.06430044025182724,
0.11516508460044861,
0.3590777516365051,
0.05846422165632248,
0.34441429376602173,
-0.07579142600297928,
0.10292518138885498,
0.10597547143697739,
-0.06792384386062622,
-0.24811924993991852,
0.20804095268249512,
0.28620052337646484,
-0.46038442850112915,
0.06866522133350372,
-0.2398957461118698,
0.008067712187767029,
-0.04891367629170418,
0.015596059150993824,
0.07336444407701492,
-0.4356675148010254,
-0.22127725183963776,
0.38239923119544983,
-0.38697949051856995,
0.2557777464389801,
-0.21470969915390015,
0.09878433495759964,
0.15207144618034363,
-0.1782214641571045,
-0.3967110216617584,
-0.08081910014152527,
-0.08192047476768494,
0.044528115540742874,
0.5053490996360779,
-0.14654318988323212,
0.16515478491783142,
0.09142148494720459,
-0.03493849188089371,
-0.24271011352539062,
-0.2758491635322571,
0.026503026485443115,
-0.28776758909225464,
0.06291734427213669,
0.33538705110549927,
0.38200855255126953,
-0.0820973813533783,
-0.1669585108757019,
0.3018408417701721,
-0.3575623035430908,
-0.3748187720775604,
0.28967323899269104,
-0.11657322943210602,
-0.38777491450309753,
-0.3113287687301636,
-0.12563616037368774,
-0.18468070030212402,
-0.34019410610198975,
0.004580020904541016,
-0.3655582368373871,
-0.06664705276489258,
0.2010810673236847,
0.3499711751937866,
0.008739852346479893,
0.006137544754892588,
-0.3053700923919678,
-0.11062327772378922,
0.17287525534629822,
0.3398241698741913,
-0.0482315830886364,
-0.2551822364330292,
-0.003136198967695236,
-0.23245343565940857,
0.048346634954214096,
0.19947384297847748,
-0.2912505865097046,
0.3903254270553589,
-0.2001623809337616,
0.3545478582382202,
0.09132114797830582,
-0.057698629796504974,
0.3053610026836395,
0.2211555540561676,
0.001810602843761444,
-0.39140835404396057,
-0.08785863220691681,
-0.03662153333425522,
0.04625002667307854,
0.20696544647216797,
0.059424933046102524,
0.4329226016998291,
0.17165309190750122,
0.3451789617538452,
0.1391524225473404,
-0.25616395473480225,
0.29667526483535767,
-0.0959087610244751,
0.2411743551492691,
-0.21568423509597778,
-0.20542454719543457,
-0.044698528945446014,
-0.03260385990142822,
-0.2861633896827698,
-0.03020934760570526,
-0.3380993604660034,
-0.6134923100471497,
0.2439168095588684,
0.07117779552936554,
-0.2568027377128601,
-0.20462891459465027,
0.37333962321281433,
-0.25057142972946167,
0.12049917876720428,
0.13774016499519348,
-0.06091148406267166,
-0.2960359454154968,
-0.07747770100831985,
-0.00570084061473608,
-0.13155250251293182,
0.07353711873292923,
0.03619389608502388,
-0.2893300950527191,
-0.20725537836551666,
-0.05393975228071213,
0.2796344757080078,
0.2037462592124939,
0.3863846957683563,
0.03142351284623146,
-0.04342440515756607,
-0.11047378182411194,
0.08160234987735748,
0.792138397693634,
-0.3929842412471771,
0.14109620451927185,
0.22596684098243713,
0.327808141708374,
-0.36489152908325195,
-0.033878080546855927,
-0.16061162948608398,
0.373187780380249,
0.26526397466659546,
0.14528363943099976,
-0.3496638238430023,
0.14138458669185638,
-0.04340273141860962,
0.16774135828018188,
-0.02019389718770981,
0.044266071170568466,
-0.04156539589166641,
-0.400116890668869,
-0.10157012194395065,
0.051873140037059784,
0.5569095015525818,
0.2200360745191574,
-0.02116263471543789,
-0.047939807176589966,
-0.44753846526145935,
0.23431041836738586,
0.033686988055706024,
0.06676925718784332,
0.4606054723262787,
-0.07812348753213882,
0.3306143879890442,
-0.43427786231040955,
-0.005042277276515961,
0.4487892985343933,
0.50282222032547,
0.0015916377305984497,
-0.09510783851146698,
0.21875354647636414,
0.013008198700845242,
0.31096982955932617,
0.05222181975841522,
-0.036374568939208984,
-0.06927547603845596,
0.2546388506889343,
0.1681663542985916,
-0.07594183832406998,
-0.1530851572751999,
0.2868949770927429,
0.05230025202035904,
-0.529055655002594,
-0.43938037753105164,
0.2639966607093811,
0.09885531663894653,
-0.03807084634900093,
0.10122644901275635,
0.02065456658601761,
-0.3764946460723877,
0.6231353282928467,
0.2331877052783966,
0.8570380806922913,
-0.1399153769016266,
0.11338192224502563,
0.4347051978111267,
0.2037355750799179,
0.18643461167812347,
0.2927526831626892,
0.08603677898645401,
-0.4036330282688141,
0.18585330247879028,
-0.009298823773860931,
-0.07320262491703033,
0.1531982272863388,
0.3547825217247009,
-0.305213987827301,
-0.04297669231891632,
-0.03547229617834091,
0.49276959896087646,
0.09732769429683685,
-0.11662930995225906,
-0.0657874345779419,
-0.21919870376586914,
-0.4653315544128418,
0.18437454104423523,
0.10790417343378067,
-0.15328891575336456,
-0.024000922217965126,
-0.2926144599914551,
-0.18924853205680847,
-0.12670740485191345,
-0.2633209228515625,
0.12289243191480637,
-0.1371711790561676,
0.263582319021225,
0.19767799973487854,
-0.04010053351521492,
0.1867106407880783,
0.28177571296691895,
-0.01191159337759018,
0.05887264758348465,
-0.06841890513896942,
0.04976779222488403,
0.2763684391975403,
0.1378067433834076,
0.17823539674282074,
-0.15542754530906677,
0.3335951566696167,
0.10342986136674881,
-0.11654132604598999,
-0.042431846261024475,
-0.2606748342514038,
-0.1693628430366516,
-0.05391307920217514,
0.19822297990322113,
-0.033605076372623444,
-0.5134415030479431,
-0.43101346492767334,
-0.057668209075927734,
0.10860870778560638,
-0.02418784238398075,
0.10693781077861786,
0.07315196096897125,
-0.06758025288581848,
0.5152413249015808,
-0.22721008956432343,
-0.05744779482483864,
0.1199541836977005,
0.2368396818637848,
0.13043466210365295,
0.11298224329948425,
0.2691708207130432,
0.0787450522184372,
-0.14622491598129272,
-0.18547704815864563,
0.2280760109424591,
0.17025700211524963,
-0.6268267631530762,
0.28532421588897705,
-0.22607198357582092,
-0.2815150022506714,
0.12994372844696045,
0.5647780895233154,
-0.038800954818725586,
0.14722026884555817,
-0.2866947054862976,
-0.2581216096878052,
-0.14387038350105286,
0.3203583061695099,
0.14955173432826996,
0.3118206560611725,
0.17409491539001465,
0.39109739661216736,
-0.08497420698404312,
-0.3364953398704529,
-0.3306781053543091,
-0.0837010070681572,
-0.365336149930954,
0.3747389018535614,
-0.3797127306461334,
0.08809368312358856,
0.13554508984088898,
-0.2086505889892578,
0.10214774310588837,
0.09957760572433472,
-0.11996559798717499,
-0.18154257535934448,
-0.0615788996219635,
0.10408514738082886,
0.19200953841209412,
0.02446703612804413,
0.12907586991786957,
-0.22664038836956024,
-0.1761983036994934,
-0.27655136585235596,
-0.012406609952449799,
0.34281232953071594,
-0.08613285422325134,
-0.05197862908244133,
0.27730146050453186,
0.014349013566970825,
-0.20551586151123047,
0.19514787197113037,
-0.17365822196006775,
-0.19878961145877838,
-0.08971785008907318,
0.27877452969551086,
-0.004116197116672993,
0.048512473702430725,
0.18986646831035614,
0.193305104970932,
0.13979625701904297,
0.16200345754623413,
0.6201664805412292,
-0.24607299268245697,
0.00696384534239769,
0.4891505539417267,
0.32078486680984497,
-0.10628724098205566,
-0.2443944811820984,
-0.09618725627660751,
0.06621992588043213,
0.22077928483486176,
-0.26681071519851685,
0.07451457530260086,
0.21162424981594086,
0.06335461139678955,
0.11466528475284576,
0.3049682676792145,
0.0313422791659832,
-0.2254927158355713,
0.1102089136838913,
-0.03560420125722885,
0.804750919342041,
-0.1278129518032074,
0.14419610798358917,
0.38589808344841003,
-0.0395449660718441,
0.13774161040782928,
0.09140100330114365,
-0.0014338232576847076,
0.2678656280040741,
0.5077896118164062,
0.04669534042477608,
0.1312389373779297,
0.14515790343284607,
0.021943703293800354,
0.05296779423952103,
-0.3793632388114929,
0.1870870441198349,
0.15021765232086182,
0.03760892152786255,
0.26007676124572754,
0.06966695934534073,
0.11003506183624268,
-0.2679762542247772,
-0.35349828004837036,
-0.03343019634485245,
0.13536812365055084,
-0.41471847891807556,
0.12655116617679596,
-0.4492887556552887,
-0.07004901021718979,
0.17844432592391968,
-0.3434998691082001,
-0.06520454585552216,
-0.17704029381275177,
0.4230143427848816,
0.051995884627103806,
0.038147248327732086,
-0.14747844636440277,
-0.18330174684524536,
0.19445040822029114,
0.1903473138809204,
-0.1914134919643402,
0.24775587022304535,
0.038167111575603485,
-0.2569957375526428,
0.05387631803750992,
0.5058435201644897,
0.6003218293190002,
0.4666292369365692,
0.14306947588920593,
0.16333343088626862,
0.08396881818771362,
-0.22584444284439087,
-0.28061655163764954,
0.07999657094478607,
0.05009530857205391,
0.10744671523571014,
0.15271341800689697,
0.15234297513961792,
-0.08534329384565353,
0.06984985619783401,
-0.01818084344267845,
0.30279141664505005,
0.17889155447483063,
0.20201316475868225,
-0.2385694980621338,
-0.2385910451412201,
-0.09789779782295227,
-0.09667211025953293,
-0.2160969376564026,
-0.34657391905784607,
0.48196977376937866,
-0.24431082606315613,
0.3231811821460724,
0.012395991012454033,
0.08470509201288223,
0.14766475558280945,
0.2906342148780823,
0.32467785477638245,
0.0026641227304935455,
-0.33292508125305176,
0.10363005101680756,
-0.43882307410240173,
0.13640081882476807,
-0.3335765302181244,
0.00499689020216465,
0.1872585266828537,
0.24207372963428497,
0.07708410918712616,
-0.12526154518127441,
0.09895537048578262,
0.03835003450512886,
-0.11781858652830124,
0.4823518395423889,
-0.09766285866498947,
-0.28049302101135254,
-0.12634605169296265,
-0.049829013645648956,
0.036445192992687225,
-0.4797927439212799,
0.12275055050849915,
0.06383182108402252,
0.16820243000984192,
-0.060948118567466736,
-0.005656767636537552,
0.025599230080842972,
-0.18348734080791473,
0.24833491444587708,
0.17448751628398895,
0.29592716693878174,
-0.1202162504196167,
-0.2224522978067398,
-0.28519102931022644,
-0.3099723160266876,
-0.26038408279418945,
0.1898776888847351,
-0.0645829290151596,
0.3302709758281708,
-0.3455325663089752,
0.3046523928642273,
-0.11808399856090546,
-0.28710201382637024,
0.1869746446609497,
0.22342659533023834,
-0.37496206164360046,
0.45886287093162537,
-0.6828259825706482,
0.27155932784080505,
-0.01353752613067627,
0.1975957751274109,
0.05755962058901787,
0.2869754731655121,
-0.2332383394241333,
-0.48941174149513245,
0.511699914932251,
-0.469948947429657,
-0.322108656167984,
0.019145410507917404,
-0.14117580652236938,
-0.43066924810409546,
-0.09834592044353485,
-0.48194146156311035,
-0.36862415075302124,
0.19970957934856415,
-0.06769171357154846,
-0.17573560774326324,
-0.14477182924747467,
0.0006740661337971687,
0.058768171817064285,
-0.20465542376041412,
0.26146072149276733,
0.04153286665678024,
-0.29364845156669617,
0.17603722214698792,
-0.3045952320098877
] |
https://github.com/huggingface/datasets/issues/5965
|
"Couldn't cast array of type" in complex datasets
|
Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way.
|
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
| 61
|
"Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way.
|
[
-0.39829856157302856,
-0.05690281093120575,
-0.040337610989809036,
0.17765285074710846,
0.4318234324455261,
0.22664892673492432,
0.3325989246368408,
0.331497460603714,
0.37672656774520874,
-0.01937851309776306,
0.023040397092700005,
0.34318873286247253,
-0.15088239312171936,
0.024865319952368736,
0.0309312604367733,
-0.08824318647384644,
0.14028768241405487,
0.19609183073043823,
-0.2151281237602234,
-0.037983208894729614,
-0.22037768363952637,
-0.06677935272455215,
-0.38688528537750244,
-0.01987341046333313,
0.08640698343515396,
-0.33641114830970764,
-0.14185680449008942,
-0.12421461194753647,
-0.10955864936113358,
-0.3847692310810089,
0.3289000391960144,
-0.3240497410297394,
0.15686482191085815,
0.29766950011253357,
-0.00011155124957440421,
0.15764421224594116,
0.3483610153198242,
0.03217858076095581,
-0.18421407043933868,
-0.12119774520397186,
-0.3748067021369934,
-0.22268882393836975,
-0.15669173002243042,
-0.30277493596076965,
0.0871158018708229,
-0.07472161948680878,
-0.04051624983549118,
-0.3684496581554413,
-0.1689341515302658,
0.177866131067276,
0.18865817785263062,
0.49822595715522766,
0.0013314709067344666,
-0.18427933752536774,
0.1527513861656189,
0.06477800756692886,
-0.19486726820468903,
-0.122675821185112,
0.3001415729522705,
0.15865197777748108,
0.04994955286383629,
-0.0008361175423488021,
-0.4528651237487793,
-0.21816283464431763,
0.13382568955421448,
-0.043922945857048035,
0.27628934383392334,
-0.29041504859924316,
-0.16900134086608887,
0.12227422744035721,
0.3683265447616577,
-0.26357120275497437,
-0.2773510813713074,
-0.2502697706222534,
-0.1747446358203888,
0.09625454246997833,
-0.047291114926338196,
0.04677432030439377,
0.02491242066025734,
0.1941065937280655,
-0.3556506931781769,
0.31640660762786865,
0.10978043079376221,
0.22104138135910034,
-0.0005163624882698059,
0.01565808802843094,
0.09858246892690659,
0.17983639240264893,
-0.09532909095287323,
-0.22516264021396637,
0.16425886750221252,
-0.5122120976448059,
-0.09868550300598145,
0.29808568954467773,
-0.08567574620246887,
-0.11584600806236267,
0.22477561235427856,
0.008556723594665527,
0.2393513321876526,
-0.17544078826904297,
0.03513961657881737,
0.004304124042391777,
0.07433370500802994,
0.18096256256103516,
0.5464468002319336,
0.10346768796443939,
0.038617365062236786,
0.013715456239879131,
0.022139843553304672,
-0.12523002922534943,
-0.01890295371413231,
0.027756813913583755,
0.042470455169677734,
-0.02523684874176979,
0.19580963253974915,
0.12534521520137787,
0.28559136390686035,
-0.01752607524394989,
-0.21408160030841827,
0.14586293697357178,
-0.4794706702232361,
0.1987740844488144,
0.21111494302749634,
0.25706085562705994,
0.04072050005197525,
0.3958664834499359,
0.04163499176502228,
0.1814594715833664,
-0.050427839159965515,
-0.23049677908420563,
-0.20012012124061584,
-0.18854671716690063,
-0.31509333848953247,
-0.3272949159145355,
0.04260461404919624,
0.1447654366493225,
0.06247816979885101,
0.14164116978645325,
-0.22406388819217682,
0.08633247017860413,
-0.10320786386728287,
-0.16692788898944855,
0.2768692672252655,
0.3331473767757416,
0.2218860685825348,
0.29027092456817627,
0.24772751331329346,
-0.06066577136516571,
-0.1569901704788208,
0.36035093665122986,
-0.18982601165771484,
-0.19694112241268158,
-0.04336221516132355,
0.18081513047218323,
-0.2734301686286926,
0.07437364757061005,
-0.7257795333862305,
0.03204686567187309,
0.4068141281604767,
-0.26759153604507446,
0.03590213507413864,
-0.3142436742782593,
0.18733860552310944,
-0.36399412155151367,
-0.04399935156106949,
0.18830569088459015,
-0.22907742857933044,
0.16144736111164093,
-0.22987106442451477,
-0.11316461861133575,
0.08068522810935974,
0.45653942227363586,
-0.15648844838142395,
0.41344091296195984,
-0.3676363527774811,
0.46825820207595825,
0.2069474160671234,
0.05799561366438866,
-0.22534018754959106,
0.21765801310539246,
0.2775035500526428,
0.17585895955562592,
-0.19049936532974243,
0.20879989862442017,
0.30955228209495544,
-0.34630948305130005,
-0.15015265345573425,
0.32662105560302734,
-0.3492157459259033,
0.23000025749206543,
-0.3290558159351349,
-0.07702218741178513,
0.2706645727157593,
-0.054391853511333466,
0.1969929337501526,
0.3359840214252472,
0.05667370185256004,
0.021988194435834885,
0.220619797706604,
-0.2835448682308197,
0.2941349446773529,
0.05711395666003227,
0.35328757762908936,
0.05356033518910408,
0.0018460322171449661,
-0.3505328595638275,
-0.5408240556716919,
0.19890806078910828,
-0.06351973861455917,
0.09549211710691452,
-0.07192057371139526,
-0.1694038361310959,
-0.06845704466104507,
0.1443493515253067,
-0.0926862359046936,
0.3304097354412079,
0.1288316696882248,
-0.060203611850738525,
-0.025531938299536705,
-0.12558768689632416,
-0.03622164577245712,
-0.17406895756721497,
-0.1351388394832611,
-0.1767246425151825,
-0.26409465074539185,
0.2201033979654312,
-0.1886913776397705,
-0.22206874191761017,
-0.2813766300678253,
0.048333555459976196,
0.21039673686027527,
-0.0340828113257885,
0.008475293405354023,
0.22081619501113892,
-0.0831625908613205,
-0.1552075296640396,
-0.23698660731315613,
0.24950248003005981,
-0.16290920972824097,
-0.3530404269695282,
-0.11512971669435501,
0.2624945640563965,
0.31696584820747375,
-0.1625695824623108,
0.025055766105651855,
0.3321640193462372,
0.01520371064543724,
0.21822670102119446,
-0.23309223353862762,
0.20974811911582947,
0.32370898127555847,
-0.043808359652757645,
-0.02371923066675663,
-0.1645180881023407,
-0.11386571824550629,
0.002190912142395973,
0.05366935953497887,
0.12204889953136444,
-0.25387680530548096,
0.04448116198182106,
0.31824392080307007,
-0.19456587731838226,
0.23211777210235596,
-0.03633126616477966,
-0.0012290775775909424,
0.06682416796684265,
0.10088973492383957,
-0.04176848381757736,
0.266743004322052,
0.1249142736196518,
-0.09167824685573578,
-0.027591491118073463,
-0.06430044025182724,
0.11516508460044861,
0.3590777516365051,
0.05846422165632248,
0.34441429376602173,
-0.07579142600297928,
0.10292518138885498,
0.10597547143697739,
-0.06792384386062622,
-0.24811924993991852,
0.20804095268249512,
0.28620052337646484,
-0.46038442850112915,
0.06866522133350372,
-0.2398957461118698,
0.008067712187767029,
-0.04891367629170418,
0.015596059150993824,
0.07336444407701492,
-0.4356675148010254,
-0.22127725183963776,
0.38239923119544983,
-0.38697949051856995,
0.2557777464389801,
-0.21470969915390015,
0.09878433495759964,
0.15207144618034363,
-0.1782214641571045,
-0.3967110216617584,
-0.08081910014152527,
-0.08192047476768494,
0.044528115540742874,
0.5053490996360779,
-0.14654318988323212,
0.16515478491783142,
0.09142148494720459,
-0.03493849188089371,
-0.24271011352539062,
-0.2758491635322571,
0.026503026485443115,
-0.28776758909225464,
0.06291734427213669,
0.33538705110549927,
0.38200855255126953,
-0.0820973813533783,
-0.1669585108757019,
0.3018408417701721,
-0.3575623035430908,
-0.3748187720775604,
0.28967323899269104,
-0.11657322943210602,
-0.38777491450309753,
-0.3113287687301636,
-0.12563616037368774,
-0.18468070030212402,
-0.34019410610198975,
0.004580020904541016,
-0.3655582368373871,
-0.06664705276489258,
0.2010810673236847,
0.3499711751937866,
0.008739852346479893,
0.006137544754892588,
-0.3053700923919678,
-0.11062327772378922,
0.17287525534629822,
0.3398241698741913,
-0.0482315830886364,
-0.2551822364330292,
-0.003136198967695236,
-0.23245343565940857,
0.048346634954214096,
0.19947384297847748,
-0.2912505865097046,
0.3903254270553589,
-0.2001623809337616,
0.3545478582382202,
0.09132114797830582,
-0.057698629796504974,
0.3053610026836395,
0.2211555540561676,
0.001810602843761444,
-0.39140835404396057,
-0.08785863220691681,
-0.03662153333425522,
0.04625002667307854,
0.20696544647216797,
0.059424933046102524,
0.4329226016998291,
0.17165309190750122,
0.3451789617538452,
0.1391524225473404,
-0.25616395473480225,
0.29667526483535767,
-0.0959087610244751,
0.2411743551492691,
-0.21568423509597778,
-0.20542454719543457,
-0.044698528945446014,
-0.03260385990142822,
-0.2861633896827698,
-0.03020934760570526,
-0.3380993604660034,
-0.6134923100471497,
0.2439168095588684,
0.07117779552936554,
-0.2568027377128601,
-0.20462891459465027,
0.37333962321281433,
-0.25057142972946167,
0.12049917876720428,
0.13774016499519348,
-0.06091148406267166,
-0.2960359454154968,
-0.07747770100831985,
-0.00570084061473608,
-0.13155250251293182,
0.07353711873292923,
0.03619389608502388,
-0.2893300950527191,
-0.20725537836551666,
-0.05393975228071213,
0.2796344757080078,
0.2037462592124939,
0.3863846957683563,
0.03142351284623146,
-0.04342440515756607,
-0.11047378182411194,
0.08160234987735748,
0.792138397693634,
-0.3929842412471771,
0.14109620451927185,
0.22596684098243713,
0.327808141708374,
-0.36489152908325195,
-0.033878080546855927,
-0.16061162948608398,
0.373187780380249,
0.26526397466659546,
0.14528363943099976,
-0.3496638238430023,
0.14138458669185638,
-0.04340273141860962,
0.16774135828018188,
-0.02019389718770981,
0.044266071170568466,
-0.04156539589166641,
-0.400116890668869,
-0.10157012194395065,
0.051873140037059784,
0.5569095015525818,
0.2200360745191574,
-0.02116263471543789,
-0.047939807176589966,
-0.44753846526145935,
0.23431041836738586,
0.033686988055706024,
0.06676925718784332,
0.4606054723262787,
-0.07812348753213882,
0.3306143879890442,
-0.43427786231040955,
-0.005042277276515961,
0.4487892985343933,
0.50282222032547,
0.0015916377305984497,
-0.09510783851146698,
0.21875354647636414,
0.013008198700845242,
0.31096982955932617,
0.05222181975841522,
-0.036374568939208984,
-0.06927547603845596,
0.2546388506889343,
0.1681663542985916,
-0.07594183832406998,
-0.1530851572751999,
0.2868949770927429,
0.05230025202035904,
-0.529055655002594,
-0.43938037753105164,
0.2639966607093811,
0.09885531663894653,
-0.03807084634900093,
0.10122644901275635,
0.02065456658601761,
-0.3764946460723877,
0.6231353282928467,
0.2331877052783966,
0.8570380806922913,
-0.1399153769016266,
0.11338192224502563,
0.4347051978111267,
0.2037355750799179,
0.18643461167812347,
0.2927526831626892,
0.08603677898645401,
-0.4036330282688141,
0.18585330247879028,
-0.009298823773860931,
-0.07320262491703033,
0.1531982272863388,
0.3547825217247009,
-0.305213987827301,
-0.04297669231891632,
-0.03547229617834091,
0.49276959896087646,
0.09732769429683685,
-0.11662930995225906,
-0.0657874345779419,
-0.21919870376586914,
-0.4653315544128418,
0.18437454104423523,
0.10790417343378067,
-0.15328891575336456,
-0.024000922217965126,
-0.2926144599914551,
-0.18924853205680847,
-0.12670740485191345,
-0.2633209228515625,
0.12289243191480637,
-0.1371711790561676,
0.263582319021225,
0.19767799973487854,
-0.04010053351521492,
0.1867106407880783,
0.28177571296691895,
-0.01191159337759018,
0.05887264758348465,
-0.06841890513896942,
0.04976779222488403,
0.2763684391975403,
0.1378067433834076,
0.17823539674282074,
-0.15542754530906677,
0.3335951566696167,
0.10342986136674881,
-0.11654132604598999,
-0.042431846261024475,
-0.2606748342514038,
-0.1693628430366516,
-0.05391307920217514,
0.19822297990322113,
-0.033605076372623444,
-0.5134415030479431,
-0.43101346492767334,
-0.057668209075927734,
0.10860870778560638,
-0.02418784238398075,
0.10693781077861786,
0.07315196096897125,
-0.06758025288581848,
0.5152413249015808,
-0.22721008956432343,
-0.05744779482483864,
0.1199541836977005,
0.2368396818637848,
0.13043466210365295,
0.11298224329948425,
0.2691708207130432,
0.0787450522184372,
-0.14622491598129272,
-0.18547704815864563,
0.2280760109424591,
0.17025700211524963,
-0.6268267631530762,
0.28532421588897705,
-0.22607198357582092,
-0.2815150022506714,
0.12994372844696045,
0.5647780895233154,
-0.038800954818725586,
0.14722026884555817,
-0.2866947054862976,
-0.2581216096878052,
-0.14387038350105286,
0.3203583061695099,
0.14955173432826996,
0.3118206560611725,
0.17409491539001465,
0.39109739661216736,
-0.08497420698404312,
-0.3364953398704529,
-0.3306781053543091,
-0.0837010070681572,
-0.365336149930954,
0.3747389018535614,
-0.3797127306461334,
0.08809368312358856,
0.13554508984088898,
-0.2086505889892578,
0.10214774310588837,
0.09957760572433472,
-0.11996559798717499,
-0.18154257535934448,
-0.0615788996219635,
0.10408514738082886,
0.19200953841209412,
0.02446703612804413,
0.12907586991786957,
-0.22664038836956024,
-0.1761983036994934,
-0.27655136585235596,
-0.012406609952449799,
0.34281232953071594,
-0.08613285422325134,
-0.05197862908244133,
0.27730146050453186,
0.014349013566970825,
-0.20551586151123047,
0.19514787197113037,
-0.17365822196006775,
-0.19878961145877838,
-0.08971785008907318,
0.27877452969551086,
-0.004116197116672993,
0.048512473702430725,
0.18986646831035614,
0.193305104970932,
0.13979625701904297,
0.16200345754623413,
0.6201664805412292,
-0.24607299268245697,
0.00696384534239769,
0.4891505539417267,
0.32078486680984497,
-0.10628724098205566,
-0.2443944811820984,
-0.09618725627660751,
0.06621992588043213,
0.22077928483486176,
-0.26681071519851685,
0.07451457530260086,
0.21162424981594086,
0.06335461139678955,
0.11466528475284576,
0.3049682676792145,
0.0313422791659832,
-0.2254927158355713,
0.1102089136838913,
-0.03560420125722885,
0.804750919342041,
-0.1278129518032074,
0.14419610798358917,
0.38589808344841003,
-0.0395449660718441,
0.13774161040782928,
0.09140100330114365,
-0.0014338232576847076,
0.2678656280040741,
0.5077896118164062,
0.04669534042477608,
0.1312389373779297,
0.14515790343284607,
0.021943703293800354,
0.05296779423952103,
-0.3793632388114929,
0.1870870441198349,
0.15021765232086182,
0.03760892152786255,
0.26007676124572754,
0.06966695934534073,
0.11003506183624268,
-0.2679762542247772,
-0.35349828004837036,
-0.03343019634485245,
0.13536812365055084,
-0.41471847891807556,
0.12655116617679596,
-0.4492887556552887,
-0.07004901021718979,
0.17844432592391968,
-0.3434998691082001,
-0.06520454585552216,
-0.17704029381275177,
0.4230143427848816,
0.051995884627103806,
0.038147248327732086,
-0.14747844636440277,
-0.18330174684524536,
0.19445040822029114,
0.1903473138809204,
-0.1914134919643402,
0.24775587022304535,
0.038167111575603485,
-0.2569957375526428,
0.05387631803750992,
0.5058435201644897,
0.6003218293190002,
0.4666292369365692,
0.14306947588920593,
0.16333343088626862,
0.08396881818771362,
-0.22584444284439087,
-0.28061655163764954,
0.07999657094478607,
0.05009530857205391,
0.10744671523571014,
0.15271341800689697,
0.15234297513961792,
-0.08534329384565353,
0.06984985619783401,
-0.01818084344267845,
0.30279141664505005,
0.17889155447483063,
0.20201316475868225,
-0.2385694980621338,
-0.2385910451412201,
-0.09789779782295227,
-0.09667211025953293,
-0.2160969376564026,
-0.34657391905784607,
0.48196977376937866,
-0.24431082606315613,
0.3231811821460724,
0.012395991012454033,
0.08470509201288223,
0.14766475558280945,
0.2906342148780823,
0.32467785477638245,
0.0026641227304935455,
-0.33292508125305176,
0.10363005101680756,
-0.43882307410240173,
0.13640081882476807,
-0.3335765302181244,
0.00499689020216465,
0.1872585266828537,
0.24207372963428497,
0.07708410918712616,
-0.12526154518127441,
0.09895537048578262,
0.03835003450512886,
-0.11781858652830124,
0.4823518395423889,
-0.09766285866498947,
-0.28049302101135254,
-0.12634605169296265,
-0.049829013645648956,
0.036445192992687225,
-0.4797927439212799,
0.12275055050849915,
0.06383182108402252,
0.16820243000984192,
-0.060948118567466736,
-0.005656767636537552,
0.025599230080842972,
-0.18348734080791473,
0.24833491444587708,
0.17448751628398895,
0.29592716693878174,
-0.1202162504196167,
-0.2224522978067398,
-0.28519102931022644,
-0.3099723160266876,
-0.26038408279418945,
0.1898776888847351,
-0.0645829290151596,
0.3302709758281708,
-0.3455325663089752,
0.3046523928642273,
-0.11808399856090546,
-0.28710201382637024,
0.1869746446609497,
0.22342659533023834,
-0.37496206164360046,
0.45886287093162537,
-0.6828259825706482,
0.27155932784080505,
-0.01353752613067627,
0.1975957751274109,
0.05755962058901787,
0.2869754731655121,
-0.2332383394241333,
-0.48941174149513245,
0.511699914932251,
-0.469948947429657,
-0.322108656167984,
0.019145410507917404,
-0.14117580652236938,
-0.43066924810409546,
-0.09834592044353485,
-0.48194146156311035,
-0.36862415075302124,
0.19970957934856415,
-0.06769171357154846,
-0.17573560774326324,
-0.14477182924747467,
0.0006740661337971687,
0.058768171817064285,
-0.20465542376041412,
0.26146072149276733,
0.04153286665678024,
-0.29364845156669617,
0.17603722214698792,
-0.3045952320098877
] |
https://github.com/huggingface/datasets/issues/5965
|
"Couldn't cast array of type" in complex datasets
|
> . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails.
|
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
| 62
|
"Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
> . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails.
|
[
-0.39829856157302856,
-0.05690281093120575,
-0.040337610989809036,
0.17765285074710846,
0.4318234324455261,
0.22664892673492432,
0.3325989246368408,
0.331497460603714,
0.37672656774520874,
-0.01937851309776306,
0.023040397092700005,
0.34318873286247253,
-0.15088239312171936,
0.024865319952368736,
0.0309312604367733,
-0.08824318647384644,
0.14028768241405487,
0.19609183073043823,
-0.2151281237602234,
-0.037983208894729614,
-0.22037768363952637,
-0.06677935272455215,
-0.38688528537750244,
-0.01987341046333313,
0.08640698343515396,
-0.33641114830970764,
-0.14185680449008942,
-0.12421461194753647,
-0.10955864936113358,
-0.3847692310810089,
0.3289000391960144,
-0.3240497410297394,
0.15686482191085815,
0.29766950011253357,
-0.00011155124957440421,
0.15764421224594116,
0.3483610153198242,
0.03217858076095581,
-0.18421407043933868,
-0.12119774520397186,
-0.3748067021369934,
-0.22268882393836975,
-0.15669173002243042,
-0.30277493596076965,
0.0871158018708229,
-0.07472161948680878,
-0.04051624983549118,
-0.3684496581554413,
-0.1689341515302658,
0.177866131067276,
0.18865817785263062,
0.49822595715522766,
0.0013314709067344666,
-0.18427933752536774,
0.1527513861656189,
0.06477800756692886,
-0.19486726820468903,
-0.122675821185112,
0.3001415729522705,
0.15865197777748108,
0.04994955286383629,
-0.0008361175423488021,
-0.4528651237487793,
-0.21816283464431763,
0.13382568955421448,
-0.043922945857048035,
0.27628934383392334,
-0.29041504859924316,
-0.16900134086608887,
0.12227422744035721,
0.3683265447616577,
-0.26357120275497437,
-0.2773510813713074,
-0.2502697706222534,
-0.1747446358203888,
0.09625454246997833,
-0.047291114926338196,
0.04677432030439377,
0.02491242066025734,
0.1941065937280655,
-0.3556506931781769,
0.31640660762786865,
0.10978043079376221,
0.22104138135910034,
-0.0005163624882698059,
0.01565808802843094,
0.09858246892690659,
0.17983639240264893,
-0.09532909095287323,
-0.22516264021396637,
0.16425886750221252,
-0.5122120976448059,
-0.09868550300598145,
0.29808568954467773,
-0.08567574620246887,
-0.11584600806236267,
0.22477561235427856,
0.008556723594665527,
0.2393513321876526,
-0.17544078826904297,
0.03513961657881737,
0.004304124042391777,
0.07433370500802994,
0.18096256256103516,
0.5464468002319336,
0.10346768796443939,
0.038617365062236786,
0.013715456239879131,
0.022139843553304672,
-0.12523002922534943,
-0.01890295371413231,
0.027756813913583755,
0.042470455169677734,
-0.02523684874176979,
0.19580963253974915,
0.12534521520137787,
0.28559136390686035,
-0.01752607524394989,
-0.21408160030841827,
0.14586293697357178,
-0.4794706702232361,
0.1987740844488144,
0.21111494302749634,
0.25706085562705994,
0.04072050005197525,
0.3958664834499359,
0.04163499176502228,
0.1814594715833664,
-0.050427839159965515,
-0.23049677908420563,
-0.20012012124061584,
-0.18854671716690063,
-0.31509333848953247,
-0.3272949159145355,
0.04260461404919624,
0.1447654366493225,
0.06247816979885101,
0.14164116978645325,
-0.22406388819217682,
0.08633247017860413,
-0.10320786386728287,
-0.16692788898944855,
0.2768692672252655,
0.3331473767757416,
0.2218860685825348,
0.29027092456817627,
0.24772751331329346,
-0.06066577136516571,
-0.1569901704788208,
0.36035093665122986,
-0.18982601165771484,
-0.19694112241268158,
-0.04336221516132355,
0.18081513047218323,
-0.2734301686286926,
0.07437364757061005,
-0.7257795333862305,
0.03204686567187309,
0.4068141281604767,
-0.26759153604507446,
0.03590213507413864,
-0.3142436742782593,
0.18733860552310944,
-0.36399412155151367,
-0.04399935156106949,
0.18830569088459015,
-0.22907742857933044,
0.16144736111164093,
-0.22987106442451477,
-0.11316461861133575,
0.08068522810935974,
0.45653942227363586,
-0.15648844838142395,
0.41344091296195984,
-0.3676363527774811,
0.46825820207595825,
0.2069474160671234,
0.05799561366438866,
-0.22534018754959106,
0.21765801310539246,
0.2775035500526428,
0.17585895955562592,
-0.19049936532974243,
0.20879989862442017,
0.30955228209495544,
-0.34630948305130005,
-0.15015265345573425,
0.32662105560302734,
-0.3492157459259033,
0.23000025749206543,
-0.3290558159351349,
-0.07702218741178513,
0.2706645727157593,
-0.054391853511333466,
0.1969929337501526,
0.3359840214252472,
0.05667370185256004,
0.021988194435834885,
0.220619797706604,
-0.2835448682308197,
0.2941349446773529,
0.05711395666003227,
0.35328757762908936,
0.05356033518910408,
0.0018460322171449661,
-0.3505328595638275,
-0.5408240556716919,
0.19890806078910828,
-0.06351973861455917,
0.09549211710691452,
-0.07192057371139526,
-0.1694038361310959,
-0.06845704466104507,
0.1443493515253067,
-0.0926862359046936,
0.3304097354412079,
0.1288316696882248,
-0.060203611850738525,
-0.025531938299536705,
-0.12558768689632416,
-0.03622164577245712,
-0.17406895756721497,
-0.1351388394832611,
-0.1767246425151825,
-0.26409465074539185,
0.2201033979654312,
-0.1886913776397705,
-0.22206874191761017,
-0.2813766300678253,
0.048333555459976196,
0.21039673686027527,
-0.0340828113257885,
0.008475293405354023,
0.22081619501113892,
-0.0831625908613205,
-0.1552075296640396,
-0.23698660731315613,
0.24950248003005981,
-0.16290920972824097,
-0.3530404269695282,
-0.11512971669435501,
0.2624945640563965,
0.31696584820747375,
-0.1625695824623108,
0.025055766105651855,
0.3321640193462372,
0.01520371064543724,
0.21822670102119446,
-0.23309223353862762,
0.20974811911582947,
0.32370898127555847,
-0.043808359652757645,
-0.02371923066675663,
-0.1645180881023407,
-0.11386571824550629,
0.002190912142395973,
0.05366935953497887,
0.12204889953136444,
-0.25387680530548096,
0.04448116198182106,
0.31824392080307007,
-0.19456587731838226,
0.23211777210235596,
-0.03633126616477966,
-0.0012290775775909424,
0.06682416796684265,
0.10088973492383957,
-0.04176848381757736,
0.266743004322052,
0.1249142736196518,
-0.09167824685573578,
-0.027591491118073463,
-0.06430044025182724,
0.11516508460044861,
0.3590777516365051,
0.05846422165632248,
0.34441429376602173,
-0.07579142600297928,
0.10292518138885498,
0.10597547143697739,
-0.06792384386062622,
-0.24811924993991852,
0.20804095268249512,
0.28620052337646484,
-0.46038442850112915,
0.06866522133350372,
-0.2398957461118698,
0.008067712187767029,
-0.04891367629170418,
0.015596059150993824,
0.07336444407701492,
-0.4356675148010254,
-0.22127725183963776,
0.38239923119544983,
-0.38697949051856995,
0.2557777464389801,
-0.21470969915390015,
0.09878433495759964,
0.15207144618034363,
-0.1782214641571045,
-0.3967110216617584,
-0.08081910014152527,
-0.08192047476768494,
0.044528115540742874,
0.5053490996360779,
-0.14654318988323212,
0.16515478491783142,
0.09142148494720459,
-0.03493849188089371,
-0.24271011352539062,
-0.2758491635322571,
0.026503026485443115,
-0.28776758909225464,
0.06291734427213669,
0.33538705110549927,
0.38200855255126953,
-0.0820973813533783,
-0.1669585108757019,
0.3018408417701721,
-0.3575623035430908,
-0.3748187720775604,
0.28967323899269104,
-0.11657322943210602,
-0.38777491450309753,
-0.3113287687301636,
-0.12563616037368774,
-0.18468070030212402,
-0.34019410610198975,
0.004580020904541016,
-0.3655582368373871,
-0.06664705276489258,
0.2010810673236847,
0.3499711751937866,
0.008739852346479893,
0.006137544754892588,
-0.3053700923919678,
-0.11062327772378922,
0.17287525534629822,
0.3398241698741913,
-0.0482315830886364,
-0.2551822364330292,
-0.003136198967695236,
-0.23245343565940857,
0.048346634954214096,
0.19947384297847748,
-0.2912505865097046,
0.3903254270553589,
-0.2001623809337616,
0.3545478582382202,
0.09132114797830582,
-0.057698629796504974,
0.3053610026836395,
0.2211555540561676,
0.001810602843761444,
-0.39140835404396057,
-0.08785863220691681,
-0.03662153333425522,
0.04625002667307854,
0.20696544647216797,
0.059424933046102524,
0.4329226016998291,
0.17165309190750122,
0.3451789617538452,
0.1391524225473404,
-0.25616395473480225,
0.29667526483535767,
-0.0959087610244751,
0.2411743551492691,
-0.21568423509597778,
-0.20542454719543457,
-0.044698528945446014,
-0.03260385990142822,
-0.2861633896827698,
-0.03020934760570526,
-0.3380993604660034,
-0.6134923100471497,
0.2439168095588684,
0.07117779552936554,
-0.2568027377128601,
-0.20462891459465027,
0.37333962321281433,
-0.25057142972946167,
0.12049917876720428,
0.13774016499519348,
-0.06091148406267166,
-0.2960359454154968,
-0.07747770100831985,
-0.00570084061473608,
-0.13155250251293182,
0.07353711873292923,
0.03619389608502388,
-0.2893300950527191,
-0.20725537836551666,
-0.05393975228071213,
0.2796344757080078,
0.2037462592124939,
0.3863846957683563,
0.03142351284623146,
-0.04342440515756607,
-0.11047378182411194,
0.08160234987735748,
0.792138397693634,
-0.3929842412471771,
0.14109620451927185,
0.22596684098243713,
0.327808141708374,
-0.36489152908325195,
-0.033878080546855927,
-0.16061162948608398,
0.373187780380249,
0.26526397466659546,
0.14528363943099976,
-0.3496638238430023,
0.14138458669185638,
-0.04340273141860962,
0.16774135828018188,
-0.02019389718770981,
0.044266071170568466,
-0.04156539589166641,
-0.400116890668869,
-0.10157012194395065,
0.051873140037059784,
0.5569095015525818,
0.2200360745191574,
-0.02116263471543789,
-0.047939807176589966,
-0.44753846526145935,
0.23431041836738586,
0.033686988055706024,
0.06676925718784332,
0.4606054723262787,
-0.07812348753213882,
0.3306143879890442,
-0.43427786231040955,
-0.005042277276515961,
0.4487892985343933,
0.50282222032547,
0.0015916377305984497,
-0.09510783851146698,
0.21875354647636414,
0.013008198700845242,
0.31096982955932617,
0.05222181975841522,
-0.036374568939208984,
-0.06927547603845596,
0.2546388506889343,
0.1681663542985916,
-0.07594183832406998,
-0.1530851572751999,
0.2868949770927429,
0.05230025202035904,
-0.529055655002594,
-0.43938037753105164,
0.2639966607093811,
0.09885531663894653,
-0.03807084634900093,
0.10122644901275635,
0.02065456658601761,
-0.3764946460723877,
0.6231353282928467,
0.2331877052783966,
0.8570380806922913,
-0.1399153769016266,
0.11338192224502563,
0.4347051978111267,
0.2037355750799179,
0.18643461167812347,
0.2927526831626892,
0.08603677898645401,
-0.4036330282688141,
0.18585330247879028,
-0.009298823773860931,
-0.07320262491703033,
0.1531982272863388,
0.3547825217247009,
-0.305213987827301,
-0.04297669231891632,
-0.03547229617834091,
0.49276959896087646,
0.09732769429683685,
-0.11662930995225906,
-0.0657874345779419,
-0.21919870376586914,
-0.4653315544128418,
0.18437454104423523,
0.10790417343378067,
-0.15328891575336456,
-0.024000922217965126,
-0.2926144599914551,
-0.18924853205680847,
-0.12670740485191345,
-0.2633209228515625,
0.12289243191480637,
-0.1371711790561676,
0.263582319021225,
0.19767799973487854,
-0.04010053351521492,
0.1867106407880783,
0.28177571296691895,
-0.01191159337759018,
0.05887264758348465,
-0.06841890513896942,
0.04976779222488403,
0.2763684391975403,
0.1378067433834076,
0.17823539674282074,
-0.15542754530906677,
0.3335951566696167,
0.10342986136674881,
-0.11654132604598999,
-0.042431846261024475,
-0.2606748342514038,
-0.1693628430366516,
-0.05391307920217514,
0.19822297990322113,
-0.033605076372623444,
-0.5134415030479431,
-0.43101346492767334,
-0.057668209075927734,
0.10860870778560638,
-0.02418784238398075,
0.10693781077861786,
0.07315196096897125,
-0.06758025288581848,
0.5152413249015808,
-0.22721008956432343,
-0.05744779482483864,
0.1199541836977005,
0.2368396818637848,
0.13043466210365295,
0.11298224329948425,
0.2691708207130432,
0.0787450522184372,
-0.14622491598129272,
-0.18547704815864563,
0.2280760109424591,
0.17025700211524963,
-0.6268267631530762,
0.28532421588897705,
-0.22607198357582092,
-0.2815150022506714,
0.12994372844696045,
0.5647780895233154,
-0.038800954818725586,
0.14722026884555817,
-0.2866947054862976,
-0.2581216096878052,
-0.14387038350105286,
0.3203583061695099,
0.14955173432826996,
0.3118206560611725,
0.17409491539001465,
0.39109739661216736,
-0.08497420698404312,
-0.3364953398704529,
-0.3306781053543091,
-0.0837010070681572,
-0.365336149930954,
0.3747389018535614,
-0.3797127306461334,
0.08809368312358856,
0.13554508984088898,
-0.2086505889892578,
0.10214774310588837,
0.09957760572433472,
-0.11996559798717499,
-0.18154257535934448,
-0.0615788996219635,
0.10408514738082886,
0.19200953841209412,
0.02446703612804413,
0.12907586991786957,
-0.22664038836956024,
-0.1761983036994934,
-0.27655136585235596,
-0.012406609952449799,
0.34281232953071594,
-0.08613285422325134,
-0.05197862908244133,
0.27730146050453186,
0.014349013566970825,
-0.20551586151123047,
0.19514787197113037,
-0.17365822196006775,
-0.19878961145877838,
-0.08971785008907318,
0.27877452969551086,
-0.004116197116672993,
0.048512473702430725,
0.18986646831035614,
0.193305104970932,
0.13979625701904297,
0.16200345754623413,
0.6201664805412292,
-0.24607299268245697,
0.00696384534239769,
0.4891505539417267,
0.32078486680984497,
-0.10628724098205566,
-0.2443944811820984,
-0.09618725627660751,
0.06621992588043213,
0.22077928483486176,
-0.26681071519851685,
0.07451457530260086,
0.21162424981594086,
0.06335461139678955,
0.11466528475284576,
0.3049682676792145,
0.0313422791659832,
-0.2254927158355713,
0.1102089136838913,
-0.03560420125722885,
0.804750919342041,
-0.1278129518032074,
0.14419610798358917,
0.38589808344841003,
-0.0395449660718441,
0.13774161040782928,
0.09140100330114365,
-0.0014338232576847076,
0.2678656280040741,
0.5077896118164062,
0.04669534042477608,
0.1312389373779297,
0.14515790343284607,
0.021943703293800354,
0.05296779423952103,
-0.3793632388114929,
0.1870870441198349,
0.15021765232086182,
0.03760892152786255,
0.26007676124572754,
0.06966695934534073,
0.11003506183624268,
-0.2679762542247772,
-0.35349828004837036,
-0.03343019634485245,
0.13536812365055084,
-0.41471847891807556,
0.12655116617679596,
-0.4492887556552887,
-0.07004901021718979,
0.17844432592391968,
-0.3434998691082001,
-0.06520454585552216,
-0.17704029381275177,
0.4230143427848816,
0.051995884627103806,
0.038147248327732086,
-0.14747844636440277,
-0.18330174684524536,
0.19445040822029114,
0.1903473138809204,
-0.1914134919643402,
0.24775587022304535,
0.038167111575603485,
-0.2569957375526428,
0.05387631803750992,
0.5058435201644897,
0.6003218293190002,
0.4666292369365692,
0.14306947588920593,
0.16333343088626862,
0.08396881818771362,
-0.22584444284439087,
-0.28061655163764954,
0.07999657094478607,
0.05009530857205391,
0.10744671523571014,
0.15271341800689697,
0.15234297513961792,
-0.08534329384565353,
0.06984985619783401,
-0.01818084344267845,
0.30279141664505005,
0.17889155447483063,
0.20201316475868225,
-0.2385694980621338,
-0.2385910451412201,
-0.09789779782295227,
-0.09667211025953293,
-0.2160969376564026,
-0.34657391905784607,
0.48196977376937866,
-0.24431082606315613,
0.3231811821460724,
0.012395991012454033,
0.08470509201288223,
0.14766475558280945,
0.2906342148780823,
0.32467785477638245,
0.0026641227304935455,
-0.33292508125305176,
0.10363005101680756,
-0.43882307410240173,
0.13640081882476807,
-0.3335765302181244,
0.00499689020216465,
0.1872585266828537,
0.24207372963428497,
0.07708410918712616,
-0.12526154518127441,
0.09895537048578262,
0.03835003450512886,
-0.11781858652830124,
0.4823518395423889,
-0.09766285866498947,
-0.28049302101135254,
-0.12634605169296265,
-0.049829013645648956,
0.036445192992687225,
-0.4797927439212799,
0.12275055050849915,
0.06383182108402252,
0.16820243000984192,
-0.060948118567466736,
-0.005656767636537552,
0.025599230080842972,
-0.18348734080791473,
0.24833491444587708,
0.17448751628398895,
0.29592716693878174,
-0.1202162504196167,
-0.2224522978067398,
-0.28519102931022644,
-0.3099723160266876,
-0.26038408279418945,
0.1898776888847351,
-0.0645829290151596,
0.3302709758281708,
-0.3455325663089752,
0.3046523928642273,
-0.11808399856090546,
-0.28710201382637024,
0.1869746446609497,
0.22342659533023834,
-0.37496206164360046,
0.45886287093162537,
-0.6828259825706482,
0.27155932784080505,
-0.01353752613067627,
0.1975957751274109,
0.05755962058901787,
0.2869754731655121,
-0.2332383394241333,
-0.48941174149513245,
0.511699914932251,
-0.469948947429657,
-0.322108656167984,
0.019145410507917404,
-0.14117580652236938,
-0.43066924810409546,
-0.09834592044353485,
-0.48194146156311035,
-0.36862415075302124,
0.19970957934856415,
-0.06769171357154846,
-0.17573560774326324,
-0.14477182924747467,
0.0006740661337971687,
0.058768171817064285,
-0.20465542376041412,
0.26146072149276733,
0.04153286665678024,
-0.29364845156669617,
0.17603722214698792,
-0.3045952320098877
] |
https://github.com/huggingface/datasets/issues/5965
|
"Couldn't cast array of type" in complex datasets
|
@mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here.
|
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
| 24
|
"Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
@mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here.
|
[
-0.39829856157302856,
-0.05690281093120575,
-0.040337610989809036,
0.17765285074710846,
0.4318234324455261,
0.22664892673492432,
0.3325989246368408,
0.331497460603714,
0.37672656774520874,
-0.01937851309776306,
0.023040397092700005,
0.34318873286247253,
-0.15088239312171936,
0.024865319952368736,
0.0309312604367733,
-0.08824318647384644,
0.14028768241405487,
0.19609183073043823,
-0.2151281237602234,
-0.037983208894729614,
-0.22037768363952637,
-0.06677935272455215,
-0.38688528537750244,
-0.01987341046333313,
0.08640698343515396,
-0.33641114830970764,
-0.14185680449008942,
-0.12421461194753647,
-0.10955864936113358,
-0.3847692310810089,
0.3289000391960144,
-0.3240497410297394,
0.15686482191085815,
0.29766950011253357,
-0.00011155124957440421,
0.15764421224594116,
0.3483610153198242,
0.03217858076095581,
-0.18421407043933868,
-0.12119774520397186,
-0.3748067021369934,
-0.22268882393836975,
-0.15669173002243042,
-0.30277493596076965,
0.0871158018708229,
-0.07472161948680878,
-0.04051624983549118,
-0.3684496581554413,
-0.1689341515302658,
0.177866131067276,
0.18865817785263062,
0.49822595715522766,
0.0013314709067344666,
-0.18427933752536774,
0.1527513861656189,
0.06477800756692886,
-0.19486726820468903,
-0.122675821185112,
0.3001415729522705,
0.15865197777748108,
0.04994955286383629,
-0.0008361175423488021,
-0.4528651237487793,
-0.21816283464431763,
0.13382568955421448,
-0.043922945857048035,
0.27628934383392334,
-0.29041504859924316,
-0.16900134086608887,
0.12227422744035721,
0.3683265447616577,
-0.26357120275497437,
-0.2773510813713074,
-0.2502697706222534,
-0.1747446358203888,
0.09625454246997833,
-0.047291114926338196,
0.04677432030439377,
0.02491242066025734,
0.1941065937280655,
-0.3556506931781769,
0.31640660762786865,
0.10978043079376221,
0.22104138135910034,
-0.0005163624882698059,
0.01565808802843094,
0.09858246892690659,
0.17983639240264893,
-0.09532909095287323,
-0.22516264021396637,
0.16425886750221252,
-0.5122120976448059,
-0.09868550300598145,
0.29808568954467773,
-0.08567574620246887,
-0.11584600806236267,
0.22477561235427856,
0.008556723594665527,
0.2393513321876526,
-0.17544078826904297,
0.03513961657881737,
0.004304124042391777,
0.07433370500802994,
0.18096256256103516,
0.5464468002319336,
0.10346768796443939,
0.038617365062236786,
0.013715456239879131,
0.022139843553304672,
-0.12523002922534943,
-0.01890295371413231,
0.027756813913583755,
0.042470455169677734,
-0.02523684874176979,
0.19580963253974915,
0.12534521520137787,
0.28559136390686035,
-0.01752607524394989,
-0.21408160030841827,
0.14586293697357178,
-0.4794706702232361,
0.1987740844488144,
0.21111494302749634,
0.25706085562705994,
0.04072050005197525,
0.3958664834499359,
0.04163499176502228,
0.1814594715833664,
-0.050427839159965515,
-0.23049677908420563,
-0.20012012124061584,
-0.18854671716690063,
-0.31509333848953247,
-0.3272949159145355,
0.04260461404919624,
0.1447654366493225,
0.06247816979885101,
0.14164116978645325,
-0.22406388819217682,
0.08633247017860413,
-0.10320786386728287,
-0.16692788898944855,
0.2768692672252655,
0.3331473767757416,
0.2218860685825348,
0.29027092456817627,
0.24772751331329346,
-0.06066577136516571,
-0.1569901704788208,
0.36035093665122986,
-0.18982601165771484,
-0.19694112241268158,
-0.04336221516132355,
0.18081513047218323,
-0.2734301686286926,
0.07437364757061005,
-0.7257795333862305,
0.03204686567187309,
0.4068141281604767,
-0.26759153604507446,
0.03590213507413864,
-0.3142436742782593,
0.18733860552310944,
-0.36399412155151367,
-0.04399935156106949,
0.18830569088459015,
-0.22907742857933044,
0.16144736111164093,
-0.22987106442451477,
-0.11316461861133575,
0.08068522810935974,
0.45653942227363586,
-0.15648844838142395,
0.41344091296195984,
-0.3676363527774811,
0.46825820207595825,
0.2069474160671234,
0.05799561366438866,
-0.22534018754959106,
0.21765801310539246,
0.2775035500526428,
0.17585895955562592,
-0.19049936532974243,
0.20879989862442017,
0.30955228209495544,
-0.34630948305130005,
-0.15015265345573425,
0.32662105560302734,
-0.3492157459259033,
0.23000025749206543,
-0.3290558159351349,
-0.07702218741178513,
0.2706645727157593,
-0.054391853511333466,
0.1969929337501526,
0.3359840214252472,
0.05667370185256004,
0.021988194435834885,
0.220619797706604,
-0.2835448682308197,
0.2941349446773529,
0.05711395666003227,
0.35328757762908936,
0.05356033518910408,
0.0018460322171449661,
-0.3505328595638275,
-0.5408240556716919,
0.19890806078910828,
-0.06351973861455917,
0.09549211710691452,
-0.07192057371139526,
-0.1694038361310959,
-0.06845704466104507,
0.1443493515253067,
-0.0926862359046936,
0.3304097354412079,
0.1288316696882248,
-0.060203611850738525,
-0.025531938299536705,
-0.12558768689632416,
-0.03622164577245712,
-0.17406895756721497,
-0.1351388394832611,
-0.1767246425151825,
-0.26409465074539185,
0.2201033979654312,
-0.1886913776397705,
-0.22206874191761017,
-0.2813766300678253,
0.048333555459976196,
0.21039673686027527,
-0.0340828113257885,
0.008475293405354023,
0.22081619501113892,
-0.0831625908613205,
-0.1552075296640396,
-0.23698660731315613,
0.24950248003005981,
-0.16290920972824097,
-0.3530404269695282,
-0.11512971669435501,
0.2624945640563965,
0.31696584820747375,
-0.1625695824623108,
0.025055766105651855,
0.3321640193462372,
0.01520371064543724,
0.21822670102119446,
-0.23309223353862762,
0.20974811911582947,
0.32370898127555847,
-0.043808359652757645,
-0.02371923066675663,
-0.1645180881023407,
-0.11386571824550629,
0.002190912142395973,
0.05366935953497887,
0.12204889953136444,
-0.25387680530548096,
0.04448116198182106,
0.31824392080307007,
-0.19456587731838226,
0.23211777210235596,
-0.03633126616477966,
-0.0012290775775909424,
0.06682416796684265,
0.10088973492383957,
-0.04176848381757736,
0.266743004322052,
0.1249142736196518,
-0.09167824685573578,
-0.027591491118073463,
-0.06430044025182724,
0.11516508460044861,
0.3590777516365051,
0.05846422165632248,
0.34441429376602173,
-0.07579142600297928,
0.10292518138885498,
0.10597547143697739,
-0.06792384386062622,
-0.24811924993991852,
0.20804095268249512,
0.28620052337646484,
-0.46038442850112915,
0.06866522133350372,
-0.2398957461118698,
0.008067712187767029,
-0.04891367629170418,
0.015596059150993824,
0.07336444407701492,
-0.4356675148010254,
-0.22127725183963776,
0.38239923119544983,
-0.38697949051856995,
0.2557777464389801,
-0.21470969915390015,
0.09878433495759964,
0.15207144618034363,
-0.1782214641571045,
-0.3967110216617584,
-0.08081910014152527,
-0.08192047476768494,
0.044528115540742874,
0.5053490996360779,
-0.14654318988323212,
0.16515478491783142,
0.09142148494720459,
-0.03493849188089371,
-0.24271011352539062,
-0.2758491635322571,
0.026503026485443115,
-0.28776758909225464,
0.06291734427213669,
0.33538705110549927,
0.38200855255126953,
-0.0820973813533783,
-0.1669585108757019,
0.3018408417701721,
-0.3575623035430908,
-0.3748187720775604,
0.28967323899269104,
-0.11657322943210602,
-0.38777491450309753,
-0.3113287687301636,
-0.12563616037368774,
-0.18468070030212402,
-0.34019410610198975,
0.004580020904541016,
-0.3655582368373871,
-0.06664705276489258,
0.2010810673236847,
0.3499711751937866,
0.008739852346479893,
0.006137544754892588,
-0.3053700923919678,
-0.11062327772378922,
0.17287525534629822,
0.3398241698741913,
-0.0482315830886364,
-0.2551822364330292,
-0.003136198967695236,
-0.23245343565940857,
0.048346634954214096,
0.19947384297847748,
-0.2912505865097046,
0.3903254270553589,
-0.2001623809337616,
0.3545478582382202,
0.09132114797830582,
-0.057698629796504974,
0.3053610026836395,
0.2211555540561676,
0.001810602843761444,
-0.39140835404396057,
-0.08785863220691681,
-0.03662153333425522,
0.04625002667307854,
0.20696544647216797,
0.059424933046102524,
0.4329226016998291,
0.17165309190750122,
0.3451789617538452,
0.1391524225473404,
-0.25616395473480225,
0.29667526483535767,
-0.0959087610244751,
0.2411743551492691,
-0.21568423509597778,
-0.20542454719543457,
-0.044698528945446014,
-0.03260385990142822,
-0.2861633896827698,
-0.03020934760570526,
-0.3380993604660034,
-0.6134923100471497,
0.2439168095588684,
0.07117779552936554,
-0.2568027377128601,
-0.20462891459465027,
0.37333962321281433,
-0.25057142972946167,
0.12049917876720428,
0.13774016499519348,
-0.06091148406267166,
-0.2960359454154968,
-0.07747770100831985,
-0.00570084061473608,
-0.13155250251293182,
0.07353711873292923,
0.03619389608502388,
-0.2893300950527191,
-0.20725537836551666,
-0.05393975228071213,
0.2796344757080078,
0.2037462592124939,
0.3863846957683563,
0.03142351284623146,
-0.04342440515756607,
-0.11047378182411194,
0.08160234987735748,
0.792138397693634,
-0.3929842412471771,
0.14109620451927185,
0.22596684098243713,
0.327808141708374,
-0.36489152908325195,
-0.033878080546855927,
-0.16061162948608398,
0.373187780380249,
0.26526397466659546,
0.14528363943099976,
-0.3496638238430023,
0.14138458669185638,
-0.04340273141860962,
0.16774135828018188,
-0.02019389718770981,
0.044266071170568466,
-0.04156539589166641,
-0.400116890668869,
-0.10157012194395065,
0.051873140037059784,
0.5569095015525818,
0.2200360745191574,
-0.02116263471543789,
-0.047939807176589966,
-0.44753846526145935,
0.23431041836738586,
0.033686988055706024,
0.06676925718784332,
0.4606054723262787,
-0.07812348753213882,
0.3306143879890442,
-0.43427786231040955,
-0.005042277276515961,
0.4487892985343933,
0.50282222032547,
0.0015916377305984497,
-0.09510783851146698,
0.21875354647636414,
0.013008198700845242,
0.31096982955932617,
0.05222181975841522,
-0.036374568939208984,
-0.06927547603845596,
0.2546388506889343,
0.1681663542985916,
-0.07594183832406998,
-0.1530851572751999,
0.2868949770927429,
0.05230025202035904,
-0.529055655002594,
-0.43938037753105164,
0.2639966607093811,
0.09885531663894653,
-0.03807084634900093,
0.10122644901275635,
0.02065456658601761,
-0.3764946460723877,
0.6231353282928467,
0.2331877052783966,
0.8570380806922913,
-0.1399153769016266,
0.11338192224502563,
0.4347051978111267,
0.2037355750799179,
0.18643461167812347,
0.2927526831626892,
0.08603677898645401,
-0.4036330282688141,
0.18585330247879028,
-0.009298823773860931,
-0.07320262491703033,
0.1531982272863388,
0.3547825217247009,
-0.305213987827301,
-0.04297669231891632,
-0.03547229617834091,
0.49276959896087646,
0.09732769429683685,
-0.11662930995225906,
-0.0657874345779419,
-0.21919870376586914,
-0.4653315544128418,
0.18437454104423523,
0.10790417343378067,
-0.15328891575336456,
-0.024000922217965126,
-0.2926144599914551,
-0.18924853205680847,
-0.12670740485191345,
-0.2633209228515625,
0.12289243191480637,
-0.1371711790561676,
0.263582319021225,
0.19767799973487854,
-0.04010053351521492,
0.1867106407880783,
0.28177571296691895,
-0.01191159337759018,
0.05887264758348465,
-0.06841890513896942,
0.04976779222488403,
0.2763684391975403,
0.1378067433834076,
0.17823539674282074,
-0.15542754530906677,
0.3335951566696167,
0.10342986136674881,
-0.11654132604598999,
-0.042431846261024475,
-0.2606748342514038,
-0.1693628430366516,
-0.05391307920217514,
0.19822297990322113,
-0.033605076372623444,
-0.5134415030479431,
-0.43101346492767334,
-0.057668209075927734,
0.10860870778560638,
-0.02418784238398075,
0.10693781077861786,
0.07315196096897125,
-0.06758025288581848,
0.5152413249015808,
-0.22721008956432343,
-0.05744779482483864,
0.1199541836977005,
0.2368396818637848,
0.13043466210365295,
0.11298224329948425,
0.2691708207130432,
0.0787450522184372,
-0.14622491598129272,
-0.18547704815864563,
0.2280760109424591,
0.17025700211524963,
-0.6268267631530762,
0.28532421588897705,
-0.22607198357582092,
-0.2815150022506714,
0.12994372844696045,
0.5647780895233154,
-0.038800954818725586,
0.14722026884555817,
-0.2866947054862976,
-0.2581216096878052,
-0.14387038350105286,
0.3203583061695099,
0.14955173432826996,
0.3118206560611725,
0.17409491539001465,
0.39109739661216736,
-0.08497420698404312,
-0.3364953398704529,
-0.3306781053543091,
-0.0837010070681572,
-0.365336149930954,
0.3747389018535614,
-0.3797127306461334,
0.08809368312358856,
0.13554508984088898,
-0.2086505889892578,
0.10214774310588837,
0.09957760572433472,
-0.11996559798717499,
-0.18154257535934448,
-0.0615788996219635,
0.10408514738082886,
0.19200953841209412,
0.02446703612804413,
0.12907586991786957,
-0.22664038836956024,
-0.1761983036994934,
-0.27655136585235596,
-0.012406609952449799,
0.34281232953071594,
-0.08613285422325134,
-0.05197862908244133,
0.27730146050453186,
0.014349013566970825,
-0.20551586151123047,
0.19514787197113037,
-0.17365822196006775,
-0.19878961145877838,
-0.08971785008907318,
0.27877452969551086,
-0.004116197116672993,
0.048512473702430725,
0.18986646831035614,
0.193305104970932,
0.13979625701904297,
0.16200345754623413,
0.6201664805412292,
-0.24607299268245697,
0.00696384534239769,
0.4891505539417267,
0.32078486680984497,
-0.10628724098205566,
-0.2443944811820984,
-0.09618725627660751,
0.06621992588043213,
0.22077928483486176,
-0.26681071519851685,
0.07451457530260086,
0.21162424981594086,
0.06335461139678955,
0.11466528475284576,
0.3049682676792145,
0.0313422791659832,
-0.2254927158355713,
0.1102089136838913,
-0.03560420125722885,
0.804750919342041,
-0.1278129518032074,
0.14419610798358917,
0.38589808344841003,
-0.0395449660718441,
0.13774161040782928,
0.09140100330114365,
-0.0014338232576847076,
0.2678656280040741,
0.5077896118164062,
0.04669534042477608,
0.1312389373779297,
0.14515790343284607,
0.021943703293800354,
0.05296779423952103,
-0.3793632388114929,
0.1870870441198349,
0.15021765232086182,
0.03760892152786255,
0.26007676124572754,
0.06966695934534073,
0.11003506183624268,
-0.2679762542247772,
-0.35349828004837036,
-0.03343019634485245,
0.13536812365055084,
-0.41471847891807556,
0.12655116617679596,
-0.4492887556552887,
-0.07004901021718979,
0.17844432592391968,
-0.3434998691082001,
-0.06520454585552216,
-0.17704029381275177,
0.4230143427848816,
0.051995884627103806,
0.038147248327732086,
-0.14747844636440277,
-0.18330174684524536,
0.19445040822029114,
0.1903473138809204,
-0.1914134919643402,
0.24775587022304535,
0.038167111575603485,
-0.2569957375526428,
0.05387631803750992,
0.5058435201644897,
0.6003218293190002,
0.4666292369365692,
0.14306947588920593,
0.16333343088626862,
0.08396881818771362,
-0.22584444284439087,
-0.28061655163764954,
0.07999657094478607,
0.05009530857205391,
0.10744671523571014,
0.15271341800689697,
0.15234297513961792,
-0.08534329384565353,
0.06984985619783401,
-0.01818084344267845,
0.30279141664505005,
0.17889155447483063,
0.20201316475868225,
-0.2385694980621338,
-0.2385910451412201,
-0.09789779782295227,
-0.09667211025953293,
-0.2160969376564026,
-0.34657391905784607,
0.48196977376937866,
-0.24431082606315613,
0.3231811821460724,
0.012395991012454033,
0.08470509201288223,
0.14766475558280945,
0.2906342148780823,
0.32467785477638245,
0.0026641227304935455,
-0.33292508125305176,
0.10363005101680756,
-0.43882307410240173,
0.13640081882476807,
-0.3335765302181244,
0.00499689020216465,
0.1872585266828537,
0.24207372963428497,
0.07708410918712616,
-0.12526154518127441,
0.09895537048578262,
0.03835003450512886,
-0.11781858652830124,
0.4823518395423889,
-0.09766285866498947,
-0.28049302101135254,
-0.12634605169296265,
-0.049829013645648956,
0.036445192992687225,
-0.4797927439212799,
0.12275055050849915,
0.06383182108402252,
0.16820243000984192,
-0.060948118567466736,
-0.005656767636537552,
0.025599230080842972,
-0.18348734080791473,
0.24833491444587708,
0.17448751628398895,
0.29592716693878174,
-0.1202162504196167,
-0.2224522978067398,
-0.28519102931022644,
-0.3099723160266876,
-0.26038408279418945,
0.1898776888847351,
-0.0645829290151596,
0.3302709758281708,
-0.3455325663089752,
0.3046523928642273,
-0.11808399856090546,
-0.28710201382637024,
0.1869746446609497,
0.22342659533023834,
-0.37496206164360046,
0.45886287093162537,
-0.6828259825706482,
0.27155932784080505,
-0.01353752613067627,
0.1975957751274109,
0.05755962058901787,
0.2869754731655121,
-0.2332383394241333,
-0.48941174149513245,
0.511699914932251,
-0.469948947429657,
-0.322108656167984,
0.019145410507917404,
-0.14117580652236938,
-0.43066924810409546,
-0.09834592044353485,
-0.48194146156311035,
-0.36862415075302124,
0.19970957934856415,
-0.06769171357154846,
-0.17573560774326324,
-0.14477182924747467,
0.0006740661337971687,
0.058768171817064285,
-0.20465542376041412,
0.26146072149276733,
0.04153286665678024,
-0.29364845156669617,
0.17603722214698792,
-0.3045952320098877
] |
https://github.com/huggingface/datasets/issues/5963
|
Got an error _pickle.PicklingError use Dataset.from_spark.
|
i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local?
|
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 18
|
Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local?
|
[
-0.48843836784362793,
-0.16567078232765198,
0.023851748555898666,
0.34239310026168823,
0.2954638600349426,
-0.00167025625705719,
0.5267862677574158,
0.13773883879184723,
0.08715450763702393,
0.09700313955545425,
0.08231282234191895,
0.6951185464859009,
-0.18221792578697205,
0.5347052812576294,
-0.2312408685684204,
-0.06934317201375961,
-0.047049738466739655,
0.03926501423120499,
-0.10985314846038818,
0.12908263504505157,
-0.14200036227703094,
0.16121806204319,
-0.01808229833841324,
0.21399211883544922,
-0.48433321714401245,
-0.23130908608436584,
0.006972150877118111,
0.031542036682367325,
0.018942544236779213,
-0.3429161012172699,
0.31343868374824524,
-0.24542847275733948,
0.20131416618824005,
0.4949148893356323,
-0.00010675491648726165,
0.015672847628593445,
0.2840091288089752,
0.028392689302563667,
-0.3145979940891266,
-0.30959516763687134,
0.13471239805221558,
-0.1977892816066742,
0.2964380383491516,
-0.4391089081764221,
-0.08369480818510056,
0.43250542879104614,
-0.080173060297966,
-0.1386430561542511,
0.5478287935256958,
0.24734258651733398,
0.2701519727706909,
0.4517422318458557,
0.19916574656963348,
-0.04003120958805084,
-0.14390340447425842,
-0.017338663339614868,
-0.15435542166233063,
0.3208446204662323,
-0.019979417324066162,
0.15240837633609772,
-0.044224075973033905,
0.07639852166175842,
-0.19006817042827606,
0.034042201936244965,
0.26666098833084106,
-0.029710691422224045,
-0.2939791679382324,
-0.38670289516448975,
0.26570528745651245,
0.0881635993719101,
0.7293926477432251,
-0.36226576566696167,
-0.1720624715089798,
-0.15281936526298523,
0.04290801286697388,
-0.19324389100074768,
0.30221933126449585,
-0.05532754212617874,
-0.10377642512321472,
-0.00031675398349761963,
-0.04705844074487686,
-0.3268238306045532,
-0.05620463564991951,
-0.0913035124540329,
-0.07042386382818222,
0.36940997838974,
-0.17559343576431274,
0.36690324544906616,
0.14398419857025146,
-0.08147239685058594,
0.16355164349079132,
-0.14458823204040527,
0.24547968804836273,
-0.11824534833431244,
-0.1676562875509262,
-0.0764617770910263,
-0.0570451095700264,
-0.37988346815109253,
-0.16584044694900513,
-0.009235627949237823,
0.05166703835129738,
0.10566220432519913,
-0.0690288096666336,
0.14064615964889526,
0.3917168378829956,
0.09503099322319031,
0.2594355344772339,
0.3108329474925995,
0.16589270532131195,
-0.14966589212417603,
-0.03248230740427971,
-0.048194341361522675,
-0.1193542405962944,
-0.10702993720769882,
0.053755175322294235,
0.15937215089797974,
0.21017976105213165,
-0.06752168387174606,
-0.2595708668231964,
-0.05292876809835434,
-0.10199028253555298,
0.024705801159143448,
-0.11639494448900223,
0.16270041465759277,
0.028387870639562607,
-0.040096744894981384,
-0.032443705946207047,
0.10582724213600159,
-0.017817819491028786,
0.015076951123774052,
-0.2311922013759613,
0.13124492764472961,
0.014009121805429459,
0.01036832109093666,
-0.04755803197622299,
-0.5940123200416565,
0.40823981165885925,
-0.02465188130736351,
-0.313997745513916,
0.08029532432556152,
0.15338557958602905,
-0.2402249127626419,
-0.3045225441455841,
0.12046806514263153,
0.13187769055366516,
0.36227232217788696,
0.3059765696525574,
-0.30505281686782837,
-0.1115986779332161,
0.05256521329283714,
-0.23978284001350403,
-0.1837444305419922,
-0.4008563160896301,
0.15959344804286957,
-0.04063744097948074,
-0.18304115533828735,
-0.528272271156311,
0.025700034573674202,
0.22662127017974854,
-0.19141963124275208,
0.00035475194454193115,
-0.24663497507572174,
-0.19719694554805756,
-0.35548585653305054,
0.1952570229768753,
0.39520877599716187,
-0.6636566519737244,
0.021360009908676147,
-0.09458788484334946,
0.03670884668827057,
0.3128219544887543,
0.082523874938488,
-0.21855242550373077,
0.26735007762908936,
-0.23426945507526398,
0.475135862827301,
-0.008301086723804474,
-0.3230437636375427,
-0.22636859118938446,
0.1873060166835785,
-0.3762303590774536,
-0.012329734861850739,
-0.10326824337244034,
-0.03133905306458473,
0.22806097567081451,
0.03385843709111214,
0.1438177525997162,
0.1020207405090332,
0.1493072509765625,
-0.030295172706246376,
-0.15949077904224396,
-0.2731614112854004,
0.17278987169265747,
-0.12851139903068542,
0.16508373618125916,
-0.19789162278175354,
0.12478789687156677,
-0.008597278967499733,
0.12712767720222473,
0.0008042566478252411,
0.12674520909786224,
0.23162183165550232,
0.1102672666311264,
0.1188155934214592,
-0.31191083788871765,
0.03500097244977951,
-0.3804396390914917,
0.30553296208381653,
0.36301538348197937,
0.07688890397548676,
-0.11076869070529938,
-0.2604902982711792,
-0.20685052871704102,
0.06102261692285538,
-0.2146265059709549,
-0.12947280704975128,
0.19948022067546844,
0.09192105382680893,
-0.09647372364997864,
0.07802440226078033,
0.061625007539987564,
-0.022376781329512596,
-0.07934525609016418,
-0.038797616958618164,
-0.13557550311088562,
0.39753109216690063,
-0.3191071152687073,
-0.2832925021648407,
0.03295382857322693,
-0.07399845868349075,
0.17085739970207214,
-0.010677739046514034,
-0.19196361303329468,
0.35257601737976074,
-0.06221242621541023,
0.15735572576522827,
-0.03844179958105087,
0.019170045852661133,
0.15164968371391296,
-0.028478169813752174,
0.12909117341041565,
0.17126210033893585,
0.12526027858257294,
-0.020884227007627487,
-0.10580023378133774,
0.2479894459247589,
0.04871523380279541,
-0.09727369993925095,
-0.19723595678806305,
0.19235248863697052,
0.11158676445484161,
0.10080720484256744,
0.09383725374937057,
-0.049340926110744476,
-0.1718691885471344,
-0.14005599915981293,
0.19607345759868622,
0.03694631904363632,
-0.47808539867401123,
0.18733814358711243,
0.40580040216445923,
0.23102137446403503,
0.3625018000602722,
0.0966104194521904,
-0.33287447690963745,
-0.14528393745422363,
0.42571961879730225,
0.1739799529314041,
0.30080848932266235,
0.08521910756826401,
-0.03693191334605217,
-0.1324012279510498,
0.10147856920957565,
-0.05890168622136116,
0.2009194791316986,
0.0808069109916687,
0.3763670325279236,
0.25234872102737427,
-0.012854216620326042,
0.09227656573057175,
-0.2208462357521057,
-0.0842038094997406,
0.09818857163190842,
0.20588891208171844,
-0.27317363023757935,
0.09283442795276642,
-0.27633556723594666,
0.04196051508188248,
0.07038291543722153,
0.17701356112957,
-0.08736677467823029,
-0.20921240746974945,
-0.17466357350349426,
0.5300976634025574,
0.10164295136928558,
0.12700282037258148,
0.043608833104372025,
0.015958815813064575,
0.29521122574806213,
0.10761503130197525,
-0.26770997047424316,
-0.290486603975296,
-0.29971227049827576,
0.10567115247249603,
0.18442478775978088,
0.04363801330327988,
0.1334962546825409,
0.2797306180000305,
0.0916006788611412,
-0.557253360748291,
-0.0744720995426178,
-0.008995138108730316,
-0.35501164197921753,
0.3088332712650299,
0.12117008864879608,
0.3123682141304016,
-0.44169485569000244,
-0.42228779196739197,
0.1773485690355301,
-0.03513238579034805,
-0.0618145614862442,
0.1698974072933197,
0.05092886462807655,
-0.014581141993403435,
0.03782157227396965,
-0.28063714504241943,
-0.4596291482448578,
-0.4042501449584961,
0.18550531566143036,
0.07152260839939117,
-0.015743501484394073,
0.2632717788219452,
0.2631888687610626,
0.32249993085861206,
0.2026597410440445,
-0.2776326537132263,
-0.16388367116451263,
-0.03746320679783821,
0.24195733666419983,
-0.11848627030849457,
-0.3290320038795471,
0.07159607112407684,
0.07021569460630417,
0.2398902177810669,
-0.28412532806396484,
-0.38337481021881104,
-0.12762045860290527,
0.07998009026050568,
0.36156177520751953,
-0.04471006989479065,
-0.04691002517938614,
0.41042834520339966,
0.2838413417339325,
-0.09939135611057281,
0.03338029235601425,
-0.049174364656209946,
0.05090905353426933,
0.22924283146858215,
0.09917768090963364,
0.05004890635609627,
0.41635385155677795,
0.04946411773562431,
0.6712241768836975,
0.015484865754842758,
-0.3020525276660919,
0.4118693470954895,
-0.20362649857997894,
0.12222015857696533,
-0.21766740083694458,
-0.389110267162323,
-0.009673994034528732,
-0.3755668103694916,
-0.06564237177371979,
0.08992074429988861,
-0.30529919266700745,
-0.0026897992938756943,
-0.096856027841568,
-0.2038329839706421,
-0.21202293038368225,
-0.16117751598358154,
-0.00643979012966156,
-0.17208978533744812,
0.052725255489349365,
-0.09541261196136475,
0.2716251313686371,
-0.22424465417861938,
-0.08387231081724167,
0.005949568003416061,
-0.2375606745481491,
0.16675999760627747,
-0.07831117510795593,
-0.3555428087711334,
-0.11552851647138596,
-0.5387837290763855,
0.3509911894798279,
-0.09951397776603699,
0.08337792009115219,
-0.17881081998348236,
0.04309605807065964,
0.18945252895355225,
-0.04780786111950874,
0.605922281742096,
-0.29655107855796814,
0.03835909068584442,
0.22590909898281097,
-0.10697883367538452,
-0.49117791652679443,
-0.103556327521801,
-0.17874398827552795,
0.3905627727508545,
0.006684565916657448,
0.5836243629455566,
-0.25484201312065125,
-0.03250683844089508,
-0.09976693987846375,
-0.07121393084526062,
-0.13481630384922028,
0.1880328357219696,
-0.15081222355365753,
-0.31606078147888184,
-0.4655393064022064,
0.11179584264755249,
0.007667073979973793,
0.21079127490520477,
-0.1736883670091629,
-0.002082090824842453,
-0.020650791004300117,
0.0053708963096141815,
-0.20017312467098236,
0.026250284165143967,
0.2587311267852783,
0.15110790729522705,
0.11040142178535461,
0.22226187586784363,
0.06015601009130478,
0.11622178554534912,
0.29807037115097046,
0.11423283815383911,
-0.06367717683315277,
0.06881743669509888,
-0.0385865718126297,
0.1946277916431427,
0.119477778673172,
-0.08700450509786606,
0.11818303167819977,
-0.033058974891901016,
0.13299748301506042,
-0.10821762681007385,
0.2075543850660324,
0.2141469269990921,
0.08033078908920288,
-0.056523438543081284,
-0.3456515073776245,
0.399822860956192,
0.07285267114639282,
-0.004899755120277405,
0.38124290108680725,
-0.03727368265390396,
-0.2309427410364151,
0.4770488142967224,
0.1910463571548462,
0.7097317576408386,
-0.05838436633348465,
0.1273352950811386,
0.3959961533546448,
0.1893109381198883,
0.5711795091629028,
0.03645993769168854,
0.11875733733177185,
-0.46333253383636475,
-0.07829533517360687,
-0.03873136639595032,
0.023796256631612778,
0.0906006321310997,
0.020567160099744797,
-0.48646780848503113,
0.13530299067497253,
-0.2419554591178894,
0.018353573977947235,
-0.2849994897842407,
0.3904263377189636,
-0.22006608545780182,
-0.12183180451393127,
0.1830069124698639,
0.22899514436721802,
-0.25974828004837036,
0.3744601905345917,
-0.03798806294798851,
-0.10575646907091141,
-0.04059038311243057,
-0.3184075355529785,
-0.3879995346069336,
0.18348369002342224,
-0.24372293055057526,
0.6665697693824768,
-0.16427339613437653,
-0.3237501382827759,
0.03729616105556488,
0.3030257225036621,
0.06916086375713348,
0.064813531935215,
-0.14104487001895905,
0.05149533227086067,
-0.04300500452518463,
-0.17604364454746246,
0.07645384967327118,
-0.03144179657101631,
0.34275954961776733,
-0.0814308375120163,
-0.22532671689987183,
0.29920822381973267,
0.05349235236644745,
-0.17647811770439148,
0.17312073707580566,
-0.0936339795589447,
-0.027008086442947388,
-0.5017265677452087,
-0.2544344663619995,
-0.08874033391475677,
-0.319990873336792,
-0.30036401748657227,
0.11588782072067261,
-0.10518386960029602,
0.10083524882793427,
0.1440897285938263,
0.0020701326429843903,
0.030001625418663025,
0.09683629870414734,
0.5596948266029358,
-0.029877327382564545,
0.2831663489341736,
0.5352457761764526,
0.3073682487010956,
-0.1873098909854889,
-0.22526827454566956,
0.05681709200143814,
-0.022312460467219353,
-0.1304154247045517,
0.13161861896514893,
0.047918651252985,
0.03231038153171539,
-0.06732942163944244,
0.6074984669685364,
0.21248272061347961,
0.018627509474754333,
-0.24046097695827484,
-0.12279857695102692,
-0.37875184416770935,
0.25533753633499146,
-0.013729143887758255,
0.26868075132369995,
0.14105495810508728,
-0.05577230826020241,
0.10077275335788727,
0.004142414778470993,
-0.3299325406551361,
0.023612912744283676,
-0.48920971155166626,
-0.03248194605112076,
0.5329432487487793,
-0.28666597604751587,
0.04373366758227348,
-0.1450989991426468,
0.16419823467731476,
0.1687866896390915,
-0.05920924246311188,
-0.25963348150253296,
0.11275503039360046,
0.02437993884086609,
0.1439807116985321,
-0.15420234203338623,
-0.24141144752502441,
-0.2986082434654236,
-0.18404905498027802,
-0.15526841580867767,
0.05834608152508736,
0.2394232153892517,
-0.08322811126708984,
0.009024818427860737,
0.04524336755275726,
0.16640403866767883,
-0.17410652339458466,
-0.02617645263671875,
0.017289265990257263,
0.020542941987514496,
-0.11061041057109833,
0.1950448602437973,
0.28023970127105713,
-0.05793572962284088,
-0.31768810749053955,
0.10625907778739929,
0.09238170832395554,
0.22029179334640503,
0.3055327832698822,
-0.307525634765625,
-0.12839749455451965,
0.08001332730054855,
0.2587728500366211,
0.11910652369260788,
-0.16067877411842346,
-0.0961332619190216,
0.24923861026763916,
0.2378358095884323,
-0.28792959451675415,
-0.1679440587759018,
0.20640869438648224,
-0.1806030571460724,
0.031647857278585434,
-0.16450390219688416,
0.18262609839439392,
0.08559355139732361,
-0.5627009272575378,
0.2778642177581787,
0.6208097338676453,
-0.27150100469589233,
0.10375361144542694,
0.33064642548561096,
-0.1416223645210266,
-0.085502028465271,
0.374433696269989,
0.24710701406002045,
0.1989918053150177,
0.37102454900741577,
0.10279660671949387,
0.3195635974407196,
0.11608114838600159,
0.07658205181360245,
0.15229615569114685,
-0.5786861777305603,
0.13532257080078125,
-0.21423134207725525,
-0.31858646869659424,
-0.03673815727233887,
-0.06891684234142303,
0.1564415991306305,
-0.46050727367401123,
-0.2527896761894226,
-0.24773821234703064,
0.39825403690338135,
-0.44157034158706665,
0.10705186426639557,
-0.2652190625667572,
-0.041372090578079224,
0.21498411893844604,
0.1461450606584549,
-0.10677307844161987,
-0.08289211988449097,
0.39346227049827576,
-0.03444290906190872,
-0.2168569713830948,
0.1463870406150818,
-0.04422513395547867,
0.05362606421113014,
0.1968647539615631,
-0.23523321747779846,
0.08461987227201462,
0.08095494657754898,
0.05779459699988365,
-0.592361569404602,
0.297459214925766,
0.5952131748199463,
0.04066653177142143,
-0.2140021026134491,
0.2292972207069397,
0.1213483214378357,
-0.0508432611823082,
0.1087493896484375,
-0.0864148661494255,
0.03299468010663986,
0.20004217326641083,
0.3204498291015625,
0.24780741333961487,
-0.1722237914800644,
0.06748403608798981,
0.17034602165222168,
0.3692936897277832,
-0.006277036853134632,
-0.10727716237306595,
0.0803927332162857,
-0.3707972764968872,
-0.009129848331212997,
0.020115576684474945,
-0.34384769201278687,
0.09652688354253769,
0.6157698035240173,
0.1697746068239212,
0.19134575128555298,
-0.1806834489107132,
0.128647118806839,
-0.012757495045661926,
0.27692702412605286,
0.21394766867160797,
-0.0006612762808799744,
-0.3684422969818115,
0.2249792069196701,
-0.4956749975681305,
0.13733310997486115,
0.08699880540370941,
-0.21549129486083984,
-0.009299732744693756,
-0.0005271565169095993,
0.2668374180793762,
-0.013156414031982422,
-0.1306966096162796,
0.13080739974975586,
0.05205955356359482,
0.08468511700630188,
-0.22190825641155243,
-0.00972917303442955,
-0.03260769695043564,
-0.02727429009974003,
0.08261395990848541,
-0.3350195288658142,
0.343911349773407,
-0.04685252532362938,
0.13716360926628113,
-0.13825227320194244,
-0.2501172423362732,
0.25050124526023865,
-0.2741957902908325,
0.5549745559692383,
-0.2441457211971283,
0.5613475441932678,
-0.16591909527778625,
0.07089744508266449,
0.06837731599807739,
-0.19408553838729858,
-0.15034355223178864,
-0.010258428752422333,
0.0018272437155246735,
0.4267117381095886,
-0.16388092935085297,
0.3537280559539795,
-0.398988276720047,
-0.00480501726269722,
-0.129908949136734,
0.20125983655452728,
-0.1757214367389679,
-0.039600566029548645,
-0.20287087559700012,
-0.12603925168514252,
0.1865130215883255,
0.23655235767364502,
-0.011244043707847595,
0.1595025658607483,
-0.34512972831726074,
-0.40633776783943176,
0.6743068695068359,
-0.2313329428434372,
-0.22282320261001587,
-0.21850049495697021,
-0.04572118818759918,
0.2212742567062378,
0.1505010575056076,
-0.19260749220848083,
-0.008943378925323486,
0.32701557874679565,
-0.02065020054578781,
-0.24006929993629456,
-0.03958507999777794,
-0.027633730322122574,
0.00228235125541687,
-0.03804779425263405,
0.2880873382091522,
-0.23654162883758545,
-0.14879433810710907,
-0.028872255235910416,
-0.1439053863286972
] |
https://github.com/huggingface/datasets/issues/5963
|
Got an error _pickle.PicklingError use Dataset.from_spark.
|
cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions`
|
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 54
|
Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions`
|
[
-0.48843836784362793,
-0.16567078232765198,
0.023851748555898666,
0.34239310026168823,
0.2954638600349426,
-0.00167025625705719,
0.5267862677574158,
0.13773883879184723,
0.08715450763702393,
0.09700313955545425,
0.08231282234191895,
0.6951185464859009,
-0.18221792578697205,
0.5347052812576294,
-0.2312408685684204,
-0.06934317201375961,
-0.047049738466739655,
0.03926501423120499,
-0.10985314846038818,
0.12908263504505157,
-0.14200036227703094,
0.16121806204319,
-0.01808229833841324,
0.21399211883544922,
-0.48433321714401245,
-0.23130908608436584,
0.006972150877118111,
0.031542036682367325,
0.018942544236779213,
-0.3429161012172699,
0.31343868374824524,
-0.24542847275733948,
0.20131416618824005,
0.4949148893356323,
-0.00010675491648726165,
0.015672847628593445,
0.2840091288089752,
0.028392689302563667,
-0.3145979940891266,
-0.30959516763687134,
0.13471239805221558,
-0.1977892816066742,
0.2964380383491516,
-0.4391089081764221,
-0.08369480818510056,
0.43250542879104614,
-0.080173060297966,
-0.1386430561542511,
0.5478287935256958,
0.24734258651733398,
0.2701519727706909,
0.4517422318458557,
0.19916574656963348,
-0.04003120958805084,
-0.14390340447425842,
-0.017338663339614868,
-0.15435542166233063,
0.3208446204662323,
-0.019979417324066162,
0.15240837633609772,
-0.044224075973033905,
0.07639852166175842,
-0.19006817042827606,
0.034042201936244965,
0.26666098833084106,
-0.029710691422224045,
-0.2939791679382324,
-0.38670289516448975,
0.26570528745651245,
0.0881635993719101,
0.7293926477432251,
-0.36226576566696167,
-0.1720624715089798,
-0.15281936526298523,
0.04290801286697388,
-0.19324389100074768,
0.30221933126449585,
-0.05532754212617874,
-0.10377642512321472,
-0.00031675398349761963,
-0.04705844074487686,
-0.3268238306045532,
-0.05620463564991951,
-0.0913035124540329,
-0.07042386382818222,
0.36940997838974,
-0.17559343576431274,
0.36690324544906616,
0.14398419857025146,
-0.08147239685058594,
0.16355164349079132,
-0.14458823204040527,
0.24547968804836273,
-0.11824534833431244,
-0.1676562875509262,
-0.0764617770910263,
-0.0570451095700264,
-0.37988346815109253,
-0.16584044694900513,
-0.009235627949237823,
0.05166703835129738,
0.10566220432519913,
-0.0690288096666336,
0.14064615964889526,
0.3917168378829956,
0.09503099322319031,
0.2594355344772339,
0.3108329474925995,
0.16589270532131195,
-0.14966589212417603,
-0.03248230740427971,
-0.048194341361522675,
-0.1193542405962944,
-0.10702993720769882,
0.053755175322294235,
0.15937215089797974,
0.21017976105213165,
-0.06752168387174606,
-0.2595708668231964,
-0.05292876809835434,
-0.10199028253555298,
0.024705801159143448,
-0.11639494448900223,
0.16270041465759277,
0.028387870639562607,
-0.040096744894981384,
-0.032443705946207047,
0.10582724213600159,
-0.017817819491028786,
0.015076951123774052,
-0.2311922013759613,
0.13124492764472961,
0.014009121805429459,
0.01036832109093666,
-0.04755803197622299,
-0.5940123200416565,
0.40823981165885925,
-0.02465188130736351,
-0.313997745513916,
0.08029532432556152,
0.15338557958602905,
-0.2402249127626419,
-0.3045225441455841,
0.12046806514263153,
0.13187769055366516,
0.36227232217788696,
0.3059765696525574,
-0.30505281686782837,
-0.1115986779332161,
0.05256521329283714,
-0.23978284001350403,
-0.1837444305419922,
-0.4008563160896301,
0.15959344804286957,
-0.04063744097948074,
-0.18304115533828735,
-0.528272271156311,
0.025700034573674202,
0.22662127017974854,
-0.19141963124275208,
0.00035475194454193115,
-0.24663497507572174,
-0.19719694554805756,
-0.35548585653305054,
0.1952570229768753,
0.39520877599716187,
-0.6636566519737244,
0.021360009908676147,
-0.09458788484334946,
0.03670884668827057,
0.3128219544887543,
0.082523874938488,
-0.21855242550373077,
0.26735007762908936,
-0.23426945507526398,
0.475135862827301,
-0.008301086723804474,
-0.3230437636375427,
-0.22636859118938446,
0.1873060166835785,
-0.3762303590774536,
-0.012329734861850739,
-0.10326824337244034,
-0.03133905306458473,
0.22806097567081451,
0.03385843709111214,
0.1438177525997162,
0.1020207405090332,
0.1493072509765625,
-0.030295172706246376,
-0.15949077904224396,
-0.2731614112854004,
0.17278987169265747,
-0.12851139903068542,
0.16508373618125916,
-0.19789162278175354,
0.12478789687156677,
-0.008597278967499733,
0.12712767720222473,
0.0008042566478252411,
0.12674520909786224,
0.23162183165550232,
0.1102672666311264,
0.1188155934214592,
-0.31191083788871765,
0.03500097244977951,
-0.3804396390914917,
0.30553296208381653,
0.36301538348197937,
0.07688890397548676,
-0.11076869070529938,
-0.2604902982711792,
-0.20685052871704102,
0.06102261692285538,
-0.2146265059709549,
-0.12947280704975128,
0.19948022067546844,
0.09192105382680893,
-0.09647372364997864,
0.07802440226078033,
0.061625007539987564,
-0.022376781329512596,
-0.07934525609016418,
-0.038797616958618164,
-0.13557550311088562,
0.39753109216690063,
-0.3191071152687073,
-0.2832925021648407,
0.03295382857322693,
-0.07399845868349075,
0.17085739970207214,
-0.010677739046514034,
-0.19196361303329468,
0.35257601737976074,
-0.06221242621541023,
0.15735572576522827,
-0.03844179958105087,
0.019170045852661133,
0.15164968371391296,
-0.028478169813752174,
0.12909117341041565,
0.17126210033893585,
0.12526027858257294,
-0.020884227007627487,
-0.10580023378133774,
0.2479894459247589,
0.04871523380279541,
-0.09727369993925095,
-0.19723595678806305,
0.19235248863697052,
0.11158676445484161,
0.10080720484256744,
0.09383725374937057,
-0.049340926110744476,
-0.1718691885471344,
-0.14005599915981293,
0.19607345759868622,
0.03694631904363632,
-0.47808539867401123,
0.18733814358711243,
0.40580040216445923,
0.23102137446403503,
0.3625018000602722,
0.0966104194521904,
-0.33287447690963745,
-0.14528393745422363,
0.42571961879730225,
0.1739799529314041,
0.30080848932266235,
0.08521910756826401,
-0.03693191334605217,
-0.1324012279510498,
0.10147856920957565,
-0.05890168622136116,
0.2009194791316986,
0.0808069109916687,
0.3763670325279236,
0.25234872102737427,
-0.012854216620326042,
0.09227656573057175,
-0.2208462357521057,
-0.0842038094997406,
0.09818857163190842,
0.20588891208171844,
-0.27317363023757935,
0.09283442795276642,
-0.27633556723594666,
0.04196051508188248,
0.07038291543722153,
0.17701356112957,
-0.08736677467823029,
-0.20921240746974945,
-0.17466357350349426,
0.5300976634025574,
0.10164295136928558,
0.12700282037258148,
0.043608833104372025,
0.015958815813064575,
0.29521122574806213,
0.10761503130197525,
-0.26770997047424316,
-0.290486603975296,
-0.29971227049827576,
0.10567115247249603,
0.18442478775978088,
0.04363801330327988,
0.1334962546825409,
0.2797306180000305,
0.0916006788611412,
-0.557253360748291,
-0.0744720995426178,
-0.008995138108730316,
-0.35501164197921753,
0.3088332712650299,
0.12117008864879608,
0.3123682141304016,
-0.44169485569000244,
-0.42228779196739197,
0.1773485690355301,
-0.03513238579034805,
-0.0618145614862442,
0.1698974072933197,
0.05092886462807655,
-0.014581141993403435,
0.03782157227396965,
-0.28063714504241943,
-0.4596291482448578,
-0.4042501449584961,
0.18550531566143036,
0.07152260839939117,
-0.015743501484394073,
0.2632717788219452,
0.2631888687610626,
0.32249993085861206,
0.2026597410440445,
-0.2776326537132263,
-0.16388367116451263,
-0.03746320679783821,
0.24195733666419983,
-0.11848627030849457,
-0.3290320038795471,
0.07159607112407684,
0.07021569460630417,
0.2398902177810669,
-0.28412532806396484,
-0.38337481021881104,
-0.12762045860290527,
0.07998009026050568,
0.36156177520751953,
-0.04471006989479065,
-0.04691002517938614,
0.41042834520339966,
0.2838413417339325,
-0.09939135611057281,
0.03338029235601425,
-0.049174364656209946,
0.05090905353426933,
0.22924283146858215,
0.09917768090963364,
0.05004890635609627,
0.41635385155677795,
0.04946411773562431,
0.6712241768836975,
0.015484865754842758,
-0.3020525276660919,
0.4118693470954895,
-0.20362649857997894,
0.12222015857696533,
-0.21766740083694458,
-0.389110267162323,
-0.009673994034528732,
-0.3755668103694916,
-0.06564237177371979,
0.08992074429988861,
-0.30529919266700745,
-0.0026897992938756943,
-0.096856027841568,
-0.2038329839706421,
-0.21202293038368225,
-0.16117751598358154,
-0.00643979012966156,
-0.17208978533744812,
0.052725255489349365,
-0.09541261196136475,
0.2716251313686371,
-0.22424465417861938,
-0.08387231081724167,
0.005949568003416061,
-0.2375606745481491,
0.16675999760627747,
-0.07831117510795593,
-0.3555428087711334,
-0.11552851647138596,
-0.5387837290763855,
0.3509911894798279,
-0.09951397776603699,
0.08337792009115219,
-0.17881081998348236,
0.04309605807065964,
0.18945252895355225,
-0.04780786111950874,
0.605922281742096,
-0.29655107855796814,
0.03835909068584442,
0.22590909898281097,
-0.10697883367538452,
-0.49117791652679443,
-0.103556327521801,
-0.17874398827552795,
0.3905627727508545,
0.006684565916657448,
0.5836243629455566,
-0.25484201312065125,
-0.03250683844089508,
-0.09976693987846375,
-0.07121393084526062,
-0.13481630384922028,
0.1880328357219696,
-0.15081222355365753,
-0.31606078147888184,
-0.4655393064022064,
0.11179584264755249,
0.007667073979973793,
0.21079127490520477,
-0.1736883670091629,
-0.002082090824842453,
-0.020650791004300117,
0.0053708963096141815,
-0.20017312467098236,
0.026250284165143967,
0.2587311267852783,
0.15110790729522705,
0.11040142178535461,
0.22226187586784363,
0.06015601009130478,
0.11622178554534912,
0.29807037115097046,
0.11423283815383911,
-0.06367717683315277,
0.06881743669509888,
-0.0385865718126297,
0.1946277916431427,
0.119477778673172,
-0.08700450509786606,
0.11818303167819977,
-0.033058974891901016,
0.13299748301506042,
-0.10821762681007385,
0.2075543850660324,
0.2141469269990921,
0.08033078908920288,
-0.056523438543081284,
-0.3456515073776245,
0.399822860956192,
0.07285267114639282,
-0.004899755120277405,
0.38124290108680725,
-0.03727368265390396,
-0.2309427410364151,
0.4770488142967224,
0.1910463571548462,
0.7097317576408386,
-0.05838436633348465,
0.1273352950811386,
0.3959961533546448,
0.1893109381198883,
0.5711795091629028,
0.03645993769168854,
0.11875733733177185,
-0.46333253383636475,
-0.07829533517360687,
-0.03873136639595032,
0.023796256631612778,
0.0906006321310997,
0.020567160099744797,
-0.48646780848503113,
0.13530299067497253,
-0.2419554591178894,
0.018353573977947235,
-0.2849994897842407,
0.3904263377189636,
-0.22006608545780182,
-0.12183180451393127,
0.1830069124698639,
0.22899514436721802,
-0.25974828004837036,
0.3744601905345917,
-0.03798806294798851,
-0.10575646907091141,
-0.04059038311243057,
-0.3184075355529785,
-0.3879995346069336,
0.18348369002342224,
-0.24372293055057526,
0.6665697693824768,
-0.16427339613437653,
-0.3237501382827759,
0.03729616105556488,
0.3030257225036621,
0.06916086375713348,
0.064813531935215,
-0.14104487001895905,
0.05149533227086067,
-0.04300500452518463,
-0.17604364454746246,
0.07645384967327118,
-0.03144179657101631,
0.34275954961776733,
-0.0814308375120163,
-0.22532671689987183,
0.29920822381973267,
0.05349235236644745,
-0.17647811770439148,
0.17312073707580566,
-0.0936339795589447,
-0.027008086442947388,
-0.5017265677452087,
-0.2544344663619995,
-0.08874033391475677,
-0.319990873336792,
-0.30036401748657227,
0.11588782072067261,
-0.10518386960029602,
0.10083524882793427,
0.1440897285938263,
0.0020701326429843903,
0.030001625418663025,
0.09683629870414734,
0.5596948266029358,
-0.029877327382564545,
0.2831663489341736,
0.5352457761764526,
0.3073682487010956,
-0.1873098909854889,
-0.22526827454566956,
0.05681709200143814,
-0.022312460467219353,
-0.1304154247045517,
0.13161861896514893,
0.047918651252985,
0.03231038153171539,
-0.06732942163944244,
0.6074984669685364,
0.21248272061347961,
0.018627509474754333,
-0.24046097695827484,
-0.12279857695102692,
-0.37875184416770935,
0.25533753633499146,
-0.013729143887758255,
0.26868075132369995,
0.14105495810508728,
-0.05577230826020241,
0.10077275335788727,
0.004142414778470993,
-0.3299325406551361,
0.023612912744283676,
-0.48920971155166626,
-0.03248194605112076,
0.5329432487487793,
-0.28666597604751587,
0.04373366758227348,
-0.1450989991426468,
0.16419823467731476,
0.1687866896390915,
-0.05920924246311188,
-0.25963348150253296,
0.11275503039360046,
0.02437993884086609,
0.1439807116985321,
-0.15420234203338623,
-0.24141144752502441,
-0.2986082434654236,
-0.18404905498027802,
-0.15526841580867767,
0.05834608152508736,
0.2394232153892517,
-0.08322811126708984,
0.009024818427860737,
0.04524336755275726,
0.16640403866767883,
-0.17410652339458466,
-0.02617645263671875,
0.017289265990257263,
0.020542941987514496,
-0.11061041057109833,
0.1950448602437973,
0.28023970127105713,
-0.05793572962284088,
-0.31768810749053955,
0.10625907778739929,
0.09238170832395554,
0.22029179334640503,
0.3055327832698822,
-0.307525634765625,
-0.12839749455451965,
0.08001332730054855,
0.2587728500366211,
0.11910652369260788,
-0.16067877411842346,
-0.0961332619190216,
0.24923861026763916,
0.2378358095884323,
-0.28792959451675415,
-0.1679440587759018,
0.20640869438648224,
-0.1806030571460724,
0.031647857278585434,
-0.16450390219688416,
0.18262609839439392,
0.08559355139732361,
-0.5627009272575378,
0.2778642177581787,
0.6208097338676453,
-0.27150100469589233,
0.10375361144542694,
0.33064642548561096,
-0.1416223645210266,
-0.085502028465271,
0.374433696269989,
0.24710701406002045,
0.1989918053150177,
0.37102454900741577,
0.10279660671949387,
0.3195635974407196,
0.11608114838600159,
0.07658205181360245,
0.15229615569114685,
-0.5786861777305603,
0.13532257080078125,
-0.21423134207725525,
-0.31858646869659424,
-0.03673815727233887,
-0.06891684234142303,
0.1564415991306305,
-0.46050727367401123,
-0.2527896761894226,
-0.24773821234703064,
0.39825403690338135,
-0.44157034158706665,
0.10705186426639557,
-0.2652190625667572,
-0.041372090578079224,
0.21498411893844604,
0.1461450606584549,
-0.10677307844161987,
-0.08289211988449097,
0.39346227049827576,
-0.03444290906190872,
-0.2168569713830948,
0.1463870406150818,
-0.04422513395547867,
0.05362606421113014,
0.1968647539615631,
-0.23523321747779846,
0.08461987227201462,
0.08095494657754898,
0.05779459699988365,
-0.592361569404602,
0.297459214925766,
0.5952131748199463,
0.04066653177142143,
-0.2140021026134491,
0.2292972207069397,
0.1213483214378357,
-0.0508432611823082,
0.1087493896484375,
-0.0864148661494255,
0.03299468010663986,
0.20004217326641083,
0.3204498291015625,
0.24780741333961487,
-0.1722237914800644,
0.06748403608798981,
0.17034602165222168,
0.3692936897277832,
-0.006277036853134632,
-0.10727716237306595,
0.0803927332162857,
-0.3707972764968872,
-0.009129848331212997,
0.020115576684474945,
-0.34384769201278687,
0.09652688354253769,
0.6157698035240173,
0.1697746068239212,
0.19134575128555298,
-0.1806834489107132,
0.128647118806839,
-0.012757495045661926,
0.27692702412605286,
0.21394766867160797,
-0.0006612762808799744,
-0.3684422969818115,
0.2249792069196701,
-0.4956749975681305,
0.13733310997486115,
0.08699880540370941,
-0.21549129486083984,
-0.009299732744693756,
-0.0005271565169095993,
0.2668374180793762,
-0.013156414031982422,
-0.1306966096162796,
0.13080739974975586,
0.05205955356359482,
0.08468511700630188,
-0.22190825641155243,
-0.00972917303442955,
-0.03260769695043564,
-0.02727429009974003,
0.08261395990848541,
-0.3350195288658142,
0.343911349773407,
-0.04685252532362938,
0.13716360926628113,
-0.13825227320194244,
-0.2501172423362732,
0.25050124526023865,
-0.2741957902908325,
0.5549745559692383,
-0.2441457211971283,
0.5613475441932678,
-0.16591909527778625,
0.07089744508266449,
0.06837731599807739,
-0.19408553838729858,
-0.15034355223178864,
-0.010258428752422333,
0.0018272437155246735,
0.4267117381095886,
-0.16388092935085297,
0.3537280559539795,
-0.398988276720047,
-0.00480501726269722,
-0.129908949136734,
0.20125983655452728,
-0.1757214367389679,
-0.039600566029548645,
-0.20287087559700012,
-0.12603925168514252,
0.1865130215883255,
0.23655235767364502,
-0.011244043707847595,
0.1595025658607483,
-0.34512972831726074,
-0.40633776783943176,
0.6743068695068359,
-0.2313329428434372,
-0.22282320261001587,
-0.21850049495697021,
-0.04572118818759918,
0.2212742567062378,
0.1505010575056076,
-0.19260749220848083,
-0.008943378925323486,
0.32701557874679565,
-0.02065020054578781,
-0.24006929993629456,
-0.03958507999777794,
-0.027633730322122574,
0.00228235125541687,
-0.03804779425263405,
0.2880873382091522,
-0.23654162883758545,
-0.14879433810710907,
-0.028872255235910416,
-0.1439053863286972
] |
https://github.com/huggingface/datasets/issues/5963
|
Got an error _pickle.PicklingError use Dataset.from_spark.
|
Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR
|
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 16
|
Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR
|
[
-0.48843836784362793,
-0.16567078232765198,
0.023851748555898666,
0.34239310026168823,
0.2954638600349426,
-0.00167025625705719,
0.5267862677574158,
0.13773883879184723,
0.08715450763702393,
0.09700313955545425,
0.08231282234191895,
0.6951185464859009,
-0.18221792578697205,
0.5347052812576294,
-0.2312408685684204,
-0.06934317201375961,
-0.047049738466739655,
0.03926501423120499,
-0.10985314846038818,
0.12908263504505157,
-0.14200036227703094,
0.16121806204319,
-0.01808229833841324,
0.21399211883544922,
-0.48433321714401245,
-0.23130908608436584,
0.006972150877118111,
0.031542036682367325,
0.018942544236779213,
-0.3429161012172699,
0.31343868374824524,
-0.24542847275733948,
0.20131416618824005,
0.4949148893356323,
-0.00010675491648726165,
0.015672847628593445,
0.2840091288089752,
0.028392689302563667,
-0.3145979940891266,
-0.30959516763687134,
0.13471239805221558,
-0.1977892816066742,
0.2964380383491516,
-0.4391089081764221,
-0.08369480818510056,
0.43250542879104614,
-0.080173060297966,
-0.1386430561542511,
0.5478287935256958,
0.24734258651733398,
0.2701519727706909,
0.4517422318458557,
0.19916574656963348,
-0.04003120958805084,
-0.14390340447425842,
-0.017338663339614868,
-0.15435542166233063,
0.3208446204662323,
-0.019979417324066162,
0.15240837633609772,
-0.044224075973033905,
0.07639852166175842,
-0.19006817042827606,
0.034042201936244965,
0.26666098833084106,
-0.029710691422224045,
-0.2939791679382324,
-0.38670289516448975,
0.26570528745651245,
0.0881635993719101,
0.7293926477432251,
-0.36226576566696167,
-0.1720624715089798,
-0.15281936526298523,
0.04290801286697388,
-0.19324389100074768,
0.30221933126449585,
-0.05532754212617874,
-0.10377642512321472,
-0.00031675398349761963,
-0.04705844074487686,
-0.3268238306045532,
-0.05620463564991951,
-0.0913035124540329,
-0.07042386382818222,
0.36940997838974,
-0.17559343576431274,
0.36690324544906616,
0.14398419857025146,
-0.08147239685058594,
0.16355164349079132,
-0.14458823204040527,
0.24547968804836273,
-0.11824534833431244,
-0.1676562875509262,
-0.0764617770910263,
-0.0570451095700264,
-0.37988346815109253,
-0.16584044694900513,
-0.009235627949237823,
0.05166703835129738,
0.10566220432519913,
-0.0690288096666336,
0.14064615964889526,
0.3917168378829956,
0.09503099322319031,
0.2594355344772339,
0.3108329474925995,
0.16589270532131195,
-0.14966589212417603,
-0.03248230740427971,
-0.048194341361522675,
-0.1193542405962944,
-0.10702993720769882,
0.053755175322294235,
0.15937215089797974,
0.21017976105213165,
-0.06752168387174606,
-0.2595708668231964,
-0.05292876809835434,
-0.10199028253555298,
0.024705801159143448,
-0.11639494448900223,
0.16270041465759277,
0.028387870639562607,
-0.040096744894981384,
-0.032443705946207047,
0.10582724213600159,
-0.017817819491028786,
0.015076951123774052,
-0.2311922013759613,
0.13124492764472961,
0.014009121805429459,
0.01036832109093666,
-0.04755803197622299,
-0.5940123200416565,
0.40823981165885925,
-0.02465188130736351,
-0.313997745513916,
0.08029532432556152,
0.15338557958602905,
-0.2402249127626419,
-0.3045225441455841,
0.12046806514263153,
0.13187769055366516,
0.36227232217788696,
0.3059765696525574,
-0.30505281686782837,
-0.1115986779332161,
0.05256521329283714,
-0.23978284001350403,
-0.1837444305419922,
-0.4008563160896301,
0.15959344804286957,
-0.04063744097948074,
-0.18304115533828735,
-0.528272271156311,
0.025700034573674202,
0.22662127017974854,
-0.19141963124275208,
0.00035475194454193115,
-0.24663497507572174,
-0.19719694554805756,
-0.35548585653305054,
0.1952570229768753,
0.39520877599716187,
-0.6636566519737244,
0.021360009908676147,
-0.09458788484334946,
0.03670884668827057,
0.3128219544887543,
0.082523874938488,
-0.21855242550373077,
0.26735007762908936,
-0.23426945507526398,
0.475135862827301,
-0.008301086723804474,
-0.3230437636375427,
-0.22636859118938446,
0.1873060166835785,
-0.3762303590774536,
-0.012329734861850739,
-0.10326824337244034,
-0.03133905306458473,
0.22806097567081451,
0.03385843709111214,
0.1438177525997162,
0.1020207405090332,
0.1493072509765625,
-0.030295172706246376,
-0.15949077904224396,
-0.2731614112854004,
0.17278987169265747,
-0.12851139903068542,
0.16508373618125916,
-0.19789162278175354,
0.12478789687156677,
-0.008597278967499733,
0.12712767720222473,
0.0008042566478252411,
0.12674520909786224,
0.23162183165550232,
0.1102672666311264,
0.1188155934214592,
-0.31191083788871765,
0.03500097244977951,
-0.3804396390914917,
0.30553296208381653,
0.36301538348197937,
0.07688890397548676,
-0.11076869070529938,
-0.2604902982711792,
-0.20685052871704102,
0.06102261692285538,
-0.2146265059709549,
-0.12947280704975128,
0.19948022067546844,
0.09192105382680893,
-0.09647372364997864,
0.07802440226078033,
0.061625007539987564,
-0.022376781329512596,
-0.07934525609016418,
-0.038797616958618164,
-0.13557550311088562,
0.39753109216690063,
-0.3191071152687073,
-0.2832925021648407,
0.03295382857322693,
-0.07399845868349075,
0.17085739970207214,
-0.010677739046514034,
-0.19196361303329468,
0.35257601737976074,
-0.06221242621541023,
0.15735572576522827,
-0.03844179958105087,
0.019170045852661133,
0.15164968371391296,
-0.028478169813752174,
0.12909117341041565,
0.17126210033893585,
0.12526027858257294,
-0.020884227007627487,
-0.10580023378133774,
0.2479894459247589,
0.04871523380279541,
-0.09727369993925095,
-0.19723595678806305,
0.19235248863697052,
0.11158676445484161,
0.10080720484256744,
0.09383725374937057,
-0.049340926110744476,
-0.1718691885471344,
-0.14005599915981293,
0.19607345759868622,
0.03694631904363632,
-0.47808539867401123,
0.18733814358711243,
0.40580040216445923,
0.23102137446403503,
0.3625018000602722,
0.0966104194521904,
-0.33287447690963745,
-0.14528393745422363,
0.42571961879730225,
0.1739799529314041,
0.30080848932266235,
0.08521910756826401,
-0.03693191334605217,
-0.1324012279510498,
0.10147856920957565,
-0.05890168622136116,
0.2009194791316986,
0.0808069109916687,
0.3763670325279236,
0.25234872102737427,
-0.012854216620326042,
0.09227656573057175,
-0.2208462357521057,
-0.0842038094997406,
0.09818857163190842,
0.20588891208171844,
-0.27317363023757935,
0.09283442795276642,
-0.27633556723594666,
0.04196051508188248,
0.07038291543722153,
0.17701356112957,
-0.08736677467823029,
-0.20921240746974945,
-0.17466357350349426,
0.5300976634025574,
0.10164295136928558,
0.12700282037258148,
0.043608833104372025,
0.015958815813064575,
0.29521122574806213,
0.10761503130197525,
-0.26770997047424316,
-0.290486603975296,
-0.29971227049827576,
0.10567115247249603,
0.18442478775978088,
0.04363801330327988,
0.1334962546825409,
0.2797306180000305,
0.0916006788611412,
-0.557253360748291,
-0.0744720995426178,
-0.008995138108730316,
-0.35501164197921753,
0.3088332712650299,
0.12117008864879608,
0.3123682141304016,
-0.44169485569000244,
-0.42228779196739197,
0.1773485690355301,
-0.03513238579034805,
-0.0618145614862442,
0.1698974072933197,
0.05092886462807655,
-0.014581141993403435,
0.03782157227396965,
-0.28063714504241943,
-0.4596291482448578,
-0.4042501449584961,
0.18550531566143036,
0.07152260839939117,
-0.015743501484394073,
0.2632717788219452,
0.2631888687610626,
0.32249993085861206,
0.2026597410440445,
-0.2776326537132263,
-0.16388367116451263,
-0.03746320679783821,
0.24195733666419983,
-0.11848627030849457,
-0.3290320038795471,
0.07159607112407684,
0.07021569460630417,
0.2398902177810669,
-0.28412532806396484,
-0.38337481021881104,
-0.12762045860290527,
0.07998009026050568,
0.36156177520751953,
-0.04471006989479065,
-0.04691002517938614,
0.41042834520339966,
0.2838413417339325,
-0.09939135611057281,
0.03338029235601425,
-0.049174364656209946,
0.05090905353426933,
0.22924283146858215,
0.09917768090963364,
0.05004890635609627,
0.41635385155677795,
0.04946411773562431,
0.6712241768836975,
0.015484865754842758,
-0.3020525276660919,
0.4118693470954895,
-0.20362649857997894,
0.12222015857696533,
-0.21766740083694458,
-0.389110267162323,
-0.009673994034528732,
-0.3755668103694916,
-0.06564237177371979,
0.08992074429988861,
-0.30529919266700745,
-0.0026897992938756943,
-0.096856027841568,
-0.2038329839706421,
-0.21202293038368225,
-0.16117751598358154,
-0.00643979012966156,
-0.17208978533744812,
0.052725255489349365,
-0.09541261196136475,
0.2716251313686371,
-0.22424465417861938,
-0.08387231081724167,
0.005949568003416061,
-0.2375606745481491,
0.16675999760627747,
-0.07831117510795593,
-0.3555428087711334,
-0.11552851647138596,
-0.5387837290763855,
0.3509911894798279,
-0.09951397776603699,
0.08337792009115219,
-0.17881081998348236,
0.04309605807065964,
0.18945252895355225,
-0.04780786111950874,
0.605922281742096,
-0.29655107855796814,
0.03835909068584442,
0.22590909898281097,
-0.10697883367538452,
-0.49117791652679443,
-0.103556327521801,
-0.17874398827552795,
0.3905627727508545,
0.006684565916657448,
0.5836243629455566,
-0.25484201312065125,
-0.03250683844089508,
-0.09976693987846375,
-0.07121393084526062,
-0.13481630384922028,
0.1880328357219696,
-0.15081222355365753,
-0.31606078147888184,
-0.4655393064022064,
0.11179584264755249,
0.007667073979973793,
0.21079127490520477,
-0.1736883670091629,
-0.002082090824842453,
-0.020650791004300117,
0.0053708963096141815,
-0.20017312467098236,
0.026250284165143967,
0.2587311267852783,
0.15110790729522705,
0.11040142178535461,
0.22226187586784363,
0.06015601009130478,
0.11622178554534912,
0.29807037115097046,
0.11423283815383911,
-0.06367717683315277,
0.06881743669509888,
-0.0385865718126297,
0.1946277916431427,
0.119477778673172,
-0.08700450509786606,
0.11818303167819977,
-0.033058974891901016,
0.13299748301506042,
-0.10821762681007385,
0.2075543850660324,
0.2141469269990921,
0.08033078908920288,
-0.056523438543081284,
-0.3456515073776245,
0.399822860956192,
0.07285267114639282,
-0.004899755120277405,
0.38124290108680725,
-0.03727368265390396,
-0.2309427410364151,
0.4770488142967224,
0.1910463571548462,
0.7097317576408386,
-0.05838436633348465,
0.1273352950811386,
0.3959961533546448,
0.1893109381198883,
0.5711795091629028,
0.03645993769168854,
0.11875733733177185,
-0.46333253383636475,
-0.07829533517360687,
-0.03873136639595032,
0.023796256631612778,
0.0906006321310997,
0.020567160099744797,
-0.48646780848503113,
0.13530299067497253,
-0.2419554591178894,
0.018353573977947235,
-0.2849994897842407,
0.3904263377189636,
-0.22006608545780182,
-0.12183180451393127,
0.1830069124698639,
0.22899514436721802,
-0.25974828004837036,
0.3744601905345917,
-0.03798806294798851,
-0.10575646907091141,
-0.04059038311243057,
-0.3184075355529785,
-0.3879995346069336,
0.18348369002342224,
-0.24372293055057526,
0.6665697693824768,
-0.16427339613437653,
-0.3237501382827759,
0.03729616105556488,
0.3030257225036621,
0.06916086375713348,
0.064813531935215,
-0.14104487001895905,
0.05149533227086067,
-0.04300500452518463,
-0.17604364454746246,
0.07645384967327118,
-0.03144179657101631,
0.34275954961776733,
-0.0814308375120163,
-0.22532671689987183,
0.29920822381973267,
0.05349235236644745,
-0.17647811770439148,
0.17312073707580566,
-0.0936339795589447,
-0.027008086442947388,
-0.5017265677452087,
-0.2544344663619995,
-0.08874033391475677,
-0.319990873336792,
-0.30036401748657227,
0.11588782072067261,
-0.10518386960029602,
0.10083524882793427,
0.1440897285938263,
0.0020701326429843903,
0.030001625418663025,
0.09683629870414734,
0.5596948266029358,
-0.029877327382564545,
0.2831663489341736,
0.5352457761764526,
0.3073682487010956,
-0.1873098909854889,
-0.22526827454566956,
0.05681709200143814,
-0.022312460467219353,
-0.1304154247045517,
0.13161861896514893,
0.047918651252985,
0.03231038153171539,
-0.06732942163944244,
0.6074984669685364,
0.21248272061347961,
0.018627509474754333,
-0.24046097695827484,
-0.12279857695102692,
-0.37875184416770935,
0.25533753633499146,
-0.013729143887758255,
0.26868075132369995,
0.14105495810508728,
-0.05577230826020241,
0.10077275335788727,
0.004142414778470993,
-0.3299325406551361,
0.023612912744283676,
-0.48920971155166626,
-0.03248194605112076,
0.5329432487487793,
-0.28666597604751587,
0.04373366758227348,
-0.1450989991426468,
0.16419823467731476,
0.1687866896390915,
-0.05920924246311188,
-0.25963348150253296,
0.11275503039360046,
0.02437993884086609,
0.1439807116985321,
-0.15420234203338623,
-0.24141144752502441,
-0.2986082434654236,
-0.18404905498027802,
-0.15526841580867767,
0.05834608152508736,
0.2394232153892517,
-0.08322811126708984,
0.009024818427860737,
0.04524336755275726,
0.16640403866767883,
-0.17410652339458466,
-0.02617645263671875,
0.017289265990257263,
0.020542941987514496,
-0.11061041057109833,
0.1950448602437973,
0.28023970127105713,
-0.05793572962284088,
-0.31768810749053955,
0.10625907778739929,
0.09238170832395554,
0.22029179334640503,
0.3055327832698822,
-0.307525634765625,
-0.12839749455451965,
0.08001332730054855,
0.2587728500366211,
0.11910652369260788,
-0.16067877411842346,
-0.0961332619190216,
0.24923861026763916,
0.2378358095884323,
-0.28792959451675415,
-0.1679440587759018,
0.20640869438648224,
-0.1806030571460724,
0.031647857278585434,
-0.16450390219688416,
0.18262609839439392,
0.08559355139732361,
-0.5627009272575378,
0.2778642177581787,
0.6208097338676453,
-0.27150100469589233,
0.10375361144542694,
0.33064642548561096,
-0.1416223645210266,
-0.085502028465271,
0.374433696269989,
0.24710701406002045,
0.1989918053150177,
0.37102454900741577,
0.10279660671949387,
0.3195635974407196,
0.11608114838600159,
0.07658205181360245,
0.15229615569114685,
-0.5786861777305603,
0.13532257080078125,
-0.21423134207725525,
-0.31858646869659424,
-0.03673815727233887,
-0.06891684234142303,
0.1564415991306305,
-0.46050727367401123,
-0.2527896761894226,
-0.24773821234703064,
0.39825403690338135,
-0.44157034158706665,
0.10705186426639557,
-0.2652190625667572,
-0.041372090578079224,
0.21498411893844604,
0.1461450606584549,
-0.10677307844161987,
-0.08289211988449097,
0.39346227049827576,
-0.03444290906190872,
-0.2168569713830948,
0.1463870406150818,
-0.04422513395547867,
0.05362606421113014,
0.1968647539615631,
-0.23523321747779846,
0.08461987227201462,
0.08095494657754898,
0.05779459699988365,
-0.592361569404602,
0.297459214925766,
0.5952131748199463,
0.04066653177142143,
-0.2140021026134491,
0.2292972207069397,
0.1213483214378357,
-0.0508432611823082,
0.1087493896484375,
-0.0864148661494255,
0.03299468010663986,
0.20004217326641083,
0.3204498291015625,
0.24780741333961487,
-0.1722237914800644,
0.06748403608798981,
0.17034602165222168,
0.3692936897277832,
-0.006277036853134632,
-0.10727716237306595,
0.0803927332162857,
-0.3707972764968872,
-0.009129848331212997,
0.020115576684474945,
-0.34384769201278687,
0.09652688354253769,
0.6157698035240173,
0.1697746068239212,
0.19134575128555298,
-0.1806834489107132,
0.128647118806839,
-0.012757495045661926,
0.27692702412605286,
0.21394766867160797,
-0.0006612762808799744,
-0.3684422969818115,
0.2249792069196701,
-0.4956749975681305,
0.13733310997486115,
0.08699880540370941,
-0.21549129486083984,
-0.009299732744693756,
-0.0005271565169095993,
0.2668374180793762,
-0.013156414031982422,
-0.1306966096162796,
0.13080739974975586,
0.05205955356359482,
0.08468511700630188,
-0.22190825641155243,
-0.00972917303442955,
-0.03260769695043564,
-0.02727429009974003,
0.08261395990848541,
-0.3350195288658142,
0.343911349773407,
-0.04685252532362938,
0.13716360926628113,
-0.13825227320194244,
-0.2501172423362732,
0.25050124526023865,
-0.2741957902908325,
0.5549745559692383,
-0.2441457211971283,
0.5613475441932678,
-0.16591909527778625,
0.07089744508266449,
0.06837731599807739,
-0.19408553838729858,
-0.15034355223178864,
-0.010258428752422333,
0.0018272437155246735,
0.4267117381095886,
-0.16388092935085297,
0.3537280559539795,
-0.398988276720047,
-0.00480501726269722,
-0.129908949136734,
0.20125983655452728,
-0.1757214367389679,
-0.039600566029548645,
-0.20287087559700012,
-0.12603925168514252,
0.1865130215883255,
0.23655235767364502,
-0.011244043707847595,
0.1595025658607483,
-0.34512972831726074,
-0.40633776783943176,
0.6743068695068359,
-0.2313329428434372,
-0.22282320261001587,
-0.21850049495697021,
-0.04572118818759918,
0.2212742567062378,
0.1505010575056076,
-0.19260749220848083,
-0.008943378925323486,
0.32701557874679565,
-0.02065020054578781,
-0.24006929993629456,
-0.03958507999777794,
-0.027633730322122574,
0.00228235125541687,
-0.03804779425263405,
0.2880873382091522,
-0.23654162883758545,
-0.14879433810710907,
-0.028872255235910416,
-0.1439053863286972
] |
https://github.com/huggingface/datasets/issues/5963
|
Got an error _pickle.PicklingError use Dataset.from_spark.
|
@maddiedawson can you show me the demo ,so i can test in local .before your PR
|
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 16
|
Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
@maddiedawson can you show me the demo ,so i can test in local .before your PR
|
[
-0.48843836784362793,
-0.16567078232765198,
0.023851748555898666,
0.34239310026168823,
0.2954638600349426,
-0.00167025625705719,
0.5267862677574158,
0.13773883879184723,
0.08715450763702393,
0.09700313955545425,
0.08231282234191895,
0.6951185464859009,
-0.18221792578697205,
0.5347052812576294,
-0.2312408685684204,
-0.06934317201375961,
-0.047049738466739655,
0.03926501423120499,
-0.10985314846038818,
0.12908263504505157,
-0.14200036227703094,
0.16121806204319,
-0.01808229833841324,
0.21399211883544922,
-0.48433321714401245,
-0.23130908608436584,
0.006972150877118111,
0.031542036682367325,
0.018942544236779213,
-0.3429161012172699,
0.31343868374824524,
-0.24542847275733948,
0.20131416618824005,
0.4949148893356323,
-0.00010675491648726165,
0.015672847628593445,
0.2840091288089752,
0.028392689302563667,
-0.3145979940891266,
-0.30959516763687134,
0.13471239805221558,
-0.1977892816066742,
0.2964380383491516,
-0.4391089081764221,
-0.08369480818510056,
0.43250542879104614,
-0.080173060297966,
-0.1386430561542511,
0.5478287935256958,
0.24734258651733398,
0.2701519727706909,
0.4517422318458557,
0.19916574656963348,
-0.04003120958805084,
-0.14390340447425842,
-0.017338663339614868,
-0.15435542166233063,
0.3208446204662323,
-0.019979417324066162,
0.15240837633609772,
-0.044224075973033905,
0.07639852166175842,
-0.19006817042827606,
0.034042201936244965,
0.26666098833084106,
-0.029710691422224045,
-0.2939791679382324,
-0.38670289516448975,
0.26570528745651245,
0.0881635993719101,
0.7293926477432251,
-0.36226576566696167,
-0.1720624715089798,
-0.15281936526298523,
0.04290801286697388,
-0.19324389100074768,
0.30221933126449585,
-0.05532754212617874,
-0.10377642512321472,
-0.00031675398349761963,
-0.04705844074487686,
-0.3268238306045532,
-0.05620463564991951,
-0.0913035124540329,
-0.07042386382818222,
0.36940997838974,
-0.17559343576431274,
0.36690324544906616,
0.14398419857025146,
-0.08147239685058594,
0.16355164349079132,
-0.14458823204040527,
0.24547968804836273,
-0.11824534833431244,
-0.1676562875509262,
-0.0764617770910263,
-0.0570451095700264,
-0.37988346815109253,
-0.16584044694900513,
-0.009235627949237823,
0.05166703835129738,
0.10566220432519913,
-0.0690288096666336,
0.14064615964889526,
0.3917168378829956,
0.09503099322319031,
0.2594355344772339,
0.3108329474925995,
0.16589270532131195,
-0.14966589212417603,
-0.03248230740427971,
-0.048194341361522675,
-0.1193542405962944,
-0.10702993720769882,
0.053755175322294235,
0.15937215089797974,
0.21017976105213165,
-0.06752168387174606,
-0.2595708668231964,
-0.05292876809835434,
-0.10199028253555298,
0.024705801159143448,
-0.11639494448900223,
0.16270041465759277,
0.028387870639562607,
-0.040096744894981384,
-0.032443705946207047,
0.10582724213600159,
-0.017817819491028786,
0.015076951123774052,
-0.2311922013759613,
0.13124492764472961,
0.014009121805429459,
0.01036832109093666,
-0.04755803197622299,
-0.5940123200416565,
0.40823981165885925,
-0.02465188130736351,
-0.313997745513916,
0.08029532432556152,
0.15338557958602905,
-0.2402249127626419,
-0.3045225441455841,
0.12046806514263153,
0.13187769055366516,
0.36227232217788696,
0.3059765696525574,
-0.30505281686782837,
-0.1115986779332161,
0.05256521329283714,
-0.23978284001350403,
-0.1837444305419922,
-0.4008563160896301,
0.15959344804286957,
-0.04063744097948074,
-0.18304115533828735,
-0.528272271156311,
0.025700034573674202,
0.22662127017974854,
-0.19141963124275208,
0.00035475194454193115,
-0.24663497507572174,
-0.19719694554805756,
-0.35548585653305054,
0.1952570229768753,
0.39520877599716187,
-0.6636566519737244,
0.021360009908676147,
-0.09458788484334946,
0.03670884668827057,
0.3128219544887543,
0.082523874938488,
-0.21855242550373077,
0.26735007762908936,
-0.23426945507526398,
0.475135862827301,
-0.008301086723804474,
-0.3230437636375427,
-0.22636859118938446,
0.1873060166835785,
-0.3762303590774536,
-0.012329734861850739,
-0.10326824337244034,
-0.03133905306458473,
0.22806097567081451,
0.03385843709111214,
0.1438177525997162,
0.1020207405090332,
0.1493072509765625,
-0.030295172706246376,
-0.15949077904224396,
-0.2731614112854004,
0.17278987169265747,
-0.12851139903068542,
0.16508373618125916,
-0.19789162278175354,
0.12478789687156677,
-0.008597278967499733,
0.12712767720222473,
0.0008042566478252411,
0.12674520909786224,
0.23162183165550232,
0.1102672666311264,
0.1188155934214592,
-0.31191083788871765,
0.03500097244977951,
-0.3804396390914917,
0.30553296208381653,
0.36301538348197937,
0.07688890397548676,
-0.11076869070529938,
-0.2604902982711792,
-0.20685052871704102,
0.06102261692285538,
-0.2146265059709549,
-0.12947280704975128,
0.19948022067546844,
0.09192105382680893,
-0.09647372364997864,
0.07802440226078033,
0.061625007539987564,
-0.022376781329512596,
-0.07934525609016418,
-0.038797616958618164,
-0.13557550311088562,
0.39753109216690063,
-0.3191071152687073,
-0.2832925021648407,
0.03295382857322693,
-0.07399845868349075,
0.17085739970207214,
-0.010677739046514034,
-0.19196361303329468,
0.35257601737976074,
-0.06221242621541023,
0.15735572576522827,
-0.03844179958105087,
0.019170045852661133,
0.15164968371391296,
-0.028478169813752174,
0.12909117341041565,
0.17126210033893585,
0.12526027858257294,
-0.020884227007627487,
-0.10580023378133774,
0.2479894459247589,
0.04871523380279541,
-0.09727369993925095,
-0.19723595678806305,
0.19235248863697052,
0.11158676445484161,
0.10080720484256744,
0.09383725374937057,
-0.049340926110744476,
-0.1718691885471344,
-0.14005599915981293,
0.19607345759868622,
0.03694631904363632,
-0.47808539867401123,
0.18733814358711243,
0.40580040216445923,
0.23102137446403503,
0.3625018000602722,
0.0966104194521904,
-0.33287447690963745,
-0.14528393745422363,
0.42571961879730225,
0.1739799529314041,
0.30080848932266235,
0.08521910756826401,
-0.03693191334605217,
-0.1324012279510498,
0.10147856920957565,
-0.05890168622136116,
0.2009194791316986,
0.0808069109916687,
0.3763670325279236,
0.25234872102737427,
-0.012854216620326042,
0.09227656573057175,
-0.2208462357521057,
-0.0842038094997406,
0.09818857163190842,
0.20588891208171844,
-0.27317363023757935,
0.09283442795276642,
-0.27633556723594666,
0.04196051508188248,
0.07038291543722153,
0.17701356112957,
-0.08736677467823029,
-0.20921240746974945,
-0.17466357350349426,
0.5300976634025574,
0.10164295136928558,
0.12700282037258148,
0.043608833104372025,
0.015958815813064575,
0.29521122574806213,
0.10761503130197525,
-0.26770997047424316,
-0.290486603975296,
-0.29971227049827576,
0.10567115247249603,
0.18442478775978088,
0.04363801330327988,
0.1334962546825409,
0.2797306180000305,
0.0916006788611412,
-0.557253360748291,
-0.0744720995426178,
-0.008995138108730316,
-0.35501164197921753,
0.3088332712650299,
0.12117008864879608,
0.3123682141304016,
-0.44169485569000244,
-0.42228779196739197,
0.1773485690355301,
-0.03513238579034805,
-0.0618145614862442,
0.1698974072933197,
0.05092886462807655,
-0.014581141993403435,
0.03782157227396965,
-0.28063714504241943,
-0.4596291482448578,
-0.4042501449584961,
0.18550531566143036,
0.07152260839939117,
-0.015743501484394073,
0.2632717788219452,
0.2631888687610626,
0.32249993085861206,
0.2026597410440445,
-0.2776326537132263,
-0.16388367116451263,
-0.03746320679783821,
0.24195733666419983,
-0.11848627030849457,
-0.3290320038795471,
0.07159607112407684,
0.07021569460630417,
0.2398902177810669,
-0.28412532806396484,
-0.38337481021881104,
-0.12762045860290527,
0.07998009026050568,
0.36156177520751953,
-0.04471006989479065,
-0.04691002517938614,
0.41042834520339966,
0.2838413417339325,
-0.09939135611057281,
0.03338029235601425,
-0.049174364656209946,
0.05090905353426933,
0.22924283146858215,
0.09917768090963364,
0.05004890635609627,
0.41635385155677795,
0.04946411773562431,
0.6712241768836975,
0.015484865754842758,
-0.3020525276660919,
0.4118693470954895,
-0.20362649857997894,
0.12222015857696533,
-0.21766740083694458,
-0.389110267162323,
-0.009673994034528732,
-0.3755668103694916,
-0.06564237177371979,
0.08992074429988861,
-0.30529919266700745,
-0.0026897992938756943,
-0.096856027841568,
-0.2038329839706421,
-0.21202293038368225,
-0.16117751598358154,
-0.00643979012966156,
-0.17208978533744812,
0.052725255489349365,
-0.09541261196136475,
0.2716251313686371,
-0.22424465417861938,
-0.08387231081724167,
0.005949568003416061,
-0.2375606745481491,
0.16675999760627747,
-0.07831117510795593,
-0.3555428087711334,
-0.11552851647138596,
-0.5387837290763855,
0.3509911894798279,
-0.09951397776603699,
0.08337792009115219,
-0.17881081998348236,
0.04309605807065964,
0.18945252895355225,
-0.04780786111950874,
0.605922281742096,
-0.29655107855796814,
0.03835909068584442,
0.22590909898281097,
-0.10697883367538452,
-0.49117791652679443,
-0.103556327521801,
-0.17874398827552795,
0.3905627727508545,
0.006684565916657448,
0.5836243629455566,
-0.25484201312065125,
-0.03250683844089508,
-0.09976693987846375,
-0.07121393084526062,
-0.13481630384922028,
0.1880328357219696,
-0.15081222355365753,
-0.31606078147888184,
-0.4655393064022064,
0.11179584264755249,
0.007667073979973793,
0.21079127490520477,
-0.1736883670091629,
-0.002082090824842453,
-0.020650791004300117,
0.0053708963096141815,
-0.20017312467098236,
0.026250284165143967,
0.2587311267852783,
0.15110790729522705,
0.11040142178535461,
0.22226187586784363,
0.06015601009130478,
0.11622178554534912,
0.29807037115097046,
0.11423283815383911,
-0.06367717683315277,
0.06881743669509888,
-0.0385865718126297,
0.1946277916431427,
0.119477778673172,
-0.08700450509786606,
0.11818303167819977,
-0.033058974891901016,
0.13299748301506042,
-0.10821762681007385,
0.2075543850660324,
0.2141469269990921,
0.08033078908920288,
-0.056523438543081284,
-0.3456515073776245,
0.399822860956192,
0.07285267114639282,
-0.004899755120277405,
0.38124290108680725,
-0.03727368265390396,
-0.2309427410364151,
0.4770488142967224,
0.1910463571548462,
0.7097317576408386,
-0.05838436633348465,
0.1273352950811386,
0.3959961533546448,
0.1893109381198883,
0.5711795091629028,
0.03645993769168854,
0.11875733733177185,
-0.46333253383636475,
-0.07829533517360687,
-0.03873136639595032,
0.023796256631612778,
0.0906006321310997,
0.020567160099744797,
-0.48646780848503113,
0.13530299067497253,
-0.2419554591178894,
0.018353573977947235,
-0.2849994897842407,
0.3904263377189636,
-0.22006608545780182,
-0.12183180451393127,
0.1830069124698639,
0.22899514436721802,
-0.25974828004837036,
0.3744601905345917,
-0.03798806294798851,
-0.10575646907091141,
-0.04059038311243057,
-0.3184075355529785,
-0.3879995346069336,
0.18348369002342224,
-0.24372293055057526,
0.6665697693824768,
-0.16427339613437653,
-0.3237501382827759,
0.03729616105556488,
0.3030257225036621,
0.06916086375713348,
0.064813531935215,
-0.14104487001895905,
0.05149533227086067,
-0.04300500452518463,
-0.17604364454746246,
0.07645384967327118,
-0.03144179657101631,
0.34275954961776733,
-0.0814308375120163,
-0.22532671689987183,
0.29920822381973267,
0.05349235236644745,
-0.17647811770439148,
0.17312073707580566,
-0.0936339795589447,
-0.027008086442947388,
-0.5017265677452087,
-0.2544344663619995,
-0.08874033391475677,
-0.319990873336792,
-0.30036401748657227,
0.11588782072067261,
-0.10518386960029602,
0.10083524882793427,
0.1440897285938263,
0.0020701326429843903,
0.030001625418663025,
0.09683629870414734,
0.5596948266029358,
-0.029877327382564545,
0.2831663489341736,
0.5352457761764526,
0.3073682487010956,
-0.1873098909854889,
-0.22526827454566956,
0.05681709200143814,
-0.022312460467219353,
-0.1304154247045517,
0.13161861896514893,
0.047918651252985,
0.03231038153171539,
-0.06732942163944244,
0.6074984669685364,
0.21248272061347961,
0.018627509474754333,
-0.24046097695827484,
-0.12279857695102692,
-0.37875184416770935,
0.25533753633499146,
-0.013729143887758255,
0.26868075132369995,
0.14105495810508728,
-0.05577230826020241,
0.10077275335788727,
0.004142414778470993,
-0.3299325406551361,
0.023612912744283676,
-0.48920971155166626,
-0.03248194605112076,
0.5329432487487793,
-0.28666597604751587,
0.04373366758227348,
-0.1450989991426468,
0.16419823467731476,
0.1687866896390915,
-0.05920924246311188,
-0.25963348150253296,
0.11275503039360046,
0.02437993884086609,
0.1439807116985321,
-0.15420234203338623,
-0.24141144752502441,
-0.2986082434654236,
-0.18404905498027802,
-0.15526841580867767,
0.05834608152508736,
0.2394232153892517,
-0.08322811126708984,
0.009024818427860737,
0.04524336755275726,
0.16640403866767883,
-0.17410652339458466,
-0.02617645263671875,
0.017289265990257263,
0.020542941987514496,
-0.11061041057109833,
0.1950448602437973,
0.28023970127105713,
-0.05793572962284088,
-0.31768810749053955,
0.10625907778739929,
0.09238170832395554,
0.22029179334640503,
0.3055327832698822,
-0.307525634765625,
-0.12839749455451965,
0.08001332730054855,
0.2587728500366211,
0.11910652369260788,
-0.16067877411842346,
-0.0961332619190216,
0.24923861026763916,
0.2378358095884323,
-0.28792959451675415,
-0.1679440587759018,
0.20640869438648224,
-0.1806030571460724,
0.031647857278585434,
-0.16450390219688416,
0.18262609839439392,
0.08559355139732361,
-0.5627009272575378,
0.2778642177581787,
0.6208097338676453,
-0.27150100469589233,
0.10375361144542694,
0.33064642548561096,
-0.1416223645210266,
-0.085502028465271,
0.374433696269989,
0.24710701406002045,
0.1989918053150177,
0.37102454900741577,
0.10279660671949387,
0.3195635974407196,
0.11608114838600159,
0.07658205181360245,
0.15229615569114685,
-0.5786861777305603,
0.13532257080078125,
-0.21423134207725525,
-0.31858646869659424,
-0.03673815727233887,
-0.06891684234142303,
0.1564415991306305,
-0.46050727367401123,
-0.2527896761894226,
-0.24773821234703064,
0.39825403690338135,
-0.44157034158706665,
0.10705186426639557,
-0.2652190625667572,
-0.041372090578079224,
0.21498411893844604,
0.1461450606584549,
-0.10677307844161987,
-0.08289211988449097,
0.39346227049827576,
-0.03444290906190872,
-0.2168569713830948,
0.1463870406150818,
-0.04422513395547867,
0.05362606421113014,
0.1968647539615631,
-0.23523321747779846,
0.08461987227201462,
0.08095494657754898,
0.05779459699988365,
-0.592361569404602,
0.297459214925766,
0.5952131748199463,
0.04066653177142143,
-0.2140021026134491,
0.2292972207069397,
0.1213483214378357,
-0.0508432611823082,
0.1087493896484375,
-0.0864148661494255,
0.03299468010663986,
0.20004217326641083,
0.3204498291015625,
0.24780741333961487,
-0.1722237914800644,
0.06748403608798981,
0.17034602165222168,
0.3692936897277832,
-0.006277036853134632,
-0.10727716237306595,
0.0803927332162857,
-0.3707972764968872,
-0.009129848331212997,
0.020115576684474945,
-0.34384769201278687,
0.09652688354253769,
0.6157698035240173,
0.1697746068239212,
0.19134575128555298,
-0.1806834489107132,
0.128647118806839,
-0.012757495045661926,
0.27692702412605286,
0.21394766867160797,
-0.0006612762808799744,
-0.3684422969818115,
0.2249792069196701,
-0.4956749975681305,
0.13733310997486115,
0.08699880540370941,
-0.21549129486083984,
-0.009299732744693756,
-0.0005271565169095993,
0.2668374180793762,
-0.013156414031982422,
-0.1306966096162796,
0.13080739974975586,
0.05205955356359482,
0.08468511700630188,
-0.22190825641155243,
-0.00972917303442955,
-0.03260769695043564,
-0.02727429009974003,
0.08261395990848541,
-0.3350195288658142,
0.343911349773407,
-0.04685252532362938,
0.13716360926628113,
-0.13825227320194244,
-0.2501172423362732,
0.25050124526023865,
-0.2741957902908325,
0.5549745559692383,
-0.2441457211971283,
0.5613475441932678,
-0.16591909527778625,
0.07089744508266449,
0.06837731599807739,
-0.19408553838729858,
-0.15034355223178864,
-0.010258428752422333,
0.0018272437155246735,
0.4267117381095886,
-0.16388092935085297,
0.3537280559539795,
-0.398988276720047,
-0.00480501726269722,
-0.129908949136734,
0.20125983655452728,
-0.1757214367389679,
-0.039600566029548645,
-0.20287087559700012,
-0.12603925168514252,
0.1865130215883255,
0.23655235767364502,
-0.011244043707847595,
0.1595025658607483,
-0.34512972831726074,
-0.40633776783943176,
0.6743068695068359,
-0.2313329428434372,
-0.22282320261001587,
-0.21850049495697021,
-0.04572118818759918,
0.2212742567062378,
0.1505010575056076,
-0.19260749220848083,
-0.008943378925323486,
0.32701557874679565,
-0.02065020054578781,
-0.24006929993629456,
-0.03958507999777794,
-0.027633730322122574,
0.00228235125541687,
-0.03804779425263405,
0.2880873382091522,
-0.23654162883758545,
-0.14879433810710907,
-0.028872255235910416,
-0.1439053863286972
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
|
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_
| 29
|
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_
Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
|
[
-0.44223564863204956,
-0.3692322373390198,
-0.06835253536701202,
0.27588194608688354,
0.11674242466688156,
-0.10412313044071198,
0.3516828715801239,
0.1753961592912674,
-0.23171363770961761,
0.17232093214988708,
0.05940752476453781,
0.43877509236335754,
0.06595728546380997,
0.372668981552124,
0.09004688262939453,
-0.18046404421329498,
0.1029466763138771,
0.12207745015621185,
-0.08886188268661499,
-0.022771243005990982,
-0.1372409611940384,
0.28766053915023804,
-0.2456061840057373,
-0.22820858657360077,
-0.35833483934402466,
-0.05568062514066696,
-0.07193003594875336,
-0.03311897814273834,
0.0667596235871315,
-0.35073623061180115,
0.17200389504432678,
0.39411890506744385,
0.04701918363571167,
0.23696252703666687,
-0.00011776631436077878,
0.23223643004894257,
0.004200104624032974,
-0.2759920358657837,
-0.2046821117401123,
-0.07264968752861023,
-0.006534561514854431,
0.006195446476340294,
-0.38604846596717834,
-0.22474437952041626,
-0.38841521739959717,
-0.21072161197662354,
0.021153975278139114,
-0.2652752101421356,
0.1788845658302307,
0.012092464603483677,
0.11169230937957764,
0.2343195378780365,
-0.16449801623821259,
-0.027444427832961082,
0.12664180994033813,
0.371662974357605,
-0.18766701221466064,
-0.05426738038659096,
-0.13525573909282684,
0.1756727546453476,
0.00532984733581543,
0.4008309543132782,
0.07414145767688751,
0.3181436061859131,
0.0010997802019119263,
0.11506380140781403,
-0.2763510048389435,
-0.22283658385276794,
-0.15641844272613525,
0.3365003168582916,
0.13035085797309875,
-0.10671941190958023,
-0.30383262038230896,
-0.48364511132240295,
-0.1815495789051056,
-0.517069935798645,
-0.026827342808246613,
0.169120654463768,
-0.17800672352313995,
-0.016393084079027176,
-0.5005019307136536,
0.2114092856645584,
-0.08643288910388947,
-0.01613738387823105,
0.2986467182636261,
0.22806702554225922,
-0.1796131730079651,
0.3696741759777069,
0.2649461030960083,
0.2753243148326874,
-0.05386383831501007,
0.09909630566835403,
-0.1595826894044876,
-0.09595673531293869,
-0.5672719478607178,
-0.1297166794538498,
0.07915414124727249,
-0.08302182704210281,
0.44820407032966614,
0.4612792134284973,
0.17653235793113708,
0.07133376598358154,
0.33467191457748413,
-0.06588711589574814,
0.29585322737693787,
-0.38876834511756897,
0.2562045753002167,
0.06847791373729706,
-0.021751008927822113,
0.06712081283330917,
-0.03664319962263107,
-0.19051051139831543,
0.2151162177324295,
-0.2857314348220825,
-0.30616745352745056,
-0.06582532078027725,
0.4642757177352905,
-0.05457759648561478,
-0.22804315388202667,
-0.3311040997505188,
-0.27615588903427124,
-0.06941856443881989,
-0.06950799375772476,
0.35721826553344727,
0.25812676548957825,
-0.13638895750045776,
-0.42225879430770874,
0.1828978806734085,
-0.28040623664855957,
-0.3634776473045349,
-0.2048579752445221,
-0.24405430257320404,
-0.08737148344516754,
0.5787203907966614,
0.09329001605510712,
-0.24507206678390503,
0.4868803322315216,
0.1099749505519867,
0.06967367231845856,
-0.2997467517852783,
0.29617464542388916,
-0.23060700297355652,
0.18690744042396545,
0.3413865864276886,
0.15931636095046997,
0.18744206428527832,
-0.02762424573302269,
0.20828814804553986,
-0.27874600887298584,
0.21199515461921692,
-0.13609489798545837,
-0.5111355185508728,
0.5502055883407593,
0.052485208958387375,
0.021309081465005875,
0.06358553469181061,
-0.3261914849281311,
0.3357987403869629,
0.3378986418247223,
-0.15384066104888916,
0.11772559583187103,
0.03245863318443298,
-0.6220273375511169,
-0.2785220742225647,
0.33833181858062744,
0.42832374572753906,
0.07394355535507202,
-0.2616346478462219,
0.19385486841201782,
-0.15352973341941833,
0.3335307538509369,
0.48970091342926025,
-0.16523073613643646,
0.13086923956871033,
-0.35188692808151245,
0.41674506664276123,
0.11718302965164185,
-0.04943086579442024,
-0.29620030522346497,
0.34034615755081177,
-0.017063334584236145,
0.14537712931632996,
0.11695319414138794,
0.046099789440631866,
0.33529171347618103,
0.03506958484649658,
-0.030400432646274567,
0.18218424916267395,
-0.31604424118995667,
-0.026240449398756027,
-0.14892877638339996,
-0.051321834325790405,
0.09699767827987671,
0.04564164951443672,
-0.13462786376476288,
0.08206401765346527,
-0.1548028290271759,
-0.01584906317293644,
0.5204547047615051,
-0.12792816758155823,
0.1541270911693573,
0.08220678567886353,
0.4039243161678314,
-0.2117081731557846,
0.06767862290143967,
-0.004658006131649017,
-0.20439758896827698,
0.2447032630443573,
0.025716658681631088,
-0.00600196048617363,
0.2504894733428955,
-0.5058941841125488,
-0.12595650553703308,
-0.10816555470228195,
-0.105374276638031,
-0.34204012155532837,
0.021358154714107513,
0.047129929065704346,
0.2660631835460663,
-0.35695329308509827,
-0.24171698093414307,
0.14232498407363892,
-0.6382007598876953,
-0.034422993659973145,
-0.2798897325992584,
0.20917318761348724,
0.225943922996521,
-0.13431484997272491,
-0.07827288657426834,
-0.030998319387435913,
0.0721791684627533,
-0.41911548376083374,
0.10214991867542267,
0.3801400065422058,
0.3366478681564331,
0.015105552971363068,
-0.1474420726299286,
0.19309355318546295,
0.2735205590724945,
-0.09938210248947144,
-0.23746931552886963,
-0.04058210924267769,
-0.19596166908740997,
-0.18837495148181915,
-0.16556915640830994,
0.5435444712638855,
-0.10570639371871948,
0.451224684715271,
-0.026455892249941826,
-0.02192007750272751,
0.2053069770336151,
0.18244190514087677,
-0.2337341606616974,
-0.17431209981441498,
-0.030712682753801346,
-0.1626928448677063,
0.1555832028388977,
0.10259907692670822,
-0.38832566142082214,
0.1557433009147644,
0.35282933712005615,
0.15804430842399597,
-0.22062113881111145,
-0.0758296474814415,
0.07339701801538467,
-0.1094193160533905,
0.16182072460651398,
0.12053161859512329,
0.5004633665084839,
0.12458062916994095,
0.20525483787059784,
0.051783062517642975,
0.09902796149253845,
-0.18456925451755524,
0.15825800597667694,
0.09538866579532623,
0.37331339716911316,
0.21779081225395203,
-0.24234062433242798,
-0.29158464074134827,
-0.41506901383399963,
-0.08306422829627991,
0.3413780927658081,
0.06655893474817276,
-0.2359834611415863,
0.18223707377910614,
-0.1312243938446045,
-0.04913956671953201,
-0.16920703649520874,
0.07072959840297699,
-0.05113758519291878,
0.021832624450325966,
-0.05068320780992508,
0.4454643726348877,
-0.1172289103269577,
0.2518315315246582,
0.2115495353937149,
0.3412332534790039,
-0.06575649231672287,
-0.037578240036964417,
-0.10126107931137085,
-0.026569167152047157,
-0.03082197904586792,
0.023594167083501816,
0.0722910687327385,
0.02474283240735531,
0.3143656253814697,
-0.22754481434822083,
-0.33949995040893555,
-0.3530188500881195,
-0.09362716227769852,
0.2368260622024536,
-0.1456051915884018,
0.1568368822336197,
0.010181859135627747,
0.009532026946544647,
-0.04954737797379494,
0.08388332277536392,
0.19848424196243286,
-0.19291825592517853,
-0.13422533869743347,
-0.11725728213787079,
-0.12055311352014542,
0.030060404911637306,
0.0024441294372081757,
-0.46302667260169983,
-0.03452581167221069,
-0.3551222085952759,
0.4455457925796509,
0.031034957617521286,
0.35819292068481445,
0.1614772230386734,
0.14755943417549133,
-0.2103567272424698,
0.04328432306647301,
-0.1376047134399414,
-0.24990402162075043,
-0.32560673356056213,
0.08184419572353363,
-0.4488917291164398,
-0.31063348054885864,
-0.113303042948246,
0.10484692454338074,
0.36071908473968506,
0.6155502200126648,
-0.24175111949443817,
-0.04745662957429886,
0.09093073010444641,
-0.11048239469528198,
0.10428522527217865,
-0.18672914803028107,
0.3270854651927948,
-0.3180541694164276,
0.08405144512653351,
-0.07735978811979294,
-0.05122530460357666,
0.41313478350639343,
-0.0037666410207748413,
0.022389397025108337,
0.30707499384880066,
0.5315557718276978,
0.2010893076658249,
1.0232973098754883,
0.7715410590171814,
0.050331905484199524,
0.34543168544769287,
-0.2370014190673828,
0.09660091996192932,
-0.23962366580963135,
0.2097087800502777,
0.10969891399145126,
-0.05660232901573181,
-0.2133811116218567,
0.2584172487258911,
-0.03671039640903473,
-0.2072022259235382,
0.10153314471244812,
0.08282078802585602,
-0.007813360542058945,
-0.36873406171798706,
0.3514387905597687,
0.12109427154064178,
0.391818642616272,
0.0717102438211441,
0.2664845883846283,
0.14432278275489807,
0.034848786890506744,
-0.07009457796812057,
-0.04092167317867279,
0.5384753346443176,
-0.0427691824734211,
-0.6319913864135742,
0.08126495033502579,
-0.4245583415031433,
0.17537826299667358,
0.00531212892383337,
0.38229137659072876,
-0.15566705167293549,
-0.1370457112789154,
0.285602331161499,
0.015036195516586304,
0.7181417942047119,
-0.16238026320934296,
-0.3419440984725952,
0.10748454928398132,
-0.3027080297470093,
-0.07277444005012512,
-0.10310958325862885,
-0.1000179797410965,
0.5055645108222961,
0.27269095182418823,
0.26973414421081543,
-0.2557932138442993,
-0.3782466948032379,
0.33468955755233765,
0.03100961446762085,
-0.170154869556427,
-0.09851305186748505,
-0.18166816234588623,
-0.28965458273887634,
-0.32602301239967346,
0.2145332247018814,
0.3158843517303467,
0.21721088886260986,
-0.28494301438331604,
-0.3054424822330475,
-0.37040284276008606,
0.04822760075330734,
0.04480700567364693,
0.14505153894424438,
0.43948814272880554,
0.027336515486240387,
0.3734414577484131,
0.33573806285858154,
-0.08906885981559753,
0.2815351188182831,
0.4954046905040741,
0.10724110901355743,
-0.08612248301506042,
0.332873672246933,
-0.1377498358488083,
0.2321689873933792,
0.5054695010185242,
-0.07923370599746704,
0.03695439547300339,
-0.09155367314815521,
0.1520872861146927,
-0.43457961082458496,
0.04604506865143776,
0.11983675509691238,
0.019950021058321,
-0.38097867369651794,
-0.4724586009979248,
0.43769410252571106,
0.19653786718845367,
-0.1107730120420456,
0.5127056837081909,
0.3198612928390503,
-0.20749172568321228,
0.4906848669052124,
0.16288705170154572,
0.8457415103912354,
0.002475772053003311,
-0.003953494131565094,
0.13266083598136902,
0.266268789768219,
0.2551923394203186,
-0.5023438930511475,
0.42613255977630615,
-0.29876720905303955,
-0.4248817265033722,
-0.007817370817065239,
-0.17260314524173737,
0.13456518948078156,
0.6022443771362305,
0.11824420094490051,
0.2818053364753723,
0.0888359397649765,
-0.002492230385541916,
-0.3005978465080261,
0.10690772533416748,
0.045955318957567215,
-0.3072718381881714,
0.038542188704013824,
0.029825851321220398,
0.016591832041740417,
0.4516696333885193,
-0.10400128364562988,
-0.049444764852523804,
0.11309289932250977,
-0.06730751693248749,
-0.15241114795207977,
-0.237093985080719,
-0.1061377301812172,
0.10878654569387436,
0.06441766023635864,
-0.3113384246826172,
-0.0024668071419000626,
0.27537935972213745,
0.21979036927223206,
-0.3023037016391754,
-0.05924330651760101,
0.08449465781450272,
0.021829232573509216,
-0.19809645414352417,
-0.11018549650907516,
-0.15026800334453583,
0.12790529429912567,
-0.08145567774772644,
-0.08764132112264633,
-0.15047982335090637,
0.006274809129536152,
-0.40718817710876465,
-0.08813827484846115,
-0.039068691432476044,
-0.12871389091014862,
-0.25640150904655457,
0.05740923061966896,
0.16413895785808563,
-0.11528515815734863,
-0.1469610184431076,
0.028219491243362427,
-0.029612280428409576,
-0.2321862280368805,
0.2943829298019409,
0.04834536463022232,
-0.2793889343738556,
-0.019218996167182922,
0.0680479183793068,
0.1417286992073059,
-0.07670353353023529,
0.1600656509399414,
-0.15086139738559723,
-0.01064223051071167,
-0.12944108247756958,
-0.065708689391613,
0.1181170642375946,
-0.3768869936466217,
0.19462008774280548,
-0.32944753766059875,
0.3242025375366211,
-0.06629692018032074,
0.16384366154670715,
0.06476833671331406,
0.28532132506370544,
-0.1329728662967682,
-0.21829096972942352,
-0.20435097813606262,
0.09803014248609543,
0.04889197275042534,
0.37724876403808594,
0.11848282068967819,
-0.105237677693367,
0.012193704023957253,
0.39952677488327026,
-0.20733800530433655,
-0.22079698741436005,
-0.08377811312675476,
0.2717793583869934,
0.20400479435920715,
0.09780231863260269,
0.09882167726755142,
0.008994229137897491,
-0.07498224824666977,
0.27382734417915344,
-0.2470017969608307,
-0.11897940933704376,
-0.09125332534313202,
0.17325459420681,
0.14427241683006287,
0.016154751181602478,
-0.003965768497437239,
0.045245252549648285,
-0.32356858253479004,
-0.41623589396476746,
0.36462825536727905,
-0.05278289318084717,
0.08065418154001236,
-0.19137310981750488,
0.409800261259079,
0.15140104293823242,
-0.3796987533569336,
0.1925329566001892,
0.1894208788871765,
-0.09206269681453705,
0.05494019016623497,
0.16353198885917664,
-0.01352644246071577,
-0.10495909303426743,
0.041604332625865936,
-0.008701667189598083,
0.444095253944397,
-0.18444696068763733,
-0.08027368038892746,
-0.08265413343906403,
0.078263059258461,
0.0154537633061409,
0.3776969015598297,
0.35000380873680115,
-0.10264162719249725,
0.056352898478507996,
0.03162587061524391,
0.1827908456325531,
-0.08678644895553589,
-0.04423066973686218,
0.12391965091228485,
0.18022644519805908,
0.18095168471336365,
0.5018654465675354,
0.5636618733406067,
0.20543798804283142,
-0.02438358962535858,
0.06456588953733444,
0.03590543940663338,
-0.42227476835250854,
0.2672765851020813,
-0.07861928641796112,
-0.08279088884592056,
0.2352433055639267,
0.23213228583335876,
-0.025865379720926285,
0.2937038242816925,
0.4457647204399109,
-0.31931111216545105,
0.7247843146324158,
0.16392508149147034,
0.028471745550632477,
0.0558430552482605,
-0.3656497597694397,
-0.13749031722545624,
0.17642812430858612,
-0.13106225430965424,
0.11450225859880447,
0.0017802119255065918,
0.2236025333404541,
-0.07102523744106293,
-0.398276150226593,
-0.23704864084720612,
0.11715762317180634,
-0.22742179036140442,
-0.33679360151290894,
-0.41579630970954895,
-0.05003529042005539,
-0.33676835894584656,
0.026872027665376663,
-0.04279491677880287,
-0.2921662926673889,
0.4270321726799011,
0.0358252227306366,
-0.02052973210811615,
-0.24443764984607697,
0.055136825889348984,
0.04074617847800255,
0.3049362897872925,
-0.36729490756988525,
0.15766024589538574,
-0.10301446914672852,
-0.16953220963478088,
0.08146481215953827,
0.030741792172193527,
0.27683156728744507,
-0.020021487027406693,
0.10342895984649658,
0.3074074387550354,
0.11042670905590057,
0.12436273694038391,
-0.09884363412857056,
0.0862870067358017,
0.01930329203605652,
0.01483013667166233,
0.1783738136291504,
0.021213555708527565,
-0.03388388827443123,
-0.24870483577251434,
0.2569095492362976,
0.1832343190908432,
-0.42499715089797974,
0.29441574215888977,
-0.2976006865501404,
-0.0655096024274826,
0.059019215404987335,
0.0461677610874176,
-0.07722799479961395,
-0.020517881959676743,
0.3642820119857788,
-0.28766193985939026,
0.19123223423957825,
0.14113807678222656,
0.040117863565683365,
-0.2004351019859314,
0.2530992925167084,
-0.5131337642669678,
0.08708100020885468,
-0.4031843841075897,
-0.29365116357803345,
-0.396724671125412,
-0.06510848551988602,
-0.20189374685287476,
0.1538165956735611,
0.13349664211273193,
0.5310596823692322,
0.09255054593086243,
0.23369568586349487,
-0.16263429820537567,
-0.26820799708366394,
0.10290311276912689,
0.5963820219039917,
-0.20136594772338867,
-0.012728899717330933,
-0.7214050889015198,
0.11711517721414566,
0.18906156718730927,
-0.3442806303501129,
0.15692225098609924,
0.003583424724638462,
-0.21039339900016785,
-0.07044680416584015,
0.18779513239860535,
0.3839990198612213,
-0.14041604101657867,
0.08976095914840698,
0.06843236088752747,
0.29563623666763306,
0.04713934659957886,
0.11335108429193497,
-0.3907144069671631,
-0.1741609424352646,
-0.4174644351005554,
0.28271937370300293,
0.01861998438835144,
0.1058068722486496,
-0.0989520400762558,
-0.11661957204341888,
-0.2697353959083557,
0.23630672693252563,
0.249860480427742,
-0.09355633705854416,
0.03954174369573593,
0.13763083517551422,
-0.26085957884788513,
0.16342414915561676,
0.39112019538879395,
0.3917180895805359,
0.0003407485783100128,
-0.18819096684455872,
-0.18483678996562958,
-0.4363762140274048,
0.4382864534854889,
-0.41976019740104675,
-0.0330876000225544,
-0.19097867608070374,
0.2518097758293152,
0.4270992577075958,
-0.17707423865795135,
-0.5097160935401917,
-0.19608628749847412,
0.3633621335029602,
-0.30465376377105713,
0.16286633908748627,
0.30862605571746826,
0.15846288204193115,
-0.3083476424217224,
-0.13040538132190704,
0.19687119126319885,
-0.035211361944675446,
-0.46739494800567627,
0.047456081956624985,
-0.5455811023712158
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs)
|
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_
| 64
|
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_
The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs)
|
[
-0.465358704328537,
-0.46394461393356323,
-0.09561248123645782,
0.24369806051254272,
0.09345457702875137,
-0.05370219051837921,
0.3268689513206482,
0.27373814582824707,
0.046611759811639786,
0.1674361228942871,
-0.03845600038766861,
0.46263062953948975,
0.1970851719379425,
0.2577078640460968,
0.019822899252176285,
-0.17540067434310913,
0.021325379610061646,
0.15186665952205658,
-0.2186400592327118,
-0.04217792674899101,
-0.15921366214752197,
0.3286639451980591,
-0.15604931116104126,
-0.1438533365726471,
-0.32369905710220337,
-0.09931390732526779,
-0.054253168404102325,
0.07741358876228333,
0.11975692212581635,
-0.29156821966171265,
0.11171162128448486,
0.21122600138187408,
-0.003511756658554077,
0.319450706243515,
-0.00010293102968716994,
0.2000933140516281,
0.022430967539548874,
-0.21648649871349335,
-0.09068459272384644,
0.053562067449092865,
-0.0882638469338417,
0.05560769885778427,
-0.45673277974128723,
-0.21122485399246216,
-0.39504629373550415,
-0.2827438414096832,
-0.04692322760820389,
-0.3427058756351471,
0.25960585474967957,
-0.11397089809179306,
0.26009050011634827,
0.22548487782478333,
-0.1563798189163208,
-0.1370876133441925,
0.05729192495346069,
0.3029015362262726,
-0.17098189890384674,
-0.15220977365970612,
0.008892670273780823,
0.18788690865039825,
-0.004889152944087982,
0.4351590871810913,
0.0569942444562912,
0.30553972721099854,
0.07454723119735718,
0.10428651422262192,
-0.17395713925361633,
-0.2924835979938507,
-0.06340362131595612,
0.24504536390304565,
0.022852815687656403,
-0.1276227831840515,
-0.3236590623855591,
-0.4769936203956604,
-0.26177746057510376,
-0.2545675039291382,
-0.06467195600271225,
0.1709422618150711,
-0.15504573285579681,
-0.014903273433446884,
-0.3506040573120117,
0.22924204170703888,
0.017154648900032043,
-0.204214945435524,
0.28920239210128784,
0.33275559544563293,
-0.18540099263191223,
0.37178587913513184,
0.23760119080543518,
0.2908010482788086,
-0.16136381030082703,
-0.01096230000257492,
-0.1484411507844925,
-0.16568773984909058,
-0.3886679708957672,
-0.15571269392967224,
0.16729657351970673,
0.041192859411239624,
0.42281171679496765,
0.2771863043308258,
0.20235051214694977,
0.1312505602836609,
0.3925207555294037,
-0.004893500357866287,
0.2986532747745514,
-0.3770292103290558,
0.23189640045166016,
0.16447237133979797,
0.03760594129562378,
-0.017380518838763237,
-0.05062566697597504,
-0.15051713585853577,
0.42496001720428467,
-0.25630107522010803,
-0.3237721025943756,
-0.0031576305627822876,
0.35031741857528687,
-0.09432463347911835,
-0.20640966296195984,
-0.3917015492916107,
-0.04547761008143425,
0.012042244896292686,
-0.13536350429058075,
0.30906954407691956,
0.22446823120117188,
-0.21358054876327515,
-0.4683665633201599,
0.053747959434986115,
-0.25576022267341614,
-0.31407904624938965,
-0.2652858793735504,
-0.19239740073680878,
-0.13007214665412903,
0.41093137860298157,
-0.01942242495715618,
-0.19811546802520752,
0.48702695965766907,
0.07542303949594498,
0.04347406327724457,
-0.16877052187919617,
0.28218045830726624,
-0.13650959730148315,
0.26384055614471436,
0.28182661533355713,
0.17655059695243835,
0.17442014813423157,
-0.03240377828478813,
0.1631982922554016,
-0.2779027223587036,
0.1279037594795227,
-0.12622129917144775,
-0.3773422837257385,
0.44105613231658936,
0.17441502213478088,
0.1486666202545166,
0.19869688153266907,
-0.31817904114723206,
0.2460053712129593,
0.2558169662952423,
-0.0637417659163475,
0.02058391273021698,
-0.014845296740531921,
-0.44521060585975647,
-0.34905725717544556,
0.2462543547153473,
0.3853464722633362,
-0.07896164059638977,
-0.22825205326080322,
0.1993807852268219,
-0.2224455028772354,
0.1909489631652832,
0.4879632294178009,
-0.21901214122772217,
0.0798351839184761,
-0.3745042085647583,
0.5880347490310669,
-0.09351090341806412,
-0.028095627203583717,
-0.2334868460893631,
0.3956091105937958,
-0.0820753201842308,
0.12810440361499786,
0.051923658698797226,
-0.0018228499684482813,
0.3249830901622772,
-0.09644728899002075,
-0.14789149165153503,
0.20503535866737366,
-0.2968108355998993,
0.0445166677236557,
-0.10958614945411682,
0.058118827641010284,
0.00924348272383213,
-0.053061310201883316,
-0.20607055723667145,
0.05070577189326286,
-0.051464907824993134,
-0.18253862857818604,
0.4743858575820923,
-0.255842387676239,
0.21747776865959167,
0.1245642825961113,
0.3299715518951416,
-0.11257375776767731,
0.15711045265197754,
0.011881858110427856,
-0.29651960730552673,
0.29544711112976074,
-0.1319572925567627,
-0.10722710192203522,
0.08964776992797852,
-0.543796181678772,
-0.04471416026353836,
-0.050550319254398346,
-0.14128682017326355,
-0.34152647852897644,
0.15269137918949127,
0.07485299557447433,
0.3562934994697571,
-0.418130487203598,
-0.1798161119222641,
0.05690357834100723,
-0.48325663805007935,
-0.008677486330270767,
-0.25276920199394226,
0.10352225601673126,
0.13627421855926514,
-0.14610786736011505,
0.014162857085466385,
-0.021902263164520264,
0.09104616194963455,
-0.4463505744934082,
0.1608368456363678,
0.33671581745147705,
0.3164854347705841,
0.0426846407353878,
-0.05408143252134323,
0.10569189488887787,
0.2546769976615906,
0.04889408126473427,
-0.10663645714521408,
-0.04956011846661568,
-0.14863693714141846,
-0.1979001760482788,
-0.049343258142471313,
0.5078645944595337,
-0.05880676582455635,
0.4434458911418915,
-0.02380198799073696,
0.0193766038864851,
0.23006191849708557,
0.15415452420711517,
-0.1146296039223671,
-0.2087698131799698,
-0.1592237949371338,
-0.10084760189056396,
0.20907871425151825,
0.09110474586486816,
-0.3250194787979126,
0.3167475163936615,
0.4011395275592804,
0.1110488772392273,
-0.12988004088401794,
-0.14639773964881897,
-0.03565210849046707,
-0.02031875029206276,
0.22617968916893005,
0.11785455048084259,
0.4275364279747009,
0.18667343258857727,
0.1675107479095459,
-0.03945267200469971,
0.07312209159135818,
-0.12735620141029358,
0.04047081619501114,
0.08098460733890533,
0.25338879227638245,
0.13555358350276947,
-0.3431473970413208,
-0.27466338872909546,
-0.3293963074684143,
-0.051573533564805984,
0.19770243763923645,
-0.041647762060165405,
-0.14275915920734406,
0.1707090139389038,
-0.14025786519050598,
-0.07320918142795563,
-0.12037347257137299,
0.14350393414497375,
-0.05406097695231438,
-0.07138931006193161,
0.0548393577337265,
0.34366944432258606,
-0.22985081374645233,
0.3042372763156891,
0.3351375460624695,
0.3183179795742035,
-0.00699043832719326,
0.045349493622779846,
-0.1623203456401825,
0.013854201883077621,
-0.031064532697200775,
0.11797070503234863,
0.15030226111412048,
-0.01388511061668396,
0.3612919747829437,
-0.20782223343849182,
-0.1705215871334076,
-0.43571460247039795,
-0.11379911005496979,
0.22086070477962494,
-0.3814212679862976,
0.13737976551055908,
0.09436316788196564,
-0.023150883615016937,
0.038833729922771454,
0.14882221817970276,
0.18776999413967133,
-0.31032976508140564,
-0.18256358802318573,
-0.1881195306777954,
-0.10505981743335724,
-0.16773636639118195,
-0.11065346002578735,
-0.31302499771118164,
0.03866773843765259,
-0.30091920495033264,
0.4417579174041748,
0.03607696667313576,
0.30161112546920776,
-0.05755092203617096,
0.12555667757987976,
-0.152243971824646,
-0.13089542090892792,
-0.1496639996767044,
-0.23794789612293243,
-0.26762884855270386,
0.08713655173778534,
-0.522501528263092,
-0.3703422546386719,
-0.04542560130357742,
0.18116211891174316,
0.40296217799186707,
0.36870133876800537,
-0.22132594883441925,
-0.20925283432006836,
-0.014123169705271721,
-0.018137691542506218,
0.1013282984495163,
-0.10095880925655365,
0.3518909215927124,
-0.2417164146900177,
-0.07910249382257462,
-0.21359384059906006,
-0.10373726487159729,
0.3706481158733368,
-0.012053757905960083,
-0.06372811645269394,
0.2082841992378235,
0.35492026805877686,
0.2478618323802948,
0.7858227491378784,
0.7464599609375,
0.042693279683589935,
0.2563943564891815,
-0.12122849375009537,
0.16240432858467102,
-0.3096599280834198,
0.1459578573703766,
0.1091993898153305,
-0.073367640376091,
-0.05677500367164612,
0.25339454412460327,
-0.022996634244918823,
-0.23125138878822327,
0.17205867171287537,
0.08626359701156616,
0.02452211081981659,
-0.36270496249198914,
0.2465025782585144,
0.287483811378479,
0.34078359603881836,
0.11944906413555145,
0.2525973320007324,
0.06421098113059998,
0.1557512879371643,
0.11372785270214081,
-0.16409195959568024,
0.5794397592544556,
-0.01898770034313202,
-0.5317490100860596,
0.023231836035847664,
-0.3524482250213623,
0.2630942463874817,
-0.011801975779235363,
0.15021921694278717,
-0.13797977566719055,
-0.21410810947418213,
0.1711573600769043,
0.035270992666482925,
0.6269469261169434,
-0.21407732367515564,
-0.2417324036359787,
0.009673919528722763,
-0.41024425625801086,
-0.09971737861633301,
-0.0043709613382816315,
-0.1389341503381729,
0.6098361611366272,
0.13482096791267395,
0.3208101987838745,
-0.3235296905040741,
-0.3695496618747711,
0.21316997706890106,
0.022514861077070236,
-0.12487514317035675,
-0.012478318996727467,
-0.22266443073749542,
-0.3018834888935089,
-0.3576211631298065,
0.21796128153800964,
0.3005140721797943,
0.12108347564935684,
-0.1546972244977951,
-0.3248249590396881,
-0.3411356210708618,
-0.052768249064683914,
-0.0257919579744339,
0.24554897844791412,
0.37133634090423584,
-0.05700594186782837,
0.26246047019958496,
0.3761981129646301,
0.021718353033065796,
0.1609901338815689,
0.4505835771560669,
0.014228353276848793,
-0.04133090376853943,
0.26714304089546204,
-0.22828109562397003,
0.1449507772922516,
0.47331148386001587,
-0.08429209887981415,
-0.008837714791297913,
-0.1924106478691101,
0.20632067322731018,
-0.45389795303344727,
-0.12850981950759888,
0.14728376269340515,
0.09761585295200348,
-0.3717116415500641,
-0.37591132521629333,
0.2582779824733734,
0.1320851445198059,
-0.12232059985399246,
0.4857916831970215,
0.31194448471069336,
-0.20856310427188873,
0.4083542227745056,
0.2406708002090454,
0.695188581943512,
-0.0203653946518898,
-0.034832220524549484,
0.056328073143959045,
0.29320859909057617,
0.1214069128036499,
-0.20159447193145752,
0.3231533169746399,
-0.3144834041595459,
-0.42286697030067444,
0.03890339285135269,
-0.09595134109258652,
0.22273430228233337,
0.5179176330566406,
0.1125471442937851,
0.19021174311637878,
0.1749865859746933,
0.0494360476732254,
-0.3318571448326111,
0.14327602088451385,
0.06350009143352509,
-0.36733686923980713,
-0.0019591450691223145,
0.18533839285373688,
0.04745678976178169,
0.3275960683822632,
-0.05493738874793053,
-0.10135491192340851,
0.13069307804107666,
-0.025236617773771286,
-0.06296084821224213,
-0.22215095162391663,
-0.1862155646085739,
0.16236041486263275,
0.05366220325231552,
-0.2758651673793793,
-0.0911949872970581,
0.15940223634243011,
0.18538245558738708,
-0.0812014639377594,
0.014845735393464565,
0.05349675193428993,
0.005039572715759277,
-0.1705845296382904,
-0.11834606528282166,
-0.2452385574579239,
0.04405451565980911,
-0.0539412684738636,
-0.02280338853597641,
-0.21195238828659058,
0.06113199144601822,
-0.4318612813949585,
-0.14712466299533844,
0.03500205650925636,
-0.11852136254310608,
-0.22700239717960358,
0.004037001170217991,
0.11953552067279816,
-0.15055342018604279,
-0.16415168344974518,
0.12156599760055542,
-0.034700967371463776,
-0.18218232691287994,
0.33992400765419006,
0.07167904824018478,
-0.28214022517204285,
-0.09478935599327087,
0.03418554738163948,
0.08903495222330093,
0.03375399857759476,
0.0970456600189209,
-0.11430889368057251,
-0.10393770784139633,
-0.22464653849601746,
-0.1323452591896057,
0.14399534463882446,
-0.35616281628608704,
0.2500781714916229,
-0.3853304386138916,
0.2235560268163681,
-0.0697328969836235,
0.18759669363498688,
0.033089347183704376,
0.24550041556358337,
-0.14470119774341583,
-0.2531113028526306,
-0.13388194143772125,
0.11174073815345764,
-0.003908563405275345,
0.33805862069129944,
0.15189692378044128,
-0.036895886063575745,
-0.061599358916282654,
0.4225600063800812,
-0.36834239959716797,
-0.15705519914627075,
-0.057790547609329224,
0.29276517033576965,
0.21559199690818787,
0.11870001256465912,
0.0920172706246376,
0.033909834921360016,
0.04385852813720703,
0.4320365786552429,
-0.2257896214723587,
-0.2625402510166168,
-0.009759030304849148,
0.09561360627412796,
0.06807117909193039,
0.01678427681326866,
0.014957801438868046,
0.13096356391906738,
-0.2902359664440155,
-0.447458416223526,
0.5439446568489075,
-0.12239903956651688,
0.061477597802877426,
-0.21918801963329315,
0.41131776571273804,
-0.030256710946559906,
-0.1803334504365921,
0.2147127240896225,
0.11878638714551926,
-0.04390467703342438,
0.07613280415534973,
0.13823401927947998,
-0.05406182259321213,
-0.1118110865354538,
0.24311454594135284,
0.09470426291227341,
0.3997470736503601,
-0.010205678641796112,
0.07323160022497177,
-0.014136351644992828,
0.10839280486106873,
0.11537399142980576,
0.41939160227775574,
0.21414226293563843,
-0.09012256562709808,
0.021669944748282433,
-0.02607106789946556,
0.30081239342689514,
-0.11600896716117859,
-0.15691937506198883,
0.2421717494726181,
0.10316354781389236,
0.29337799549102783,
0.5501551628112793,
0.5431495308876038,
0.30992141366004944,
0.07505439221858978,
0.08928640931844711,
0.13437585532665253,
-0.3968358635902405,
0.20470179617404938,
-0.04110495373606682,
-0.06828239560127258,
0.21125167608261108,
0.3397398591041565,
0.0867282971739769,
0.2783692479133606,
0.4740334749221802,
-0.27891916036605835,
0.6990724205970764,
0.04223408177495003,
0.025146812200546265,
0.11739145219326019,
-0.4102438688278198,
-0.05891815945506096,
0.09630889445543289,
-0.06094007194042206,
0.15146519243717194,
-0.04024592041969299,
0.11417947709560394,
-0.2191358208656311,
-0.4743651747703552,
-0.1459416300058365,
0.1631750613451004,
-0.3450666666030884,
-0.24313701689243317,
-0.33500128984451294,
-0.041648201644420624,
-0.2092825472354889,
0.05124373361468315,
-0.002748314291238785,
-0.26411402225494385,
0.5038260221481323,
-0.15968644618988037,
-0.029464103281497955,
-0.11378170549869537,
0.08222829550504684,
-0.06840676069259644,
0.28773656487464905,
-0.23988062143325806,
0.08356083929538727,
-0.1576259285211563,
-0.0661996454000473,
0.077018141746521,
0.08420316874980927,
0.16175830364227295,
-0.02243141457438469,
-0.024017274379730225,
0.3029676377773285,
0.026105158030986786,
0.02996923215687275,
-0.16432934999465942,
0.10117948055267334,
-0.15965227782726288,
-0.05472669377923012,
0.33394289016723633,
0.14973413944244385,
-0.10814473778009415,
-0.30731815099716187,
0.18846598267555237,
0.2331027090549469,
-0.25067755579948425,
0.2977086305618286,
-0.31574109196662903,
-0.11363561451435089,
-0.04360121488571167,
0.03542635217308998,
-0.09032367169857025,
-0.15627780556678772,
0.3586573004722595,
-0.4403131902217865,
0.14084216952323914,
-0.011517046019434929,
0.12180823087692261,
-0.16464869678020477,
0.3918546736240387,
-0.3925022482872009,
-0.023319050669670105,
-0.3743312954902649,
-0.26937758922576904,
-0.2852422595024109,
-0.0024452805519104004,
-0.2677818536758423,
0.10489584505558014,
0.01887013018131256,
0.5306545495986938,
0.09873630851507187,
0.2234472632408142,
-0.013580650091171265,
-0.18632268905639648,
0.037283483892679214,
0.5405378937721252,
-0.1585291475057602,
-0.059583630412817,
-0.6182518601417542,
0.012997040525078773,
0.2954878807067871,
-0.33995676040649414,
0.21607652306556702,
0.04241302236914635,
-0.0194893479347229,
-0.026441097259521484,
0.22777467966079712,
0.36949238181114197,
-0.22417420148849487,
0.13274110853672028,
0.14176812767982483,
0.1281999796628952,
-0.02021699771285057,
0.013831386342644691,
-0.3739442527294159,
-0.14143384993076324,
-0.45354798436164856,
0.33439192175865173,
0.0526118241250515,
0.08784987777471542,
-0.08401749283075333,
-0.18026834726333618,
-0.3305005133152008,
0.26855331659317017,
0.31908202171325684,
-0.007440542336553335,
0.0901813805103302,
0.30670252442359924,
-0.29943445324897766,
0.10609731823205948,
0.3666466474533081,
0.41817519068717957,
0.06983692944049835,
-0.1473885029554367,
-0.15634307265281677,
-0.47703465819358826,
0.3852902054786682,
-0.3993604779243469,
-0.1315518170595169,
-0.10381127148866653,
0.23263292014598846,
0.27083832025527954,
-0.35580459237098694,
-0.4052886664867401,
-0.17400813102722168,
0.26617884635925293,
-0.24987205862998962,
0.10711373388767242,
0.2697891592979431,
0.04657386615872383,
-0.293724000453949,
-0.13958634436130524,
0.15717533230781555,
0.0017133299261331558,
-0.481922447681427,
0.1800687164068222,
-0.39894920587539673
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU?
|
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_
| 37
|
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 each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU?
|
[
-0.3358445465564728,
-0.429524302482605,
-0.0859522819519043,
0.35857516527175903,
0.07497149705886841,
0.08135930448770523,
0.3470384180545807,
0.24788875877857208,
-0.16065283119678497,
0.0493408739566803,
-0.03591039776802063,
0.3949972987174988,
0.20944860577583313,
0.3387421667575836,
0.18530097603797913,
-0.18089830875396729,
0.07101629674434662,
0.16685819625854492,
-0.07171951234340668,
-0.14131200313568115,
-0.09557706117630005,
0.31911855936050415,
-0.16383889317512512,
-0.034656353294849396,
-0.4298296272754669,
-0.19816212356090546,
-0.1386963129043579,
-0.015907712280750275,
0.08813316375017166,
-0.3234649896621704,
0.2559891641139984,
0.20322856307029724,
0.055185362696647644,
0.2794426679611206,
-0.00011479327804408967,
0.27195513248443604,
-0.10008566081523895,
-0.24146129190921783,
-0.11472837626934052,
0.019951365888118744,
-0.10021713376045227,
0.049635112285614014,
-0.35802921652793884,
-0.2217380702495575,
-0.43185532093048096,
-0.26458674669265747,
0.07913301140069962,
-0.31133943796157837,
0.22769460082054138,
-0.008818302303552628,
0.13749189674854279,
0.17253972589969635,
-0.23718251287937164,
-0.11669664829969406,
-0.07926849275827408,
0.33736181259155273,
-0.11537042260169983,
-0.12358339130878448,
0.05659705772995949,
0.17954152822494507,
0.030255205929279327,
0.38401180505752563,
0.19777128100395203,
0.14940856397151947,
-0.056724242866039276,
0.18229174613952637,
-0.24147045612335205,
-0.31042128801345825,
-0.0559670552611351,
0.24438467621803284,
0.10093671828508377,
-0.15094301104545593,
-0.3481329381465912,
-0.522391140460968,
-0.19744078814983368,
-0.2727624773979187,
-0.07653730362653732,
0.3774999678134918,
-0.18392789363861084,
0.10189997404813766,
-0.4425637722015381,
0.07367017865180969,
-0.1583847999572754,
-0.1361110955476761,
0.24799463152885437,
0.3773910701274872,
-0.20067106187343597,
0.40931236743927,
0.06696952879428864,
0.4792270064353943,
-0.02393335849046707,
0.049212850630283356,
-0.06969700753688812,
-0.22962425649166107,
-0.41120582818984985,
-0.17315487563610077,
0.02890811488032341,
-0.02615075558423996,
0.2778266668319702,
0.2935760021209717,
0.2726638615131378,
0.07783003151416779,
0.36874133348464966,
-0.0472697839140892,
0.37906157970428467,
-0.4452146589756012,
0.19958122074604034,
0.19993817806243896,
-0.06674214452505112,
0.11618036776781082,
-0.08821667730808258,
-0.13675454258918762,
0.2583201229572296,
-0.1446707844734192,
-0.3549531102180481,
0.005235021933913231,
0.4011247158050537,
-0.11691910028457642,
-0.29370200634002686,
-0.27015548944473267,
-0.09814657270908356,
-0.01694442890584469,
-0.10946549475193024,
0.2906850576400757,
0.1418916881084442,
-0.17247068881988525,
-0.4349600076675415,
0.02746041677892208,
-0.2687278687953949,
-0.3736768066883087,
-0.19674542546272278,
-0.12428209185600281,
-0.1449064016342163,
0.46874842047691345,
-0.030100710690021515,
-0.20257872343063354,
0.4446246325969696,
0.16659021377563477,
0.09206029772758484,
-0.18577952682971954,
0.2270379513502121,
-0.19582542777061462,
0.4718686640262604,
0.26169100403785706,
0.1388700157403946,
0.12416910380125046,
0.032437119632959366,
0.2780058979988098,
-0.32046273350715637,
0.16809648275375366,
-0.15526431798934937,
-0.36320066452026367,
0.47458845376968384,
0.06424032151699066,
0.12653687596321106,
0.15363262593746185,
-0.25979331135749817,
0.34129294753074646,
0.1896284520626068,
-0.09378432482481003,
0.1461387723684311,
-0.04542095214128494,
-0.3964914083480835,
-0.31720149517059326,
0.3149423599243164,
0.355476975440979,
-0.1486915647983551,
-0.2233583778142929,
0.3191339373588562,
-0.21911077201366425,
0.13811153173446655,
0.3771050274372101,
-0.14756137132644653,
0.20048779249191284,
-0.42458248138427734,
0.3828529119491577,
0.009037390351295471,
-0.13518674671649933,
-0.16774311661720276,
0.3273308575153351,
-0.030394867062568665,
0.21342071890830994,
0.13667364418506622,
-0.03597443923354149,
0.30201563239097595,
0.009342953562736511,
-0.11291611194610596,
0.08632466197013855,
-0.34971368312835693,
-0.15268546342849731,
-0.11528599262237549,
-0.0067142583429813385,
-0.0818287804722786,
-0.013069679029285908,
-0.14804057776927948,
0.07584395259618759,
-0.20417746901512146,
-0.1871972680091858,
0.5573435425758362,
-0.20911148190498352,
0.036311447620391846,
0.14294900000095367,
0.2806132733821869,
-0.02988550066947937,
0.04852816089987755,
0.1513088345527649,
-0.2502146065235138,
0.25503236055374146,
-0.14233045279979706,
-0.1490689069032669,
0.12300503253936768,
-0.5606228709220886,
-0.10759121924638748,
-0.06081687659025192,
-0.13939011096954346,
-0.4146190583705902,
0.03835022449493408,
0.08804649114608765,
0.462564080953598,
-0.2970218062400818,
-0.31351402401924133,
0.1747664213180542,
-0.66890949010849,
-0.0249475184828043,
-0.3861764669418335,
0.10910739004611969,
0.24028605222702026,
-0.1125875860452652,
0.038201943039894104,
0.036111898720264435,
0.027869444340467453,
-0.4939795732498169,
0.17318657040596008,
0.37116673588752747,
0.27884700894355774,
0.06686720997095108,
-0.16456350684165955,
0.23544594645500183,
0.31877246499061584,
-0.0768374502658844,
-0.16940203309059143,
-0.0755060464143753,
-0.20094722509384155,
-0.1373094916343689,
-0.12613192200660706,
0.6481675505638123,
-0.09006337821483612,
0.3573368787765503,
0.0922602117061615,
-0.00653806421905756,
0.025101060047745705,
0.140384703874588,
-0.16469024121761322,
-0.10581554472446442,
-0.17236046493053436,
-0.09125375747680664,
0.32859528064727783,
-0.021853452548384666,
-0.5496289730072021,
0.3286609649658203,
0.5534416437149048,
0.12592199444770813,
-0.217555433511734,
-0.19584348797798157,
0.01931433007121086,
0.004804503172636032,
0.2888586223125458,
0.028145384043455124,
0.34202393889427185,
0.12111566215753555,
0.21975363790988922,
0.057011283934116364,
-0.007599429227411747,
-0.17158301174640656,
0.08119246363639832,
0.14082790911197662,
0.2836367189884186,
0.10404565185308456,
-0.4387142062187195,
-0.2909930348396301,
-0.33811503648757935,
0.04690171405673027,
0.15317170321941376,
-0.04926237463951111,
-0.17857353389263153,
0.26286107301712036,
-0.10002677142620087,
-0.0719316378235817,
-0.22797755897045135,
0.11859146505594254,
0.014045439660549164,
-0.01897214725613594,
0.027209291234612465,
0.24787236750125885,
-0.05652281641960144,
0.2609725892543793,
0.21273784339427948,
0.469634473323822,
-0.12517251074314117,
0.18337611854076385,
-0.16552644968032837,
0.03361881151795387,
-0.17632806301116943,
0.03057461977005005,
0.09455399215221405,
-0.009071601554751396,
0.3278130292892456,
-0.3196863532066345,
-0.1564561426639557,
-0.3562712073326111,
-0.10841492563486099,
0.22405976057052612,
-0.24978728592395782,
0.22627337276935577,
0.0658780038356781,
-0.015306040644645691,
-0.036540400236845016,
0.11041472107172012,
0.14160743355751038,
-0.2916313111782074,
-0.10062654316425323,
-0.3299706280231476,
-0.025217322632670403,
-0.03079511784017086,
0.07233422994613647,
-0.4891118109226227,
-0.09275653213262558,
-0.19757619500160217,
0.4980103373527527,
0.010840125381946564,
0.25560158491134644,
-0.10218123346567154,
0.12769150733947754,
-0.1317298412322998,
-0.13771863281726837,
-0.01979723386466503,
-0.20373129844665527,
-0.43579018115997314,
0.04193814471364021,
-0.4589935541152954,
-0.31596729159355164,
-0.06796629726886749,
0.15781602263450623,
0.47784075140953064,
0.40177440643310547,
-0.34684956073760986,
-0.12651769816875458,
0.11455409228801727,
-0.1235131025314331,
0.051921602338552475,
-0.12286552786827087,
0.322088360786438,
-0.3668050765991211,
0.03452369570732117,
-0.09350860118865967,
-0.045132115483284,
0.2994053065776825,
-0.11117994040250778,
-0.16438665986061096,
0.21376654505729675,
0.23299971222877502,
0.2652067542076111,
0.891160786151886,
0.7480822205543518,
0.0032683387398719788,
0.05981012433767319,
-0.15368850529193878,
0.21934916079044342,
-0.1264696717262268,
0.11339934170246124,
0.040660932660102844,
-0.04249425232410431,
-0.14369449019432068,
0.23083892464637756,
-0.030791033059358597,
-0.12316236644983292,
0.1517101675271988,
0.2669174075126648,
-0.08197347074747086,
-0.3594279885292053,
0.28082698583602905,
0.12370539456605911,
0.4606548249721527,
0.0380069799721241,
0.37171420454978943,
0.1047685295343399,
0.11771198362112045,
0.08818712830543518,
-0.08773058652877808,
0.5639618039131165,
-0.03202718868851662,
-0.601041853427887,
-0.09930764883756638,
-0.22346574068069458,
0.24681589007377625,
-0.06422527134418488,
0.3334801495075226,
-0.24959634244441986,
-0.19116637110710144,
0.2716468870639801,
0.04086540266871452,
0.6772842407226562,
-0.20155823230743408,
-0.38885748386383057,
0.14863939583301544,
-0.49156972765922546,
0.09154268354177475,
-0.045857906341552734,
-0.13230295479297638,
0.5670311450958252,
0.15132933855056763,
0.31525343656539917,
-0.189883291721344,
-0.43810194730758667,
0.35715171694755554,
-0.025597261264920235,
-0.2036149501800537,
0.06112813577055931,
-0.11421716213226318,
-0.2270682156085968,
-0.1415809839963913,
0.2886289060115814,
0.24343468248844147,
0.02377210184931755,
-0.2556931972503662,
-0.21667598187923431,
-0.3612000048160553,
0.15080338716506958,
0.0024637430906295776,
0.28400087356567383,
0.2915869653224945,
-0.005849830806255341,
0.181863471865654,
0.4867873787879944,
0.0739843100309372,
0.2529759407043457,
0.4681600332260132,
0.019682537764310837,
-0.07993881404399872,
0.3558695912361145,
-0.16529181599617004,
0.3042127788066864,
0.6187536716461182,
-0.09317390620708466,
-0.001441463828086853,
-0.12098325788974762,
0.043711207807064056,
-0.5611838698387146,
-0.0474778488278389,
0.12589365243911743,
0.06091313064098358,
-0.4860970675945282,
-0.4958643317222595,
0.33191314339637756,
0.24725119769573212,
-0.1378183811903,
0.5511216521263123,
0.26679110527038574,
-0.2618909776210785,
0.30198484659194946,
0.2321709394454956,
0.7719774842262268,
0.019327223300933838,
0.12110279500484467,
0.1801069676876068,
0.18967688083648682,
0.2630411386489868,
-0.37422776222229004,
0.36052924394607544,
-0.3241676092147827,
-0.4527129828929901,
-0.05167003720998764,
-0.1596045345067978,
0.2903861999511719,
0.5281670689582825,
0.1574137955904007,
0.27214691042900085,
0.19130800664424896,
0.0009750537574291229,
-0.26383793354034424,
0.11751683056354523,
0.05310256779193878,
-0.2635860741138458,
-0.07900221645832062,
0.06704141199588776,
0.08534306287765503,
0.3311268091201782,
-0.14762941002845764,
-0.12184272706508636,
0.043977897614240646,
0.053416915237903595,
-0.17625340819358826,
-0.2761595547199249,
-0.20137162506580353,
0.12524227797985077,
0.07269932329654694,
-0.4096120595932007,
-0.06895759701728821,
0.19338876008987427,
0.36864930391311646,
-0.1753866821527481,
-0.050353460013866425,
0.049337394535541534,
-0.056437261402606964,
-0.2966874837875366,
-0.09645377099514008,
-0.22058609127998352,
0.1490127593278885,
0.031075328588485718,
0.012388832867145538,
-0.019270040094852448,
0.03700309619307518,
-0.3805506229400635,
-0.24691727757453918,
-0.03466273844242096,
-0.1092730164527893,
-0.3030613660812378,
-0.06190097704529762,
0.14220204949378967,
-0.08996154367923737,
-0.1855807602405548,
0.03440180420875549,
-0.0045931339263916016,
-0.2855868935585022,
0.34643226861953735,
0.08377492427825928,
-0.26969441771507263,
-0.06941284239292145,
0.042438067495822906,
0.18805277347564697,
-0.08015142381191254,
0.13907796144485474,
-0.04361703619360924,
0.015324130654335022,
-0.2263714075088501,
-0.02919229120016098,
0.228689506649971,
-0.34546521306037903,
0.17620961368083954,
-0.371218204498291,
0.3642934560775757,
-0.06446275115013123,
0.13301725685596466,
0.16145342588424683,
0.13879291713237762,
-0.15780839323997498,
-0.22346489131450653,
-0.1686413735151291,
0.17655915021896362,
0.09978938847780228,
0.4354536235332489,
0.1687469184398651,
-0.037790413945913315,
-0.024902742356061935,
0.3561837077140808,
-0.26046282052993774,
-0.08816526085138321,
-0.17223837971687317,
0.19149570167064667,
0.1328282654285431,
0.18921232223510742,
0.1331387162208557,
-0.036803342401981354,
-0.06137190759181976,
0.30000483989715576,
-0.20843714475631714,
-0.16166147589683533,
0.03381645306944847,
0.167728453874588,
0.0910942405462265,
0.12867772579193115,
0.0606568269431591,
0.19488723576068878,
-0.24144384264945984,
-0.3273323178291321,
0.3938140571117401,
-0.08038552105426788,
0.17550325393676758,
-0.052628662437200546,
0.27849021553993225,
0.10226847231388092,
-0.28320467472076416,
0.16884900629520416,
0.14157800376415253,
-0.026898860931396484,
0.1422766149044037,
0.1909315586090088,
-0.1051437258720398,
-0.1271876096725464,
0.16853944957256317,
0.10517111420631409,
0.3182079792022705,
-0.08803540468215942,
0.008179910480976105,
-0.025394342839717865,
0.1719672679901123,
-0.011548575013875961,
0.31837934255599976,
0.29769688844680786,
-0.10097069293260574,
0.06395616382360458,
-0.02625701203942299,
0.17936846613883972,
-0.030711427330970764,
0.04363498091697693,
0.1949022114276886,
0.05013807862997055,
0.1804400533437729,
0.6021958589553833,
0.6582245230674744,
0.3280295133590698,
0.14840438961982727,
0.09891577810049057,
0.08392535895109177,
-0.48276716470718384,
0.37797245383262634,
0.1018684133887291,
-0.010010439902544022,
0.3637930452823639,
0.2611478269100189,
0.22013048827648163,
0.20073340833187103,
0.2652943730354309,
-0.24674829840660095,
0.6788032054901123,
0.09702727198600769,
0.02516082674264908,
0.14753058552742004,
-0.42954719066619873,
-0.1775110960006714,
0.05939941108226776,
-0.017861932516098022,
0.22690778970718384,
-0.17169663310050964,
0.15223325788974762,
-0.28508293628692627,
-0.5434680581092834,
-0.15879550576210022,
0.10572005808353424,
-0.35404279828071594,
-0.2378324717283249,
-0.3994995951652527,
-0.09148632735013962,
-0.19899046421051025,
0.09322814643383026,
0.03018108382821083,
-0.35502034425735474,
0.5250195264816284,
-0.12077732384204865,
-0.015075787901878357,
-0.0981815755367279,
0.12590068578720093,
-0.013873104006052017,
0.2578147351741791,
-0.18350884318351746,
0.16499611735343933,
-0.2090386301279068,
-0.04787370562553406,
0.0287211611866951,
0.1643144190311432,
0.211116224527359,
-0.12510408461093903,
-0.02333710342645645,
0.306863397359848,
0.12250816822052002,
0.07838574051856995,
-0.036389559507369995,
0.17320813238620758,
-0.025497950613498688,
-0.060716185718774796,
0.2864248752593994,
0.08756949007511139,
0.03012530878186226,
-0.09096528589725494,
0.2126637101173401,
0.17310190200805664,
-0.3713926672935486,
0.34212544560432434,
-0.3267960548400879,
-0.13950487971305847,
0.013198453933000565,
0.042290326207876205,
-0.15987727046012878,
-0.13577356934547424,
0.451150119304657,
-0.2956465780735016,
0.13303017616271973,
0.10550687462091446,
0.05700992792844772,
-0.140127494931221,
0.3331325948238373,
-0.2154289335012436,
0.05903860181570053,
-0.46470576524734497,
-0.2686995267868042,
-0.24331599473953247,
-0.04165875166654587,
-0.1925598680973053,
0.014714820310473442,
0.07962366193532944,
0.5302333831787109,
0.18954876065254211,
0.20450589060783386,
-0.005149558186531067,
-0.34137940406799316,
0.06165584921836853,
0.6022588014602661,
-0.22662511467933655,
-0.02221069112420082,
-0.6003831624984741,
0.1122266873717308,
0.18205270171165466,
-0.20507431030273438,
0.19072523713111877,
0.08706314116716385,
-0.20441174507141113,
0.0017122253775596619,
0.18138469755649567,
0.3513801395893097,
-0.12052622437477112,
0.06663405150175095,
0.02958924137055874,
0.07812967151403427,
0.02197800576686859,
-0.06449976563453674,
-0.37106257677078247,
-0.16474658250808716,
-0.33778998255729675,
0.5284015536308289,
-0.027836214751005173,
0.08265046775341034,
-0.15180596709251404,
-0.25020530819892883,
-0.28590884804725647,
0.08184801042079926,
0.337250292301178,
-0.13760940730571747,
0.13622525334358215,
0.2384268045425415,
-0.2420063614845276,
0.059695616364479065,
0.6554344296455383,
0.5299538969993591,
-0.046018339693546295,
-0.16443657875061035,
-0.19581419229507446,
-0.3312656283378601,
0.3855018615722656,
-0.41420236229896545,
-0.15171903371810913,
-0.13001005351543427,
0.2363816499710083,
0.34048178791999817,
-0.1572035849094391,
-0.48674675822257996,
-0.21302464604377747,
0.3743155598640442,
-0.42666366696357727,
0.2171277105808258,
0.27920475602149963,
0.13769029080867767,
-0.33963143825531006,
-0.10461099445819855,
0.22378581762313843,
-0.03434465080499649,
-0.5757863521575928,
0.11423684656620026,
-0.5551267862319946
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
> For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator
|
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_
| 49
|
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 each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator
|
[
-0.34791457653045654,
-0.4232019782066345,
-0.09536369144916534,
0.3716791868209839,
0.1234007254242897,
0.06726901978254318,
0.3374473452568054,
0.24970746040344238,
-0.17176680266857147,
0.0454854890704155,
-0.06359312683343887,
0.41291263699531555,
0.1829586923122406,
0.35210180282592773,
0.1520220935344696,
-0.20253434777259827,
0.02739560604095459,
0.17046453058719635,
-0.12409953773021698,
-0.1450415849685669,
-0.0925239846110344,
0.3068997263908386,
-0.16651120781898499,
-0.05937005579471588,
-0.39257344603538513,
-0.19429655373096466,
-0.15920031070709229,
-0.010584242641925812,
0.03672245144844055,
-0.28600409626960754,
0.214228093624115,
0.21418644487857819,
0.09041902422904968,
0.27373605966567993,
-0.00011031264875782654,
0.23121945559978485,
-0.11874052882194519,
-0.2362537980079651,
-0.07415605336427689,
0.011581502854824066,
-0.0728352814912796,
-0.04195907711982727,
-0.3573552966117859,
-0.2862740457057953,
-0.43302857875823975,
-0.25912025570869446,
0.026160581037402153,
-0.25860488414764404,
0.21387620270252228,
0.012795726768672466,
0.17777591943740845,
0.18215715885162354,
-0.17747916281223297,
-0.05593780428171158,
-0.03569500148296356,
0.2896438539028168,
-0.12978032231330872,
-0.12057651579380035,
0.055167846381664276,
0.209180548787117,
0.001353926956653595,
0.41547590494155884,
0.21197091042995453,
0.11510425806045532,
-0.05482166260480881,
0.21355290710926056,
-0.2465353012084961,
-0.3245343863964081,
-0.07517009973526001,
0.2268793284893036,
0.07425713539123535,
-0.22101297974586487,
-0.31210362911224365,
-0.4599568843841553,
-0.2338765412569046,
-0.353567510843277,
-0.07772385329008102,
0.36529242992401123,
-0.13403907418251038,
0.06847067922353745,
-0.41608428955078125,
0.16014043986797333,
-0.14963018894195557,
-0.15580378472805023,
0.2317570447921753,
0.3873042166233063,
-0.23404879868030548,
0.37961480021476746,
0.07164610177278519,
0.47591060400009155,
0.019593410193920135,
0.047145456075668335,
-0.05674215033650398,
-0.17312593758106232,
-0.4578426480293274,
-0.18223580718040466,
0.017373941838741302,
0.022156041115522385,
0.2728411853313446,
0.32310497760772705,
0.2303609848022461,
0.08360922336578369,
0.3875595033168793,
-0.024416260421276093,
0.33221256732940674,
-0.3974415063858032,
0.21161791682243347,
0.21895478665828705,
-0.09295327961444855,
0.13736720383167267,
-0.10144156217575073,
-0.17801517248153687,
0.24896365404129028,
-0.1748054474592209,
-0.3778155446052551,
0.04972493648529053,
0.3831818699836731,
-0.09312838315963745,
-0.21560777723789215,
-0.22124063968658447,
-0.11930610984563828,
-0.007343503180891275,
-0.07660506665706635,
0.30595850944519043,
0.10467486828565598,
-0.1713092029094696,
-0.38866126537323,
0.020005084574222565,
-0.22974538803100586,
-0.39222437143325806,
-0.23018749058246613,
-0.08108800649642944,
-0.17024947702884674,
0.4302000105381012,
-0.05723242834210396,
-0.15515965223312378,
0.44670984148979187,
0.1200256422162056,
0.12445957958698273,
-0.19502967596054077,
0.23510777950286865,
-0.26202353835105896,
0.4555162489414215,
0.21017301082611084,
0.12152479588985443,
0.1532929241657257,
0.05724777281284332,
0.22760753333568573,
-0.3159705400466919,
0.1280420422554016,
-0.11276707798242569,
-0.3635282814502716,
0.4842567443847656,
0.0978311225771904,
0.12214654684066772,
0.18723757565021515,
-0.24043697118759155,
0.35432273149490356,
0.20192378759384155,
-0.0046506039798259735,
0.12443853914737701,
-0.060228243470191956,
-0.39446109533309937,
-0.32466912269592285,
0.3908884823322296,
0.33632442355155945,
-0.18395103514194489,
-0.18023085594177246,
0.3643091022968292,
-0.2666833698749542,
0.18404746055603027,
0.3589737117290497,
-0.12915480136871338,
0.18406589329242706,
-0.37697288393974304,
0.4019330143928528,
-0.010067380964756012,
-0.16460298001766205,
-0.14880941808223724,
0.31551170349121094,
-0.006094135344028473,
0.25016042590141296,
0.1325821876525879,
-0.05476098135113716,
0.3193983733654022,
0.018839126452803612,
-0.1285381317138672,
0.1538527011871338,
-0.3660612106323242,
-0.09412491321563721,
-0.16134481132030487,
0.06930028647184372,
-0.029702097177505493,
0.011571384966373444,
-0.15662135183811188,
0.07564325630664825,
-0.2160435914993286,
-0.22955283522605896,
0.5505967140197754,
-0.22383332252502441,
0.10202891379594803,
0.12473288178443909,
0.30863258242607117,
-0.022615499794483185,
0.06184963881969452,
0.20860689878463745,
-0.25776800513267517,
0.2886146903038025,
-0.08279890567064285,
-0.044584713876247406,
0.0806114450097084,
-0.5615226030349731,
-0.06362396478652954,
-0.04510330408811569,
-0.14523819088935852,
-0.397695928812027,
0.10356180369853973,
0.047056347131729126,
0.4821653962135315,
-0.2623211443424225,
-0.2778695225715637,
0.19270087778568268,
-0.6806437969207764,
-0.0119558060541749,
-0.3948124647140503,
0.1175464540719986,
0.18114082515239716,
-0.09652519971132278,
0.05882430821657181,
0.06416532397270203,
0.045350588858127594,
-0.4959656894207001,
0.16432124376296997,
0.4061293601989746,
0.281461626291275,
0.04289456456899643,
-0.18886905908584595,
0.18127359449863434,
0.3146558701992035,
-0.062490031123161316,
-0.14178971946239471,
-0.1486705094575882,
-0.17529799044132233,
-0.16503095626831055,
-0.011017732322216034,
0.6699596643447876,
-0.07011573016643524,
0.32018059492111206,
0.11420080065727234,
0.0012779049575328827,
0.045871518552303314,
0.1484857052564621,
-0.14982415735721588,
-0.09453721344470978,
-0.1835724264383316,
-0.08258135616779327,
0.29822710156440735,
-0.011370932683348656,
-0.5510954856872559,
0.31815603375434875,
0.5054692625999451,
0.1215343028306961,
-0.25978410243988037,
-0.23796692490577698,
0.012533433735370636,
0.032372355461120605,
0.31638216972351074,
0.05382065102458,
0.345008909702301,
0.14225351810455322,
0.2044830620288849,
0.07341659069061279,
0.02064717374742031,
-0.15462398529052734,
0.05459537357091904,
0.1012834683060646,
0.255794882774353,
0.07709942013025284,
-0.4493362307548523,
-0.2954356372356415,
-0.32278013229370117,
0.014945585280656815,
0.16693426668643951,
0.007367919199168682,
-0.16611269116401672,
0.20670393109321594,
-0.09025808423757553,
-0.09070159494876862,
-0.22786371409893036,
0.10572174936532974,
0.01358886994421482,
-0.0171126127243042,
0.0372685007750988,
0.21290849149227142,
-0.05342332273721695,
0.269303560256958,
0.27662360668182373,
0.40448036789894104,
-0.08020812273025513,
0.1798979938030243,
-0.18707749247550964,
0.004269433673471212,
-0.14238682389259338,
0.0650438517332077,
0.08953758329153061,
0.030205940827727318,
0.32061946392059326,
-0.28502190113067627,
-0.13731881976127625,
-0.3353745937347412,
-0.08059147745370865,
0.19731847941875458,
-0.34295767545700073,
0.1788264811038971,
0.06268734484910965,
-0.042443349957466125,
-0.09523101150989532,
0.11206310242414474,
0.1987399011850357,
-0.265082985162735,
-0.10477200895547867,
-0.27128657698631287,
-0.04654688760638237,
-0.07885486632585526,
0.06874127686023712,
-0.47582343220710754,
-0.17322207987308502,
-0.2064189463853836,
0.5024128556251526,
0.05578269436955452,
0.2662550210952759,
-0.12319985777139664,
0.08664072304964066,
-0.12678642570972443,
-0.11576776206493378,
-0.0014516348019242287,
-0.193462535738945,
-0.414868026971817,
0.07958107441663742,
-0.4731903672218323,
-0.3726237118244171,
-0.06908486038446426,
0.16770046949386597,
0.4664331376552582,
0.37381476163864136,
-0.3464277982711792,
-0.15493737161159515,
0.09307300299406052,
-0.13159812986850739,
0.04277683049440384,
-0.0894072875380516,
0.2864004373550415,
-0.3454274535179138,
0.046850718557834625,
-0.09975269436836243,
-0.04287373647093773,
0.2945359945297241,
-0.08417575061321259,
-0.15287113189697266,
0.17062798142433167,
0.27761662006378174,
0.30652695894241333,
0.8011935949325562,
0.7233624458312988,
-0.025032196193933487,
0.09823296219110489,
-0.16082336008548737,
0.21555666625499725,
-0.06488917022943497,
0.10194096714258194,
0.11845637112855911,
-0.06664793193340302,
-0.13687609136104584,
0.20538485050201416,
-0.06842473149299622,
-0.10785667598247528,
0.1080533117055893,
0.24294161796569824,
-0.036231376230716705,
-0.3629450798034668,
0.3129889667034149,
0.17507924139499664,
0.4436720907688141,
0.021062899380922318,
0.33119529485702515,
0.13348856568336487,
0.0940311849117279,
0.11807526648044586,
-0.08140285313129425,
0.4656620919704437,
0.004330132156610489,
-0.5618243217468262,
-0.12601633369922638,
-0.2855851948261261,
0.2276286780834198,
-0.06296378374099731,
0.2838332951068878,
-0.18554246425628662,
-0.23660123348236084,
0.23014934360980988,
0.06867019087076187,
0.6562420129776001,
-0.19128364324569702,
-0.39878106117248535,
0.13179515302181244,
-0.48773470520973206,
0.07928818464279175,
-0.05224037170410156,
-0.1685328185558319,
0.4867171049118042,
0.12649668753147125,
0.3603977859020233,
-0.2017379105091095,
-0.43067675828933716,
0.36124685406684875,
-0.01712295040488243,
-0.1973581314086914,
0.06961996853351593,
-0.14648446440696716,
-0.26555687189102173,
-0.17230507731437683,
0.29947808384895325,
0.2188849300146103,
0.054712701588869095,
-0.25281715393066406,
-0.224392831325531,
-0.2868678867816925,
0.15520834922790527,
0.011019259691238403,
0.34894973039627075,
0.3030499815940857,
-0.0534139983355999,
0.16589230298995972,
0.4143820106983185,
0.0714351013302803,
0.2510451078414917,
0.4517948627471924,
-0.004824239760637283,
-0.09708072245121002,
0.2884688377380371,
-0.17612646520137787,
0.34599608182907104,
0.5448267459869385,
-0.09599440544843674,
0.015142753720283508,
-0.17703703045845032,
0.07675021886825562,
-0.5274645090103149,
-0.053274426609277725,
0.1326427459716797,
0.06692350655794144,
-0.46825575828552246,
-0.4496792256832123,
0.2930780351161957,
0.20294570922851562,
-0.10392696410417557,
0.4595675468444824,
0.2608376145362854,
-0.28545141220092773,
0.31865936517715454,
0.2698817253112793,
0.7651161551475525,
-0.012937530875205994,
0.0509926863014698,
0.19064557552337646,
0.14306750893592834,
0.3002360761165619,
-0.40584278106689453,
0.30246227979660034,
-0.37643498182296753,
-0.5368128418922424,
-0.03144703432917595,
-0.13958854973316193,
0.2987842857837677,
0.5255337357521057,
0.05612960085272789,
0.24054816365242004,
0.182681605219841,
0.03632449358701706,
-0.28723838925361633,
0.08074772357940674,
0.07674577087163925,
-0.3110923171043396,
-0.1117764264345169,
0.10602323710918427,
0.06383203715085983,
0.24662573635578156,
-0.13946107029914856,
-0.08553829044103622,
0.04947764798998833,
0.019674066454172134,
-0.06685830652713776,
-0.24846112728118896,
-0.30337998270988464,
0.10793427377939224,
0.10773833096027374,
-0.4127398133277893,
-0.08610658347606659,
0.19354508817195892,
0.39248931407928467,
-0.15727777779102325,
-0.015482848510146141,
0.03839515894651413,
0.038987718522548676,
-0.23808959126472473,
-0.05718407407402992,
-0.24773047864437103,
0.14455164968967438,
0.03864777088165283,
0.03178710490465164,
-0.026923231780529022,
0.04436612129211426,
-0.32751017808914185,
-0.17467837035655975,
-0.041799455881118774,
-0.11423744261264801,
-0.31542518734931946,
-0.05861712619662285,
0.14348939061164856,
-0.10340476036071777,
-0.16716448962688446,
0.07733174413442612,
-0.02075885236263275,
-0.3604850172996521,
0.36514678597450256,
0.03425291180610657,
-0.25591230392456055,
-0.07748422026634216,
0.0038419365882873535,
0.19540813565254211,
-0.038759879767894745,
0.10022461414337158,
0.023193467408418655,
-0.029923774302005768,
-0.22861775755882263,
-0.03043784573674202,
0.2916353940963745,
-0.34387528896331787,
0.17136292159557343,
-0.32822588086128235,
0.3516068458557129,
-0.08913377672433853,
0.16266930103302002,
0.1446530669927597,
0.16353800892829895,
-0.1485552042722702,
-0.22153256833553314,
-0.2101999968290329,
0.1941772997379303,
0.11074192821979523,
0.42385125160217285,
0.1637265980243683,
0.056168083101511,
-0.0472433902323246,
0.41649070382118225,
-0.30790168046951294,
-0.10623855888843536,
-0.2061404585838318,
0.26240718364715576,
0.1359361708164215,
0.17124730348587036,
0.15432430803775787,
-0.006063355132937431,
-0.005846481770277023,
0.3439781069755554,
-0.23321963846683502,
-0.21158671379089355,
0.0214034765958786,
0.14208561182022095,
0.15626895427703857,
0.13905508816242218,
0.023421328514814377,
0.21583539247512817,
-0.2585314214229584,
-0.3657150864601135,
0.4244089424610138,
-0.08983343094587326,
0.11432689428329468,
-0.05186356231570244,
0.25106748938560486,
0.08203833550214767,
-0.2790701389312744,
0.12591087818145752,
0.11322399228811264,
-0.06212759017944336,
0.20439377427101135,
0.18121640384197235,
-0.11732781678438187,
-0.11244623363018036,
0.24154895544052124,
0.09969580173492432,
0.28482580184936523,
-0.0916701927781105,
0.028973571956157684,
-0.0296536386013031,
0.11708453297615051,
-0.039561472833156586,
0.4064650535583496,
0.2763809561729431,
-0.10980191081762314,
0.005249546840786934,
0.0037360219284892082,
0.22446657717227936,
-0.05344974994659424,
0.05583302676677704,
0.25401103496551514,
-0.0032862210646271706,
0.21482795476913452,
0.6381479501724243,
0.6046342253684998,
0.3459823429584503,
0.1012112945318222,
0.06978734582662582,
0.12022781372070312,
-0.48613399267196655,
0.3141220510005951,
0.016669083386659622,
-0.05505284667015076,
0.3436349630355835,
0.27205219864845276,
0.21968692541122437,
0.19752956926822662,
0.23934829235076904,
-0.2510235011577606,
0.6070181727409363,
0.1004970446228981,
0.03026626445353031,
0.1261741816997528,
-0.4255165159702301,
-0.16478605568408966,
0.07478825747966766,
-0.05376094579696655,
0.18807129561901093,
-0.2163718342781067,
0.16677740216255188,
-0.298941045999527,
-0.5278444886207581,
-0.141810804605484,
0.13315452635288239,
-0.3684738874435425,
-0.1732572615146637,
-0.37372827529907227,
-0.0679892748594284,
-0.2628682255744934,
0.05171961709856987,
0.051510706543922424,
-0.35719823837280273,
0.48450180888175964,
-0.09914436936378479,
0.013749733567237854,
-0.12028089165687561,
0.0609673373401165,
-0.010792218148708344,
0.2599259614944458,
-0.19600555300712585,
0.16677182912826538,
-0.2145579308271408,
-0.05400818586349487,
0.0067649781703948975,
0.11342751979827881,
0.15928791463375092,
-0.05462557077407837,
-0.007179694250226021,
0.3169010281562805,
0.14387919008731842,
0.05609344691038132,
-0.03458171337842941,
0.16354435682296753,
0.01450146734714508,
-0.026576008647680283,
0.3163417875766754,
0.11854343116283417,
-0.007362555246800184,
-0.15114204585552216,
0.2163507044315338,
0.16239938139915466,
-0.3168548345565796,
0.26444992423057556,
-0.25180232524871826,
-0.13134236633777618,
-0.016897372901439667,
0.0015683025121688843,
-0.19944003224372864,
-0.16027411818504333,
0.42462772130966187,
-0.30702725052833557,
0.1525094211101532,
0.11248846352100372,
0.07463463395833969,
-0.1289566159248352,
0.35223859548568726,
-0.1930679827928543,
0.054779890924692154,
-0.5252783894538879,
-0.3237004280090332,
-0.23747864365577698,
0.0024126768112182617,
-0.16254577040672302,
-0.04970214515924454,
0.053966619074344635,
0.5451312065124512,
0.19717314839363098,
0.2103513926267624,
-0.06609582901000977,
-0.34697794914245605,
0.06666108965873718,
0.527302622795105,
-0.24081513285636902,
-0.06597784161567688,
-0.6515903472900391,
0.07369355857372284,
0.17044149339199066,
-0.16865982115268707,
0.1799006313085556,
0.13832643628120422,
-0.13854078948497772,
0.003207150846719742,
0.177227184176445,
0.2952156364917755,
-0.1923069804906845,
0.0764090046286583,
0.0259341262280941,
0.08467505872249603,
0.02065262570977211,
0.010606328025460243,
-0.2979646623134613,
-0.13819649815559387,
-0.3796665072441101,
0.4853023588657379,
-0.01596047356724739,
0.07820068299770355,
-0.08586922287940979,
-0.24234552681446075,
-0.3212639093399048,
0.16947422921657562,
0.3983856439590454,
-0.16340798139572144,
0.16964781284332275,
0.2632386088371277,
-0.19094067811965942,
0.05070507153868675,
0.5877329111099243,
0.5096012949943542,
-0.010493248701095581,
-0.11804043501615524,
-0.18688258528709412,
-0.3611954152584076,
0.4083540439605713,
-0.4602656364440918,
-0.12208342552185059,
-0.10051523149013519,
0.22196660935878754,
0.31941869854927063,
-0.15779027342796326,
-0.505429744720459,
-0.21285808086395264,
0.33686599135398865,
-0.41747236251831055,
0.11997836828231812,
0.29293814301490784,
0.14346171915531158,
-0.30647769570350647,
-0.08903335779905319,
0.1275666207075119,
-0.04613211005926132,
-0.5232008099555969,
0.09096069633960724,
-0.5348387956619263
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct?
|
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_
| 17
|
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_
I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct?
|
[
-0.4411477744579315,
-0.5177353024482727,
-0.08604490011930466,
0.26262927055358887,
0.01581949181854725,
-0.05252701789140701,
0.41741013526916504,
0.2206910401582718,
-0.012562358751893044,
0.09857984632253647,
0.07519344985485077,
0.29676586389541626,
0.17903953790664673,
0.30831465125083923,
0.02982421964406967,
-0.12798963487148285,
0.11298394948244095,
0.10172785073518753,
-0.03931914269924164,
-0.04098179191350937,
-0.20166686177253723,
0.335109144449234,
-0.1542293280363083,
-0.11706480383872986,
-0.3686451017856598,
-0.13218915462493896,
-0.08232317864894867,
-0.019428759813308716,
0.18084760010242462,
-0.343408465385437,
0.17024318873882294,
0.305826872587204,
-0.005985855124890804,
0.29152417182922363,
-0.00011228567018406466,
0.18926559388637543,
0.009874865412712097,
-0.2040964961051941,
-0.11183387041091919,
0.09462959319353104,
-0.12995176017284393,
0.07693173736333847,
-0.43808916211128235,
-0.18546746671199799,
-0.40735524892807007,
-0.2784872353076935,
-0.0008075274527072906,
-0.3366996645927429,
0.16200199723243713,
-0.059081606566905975,
0.16329196095466614,
0.18591365218162537,
-0.1267806589603424,
-0.06848431378602982,
0.07038566470146179,
0.3642593026161194,
-0.15200455486774445,
-0.17017720639705658,
0.026041723787784576,
0.12725234031677246,
0.002429276704788208,
0.40185946226119995,
0.15302279591560364,
0.26509854197502136,
0.029851708561182022,
0.09935954213142395,
-0.16862404346466064,
-0.2500554621219635,
-0.11583205312490463,
0.24375423789024353,
0.03410721197724342,
-0.13576409220695496,
-0.38818463683128357,
-0.5524799227714539,
-0.19706344604492188,
-0.24276573956012726,
-0.008799783885478973,
0.20631259679794312,
-0.10093191266059875,
-0.02154938504099846,
-0.353948712348938,
0.12318186461925507,
-0.035561490803956985,
-0.20001797378063202,
0.2806869149208069,
0.3912389278411865,
-0.15682439506053925,
0.425338476896286,
0.24333445727825165,
0.3010512590408325,
-0.06274737417697906,
0.07347161322832108,
-0.17160016298294067,
-0.20910175144672394,
-0.4476947784423828,
-0.11739844083786011,
0.16759058833122253,
0.031357888132333755,
0.3301425874233246,
0.35945427417755127,
0.20147620141506195,
0.040169935673475266,
0.43594613671302795,
-0.016502775251865387,
0.349386602640152,
-0.45391398668289185,
0.33756640553474426,
0.1303720623254776,
0.06230812147259712,
0.029459016397595406,
0.03903750702738762,
-0.08234459161758423,
0.30081167817115784,
-0.33017659187316895,
-0.3468804955482483,
0.011696681380271912,
0.4521922469139099,
-0.10495169460773468,
-0.23266369104385376,
-0.3827338218688965,
-0.11836068332195282,
-0.022887153550982475,
-0.0745830163359642,
0.21920517086982727,
0.2660456895828247,
-0.18896138668060303,
-0.45285916328430176,
0.09993620216846466,
-0.29627519845962524,
-0.4801565110683441,
-0.1959393173456192,
-0.19186308979988098,
-0.07335227727890015,
0.42754924297332764,
-0.0013148598372936249,
-0.19777555763721466,
0.3294662833213806,
0.11616440862417221,
0.10544693470001221,
-0.2497696876525879,
0.20613184571266174,
-0.1674533188343048,
0.21236839890480042,
0.3166590631008148,
0.16246728599071503,
0.15625233948230743,
0.016252124682068825,
0.15067829191684723,
-0.3061753511428833,
0.20272082090377808,
-0.11166798323392868,
-0.412289559841156,
0.4362497627735138,
0.09651781618595123,
0.12596017122268677,
0.18725751340389252,
-0.36170050501823425,
0.32214033603668213,
0.35403162240982056,
-0.03586100786924362,
0.07022020220756531,
-0.011434391140937805,
-0.46336543560028076,
-0.31232279539108276,
0.22669854760169983,
0.4224300980567932,
-0.08168421685695648,
-0.23293505609035492,
0.2306874841451645,
-0.29178497195243835,
0.10435222834348679,
0.4898083209991455,
-0.1964816451072693,
0.10242107510566711,
-0.403222918510437,
0.5295925736427307,
-0.14168080687522888,
-0.06986789405345917,
-0.23694726824760437,
0.41031399369239807,
-0.050768882036209106,
0.08384932577610016,
0.15618082880973816,
-0.013463793322443962,
0.30036255717277527,
-0.07806509733200073,
-0.05528073012828827,
0.20412643253803253,
-0.30705422163009644,
-0.02286342903971672,
-0.1628069281578064,
0.01188192330300808,
-0.010127164423465729,
0.020688384771347046,
-0.09384895861148834,
0.01194608211517334,
-0.12433784455060959,
-0.2148084044456482,
0.5052295327186584,
-0.18872953951358795,
0.15640154480934143,
0.17117294669151306,
0.4274313449859619,
-0.16256511211395264,
0.12573951482772827,
0.0737895518541336,
-0.3087589144706726,
0.3124622702598572,
-0.17568665742874146,
-0.1702035516500473,
0.11390820890665054,
-0.5557127594947815,
-0.02744271606206894,
-0.045026663690805435,
-0.1865636557340622,
-0.27257439494132996,
0.05969788879156113,
0.06848035752773285,
0.2869827151298523,
-0.43034806847572327,
-0.2632693648338318,
0.1470741182565689,
-0.5283803343772888,
-0.005171198397874832,
-0.27113914489746094,
0.1164732277393341,
0.18657684326171875,
-0.12448574602603912,
0.018694061785936356,
-0.01612267643213272,
0.18648868799209595,
-0.497717022895813,
0.1838339865207672,
0.38327136635780334,
0.30811643600463867,
0.08171240985393524,
-0.12540504336357117,
0.18072296679019928,
0.3318207263946533,
0.03671036288142204,
-0.11434603482484818,
-0.04769163206219673,
-0.20776884257793427,
-0.22725725173950195,
-0.1057342067360878,
0.5842344760894775,
-0.11570924520492554,
0.4635700285434723,
-0.08658803999423981,
-0.011983322910964489,
0.17475390434265137,
0.18182194232940674,
-0.1923820525407791,
-0.18819913268089294,
-0.13631081581115723,
-0.11831039190292358,
0.1874215304851532,
0.07156339287757874,
-0.3310020864009857,
0.31586551666259766,
0.2839607298374176,
0.09475503861904144,
-0.16364505887031555,
-0.12702980637550354,
0.0639198049902916,
-0.06912674009799957,
0.2508494257926941,
0.18503130972385406,
0.43350303173065186,
0.12975101172924042,
0.11537876725196838,
-0.08736409991979599,
-0.037753503769636154,
-0.18446016311645508,
0.029093831777572632,
0.07046478241682053,
0.2611980438232422,
0.1826009452342987,
-0.3092762231826782,
-0.35193273425102234,
-0.3246099352836609,
-0.06287220120429993,
0.3048270344734192,
-0.013413360342383385,
-0.2372484803199768,
0.21402157843112946,
-0.08925823867321014,
-0.1258758157491684,
-0.14349283277988434,
0.17948304116725922,
-0.12468750774860382,
-0.08043023198843002,
0.042720723897218704,
0.3348574936389923,
-0.15921813249588013,
0.2973278760910034,
0.30493566393852234,
0.4387066960334778,
-0.13959236443042755,
0.09812059253454208,
-0.10545012354850769,
0.04668082669377327,
-0.018112558871507645,
0.03540929779410362,
0.1487453579902649,
-0.00027175387367606163,
0.3634111285209656,
-0.20654995739459991,
-0.20663179457187653,
-0.4553667902946472,
-0.06842467188835144,
0.19926393032073975,
-0.26859045028686523,
0.20772840082645416,
0.04789295792579651,
-0.09305649995803833,
0.060396552085876465,
0.15131810307502747,
0.21007399260997772,
-0.1974823921918869,
-0.06870017945766449,
-0.2081845998764038,
-0.11721758544445038,
-0.08303699642419815,
-0.002841796725988388,
-0.22727006673812866,
-0.01604975201189518,
-0.20529258251190186,
0.441339373588562,
-0.03513626009225845,
0.31100207567214966,
-0.04471176490187645,
0.13059908151626587,
-0.22234563529491425,
-0.05234370008111,
-0.20169301331043243,
-0.1526300609111786,
-0.2496279627084732,
-0.026861760765314102,
-0.44745934009552,
-0.312058687210083,
-0.03864452987909317,
0.1917097121477127,
0.4173644483089447,
0.5022122263908386,
-0.18617387115955353,
-0.17147670686244965,
0.0013983920216560364,
-0.12172403931617737,
0.1117306649684906,
-0.16199709475040436,
0.31470170617103577,
-0.25595420598983765,
0.017435746267437935,
-0.13408316671848297,
-0.13650453090667725,
0.4243747889995575,
-0.04165946692228317,
-0.11926937848329544,
0.3064117729663849,
0.35106807947158813,
0.25951340794563293,
0.8457051515579224,
0.8310250639915466,
0.06462986767292023,
0.17525562644004822,
-0.10485348850488663,
0.12764877080917358,
-0.1405123472213745,
0.10359377413988113,
0.1540888547897339,
-0.02687041461467743,
-0.18188311159610748,
0.21276599168777466,
-0.02848236635327339,
-0.17359311878681183,
0.1540018767118454,
0.14841783046722412,
-0.003958571702241898,
-0.40297311544418335,
0.24950028955936432,
0.1932305097579956,
0.4154260456562042,
0.05124836787581444,
0.2194649577140808,
0.08077052235603333,
0.170469731092453,
0.02023470588028431,
-0.11629180610179901,
0.5963429808616638,
-0.03848010674118996,
-0.5473155379295349,
0.04651178792119026,
-0.27673983573913574,
0.24922335147857666,
-0.0544193759560585,
0.3394725024700165,
-0.17375853657722473,
-0.10426227003335953,
0.253365159034729,
0.036540448665618896,
0.6893620491027832,
-0.2154894322156906,
-0.2580661177635193,
0.10470119118690491,
-0.4589364230632782,
-0.07724456489086151,
-0.11523935198783875,
-0.10999128222465515,
0.634552538394928,
0.10481303930282593,
0.2752854526042938,
-0.2767789959907532,
-0.37370920181274414,
0.3034520745277405,
-0.039110615849494934,
-0.17082032561302185,
-0.051201365888118744,
-0.2073509246110916,
-0.24913883209228516,
-0.3226875960826874,
0.26800647377967834,
0.36209332942962646,
0.10638207197189331,
-0.18695993721485138,
-0.2658211588859558,
-0.4273093044757843,
-0.09195847064256668,
-0.0050109922885894775,
0.17872238159179688,
0.3370566666126251,
-0.11538015305995941,
0.3331823945045471,
0.3500114679336548,
-0.02203509956598282,
0.25540706515312195,
0.4117128252983093,
0.020302819088101387,
-0.11494344472885132,
0.26497095823287964,
-0.21424122154712677,
0.23323988914489746,
0.5782406330108643,
-0.10985304415225983,
0.005845524370670319,
-0.1861564964056015,
0.21471279859542847,
-0.49495160579681396,
-0.1428072303533554,
0.08594024926424026,
0.04306779056787491,
-0.4182348847389221,
-0.3760274350643158,
0.3077811598777771,
0.23782764375209808,
-0.1283106803894043,
0.5823010802268982,
0.4835662841796875,
-0.26819637417793274,
0.386588454246521,
0.21733137965202332,
0.7437523007392883,
-0.09213034808635712,
-0.08851920068264008,
0.00450526736676693,
0.27941256761550903,
0.13117530941963196,
-0.32469433546066284,
0.4140806794166565,
-0.34707945585250854,
-0.43519294261932373,
-0.005045857280492783,
-0.09474461525678635,
0.2979193329811096,
0.569923996925354,
0.17243528366088867,
0.21821390092372894,
0.13970625400543213,
0.0034156404435634613,
-0.3371571898460388,
0.14281043410301208,
-0.016026409342885017,
-0.3166387975215912,
-0.012901779264211655,
0.08448035269975662,
0.014287624508142471,
0.3446868658065796,
-0.1264331191778183,
-0.010759443044662476,
0.20604687929153442,
-0.02994897961616516,
-0.22690512239933014,
-0.31089577078819275,
-0.15881313383579254,
0.18950873613357544,
0.06956616044044495,
-0.3882240653038025,
-0.018923796713352203,
0.14551685750484467,
0.3021146059036255,
-0.18069711327552795,
-0.02891174890100956,
0.06546390801668167,
-0.07157783955335617,
-0.2990628778934479,
-0.21763989329338074,
-0.21848620474338531,
0.026605788618326187,
-0.024305667728185654,
-0.10978150367736816,
-0.23465129733085632,
0.11267080903053284,
-0.45984238386154175,
-0.1907738298177719,
0.029981423169374466,
-0.17552055418491364,
-0.22966088354587555,
0.011989342048764229,
0.0705937072634697,
-0.09440941363573074,
-0.19013428688049316,
0.052022699266672134,
0.054867301136255264,
-0.1586318463087082,
0.30215781927108765,
0.05666067823767662,
-0.26769763231277466,
-0.03630745783448219,
0.07455913722515106,
0.06078927218914032,
-0.11331155151128769,
0.028548981994390488,
-0.020427430048584938,
-0.0722765326499939,
-0.2161792814731598,
-0.06745807826519012,
0.14675600826740265,
-0.37554672360420227,
0.21087491512298584,
-0.4256216585636139,
0.27006977796554565,
-0.07076434791088104,
0.16835737228393555,
0.09966446459293365,
0.28594863414764404,
-0.07587440311908722,
-0.23174864053726196,
-0.031882382929325104,
0.16440781950950623,
-0.03391014412045479,
0.3626489043235779,
0.14299553632736206,
-0.15270230174064636,
0.05637286603450775,
0.4002896547317505,
-0.27011650800704956,
-0.16104009747505188,
-0.08977960050106049,
0.1827153116464615,
0.1829279214143753,
0.17666956782341003,
0.019945288076996803,
0.01940504088997841,
-0.039199188351631165,
0.37048572301864624,
-0.13516734540462494,
-0.16611534357070923,
0.019122637808322906,
0.15092051029205322,
0.12130898237228394,
0.051834166049957275,
0.04622581973671913,
0.0490054115653038,
-0.34470072388648987,
-0.38830384612083435,
0.44540098309516907,
-0.014485271647572517,
0.06912492215633392,
-0.13824279606342316,
0.4335647523403168,
0.04006395861506462,
-0.25633275508880615,
0.23368769884109497,
0.16772335767745972,
-0.04671312868595123,
0.10752340406179428,
0.1955653429031372,
-0.0064688632264733315,
-0.10438711941242218,
0.14721645414829254,
0.1722680628299713,
0.4125370979309082,
-0.00021971017122268677,
-0.06971322745084763,
-0.04708268493413925,
0.13946233689785004,
0.07510866224765778,
0.4616427719593048,
0.24013206362724304,
-0.15845292806625366,
0.0785880982875824,
-0.03496586158871651,
0.21617712080478668,
-0.1011616662144661,
-0.12510260939598083,
0.20752021670341492,
0.18996219336986542,
0.25032109022140503,
0.6625104546546936,
0.6368762850761414,
0.29679977893829346,
0.10760454833507538,
0.12658166885375977,
0.17337124049663544,
-0.45095741748809814,
0.25132882595062256,
-0.007784102112054825,
-0.07772427797317505,
0.2171740084886551,
0.3312615752220154,
0.08044277131557465,
0.31142470240592957,
0.49540746212005615,
-0.3437350392341614,
0.7242546677589417,
0.13681691884994507,
0.06875337660312653,
0.1586398482322693,
-0.3780406713485718,
-0.08088800311088562,
0.06148633360862732,
-0.006784498691558838,
0.06949997693300247,
-0.08365854620933533,
0.19304993748664856,
-0.24852289259433746,
-0.45734816789627075,
-0.18971498310565948,
0.13949427008628845,
-0.28885823488235474,
-0.3046199679374695,
-0.33090075850486755,
-0.05749238282442093,
-0.29403531551361084,
0.0635664165019989,
-0.047125134617090225,
-0.2884666323661804,
0.5046266913414001,
-0.12774549424648285,
0.03937627375125885,
-0.19466598331928253,
0.1369788646697998,
-0.03683207929134369,
0.31772640347480774,
-0.3026016652584076,
0.08888450264930725,
-0.1331104189157486,
-0.043305084109306335,
0.12793469429016113,
0.06337638944387436,
0.2237551063299179,
-0.07758509367704391,
-0.03457173332571983,
0.34641698002815247,
-0.061602216213941574,
0.10243096947669983,
-0.11271712929010391,
0.06871873140335083,
-0.16844633221626282,
0.0540766604244709,
0.2779085040092468,
0.08951001614332199,
-0.0030618617311120033,
-0.2436227947473526,
0.2442350536584854,
0.1921895295381546,
-0.3478055000305176,
0.3887711763381958,
-0.4258796274662018,
-0.13094836473464966,
0.019227944314479828,
0.06149808689951897,
-0.04530840367078781,
-0.21772055327892303,
0.42082449793815613,
-0.3409176170825958,
0.13939154148101807,
0.09814753383398056,
0.06838703900575638,
-0.12725043296813965,
0.3243672549724579,
-0.46587178111076355,
0.04524962604045868,
-0.4151083528995514,
-0.26167428493499756,
-0.32985401153564453,
-0.04301973432302475,
-0.2813170552253723,
0.07702303677797318,
0.11504248529672623,
0.5291208624839783,
0.10534326732158661,
0.20730789005756378,
0.04165295511484146,
-0.15727181732654572,
0.11560816317796707,
0.5700750350952148,
-0.16114526987075806,
-0.03808512166142464,
-0.6279804110527039,
-0.01627119816839695,
0.26348820328712463,
-0.33171263337135315,
0.2188517451286316,
0.11044950783252716,
-0.1368345022201538,
-0.09258998185396194,
0.15778397023677826,
0.44324102997779846,
-0.24083349108695984,
0.09477045387029648,
0.11112289875745773,
0.1702260673046112,
0.10397223383188248,
0.01808975823223591,
-0.4660794734954834,
-0.13371600210666656,
-0.4687620997428894,
0.4345293641090393,
0.02421850711107254,
0.07202193886041641,
-0.12944045662879944,
-0.22622762620449066,
-0.33741089701652527,
0.2587609589099884,
0.2859352231025696,
0.03331541642546654,
0.03110397793352604,
0.28804710507392883,
-0.24740692973136902,
0.08885925263166428,
0.4729548990726471,
0.35398006439208984,
0.050975680351257324,
-0.12372627854347229,
-0.1548253744840622,
-0.4350983202457428,
0.3425980508327484,
-0.3666212260723114,
-0.10658611357212067,
-0.16290947794914246,
0.290084570646286,
0.2730198800563812,
-0.3124352991580963,
-0.42017242312431335,
-0.24481499195098877,
0.3061544895172119,
-0.26710590720176697,
0.13119792938232422,
0.244661346077919,
0.15890958905220032,
-0.3830147981643677,
-0.13359680771827698,
0.12554623186588287,
0.020569320768117905,
-0.47345593571662903,
0.12438398599624634,
-0.41757696866989136
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs
|
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_
| 48
|
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_
Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs
|
[
-0.3965553641319275,
-0.5092835426330566,
-0.10583855211734772,
0.27406230568885803,
0.09119001775979996,
-0.07791038602590561,
0.3442017436027527,
0.22046896815299988,
0.07059136033058167,
0.1096988320350647,
-0.0588264986872673,
0.4742526710033417,
0.2462736815214157,
0.3017977178096771,
0.032958079129457474,
-0.11664178967475891,
0.0286499485373497,
0.11272263526916504,
-0.22565802931785583,
-0.1138760894536972,
-0.21732261776924133,
0.28798365592956543,
-0.17019648849964142,
-0.13735178112983704,
-0.3091675341129303,
-0.13444052636623383,
-0.10840620845556259,
0.06139662489295006,
0.06829240173101425,
-0.22696365416049957,
0.1320948749780655,
0.1705821007490158,
-0.08637604117393494,
0.3495585322380066,
-0.00010638587991707027,
0.1939058154821396,
-0.019761614501476288,
-0.23072031140327454,
-0.05897519364953041,
-0.0652574747800827,
-0.09515003859996796,
0.07829070091247559,
-0.47370725870132446,
-0.19157150387763977,
-0.3503871560096741,
-0.20234911143779755,
-0.053944215178489685,
-0.39267516136169434,
0.31733113527297974,
-0.09090294688940048,
0.2270611971616745,
0.16084608435630798,
-0.148315891623497,
-0.10745798051357269,
0.05443272739648819,
0.3556768298149109,
-0.1626202017068863,
-0.1393008977174759,
0.015189111232757568,
0.1669253259897232,
-0.038318462669849396,
0.4355911612510681,
0.0695948377251625,
0.29668906331062317,
0.10032906383275986,
0.12415087968111038,
-0.17917713522911072,
-0.26172056794166565,
-0.02411029487848282,
0.21173405647277832,
0.04826653003692627,
-0.17959800362586975,
-0.3160434365272522,
-0.41384297609329224,
-0.3186228573322296,
-0.24621576070785522,
-0.07030690461397171,
0.17381350696086884,
-0.13253432512283325,
0.004300273954868317,
-0.3789431154727936,
0.14845462143421173,
0.003484472632408142,
-0.17431145906448364,
0.23540252447128296,
0.2945215404033661,
-0.19086535274982452,
0.4279632270336151,
0.18527251482009888,
0.354988157749176,
-0.16323409974575043,
-0.06257348507642746,
-0.10060785710811615,
-0.13082359731197357,
-0.39634543657302856,
-0.12887752056121826,
0.19644153118133545,
0.06987303495407104,
0.43514642119407654,
0.27482306957244873,
0.19151495397090912,
0.11943681538105011,
0.35035622119903564,
0.019979722797870636,
0.44544973969459534,
-0.3423839211463928,
0.27043429017066956,
0.121358223259449,
-0.012881152331829071,
-0.07380086928606033,
-0.13657847046852112,
-0.14286917448043823,
0.40605735778808594,
-0.10396985709667206,
-0.35561949014663696,
-0.05051816999912262,
0.43574297428131104,
-0.10554477572441101,
-0.2270912528038025,
-0.35208040475845337,
-0.10211104154586792,
-0.04750242084264755,
-0.09731622040271759,
0.315228134393692,
0.22185108065605164,
-0.2205832302570343,
-0.4474114775657654,
0.03427192568778992,
-0.2223345786333084,
-0.2712288200855255,
-0.2582088112831116,
-0.21477530896663666,
-0.17344994843006134,
0.4274986684322357,
-0.03606564551591873,
-0.1892007440328598,
0.47146520018577576,
0.10784613341093063,
0.11556346714496613,
-0.18388473987579346,
0.29762211441993713,
-0.21618032455444336,
0.3502656817436218,
0.23938202857971191,
0.18494635820388794,
0.20706549286842346,
0.0019526295363903046,
0.1427682787179947,
-0.23860526084899902,
0.17311212420463562,
-0.1875750720500946,
-0.386466920375824,
0.44612357020378113,
0.1479460448026657,
0.1340203732252121,
0.21963085234165192,
-0.3144984543323517,
0.26549166440963745,
0.2361387312412262,
-0.1234339028596878,
0.03268542140722275,
0.02986244671046734,
-0.4298054873943329,
-0.38233211636543274,
0.20241153240203857,
0.38960039615631104,
-0.05791821703314781,
-0.24186338484287262,
0.18033821880817413,
-0.22418111562728882,
0.09168597310781479,
0.49787768721580505,
-0.24503131210803986,
0.05538457632064819,
-0.41018086671829224,
0.5418630838394165,
-0.06326920539140701,
-0.07105238735675812,
-0.24192357063293457,
0.4067404866218567,
-0.07729611545801163,
0.13482068479061127,
0.01836942881345749,
-0.007632593624293804,
0.35577231645584106,
-0.10664631426334381,
-0.162400022149086,
0.24111849069595337,
-0.2905435264110565,
0.025373084470629692,
-0.1020759865641594,
0.07465860992670059,
0.04815879464149475,
-0.06882309913635254,
-0.2418692260980606,
0.06472202390432358,
-0.042633093893527985,
-0.13861437141895294,
0.5052057504653931,
-0.20557627081871033,
0.14272312819957733,
0.11693446338176727,
0.3943656086921692,
-0.13678550720214844,
0.1531905084848404,
0.07613498717546463,
-0.3618086576461792,
0.25591933727264404,
-0.12651336193084717,
-0.10292147099971771,
0.12755534052848816,
-0.5777973532676697,
-0.036932967603206635,
-0.06429368257522583,
-0.20373181998729706,
-0.32596829533576965,
0.13945285975933075,
0.07407739013433456,
0.2830706536769867,
-0.4103226959705353,
-0.20715056359767914,
0.09898131340742111,
-0.4791378676891327,
-0.051809340715408325,
-0.22542531788349152,
0.08064626902341843,
0.10263499617576599,
-0.11315711587667465,
-0.01503329910337925,
0.015829559415578842,
0.1520351767539978,
-0.42121565341949463,
0.2043212652206421,
0.32451704144477844,
0.3741716742515564,
0.024566255509853363,
-0.1421937644481659,
0.09170792251825333,
0.28233465552330017,
0.04417269304394722,
-0.10269127041101456,
-0.031346794217824936,
-0.10180346667766571,
-0.3153291642665863,
-0.11746243387460709,
0.5032423138618469,
0.0027682706713676453,
0.42210888862609863,
-0.034684278070926666,
0.006969854235649109,
0.16605263948440552,
0.11226007342338562,
-0.13649749755859375,
-0.17792212963104248,
-0.19817505776882172,
-0.08064907789230347,
0.30044788122177124,
0.16208909451961517,
-0.326273649930954,
0.3555035889148712,
0.449404776096344,
0.13013847172260284,
-0.1395350694656372,
-0.19402337074279785,
-0.04853504151105881,
-0.0631960853934288,
0.27642664313316345,
0.09121040999889374,
0.4671953320503235,
0.17033696174621582,
0.16026481986045837,
0.018216228112578392,
0.0760621726512909,
-0.08893164247274399,
0.05150265619158745,
0.10829702019691467,
0.30752822756767273,
0.10142403095960617,
-0.35545310378074646,
-0.30238351225852966,
-0.37179023027420044,
-0.021317213773727417,
0.21207401156425476,
-0.08513831347227097,
-0.1790623664855957,
0.16865332424640656,
-0.13064508140087128,
-0.09555236995220184,
-0.09196628630161285,
0.11116167157888412,
-0.07653345167636871,
-0.056525491178035736,
-0.004451960325241089,
0.3408578932285309,
-0.13993729650974274,
0.30167660117149353,
0.39267709851264954,
0.3293191194534302,
-0.06095803901553154,
0.02467571571469307,
-0.17506244778633118,
-0.02086525410413742,
-0.03168529272079468,
0.10556747019290924,
0.16065998375415802,
0.01583094894886017,
0.34041091799736023,
-0.15231747925281525,
-0.147115558385849,
-0.4043912887573242,
-0.14942216873168945,
0.24225284159183502,
-0.39584726095199585,
0.14942193031311035,
0.0818728506565094,
0.0006902068853378296,
-0.06013081222772598,
0.17372342944145203,
0.1629590541124344,
-0.34408167004585266,
-0.219291090965271,
-0.2201068252325058,
-0.09439432621002197,
-0.21950869262218475,
-0.14982278645038605,
-0.3258090913295746,
0.0038060015067458153,
-0.24806341528892517,
0.5107690691947937,
0.0873088538646698,
0.3038884103298187,
-0.08771994709968567,
0.1612146943807602,
-0.11093835532665253,
-0.15731637179851532,
-0.16753117740154266,
-0.33033430576324463,
-0.2844567596912384,
0.07491191476583481,
-0.4981778562068939,
-0.3545253276824951,
-0.05130042880773544,
0.2191695272922516,
0.4163537621498108,
0.3550376892089844,
-0.23614339530467987,
-0.2395831197500229,
0.07793216407299042,
-0.04043351486325264,
0.1055598258972168,
-0.00352470763027668,
0.36088451743125916,
-0.26960289478302,
-0.04199777916073799,
-0.221990168094635,
-0.19074738025665283,
0.31306949257850647,
0.022669583559036255,
-0.01841038465499878,
0.2633685767650604,
0.3362203538417816,
0.26661112904548645,
0.8166880011558533,
0.768989086151123,
0.052229661494493484,
0.2619006633758545,
-0.18246382474899292,
0.20740312337875366,
-0.27019622921943665,
0.12629254162311554,
0.16140170395374298,
-0.10509985685348511,
-0.13805466890335083,
0.2185618281364441,
-0.042911142110824585,
-0.26517412066459656,
0.14871585369110107,
0.11222368478775024,
-0.05474038049578667,
-0.3507402539253235,
0.2349446564912796,
0.30265870690345764,
0.3016459047794342,
0.15868210792541504,
0.2769958972930908,
0.07064901292324066,
0.17952042818069458,
0.12830665707588196,
-0.18956352770328522,
0.5828248262405396,
-0.038842182606458664,
-0.5157601237297058,
0.024481195956468582,
-0.325069397687912,
0.26954585313796997,
0.007503877393901348,
0.15823501348495483,
-0.14012445509433746,
-0.18040144443511963,
0.20035068690776825,
0.055155523121356964,
0.6496486067771912,
-0.23829098045825958,
-0.2784264087677002,
0.0075050294399261475,
-0.4231199622154236,
-0.09444639831781387,
0.03936008736491203,
-0.09961795061826706,
0.6246877312660217,
0.17155690491199493,
0.3494327664375305,
-0.29325494170188904,
-0.3441535532474518,
0.1441427767276764,
0.002572176977992058,
-0.14087225496768951,
-0.0025426684878766537,
-0.22441159188747406,
-0.3072343170642853,
-0.3359425663948059,
0.1828576922416687,
0.3283472955226898,
0.018596937879920006,
-0.11088549345731735,
-0.20003649592399597,
-0.32875579595565796,
0.018382839858531952,
-0.016820944845676422,
0.21807891130447388,
0.4295182526111603,
-0.07962417602539062,
0.18846146762371063,
0.3939293324947357,
0.005116578191518784,
0.09345940500497818,
0.5060960650444031,
0.022491997107863426,
-0.03219740837812424,
0.2549412250518799,
-0.2637825608253479,
0.16617093980312347,
0.4939114451408386,
-0.0316028855741024,
-0.057351015508174896,
-0.2290416955947876,
0.12420278787612915,
-0.40306639671325684,
-0.21023166179656982,
0.14840072393417358,
0.05192752927541733,
-0.322592556476593,
-0.4094458818435669,
0.29580071568489075,
0.12065568566322327,
-0.17212532460689545,
0.548675537109375,
0.3402855396270752,
-0.16913966834545135,
0.4366651773452759,
0.21115607023239136,
0.751957356929779,
0.06283914297819138,
-0.01564239338040352,
0.10107842087745667,
0.2602725625038147,
0.11679577827453613,
-0.23373064398765564,
0.2582760453224182,
-0.3356398642063141,
-0.43171384930610657,
-0.007550083100795746,
-0.15591742098331451,
0.21159371733665466,
0.5273835062980652,
0.04027392342686653,
0.20728087425231934,
0.20669852197170258,
0.10548101365566254,
-0.3153412640094757,
0.14250095188617706,
0.048123110085725784,
-0.2646290063858032,
0.0006271097809076309,
0.17908655107021332,
0.07654432952404022,
0.32973626255989075,
-0.044401586055755615,
-0.09180767089128494,
0.16554823517799377,
-0.08886466920375824,
-0.06525127589702606,
-0.2248493731021881,
-0.2275732159614563,
0.18969132006168365,
0.06590526551008224,
-0.26519775390625,
-0.07169212400913239,
0.14851348102092743,
0.17872768640518188,
-0.13886864483356476,
-0.009900866076350212,
0.06576277315616608,
0.060394126921892166,
-0.05464520677924156,
-0.164569690823555,
-0.2704123854637146,
0.07076015323400497,
0.00034816935658454895,
-0.038257770240306854,
-0.18184074759483337,
0.03438529744744301,
-0.46684134006500244,
-0.23909151554107666,
0.07563848048448563,
-0.1412692815065384,
-0.23741330206394196,
-0.01429261639714241,
0.16033193469047546,
-0.15473432838916779,
-0.14849890768527985,
0.10110361874103546,
-0.019087329506874084,
-0.16701039671897888,
0.3799264132976532,
0.06651025265455246,
-0.2962491512298584,
-0.05844418331980705,
0.12109839171171188,
0.12753640115261078,
-0.031113389879465103,
0.02076476626098156,
-0.11572510004043579,
-0.10812453180551529,
-0.19999045133590698,
-0.07127012312412262,
0.19063512980937958,
-0.3417556583881378,
0.18152925372123718,
-0.40394288301467896,
0.2375478297472,
-0.07108794152736664,
0.21495024859905243,
0.039116814732551575,
0.33682265877723694,
-0.16242219507694244,
-0.249302476644516,
-0.09219852089881897,
0.18076272308826447,
-0.010834813117980957,
0.34764671325683594,
0.18174594640731812,
-0.08106516301631927,
0.044993504881858826,
0.3993395268917084,
-0.3524647355079651,
-0.07682181149721146,
-0.01790708675980568,
0.2960566282272339,
0.20874683558940887,
0.11960947513580322,
0.0895000770688057,
-0.02994568459689617,
0.013324839994311333,
0.4332602024078369,
-0.2470836341381073,
-0.23279324173927307,
0.0021335501223802567,
0.11972969770431519,
0.11078397184610367,
0.06435637176036835,
-0.03356638550758362,
0.1181255429983139,
-0.21742090582847595,
-0.40286821126937866,
0.5289997458457947,
-0.06762727349996567,
0.053813159465789795,
-0.18555235862731934,
0.37177348136901855,
-0.028066672384738922,
-0.20421697199344635,
0.18815100193023682,
0.11544599384069443,
-0.06299827992916107,
0.1233440488576889,
0.0924082025885582,
-0.051868703216314316,
-0.11828593909740448,
0.23717157542705536,
0.11693504452705383,
0.3932548761367798,
-0.02729921042919159,
0.05638983100652695,
0.022566575556993484,
0.16879382729530334,
0.06166732311248779,
0.44014695286750793,
0.2719309628009796,
-0.13673347234725952,
0.05984716862440109,
-0.054950468242168427,
0.2851056158542633,
-0.08857155591249466,
-0.13420797884464264,
0.2816610038280487,
0.1271066665649414,
0.26715290546417236,
0.5601781010627747,
0.5723789930343628,
0.317032128572464,
0.0974745973944664,
0.06458614766597748,
0.16755329072475433,
-0.42112839221954346,
0.21322336792945862,
-0.03430842235684395,
-0.159638911485672,
0.19827498495578766,
0.3373759984970093,
0.11574849486351013,
0.23882460594177246,
0.4376012086868286,
-0.2994809150695801,
0.6384480595588684,
0.041017334908246994,
0.052990660071372986,
0.1838655024766922,
-0.3633083999156952,
-0.027526434510946274,
0.10564844310283661,
-0.12612929940223694,
0.141187846660614,
-0.03417293727397919,
0.09074287861585617,
-0.23614321649074554,
-0.4798159599304199,
-0.11139104515314102,
0.1559603214263916,
-0.36467596888542175,
-0.174446240067482,
-0.3513980209827423,
-0.03313647210597992,
-0.23338212072849274,
0.034121762961149216,
-0.009489312767982483,
-0.32800281047821045,
0.6139357089996338,
-0.17326562106609344,
-0.04175765812397003,
-0.09749825298786163,
0.002017635852098465,
-0.10227788239717484,
0.24494266510009766,
-0.23357991874217987,
0.1088717058300972,
-0.19774796068668365,
-0.01870189607143402,
0.06579764187335968,
0.14109884202480316,
0.14231383800506592,
-0.0017824135720729828,
-0.02226395532488823,
0.2941308319568634,
0.09558585286140442,
-0.021323248744010925,
-0.1743485927581787,
0.1074277013540268,
-0.16540729999542236,
-0.0941259115934372,
0.3074871301651001,
0.15319867432117462,
-0.06448114663362503,
-0.24348674714565277,
0.21773399412631989,
0.2562706768512726,
-0.26085567474365234,
0.31258514523506165,
-0.3829711973667145,
-0.12703394889831543,
-0.0027939416468143463,
0.010739818215370178,
-0.13393528759479523,
-0.16368037462234497,
0.3696925938129425,
-0.40479516983032227,
0.16980239748954773,
-0.046654246747493744,
0.10041315108537674,
-0.10906301438808441,
0.3380481004714966,
-0.34111136198043823,
-0.049098752439022064,
-0.4251095652580261,
-0.29913464188575745,
-0.39053481817245483,
0.04555634409189224,
-0.25396728515625,
0.09991723299026489,
0.0717468410730362,
0.5402122139930725,
0.11724617332220078,
0.2766391634941101,
-0.015380233526229858,
-0.18958306312561035,
0.03126920759677887,
0.5298494696617126,
-0.1890847235918045,
-0.029278885573148727,
-0.5703698396682739,
0.04017742723226547,
0.2934996485710144,
-0.3122333586215973,
0.23769567906856537,
0.083259217441082,
-0.025214266031980515,
-0.12344810366630554,
0.20357602834701538,
0.27493050694465637,
-0.23412755131721497,
0.12599538266658783,
0.1218542754650116,
0.08440761268138885,
-0.014998788014054298,
0.012974699959158897,
-0.326239675283432,
-0.11893200874328613,
-0.4379117786884308,
0.3604511618614197,
0.035788021981716156,
0.07284841686487198,
-0.05177021771669388,
-0.20859552919864655,
-0.30241432785987854,
0.20285546779632568,
0.29900723695755005,
-0.01136094518005848,
0.07128645479679108,
0.3092140853404999,
-0.3446851670742035,
0.13976706564426422,
0.3348858058452606,
0.4700360596179962,
0.06174352020025253,
-0.1021050214767456,
-0.15039896965026855,
-0.4094667136669159,
0.43117040395736694,
-0.3955363929271698,
-0.15645888447761536,
-0.09891119599342346,
0.2205449342727661,
0.2277165651321411,
-0.40209415555000305,
-0.4735603332519531,
-0.2219756543636322,
0.2737913131713867,
-0.26374679803848267,
0.07074165344238281,
0.21750743687152863,
0.002429220825433731,
-0.26314377784729004,
-0.17098164558410645,
0.16888265311717987,
0.012129075825214386,
-0.4979850649833679,
0.22608238458633423,
-0.3980785012245178
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
> > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply
|
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_
| 77
|
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 each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply
|
[
-0.2865425646305084,
-0.44449979066848755,
-0.09795333445072174,
0.3963586688041687,
0.11219163239002228,
0.07839419692754745,
0.3804990351200104,
0.24164216220378876,
-0.16741913557052612,
0.06556794047355652,
-0.09847141802310944,
0.4010586142539978,
0.19716677069664001,
0.3772197961807251,
0.1648208200931549,
-0.23953545093536377,
0.03492291271686554,
0.16347703337669373,
-0.1428440511226654,
-0.15156365931034088,
-0.09411417692899704,
0.29723840951919556,
-0.15559247136116028,
-0.02585747092962265,
-0.40489548444747925,
-0.19738104939460754,
-0.2060505896806717,
-0.0038210153579711914,
0.03740192577242851,
-0.2619989812374115,
0.24262623488903046,
0.1960054486989975,
0.12110301852226257,
0.34647560119628906,
-0.00011071185144828632,
0.22531281411647797,
-0.13073484599590302,
-0.20698606967926025,
-0.05666008219122887,
-0.01979006826877594,
-0.043403539806604385,
-0.07433658838272095,
-0.3225833773612976,
-0.32518425583839417,
-0.4502485990524292,
-0.22344206273555756,
0.035138703882694244,
-0.25455135107040405,
0.20782051980495453,
-0.009664474055171013,
0.1707800328731537,
0.17800989747047424,
-0.2052030712366104,
-0.04920010268688202,
-0.028713710606098175,
0.2634822726249695,
-0.12487740814685822,
-0.07338732481002808,
0.05263908579945564,
0.22216331958770752,
-0.0212058424949646,
0.40507540106773376,
0.24389168620109558,
0.12735936045646667,
-0.06471839547157288,
0.24133189022541046,
-0.20026075839996338,
-0.3384377956390381,
-0.10542579740285873,
0.23145517706871033,
0.10006579011678696,
-0.22987711429595947,
-0.30003124475479126,
-0.43133944272994995,
-0.2625012993812561,
-0.3552795648574829,
-0.0889497622847557,
0.3809392750263214,
-0.14683812856674194,
0.052079878747463226,
-0.429643839597702,
0.15916645526885986,
-0.15519528090953827,
-0.14945559203624725,
0.17561568319797516,
0.37696316838264465,
-0.25147202610969543,
0.3957073390483856,
0.038227617740631104,
0.5235772728919983,
0.03301865980029106,
0.017127616330981255,
-0.0030968114733695984,
-0.1849260777235031,
-0.4695472717285156,
-0.15898606181144714,
-0.014862589538097382,
-0.03091678023338318,
0.20468759536743164,
0.33211731910705566,
0.240752711892128,
0.08871050179004669,
0.36765140295028687,
-0.00872485339641571,
0.3674371540546417,
-0.3576579988002777,
0.149997740983963,
0.23572885990142822,
-0.11070713400840759,
0.14024165272712708,
-0.15469048917293549,
-0.20557183027267456,
0.23810483515262604,
-0.16665159165859222,
-0.3950369358062744,
0.05257429927587509,
0.36611253023147583,
-0.10192999243736267,
-0.20219552516937256,
-0.21969303488731384,
-0.13415463268756866,
-0.03234073519706726,
-0.07416167110204697,
0.2905735969543457,
0.06689827144145966,
-0.15299013257026672,
-0.3585282564163208,
0.02240133285522461,
-0.24622511863708496,
-0.34698933362960815,
-0.23960617184638977,
-0.0973162055015564,
-0.190307155251503,
0.44681787490844727,
-0.09905536472797394,
-0.15977054834365845,
0.40080350637435913,
0.1380494087934494,
0.12368392199277878,
-0.23076683282852173,
0.2234990894794464,
-0.285605251789093,
0.46238967776298523,
0.19170016050338745,
0.1284949630498886,
0.1913653016090393,
0.09366360306739807,
0.23408298194408417,
-0.33195239305496216,
0.1261357069015503,
-0.12671050429344177,
-0.36235862970352173,
0.46804293990135193,
0.09150625765323639,
0.11861906945705414,
0.21285150945186615,
-0.2236264944076538,
0.3199162185192108,
0.16497552394866943,
-0.00408722460269928,
0.15499338507652283,
-0.05636516958475113,
-0.3631633222103119,
-0.34980309009552,
0.40271779894828796,
0.28065282106399536,
-0.17939507961273193,
-0.1723991334438324,
0.3841092884540558,
-0.26889944076538086,
0.1980207860469818,
0.3509337306022644,
-0.14718860387802124,
0.19321182370185852,
-0.37650763988494873,
0.3520554304122925,
0.019032932817935944,
-0.18552863597869873,
-0.1443091332912445,
0.3228774070739746,
-0.023279909044504166,
0.28128525614738464,
0.13949930667877197,
-0.03050709329545498,
0.30142882466316223,
0.02117738500237465,
-0.13694414496421814,
0.12264763563871384,
-0.3430853486061096,
-0.11029969900846481,
-0.18056613206863403,
0.0890144482254982,
-0.012494482100009918,
0.01928248256444931,
-0.17593377828598022,
0.09609092772006989,
-0.21377718448638916,
-0.21462754905223846,
0.580713152885437,
-0.18787121772766113,
0.06124863028526306,
0.13775314390659332,
0.30415743589401245,
0.010768555104732513,
0.07098722457885742,
0.22636723518371582,
-0.21057623624801636,
0.28622639179229736,
-0.08272410929203033,
-0.039793483912944794,
0.13059285283088684,
-0.5554493069648743,
-0.07691749930381775,
-0.06607232987880707,
-0.1463833600282669,
-0.3985951840877533,
0.0923914760351181,
0.0751568153500557,
0.5132444500923157,
-0.23985478281974792,
-0.28446638584136963,
0.20225843787193298,
-0.6922416090965271,
-0.00872438121587038,
-0.3969578146934509,
0.14196090400218964,
0.17780329287052155,
-0.07670670747756958,
0.0655086487531662,
0.07462465763092041,
0.025582965463399887,
-0.47523802518844604,
0.144089013338089,
0.41657915711402893,
0.28216612339019775,
0.03444802016019821,
-0.24367374181747437,
0.21460163593292236,
0.31343063712120056,
-0.07498890161514282,
-0.10305801779031754,
-0.1393713802099228,
-0.1668723225593567,
-0.1753448247909546,
-0.0052298083901405334,
0.6554277539253235,
-0.08765076100826263,
0.2977061867713928,
0.10612137615680695,
-0.02249131165444851,
0.01198783703148365,
0.1392241269350052,
-0.1319793164730072,
-0.08496840298175812,
-0.19435465335845947,
-0.051697324961423874,
0.33001601696014404,
-0.0012134015560150146,
-0.5509123206138611,
0.3066670894622803,
0.5330297350883484,
0.13431480526924133,
-0.2917124032974243,
-0.28698596358299255,
-0.0163104385137558,
0.04330238699913025,
0.32823193073272705,
0.062291037291288376,
0.3311488926410675,
0.13278383016586304,
0.225859597325325,
0.09194357693195343,
0.010282246395945549,
-0.1602145880460739,
0.0037132948637008667,
0.13707703351974487,
0.27658161520957947,
0.04538806900382042,
-0.4614172577857971,
-0.2942768335342407,
-0.26131394505500793,
0.052653711289167404,
0.1729109138250351,
0.01310032233595848,
-0.14673562347888947,
0.21817928552627563,
-0.07479392737150192,
-0.1451433002948761,
-0.2707052230834961,
0.09486222267150879,
0.011067304760217667,
0.0011372743174433708,
0.016222510486841202,
0.19178789854049683,
-0.006410753354430199,
0.25782662630081177,
0.22400864958763123,
0.4148602783679962,
-0.10294477641582489,
0.19091880321502686,
-0.16200804710388184,
0.006531091406941414,
-0.18105465173721313,
0.0665968805551529,
0.10677321255207062,
0.05563252791762352,
0.2994512915611267,
-0.28292325139045715,
-0.08183887600898743,
-0.29932907223701477,
-0.09564147144556046,
0.20366472005844116,
-0.32343339920043945,
0.18489745259284973,
0.03185809403657913,
-0.021120280027389526,
-0.1182868480682373,
0.10509275645017624,
0.1999209076166153,
-0.2642749845981598,
-0.10442181676626205,
-0.28791138529777527,
-0.011084475554525852,
-0.0687793493270874,
0.07975059747695923,
-0.5070546269416809,
-0.18319709599018097,
-0.20624351501464844,
0.5021284222602844,
0.05513811483979225,
0.2588644027709961,
-0.14547254145145416,
0.0660908967256546,
-0.11846159398555756,
-0.07961419224739075,
0.016180027276277542,
-0.17338193953037262,
-0.43610087037086487,
0.030282892286777496,
-0.46770238876342773,
-0.3719370663166046,
-0.07382147759199142,
0.1732398420572281,
0.45435386896133423,
0.33527427911758423,
-0.3696310520172119,
-0.15374594926834106,
0.07768545299768448,
-0.14606909453868866,
0.08380469679832458,
-0.07486658543348312,
0.28084129095077515,
-0.3882251977920532,
0.07392715662717819,
-0.08214590698480606,
-0.06849701702594757,
0.28006619215011597,
-0.06699728220701218,
-0.14323416352272034,
0.19599181413650513,
0.2735963761806488,
0.2960669696331024,
0.7479661703109741,
0.7249958515167236,
-0.05031457170844078,
0.08999823778867722,
-0.17320333421230316,
0.2365625947713852,
-0.04622410982847214,
0.09515711665153503,
0.1371918022632599,
-0.056382134556770325,
-0.13847142457962036,
0.2057826966047287,
-0.07894884049892426,
-0.10263729095458984,
0.10097481310367584,
0.21077683568000793,
-0.06676775962114334,
-0.3484361469745636,
0.337480366230011,
0.17648878693580627,
0.42761239409446716,
-0.006980461999773979,
0.30029091238975525,
0.1289450228214264,
0.07877445966005325,
0.1324509084224701,
-0.05682435631752014,
0.43860024213790894,
0.019142093136906624,
-0.5814551115036011,
-0.14685796201229095,
-0.23892152309417725,
0.21710550785064697,
-0.0549793466925621,
0.27589476108551025,
-0.1602228730916977,
-0.26265716552734375,
0.26502180099487305,
0.07488458603620529,
0.6593095064163208,
-0.16823139786720276,
-0.4338996410369873,
0.14724260568618774,
-0.5196622610092163,
0.07308410853147507,
-0.06176816672086716,
-0.18501237034797668,
0.4969221353530884,
0.12666019797325134,
0.37181368470191956,
-0.17638640105724335,
-0.44102388620376587,
0.3484644293785095,
-0.003954215440899134,
-0.21370218694210052,
0.04364263638854027,
-0.16620567440986633,
-0.21046245098114014,
-0.133945032954216,
0.30434533953666687,
0.15755844116210938,
0.06712362170219421,
-0.2953338325023651,
-0.21626143157482147,
-0.26806458830833435,
0.16770678758621216,
-0.013683058321475983,
0.373405784368515,
0.31490811705589294,
-0.08500518649816513,
0.10753495991230011,
0.4550240933895111,
0.109002485871315,
0.22864006459712982,
0.46067091822624207,
-0.00060991570353508,
-0.09165441989898682,
0.3185288906097412,
-0.14367644488811493,
0.3169155418872833,
0.5215127468109131,
-0.05324549973011017,
0.018453575670719147,
-0.1469598412513733,
0.01619241014122963,
-0.5143808722496033,
-0.08057975769042969,
0.1327989250421524,
0.06405910849571228,
-0.47171011567115784,
-0.4783003032207489,
0.3052140474319458,
0.2300695925951004,
-0.0983731746673584,
0.4442807734012604,
0.2524149417877197,
-0.2549550235271454,
0.31552767753601074,
0.24045175313949585,
0.7969064712524414,
-0.01957288384437561,
0.06767196953296661,
0.1791694164276123,
0.09534479677677155,
0.3329739272594452,
-0.431520938873291,
0.3062412738800049,
-0.4112946093082428,
-0.5366026759147644,
-0.06173015385866165,
-0.16667146980762482,
0.31238365173339844,
0.48321306705474854,
0.06268371641635895,
0.20921796560287476,
0.17558471858501434,
0.05732763558626175,
-0.30141904950141907,
0.06999938935041428,
0.0581640750169754,
-0.2532382905483246,
-0.11694535613059998,
0.08894184976816177,
0.09478998184204102,
0.258304238319397,
-0.13916030526161194,
-0.07307121902704239,
-0.0183502659201622,
0.04755150526762009,
-0.05483433976769447,
-0.2401239573955536,
-0.3108009994029999,
0.10647720843553543,
0.1346268206834793,
-0.4225672483444214,
-0.11894877254962921,
0.19473081827163696,
0.42096686363220215,
-0.16501565277576447,
0.0066540297120809555,
0.026190204545855522,
0.06943612545728683,
-0.22862595319747925,
-0.033404260873794556,
-0.24711784720420837,
0.20224283635616302,
0.03998236358165741,
-0.0005335509777069092,
0.04599592462182045,
0.052940160036087036,
-0.3456133008003235,
-0.18563324213027954,
-0.02097214013338089,
-0.10402067005634308,
-0.3414577543735504,
-0.08823469281196594,
0.16890758275985718,
-0.09607501327991486,
-0.13392582535743713,
0.07468971610069275,
-0.017690084874629974,
-0.3594810664653778,
0.37857773900032043,
0.027883416041731834,
-0.2603105902671814,
-0.05379856005311012,
-0.012564249336719513,
0.24056488275527954,
-0.045656219124794006,
0.1059412956237793,
0.014536041766405106,
-0.02531108632683754,
-0.2023637592792511,
-0.046287573873996735,
0.33308619260787964,
-0.328436017036438,
0.14550216495990753,
-0.3307779133319855,
0.3975856900215149,
-0.0393449068069458,
0.16144897043704987,
0.15929114818572998,
0.18740008771419525,
-0.18956269323825836,
-0.21918010711669922,
-0.18463435769081116,
0.20374107360839844,
0.10221807658672333,
0.4520137310028076,
0.1739692986011505,
0.08074982464313507,
-0.04156173765659332,
0.4382026791572571,
-0.2995753288269043,
-0.12183531373739243,
-0.2243160903453827,
0.24140669405460358,
0.1355307400226593,
0.19663411378860474,
0.1333145648241043,
-0.02269621193408966,
-0.01806386560201645,
0.34945714473724365,
-0.24550363421440125,
-0.20245707035064697,
0.04097375646233559,
0.14750126004219055,
0.17232584953308105,
0.10396023839712143,
-0.00258951960131526,
0.21144719421863556,
-0.22211235761642456,
-0.3358316719532013,
0.415605753660202,
-0.06368761509656906,
0.11423204839229584,
-0.06105620786547661,
0.2411622554063797,
0.08444090932607651,
-0.34507644176483154,
0.1166483536362648,
0.09944035857915878,
-0.07272940874099731,
0.2559678554534912,
0.157180517911911,
-0.12146729230880737,
-0.10638056695461273,
0.2306121438741684,
0.07644958794116974,
0.29382869601249695,
-0.10503948479890823,
0.009217880666255951,
-0.03852897882461548,
0.14764109253883362,
-0.0709831565618515,
0.4057244658470154,
0.2742319703102112,
-0.09796816855669022,
-0.004461396485567093,
0.01809791289269924,
0.20938166975975037,
-0.01893058605492115,
0.09543294459581375,
0.29158270359039307,
-0.008953084237873554,
0.18592384457588196,
0.6440367698669434,
0.6222530007362366,
0.38485637307167053,
0.09930527210235596,
0.04446505010128021,
0.10445888340473175,
-0.5046972632408142,
0.34209176898002625,
0.044243957847356796,
-0.06948169320821762,
0.352056622505188,
0.26993557810783386,
0.2186024934053421,
0.16463200747966766,
0.21605631709098816,
-0.24089446663856506,
0.5416643023490906,
0.12121138721704483,
0.008300848305225372,
0.1559511125087738,
-0.4071296155452728,
-0.20535622537136078,
0.05122905224561691,
-0.09054578840732574,
0.19628357887268066,
-0.27798670530319214,
0.15036872029304504,
-0.3130530118942261,
-0.49370503425598145,
-0.12385587394237518,
0.11990688741207123,
-0.36815693974494934,
-0.14127254486083984,
-0.4068887233734131,
-0.08731492608785629,
-0.26595520973205566,
0.05889752879738808,
0.0454334132373333,
-0.37769395112991333,
0.46510565280914307,
-0.08690302073955536,
-0.026110611855983734,
-0.08709360659122467,
0.006717639043927193,
0.001145288348197937,
0.23007389903068542,
-0.1532997339963913,
0.1843075305223465,
-0.2157290130853653,
-0.03230828046798706,
0.04543500021100044,
0.11647560447454453,
0.14746084809303284,
-0.05868743360042572,
0.026317527517676353,
0.27944618463516235,
0.18016289174556732,
0.04519809037446976,
0.00576435774564743,
0.15521091222763062,
0.05536654591560364,
-0.05483149364590645,
0.287797212600708,
0.12009268999099731,
-0.002800014801323414,
-0.12152794003486633,
0.19493933022022247,
0.18627840280532837,
-0.3580578565597534,
0.2500377893447876,
-0.26132288575172424,
-0.12150048464536667,
-0.04840225726366043,
-0.0029693469405174255,
-0.24282482266426086,
-0.18220970034599304,
0.426111102104187,
-0.2859184145927429,
0.12929338216781616,
0.10789687931537628,
0.06790874153375626,
-0.10430213809013367,
0.3096829056739807,
-0.1517055183649063,
0.08039188385009766,
-0.4987161159515381,
-0.3208319842815399,
-0.23988430202007294,
0.055986978113651276,
-0.13738958537578583,
-0.086203932762146,
0.028228968381881714,
0.5367048382759094,
0.18156234920024872,
0.1782691329717636,
-0.06457935273647308,
-0.3396725654602051,
0.06526169925928116,
0.5331863760948181,
-0.24537961184978485,
-0.048987243324518204,
-0.6642367839813232,
0.06301414221525192,
0.12277580797672272,
-0.13864241540431976,
0.16647733747959137,
0.17295151948928833,
-0.15186788141727448,
0.02356586791574955,
0.17505361139774323,
0.2938409149646759,
-0.17408448457717896,
0.08526484668254852,
-0.00828041136264801,
0.10996893793344498,
0.0406465008854866,
0.017133468762040138,
-0.28985199332237244,
-0.13611151278018951,
-0.40317147970199585,
0.49267828464508057,
-0.02242211624979973,
0.09396850317716599,
-0.08248753100633621,
-0.23681189119815826,
-0.333507776260376,
0.17512452602386475,
0.3794713020324707,
-0.18732495605945587,
0.23114600777626038,
0.21764640510082245,
-0.18568170070648193,
0.022491293027997017,
0.6765441298484802,
0.5361809134483337,
0.034257497638463974,
-0.12785235047340393,
-0.16977724432945251,
-0.32012632489204407,
0.3866465985774994,
-0.48305925726890564,
-0.12466883659362793,
-0.09217851608991623,
0.20863944292068481,
0.3175647258758545,
-0.13620708882808685,
-0.5124222040176392,
-0.2275397777557373,
0.3425614833831787,
-0.42025530338287354,
0.17407871782779694,
0.2844814956188202,
0.14372526109218597,
-0.2739899158477783,
-0.10049829632043839,
0.12105168402194977,
-0.055018939077854156,
-0.5044966340065002,
0.06772550940513611,
-0.5140365362167358
] |
https://github.com/huggingface/datasets/issues/5961
|
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
|
Do we have a solution for this one? Or it's required to get "number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU"
|
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_
| 33
|
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_
Do we have a solution for this one? Or it's required to get "number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU"
|
[
-0.4867708086967468,
-0.4351813495159149,
-0.07999773323535919,
0.20005810260772705,
0.09749096632003784,
-0.039616722613573074,
0.38306924700737,
0.24505870044231415,
-0.03761548548936844,
0.131986603140831,
0.10013135522603989,
0.3976881206035614,
0.12253999710083008,
0.30259329080581665,
-0.011111411266028881,
-0.14093774557113647,
0.0003557279706001282,
0.18500134348869324,
-0.03467179089784622,
0.0049258992075920105,
-0.18822365999221802,
0.2672996520996094,
-0.1489148586988449,
-0.16513043642044067,
-0.36741459369659424,
-0.16273006796836853,
-0.024266261607408524,
-0.010327421128749847,
0.09197866916656494,
-0.3724183142185211,
0.17201580107212067,
0.3093020021915436,
0.04743418097496033,
0.22585061192512512,
-0.00010879652108997107,
0.2302798479795456,
-0.01482294499874115,
-0.2257983237504959,
-0.10022483766078949,
0.07154850661754608,
-0.09250883758068085,
0.10436417907476425,
-0.4280702769756317,
-0.20016396045684814,
-0.4201442301273346,
-0.2691288888454437,
-0.00019392557442188263,
-0.415788471698761,
0.24026909470558167,
-0.08165916800498962,
0.20233571529388428,
0.2594785988330841,
-0.14988058805465698,
-0.14366205036640167,
0.05220957100391388,
0.32413923740386963,
-0.18353784084320068,
-0.15984617173671722,
0.09404223412275314,
0.11798013746738434,
-0.029376789927482605,
0.41131412982940674,
0.10593995451927185,
0.2936243712902069,
0.07652454078197479,
-0.0029617873951792717,
-0.20294377207756042,
-0.2573143541812897,
-0.1122749075293541,
0.29711368680000305,
0.07714717090129852,
-0.07926181703805923,
-0.34441471099853516,
-0.5765901207923889,
-0.21008680760860443,
-0.22347939014434814,
-0.01731322705745697,
0.20111270248889923,
-0.2062392681837082,
0.06300756335258484,
-0.32211223244667053,
0.16351422667503357,
-0.0409669429063797,
-0.1946389228105545,
0.2625369131565094,
0.40850135684013367,
-0.13676147162914276,
0.36630305647850037,
0.22203420102596283,
0.3086501359939575,
-0.06551927328109741,
0.09183654934167862,
-0.16579166054725647,
-0.1938454955816269,
-0.43938255310058594,
-0.19363419711589813,
0.12215721607208252,
0.020692303776741028,
0.422663152217865,
0.36049872636795044,
0.17118942737579346,
0.04982377588748932,
0.4364655315876007,
-0.01888718456029892,
0.34410324692726135,
-0.4333569407463074,
0.3019144833087921,
0.1963275521993637,
0.06692639738321304,
0.08788388222455978,
0.05195542797446251,
-0.10842520743608475,
0.31806954741477966,
-0.3460775315761566,
-0.32467547059059143,
0.07825714349746704,
0.4352482557296753,
-0.0700891986489296,
-0.29634225368499756,
-0.43285250663757324,
-0.043451402336359024,
0.017112452536821365,
-0.07315926253795624,
0.299326092004776,
0.2707415521144867,
-0.13664931058883667,
-0.4509209394454956,
0.12474547326564789,
-0.2667906880378723,
-0.36393702030181885,
-0.2063339650630951,
-0.1733008474111557,
-0.0671866163611412,
0.39767688512802124,
0.04554125294089317,
-0.14657391607761383,
0.39972203969955444,
0.1336059421300888,
0.07055990397930145,
-0.17331211268901825,
0.2856696546077728,
-0.12834513187408447,
0.2019658386707306,
0.29145485162734985,
0.1861775666475296,
0.1495894193649292,
-0.03401101753115654,
0.19623316824436188,
-0.2931087911128998,
0.17752224206924438,
-0.08113763481378555,
-0.3907242715358734,
0.40858086943626404,
0.1251193881034851,
0.14084948599338531,
0.10772541910409927,
-0.3138407766819,
0.25920358300209045,
0.25852593779563904,
-0.0300151314586401,
0.04513154178857803,
0.05232524871826172,
-0.43999961018562317,
-0.2966260015964508,
0.2295854389667511,
0.4328038692474365,
-0.04445512220263481,
-0.2657028138637543,
0.12835027277469635,
-0.24726402759552002,
0.1562025547027588,
0.4252067506313324,
-0.15718087553977966,
0.08783745765686035,
-0.42804330587387085,
0.48785459995269775,
-0.1000390574336052,
-0.056203193962574005,
-0.23781448602676392,
0.3867218494415283,
-0.13498714566230774,
0.1289616972208023,
0.16731634736061096,
0.005485184490680695,
0.32968708872795105,
-0.08374956995248795,
-0.03678569942712784,
0.24547669291496277,
-0.3785020411014557,
0.04658409208059311,
-0.0966707095503807,
-0.06188834458589554,
-0.018112774938344955,
0.008853308856487274,
-0.06650571525096893,
0.06981073319911957,
-0.11870921403169632,
-0.11651494354009628,
0.45474857091903687,
-0.22391745448112488,
0.1709902435541153,
0.11495445668697357,
0.42049482464790344,
-0.2600918412208557,
0.0742575079202652,
-0.017590433359146118,
-0.28834453225135803,
0.3158268928527832,
-0.10992106795310974,
-0.19382110238075256,
0.08319371193647385,
-0.5879498720169067,
-0.1302175223827362,
-0.07994300872087479,
-0.1350516974925995,
-0.3267778158187866,
0.10155084729194641,
0.04653549939393997,
0.26336076855659485,
-0.41087090969085693,
-0.2315795123577118,
0.06243886798620224,
-0.5193102955818176,
0.007365702651441097,
-0.20492775738239288,
0.08686978369951248,
0.19227589666843414,
-0.13358543813228607,
0.026116296648979187,
-0.0418623685836792,
0.14339178800582886,
-0.45158761739730835,
0.1806904673576355,
0.31664034724235535,
0.2736051678657532,
0.06793063879013062,
-0.0856383815407753,
0.15705367922782898,
0.2952176034450531,
0.030183639377355576,
-0.22259047627449036,
-0.061903808265924454,
-0.2613394260406494,
-0.17027300596237183,
-0.07477406412363052,
0.5797209739685059,
-0.10486941039562225,
0.4947827160358429,
-0.0022820457816123962,
0.0863897055387497,
0.2522967457771301,
0.09709703922271729,
-0.1337587982416153,
-0.20230871438980103,
-0.13467441499233246,
-0.12423081696033478,
0.22979958355426788,
0.01952676847577095,
-0.3496740758419037,
0.29640650749206543,
0.34529781341552734,
0.1813940703868866,
-0.06884945183992386,
-0.09422000497579575,
0.0788961797952652,
0.041590653359889984,
0.26132407784461975,
0.1264754980802536,
0.3601360321044922,
0.18280236423015594,
0.11722886562347412,
-0.0620809867978096,
0.04057474061846733,
-0.1421172171831131,
0.09714758396148682,
0.08565548062324524,
0.2984279990196228,
0.19567468762397766,
-0.3408884108066559,
-0.2981727421283722,
-0.3700036108493805,
-0.0501696839928627,
0.18087655305862427,
-0.0716240182518959,
-0.20503516495227814,
0.1587473303079605,
-0.13565683364868164,
-0.036306627094745636,
-0.09147621691226959,
0.19229157269001007,
-0.07240232825279236,
-0.04625876992940903,
0.10043680667877197,
0.3691902458667755,
-0.2286698967218399,
0.3138347268104553,
0.25452014803886414,
0.43922731280326843,
-0.05048064887523651,
0.03676656633615494,
-0.14588353037834167,
-0.028826840221881866,
0.03607955574989319,
0.09450975060462952,
0.1810469776391983,
-0.04660043120384216,
0.43613842129707336,
-0.26006019115448,
-0.1917606145143509,
-0.45986902713775635,
-0.10248787701129913,
0.2162511944770813,
-0.23962615430355072,
0.22174204885959625,
0.07459726184606552,
0.014307253062725067,
0.05251724272966385,
0.08225831389427185,
0.15694904327392578,
-0.2182145118713379,
-0.13836292922496796,
-0.21742874383926392,
-0.11998262256383896,
-0.08089002221822739,
-0.02220321074128151,
-0.3134314715862274,
0.028133045881986618,
-0.34623417258262634,
0.4397166967391968,
-0.003035232424736023,
0.28530243039131165,
-0.1289580762386322,
0.13031844794750214,
-0.1843491494655609,
-0.06968674808740616,
-0.17476218938827515,
-0.12740011513233185,
-0.2885356545448303,
0.06390488147735596,
-0.49070316553115845,
-0.27610108256340027,
-0.05862339586019516,
0.11893752217292786,
0.35443297028541565,
0.4739251136779785,
-0.20236235857009888,
-0.1684967428445816,
-0.007059017196297646,
-0.06652936339378357,
0.09033914655447006,
-0.17954830825328827,
0.3311869502067566,
-0.257173627614975,
-0.04165679216384888,
-0.18406152725219727,
-0.060537949204444885,
0.3964640498161316,
-0.1134975478053093,
-0.08757578581571579,
0.2536489963531494,
0.3580475449562073,
0.2988446354866028,
0.8799730539321899,
0.7010257244110107,
0.07555896043777466,
0.2620386779308319,
-0.11516455560922623,
0.09460572153329849,
-0.1787489354610443,
0.06025338172912598,
0.11438501626253128,
-0.07261089980602264,
-0.09863869845867157,
0.23788486421108246,
-0.049549929797649384,
-0.1831606924533844,
0.1270238757133484,
0.12657538056373596,
0.03150910139083862,
-0.41780567169189453,
0.24474705755710602,
0.16873881220817566,
0.42382916808128357,
0.08784924447536469,
0.2250276505947113,
0.07144266366958618,
0.17322298884391785,
0.02025705948472023,
-0.08743990957736969,
0.6392889618873596,
-0.04642898961901665,
-0.5310167670249939,
0.07663848996162415,
-0.2831293046474457,
0.26482200622558594,
0.0032590210903435946,
0.28971078991889954,
-0.20488546788692474,
-0.1250934600830078,
0.2041224241256714,
0.028764650225639343,
0.6561169028282166,
-0.20432916283607483,
-0.2633342742919922,
0.01951838657259941,
-0.3859971761703491,
-0.034490544348955154,
-0.02930298075079918,
-0.098269522190094,
0.618517279624939,
0.1122596263885498,
0.3165300786495209,
-0.2985069155693054,
-0.3578338027000427,
0.2921481430530548,
-0.005687191151082516,
-0.13925769925117493,
-0.05565817654132843,
-0.18408949673175812,
-0.27735161781311035,
-0.35643187165260315,
0.34707456827163696,
0.43351349234580994,
0.1067456603050232,
-0.17574013769626617,
-0.35525694489479065,
-0.45796775817871094,
-0.03110472485423088,
-0.03959740698337555,
0.16769663989543915,
0.3670009672641754,
-0.09612814337015152,
0.3120470345020294,
0.31949108839035034,
-0.032701730728149414,
0.2659878432750702,
0.4807186722755432,
0.05383540689945221,
-0.14678730070590973,
0.3250398337841034,
-0.21308733522891998,
0.22193609178066254,
0.5677297115325928,
-0.14287321269512177,
0.04848500341176987,
-0.1925358772277832,
0.1866154670715332,
-0.4770594835281372,
-0.11181174218654633,
0.08019357919692993,
0.03345958888530731,
-0.41616320610046387,
-0.3057257831096649,
0.28033944964408875,
0.16545063257217407,
-0.10183864831924438,
0.5357628464698792,
0.40938055515289307,
-0.2802736759185791,
0.41456931829452515,
0.2898399829864502,
0.7234341502189636,
-0.04951675981283188,
-0.09540386497974396,
0.03434520587325096,
0.306610107421875,
0.15146443247795105,
-0.29921823740005493,
0.384179949760437,
-0.3109342157840729,
-0.45080041885375977,
0.01893472857773304,
-0.11484368145465851,
0.2845548093318939,
0.622831404209137,
0.13022033870220184,
0.2242378294467926,
0.09989745914936066,
0.0017772316932678223,
-0.27941811084747314,
0.1914253830909729,
-0.043126270174980164,
-0.3459373712539673,
-0.04668243229389191,
0.12368695437908173,
0.00803343951702118,
0.3246188759803772,
-0.1332572102546692,
-0.09549343585968018,
0.18963435292243958,
-0.08856943994760513,
-0.17006345093250275,
-0.2642914354801178,
-0.2569519281387329,
0.14685775339603424,
0.05552246421575546,
-0.29415833950042725,
0.04271482303738594,
0.09320169687271118,
0.3148743808269501,
-0.10657699406147003,
-0.019301095977425575,
0.12314267456531525,
-0.05591709166765213,
-0.24810005724430084,
-0.13763868808746338,
-0.18243856728076935,
0.08877218514680862,
-0.042199358344078064,
-0.03795073926448822,
-0.28402450680732727,
0.03955536335706711,
-0.4648579955101013,
-0.18148134648799896,
0.015941180288791656,
-0.19473327696323395,
-0.2180040180683136,
-0.028373535722494125,
0.04013032466173172,
-0.06463180482387543,
-0.23741574585437775,
0.09051795303821564,
-0.029201969504356384,
-0.134572371840477,
0.27098381519317627,
0.07758663594722748,
-0.25448083877563477,
-0.05254058167338371,
-0.0012353360652923584,
0.005636593326926231,
-0.05751819536089897,
0.07085971534252167,
-0.1024090051651001,
-0.10964717715978622,
-0.24896574020385742,
-0.05183036997914314,
0.14788001775741577,
-0.39036375284194946,
0.3147377073764801,
-0.3647533357143402,
0.19625498354434967,
-0.10489829629659653,
0.12462183833122253,
0.04817165061831474,
0.22375577688217163,
-0.04020800441503525,
-0.283811092376709,
-0.10980073362588882,
0.12238102406263351,
-0.04604532942175865,
0.35572969913482666,
0.1415730118751526,
-0.07228122651576996,
-0.06466513872146606,
0.36536192893981934,
-0.3188987374305725,
-0.19243191182613373,
-0.13729584217071533,
0.250616192817688,
0.15126529335975647,
0.1587238758802414,
0.05265224725008011,
0.027443625032901764,
-0.005190527066588402,
0.3547211289405823,
-0.15545198321342468,
-0.21687787771224976,
-0.033517081290483475,
0.13924431800842285,
0.07309367507696152,
0.08582046627998352,
0.10097162425518036,
0.0673886388540268,
-0.3240952789783478,
-0.3759864270687103,
0.4630991220474243,
-0.11533284932374954,
0.1302182376384735,
-0.11858350038528442,
0.3976938724517822,
0.01678062230348587,
-0.26131388545036316,
0.2202952355146408,
0.13150322437286377,
-0.0702679455280304,
0.03273395448923111,
0.2017579823732376,
-0.013056783936917782,
-0.08096442371606827,
0.2109982818365097,
0.09699846059083939,
0.4577494263648987,
0.057273901998996735,
-0.0566137358546257,
0.049803443253040314,
0.14656250178813934,
0.1453641653060913,
0.3655933141708374,
0.19551557302474976,
-0.12481068819761276,
0.1359724998474121,
-0.0177763719111681,
0.26571768522262573,
-0.1633879393339157,
-0.09154784679412842,
0.2106931358575821,
0.11762762814760208,
0.29035109281539917,
0.5855430960655212,
0.5930837988853455,
0.2964603900909424,
0.13688720762729645,
0.11301379650831223,
0.13785481452941895,
-0.4564700126647949,
0.2899048626422882,
0.06303972005844116,
-0.021275702863931656,
0.18267309665679932,
0.2875523567199707,
0.0880347341299057,
0.3605576157569885,
0.41132819652557373,
-0.35805293917655945,
0.6952030658721924,
0.1055271252989769,
0.016259711235761642,
0.1817171275615692,
-0.40998247265815735,
-0.08214136958122253,
0.05772019922733307,
0.02981354296207428,
0.10316833108663559,
-0.017585791647434235,
0.1399344503879547,
-0.21766328811645508,
-0.45852789282798767,
-0.1816810965538025,
0.11790643632411957,
-0.3244433104991913,
-0.27556273341178894,
-0.3531498908996582,
-0.047561775892972946,
-0.32249128818511963,
-0.01804072968661785,
0.007746625691652298,
-0.24828718602657318,
0.45714789628982544,
-0.11534593999385834,
0.05808016285300255,
-0.20221129059791565,
0.180170476436615,
-0.041624195873737335,
0.2954162359237671,
-0.32724612951278687,
0.06039346009492874,
-0.14189761877059937,
-0.04686453938484192,
0.09739001095294952,
0.1228155717253685,
0.16230881214141846,
-0.052870817482471466,
-0.07335154712200165,
0.30295559763908386,
-0.04721982404589653,
0.07489462941884995,
-0.1816735416650772,
0.06870941817760468,
-0.19334837794303894,
0.036240819841623306,
0.2777473032474518,
0.12085512280464172,
-0.08427396416664124,
-0.18392229080200195,
0.21685278415679932,
0.13268059492111206,
-0.328052818775177,
0.34860244393348694,
-0.3045042157173157,
-0.13721629977226257,
0.02786056324839592,
0.04952161759138107,
-0.03665461018681526,
-0.1752680391073227,
0.39909809827804565,
-0.433267742395401,
0.17944130301475525,
0.030473828315734863,
0.0962766781449318,
-0.1476311981678009,
0.28505590558052063,
-0.43686914443969727,
-0.020724639296531677,
-0.41908374428749084,
-0.241896852850914,
-0.3341253697872162,
-0.04731679707765579,
-0.2329634726047516,
0.08912943303585052,
0.17821669578552246,
0.49561023712158203,
0.11921153962612152,
0.2451859414577484,
-0.01115328073501587,
-0.17275601625442505,
0.05397383123636246,
0.5531077980995178,
-0.21144084632396698,
-0.031498100608587265,
-0.5865294933319092,
0.03234058618545532,
0.31358641386032104,
-0.4098169207572937,
0.22173845767974854,
0.10499257594347,
-0.10686352849006653,
-0.03998912125825882,
0.17583829164505005,
0.45285147428512573,
-0.24770063161849976,
0.05223526060581207,
0.11812583357095718,
0.17219635844230652,
-0.013444898650050163,
0.023172171786427498,
-0.4308023452758789,
-0.2507573068141937,
-0.47496187686920166,
0.3588685095310211,
0.07048757374286652,
0.10695751011371613,
-0.10374090075492859,
-0.20774032175540924,
-0.36452704668045044,
0.22831220924854279,
0.2551923394203186,
0.029551491141319275,
-0.00017404649406671524,
0.3255913257598877,
-0.29086965322494507,
0.1520029902458191,
0.39318251609802246,
0.36993712186813354,
-0.01173795759677887,
-0.1255664974451065,
-0.17513053119182587,
-0.5471764206886292,
0.3599817752838135,
-0.3388040065765381,
-0.15447448194026947,
-0.0548413023352623,
0.273384153842926,
0.32039394974708557,
-0.3225755989551544,
-0.3500978946685791,
-0.22035393118858337,
0.2982300817966461,
-0.26398736238479614,
0.19998055696487427,
0.23190650343894958,
0.14258860051631927,
-0.3186662197113037,
-0.11698727309703827,
0.10732140392065048,
-0.00037765875458717346,
-0.43278953433036804,
0.12588925659656525,
-0.459827721118927
] |
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.4646584987640381,
-0.37352192401885986,
-0.09209103882312775,
0.15261653065681458,
0.11911836266517639,
-0.047759559005498886,
0.48819032311439514,
0.2550979256629944,
-0.039606090635061264,
0.1438957005739212,
0.09474238753318787,
0.3893818259239197,
0.1023450568318367,
0.3299869894981384,
0.02546444907784462,
-0.11256980895996094,
-0.01936258375644684,
0.17508858442306519,
-0.19355949759483337,
-0.041351936757564545,
-0.17074020206928253,
0.21253208816051483,
-0.08814734220504761,
-0.17945797741413116,
-0.47047874331474304,
-0.14249354600906372,
0.03876352310180664,
-0.03193431347608566,
0.21435144543647766,
-0.3092424273490906,
0.2021065056324005,
0.23197494447231293,
0.029250741004943848,
0.3052627444267273,
-0.00010595209460007027,
0.22739727795124054,
-0.0784381777048111,
-0.16223888099193573,
-0.1584443300962448,
0.05304814875125885,
-0.0921238586306572,
0.06327912956476212,
-0.40204057097435,
-0.19380787014961243,
-0.4203411042690277,
-0.16699795424938202,
0.07059644162654877,
-0.3308752477169037,
0.29403918981552124,
-0.05968303978443146,
0.20389381051063538,
0.22115975618362427,
-0.2149350494146347,
-0.0732947513461113,
-0.07223888486623764,
0.19204774498939514,
-0.17440621554851532,
-0.13546648621559143,
0.06296975910663605,
0.07788675278425217,
-0.03866065293550491,
0.4109063744544983,
0.19054946303367615,
0.2907123565673828,
0.039408713579177856,
0.007666707970201969,
-0.1281735897064209,
-0.2843565046787262,
-0.12942159175872803,
0.19696038961410522,
-0.027519777417182922,
-0.06789851933717728,
-0.29525479674339294,
-0.5961698889732361,
-0.14358316361904144,
-0.3039710521697998,
-0.008998468518257141,
0.2363900989294052,
-0.10506103932857513,
0.02733134850859642,
-0.36430326104164124,
0.18800969421863556,
-0.05833888053894043,
-0.22081394493579865,
0.2574819028377533,
0.32527798414230347,
-0.10864051431417465,
0.2973370850086212,
0.27306899428367615,
0.37649816274642944,
-0.03684607520699501,
0.111228346824646,
-0.042572107166051865,
-0.1643715500831604,
-0.4458566904067993,
-0.25189751386642456,
0.05392022430896759,
0.0319855734705925,
0.38925060629844666,
0.24098315834999084,
0.07352793216705322,
0.12044262140989304,
0.44940343499183655,
0.04027856886386871,
0.2691263258457184,
-0.43087711930274963,
0.17228983342647552,
0.04387412965297699,
-0.00015646964311599731,
0.010807070881128311,
-0.1356496512889862,
-0.07455162703990936,
0.3014542758464813,
-0.29924890398979187,
-0.31260547041893005,
0.008974163793027401,
0.3582066297531128,
0.02752639725804329,
-0.22362776100635529,
-0.38377708196640015,
-0.09938475489616394,
0.03330168128013611,
-0.09143698960542679,
0.2973320782184601,
0.16625863313674927,
-0.11935245245695114,
-0.4530089497566223,
0.05276256799697876,
-0.25887778401374817,
-0.37561020255088806,
-0.20718739926815033,
-0.13945576548576355,
-0.18328359723091125,
0.4223698377609253,
0.09392228722572327,
-0.25431814789772034,
0.4326243996620178,
0.13183842599391937,
-0.0009576976299285889,
-0.1791590303182602,
0.37268656492233276,
-0.17892560362815857,
0.17356812953948975,
0.19286130368709564,
0.1760634183883667,
0.08135706931352615,
-0.08206138014793396,
0.17178280651569366,
-0.2553364932537079,
0.05122192203998566,
-0.06290607899427414,
-0.4621618390083313,
0.4241853356361389,
0.15536433458328247,
0.06956254690885544,
0.0800350233912468,
-0.3087024986743927,
0.23654212057590485,
0.3184533715248108,
0.06654004752635956,
0.01657763123512268,
-0.04365943372249603,
-0.5199797749519348,
-0.18525896966457367,
0.1800575852394104,
0.35594111680984497,
-0.005651805549860001,
-0.28012028336524963,
0.24540722370147705,
-0.1396409124135971,
0.1264391541481018,
0.450268030166626,
-0.20375922322273254,
0.1241469457745552,
-0.36262452602386475,
0.47626185417175293,
-0.08721437305212021,
0.007112123072147369,
-0.20014826953411102,
0.3483457565307617,
-0.1150127649307251,
0.10644718259572983,
0.15375737845897675,
-0.04251930117607117,
0.3231618404388428,
-0.11874818801879883,
-0.13673409819602966,
0.2841445803642273,
-0.33379971981048584,
-0.007272372022271156,
-0.16807439923286438,
-0.04596894234418869,
-0.04601677507162094,
0.08413586020469666,
0.0128258615732193,
0.022744908928871155,
-0.175165593624115,
-0.19746717810630798,
0.44754716753959656,
-0.21877989172935486,
0.19202293455600739,
0.028389357030391693,
0.26529034972190857,
-0.07647265493869781,
0.10252368450164795,
0.028590373694896698,
-0.2277815341949463,
0.3060741424560547,
-0.060902178287506104,
-0.11030471324920654,
0.20453974604606628,
-0.5329277515411377,
-0.0827147588133812,
-0.13559575378894806,
-0.2064102441072464,
-0.30182817578315735,
0.11884002387523651,
0.07234310358762741,
0.22258538007736206,
-0.41366493701934814,
-0.19951876997947693,
0.08660347759723663,
-0.6116568446159363,
0.0008741234196349978,
-0.21986143290996552,
0.13305731117725372,
0.12445379048585892,
-0.06488364934921265,
-0.023150360211730003,
0.06957897543907166,
0.03223606199026108,
-0.5056182146072388,
0.2826848328113556,
0.2286330759525299,
0.24073851108551025,
0.09244034439325333,
-0.03793153166770935,
0.25515496730804443,
0.2821572721004486,
0.08473251760005951,
-0.24822309613227844,
-0.05504832789301872,
-0.17978408932685852,
-0.15307220816612244,
-0.025936320424079895,
0.5224031209945679,
0.00138942152261734,
0.39958512783050537,
0.010696962475776672,
0.060005150735378265,
0.23627188801765442,
0.024925116449594498,
-0.15981462597846985,
-0.08536161482334137,
-0.14690768718719482,
-0.19079305231571198,
0.18328377604484558,
0.1603204607963562,
-0.4751720726490021,
0.22418785095214844,
0.3985402286052704,
0.1856449842453003,
-0.04140955209732056,
-0.19834595918655396,
0.05548902601003647,
0.06501799076795578,
0.18625275790691376,
0.1313060224056244,
0.357405424118042,
0.17528961598873138,
0.1982702910900116,
-0.043995052576065063,
-0.007841653190553188,
-0.1738368570804596,
0.027770668268203735,
0.0516146719455719,
0.33153316378593445,
0.14535824954509735,
-0.3557676076889038,
-0.32438960671424866,
-0.366615891456604,
-0.07891052961349487,
0.2670961618423462,
-0.044030241668224335,
-0.15475969016551971,
0.18427810072898865,
-0.09460751712322235,
-0.014064401388168335,
-0.20443730056285858,
0.21069033443927765,
0.048539746552705765,
-0.013807387091219425,
0.1513122320175171,
0.44546401500701904,
-0.1753336489200592,
0.3774801194667816,
0.23955371975898743,
0.49469470977783203,
-0.1215217113494873,
0.06134870648384094,
-0.11332447826862335,
0.011548997834324837,
0.0657169371843338,
0.12639378011226654,
0.2764800190925598,
-0.1491161435842514,
0.33718806505203247,
-0.1516757756471634,
-0.33638620376586914,
-0.410803884267807,
-0.05194908007979393,
0.17214557528495789,
-0.22019217908382416,
0.12021981179714203,
-0.014942802488803864,
-0.10123150050640106,
0.00013035908341407776,
0.07196380198001862,
0.07958382368087769,
-0.2918393015861511,
-0.10506178438663483,
-0.2324809581041336,
-0.13313207030296326,
-0.03534913808107376,
-0.08629007637500763,
-0.3896819055080414,
-0.022934025153517723,
-0.3083607852458954,
0.48286300897598267,
0.06573769450187683,
0.259377658367157,
-0.05811575800180435,
0.15897879004478455,
-0.25862085819244385,
-0.05927889421582222,
-0.1778942346572876,
-0.23651202023029327,
-0.3556007742881775,
0.11361012607812881,
-0.45431357622146606,
-0.30734702944755554,
-0.041248299181461334,
0.03129275143146515,
0.47146108746528625,
0.47260725498199463,
-0.25842928886413574,
-0.20184330642223358,
0.038744520395994186,
-0.10064556449651718,
0.08895149827003479,
-0.14834001660346985,
0.3239709436893463,
-0.2327100932598114,
-0.034885503351688385,
-0.09461766481399536,
0.02422523871064186,
0.408452570438385,
-0.03487198054790497,
-0.054043181240558624,
0.15547844767570496,
0.31074124574661255,
0.3175090551376343,
0.9548540711402893,
0.621807336807251,
-0.03604796156287193,
0.2034883052110672,
-0.12612588703632355,
0.06832945346832275,
-0.13396891951560974,
0.08971693366765976,
0.14184586703777313,
-0.15934711694717407,
-0.06144735589623451,
0.2112346738576889,
-0.10086918622255325,
-0.23370051383972168,
0.1608348786830902,
0.1459934115409851,
0.04020347446203232,
-0.43625426292419434,
0.31194740533828735,
0.12576153874397278,
0.4652280807495117,
0.12288165092468262,
0.29832178354263306,
0.1089407205581665,
0.1786055564880371,
0.07631906867027283,
-0.16776864230632782,
0.6127803325653076,
-0.044840920716524124,
-0.48049646615982056,
0.04737408086657524,
-0.2618391513824463,
0.14129279553890228,
-0.044706184417009354,
0.26572179794311523,
-0.09853404760360718,
-0.17909929156303406,
0.16636088490486145,
0.12030001729726791,
0.6770154237747192,
-0.1671353131532669,
-0.20092158019542694,
-0.0427183136343956,
-0.45933857560157776,
0.009371457621455193,
-0.03957578167319298,
-0.0727631077170372,
0.46488824486732483,
0.13454745709896088,
0.35958632826805115,
-0.2189657986164093,
-0.36667168140411377,
0.26669228076934814,
-0.13197344541549683,
-0.16910497844219208,
0.004682852886617184,
-0.1689257174730301,
-0.23034358024597168,
-0.3070701062679291,
0.43129783868789673,
0.3811333477497101,
0.07759412378072739,
-0.20392842590808868,
-0.2792413532733917,
-0.4307912588119507,
-0.04752148315310478,
0.04467089846730232,
0.2852877974510193,
0.2267170250415802,
-0.06973057240247726,
0.29572880268096924,
0.35433170199394226,
-0.05455898493528366,
0.16367937624454498,
0.4017314612865448,
0.036368656903505325,
-0.09889920055866241,
0.29682445526123047,
-0.195466548204422,
0.3021899163722992,
0.511089563369751,
-0.058355994522571564,
0.05218159779906273,
-0.20259258151054382,
0.18873481452465057,
-0.48250383138656616,
-0.02112458646297455,
0.11130807548761368,
0.10767772793769836,
-0.3529070317745209,
-0.40576809644699097,
0.20767945051193237,
0.131929412484169,
-0.04372977837920189,
0.39618754386901855,
0.294912189245224,
-0.21563774347305298,
0.34404420852661133,
0.32321152091026306,
0.6880885362625122,
0.005530614405870438,
-0.024256568402051926,
0.07640169560909271,
0.28133678436279297,
0.20321597158908844,
-0.37193143367767334,
0.4987388849258423,
-0.31749582290649414,
-0.43257981538772583,
0.040830016136169434,
-0.15997308492660522,
0.11397654563188553,
0.5890533328056335,
0.18661393225193024,
0.26560163497924805,
0.20676086843013763,
0.04487695172429085,
-0.2907826602458954,
0.2200196087360382,
-0.09389908611774445,
-0.3498166799545288,
-0.031091611832380295,
0.13062700629234314,
0.06714978069067001,
0.30369213223457336,
-0.16108942031860352,
-0.08517641574144363,
0.26209989190101624,
0.031258657574653625,
-0.006984680891036987,
-0.22530826926231384,
-0.20840442180633545,
0.19079044461250305,
0.09149165451526642,
-0.3087046146392822,
0.10887517035007477,
0.11379726231098175,
0.2894982397556305,
-0.18432268500328064,
0.01713801734149456,
0.070201076567173,
-0.1178688332438469,
-0.2320578247308731,
-0.11569711565971375,
-0.17968405783176422,
0.14422352612018585,
-0.045654017478227615,
0.005916371941566467,
-0.23969900608062744,
0.13315795361995697,
-0.43032169342041016,
-0.2004941701889038,
0.03773202374577522,
-0.23022420704364777,
-0.23602546751499176,
0.05530674010515213,
0.17091067135334015,
-0.1768815964460373,
-0.2156355381011963,
0.12192672491073608,
-0.07051660120487213,
-0.27991724014282227,
0.4080747067928314,
0.02726585604250431,
-0.2360544502735138,
-0.03479309007525444,
-0.027139000594615936,
0.09434341639280319,
0.03834586590528488,
0.189982607960701,
-0.059725672006607056,
-0.03022080659866333,
-0.255582720041275,
-0.15091635286808014,
0.27231764793395996,
-0.41403043270111084,
0.2614995837211609,
-0.338802695274353,
0.15786437690258026,
-0.11912466585636139,
0.052725255489349365,
0.07546676695346832,
0.2535509169101715,
-0.10662791132926941,
-0.20526272058486938,
-0.10632652044296265,
0.10307659208774567,
-0.024281147867441177,
0.38888323307037354,
0.14101916551589966,
0.12715879082679749,
-0.05436506122350693,
0.4157772958278656,
-0.3402875065803528,
-0.08379168063402176,
-0.21097363531589508,
0.3031468987464905,
0.14409011602401733,
-0.004944514483213425,
0.10335634648799896,
0.022207090631127357,
0.010954508557915688,
0.35115063190460205,
-0.19977153837680817,
-0.24709457159042358,
-0.0061241500079631805,
0.08844518661499023,
0.11319808661937714,
0.10929672420024872,
0.07044494897127151,
0.15388967096805573,
-0.30433422327041626,
-0.3456614315509796,
0.361652135848999,
-0.14328837394714355,
0.09197014570236206,
-0.08422309905290604,
0.4538153409957886,
0.048888806253671646,
-0.2228572964668274,
0.1001398041844368,
0.1383364200592041,
-0.1292601078748703,
0.12868660688400269,
0.2076706886291504,
0.033630531281232834,
-0.031560953706502914,
0.27252396941185,
0.0952623188495636,
0.4545673727989197,
-0.01595807448029518,
-0.029666081070899963,
-0.03381308913230896,
0.09056061506271362,
0.14172284305095673,
0.3731381595134735,
0.29874271154403687,
-0.11785684525966644,
0.037574708461761475,
0.09383058547973633,
0.3007858991622925,
-0.16079097986221313,
-0.1511453241109848,
0.23943360149860382,
0.10455376654863358,
0.2863558232784271,
0.5818995833396912,
0.5915336608886719,
0.26354026794433594,
0.026148904114961624,
0.1624661386013031,
0.022096309810876846,
-0.5701475739479065,
0.24813909828662872,
-0.04763512685894966,
-0.11878427863121033,
0.08878545463085175,
0.33733993768692017,
0.12105806171894073,
0.279239684343338,
0.37193721532821655,
-0.2820934057235718,
0.7299979329109192,
0.045300692319869995,
-0.05251407250761986,
0.15522067248821259,
-0.294338196516037,
-0.2181197553873062,
0.06876888126134872,
-0.030453503131866455,
0.09180578589439392,
-0.09326685965061188,
0.14411453902721405,
-0.1956048607826233,
-0.47699210047721863,
-0.10404454171657562,
0.07497423887252808,
-0.37445980310440063,
-0.16489891707897186,
-0.35887590050697327,
0.008764289319515228,
-0.27118080854415894,
0.03809670731425285,
0.008845541626214981,
-0.35045719146728516,
0.5030322074890137,
-0.0875004231929779,
-0.04327234625816345,
-0.04212851822376251,
0.14811405539512634,
0.07698354870080948,
0.35551679134368896,
-0.2727179527282715,
0.022695794701576233,
-0.20349009335041046,
-0.04746609181165695,
-0.02025292068719864,
0.09435871243476868,
0.12288472056388855,
-0.14173682034015656,
-0.04804707691073418,
0.3086671829223633,
0.03739326447248459,
0.09552706778049469,
-0.24007773399353027,
0.10772506892681122,
-0.11150451004505157,
-0.017381995916366577,
0.329293817281723,
0.1249159723520279,
-0.08034562319517136,
-0.19796277582645416,
0.21379345655441284,
0.07142612338066101,
-0.3229873478412628,
0.2633872330188751,
-0.17079846560955048,
-0.17634299397468567,
-0.014321621507406235,
0.1317480355501175,
-0.01605420559644699,
-0.11170957237482071,
0.431576132774353,
-0.3941897749900818,
0.1660086214542389,
0.016396425664424896,
0.10506683588027954,
-0.10006959736347198,
0.3363496959209442,
-0.37803763151168823,
0.0057043470442295074,
-0.4389198422431946,
-0.23783496022224426,
-0.2687265872955322,
-0.01378699392080307,
-0.2723226845264435,
0.18179090321063995,
0.07472347468137741,
0.5725491046905518,
0.06413979828357697,
0.18447144329547882,
-0.10000166296958923,
-0.18516145646572113,
0.09397251158952713,
0.5212676525115967,
-0.18781045079231262,
-0.04293695464730263,
-0.5688614845275879,
-0.002750355750322342,
0.3128855228424072,
-0.29243674874305725,
0.23846787214279175,
0.039204053580760956,
-0.06143148988485336,
0.04932595044374466,
0.1718427836894989,
0.35084015130996704,
-0.21415051817893982,
0.07190976291894913,
0.058356158435344696,
0.09833948314189911,
0.015819624066352844,
0.08352995663881302,
-0.4303295612335205,
-0.20535710453987122,
-0.5746203660964966,
0.2668769955635071,
0.08666536211967468,
0.004330283030867577,
-0.1145528182387352,
-0.15274687111377716,
-0.31446191668510437,
0.1728978008031845,
0.2797790765762329,
0.09732329845428467,
0.07319830358028412,
0.25739818811416626,
-0.25225430727005005,
0.20202474296092987,
0.342868447303772,
0.46051138639450073,
0.0006941817700862885,
-0.2607722878456116,
-0.1946304589509964,
-0.42551472783088684,
0.357486367225647,
-0.3486265540122986,
-0.2207561731338501,
-0.23716329038143158,
0.27358120679855347,
0.34863802790641785,
-0.25484755635261536,
-0.3436136841773987,
-0.2688450217247009,
0.2383953183889389,
-0.2683344781398773,
0.11378064751625061,
0.2835274040699005,
0.18467168509960175,
-0.27889537811279297,
-0.11241848766803741,
0.04872550442814827,
-0.030119843780994415,
-0.3883461356163025,
0.11550702154636383,
-0.535810112953186
] |
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.10791899263858795,
-0.09877708554267883,
-0.045271433889865875,
0.5462534427642822,
0.23800623416900635,
0.1058305874466896,
0.3299548625946045,
0.41471678018569946,
0.4334627091884613,
0.18027372658252716,
0.3069751262664795,
0.35449913144111633,
0.08857838064432144,
-0.13640587031841278,
-0.10547126084566116,
-0.06744231283664703,
0.08452752232551575,
-0.009547822177410126,
0.014519788324832916,
0.070711150765419,
-0.3499060869216919,
0.06102970987558365,
-0.20450140535831451,
-0.0477449893951416,
-0.1417732536792755,
0.4561125636100769,
0.09776946902275085,
0.14341045916080475,
0.07637783885002136,
-0.4001108407974243,
0.12195786833763123,
-0.4754084646701813,
0.06789156794548035,
0.5858676433563232,
-0.00011682184413075447,
0.13605476915836334,
0.6783230304718018,
0.016895683482289314,
-0.4520550072193146,
-0.342848539352417,
-0.3044619858264923,
-0.42408573627471924,
0.22811344265937805,
-0.21921323239803314,
0.10351435095071793,
-0.32380184531211853,
-0.2619883418083191,
-0.532679557800293,
0.27518343925476074,
0.3364996612071991,
0.1619805246591568,
-0.17517463862895966,
0.0019383728504180908,
-0.04449089616537094,
0.2273511290550232,
0.2691088914871216,
0.09583985060453415,
0.3530007004737854,
0.21918773651123047,
0.12218610942363739,
-0.0034869983792304993,
-0.09438614547252655,
0.02318013645708561,
0.08170836418867111,
0.17818763852119446,
-0.15594923496246338,
-0.15521252155303955,
0.02408117987215519,
0.20960375666618347,
0.24085575342178345,
0.5802989602088928,
-0.20119261741638184,
-0.32436496019363403,
-0.4075363874435425,
-0.10639867186546326,
-0.0841100737452507,
0.278935045003891,
0.18959718942642212,
-0.022231802344322205,
0.14058470726013184,
-0.24186334013938904,
0.17482596635818481,
-0.07088501751422882,
0.10007855296134949,
-0.2621646523475647,
-0.017502829432487488,
-0.1680755317211151,
0.35914626717567444,
-0.06872805953025818,
-0.1880151331424713,
-0.003319883719086647,
-0.18155543506145477,
-0.09315025806427002,
0.3134194016456604,
-0.2280215173959732,
-0.005760017782449722,
0.27648887038230896,
-0.22606384754180908,
0.3616536557674408,
-0.153665229678154,
0.10326965153217316,
-0.2195129096508026,
-0.1056441143155098,
0.25357645750045776,
0.516665518283844,
0.1554112583398819,
0.16945695877075195,
-0.17517399787902832,
-0.02244645357131958,
0.0661768689751625,
-0.17772018909454346,
-0.06075814366340637,
0.07890424132347107,
-0.2915390729904175,
-0.025204909965395927,
-0.1055215522646904,
0.1860952228307724,
-0.2740759551525116,
0.010653490200638771,
0.4142884314060211,
-0.5187076926231384,
0.05712500214576721,
0.18781186640262604,
-0.03995098918676376,
-0.12934118509292603,
0.4571424424648285,
0.05867725610733032,
0.16285383701324463,
-0.20908226072788239,
-0.10218280553817749,
-0.13426315784454346,
-0.10120481252670288,
-0.017844416201114655,
-0.29239657521247864,
0.23574881255626678,
-0.02498236671090126,
0.14047519862651825,
0.009002243168652058,
-0.047144755721092224,
-0.33910834789276123,
0.09165637195110321,
-0.1760072261095047,
-0.06431231647729874,
0.412650465965271,
-0.17810922861099243,
-0.060130730271339417,
0.04438334330916405,
-0.250688374042511,
-0.18397778272628784,
0.2994745671749115,
-0.32872432470321655,
-0.27570903301239014,
-0.04525183141231537,
0.18523333966732025,
-0.2471526712179184,
0.4131726920604706,
-0.25151973962783813,
-0.008032593876123428,
0.08731834590435028,
-0.011639045551419258,
0.1714891493320465,
-0.28284841775894165,
-0.3545951545238495,
-0.1260121613740921,
0.050135791301727295,
0.4900035262107849,
-0.5150161981582642,
0.015781961381435394,
-0.19907821714878082,
-0.07543677091598511,
0.03138485550880432,
0.15129773318767548,
-0.40569761395454407,
0.20333561301231384,
-0.27588897943496704,
0.29550445079803467,
0.10537638515233994,
-0.2899073660373688,
-0.2744743824005127,
0.6284496188163757,
-0.33983421325683594,
0.24818630516529083,
-0.18841513991355896,
-0.13059435784816742,
-0.035547155886888504,
-0.04318161681294441,
0.7023758888244629,
0.4016419053077698,
0.09302034974098206,
0.1689942628145218,
-0.3032594323158264,
-0.10869979113340378,
0.15982259809970856,
0.12916100025177002,
-0.3595900535583496,
0.03174389526247978,
0.33334603905677795,
0.3403535783290863,
0.23213768005371094,
0.22617536783218384,
0.10956931859254837,
0.33413732051849365,
-0.18949681520462036,
0.04336877167224884,
0.2227606624364853,
0.18624359369277954,
-0.4716187119483948,
0.19654464721679688,
-0.10153786838054657,
-0.2664125859737396,
-0.054763346910476685,
0.0514402762055397,
-0.3833977282047272,
0.4178995192050934,
-0.013375286012887955,
0.1907322108745575,
0.0463104322552681,
-0.059533581137657166,
0.18924453854560852,
0.25414153933525085,
0.2583850622177124,
-0.012399721890687943,
-0.20948156714439392,
-0.1012604609131813,
-0.5174550414085388,
0.10001864284276962,
0.1815313845872879,
0.05179186910390854,
-0.18810886144638062,
-0.009161874651908875,
0.08773341029882431,
-0.13377130031585693,
-0.392665833234787,
0.29208794236183167,
0.3681202232837677,
-0.07843340933322906,
-0.34174007177352905,
-0.024211019277572632,
0.15174008905887604,
0.04946624115109444,
0.23342543840408325,
0.2810206413269043,
0.34876060485839844,
-0.15535509586334229,
-0.25956952571868896,
0.1325424760580063,
-0.1513129472732544,
0.2935126721858978,
-0.30745846033096313,
-0.33683645725250244,
0.3777695596218109,
0.01127660647034645,
-0.0542469322681427,
-0.07576753944158554,
0.24848847091197968,
0.26174527406692505,
0.27581867575645447,
0.12630246579647064,
-0.04540012776851654,
-0.15200477838516235,
0.19443239271640778,
-0.18023370206356049,
-0.07577309757471085,
0.3541577160358429,
-0.052485235035419464,
-0.08029433339834213,
0.02853100374341011,
0.05740847811102867,
0.59925377368927,
0.01176035962998867,
0.07117800414562225,
-0.07052294909954071,
0.25145041942596436,
-0.30641496181488037,
0.006540149450302124,
0.011825703084468842,
0.14923563599586487,
0.47324204444885254,
0.5296695828437805,
-0.0437316820025444,
-0.1484375298023224,
-0.2799703776836395,
0.025217438116669655,
0.1530022919178009,
-0.2262924164533615,
0.31128984689712524,
-0.19477307796478271,
-0.026142127811908722,
-0.11274954676628113,
0.014287276193499565,
-0.20607025921344757,
-0.14626069366931915,
-0.19480860233306885,
0.022342659533023834,
-0.3662625551223755,
-0.26746731996536255,
0.05548233911395073,
0.05968870222568512,
0.21764391660690308,
-0.391407310962677,
-0.04101024568080902,
0.017549199983477592,
-0.18421196937561035,
-0.12480050325393677,
0.21992526948451996,
-0.15896767377853394,
-0.11626669764518738,
0.05573030561208725,
-0.3040270209312439,
0.10620410740375519,
-0.1921200156211853,
0.09171789884567261,
0.19365163147449493,
0.32345572113990784,
0.07201134413480759,
0.16600345075130463,
0.11545249819755554,
0.11685845255851746,
0.2259882241487503,
0.17603115737438202,
-0.16081905364990234,
0.29255661368370056,
0.2645043134689331,
0.22278612852096558,
-0.3538370728492737,
-0.15751603245735168,
-0.13303154706954956,
-0.4258749485015869,
0.6776132583618164,
0.08011944591999054,
-0.0381513386964798,
0.058922722935676575,
0.2922881543636322,
0.2399674952030182,
0.27331411838531494,
-0.0027406681329011917,
-0.24036256968975067,
-0.25912824273109436,
0.01606813818216324,
-0.14876234531402588,
-0.3684869110584259,
-0.1284562647342682,
0.0011069811880588531,
-0.26211991906166077,
-0.06901048123836517,
-0.6554128527641296,
0.1901542842388153,
-0.14623847603797913,
0.10255326330661774,
-0.2186298966407776,
-0.25608018040657043,
0.24671390652656555,
-0.2855615019798279,
0.07256098836660385,
-0.19959744811058044,
-0.1826552301645279,
-0.028990276157855988,
0.1413915604352951,
0.16821780800819397,
0.13539116084575653,
0.49398744106292725,
-0.22657938301563263,
-0.11280663311481476,
0.08481171727180481,
0.022724391892552376,
0.3530382812023163,
-0.07585324347019196,
0.15390262007713318,
-0.622738778591156,
0.09833496063947678,
0.04990285262465477,
0.040749721229076385,
-0.4929276704788208,
0.21601080894470215,
0.10285841673612595,
-0.1636665165424347,
-0.12622368335723877,
-0.30846625566482544,
-0.2160157561302185,
-0.13806778192520142,
0.1393919140100479,
-0.12041480839252472,
-0.21624866127967834,
0.04287805035710335,
-0.0005499795079231262,
0.028065763413906097,
-0.05288292467594147,
-0.28622233867645264,
-0.03606647253036499,
0.09982770681381226,
0.036190103739500046,
-0.2874169647693634,
-0.12745171785354614,
-0.18863779306411743,
0.24812915921211243,
0.15046603977680206,
0.5074335932731628,
-0.034886740148067474,
-0.11625247448682785,
0.08839154988527298,
-0.11740143597126007,
0.7648221254348755,
-0.027556581422686577,
0.44142425060272217,
0.3170996904373169,
0.11626306176185608,
-0.44806578755378723,
-0.10654784739017487,
0.18743647634983063,
0.23905408382415771,
0.19604046642780304,
0.3915334939956665,
0.03317593038082123,
0.10147884488105774,
0.022154659032821655,
0.5069683790206909,
-0.08772067725658417,
-0.4126247763633728,
-0.2343151867389679,
-0.2182304561138153,
-0.11141310632228851,
-0.11715076118707657,
0.12769579887390137,
0.45710277557373047,
-0.04436442255973816,
-0.12136247754096985,
-0.096016526222229,
-0.09802769869565964,
-0.233944371342659,
-0.048551686108112335,
0.18873611092567444,
-0.15570467710494995,
0.34110885858535767,
-0.0358898788690567,
0.18849043548107147,
0.33934158086776733,
0.551167368888855,
0.17839308083057404,
-0.2552831768989563,
0.18381071090698242,
-0.13874198496341705,
0.012210071086883545,
0.08504533767700195,
-0.05889558792114258,
-0.1109936460852623,
0.00033554807305336,
0.17163671553134918,
-0.29650169610977173,
0.08579808473587036,
0.15572203695774078,
-0.10386383533477783,
-0.2147628515958786,
-0.21238309144973755,
0.6556909680366516,
-0.12132616341114044,
0.078148752450943,
0.37439966201782227,
-0.41524815559387207,
-0.22078777849674225,
0.3022003173828125,
-0.20720860362052917,
0.5385363698005676,
0.11469249427318573,
-0.09799891710281372,
0.07873496413230896,
-0.23044021427631378,
0.3187785744667053,
-0.3667376637458801,
-0.07802323251962662,
-0.2695873975753784,
0.23576247692108154,
0.1703876554965973,
-0.19897839426994324,
-0.026089519262313843,
0.34394145011901855,
0.1428222507238388,
-0.08874612301588058,
-0.35348784923553467,
-0.23081493377685547,
-0.18093858659267426,
0.2526262104511261,
-0.12425839155912399,
-0.13311868906021118,
-0.4579175114631653,
0.10602574050426483,
-0.11105486750602722,
0.15001296997070312,
-0.03112691082060337,
0.11077209562063217,
-0.03936747461557388,
-0.42604148387908936,
-0.25789740681648254,
0.16815847158432007,
0.1347704976797104,
0.028582552447915077,
0.2422017902135849,
-0.09263619035482407,
0.06834584474563599,
0.16735894978046417,
-0.3642285466194153,
0.37182706594467163,
-0.2061290740966797,
-0.006217874586582184,
-0.3226374387741089,
0.09313254058361053,
0.16491636633872986,
0.06103596091270447,
0.0914059653878212,
0.10596228390932083,
-0.195078045129776,
-0.14112448692321777,
-0.3649250566959381,
-0.15498727560043335,
0.18218016624450684,
0.48246532678604126,
-0.013572484254837036,
-0.20325052738189697,
-0.20260323584079742,
-0.19683268666267395,
0.22316259145736694,
-0.0002665221691131592,
0.09323129057884216,
0.08738202601671219,
-0.13734465837478638,
-0.10343732684850693,
-0.14840593934059143,
-0.5106775760650635,
-0.05316843464970589,
0.5137205719947815,
0.0650293231010437,
-0.1251371204853058,
0.2820627689361572,
0.32939770817756653,
0.0193488746881485,
-0.1318429410457611,
0.3889133632183075,
0.13528740406036377,
-0.2482885718345642,
0.32175812125205994,
-0.18092891573905945,
0.1779867261648178,
-0.3144910931587219,
0.08598804473876953,
-0.04353545606136322,
-0.016924872994422913,
0.24550996720790863,
-0.697762668132782,
-0.3289813697338104,
0.15442101657390594,
-0.005834564566612244,
-0.023021336644887924,
0.2083365023136139,
-0.08238734304904938,
0.08490724116563797,
-0.1918645203113556,
-0.17599761486053467,
0.14946535229682922,
-0.22766873240470886,
0.20911702513694763,
-0.08171751350164413,
0.11455585062503815,
0.16769616305828094,
-0.12875516712665558,
0.07477646321058273,
0.2405766397714615,
-0.03354359418153763,
-0.22096478939056396,
-0.2655719518661499,
0.1097811609506607,
0.18559050559997559,
-0.06602491438388824,
-0.13492269814014435,
-0.3614295721054077,
-0.041224922984838486,
-0.0893743485212326,
0.03794774040579796,
0.07007088512182236,
-0.10276347398757935,
0.056885842233896255,
0.39571282267570496,
0.2895148992538452,
0.09751464426517487,
0.4322081208229065,
0.07240596413612366,
0.5258293151855469,
-0.07998331636190414,
0.2878870964050293,
0.09411542117595673,
0.18881192803382874,
-0.6049801111221313,
0.010440252721309662,
-0.21039406955242157,
0.26043006777763367,
0.18364518880844116,
-0.30805468559265137,
0.295809805393219,
0.1804841160774231,
0.23868432641029358,
0.3803926110267639,
-0.41631126403808594,
0.009971609339118004,
0.001587902195751667,
0.10369350761175156,
0.022282857447862625,
-0.3269767761230469,
0.3435269594192505,
0.21052423119544983,
-0.1771802455186844,
0.048400409519672394,
-0.049017827957868576,
-0.3233552575111389,
-0.36145949363708496,
0.1588793396949768,
0.27148982882499695,
0.2766972780227661,
-0.06876230239868164,
0.6148408055305481,
-0.18809296190738678,
0.014928419142961502,
-0.10535592585802078,
0.1550566405057907,
0.4155319929122925,
0.5874577164649963,
0.12707491219043732,
-0.09973690658807755,
0.09058654308319092,
0.23506076633930206,
-0.42459699511528015,
-0.5100785493850708,
0.3898007571697235,
0.47954225540161133,
-0.14312207698822021,
0.2200879156589508,
0.15301275253295898,
-0.029236741364002228,
0.03325369209051132,
0.23226676881313324,
0.009952494874596596,
-0.026673804968595505,
-0.07482465356588364,
-0.2006148397922516,
-0.1151779368519783,
-0.039498310536146164,
-0.03354838490486145,
0.15003150701522827,
0.06431375443935394,
0.2120509296655655,
0.18956910073757172,
0.1743885576725006,
-0.26524901390075684,
-0.15997369587421417,
0.4140819013118744,
0.09756629168987274,
-0.010167889297008514,
-0.46995648741722107,
0.12507948279380798,
0.2992381751537323,
-0.09768345952033997,
0.4455183744430542,
-0.10967420786619186,
0.3141123950481415,
0.45732733607292175,
-0.05669945105910301,
-0.024918198585510254,
-0.06094255670905113,
0.06168614327907562,
-0.1980506032705307,
0.5180253386497498,
-0.07402805984020233,
0.03919902443885803,
0.3743434250354767,
0.09625722467899323,
-0.07380003482103348,
0.3352934420108795,
0.3326323628425598,
0.15338431298732758,
-0.3477018475532532,
0.019798964262008667,
-0.22140803933143616,
-0.1123693585395813,
-0.34475937485694885,
-0.00048072636127471924,
-0.14275866746902466,
-0.12812165915966034,
0.18901348114013672,
0.16506588459014893,
0.19446849822998047,
-0.08909933269023895,
0.05182971805334091,
-0.37236732244491577,
0.48782092332839966,
0.20224377512931824,
0.047609299421310425,
0.019631389528512955,
-0.05535407364368439,
-0.32254448533058167,
0.10867325216531754,
-0.4259040057659149,
0.16200080513954163,
0.32622313499450684,
0.14853675663471222,
-0.13275110721588135,
0.08141224831342697,
-0.22409217059612274,
0.16854816675186157,
-0.27739039063453674,
0.09164890646934509,
-0.025960642844438553,
-0.7420280575752258,
0.1122170239686966,
-0.03985728323459625,
0.08690354973077774,
-0.4605214297771454,
0.2215254157781601,
-0.4179423153400421,
-0.04202749952673912,
-0.17016686499118805,
-0.07999923825263977,
-0.10731388628482819,
0.15116989612579346,
0.35857951641082764,
0.187229722738266,
0.028764240443706512,
0.09024404734373093,
-0.04118921607732773,
-0.2564050257205963,
-0.12670844793319702,
-0.13117611408233643,
0.36509615182876587,
-0.06163335219025612,
0.2149145007133484,
-0.29783186316490173,
0.12937535345554352,
-0.00794264953583479,
0.09831171482801437,
-0.16139006614685059,
-0.1392909586429596,
-0.290425181388855,
-0.09346179664134979,
-0.33609163761138916,
0.25409039855003357,
-0.08193835616111755,
0.13372991979122162,
0.005742721259593964,
0.27244728803634644,
0.14746280014514923,
-0.2152090072631836,
0.36095353960990906,
-0.35293489694595337,
-0.20826499164104462,
0.20780155062675476,
0.15313604474067688,
-0.25425484776496887,
-0.35568729043006897,
-0.2642316222190857,
0.18071389198303223,
0.5729734897613525,
0.049034517258405685,
-0.25966107845306396,
0.022291947156190872,
-0.19758684933185577,
-0.14539583027362823,
-0.07174982875585556,
0.10187481343746185,
0.18945595622062683,
0.04248145967721939,
0.3455488979816437,
-0.14232009649276733
] |
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.10791899263858795,
-0.09877708554267883,
-0.045271433889865875,
0.5462534427642822,
0.23800623416900635,
0.1058305874466896,
0.3299548625946045,
0.41471678018569946,
0.4334627091884613,
0.18027372658252716,
0.3069751262664795,
0.35449913144111633,
0.08857838064432144,
-0.13640587031841278,
-0.10547126084566116,
-0.06744231283664703,
0.08452752232551575,
-0.009547822177410126,
0.014519788324832916,
0.070711150765419,
-0.3499060869216919,
0.06102970987558365,
-0.20450140535831451,
-0.0477449893951416,
-0.1417732536792755,
0.4561125636100769,
0.09776946902275085,
0.14341045916080475,
0.07637783885002136,
-0.4001108407974243,
0.12195786833763123,
-0.4754084646701813,
0.06789156794548035,
0.5858676433563232,
-0.00011682184413075447,
0.13605476915836334,
0.6783230304718018,
0.016895683482289314,
-0.4520550072193146,
-0.342848539352417,
-0.3044619858264923,
-0.42408573627471924,
0.22811344265937805,
-0.21921323239803314,
0.10351435095071793,
-0.32380184531211853,
-0.2619883418083191,
-0.532679557800293,
0.27518343925476074,
0.3364996612071991,
0.1619805246591568,
-0.17517463862895966,
0.0019383728504180908,
-0.04449089616537094,
0.2273511290550232,
0.2691088914871216,
0.09583985060453415,
0.3530007004737854,
0.21918773651123047,
0.12218610942363739,
-0.0034869983792304993,
-0.09438614547252655,
0.02318013645708561,
0.08170836418867111,
0.17818763852119446,
-0.15594923496246338,
-0.15521252155303955,
0.02408117987215519,
0.20960375666618347,
0.24085575342178345,
0.5802989602088928,
-0.20119261741638184,
-0.32436496019363403,
-0.4075363874435425,
-0.10639867186546326,
-0.0841100737452507,
0.278935045003891,
0.18959718942642212,
-0.022231802344322205,
0.14058470726013184,
-0.24186334013938904,
0.17482596635818481,
-0.07088501751422882,
0.10007855296134949,
-0.2621646523475647,
-0.017502829432487488,
-0.1680755317211151,
0.35914626717567444,
-0.06872805953025818,
-0.1880151331424713,
-0.003319883719086647,
-0.18155543506145477,
-0.09315025806427002,
0.3134194016456604,
-0.2280215173959732,
-0.005760017782449722,
0.27648887038230896,
-0.22606384754180908,
0.3616536557674408,
-0.153665229678154,
0.10326965153217316,
-0.2195129096508026,
-0.1056441143155098,
0.25357645750045776,
0.516665518283844,
0.1554112583398819,
0.16945695877075195,
-0.17517399787902832,
-0.02244645357131958,
0.0661768689751625,
-0.17772018909454346,
-0.06075814366340637,
0.07890424132347107,
-0.2915390729904175,
-0.025204909965395927,
-0.1055215522646904,
0.1860952228307724,
-0.2740759551525116,
0.010653490200638771,
0.4142884314060211,
-0.5187076926231384,
0.05712500214576721,
0.18781186640262604,
-0.03995098918676376,
-0.12934118509292603,
0.4571424424648285,
0.05867725610733032,
0.16285383701324463,
-0.20908226072788239,
-0.10218280553817749,
-0.13426315784454346,
-0.10120481252670288,
-0.017844416201114655,
-0.29239657521247864,
0.23574881255626678,
-0.02498236671090126,
0.14047519862651825,
0.009002243168652058,
-0.047144755721092224,
-0.33910834789276123,
0.09165637195110321,
-0.1760072261095047,
-0.06431231647729874,
0.412650465965271,
-0.17810922861099243,
-0.060130730271339417,
0.04438334330916405,
-0.250688374042511,
-0.18397778272628784,
0.2994745671749115,
-0.32872432470321655,
-0.27570903301239014,
-0.04525183141231537,
0.18523333966732025,
-0.2471526712179184,
0.4131726920604706,
-0.25151973962783813,
-0.008032593876123428,
0.08731834590435028,
-0.011639045551419258,
0.1714891493320465,
-0.28284841775894165,
-0.3545951545238495,
-0.1260121613740921,
0.050135791301727295,
0.4900035262107849,
-0.5150161981582642,
0.015781961381435394,
-0.19907821714878082,
-0.07543677091598511,
0.03138485550880432,
0.15129773318767548,
-0.40569761395454407,
0.20333561301231384,
-0.27588897943496704,
0.29550445079803467,
0.10537638515233994,
-0.2899073660373688,
-0.2744743824005127,
0.6284496188163757,
-0.33983421325683594,
0.24818630516529083,
-0.18841513991355896,
-0.13059435784816742,
-0.035547155886888504,
-0.04318161681294441,
0.7023758888244629,
0.4016419053077698,
0.09302034974098206,
0.1689942628145218,
-0.3032594323158264,
-0.10869979113340378,
0.15982259809970856,
0.12916100025177002,
-0.3595900535583496,
0.03174389526247978,
0.33334603905677795,
0.3403535783290863,
0.23213768005371094,
0.22617536783218384,
0.10956931859254837,
0.33413732051849365,
-0.18949681520462036,
0.04336877167224884,
0.2227606624364853,
0.18624359369277954,
-0.4716187119483948,
0.19654464721679688,
-0.10153786838054657,
-0.2664125859737396,
-0.054763346910476685,
0.0514402762055397,
-0.3833977282047272,
0.4178995192050934,
-0.013375286012887955,
0.1907322108745575,
0.0463104322552681,
-0.059533581137657166,
0.18924453854560852,
0.25414153933525085,
0.2583850622177124,
-0.012399721890687943,
-0.20948156714439392,
-0.1012604609131813,
-0.5174550414085388,
0.10001864284276962,
0.1815313845872879,
0.05179186910390854,
-0.18810886144638062,
-0.009161874651908875,
0.08773341029882431,
-0.13377130031585693,
-0.392665833234787,
0.29208794236183167,
0.3681202232837677,
-0.07843340933322906,
-0.34174007177352905,
-0.024211019277572632,
0.15174008905887604,
0.04946624115109444,
0.23342543840408325,
0.2810206413269043,
0.34876060485839844,
-0.15535509586334229,
-0.25956952571868896,
0.1325424760580063,
-0.1513129472732544,
0.2935126721858978,
-0.30745846033096313,
-0.33683645725250244,
0.3777695596218109,
0.01127660647034645,
-0.0542469322681427,
-0.07576753944158554,
0.24848847091197968,
0.26174527406692505,
0.27581867575645447,
0.12630246579647064,
-0.04540012776851654,
-0.15200477838516235,
0.19443239271640778,
-0.18023370206356049,
-0.07577309757471085,
0.3541577160358429,
-0.052485235035419464,
-0.08029433339834213,
0.02853100374341011,
0.05740847811102867,
0.59925377368927,
0.01176035962998867,
0.07117800414562225,
-0.07052294909954071,
0.25145041942596436,
-0.30641496181488037,
0.006540149450302124,
0.011825703084468842,
0.14923563599586487,
0.47324204444885254,
0.5296695828437805,
-0.0437316820025444,
-0.1484375298023224,
-0.2799703776836395,
0.025217438116669655,
0.1530022919178009,
-0.2262924164533615,
0.31128984689712524,
-0.19477307796478271,
-0.026142127811908722,
-0.11274954676628113,
0.014287276193499565,
-0.20607025921344757,
-0.14626069366931915,
-0.19480860233306885,
0.022342659533023834,
-0.3662625551223755,
-0.26746731996536255,
0.05548233911395073,
0.05968870222568512,
0.21764391660690308,
-0.391407310962677,
-0.04101024568080902,
0.017549199983477592,
-0.18421196937561035,
-0.12480050325393677,
0.21992526948451996,
-0.15896767377853394,
-0.11626669764518738,
0.05573030561208725,
-0.3040270209312439,
0.10620410740375519,
-0.1921200156211853,
0.09171789884567261,
0.19365163147449493,
0.32345572113990784,
0.07201134413480759,
0.16600345075130463,
0.11545249819755554,
0.11685845255851746,
0.2259882241487503,
0.17603115737438202,
-0.16081905364990234,
0.29255661368370056,
0.2645043134689331,
0.22278612852096558,
-0.3538370728492737,
-0.15751603245735168,
-0.13303154706954956,
-0.4258749485015869,
0.6776132583618164,
0.08011944591999054,
-0.0381513386964798,
0.058922722935676575,
0.2922881543636322,
0.2399674952030182,
0.27331411838531494,
-0.0027406681329011917,
-0.24036256968975067,
-0.25912824273109436,
0.01606813818216324,
-0.14876234531402588,
-0.3684869110584259,
-0.1284562647342682,
0.0011069811880588531,
-0.26211991906166077,
-0.06901048123836517,
-0.6554128527641296,
0.1901542842388153,
-0.14623847603797913,
0.10255326330661774,
-0.2186298966407776,
-0.25608018040657043,
0.24671390652656555,
-0.2855615019798279,
0.07256098836660385,
-0.19959744811058044,
-0.1826552301645279,
-0.028990276157855988,
0.1413915604352951,
0.16821780800819397,
0.13539116084575653,
0.49398744106292725,
-0.22657938301563263,
-0.11280663311481476,
0.08481171727180481,
0.022724391892552376,
0.3530382812023163,
-0.07585324347019196,
0.15390262007713318,
-0.622738778591156,
0.09833496063947678,
0.04990285262465477,
0.040749721229076385,
-0.4929276704788208,
0.21601080894470215,
0.10285841673612595,
-0.1636665165424347,
-0.12622368335723877,
-0.30846625566482544,
-0.2160157561302185,
-0.13806778192520142,
0.1393919140100479,
-0.12041480839252472,
-0.21624866127967834,
0.04287805035710335,
-0.0005499795079231262,
0.028065763413906097,
-0.05288292467594147,
-0.28622233867645264,
-0.03606647253036499,
0.09982770681381226,
0.036190103739500046,
-0.2874169647693634,
-0.12745171785354614,
-0.18863779306411743,
0.24812915921211243,
0.15046603977680206,
0.5074335932731628,
-0.034886740148067474,
-0.11625247448682785,
0.08839154988527298,
-0.11740143597126007,
0.7648221254348755,
-0.027556581422686577,
0.44142425060272217,
0.3170996904373169,
0.11626306176185608,
-0.44806578755378723,
-0.10654784739017487,
0.18743647634983063,
0.23905408382415771,
0.19604046642780304,
0.3915334939956665,
0.03317593038082123,
0.10147884488105774,
0.022154659032821655,
0.5069683790206909,
-0.08772067725658417,
-0.4126247763633728,
-0.2343151867389679,
-0.2182304561138153,
-0.11141310632228851,
-0.11715076118707657,
0.12769579887390137,
0.45710277557373047,
-0.04436442255973816,
-0.12136247754096985,
-0.096016526222229,
-0.09802769869565964,
-0.233944371342659,
-0.048551686108112335,
0.18873611092567444,
-0.15570467710494995,
0.34110885858535767,
-0.0358898788690567,
0.18849043548107147,
0.33934158086776733,
0.551167368888855,
0.17839308083057404,
-0.2552831768989563,
0.18381071090698242,
-0.13874198496341705,
0.012210071086883545,
0.08504533767700195,
-0.05889558792114258,
-0.1109936460852623,
0.00033554807305336,
0.17163671553134918,
-0.29650169610977173,
0.08579808473587036,
0.15572203695774078,
-0.10386383533477783,
-0.2147628515958786,
-0.21238309144973755,
0.6556909680366516,
-0.12132616341114044,
0.078148752450943,
0.37439966201782227,
-0.41524815559387207,
-0.22078777849674225,
0.3022003173828125,
-0.20720860362052917,
0.5385363698005676,
0.11469249427318573,
-0.09799891710281372,
0.07873496413230896,
-0.23044021427631378,
0.3187785744667053,
-0.3667376637458801,
-0.07802323251962662,
-0.2695873975753784,
0.23576247692108154,
0.1703876554965973,
-0.19897839426994324,
-0.026089519262313843,
0.34394145011901855,
0.1428222507238388,
-0.08874612301588058,
-0.35348784923553467,
-0.23081493377685547,
-0.18093858659267426,
0.2526262104511261,
-0.12425839155912399,
-0.13311868906021118,
-0.4579175114631653,
0.10602574050426483,
-0.11105486750602722,
0.15001296997070312,
-0.03112691082060337,
0.11077209562063217,
-0.03936747461557388,
-0.42604148387908936,
-0.25789740681648254,
0.16815847158432007,
0.1347704976797104,
0.028582552447915077,
0.2422017902135849,
-0.09263619035482407,
0.06834584474563599,
0.16735894978046417,
-0.3642285466194153,
0.37182706594467163,
-0.2061290740966797,
-0.006217874586582184,
-0.3226374387741089,
0.09313254058361053,
0.16491636633872986,
0.06103596091270447,
0.0914059653878212,
0.10596228390932083,
-0.195078045129776,
-0.14112448692321777,
-0.3649250566959381,
-0.15498727560043335,
0.18218016624450684,
0.48246532678604126,
-0.013572484254837036,
-0.20325052738189697,
-0.20260323584079742,
-0.19683268666267395,
0.22316259145736694,
-0.0002665221691131592,
0.09323129057884216,
0.08738202601671219,
-0.13734465837478638,
-0.10343732684850693,
-0.14840593934059143,
-0.5106775760650635,
-0.05316843464970589,
0.5137205719947815,
0.0650293231010437,
-0.1251371204853058,
0.2820627689361572,
0.32939770817756653,
0.0193488746881485,
-0.1318429410457611,
0.3889133632183075,
0.13528740406036377,
-0.2482885718345642,
0.32175812125205994,
-0.18092891573905945,
0.1779867261648178,
-0.3144910931587219,
0.08598804473876953,
-0.04353545606136322,
-0.016924872994422913,
0.24550996720790863,
-0.697762668132782,
-0.3289813697338104,
0.15442101657390594,
-0.005834564566612244,
-0.023021336644887924,
0.2083365023136139,
-0.08238734304904938,
0.08490724116563797,
-0.1918645203113556,
-0.17599761486053467,
0.14946535229682922,
-0.22766873240470886,
0.20911702513694763,
-0.08171751350164413,
0.11455585062503815,
0.16769616305828094,
-0.12875516712665558,
0.07477646321058273,
0.2405766397714615,
-0.03354359418153763,
-0.22096478939056396,
-0.2655719518661499,
0.1097811609506607,
0.18559050559997559,
-0.06602491438388824,
-0.13492269814014435,
-0.3614295721054077,
-0.041224922984838486,
-0.0893743485212326,
0.03794774040579796,
0.07007088512182236,
-0.10276347398757935,
0.056885842233896255,
0.39571282267570496,
0.2895148992538452,
0.09751464426517487,
0.4322081208229065,
0.07240596413612366,
0.5258293151855469,
-0.07998331636190414,
0.2878870964050293,
0.09411542117595673,
0.18881192803382874,
-0.6049801111221313,
0.010440252721309662,
-0.21039406955242157,
0.26043006777763367,
0.18364518880844116,
-0.30805468559265137,
0.295809805393219,
0.1804841160774231,
0.23868432641029358,
0.3803926110267639,
-0.41631126403808594,
0.009971609339118004,
0.001587902195751667,
0.10369350761175156,
0.022282857447862625,
-0.3269767761230469,
0.3435269594192505,
0.21052423119544983,
-0.1771802455186844,
0.048400409519672394,
-0.049017827957868576,
-0.3233552575111389,
-0.36145949363708496,
0.1588793396949768,
0.27148982882499695,
0.2766972780227661,
-0.06876230239868164,
0.6148408055305481,
-0.18809296190738678,
0.014928419142961502,
-0.10535592585802078,
0.1550566405057907,
0.4155319929122925,
0.5874577164649963,
0.12707491219043732,
-0.09973690658807755,
0.09058654308319092,
0.23506076633930206,
-0.42459699511528015,
-0.5100785493850708,
0.3898007571697235,
0.47954225540161133,
-0.14312207698822021,
0.2200879156589508,
0.15301275253295898,
-0.029236741364002228,
0.03325369209051132,
0.23226676881313324,
0.009952494874596596,
-0.026673804968595505,
-0.07482465356588364,
-0.2006148397922516,
-0.1151779368519783,
-0.039498310536146164,
-0.03354838490486145,
0.15003150701522827,
0.06431375443935394,
0.2120509296655655,
0.18956910073757172,
0.1743885576725006,
-0.26524901390075684,
-0.15997369587421417,
0.4140819013118744,
0.09756629168987274,
-0.010167889297008514,
-0.46995648741722107,
0.12507948279380798,
0.2992381751537323,
-0.09768345952033997,
0.4455183744430542,
-0.10967420786619186,
0.3141123950481415,
0.45732733607292175,
-0.05669945105910301,
-0.024918198585510254,
-0.06094255670905113,
0.06168614327907562,
-0.1980506032705307,
0.5180253386497498,
-0.07402805984020233,
0.03919902443885803,
0.3743434250354767,
0.09625722467899323,
-0.07380003482103348,
0.3352934420108795,
0.3326323628425598,
0.15338431298732758,
-0.3477018475532532,
0.019798964262008667,
-0.22140803933143616,
-0.1123693585395813,
-0.34475937485694885,
-0.00048072636127471924,
-0.14275866746902466,
-0.12812165915966034,
0.18901348114013672,
0.16506588459014893,
0.19446849822998047,
-0.08909933269023895,
0.05182971805334091,
-0.37236732244491577,
0.48782092332839966,
0.20224377512931824,
0.047609299421310425,
0.019631389528512955,
-0.05535407364368439,
-0.32254448533058167,
0.10867325216531754,
-0.4259040057659149,
0.16200080513954163,
0.32622313499450684,
0.14853675663471222,
-0.13275110721588135,
0.08141224831342697,
-0.22409217059612274,
0.16854816675186157,
-0.27739039063453674,
0.09164890646934509,
-0.025960642844438553,
-0.7420280575752258,
0.1122170239686966,
-0.03985728323459625,
0.08690354973077774,
-0.4605214297771454,
0.2215254157781601,
-0.4179423153400421,
-0.04202749952673912,
-0.17016686499118805,
-0.07999923825263977,
-0.10731388628482819,
0.15116989612579346,
0.35857951641082764,
0.187229722738266,
0.028764240443706512,
0.09024404734373093,
-0.04118921607732773,
-0.2564050257205963,
-0.12670844793319702,
-0.13117611408233643,
0.36509615182876587,
-0.06163335219025612,
0.2149145007133484,
-0.29783186316490173,
0.12937535345554352,
-0.00794264953583479,
0.09831171482801437,
-0.16139006614685059,
-0.1392909586429596,
-0.290425181388855,
-0.09346179664134979,
-0.33609163761138916,
0.25409039855003357,
-0.08193835616111755,
0.13372991979122162,
0.005742721259593964,
0.27244728803634644,
0.14746280014514923,
-0.2152090072631836,
0.36095353960990906,
-0.35293489694595337,
-0.20826499164104462,
0.20780155062675476,
0.15313604474067688,
-0.25425484776496887,
-0.35568729043006897,
-0.2642316222190857,
0.18071389198303223,
0.5729734897613525,
0.049034517258405685,
-0.25966107845306396,
0.022291947156190872,
-0.19758684933185577,
-0.14539583027362823,
-0.07174982875585556,
0.10187481343746185,
0.18945595622062683,
0.04248145967721939,
0.3455488979816437,
-0.14232009649276733
] |
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.10791899263858795,
-0.09877708554267883,
-0.045271433889865875,
0.5462534427642822,
0.23800623416900635,
0.1058305874466896,
0.3299548625946045,
0.41471678018569946,
0.4334627091884613,
0.18027372658252716,
0.3069751262664795,
0.35449913144111633,
0.08857838064432144,
-0.13640587031841278,
-0.10547126084566116,
-0.06744231283664703,
0.08452752232551575,
-0.009547822177410126,
0.014519788324832916,
0.070711150765419,
-0.3499060869216919,
0.06102970987558365,
-0.20450140535831451,
-0.0477449893951416,
-0.1417732536792755,
0.4561125636100769,
0.09776946902275085,
0.14341045916080475,
0.07637783885002136,
-0.4001108407974243,
0.12195786833763123,
-0.4754084646701813,
0.06789156794548035,
0.5858676433563232,
-0.00011682184413075447,
0.13605476915836334,
0.6783230304718018,
0.016895683482289314,
-0.4520550072193146,
-0.342848539352417,
-0.3044619858264923,
-0.42408573627471924,
0.22811344265937805,
-0.21921323239803314,
0.10351435095071793,
-0.32380184531211853,
-0.2619883418083191,
-0.532679557800293,
0.27518343925476074,
0.3364996612071991,
0.1619805246591568,
-0.17517463862895966,
0.0019383728504180908,
-0.04449089616537094,
0.2273511290550232,
0.2691088914871216,
0.09583985060453415,
0.3530007004737854,
0.21918773651123047,
0.12218610942363739,
-0.0034869983792304993,
-0.09438614547252655,
0.02318013645708561,
0.08170836418867111,
0.17818763852119446,
-0.15594923496246338,
-0.15521252155303955,
0.02408117987215519,
0.20960375666618347,
0.24085575342178345,
0.5802989602088928,
-0.20119261741638184,
-0.32436496019363403,
-0.4075363874435425,
-0.10639867186546326,
-0.0841100737452507,
0.278935045003891,
0.18959718942642212,
-0.022231802344322205,
0.14058470726013184,
-0.24186334013938904,
0.17482596635818481,
-0.07088501751422882,
0.10007855296134949,
-0.2621646523475647,
-0.017502829432487488,
-0.1680755317211151,
0.35914626717567444,
-0.06872805953025818,
-0.1880151331424713,
-0.003319883719086647,
-0.18155543506145477,
-0.09315025806427002,
0.3134194016456604,
-0.2280215173959732,
-0.005760017782449722,
0.27648887038230896,
-0.22606384754180908,
0.3616536557674408,
-0.153665229678154,
0.10326965153217316,
-0.2195129096508026,
-0.1056441143155098,
0.25357645750045776,
0.516665518283844,
0.1554112583398819,
0.16945695877075195,
-0.17517399787902832,
-0.02244645357131958,
0.0661768689751625,
-0.17772018909454346,
-0.06075814366340637,
0.07890424132347107,
-0.2915390729904175,
-0.025204909965395927,
-0.1055215522646904,
0.1860952228307724,
-0.2740759551525116,
0.010653490200638771,
0.4142884314060211,
-0.5187076926231384,
0.05712500214576721,
0.18781186640262604,
-0.03995098918676376,
-0.12934118509292603,
0.4571424424648285,
0.05867725610733032,
0.16285383701324463,
-0.20908226072788239,
-0.10218280553817749,
-0.13426315784454346,
-0.10120481252670288,
-0.017844416201114655,
-0.29239657521247864,
0.23574881255626678,
-0.02498236671090126,
0.14047519862651825,
0.009002243168652058,
-0.047144755721092224,
-0.33910834789276123,
0.09165637195110321,
-0.1760072261095047,
-0.06431231647729874,
0.412650465965271,
-0.17810922861099243,
-0.060130730271339417,
0.04438334330916405,
-0.250688374042511,
-0.18397778272628784,
0.2994745671749115,
-0.32872432470321655,
-0.27570903301239014,
-0.04525183141231537,
0.18523333966732025,
-0.2471526712179184,
0.4131726920604706,
-0.25151973962783813,
-0.008032593876123428,
0.08731834590435028,
-0.011639045551419258,
0.1714891493320465,
-0.28284841775894165,
-0.3545951545238495,
-0.1260121613740921,
0.050135791301727295,
0.4900035262107849,
-0.5150161981582642,
0.015781961381435394,
-0.19907821714878082,
-0.07543677091598511,
0.03138485550880432,
0.15129773318767548,
-0.40569761395454407,
0.20333561301231384,
-0.27588897943496704,
0.29550445079803467,
0.10537638515233994,
-0.2899073660373688,
-0.2744743824005127,
0.6284496188163757,
-0.33983421325683594,
0.24818630516529083,
-0.18841513991355896,
-0.13059435784816742,
-0.035547155886888504,
-0.04318161681294441,
0.7023758888244629,
0.4016419053077698,
0.09302034974098206,
0.1689942628145218,
-0.3032594323158264,
-0.10869979113340378,
0.15982259809970856,
0.12916100025177002,
-0.3595900535583496,
0.03174389526247978,
0.33334603905677795,
0.3403535783290863,
0.23213768005371094,
0.22617536783218384,
0.10956931859254837,
0.33413732051849365,
-0.18949681520462036,
0.04336877167224884,
0.2227606624364853,
0.18624359369277954,
-0.4716187119483948,
0.19654464721679688,
-0.10153786838054657,
-0.2664125859737396,
-0.054763346910476685,
0.0514402762055397,
-0.3833977282047272,
0.4178995192050934,
-0.013375286012887955,
0.1907322108745575,
0.0463104322552681,
-0.059533581137657166,
0.18924453854560852,
0.25414153933525085,
0.2583850622177124,
-0.012399721890687943,
-0.20948156714439392,
-0.1012604609131813,
-0.5174550414085388,
0.10001864284276962,
0.1815313845872879,
0.05179186910390854,
-0.18810886144638062,
-0.009161874651908875,
0.08773341029882431,
-0.13377130031585693,
-0.392665833234787,
0.29208794236183167,
0.3681202232837677,
-0.07843340933322906,
-0.34174007177352905,
-0.024211019277572632,
0.15174008905887604,
0.04946624115109444,
0.23342543840408325,
0.2810206413269043,
0.34876060485839844,
-0.15535509586334229,
-0.25956952571868896,
0.1325424760580063,
-0.1513129472732544,
0.2935126721858978,
-0.30745846033096313,
-0.33683645725250244,
0.3777695596218109,
0.01127660647034645,
-0.0542469322681427,
-0.07576753944158554,
0.24848847091197968,
0.26174527406692505,
0.27581867575645447,
0.12630246579647064,
-0.04540012776851654,
-0.15200477838516235,
0.19443239271640778,
-0.18023370206356049,
-0.07577309757471085,
0.3541577160358429,
-0.052485235035419464,
-0.08029433339834213,
0.02853100374341011,
0.05740847811102867,
0.59925377368927,
0.01176035962998867,
0.07117800414562225,
-0.07052294909954071,
0.25145041942596436,
-0.30641496181488037,
0.006540149450302124,
0.011825703084468842,
0.14923563599586487,
0.47324204444885254,
0.5296695828437805,
-0.0437316820025444,
-0.1484375298023224,
-0.2799703776836395,
0.025217438116669655,
0.1530022919178009,
-0.2262924164533615,
0.31128984689712524,
-0.19477307796478271,
-0.026142127811908722,
-0.11274954676628113,
0.014287276193499565,
-0.20607025921344757,
-0.14626069366931915,
-0.19480860233306885,
0.022342659533023834,
-0.3662625551223755,
-0.26746731996536255,
0.05548233911395073,
0.05968870222568512,
0.21764391660690308,
-0.391407310962677,
-0.04101024568080902,
0.017549199983477592,
-0.18421196937561035,
-0.12480050325393677,
0.21992526948451996,
-0.15896767377853394,
-0.11626669764518738,
0.05573030561208725,
-0.3040270209312439,
0.10620410740375519,
-0.1921200156211853,
0.09171789884567261,
0.19365163147449493,
0.32345572113990784,
0.07201134413480759,
0.16600345075130463,
0.11545249819755554,
0.11685845255851746,
0.2259882241487503,
0.17603115737438202,
-0.16081905364990234,
0.29255661368370056,
0.2645043134689331,
0.22278612852096558,
-0.3538370728492737,
-0.15751603245735168,
-0.13303154706954956,
-0.4258749485015869,
0.6776132583618164,
0.08011944591999054,
-0.0381513386964798,
0.058922722935676575,
0.2922881543636322,
0.2399674952030182,
0.27331411838531494,
-0.0027406681329011917,
-0.24036256968975067,
-0.25912824273109436,
0.01606813818216324,
-0.14876234531402588,
-0.3684869110584259,
-0.1284562647342682,
0.0011069811880588531,
-0.26211991906166077,
-0.06901048123836517,
-0.6554128527641296,
0.1901542842388153,
-0.14623847603797913,
0.10255326330661774,
-0.2186298966407776,
-0.25608018040657043,
0.24671390652656555,
-0.2855615019798279,
0.07256098836660385,
-0.19959744811058044,
-0.1826552301645279,
-0.028990276157855988,
0.1413915604352951,
0.16821780800819397,
0.13539116084575653,
0.49398744106292725,
-0.22657938301563263,
-0.11280663311481476,
0.08481171727180481,
0.022724391892552376,
0.3530382812023163,
-0.07585324347019196,
0.15390262007713318,
-0.622738778591156,
0.09833496063947678,
0.04990285262465477,
0.040749721229076385,
-0.4929276704788208,
0.21601080894470215,
0.10285841673612595,
-0.1636665165424347,
-0.12622368335723877,
-0.30846625566482544,
-0.2160157561302185,
-0.13806778192520142,
0.1393919140100479,
-0.12041480839252472,
-0.21624866127967834,
0.04287805035710335,
-0.0005499795079231262,
0.028065763413906097,
-0.05288292467594147,
-0.28622233867645264,
-0.03606647253036499,
0.09982770681381226,
0.036190103739500046,
-0.2874169647693634,
-0.12745171785354614,
-0.18863779306411743,
0.24812915921211243,
0.15046603977680206,
0.5074335932731628,
-0.034886740148067474,
-0.11625247448682785,
0.08839154988527298,
-0.11740143597126007,
0.7648221254348755,
-0.027556581422686577,
0.44142425060272217,
0.3170996904373169,
0.11626306176185608,
-0.44806578755378723,
-0.10654784739017487,
0.18743647634983063,
0.23905408382415771,
0.19604046642780304,
0.3915334939956665,
0.03317593038082123,
0.10147884488105774,
0.022154659032821655,
0.5069683790206909,
-0.08772067725658417,
-0.4126247763633728,
-0.2343151867389679,
-0.2182304561138153,
-0.11141310632228851,
-0.11715076118707657,
0.12769579887390137,
0.45710277557373047,
-0.04436442255973816,
-0.12136247754096985,
-0.096016526222229,
-0.09802769869565964,
-0.233944371342659,
-0.048551686108112335,
0.18873611092567444,
-0.15570467710494995,
0.34110885858535767,
-0.0358898788690567,
0.18849043548107147,
0.33934158086776733,
0.551167368888855,
0.17839308083057404,
-0.2552831768989563,
0.18381071090698242,
-0.13874198496341705,
0.012210071086883545,
0.08504533767700195,
-0.05889558792114258,
-0.1109936460852623,
0.00033554807305336,
0.17163671553134918,
-0.29650169610977173,
0.08579808473587036,
0.15572203695774078,
-0.10386383533477783,
-0.2147628515958786,
-0.21238309144973755,
0.6556909680366516,
-0.12132616341114044,
0.078148752450943,
0.37439966201782227,
-0.41524815559387207,
-0.22078777849674225,
0.3022003173828125,
-0.20720860362052917,
0.5385363698005676,
0.11469249427318573,
-0.09799891710281372,
0.07873496413230896,
-0.23044021427631378,
0.3187785744667053,
-0.3667376637458801,
-0.07802323251962662,
-0.2695873975753784,
0.23576247692108154,
0.1703876554965973,
-0.19897839426994324,
-0.026089519262313843,
0.34394145011901855,
0.1428222507238388,
-0.08874612301588058,
-0.35348784923553467,
-0.23081493377685547,
-0.18093858659267426,
0.2526262104511261,
-0.12425839155912399,
-0.13311868906021118,
-0.4579175114631653,
0.10602574050426483,
-0.11105486750602722,
0.15001296997070312,
-0.03112691082060337,
0.11077209562063217,
-0.03936747461557388,
-0.42604148387908936,
-0.25789740681648254,
0.16815847158432007,
0.1347704976797104,
0.028582552447915077,
0.2422017902135849,
-0.09263619035482407,
0.06834584474563599,
0.16735894978046417,
-0.3642285466194153,
0.37182706594467163,
-0.2061290740966797,
-0.006217874586582184,
-0.3226374387741089,
0.09313254058361053,
0.16491636633872986,
0.06103596091270447,
0.0914059653878212,
0.10596228390932083,
-0.195078045129776,
-0.14112448692321777,
-0.3649250566959381,
-0.15498727560043335,
0.18218016624450684,
0.48246532678604126,
-0.013572484254837036,
-0.20325052738189697,
-0.20260323584079742,
-0.19683268666267395,
0.22316259145736694,
-0.0002665221691131592,
0.09323129057884216,
0.08738202601671219,
-0.13734465837478638,
-0.10343732684850693,
-0.14840593934059143,
-0.5106775760650635,
-0.05316843464970589,
0.5137205719947815,
0.0650293231010437,
-0.1251371204853058,
0.2820627689361572,
0.32939770817756653,
0.0193488746881485,
-0.1318429410457611,
0.3889133632183075,
0.13528740406036377,
-0.2482885718345642,
0.32175812125205994,
-0.18092891573905945,
0.1779867261648178,
-0.3144910931587219,
0.08598804473876953,
-0.04353545606136322,
-0.016924872994422913,
0.24550996720790863,
-0.697762668132782,
-0.3289813697338104,
0.15442101657390594,
-0.005834564566612244,
-0.023021336644887924,
0.2083365023136139,
-0.08238734304904938,
0.08490724116563797,
-0.1918645203113556,
-0.17599761486053467,
0.14946535229682922,
-0.22766873240470886,
0.20911702513694763,
-0.08171751350164413,
0.11455585062503815,
0.16769616305828094,
-0.12875516712665558,
0.07477646321058273,
0.2405766397714615,
-0.03354359418153763,
-0.22096478939056396,
-0.2655719518661499,
0.1097811609506607,
0.18559050559997559,
-0.06602491438388824,
-0.13492269814014435,
-0.3614295721054077,
-0.041224922984838486,
-0.0893743485212326,
0.03794774040579796,
0.07007088512182236,
-0.10276347398757935,
0.056885842233896255,
0.39571282267570496,
0.2895148992538452,
0.09751464426517487,
0.4322081208229065,
0.07240596413612366,
0.5258293151855469,
-0.07998331636190414,
0.2878870964050293,
0.09411542117595673,
0.18881192803382874,
-0.6049801111221313,
0.010440252721309662,
-0.21039406955242157,
0.26043006777763367,
0.18364518880844116,
-0.30805468559265137,
0.295809805393219,
0.1804841160774231,
0.23868432641029358,
0.3803926110267639,
-0.41631126403808594,
0.009971609339118004,
0.001587902195751667,
0.10369350761175156,
0.022282857447862625,
-0.3269767761230469,
0.3435269594192505,
0.21052423119544983,
-0.1771802455186844,
0.048400409519672394,
-0.049017827957868576,
-0.3233552575111389,
-0.36145949363708496,
0.1588793396949768,
0.27148982882499695,
0.2766972780227661,
-0.06876230239868164,
0.6148408055305481,
-0.18809296190738678,
0.014928419142961502,
-0.10535592585802078,
0.1550566405057907,
0.4155319929122925,
0.5874577164649963,
0.12707491219043732,
-0.09973690658807755,
0.09058654308319092,
0.23506076633930206,
-0.42459699511528015,
-0.5100785493850708,
0.3898007571697235,
0.47954225540161133,
-0.14312207698822021,
0.2200879156589508,
0.15301275253295898,
-0.029236741364002228,
0.03325369209051132,
0.23226676881313324,
0.009952494874596596,
-0.026673804968595505,
-0.07482465356588364,
-0.2006148397922516,
-0.1151779368519783,
-0.039498310536146164,
-0.03354838490486145,
0.15003150701522827,
0.06431375443935394,
0.2120509296655655,
0.18956910073757172,
0.1743885576725006,
-0.26524901390075684,
-0.15997369587421417,
0.4140819013118744,
0.09756629168987274,
-0.010167889297008514,
-0.46995648741722107,
0.12507948279380798,
0.2992381751537323,
-0.09768345952033997,
0.4455183744430542,
-0.10967420786619186,
0.3141123950481415,
0.45732733607292175,
-0.05669945105910301,
-0.024918198585510254,
-0.06094255670905113,
0.06168614327907562,
-0.1980506032705307,
0.5180253386497498,
-0.07402805984020233,
0.03919902443885803,
0.3743434250354767,
0.09625722467899323,
-0.07380003482103348,
0.3352934420108795,
0.3326323628425598,
0.15338431298732758,
-0.3477018475532532,
0.019798964262008667,
-0.22140803933143616,
-0.1123693585395813,
-0.34475937485694885,
-0.00048072636127471924,
-0.14275866746902466,
-0.12812165915966034,
0.18901348114013672,
0.16506588459014893,
0.19446849822998047,
-0.08909933269023895,
0.05182971805334091,
-0.37236732244491577,
0.48782092332839966,
0.20224377512931824,
0.047609299421310425,
0.019631389528512955,
-0.05535407364368439,
-0.32254448533058167,
0.10867325216531754,
-0.4259040057659149,
0.16200080513954163,
0.32622313499450684,
0.14853675663471222,
-0.13275110721588135,
0.08141224831342697,
-0.22409217059612274,
0.16854816675186157,
-0.27739039063453674,
0.09164890646934509,
-0.025960642844438553,
-0.7420280575752258,
0.1122170239686966,
-0.03985728323459625,
0.08690354973077774,
-0.4605214297771454,
0.2215254157781601,
-0.4179423153400421,
-0.04202749952673912,
-0.17016686499118805,
-0.07999923825263977,
-0.10731388628482819,
0.15116989612579346,
0.35857951641082764,
0.187229722738266,
0.028764240443706512,
0.09024404734373093,
-0.04118921607732773,
-0.2564050257205963,
-0.12670844793319702,
-0.13117611408233643,
0.36509615182876587,
-0.06163335219025612,
0.2149145007133484,
-0.29783186316490173,
0.12937535345554352,
-0.00794264953583479,
0.09831171482801437,
-0.16139006614685059,
-0.1392909586429596,
-0.290425181388855,
-0.09346179664134979,
-0.33609163761138916,
0.25409039855003357,
-0.08193835616111755,
0.13372991979122162,
0.005742721259593964,
0.27244728803634644,
0.14746280014514923,
-0.2152090072631836,
0.36095353960990906,
-0.35293489694595337,
-0.20826499164104462,
0.20780155062675476,
0.15313604474067688,
-0.25425484776496887,
-0.35568729043006897,
-0.2642316222190857,
0.18071389198303223,
0.5729734897613525,
0.049034517258405685,
-0.25966107845306396,
0.022291947156190872,
-0.19758684933185577,
-0.14539583027362823,
-0.07174982875585556,
0.10187481343746185,
0.18945595622062683,
0.04248145967721939,
0.3455488979816437,
-0.14232009649276733
] |
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.29108357429504395,
-0.24233025312423706,
0.11377005279064178,
0.28113341331481934,
0.43997102975845337,
0.13672280311584473,
0.2831527292728424,
0.18023104965686798,
0.020096030086278915,
0.15855523943901062,
-0.41839635372161865,
-0.16160741448402405,
0.038213398307561874,
0.06896905601024628,
0.0953802764415741,
0.03237363323569298,
0.1215248554944992,
-0.07715122401714325,
0.033498961478471756,
-0.08627502620220184,
-0.21023830771446228,
0.02577008493244648,
-0.22894583642482758,
0.4497007727622986,
-0.27465665340423584,
-0.016474751755595207,
-0.03204062208533287,
0.5527815222740173,
-0.1702624410390854,
-0.30443716049194336,
0.36551931500434875,
0.05719955265522003,
0.07487571239471436,
0.20205827057361603,
-0.00011953379726037383,
0.11945749819278717,
0.40153950452804565,
-0.06258073449134827,
-0.23526781797409058,
-0.24917326867580414,
-0.4586625397205353,
-0.1034323126077652,
-0.3297160863876343,
-0.1440565437078476,
-0.0020428895950317383,
-0.2154846489429474,
0.07323338836431503,
0.10686734318733215,
0.33699411153793335,
0.23172760009765625,
0.11226668953895569,
0.2569122016429901,
0.35404402017593384,
-0.15269137918949127,
-0.09855059534311295,
-0.00825510174036026,
-0.06660337001085281,
0.5634387731552124,
0.1162194311618805,
0.16239558160305023,
0.15930375456809998,
0.13682140409946442,
-0.25236591696739197,
-0.014546994119882584,
0.4957686960697174,
-0.16906224191188812,
-0.158083975315094,
-0.3775423467159271,
-0.010682962834835052,
0.49602755904197693,
-0.010122902691364288,
-0.050585754215717316,
-0.3411121368408203,
-0.43585866689682007,
-0.05281927436590195,
-0.1613597571849823,
0.20850607752799988,
0.3000749945640564,
-0.308833509683609,
0.36778512597084045,
-0.34516817331314087,
-0.16998523473739624,
-0.07537277042865753,
0.08535408973693848,
-0.06567662209272385,
0.35800451040267944,
0.14319130778312683,
0.1500324010848999,
-0.033011388033628464,
-0.26985102891921997,
-0.24665245413780212,
-0.28598859906196594,
-0.2851122319698334,
0.1320004016160965,
-0.1658809632062912,
-0.15979735553264618,
0.24964889883995056,
0.3785310685634613,
0.24191007018089294,
0.29131197929382324,
-0.5035303831100464,
0.06030231714248657,
-0.21706348657608032,
-0.04339507967233658,
0.2852765619754791,
0.056879956275224686,
-0.023344218730926514,
0.1630900800228119,
0.47084033489227295,
0.4824884235858917,
0.19592465460300446,
0.03790261968970299,
0.022440481930971146,
0.04341837018728256,
-0.026384994387626648,
0.05899889022111893,
0.3890641927719116,
-0.4395672380924225,
-0.3730817437171936,
0.024060141295194626,
-0.17780587077140808,
0.10459476709365845,
0.12995746731758118,
0.5462890267372131,
-0.11972589045763016,
-0.14243152737617493,
-0.10674992948770523,
0.15288114547729492,
-0.21953430771827698,
-0.41295602917671204,
-0.1327982395887375,
-0.17960530519485474,
0.027462858706712723,
0.15213589370250702,
-0.034061968326568604,
-0.19437190890312195,
0.19683127105236053,
-0.2965851426124573,
-0.14699536561965942,
0.00985473021864891,
-0.3703364133834839,
-0.024973930791020393,
-0.055176444351673126,
0.26649320125579834,
0.2125111222267151,
0.07207421213388443,
0.032952480018138885,
-0.2341187596321106,
-0.057217784225940704,
-0.10119723528623581,
-0.12842196226119995,
-0.6543935537338257,
0.09142956882715225,
0.10127200931310654,
-0.5258934497833252,
-0.027123935520648956,
-0.18083980679512024,
0.04340995103120804,
-0.1741904616355896,
-0.17587117850780487,
-0.02401738613843918,
0.1301347017288208,
-0.1659582555294037,
-0.008232388645410538,
0.20924094319343567,
0.6641116738319397,
0.06569167971611023,
-0.2337666004896164,
-0.15413837134838104,
-0.32532963156700134,
0.060730185359716415,
0.30886316299438477,
-0.1728573888540268,
0.39849424362182617,
-0.28452029824256897,
0.5807569622993469,
0.0007899776101112366,
-0.46642938256263733,
-0.7262559533119202,
0.34982067346572876,
-0.08260533958673477,
0.27460458874702454,
0.10424000024795532,
0.04835522547364235,
0.29351502656936646,
-0.04868755489587784,
0.21135535836219788,
0.0848471149802208,
0.08597440272569656,
-0.12034117430448532,
-0.13580262660980225,
-0.2515827715396881,
-0.01366513967514038,
0.14004923403263092,
0.0974314957857132,
0.3722023069858551,
0.35176917910575867,
0.33165454864501953,
0.6285653710365295,
0.020646076649427414,
-0.03697287291288376,
0.27456212043762207,
0.5249729156494141,
-0.048633381724357605,
-0.19210834801197052,
-0.17666202783584595,
-0.28906044363975525,
0.25386881828308105,
-0.10740882903337479,
0.27406609058380127,
-0.3012474775314331,
-0.12781848013401031,
-0.43559351563453674,
0.06687790155410767,
-0.2966434955596924,
0.02236691489815712,
0.007067471742630005,
-0.15515488386154175,
0.12587420642375946,
0.009479343891143799,
0.0510609932243824,
0.6214255094528198,
-0.18566198647022247,
0.21813571453094482,
-0.30080467462539673,
0.1929173767566681,
-0.00566880963742733,
-0.16078965365886688,
0.159939244389534,
0.13451768457889557,
0.5338269472122192,
-0.026586612686514854,
-0.08566408604383469,
0.4216221272945404,
-0.17149576544761658,
0.09196723252534866,
-0.3337695002555847,
0.2368689626455307,
0.34589552879333496,
-0.16118735074996948,
-0.17515377700328827,
0.09867243468761444,
0.2143830955028534,
0.14856231212615967,
-0.05771345645189285,
0.21814101934432983,
0.26569315791130066,
0.03317531198263168,
-0.061979446560144424,
0.2326194941997528,
0.29440104961395264,
0.0027869343757629395,
0.001943768933415413,
0.08097320795059204,
0.24295413494110107,
0.11289060115814209,
-0.06539678573608398,
-0.025341404601931572,
0.044316500425338745,
0.03283924609422684,
0.36926183104515076,
-0.22003167867660522,
0.2944107949733734,
0.047858141362667084,
-0.008278146386146545,
-0.008479375392198563,
0.3803422749042511,
0.3283657133579254,
0.3256434500217438,
0.09218425303697586,
-0.12036038935184479,
0.2395835965871811,
-0.025139596313238144,
-0.17344513535499573,
0.3853994607925415,
-0.017228752374649048,
-0.22051535546779633,
0.1595335751771927,
-0.13404731452465057,
-0.19883576035499573,
-0.16763955354690552,
-0.430720716714859,
-0.03625832870602608,
0.3685012459754944,
-0.5825729370117188,
-0.14441247284412384,
-0.2938927412033081,
-0.17056873440742493,
0.07233545184135437,
-0.11394937336444855,
-0.39725980162620544,
-0.19774754345417023,
0.019626159220933914,
0.5626663565635681,
-0.10103960335254669,
0.11861471831798553,
-0.0804329514503479,
0.011486619710922241,
-0.06237258017063141,
0.1946731060743332,
-0.15936337411403656,
0.09921366721391678,
-0.3196219503879547,
-0.05827996879816055,
0.30334901809692383,
-0.12355758994817734,
0.04794817417860031,
-0.24125820398330688,
-0.18235789239406586,
-0.44112837314605713,
0.16949915885925293,
0.17057953774929047,
-0.17510293424129486,
0.40916988253593445,
0.13404494524002075,
0.3379442095756531,
0.19037842750549316,
0.10968571156263351,
0.2887127697467804,
0.2240857481956482,
-0.15708771347999573,
-0.04427899792790413,
-0.16566665470600128,
-0.022583169862627983,
-0.08744961023330688,
-0.09199101477861404,
-0.16295813024044037,
-0.4005160331726074,
0.270003080368042,
-0.3703627288341522,
0.16847524046897888,
0.42869263887405396,
0.06198596581816673,
0.08471184223890305,
-0.0908597856760025,
-0.1586759388446808,
-0.09859039634466171,
-0.324837327003479,
0.2998580038547516,
0.11364684998989105,
-0.33388400077819824,
-0.05695316940546036,
0.08599075675010681,
0.07909932732582092,
-0.29231613874435425,
-0.4365329146385193,
-0.14359864592552185,
-0.21422122418880463,
0.28033018112182617,
0.002529554069042206,
-0.14266856014728546,
0.23180067539215088,
-0.27322492003440857,
0.023147081956267357,
0.016965024173259735,
-0.21566137671470642,
0.06707640737295151,
0.010475758463144302,
0.34784746170043945,
-0.07651261240243912,
0.3513559103012085,
0.026131000369787216,
0.3497920632362366,
0.1984328329563141,
0.3158642053604126,
0.3852260112762451,
-0.0537278950214386,
0.2613976001739502,
0.10157164931297302,
-0.14808011054992676,
0.030921893194317818,
0.12697026133537292,
-0.13834263384342194,
0.1088121086359024,
0.12466003745794296,
0.07096966356039047,
-0.3170199692249298,
-0.5742520689964294,
-0.05743595212697983,
-0.30862197279930115,
-0.4599822163581848,
0.31301289796829224,
-0.07758254557847977,
0.3866526782512665,
0.44528403878211975,
0.10629989206790924,
-0.09869571030139923,
0.27731165289878845,
0.3887869715690613,
0.18977925181388855,
0.07632017135620117,
-0.17711757123470306,
-0.2719300389289856,
-0.37092405557632446,
0.22423046827316284,
0.07249286770820618,
0.24027742445468903,
-0.30152639746665955,
0.07766243070363998,
0.12134340405464172,
-0.04197007790207863,
0.3528980612754822,
-0.08038841187953949,
0.6159140467643738,
-0.23009908199310303,
0.2072397619485855,
-0.22240014374256134,
-0.15774400532245636,
0.01824897900223732,
-0.14138327538967133,
0.18066151440143585,
0.42769572138786316,
-0.5877944827079773,
0.01064341515302658,
-0.11366206407546997,
-0.2237597554922104,
-0.3114534616470337,
-0.09309940785169601,
-0.2576054334640503,
-0.45463627576828003,
-0.4896072745323181,
0.243319571018219,
0.15483486652374268,
0.2070297747850418,
0.06497631967067719,
-0.035026516765356064,
0.23928552865982056,
0.21879616379737854,
-0.03654728829860687,
0.08314217627048492,
0.1150161549448967,
0.0419987328350544,
0.34373003244400024,
0.24708731472492218,
0.3557637929916382,
0.17591406404972076,
0.6639748811721802,
0.5626795291900635,
-0.23023274540901184,
-0.004132553935050964,
0.11013337969779968,
-0.1410987675189972,
0.513609766960144,
0.06634396314620972,
0.07985943555831909,
0.7597638368606567,
0.2528668940067291,
-0.2730359733104706,
-0.0009987219236791134,
0.24077259004116058,
0.021896827965974808,
-0.15267017483711243,
-0.20899072289466858,
0.15896722674369812,
-0.3064987063407898,
-0.0991877019405365,
0.17857839167118073,
0.4193430542945862,
-0.020169615745544434,
0.13495884835720062,
-0.14134135842323303,
1.0886870622634888,
0.18313193321228027,
0.07597360014915466,
0.4339449405670166,
-0.47441208362579346,
0.12790343165397644,
-0.29606443643569946,
0.12735629081726074,
-0.038222312927246094,
0.04905683174729347,
-0.13310374319553375,
0.1196964681148529,
-0.15400218963623047,
0.040758803486824036,
0.03055277094244957,
0.32587987184524536,
-0.049213215708732605,
-0.10816079378128052,
0.06379219144582748,
0.13781221210956573,
-0.47471222281455994,
-0.1214355081319809,
-0.4635716378688812,
0.07836762815713882,
-0.10965976119041443,
0.5006362199783325,
-0.06702087819576263,
-0.3001038432121277,
-0.13213638961315155,
-0.2555207312107086,
-0.47574812173843384,
0.3380495309829712,
0.11440234631299973,
0.07898949086666107,
0.006290450692176819,
0.2686142325401306,
-0.11805252730846405,
-0.025672074407339096,
0.006503760814666748,
0.15345005691051483,
-0.5712550282478333,
0.23242178559303284,
-0.05614802986383438,
-0.022341912612318993,
0.12904201447963715,
-0.010354743339121342,
0.3320024013519287,
-0.1632925271987915,
-0.523980975151062,
-0.0455835685133934,
-0.0764230340719223,
-0.23811779916286469,
-0.13334518671035767,
-0.13985764980316162,
0.2425747960805893,
-0.19030383229255676,
0.008708334527909756,
0.04715932160615921,
0.15088032186031342,
-0.279653936624527,
0.033075928688049316,
0.08567274361848831,
-0.09919359534978867,
-0.12250549346208572,
0.2510599195957184,
-0.35412099957466125,
-0.09665106236934662,
0.43604427576065063,
-0.19344860315322876,
0.1573091596364975,
0.5104479789733887,
-0.13162864744663239,
-0.15768688917160034,
-0.1884063184261322,
0.08744839578866959,
0.08802597969770432,
-0.5327842831611633,
-0.01592082530260086,
-0.019625721499323845,
0.12189419567584991,
-0.4492676854133606,
0.1379198133945465,
0.3415900468826294,
-0.10507471114397049,
-0.022861110046505928,
-0.3368983864784241,
-0.19848117232322693,
0.08595194667577744,
-0.18657775223255157,
-0.018307548016309738,
-0.1775950789451599,
0.2768980860710144,
0.1304045021533966,
-0.2580571472644806,
-0.2125309705734253,
-0.056032031774520874,
-0.33336952328681946,
-0.1899869441986084,
0.09729383140802383,
0.1216731071472168,
0.047568053007125854,
-0.22524526715278625,
-0.0017256643623113632,
0.1827600598335266,
-0.29389214515686035,
-0.022611312568187714,
-0.1665501594543457,
0.18988411128520966,
0.20727220177650452,
-0.33079493045806885,
-0.00749194948002696,
-0.20830214023590088,
-0.008118759840726852,
0.07644880563020706,
0.25873517990112305,
0.5852011442184448,
0.23585109412670135,
-0.3304755985736847,
0.24516215920448303,
0.27262264490127563,
-0.6120886206626892,
0.2626723349094391,
0.04181540384888649,
0.14365504682064056,
-0.10843143612146378,
-0.0033817514777183533,
-0.1850135624408722,
-0.006830394268035889,
-0.17989042401313782,
-0.03943151235580444,
0.2479381263256073,
0.1488616168498993,
0.5709387063980103,
-0.1583217978477478,
0.027825791388750076,
0.3076391816139221,
0.2982943654060364,
-0.08276478946208954,
-0.0690290778875351,
-0.15114913880825043,
0.04427642002701759,
0.13644425570964813,
-0.24473965167999268,
0.05869165062904358,
-0.054177623242139816,
-0.0815078541636467,
-0.05168090760707855,
0.042843930423259735,
-0.0873284637928009,
0.05531482398509979,
0.040241822600364685,
0.06351123005151749,
0.30524933338165283,
0.5167136192321777,
-0.12145842611789703,
0.14543946087360382,
-0.19548599421977997,
0.13444022834300995,
0.37261322140693665,
-0.31480467319488525,
0.1470760554075241,
0.4698859453201294,
-0.2542368769645691,
0.07036688923835754,
-0.09700983017683029,
0.33710819482803345,
0.07004178315401077,
-0.33507096767425537,
-0.11779746413230896,
-0.18883010745048523,
-0.14840072393417358,
-0.21958300471305847,
-0.20054277777671814,
-0.015890561044216156,
-0.37732791900634766,
-0.10256144404411316,
-0.19541595876216888,
0.16841807961463928,
-0.2253764569759369,
0.08470921218395233,
0.04699719697237015,
-0.14846043288707733,
-0.16110169887542725,
0.06196652725338936,
0.12334240972995758,
-0.3837183713912964,
0.038051340728998184,
-0.09038048982620239,
-0.18629272282123566,
-0.11323665082454681,
-0.22034791111946106,
0.3356417417526245,
0.313892662525177,
-0.1976131945848465,
0.1447024792432785,
0.25750190019607544,
-0.2850315570831299,
0.4328995943069458,
0.5137104988098145,
0.5138188600540161,
0.10800723731517792,
0.29635754227638245,
0.22430077195167542,
0.211054727435112,
0.13111717998981476,
0.05836563557386398,
0.29181787371635437,
0.09802238643169403,
0.3544721305370331,
0.14918769896030426,
0.0761786550283432,
-0.0969734713435173,
0.025527169927954674,
-0.1734696477651596,
0.052902206778526306,
-0.047194723039865494,
0.6683246493339539,
-0.2581625282764435,
0.1219673678278923,
-0.2273695468902588,
-0.045058928430080414,
-0.26821234822273254,
0.14574046432971954,
0.21966224908828735,
-0.17659619450569153,
0.203208327293396,
-0.42767953872680664,
0.029849424958229065,
-0.2112298607826233,
0.24297617375850677,
0.4580622613430023,
-0.10234706848859787,
-0.22541405260562897,
0.0898049920797348,
-0.6377158164978027,
0.31430432200431824,
-0.09975476562976837,
-0.1257750540971756,
0.04813551530241966,
0.17482724785804749,
-0.1693083643913269,
0.06353741884231567,
0.12172652035951614,
0.12121713906526566,
-0.2511729598045349,
0.16666297614574432,
-0.058468736708164215,
-0.0380827896296978,
0.058093052357435226,
0.15651091933250427,
-0.11942855268716812,
-0.35113826394081116,
0.5051124095916748,
-0.17309977114200592,
-0.05530920624732971,
0.3530035614967346,
-0.06143415719270706,
0.0419141985476017,
-0.08998620510101318,
0.3109634518623352,
0.12650372087955475,
0.38722822070121765,
0.04210973531007767,
-0.1938995122909546,
-0.27328553795814514,
-0.15681976079940796,
-0.25461700558662415,
0.034733377397060394,
-0.09978318214416504,
0.30633029341697693,
0.10739315301179886,
-0.0842336118221283,
-0.21500751376152039,
0.4758686423301697,
0.030121996998786926,
-0.19139964878559113,
-0.24043932557106018,
0.04048275947570801,
-0.255576491355896,
-0.009742348454892635,
-0.07693075388669968,
-0.20573082566261292,
0.10219856351613998,
0.11405487358570099,
-0.32857176661491394,
-0.43150094151496887,
0.8132106065750122,
-0.3085571825504303,
-0.006655000150203705,
-0.22305046021938324,
0.49516093730926514,
0.23796802759170532,
-0.3107753396034241,
-0.3016999065876007,
0.05847824364900589,
0.2036445289850235,
-0.05379493534564972,
-0.15692007541656494,
-0.06840501725673676,
-0.3126010596752167,
-0.10619807243347168,
-0.025066496804356575,
0.07611555606126785,
-0.08417990803718567,
-0.542725145816803,
0.6180151700973511,
-0.11091780662536621
] |
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.29108357429504395,
-0.24233025312423706,
0.11377005279064178,
0.28113341331481934,
0.43997102975845337,
0.13672280311584473,
0.2831527292728424,
0.18023104965686798,
0.020096030086278915,
0.15855523943901062,
-0.41839635372161865,
-0.16160741448402405,
0.038213398307561874,
0.06896905601024628,
0.0953802764415741,
0.03237363323569298,
0.1215248554944992,
-0.07715122401714325,
0.033498961478471756,
-0.08627502620220184,
-0.21023830771446228,
0.02577008493244648,
-0.22894583642482758,
0.4497007727622986,
-0.27465665340423584,
-0.016474751755595207,
-0.03204062208533287,
0.5527815222740173,
-0.1702624410390854,
-0.30443716049194336,
0.36551931500434875,
0.05719955265522003,
0.07487571239471436,
0.20205827057361603,
-0.00011953379726037383,
0.11945749819278717,
0.40153950452804565,
-0.06258073449134827,
-0.23526781797409058,
-0.24917326867580414,
-0.4586625397205353,
-0.1034323126077652,
-0.3297160863876343,
-0.1440565437078476,
-0.0020428895950317383,
-0.2154846489429474,
0.07323338836431503,
0.10686734318733215,
0.33699411153793335,
0.23172760009765625,
0.11226668953895569,
0.2569122016429901,
0.35404402017593384,
-0.15269137918949127,
-0.09855059534311295,
-0.00825510174036026,
-0.06660337001085281,
0.5634387731552124,
0.1162194311618805,
0.16239558160305023,
0.15930375456809998,
0.13682140409946442,
-0.25236591696739197,
-0.014546994119882584,
0.4957686960697174,
-0.16906224191188812,
-0.158083975315094,
-0.3775423467159271,
-0.010682962834835052,
0.49602755904197693,
-0.010122902691364288,
-0.050585754215717316,
-0.3411121368408203,
-0.43585866689682007,
-0.05281927436590195,
-0.1613597571849823,
0.20850607752799988,
0.3000749945640564,
-0.308833509683609,
0.36778512597084045,
-0.34516817331314087,
-0.16998523473739624,
-0.07537277042865753,
0.08535408973693848,
-0.06567662209272385,
0.35800451040267944,
0.14319130778312683,
0.1500324010848999,
-0.033011388033628464,
-0.26985102891921997,
-0.24665245413780212,
-0.28598859906196594,
-0.2851122319698334,
0.1320004016160965,
-0.1658809632062912,
-0.15979735553264618,
0.24964889883995056,
0.3785310685634613,
0.24191007018089294,
0.29131197929382324,
-0.5035303831100464,
0.06030231714248657,
-0.21706348657608032,
-0.04339507967233658,
0.2852765619754791,
0.056879956275224686,
-0.023344218730926514,
0.1630900800228119,
0.47084033489227295,
0.4824884235858917,
0.19592465460300446,
0.03790261968970299,
0.022440481930971146,
0.04341837018728256,
-0.026384994387626648,
0.05899889022111893,
0.3890641927719116,
-0.4395672380924225,
-0.3730817437171936,
0.024060141295194626,
-0.17780587077140808,
0.10459476709365845,
0.12995746731758118,
0.5462890267372131,
-0.11972589045763016,
-0.14243152737617493,
-0.10674992948770523,
0.15288114547729492,
-0.21953430771827698,
-0.41295602917671204,
-0.1327982395887375,
-0.17960530519485474,
0.027462858706712723,
0.15213589370250702,
-0.034061968326568604,
-0.19437190890312195,
0.19683127105236053,
-0.2965851426124573,
-0.14699536561965942,
0.00985473021864891,
-0.3703364133834839,
-0.024973930791020393,
-0.055176444351673126,
0.26649320125579834,
0.2125111222267151,
0.07207421213388443,
0.032952480018138885,
-0.2341187596321106,
-0.057217784225940704,
-0.10119723528623581,
-0.12842196226119995,
-0.6543935537338257,
0.09142956882715225,
0.10127200931310654,
-0.5258934497833252,
-0.027123935520648956,
-0.18083980679512024,
0.04340995103120804,
-0.1741904616355896,
-0.17587117850780487,
-0.02401738613843918,
0.1301347017288208,
-0.1659582555294037,
-0.008232388645410538,
0.20924094319343567,
0.6641116738319397,
0.06569167971611023,
-0.2337666004896164,
-0.15413837134838104,
-0.32532963156700134,
0.060730185359716415,
0.30886316299438477,
-0.1728573888540268,
0.39849424362182617,
-0.28452029824256897,
0.5807569622993469,
0.0007899776101112366,
-0.46642938256263733,
-0.7262559533119202,
0.34982067346572876,
-0.08260533958673477,
0.27460458874702454,
0.10424000024795532,
0.04835522547364235,
0.29351502656936646,
-0.04868755489587784,
0.21135535836219788,
0.0848471149802208,
0.08597440272569656,
-0.12034117430448532,
-0.13580262660980225,
-0.2515827715396881,
-0.01366513967514038,
0.14004923403263092,
0.0974314957857132,
0.3722023069858551,
0.35176917910575867,
0.33165454864501953,
0.6285653710365295,
0.020646076649427414,
-0.03697287291288376,
0.27456212043762207,
0.5249729156494141,
-0.048633381724357605,
-0.19210834801197052,
-0.17666202783584595,
-0.28906044363975525,
0.25386881828308105,
-0.10740882903337479,
0.27406609058380127,
-0.3012474775314331,
-0.12781848013401031,
-0.43559351563453674,
0.06687790155410767,
-0.2966434955596924,
0.02236691489815712,
0.007067471742630005,
-0.15515488386154175,
0.12587420642375946,
0.009479343891143799,
0.0510609932243824,
0.6214255094528198,
-0.18566198647022247,
0.21813571453094482,
-0.30080467462539673,
0.1929173767566681,
-0.00566880963742733,
-0.16078965365886688,
0.159939244389534,
0.13451768457889557,
0.5338269472122192,
-0.026586612686514854,
-0.08566408604383469,
0.4216221272945404,
-0.17149576544761658,
0.09196723252534866,
-0.3337695002555847,
0.2368689626455307,
0.34589552879333496,
-0.16118735074996948,
-0.17515377700328827,
0.09867243468761444,
0.2143830955028534,
0.14856231212615967,
-0.05771345645189285,
0.21814101934432983,
0.26569315791130066,
0.03317531198263168,
-0.061979446560144424,
0.2326194941997528,
0.29440104961395264,
0.0027869343757629395,
0.001943768933415413,
0.08097320795059204,
0.24295413494110107,
0.11289060115814209,
-0.06539678573608398,
-0.025341404601931572,
0.044316500425338745,
0.03283924609422684,
0.36926183104515076,
-0.22003167867660522,
0.2944107949733734,
0.047858141362667084,
-0.008278146386146545,
-0.008479375392198563,
0.3803422749042511,
0.3283657133579254,
0.3256434500217438,
0.09218425303697586,
-0.12036038935184479,
0.2395835965871811,
-0.025139596313238144,
-0.17344513535499573,
0.3853994607925415,
-0.017228752374649048,
-0.22051535546779633,
0.1595335751771927,
-0.13404731452465057,
-0.19883576035499573,
-0.16763955354690552,
-0.430720716714859,
-0.03625832870602608,
0.3685012459754944,
-0.5825729370117188,
-0.14441247284412384,
-0.2938927412033081,
-0.17056873440742493,
0.07233545184135437,
-0.11394937336444855,
-0.39725980162620544,
-0.19774754345417023,
0.019626159220933914,
0.5626663565635681,
-0.10103960335254669,
0.11861471831798553,
-0.0804329514503479,
0.011486619710922241,
-0.06237258017063141,
0.1946731060743332,
-0.15936337411403656,
0.09921366721391678,
-0.3196219503879547,
-0.05827996879816055,
0.30334901809692383,
-0.12355758994817734,
0.04794817417860031,
-0.24125820398330688,
-0.18235789239406586,
-0.44112837314605713,
0.16949915885925293,
0.17057953774929047,
-0.17510293424129486,
0.40916988253593445,
0.13404494524002075,
0.3379442095756531,
0.19037842750549316,
0.10968571156263351,
0.2887127697467804,
0.2240857481956482,
-0.15708771347999573,
-0.04427899792790413,
-0.16566665470600128,
-0.022583169862627983,
-0.08744961023330688,
-0.09199101477861404,
-0.16295813024044037,
-0.4005160331726074,
0.270003080368042,
-0.3703627288341522,
0.16847524046897888,
0.42869263887405396,
0.06198596581816673,
0.08471184223890305,
-0.0908597856760025,
-0.1586759388446808,
-0.09859039634466171,
-0.324837327003479,
0.2998580038547516,
0.11364684998989105,
-0.33388400077819824,
-0.05695316940546036,
0.08599075675010681,
0.07909932732582092,
-0.29231613874435425,
-0.4365329146385193,
-0.14359864592552185,
-0.21422122418880463,
0.28033018112182617,
0.002529554069042206,
-0.14266856014728546,
0.23180067539215088,
-0.27322492003440857,
0.023147081956267357,
0.016965024173259735,
-0.21566137671470642,
0.06707640737295151,
0.010475758463144302,
0.34784746170043945,
-0.07651261240243912,
0.3513559103012085,
0.026131000369787216,
0.3497920632362366,
0.1984328329563141,
0.3158642053604126,
0.3852260112762451,
-0.0537278950214386,
0.2613976001739502,
0.10157164931297302,
-0.14808011054992676,
0.030921893194317818,
0.12697026133537292,
-0.13834263384342194,
0.1088121086359024,
0.12466003745794296,
0.07096966356039047,
-0.3170199692249298,
-0.5742520689964294,
-0.05743595212697983,
-0.30862197279930115,
-0.4599822163581848,
0.31301289796829224,
-0.07758254557847977,
0.3866526782512665,
0.44528403878211975,
0.10629989206790924,
-0.09869571030139923,
0.27731165289878845,
0.3887869715690613,
0.18977925181388855,
0.07632017135620117,
-0.17711757123470306,
-0.2719300389289856,
-0.37092405557632446,
0.22423046827316284,
0.07249286770820618,
0.24027742445468903,
-0.30152639746665955,
0.07766243070363998,
0.12134340405464172,
-0.04197007790207863,
0.3528980612754822,
-0.08038841187953949,
0.6159140467643738,
-0.23009908199310303,
0.2072397619485855,
-0.22240014374256134,
-0.15774400532245636,
0.01824897900223732,
-0.14138327538967133,
0.18066151440143585,
0.42769572138786316,
-0.5877944827079773,
0.01064341515302658,
-0.11366206407546997,
-0.2237597554922104,
-0.3114534616470337,
-0.09309940785169601,
-0.2576054334640503,
-0.45463627576828003,
-0.4896072745323181,
0.243319571018219,
0.15483486652374268,
0.2070297747850418,
0.06497631967067719,
-0.035026516765356064,
0.23928552865982056,
0.21879616379737854,
-0.03654728829860687,
0.08314217627048492,
0.1150161549448967,
0.0419987328350544,
0.34373003244400024,
0.24708731472492218,
0.3557637929916382,
0.17591406404972076,
0.6639748811721802,
0.5626795291900635,
-0.23023274540901184,
-0.004132553935050964,
0.11013337969779968,
-0.1410987675189972,
0.513609766960144,
0.06634396314620972,
0.07985943555831909,
0.7597638368606567,
0.2528668940067291,
-0.2730359733104706,
-0.0009987219236791134,
0.24077259004116058,
0.021896827965974808,
-0.15267017483711243,
-0.20899072289466858,
0.15896722674369812,
-0.3064987063407898,
-0.0991877019405365,
0.17857839167118073,
0.4193430542945862,
-0.020169615745544434,
0.13495884835720062,
-0.14134135842323303,
1.0886870622634888,
0.18313193321228027,
0.07597360014915466,
0.4339449405670166,
-0.47441208362579346,
0.12790343165397644,
-0.29606443643569946,
0.12735629081726074,
-0.038222312927246094,
0.04905683174729347,
-0.13310374319553375,
0.1196964681148529,
-0.15400218963623047,
0.040758803486824036,
0.03055277094244957,
0.32587987184524536,
-0.049213215708732605,
-0.10816079378128052,
0.06379219144582748,
0.13781221210956573,
-0.47471222281455994,
-0.1214355081319809,
-0.4635716378688812,
0.07836762815713882,
-0.10965976119041443,
0.5006362199783325,
-0.06702087819576263,
-0.3001038432121277,
-0.13213638961315155,
-0.2555207312107086,
-0.47574812173843384,
0.3380495309829712,
0.11440234631299973,
0.07898949086666107,
0.006290450692176819,
0.2686142325401306,
-0.11805252730846405,
-0.025672074407339096,
0.006503760814666748,
0.15345005691051483,
-0.5712550282478333,
0.23242178559303284,
-0.05614802986383438,
-0.022341912612318993,
0.12904201447963715,
-0.010354743339121342,
0.3320024013519287,
-0.1632925271987915,
-0.523980975151062,
-0.0455835685133934,
-0.0764230340719223,
-0.23811779916286469,
-0.13334518671035767,
-0.13985764980316162,
0.2425747960805893,
-0.19030383229255676,
0.008708334527909756,
0.04715932160615921,
0.15088032186031342,
-0.279653936624527,
0.033075928688049316,
0.08567274361848831,
-0.09919359534978867,
-0.12250549346208572,
0.2510599195957184,
-0.35412099957466125,
-0.09665106236934662,
0.43604427576065063,
-0.19344860315322876,
0.1573091596364975,
0.5104479789733887,
-0.13162864744663239,
-0.15768688917160034,
-0.1884063184261322,
0.08744839578866959,
0.08802597969770432,
-0.5327842831611633,
-0.01592082530260086,
-0.019625721499323845,
0.12189419567584991,
-0.4492676854133606,
0.1379198133945465,
0.3415900468826294,
-0.10507471114397049,
-0.022861110046505928,
-0.3368983864784241,
-0.19848117232322693,
0.08595194667577744,
-0.18657775223255157,
-0.018307548016309738,
-0.1775950789451599,
0.2768980860710144,
0.1304045021533966,
-0.2580571472644806,
-0.2125309705734253,
-0.056032031774520874,
-0.33336952328681946,
-0.1899869441986084,
0.09729383140802383,
0.1216731071472168,
0.047568053007125854,
-0.22524526715278625,
-0.0017256643623113632,
0.1827600598335266,
-0.29389214515686035,
-0.022611312568187714,
-0.1665501594543457,
0.18988411128520966,
0.20727220177650452,
-0.33079493045806885,
-0.00749194948002696,
-0.20830214023590088,
-0.008118759840726852,
0.07644880563020706,
0.25873517990112305,
0.5852011442184448,
0.23585109412670135,
-0.3304755985736847,
0.24516215920448303,
0.27262264490127563,
-0.6120886206626892,
0.2626723349094391,
0.04181540384888649,
0.14365504682064056,
-0.10843143612146378,
-0.0033817514777183533,
-0.1850135624408722,
-0.006830394268035889,
-0.17989042401313782,
-0.03943151235580444,
0.2479381263256073,
0.1488616168498993,
0.5709387063980103,
-0.1583217978477478,
0.027825791388750076,
0.3076391816139221,
0.2982943654060364,
-0.08276478946208954,
-0.0690290778875351,
-0.15114913880825043,
0.04427642002701759,
0.13644425570964813,
-0.24473965167999268,
0.05869165062904358,
-0.054177623242139816,
-0.0815078541636467,
-0.05168090760707855,
0.042843930423259735,
-0.0873284637928009,
0.05531482398509979,
0.040241822600364685,
0.06351123005151749,
0.30524933338165283,
0.5167136192321777,
-0.12145842611789703,
0.14543946087360382,
-0.19548599421977997,
0.13444022834300995,
0.37261322140693665,
-0.31480467319488525,
0.1470760554075241,
0.4698859453201294,
-0.2542368769645691,
0.07036688923835754,
-0.09700983017683029,
0.33710819482803345,
0.07004178315401077,
-0.33507096767425537,
-0.11779746413230896,
-0.18883010745048523,
-0.14840072393417358,
-0.21958300471305847,
-0.20054277777671814,
-0.015890561044216156,
-0.37732791900634766,
-0.10256144404411316,
-0.19541595876216888,
0.16841807961463928,
-0.2253764569759369,
0.08470921218395233,
0.04699719697237015,
-0.14846043288707733,
-0.16110169887542725,
0.06196652725338936,
0.12334240972995758,
-0.3837183713912964,
0.038051340728998184,
-0.09038048982620239,
-0.18629272282123566,
-0.11323665082454681,
-0.22034791111946106,
0.3356417417526245,
0.313892662525177,
-0.1976131945848465,
0.1447024792432785,
0.25750190019607544,
-0.2850315570831299,
0.4328995943069458,
0.5137104988098145,
0.5138188600540161,
0.10800723731517792,
0.29635754227638245,
0.22430077195167542,
0.211054727435112,
0.13111717998981476,
0.05836563557386398,
0.29181787371635437,
0.09802238643169403,
0.3544721305370331,
0.14918769896030426,
0.0761786550283432,
-0.0969734713435173,
0.025527169927954674,
-0.1734696477651596,
0.052902206778526306,
-0.047194723039865494,
0.6683246493339539,
-0.2581625282764435,
0.1219673678278923,
-0.2273695468902588,
-0.045058928430080414,
-0.26821234822273254,
0.14574046432971954,
0.21966224908828735,
-0.17659619450569153,
0.203208327293396,
-0.42767953872680664,
0.029849424958229065,
-0.2112298607826233,
0.24297617375850677,
0.4580622613430023,
-0.10234706848859787,
-0.22541405260562897,
0.0898049920797348,
-0.6377158164978027,
0.31430432200431824,
-0.09975476562976837,
-0.1257750540971756,
0.04813551530241966,
0.17482724785804749,
-0.1693083643913269,
0.06353741884231567,
0.12172652035951614,
0.12121713906526566,
-0.2511729598045349,
0.16666297614574432,
-0.058468736708164215,
-0.0380827896296978,
0.058093052357435226,
0.15651091933250427,
-0.11942855268716812,
-0.35113826394081116,
0.5051124095916748,
-0.17309977114200592,
-0.05530920624732971,
0.3530035614967346,
-0.06143415719270706,
0.0419141985476017,
-0.08998620510101318,
0.3109634518623352,
0.12650372087955475,
0.38722822070121765,
0.04210973531007767,
-0.1938995122909546,
-0.27328553795814514,
-0.15681976079940796,
-0.25461700558662415,
0.034733377397060394,
-0.09978318214416504,
0.30633029341697693,
0.10739315301179886,
-0.0842336118221283,
-0.21500751376152039,
0.4758686423301697,
0.030121996998786926,
-0.19139964878559113,
-0.24043932557106018,
0.04048275947570801,
-0.255576491355896,
-0.009742348454892635,
-0.07693075388669968,
-0.20573082566261292,
0.10219856351613998,
0.11405487358570099,
-0.32857176661491394,
-0.43150094151496887,
0.8132106065750122,
-0.3085571825504303,
-0.006655000150203705,
-0.22305046021938324,
0.49516093730926514,
0.23796802759170532,
-0.3107753396034241,
-0.3016999065876007,
0.05847824364900589,
0.2036445289850235,
-0.05379493534564972,
-0.15692007541656494,
-0.06840501725673676,
-0.3126010596752167,
-0.10619807243347168,
-0.025066496804356575,
0.07611555606126785,
-0.08417990803718567,
-0.542725145816803,
0.6180151700973511,
-0.11091780662536621
] |
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.29108357429504395,
-0.24233025312423706,
0.11377005279064178,
0.28113341331481934,
0.43997102975845337,
0.13672280311584473,
0.2831527292728424,
0.18023104965686798,
0.020096030086278915,
0.15855523943901062,
-0.41839635372161865,
-0.16160741448402405,
0.038213398307561874,
0.06896905601024628,
0.0953802764415741,
0.03237363323569298,
0.1215248554944992,
-0.07715122401714325,
0.033498961478471756,
-0.08627502620220184,
-0.21023830771446228,
0.02577008493244648,
-0.22894583642482758,
0.4497007727622986,
-0.27465665340423584,
-0.016474751755595207,
-0.03204062208533287,
0.5527815222740173,
-0.1702624410390854,
-0.30443716049194336,
0.36551931500434875,
0.05719955265522003,
0.07487571239471436,
0.20205827057361603,
-0.00011953379726037383,
0.11945749819278717,
0.40153950452804565,
-0.06258073449134827,
-0.23526781797409058,
-0.24917326867580414,
-0.4586625397205353,
-0.1034323126077652,
-0.3297160863876343,
-0.1440565437078476,
-0.0020428895950317383,
-0.2154846489429474,
0.07323338836431503,
0.10686734318733215,
0.33699411153793335,
0.23172760009765625,
0.11226668953895569,
0.2569122016429901,
0.35404402017593384,
-0.15269137918949127,
-0.09855059534311295,
-0.00825510174036026,
-0.06660337001085281,
0.5634387731552124,
0.1162194311618805,
0.16239558160305023,
0.15930375456809998,
0.13682140409946442,
-0.25236591696739197,
-0.014546994119882584,
0.4957686960697174,
-0.16906224191188812,
-0.158083975315094,
-0.3775423467159271,
-0.010682962834835052,
0.49602755904197693,
-0.010122902691364288,
-0.050585754215717316,
-0.3411121368408203,
-0.43585866689682007,
-0.05281927436590195,
-0.1613597571849823,
0.20850607752799988,
0.3000749945640564,
-0.308833509683609,
0.36778512597084045,
-0.34516817331314087,
-0.16998523473739624,
-0.07537277042865753,
0.08535408973693848,
-0.06567662209272385,
0.35800451040267944,
0.14319130778312683,
0.1500324010848999,
-0.033011388033628464,
-0.26985102891921997,
-0.24665245413780212,
-0.28598859906196594,
-0.2851122319698334,
0.1320004016160965,
-0.1658809632062912,
-0.15979735553264618,
0.24964889883995056,
0.3785310685634613,
0.24191007018089294,
0.29131197929382324,
-0.5035303831100464,
0.06030231714248657,
-0.21706348657608032,
-0.04339507967233658,
0.2852765619754791,
0.056879956275224686,
-0.023344218730926514,
0.1630900800228119,
0.47084033489227295,
0.4824884235858917,
0.19592465460300446,
0.03790261968970299,
0.022440481930971146,
0.04341837018728256,
-0.026384994387626648,
0.05899889022111893,
0.3890641927719116,
-0.4395672380924225,
-0.3730817437171936,
0.024060141295194626,
-0.17780587077140808,
0.10459476709365845,
0.12995746731758118,
0.5462890267372131,
-0.11972589045763016,
-0.14243152737617493,
-0.10674992948770523,
0.15288114547729492,
-0.21953430771827698,
-0.41295602917671204,
-0.1327982395887375,
-0.17960530519485474,
0.027462858706712723,
0.15213589370250702,
-0.034061968326568604,
-0.19437190890312195,
0.19683127105236053,
-0.2965851426124573,
-0.14699536561965942,
0.00985473021864891,
-0.3703364133834839,
-0.024973930791020393,
-0.055176444351673126,
0.26649320125579834,
0.2125111222267151,
0.07207421213388443,
0.032952480018138885,
-0.2341187596321106,
-0.057217784225940704,
-0.10119723528623581,
-0.12842196226119995,
-0.6543935537338257,
0.09142956882715225,
0.10127200931310654,
-0.5258934497833252,
-0.027123935520648956,
-0.18083980679512024,
0.04340995103120804,
-0.1741904616355896,
-0.17587117850780487,
-0.02401738613843918,
0.1301347017288208,
-0.1659582555294037,
-0.008232388645410538,
0.20924094319343567,
0.6641116738319397,
0.06569167971611023,
-0.2337666004896164,
-0.15413837134838104,
-0.32532963156700134,
0.060730185359716415,
0.30886316299438477,
-0.1728573888540268,
0.39849424362182617,
-0.28452029824256897,
0.5807569622993469,
0.0007899776101112366,
-0.46642938256263733,
-0.7262559533119202,
0.34982067346572876,
-0.08260533958673477,
0.27460458874702454,
0.10424000024795532,
0.04835522547364235,
0.29351502656936646,
-0.04868755489587784,
0.21135535836219788,
0.0848471149802208,
0.08597440272569656,
-0.12034117430448532,
-0.13580262660980225,
-0.2515827715396881,
-0.01366513967514038,
0.14004923403263092,
0.0974314957857132,
0.3722023069858551,
0.35176917910575867,
0.33165454864501953,
0.6285653710365295,
0.020646076649427414,
-0.03697287291288376,
0.27456212043762207,
0.5249729156494141,
-0.048633381724357605,
-0.19210834801197052,
-0.17666202783584595,
-0.28906044363975525,
0.25386881828308105,
-0.10740882903337479,
0.27406609058380127,
-0.3012474775314331,
-0.12781848013401031,
-0.43559351563453674,
0.06687790155410767,
-0.2966434955596924,
0.02236691489815712,
0.007067471742630005,
-0.15515488386154175,
0.12587420642375946,
0.009479343891143799,
0.0510609932243824,
0.6214255094528198,
-0.18566198647022247,
0.21813571453094482,
-0.30080467462539673,
0.1929173767566681,
-0.00566880963742733,
-0.16078965365886688,
0.159939244389534,
0.13451768457889557,
0.5338269472122192,
-0.026586612686514854,
-0.08566408604383469,
0.4216221272945404,
-0.17149576544761658,
0.09196723252534866,
-0.3337695002555847,
0.2368689626455307,
0.34589552879333496,
-0.16118735074996948,
-0.17515377700328827,
0.09867243468761444,
0.2143830955028534,
0.14856231212615967,
-0.05771345645189285,
0.21814101934432983,
0.26569315791130066,
0.03317531198263168,
-0.061979446560144424,
0.2326194941997528,
0.29440104961395264,
0.0027869343757629395,
0.001943768933415413,
0.08097320795059204,
0.24295413494110107,
0.11289060115814209,
-0.06539678573608398,
-0.025341404601931572,
0.044316500425338745,
0.03283924609422684,
0.36926183104515076,
-0.22003167867660522,
0.2944107949733734,
0.047858141362667084,
-0.008278146386146545,
-0.008479375392198563,
0.3803422749042511,
0.3283657133579254,
0.3256434500217438,
0.09218425303697586,
-0.12036038935184479,
0.2395835965871811,
-0.025139596313238144,
-0.17344513535499573,
0.3853994607925415,
-0.017228752374649048,
-0.22051535546779633,
0.1595335751771927,
-0.13404731452465057,
-0.19883576035499573,
-0.16763955354690552,
-0.430720716714859,
-0.03625832870602608,
0.3685012459754944,
-0.5825729370117188,
-0.14441247284412384,
-0.2938927412033081,
-0.17056873440742493,
0.07233545184135437,
-0.11394937336444855,
-0.39725980162620544,
-0.19774754345417023,
0.019626159220933914,
0.5626663565635681,
-0.10103960335254669,
0.11861471831798553,
-0.0804329514503479,
0.011486619710922241,
-0.06237258017063141,
0.1946731060743332,
-0.15936337411403656,
0.09921366721391678,
-0.3196219503879547,
-0.05827996879816055,
0.30334901809692383,
-0.12355758994817734,
0.04794817417860031,
-0.24125820398330688,
-0.18235789239406586,
-0.44112837314605713,
0.16949915885925293,
0.17057953774929047,
-0.17510293424129486,
0.40916988253593445,
0.13404494524002075,
0.3379442095756531,
0.19037842750549316,
0.10968571156263351,
0.2887127697467804,
0.2240857481956482,
-0.15708771347999573,
-0.04427899792790413,
-0.16566665470600128,
-0.022583169862627983,
-0.08744961023330688,
-0.09199101477861404,
-0.16295813024044037,
-0.4005160331726074,
0.270003080368042,
-0.3703627288341522,
0.16847524046897888,
0.42869263887405396,
0.06198596581816673,
0.08471184223890305,
-0.0908597856760025,
-0.1586759388446808,
-0.09859039634466171,
-0.324837327003479,
0.2998580038547516,
0.11364684998989105,
-0.33388400077819824,
-0.05695316940546036,
0.08599075675010681,
0.07909932732582092,
-0.29231613874435425,
-0.4365329146385193,
-0.14359864592552185,
-0.21422122418880463,
0.28033018112182617,
0.002529554069042206,
-0.14266856014728546,
0.23180067539215088,
-0.27322492003440857,
0.023147081956267357,
0.016965024173259735,
-0.21566137671470642,
0.06707640737295151,
0.010475758463144302,
0.34784746170043945,
-0.07651261240243912,
0.3513559103012085,
0.026131000369787216,
0.3497920632362366,
0.1984328329563141,
0.3158642053604126,
0.3852260112762451,
-0.0537278950214386,
0.2613976001739502,
0.10157164931297302,
-0.14808011054992676,
0.030921893194317818,
0.12697026133537292,
-0.13834263384342194,
0.1088121086359024,
0.12466003745794296,
0.07096966356039047,
-0.3170199692249298,
-0.5742520689964294,
-0.05743595212697983,
-0.30862197279930115,
-0.4599822163581848,
0.31301289796829224,
-0.07758254557847977,
0.3866526782512665,
0.44528403878211975,
0.10629989206790924,
-0.09869571030139923,
0.27731165289878845,
0.3887869715690613,
0.18977925181388855,
0.07632017135620117,
-0.17711757123470306,
-0.2719300389289856,
-0.37092405557632446,
0.22423046827316284,
0.07249286770820618,
0.24027742445468903,
-0.30152639746665955,
0.07766243070363998,
0.12134340405464172,
-0.04197007790207863,
0.3528980612754822,
-0.08038841187953949,
0.6159140467643738,
-0.23009908199310303,
0.2072397619485855,
-0.22240014374256134,
-0.15774400532245636,
0.01824897900223732,
-0.14138327538967133,
0.18066151440143585,
0.42769572138786316,
-0.5877944827079773,
0.01064341515302658,
-0.11366206407546997,
-0.2237597554922104,
-0.3114534616470337,
-0.09309940785169601,
-0.2576054334640503,
-0.45463627576828003,
-0.4896072745323181,
0.243319571018219,
0.15483486652374268,
0.2070297747850418,
0.06497631967067719,
-0.035026516765356064,
0.23928552865982056,
0.21879616379737854,
-0.03654728829860687,
0.08314217627048492,
0.1150161549448967,
0.0419987328350544,
0.34373003244400024,
0.24708731472492218,
0.3557637929916382,
0.17591406404972076,
0.6639748811721802,
0.5626795291900635,
-0.23023274540901184,
-0.004132553935050964,
0.11013337969779968,
-0.1410987675189972,
0.513609766960144,
0.06634396314620972,
0.07985943555831909,
0.7597638368606567,
0.2528668940067291,
-0.2730359733104706,
-0.0009987219236791134,
0.24077259004116058,
0.021896827965974808,
-0.15267017483711243,
-0.20899072289466858,
0.15896722674369812,
-0.3064987063407898,
-0.0991877019405365,
0.17857839167118073,
0.4193430542945862,
-0.020169615745544434,
0.13495884835720062,
-0.14134135842323303,
1.0886870622634888,
0.18313193321228027,
0.07597360014915466,
0.4339449405670166,
-0.47441208362579346,
0.12790343165397644,
-0.29606443643569946,
0.12735629081726074,
-0.038222312927246094,
0.04905683174729347,
-0.13310374319553375,
0.1196964681148529,
-0.15400218963623047,
0.040758803486824036,
0.03055277094244957,
0.32587987184524536,
-0.049213215708732605,
-0.10816079378128052,
0.06379219144582748,
0.13781221210956573,
-0.47471222281455994,
-0.1214355081319809,
-0.4635716378688812,
0.07836762815713882,
-0.10965976119041443,
0.5006362199783325,
-0.06702087819576263,
-0.3001038432121277,
-0.13213638961315155,
-0.2555207312107086,
-0.47574812173843384,
0.3380495309829712,
0.11440234631299973,
0.07898949086666107,
0.006290450692176819,
0.2686142325401306,
-0.11805252730846405,
-0.025672074407339096,
0.006503760814666748,
0.15345005691051483,
-0.5712550282478333,
0.23242178559303284,
-0.05614802986383438,
-0.022341912612318993,
0.12904201447963715,
-0.010354743339121342,
0.3320024013519287,
-0.1632925271987915,
-0.523980975151062,
-0.0455835685133934,
-0.0764230340719223,
-0.23811779916286469,
-0.13334518671035767,
-0.13985764980316162,
0.2425747960805893,
-0.19030383229255676,
0.008708334527909756,
0.04715932160615921,
0.15088032186031342,
-0.279653936624527,
0.033075928688049316,
0.08567274361848831,
-0.09919359534978867,
-0.12250549346208572,
0.2510599195957184,
-0.35412099957466125,
-0.09665106236934662,
0.43604427576065063,
-0.19344860315322876,
0.1573091596364975,
0.5104479789733887,
-0.13162864744663239,
-0.15768688917160034,
-0.1884063184261322,
0.08744839578866959,
0.08802597969770432,
-0.5327842831611633,
-0.01592082530260086,
-0.019625721499323845,
0.12189419567584991,
-0.4492676854133606,
0.1379198133945465,
0.3415900468826294,
-0.10507471114397049,
-0.022861110046505928,
-0.3368983864784241,
-0.19848117232322693,
0.08595194667577744,
-0.18657775223255157,
-0.018307548016309738,
-0.1775950789451599,
0.2768980860710144,
0.1304045021533966,
-0.2580571472644806,
-0.2125309705734253,
-0.056032031774520874,
-0.33336952328681946,
-0.1899869441986084,
0.09729383140802383,
0.1216731071472168,
0.047568053007125854,
-0.22524526715278625,
-0.0017256643623113632,
0.1827600598335266,
-0.29389214515686035,
-0.022611312568187714,
-0.1665501594543457,
0.18988411128520966,
0.20727220177650452,
-0.33079493045806885,
-0.00749194948002696,
-0.20830214023590088,
-0.008118759840726852,
0.07644880563020706,
0.25873517990112305,
0.5852011442184448,
0.23585109412670135,
-0.3304755985736847,
0.24516215920448303,
0.27262264490127563,
-0.6120886206626892,
0.2626723349094391,
0.04181540384888649,
0.14365504682064056,
-0.10843143612146378,
-0.0033817514777183533,
-0.1850135624408722,
-0.006830394268035889,
-0.17989042401313782,
-0.03943151235580444,
0.2479381263256073,
0.1488616168498993,
0.5709387063980103,
-0.1583217978477478,
0.027825791388750076,
0.3076391816139221,
0.2982943654060364,
-0.08276478946208954,
-0.0690290778875351,
-0.15114913880825043,
0.04427642002701759,
0.13644425570964813,
-0.24473965167999268,
0.05869165062904358,
-0.054177623242139816,
-0.0815078541636467,
-0.05168090760707855,
0.042843930423259735,
-0.0873284637928009,
0.05531482398509979,
0.040241822600364685,
0.06351123005151749,
0.30524933338165283,
0.5167136192321777,
-0.12145842611789703,
0.14543946087360382,
-0.19548599421977997,
0.13444022834300995,
0.37261322140693665,
-0.31480467319488525,
0.1470760554075241,
0.4698859453201294,
-0.2542368769645691,
0.07036688923835754,
-0.09700983017683029,
0.33710819482803345,
0.07004178315401077,
-0.33507096767425537,
-0.11779746413230896,
-0.18883010745048523,
-0.14840072393417358,
-0.21958300471305847,
-0.20054277777671814,
-0.015890561044216156,
-0.37732791900634766,
-0.10256144404411316,
-0.19541595876216888,
0.16841807961463928,
-0.2253764569759369,
0.08470921218395233,
0.04699719697237015,
-0.14846043288707733,
-0.16110169887542725,
0.06196652725338936,
0.12334240972995758,
-0.3837183713912964,
0.038051340728998184,
-0.09038048982620239,
-0.18629272282123566,
-0.11323665082454681,
-0.22034791111946106,
0.3356417417526245,
0.313892662525177,
-0.1976131945848465,
0.1447024792432785,
0.25750190019607544,
-0.2850315570831299,
0.4328995943069458,
0.5137104988098145,
0.5138188600540161,
0.10800723731517792,
0.29635754227638245,
0.22430077195167542,
0.211054727435112,
0.13111717998981476,
0.05836563557386398,
0.29181787371635437,
0.09802238643169403,
0.3544721305370331,
0.14918769896030426,
0.0761786550283432,
-0.0969734713435173,
0.025527169927954674,
-0.1734696477651596,
0.052902206778526306,
-0.047194723039865494,
0.6683246493339539,
-0.2581625282764435,
0.1219673678278923,
-0.2273695468902588,
-0.045058928430080414,
-0.26821234822273254,
0.14574046432971954,
0.21966224908828735,
-0.17659619450569153,
0.203208327293396,
-0.42767953872680664,
0.029849424958229065,
-0.2112298607826233,
0.24297617375850677,
0.4580622613430023,
-0.10234706848859787,
-0.22541405260562897,
0.0898049920797348,
-0.6377158164978027,
0.31430432200431824,
-0.09975476562976837,
-0.1257750540971756,
0.04813551530241966,
0.17482724785804749,
-0.1693083643913269,
0.06353741884231567,
0.12172652035951614,
0.12121713906526566,
-0.2511729598045349,
0.16666297614574432,
-0.058468736708164215,
-0.0380827896296978,
0.058093052357435226,
0.15651091933250427,
-0.11942855268716812,
-0.35113826394081116,
0.5051124095916748,
-0.17309977114200592,
-0.05530920624732971,
0.3530035614967346,
-0.06143415719270706,
0.0419141985476017,
-0.08998620510101318,
0.3109634518623352,
0.12650372087955475,
0.38722822070121765,
0.04210973531007767,
-0.1938995122909546,
-0.27328553795814514,
-0.15681976079940796,
-0.25461700558662415,
0.034733377397060394,
-0.09978318214416504,
0.30633029341697693,
0.10739315301179886,
-0.0842336118221283,
-0.21500751376152039,
0.4758686423301697,
0.030121996998786926,
-0.19139964878559113,
-0.24043932557106018,
0.04048275947570801,
-0.255576491355896,
-0.009742348454892635,
-0.07693075388669968,
-0.20573082566261292,
0.10219856351613998,
0.11405487358570099,
-0.32857176661491394,
-0.43150094151496887,
0.8132106065750122,
-0.3085571825504303,
-0.006655000150203705,
-0.22305046021938324,
0.49516093730926514,
0.23796802759170532,
-0.3107753396034241,
-0.3016999065876007,
0.05847824364900589,
0.2036445289850235,
-0.05379493534564972,
-0.15692007541656494,
-0.06840501725673676,
-0.3126010596752167,
-0.10619807243347168,
-0.025066496804356575,
0.07611555606126785,
-0.08417990803718567,
-0.542725145816803,
0.6180151700973511,
-0.11091780662536621
] |
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.29108357429504395,
-0.24233025312423706,
0.11377005279064178,
0.28113341331481934,
0.43997102975845337,
0.13672280311584473,
0.2831527292728424,
0.18023104965686798,
0.020096030086278915,
0.15855523943901062,
-0.41839635372161865,
-0.16160741448402405,
0.038213398307561874,
0.06896905601024628,
0.0953802764415741,
0.03237363323569298,
0.1215248554944992,
-0.07715122401714325,
0.033498961478471756,
-0.08627502620220184,
-0.21023830771446228,
0.02577008493244648,
-0.22894583642482758,
0.4497007727622986,
-0.27465665340423584,
-0.016474751755595207,
-0.03204062208533287,
0.5527815222740173,
-0.1702624410390854,
-0.30443716049194336,
0.36551931500434875,
0.05719955265522003,
0.07487571239471436,
0.20205827057361603,
-0.00011953379726037383,
0.11945749819278717,
0.40153950452804565,
-0.06258073449134827,
-0.23526781797409058,
-0.24917326867580414,
-0.4586625397205353,
-0.1034323126077652,
-0.3297160863876343,
-0.1440565437078476,
-0.0020428895950317383,
-0.2154846489429474,
0.07323338836431503,
0.10686734318733215,
0.33699411153793335,
0.23172760009765625,
0.11226668953895569,
0.2569122016429901,
0.35404402017593384,
-0.15269137918949127,
-0.09855059534311295,
-0.00825510174036026,
-0.06660337001085281,
0.5634387731552124,
0.1162194311618805,
0.16239558160305023,
0.15930375456809998,
0.13682140409946442,
-0.25236591696739197,
-0.014546994119882584,
0.4957686960697174,
-0.16906224191188812,
-0.158083975315094,
-0.3775423467159271,
-0.010682962834835052,
0.49602755904197693,
-0.010122902691364288,
-0.050585754215717316,
-0.3411121368408203,
-0.43585866689682007,
-0.05281927436590195,
-0.1613597571849823,
0.20850607752799988,
0.3000749945640564,
-0.308833509683609,
0.36778512597084045,
-0.34516817331314087,
-0.16998523473739624,
-0.07537277042865753,
0.08535408973693848,
-0.06567662209272385,
0.35800451040267944,
0.14319130778312683,
0.1500324010848999,
-0.033011388033628464,
-0.26985102891921997,
-0.24665245413780212,
-0.28598859906196594,
-0.2851122319698334,
0.1320004016160965,
-0.1658809632062912,
-0.15979735553264618,
0.24964889883995056,
0.3785310685634613,
0.24191007018089294,
0.29131197929382324,
-0.5035303831100464,
0.06030231714248657,
-0.21706348657608032,
-0.04339507967233658,
0.2852765619754791,
0.056879956275224686,
-0.023344218730926514,
0.1630900800228119,
0.47084033489227295,
0.4824884235858917,
0.19592465460300446,
0.03790261968970299,
0.022440481930971146,
0.04341837018728256,
-0.026384994387626648,
0.05899889022111893,
0.3890641927719116,
-0.4395672380924225,
-0.3730817437171936,
0.024060141295194626,
-0.17780587077140808,
0.10459476709365845,
0.12995746731758118,
0.5462890267372131,
-0.11972589045763016,
-0.14243152737617493,
-0.10674992948770523,
0.15288114547729492,
-0.21953430771827698,
-0.41295602917671204,
-0.1327982395887375,
-0.17960530519485474,
0.027462858706712723,
0.15213589370250702,
-0.034061968326568604,
-0.19437190890312195,
0.19683127105236053,
-0.2965851426124573,
-0.14699536561965942,
0.00985473021864891,
-0.3703364133834839,
-0.024973930791020393,
-0.055176444351673126,
0.26649320125579834,
0.2125111222267151,
0.07207421213388443,
0.032952480018138885,
-0.2341187596321106,
-0.057217784225940704,
-0.10119723528623581,
-0.12842196226119995,
-0.6543935537338257,
0.09142956882715225,
0.10127200931310654,
-0.5258934497833252,
-0.027123935520648956,
-0.18083980679512024,
0.04340995103120804,
-0.1741904616355896,
-0.17587117850780487,
-0.02401738613843918,
0.1301347017288208,
-0.1659582555294037,
-0.008232388645410538,
0.20924094319343567,
0.6641116738319397,
0.06569167971611023,
-0.2337666004896164,
-0.15413837134838104,
-0.32532963156700134,
0.060730185359716415,
0.30886316299438477,
-0.1728573888540268,
0.39849424362182617,
-0.28452029824256897,
0.5807569622993469,
0.0007899776101112366,
-0.46642938256263733,
-0.7262559533119202,
0.34982067346572876,
-0.08260533958673477,
0.27460458874702454,
0.10424000024795532,
0.04835522547364235,
0.29351502656936646,
-0.04868755489587784,
0.21135535836219788,
0.0848471149802208,
0.08597440272569656,
-0.12034117430448532,
-0.13580262660980225,
-0.2515827715396881,
-0.01366513967514038,
0.14004923403263092,
0.0974314957857132,
0.3722023069858551,
0.35176917910575867,
0.33165454864501953,
0.6285653710365295,
0.020646076649427414,
-0.03697287291288376,
0.27456212043762207,
0.5249729156494141,
-0.048633381724357605,
-0.19210834801197052,
-0.17666202783584595,
-0.28906044363975525,
0.25386881828308105,
-0.10740882903337479,
0.27406609058380127,
-0.3012474775314331,
-0.12781848013401031,
-0.43559351563453674,
0.06687790155410767,
-0.2966434955596924,
0.02236691489815712,
0.007067471742630005,
-0.15515488386154175,
0.12587420642375946,
0.009479343891143799,
0.0510609932243824,
0.6214255094528198,
-0.18566198647022247,
0.21813571453094482,
-0.30080467462539673,
0.1929173767566681,
-0.00566880963742733,
-0.16078965365886688,
0.159939244389534,
0.13451768457889557,
0.5338269472122192,
-0.026586612686514854,
-0.08566408604383469,
0.4216221272945404,
-0.17149576544761658,
0.09196723252534866,
-0.3337695002555847,
0.2368689626455307,
0.34589552879333496,
-0.16118735074996948,
-0.17515377700328827,
0.09867243468761444,
0.2143830955028534,
0.14856231212615967,
-0.05771345645189285,
0.21814101934432983,
0.26569315791130066,
0.03317531198263168,
-0.061979446560144424,
0.2326194941997528,
0.29440104961395264,
0.0027869343757629395,
0.001943768933415413,
0.08097320795059204,
0.24295413494110107,
0.11289060115814209,
-0.06539678573608398,
-0.025341404601931572,
0.044316500425338745,
0.03283924609422684,
0.36926183104515076,
-0.22003167867660522,
0.2944107949733734,
0.047858141362667084,
-0.008278146386146545,
-0.008479375392198563,
0.3803422749042511,
0.3283657133579254,
0.3256434500217438,
0.09218425303697586,
-0.12036038935184479,
0.2395835965871811,
-0.025139596313238144,
-0.17344513535499573,
0.3853994607925415,
-0.017228752374649048,
-0.22051535546779633,
0.1595335751771927,
-0.13404731452465057,
-0.19883576035499573,
-0.16763955354690552,
-0.430720716714859,
-0.03625832870602608,
0.3685012459754944,
-0.5825729370117188,
-0.14441247284412384,
-0.2938927412033081,
-0.17056873440742493,
0.07233545184135437,
-0.11394937336444855,
-0.39725980162620544,
-0.19774754345417023,
0.019626159220933914,
0.5626663565635681,
-0.10103960335254669,
0.11861471831798553,
-0.0804329514503479,
0.011486619710922241,
-0.06237258017063141,
0.1946731060743332,
-0.15936337411403656,
0.09921366721391678,
-0.3196219503879547,
-0.05827996879816055,
0.30334901809692383,
-0.12355758994817734,
0.04794817417860031,
-0.24125820398330688,
-0.18235789239406586,
-0.44112837314605713,
0.16949915885925293,
0.17057953774929047,
-0.17510293424129486,
0.40916988253593445,
0.13404494524002075,
0.3379442095756531,
0.19037842750549316,
0.10968571156263351,
0.2887127697467804,
0.2240857481956482,
-0.15708771347999573,
-0.04427899792790413,
-0.16566665470600128,
-0.022583169862627983,
-0.08744961023330688,
-0.09199101477861404,
-0.16295813024044037,
-0.4005160331726074,
0.270003080368042,
-0.3703627288341522,
0.16847524046897888,
0.42869263887405396,
0.06198596581816673,
0.08471184223890305,
-0.0908597856760025,
-0.1586759388446808,
-0.09859039634466171,
-0.324837327003479,
0.2998580038547516,
0.11364684998989105,
-0.33388400077819824,
-0.05695316940546036,
0.08599075675010681,
0.07909932732582092,
-0.29231613874435425,
-0.4365329146385193,
-0.14359864592552185,
-0.21422122418880463,
0.28033018112182617,
0.002529554069042206,
-0.14266856014728546,
0.23180067539215088,
-0.27322492003440857,
0.023147081956267357,
0.016965024173259735,
-0.21566137671470642,
0.06707640737295151,
0.010475758463144302,
0.34784746170043945,
-0.07651261240243912,
0.3513559103012085,
0.026131000369787216,
0.3497920632362366,
0.1984328329563141,
0.3158642053604126,
0.3852260112762451,
-0.0537278950214386,
0.2613976001739502,
0.10157164931297302,
-0.14808011054992676,
0.030921893194317818,
0.12697026133537292,
-0.13834263384342194,
0.1088121086359024,
0.12466003745794296,
0.07096966356039047,
-0.3170199692249298,
-0.5742520689964294,
-0.05743595212697983,
-0.30862197279930115,
-0.4599822163581848,
0.31301289796829224,
-0.07758254557847977,
0.3866526782512665,
0.44528403878211975,
0.10629989206790924,
-0.09869571030139923,
0.27731165289878845,
0.3887869715690613,
0.18977925181388855,
0.07632017135620117,
-0.17711757123470306,
-0.2719300389289856,
-0.37092405557632446,
0.22423046827316284,
0.07249286770820618,
0.24027742445468903,
-0.30152639746665955,
0.07766243070363998,
0.12134340405464172,
-0.04197007790207863,
0.3528980612754822,
-0.08038841187953949,
0.6159140467643738,
-0.23009908199310303,
0.2072397619485855,
-0.22240014374256134,
-0.15774400532245636,
0.01824897900223732,
-0.14138327538967133,
0.18066151440143585,
0.42769572138786316,
-0.5877944827079773,
0.01064341515302658,
-0.11366206407546997,
-0.2237597554922104,
-0.3114534616470337,
-0.09309940785169601,
-0.2576054334640503,
-0.45463627576828003,
-0.4896072745323181,
0.243319571018219,
0.15483486652374268,
0.2070297747850418,
0.06497631967067719,
-0.035026516765356064,
0.23928552865982056,
0.21879616379737854,
-0.03654728829860687,
0.08314217627048492,
0.1150161549448967,
0.0419987328350544,
0.34373003244400024,
0.24708731472492218,
0.3557637929916382,
0.17591406404972076,
0.6639748811721802,
0.5626795291900635,
-0.23023274540901184,
-0.004132553935050964,
0.11013337969779968,
-0.1410987675189972,
0.513609766960144,
0.06634396314620972,
0.07985943555831909,
0.7597638368606567,
0.2528668940067291,
-0.2730359733104706,
-0.0009987219236791134,
0.24077259004116058,
0.021896827965974808,
-0.15267017483711243,
-0.20899072289466858,
0.15896722674369812,
-0.3064987063407898,
-0.0991877019405365,
0.17857839167118073,
0.4193430542945862,
-0.020169615745544434,
0.13495884835720062,
-0.14134135842323303,
1.0886870622634888,
0.18313193321228027,
0.07597360014915466,
0.4339449405670166,
-0.47441208362579346,
0.12790343165397644,
-0.29606443643569946,
0.12735629081726074,
-0.038222312927246094,
0.04905683174729347,
-0.13310374319553375,
0.1196964681148529,
-0.15400218963623047,
0.040758803486824036,
0.03055277094244957,
0.32587987184524536,
-0.049213215708732605,
-0.10816079378128052,
0.06379219144582748,
0.13781221210956573,
-0.47471222281455994,
-0.1214355081319809,
-0.4635716378688812,
0.07836762815713882,
-0.10965976119041443,
0.5006362199783325,
-0.06702087819576263,
-0.3001038432121277,
-0.13213638961315155,
-0.2555207312107086,
-0.47574812173843384,
0.3380495309829712,
0.11440234631299973,
0.07898949086666107,
0.006290450692176819,
0.2686142325401306,
-0.11805252730846405,
-0.025672074407339096,
0.006503760814666748,
0.15345005691051483,
-0.5712550282478333,
0.23242178559303284,
-0.05614802986383438,
-0.022341912612318993,
0.12904201447963715,
-0.010354743339121342,
0.3320024013519287,
-0.1632925271987915,
-0.523980975151062,
-0.0455835685133934,
-0.0764230340719223,
-0.23811779916286469,
-0.13334518671035767,
-0.13985764980316162,
0.2425747960805893,
-0.19030383229255676,
0.008708334527909756,
0.04715932160615921,
0.15088032186031342,
-0.279653936624527,
0.033075928688049316,
0.08567274361848831,
-0.09919359534978867,
-0.12250549346208572,
0.2510599195957184,
-0.35412099957466125,
-0.09665106236934662,
0.43604427576065063,
-0.19344860315322876,
0.1573091596364975,
0.5104479789733887,
-0.13162864744663239,
-0.15768688917160034,
-0.1884063184261322,
0.08744839578866959,
0.08802597969770432,
-0.5327842831611633,
-0.01592082530260086,
-0.019625721499323845,
0.12189419567584991,
-0.4492676854133606,
0.1379198133945465,
0.3415900468826294,
-0.10507471114397049,
-0.022861110046505928,
-0.3368983864784241,
-0.19848117232322693,
0.08595194667577744,
-0.18657775223255157,
-0.018307548016309738,
-0.1775950789451599,
0.2768980860710144,
0.1304045021533966,
-0.2580571472644806,
-0.2125309705734253,
-0.056032031774520874,
-0.33336952328681946,
-0.1899869441986084,
0.09729383140802383,
0.1216731071472168,
0.047568053007125854,
-0.22524526715278625,
-0.0017256643623113632,
0.1827600598335266,
-0.29389214515686035,
-0.022611312568187714,
-0.1665501594543457,
0.18988411128520966,
0.20727220177650452,
-0.33079493045806885,
-0.00749194948002696,
-0.20830214023590088,
-0.008118759840726852,
0.07644880563020706,
0.25873517990112305,
0.5852011442184448,
0.23585109412670135,
-0.3304755985736847,
0.24516215920448303,
0.27262264490127563,
-0.6120886206626892,
0.2626723349094391,
0.04181540384888649,
0.14365504682064056,
-0.10843143612146378,
-0.0033817514777183533,
-0.1850135624408722,
-0.006830394268035889,
-0.17989042401313782,
-0.03943151235580444,
0.2479381263256073,
0.1488616168498993,
0.5709387063980103,
-0.1583217978477478,
0.027825791388750076,
0.3076391816139221,
0.2982943654060364,
-0.08276478946208954,
-0.0690290778875351,
-0.15114913880825043,
0.04427642002701759,
0.13644425570964813,
-0.24473965167999268,
0.05869165062904358,
-0.054177623242139816,
-0.0815078541636467,
-0.05168090760707855,
0.042843930423259735,
-0.0873284637928009,
0.05531482398509979,
0.040241822600364685,
0.06351123005151749,
0.30524933338165283,
0.5167136192321777,
-0.12145842611789703,
0.14543946087360382,
-0.19548599421977997,
0.13444022834300995,
0.37261322140693665,
-0.31480467319488525,
0.1470760554075241,
0.4698859453201294,
-0.2542368769645691,
0.07036688923835754,
-0.09700983017683029,
0.33710819482803345,
0.07004178315401077,
-0.33507096767425537,
-0.11779746413230896,
-0.18883010745048523,
-0.14840072393417358,
-0.21958300471305847,
-0.20054277777671814,
-0.015890561044216156,
-0.37732791900634766,
-0.10256144404411316,
-0.19541595876216888,
0.16841807961463928,
-0.2253764569759369,
0.08470921218395233,
0.04699719697237015,
-0.14846043288707733,
-0.16110169887542725,
0.06196652725338936,
0.12334240972995758,
-0.3837183713912964,
0.038051340728998184,
-0.09038048982620239,
-0.18629272282123566,
-0.11323665082454681,
-0.22034791111946106,
0.3356417417526245,
0.313892662525177,
-0.1976131945848465,
0.1447024792432785,
0.25750190019607544,
-0.2850315570831299,
0.4328995943069458,
0.5137104988098145,
0.5138188600540161,
0.10800723731517792,
0.29635754227638245,
0.22430077195167542,
0.211054727435112,
0.13111717998981476,
0.05836563557386398,
0.29181787371635437,
0.09802238643169403,
0.3544721305370331,
0.14918769896030426,
0.0761786550283432,
-0.0969734713435173,
0.025527169927954674,
-0.1734696477651596,
0.052902206778526306,
-0.047194723039865494,
0.6683246493339539,
-0.2581625282764435,
0.1219673678278923,
-0.2273695468902588,
-0.045058928430080414,
-0.26821234822273254,
0.14574046432971954,
0.21966224908828735,
-0.17659619450569153,
0.203208327293396,
-0.42767953872680664,
0.029849424958229065,
-0.2112298607826233,
0.24297617375850677,
0.4580622613430023,
-0.10234706848859787,
-0.22541405260562897,
0.0898049920797348,
-0.6377158164978027,
0.31430432200431824,
-0.09975476562976837,
-0.1257750540971756,
0.04813551530241966,
0.17482724785804749,
-0.1693083643913269,
0.06353741884231567,
0.12172652035951614,
0.12121713906526566,
-0.2511729598045349,
0.16666297614574432,
-0.058468736708164215,
-0.0380827896296978,
0.058093052357435226,
0.15651091933250427,
-0.11942855268716812,
-0.35113826394081116,
0.5051124095916748,
-0.17309977114200592,
-0.05530920624732971,
0.3530035614967346,
-0.06143415719270706,
0.0419141985476017,
-0.08998620510101318,
0.3109634518623352,
0.12650372087955475,
0.38722822070121765,
0.04210973531007767,
-0.1938995122909546,
-0.27328553795814514,
-0.15681976079940796,
-0.25461700558662415,
0.034733377397060394,
-0.09978318214416504,
0.30633029341697693,
0.10739315301179886,
-0.0842336118221283,
-0.21500751376152039,
0.4758686423301697,
0.030121996998786926,
-0.19139964878559113,
-0.24043932557106018,
0.04048275947570801,
-0.255576491355896,
-0.009742348454892635,
-0.07693075388669968,
-0.20573082566261292,
0.10219856351613998,
0.11405487358570099,
-0.32857176661491394,
-0.43150094151496887,
0.8132106065750122,
-0.3085571825504303,
-0.006655000150203705,
-0.22305046021938324,
0.49516093730926514,
0.23796802759170532,
-0.3107753396034241,
-0.3016999065876007,
0.05847824364900589,
0.2036445289850235,
-0.05379493534564972,
-0.15692007541656494,
-0.06840501725673676,
-0.3126010596752167,
-0.10619807243347168,
-0.025066496804356575,
0.07611555606126785,
-0.08417990803718567,
-0.542725145816803,
0.6180151700973511,
-0.11091780662536621
] |
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.29108357429504395,
-0.24233025312423706,
0.11377005279064178,
0.28113341331481934,
0.43997102975845337,
0.13672280311584473,
0.2831527292728424,
0.18023104965686798,
0.020096030086278915,
0.15855523943901062,
-0.41839635372161865,
-0.16160741448402405,
0.038213398307561874,
0.06896905601024628,
0.0953802764415741,
0.03237363323569298,
0.1215248554944992,
-0.07715122401714325,
0.033498961478471756,
-0.08627502620220184,
-0.21023830771446228,
0.02577008493244648,
-0.22894583642482758,
0.4497007727622986,
-0.27465665340423584,
-0.016474751755595207,
-0.03204062208533287,
0.5527815222740173,
-0.1702624410390854,
-0.30443716049194336,
0.36551931500434875,
0.05719955265522003,
0.07487571239471436,
0.20205827057361603,
-0.00011953379726037383,
0.11945749819278717,
0.40153950452804565,
-0.06258073449134827,
-0.23526781797409058,
-0.24917326867580414,
-0.4586625397205353,
-0.1034323126077652,
-0.3297160863876343,
-0.1440565437078476,
-0.0020428895950317383,
-0.2154846489429474,
0.07323338836431503,
0.10686734318733215,
0.33699411153793335,
0.23172760009765625,
0.11226668953895569,
0.2569122016429901,
0.35404402017593384,
-0.15269137918949127,
-0.09855059534311295,
-0.00825510174036026,
-0.06660337001085281,
0.5634387731552124,
0.1162194311618805,
0.16239558160305023,
0.15930375456809998,
0.13682140409946442,
-0.25236591696739197,
-0.014546994119882584,
0.4957686960697174,
-0.16906224191188812,
-0.158083975315094,
-0.3775423467159271,
-0.010682962834835052,
0.49602755904197693,
-0.010122902691364288,
-0.050585754215717316,
-0.3411121368408203,
-0.43585866689682007,
-0.05281927436590195,
-0.1613597571849823,
0.20850607752799988,
0.3000749945640564,
-0.308833509683609,
0.36778512597084045,
-0.34516817331314087,
-0.16998523473739624,
-0.07537277042865753,
0.08535408973693848,
-0.06567662209272385,
0.35800451040267944,
0.14319130778312683,
0.1500324010848999,
-0.033011388033628464,
-0.26985102891921997,
-0.24665245413780212,
-0.28598859906196594,
-0.2851122319698334,
0.1320004016160965,
-0.1658809632062912,
-0.15979735553264618,
0.24964889883995056,
0.3785310685634613,
0.24191007018089294,
0.29131197929382324,
-0.5035303831100464,
0.06030231714248657,
-0.21706348657608032,
-0.04339507967233658,
0.2852765619754791,
0.056879956275224686,
-0.023344218730926514,
0.1630900800228119,
0.47084033489227295,
0.4824884235858917,
0.19592465460300446,
0.03790261968970299,
0.022440481930971146,
0.04341837018728256,
-0.026384994387626648,
0.05899889022111893,
0.3890641927719116,
-0.4395672380924225,
-0.3730817437171936,
0.024060141295194626,
-0.17780587077140808,
0.10459476709365845,
0.12995746731758118,
0.5462890267372131,
-0.11972589045763016,
-0.14243152737617493,
-0.10674992948770523,
0.15288114547729492,
-0.21953430771827698,
-0.41295602917671204,
-0.1327982395887375,
-0.17960530519485474,
0.027462858706712723,
0.15213589370250702,
-0.034061968326568604,
-0.19437190890312195,
0.19683127105236053,
-0.2965851426124573,
-0.14699536561965942,
0.00985473021864891,
-0.3703364133834839,
-0.024973930791020393,
-0.055176444351673126,
0.26649320125579834,
0.2125111222267151,
0.07207421213388443,
0.032952480018138885,
-0.2341187596321106,
-0.057217784225940704,
-0.10119723528623581,
-0.12842196226119995,
-0.6543935537338257,
0.09142956882715225,
0.10127200931310654,
-0.5258934497833252,
-0.027123935520648956,
-0.18083980679512024,
0.04340995103120804,
-0.1741904616355896,
-0.17587117850780487,
-0.02401738613843918,
0.1301347017288208,
-0.1659582555294037,
-0.008232388645410538,
0.20924094319343567,
0.6641116738319397,
0.06569167971611023,
-0.2337666004896164,
-0.15413837134838104,
-0.32532963156700134,
0.060730185359716415,
0.30886316299438477,
-0.1728573888540268,
0.39849424362182617,
-0.28452029824256897,
0.5807569622993469,
0.0007899776101112366,
-0.46642938256263733,
-0.7262559533119202,
0.34982067346572876,
-0.08260533958673477,
0.27460458874702454,
0.10424000024795532,
0.04835522547364235,
0.29351502656936646,
-0.04868755489587784,
0.21135535836219788,
0.0848471149802208,
0.08597440272569656,
-0.12034117430448532,
-0.13580262660980225,
-0.2515827715396881,
-0.01366513967514038,
0.14004923403263092,
0.0974314957857132,
0.3722023069858551,
0.35176917910575867,
0.33165454864501953,
0.6285653710365295,
0.020646076649427414,
-0.03697287291288376,
0.27456212043762207,
0.5249729156494141,
-0.048633381724357605,
-0.19210834801197052,
-0.17666202783584595,
-0.28906044363975525,
0.25386881828308105,
-0.10740882903337479,
0.27406609058380127,
-0.3012474775314331,
-0.12781848013401031,
-0.43559351563453674,
0.06687790155410767,
-0.2966434955596924,
0.02236691489815712,
0.007067471742630005,
-0.15515488386154175,
0.12587420642375946,
0.009479343891143799,
0.0510609932243824,
0.6214255094528198,
-0.18566198647022247,
0.21813571453094482,
-0.30080467462539673,
0.1929173767566681,
-0.00566880963742733,
-0.16078965365886688,
0.159939244389534,
0.13451768457889557,
0.5338269472122192,
-0.026586612686514854,
-0.08566408604383469,
0.4216221272945404,
-0.17149576544761658,
0.09196723252534866,
-0.3337695002555847,
0.2368689626455307,
0.34589552879333496,
-0.16118735074996948,
-0.17515377700328827,
0.09867243468761444,
0.2143830955028534,
0.14856231212615967,
-0.05771345645189285,
0.21814101934432983,
0.26569315791130066,
0.03317531198263168,
-0.061979446560144424,
0.2326194941997528,
0.29440104961395264,
0.0027869343757629395,
0.001943768933415413,
0.08097320795059204,
0.24295413494110107,
0.11289060115814209,
-0.06539678573608398,
-0.025341404601931572,
0.044316500425338745,
0.03283924609422684,
0.36926183104515076,
-0.22003167867660522,
0.2944107949733734,
0.047858141362667084,
-0.008278146386146545,
-0.008479375392198563,
0.3803422749042511,
0.3283657133579254,
0.3256434500217438,
0.09218425303697586,
-0.12036038935184479,
0.2395835965871811,
-0.025139596313238144,
-0.17344513535499573,
0.3853994607925415,
-0.017228752374649048,
-0.22051535546779633,
0.1595335751771927,
-0.13404731452465057,
-0.19883576035499573,
-0.16763955354690552,
-0.430720716714859,
-0.03625832870602608,
0.3685012459754944,
-0.5825729370117188,
-0.14441247284412384,
-0.2938927412033081,
-0.17056873440742493,
0.07233545184135437,
-0.11394937336444855,
-0.39725980162620544,
-0.19774754345417023,
0.019626159220933914,
0.5626663565635681,
-0.10103960335254669,
0.11861471831798553,
-0.0804329514503479,
0.011486619710922241,
-0.06237258017063141,
0.1946731060743332,
-0.15936337411403656,
0.09921366721391678,
-0.3196219503879547,
-0.05827996879816055,
0.30334901809692383,
-0.12355758994817734,
0.04794817417860031,
-0.24125820398330688,
-0.18235789239406586,
-0.44112837314605713,
0.16949915885925293,
0.17057953774929047,
-0.17510293424129486,
0.40916988253593445,
0.13404494524002075,
0.3379442095756531,
0.19037842750549316,
0.10968571156263351,
0.2887127697467804,
0.2240857481956482,
-0.15708771347999573,
-0.04427899792790413,
-0.16566665470600128,
-0.022583169862627983,
-0.08744961023330688,
-0.09199101477861404,
-0.16295813024044037,
-0.4005160331726074,
0.270003080368042,
-0.3703627288341522,
0.16847524046897888,
0.42869263887405396,
0.06198596581816673,
0.08471184223890305,
-0.0908597856760025,
-0.1586759388446808,
-0.09859039634466171,
-0.324837327003479,
0.2998580038547516,
0.11364684998989105,
-0.33388400077819824,
-0.05695316940546036,
0.08599075675010681,
0.07909932732582092,
-0.29231613874435425,
-0.4365329146385193,
-0.14359864592552185,
-0.21422122418880463,
0.28033018112182617,
0.002529554069042206,
-0.14266856014728546,
0.23180067539215088,
-0.27322492003440857,
0.023147081956267357,
0.016965024173259735,
-0.21566137671470642,
0.06707640737295151,
0.010475758463144302,
0.34784746170043945,
-0.07651261240243912,
0.3513559103012085,
0.026131000369787216,
0.3497920632362366,
0.1984328329563141,
0.3158642053604126,
0.3852260112762451,
-0.0537278950214386,
0.2613976001739502,
0.10157164931297302,
-0.14808011054992676,
0.030921893194317818,
0.12697026133537292,
-0.13834263384342194,
0.1088121086359024,
0.12466003745794296,
0.07096966356039047,
-0.3170199692249298,
-0.5742520689964294,
-0.05743595212697983,
-0.30862197279930115,
-0.4599822163581848,
0.31301289796829224,
-0.07758254557847977,
0.3866526782512665,
0.44528403878211975,
0.10629989206790924,
-0.09869571030139923,
0.27731165289878845,
0.3887869715690613,
0.18977925181388855,
0.07632017135620117,
-0.17711757123470306,
-0.2719300389289856,
-0.37092405557632446,
0.22423046827316284,
0.07249286770820618,
0.24027742445468903,
-0.30152639746665955,
0.07766243070363998,
0.12134340405464172,
-0.04197007790207863,
0.3528980612754822,
-0.08038841187953949,
0.6159140467643738,
-0.23009908199310303,
0.2072397619485855,
-0.22240014374256134,
-0.15774400532245636,
0.01824897900223732,
-0.14138327538967133,
0.18066151440143585,
0.42769572138786316,
-0.5877944827079773,
0.01064341515302658,
-0.11366206407546997,
-0.2237597554922104,
-0.3114534616470337,
-0.09309940785169601,
-0.2576054334640503,
-0.45463627576828003,
-0.4896072745323181,
0.243319571018219,
0.15483486652374268,
0.2070297747850418,
0.06497631967067719,
-0.035026516765356064,
0.23928552865982056,
0.21879616379737854,
-0.03654728829860687,
0.08314217627048492,
0.1150161549448967,
0.0419987328350544,
0.34373003244400024,
0.24708731472492218,
0.3557637929916382,
0.17591406404972076,
0.6639748811721802,
0.5626795291900635,
-0.23023274540901184,
-0.004132553935050964,
0.11013337969779968,
-0.1410987675189972,
0.513609766960144,
0.06634396314620972,
0.07985943555831909,
0.7597638368606567,
0.2528668940067291,
-0.2730359733104706,
-0.0009987219236791134,
0.24077259004116058,
0.021896827965974808,
-0.15267017483711243,
-0.20899072289466858,
0.15896722674369812,
-0.3064987063407898,
-0.0991877019405365,
0.17857839167118073,
0.4193430542945862,
-0.020169615745544434,
0.13495884835720062,
-0.14134135842323303,
1.0886870622634888,
0.18313193321228027,
0.07597360014915466,
0.4339449405670166,
-0.47441208362579346,
0.12790343165397644,
-0.29606443643569946,
0.12735629081726074,
-0.038222312927246094,
0.04905683174729347,
-0.13310374319553375,
0.1196964681148529,
-0.15400218963623047,
0.040758803486824036,
0.03055277094244957,
0.32587987184524536,
-0.049213215708732605,
-0.10816079378128052,
0.06379219144582748,
0.13781221210956573,
-0.47471222281455994,
-0.1214355081319809,
-0.4635716378688812,
0.07836762815713882,
-0.10965976119041443,
0.5006362199783325,
-0.06702087819576263,
-0.3001038432121277,
-0.13213638961315155,
-0.2555207312107086,
-0.47574812173843384,
0.3380495309829712,
0.11440234631299973,
0.07898949086666107,
0.006290450692176819,
0.2686142325401306,
-0.11805252730846405,
-0.025672074407339096,
0.006503760814666748,
0.15345005691051483,
-0.5712550282478333,
0.23242178559303284,
-0.05614802986383438,
-0.022341912612318993,
0.12904201447963715,
-0.010354743339121342,
0.3320024013519287,
-0.1632925271987915,
-0.523980975151062,
-0.0455835685133934,
-0.0764230340719223,
-0.23811779916286469,
-0.13334518671035767,
-0.13985764980316162,
0.2425747960805893,
-0.19030383229255676,
0.008708334527909756,
0.04715932160615921,
0.15088032186031342,
-0.279653936624527,
0.033075928688049316,
0.08567274361848831,
-0.09919359534978867,
-0.12250549346208572,
0.2510599195957184,
-0.35412099957466125,
-0.09665106236934662,
0.43604427576065063,
-0.19344860315322876,
0.1573091596364975,
0.5104479789733887,
-0.13162864744663239,
-0.15768688917160034,
-0.1884063184261322,
0.08744839578866959,
0.08802597969770432,
-0.5327842831611633,
-0.01592082530260086,
-0.019625721499323845,
0.12189419567584991,
-0.4492676854133606,
0.1379198133945465,
0.3415900468826294,
-0.10507471114397049,
-0.022861110046505928,
-0.3368983864784241,
-0.19848117232322693,
0.08595194667577744,
-0.18657775223255157,
-0.018307548016309738,
-0.1775950789451599,
0.2768980860710144,
0.1304045021533966,
-0.2580571472644806,
-0.2125309705734253,
-0.056032031774520874,
-0.33336952328681946,
-0.1899869441986084,
0.09729383140802383,
0.1216731071472168,
0.047568053007125854,
-0.22524526715278625,
-0.0017256643623113632,
0.1827600598335266,
-0.29389214515686035,
-0.022611312568187714,
-0.1665501594543457,
0.18988411128520966,
0.20727220177650452,
-0.33079493045806885,
-0.00749194948002696,
-0.20830214023590088,
-0.008118759840726852,
0.07644880563020706,
0.25873517990112305,
0.5852011442184448,
0.23585109412670135,
-0.3304755985736847,
0.24516215920448303,
0.27262264490127563,
-0.6120886206626892,
0.2626723349094391,
0.04181540384888649,
0.14365504682064056,
-0.10843143612146378,
-0.0033817514777183533,
-0.1850135624408722,
-0.006830394268035889,
-0.17989042401313782,
-0.03943151235580444,
0.2479381263256073,
0.1488616168498993,
0.5709387063980103,
-0.1583217978477478,
0.027825791388750076,
0.3076391816139221,
0.2982943654060364,
-0.08276478946208954,
-0.0690290778875351,
-0.15114913880825043,
0.04427642002701759,
0.13644425570964813,
-0.24473965167999268,
0.05869165062904358,
-0.054177623242139816,
-0.0815078541636467,
-0.05168090760707855,
0.042843930423259735,
-0.0873284637928009,
0.05531482398509979,
0.040241822600364685,
0.06351123005151749,
0.30524933338165283,
0.5167136192321777,
-0.12145842611789703,
0.14543946087360382,
-0.19548599421977997,
0.13444022834300995,
0.37261322140693665,
-0.31480467319488525,
0.1470760554075241,
0.4698859453201294,
-0.2542368769645691,
0.07036688923835754,
-0.09700983017683029,
0.33710819482803345,
0.07004178315401077,
-0.33507096767425537,
-0.11779746413230896,
-0.18883010745048523,
-0.14840072393417358,
-0.21958300471305847,
-0.20054277777671814,
-0.015890561044216156,
-0.37732791900634766,
-0.10256144404411316,
-0.19541595876216888,
0.16841807961463928,
-0.2253764569759369,
0.08470921218395233,
0.04699719697237015,
-0.14846043288707733,
-0.16110169887542725,
0.06196652725338936,
0.12334240972995758,
-0.3837183713912964,
0.038051340728998184,
-0.09038048982620239,
-0.18629272282123566,
-0.11323665082454681,
-0.22034791111946106,
0.3356417417526245,
0.313892662525177,
-0.1976131945848465,
0.1447024792432785,
0.25750190019607544,
-0.2850315570831299,
0.4328995943069458,
0.5137104988098145,
0.5138188600540161,
0.10800723731517792,
0.29635754227638245,
0.22430077195167542,
0.211054727435112,
0.13111717998981476,
0.05836563557386398,
0.29181787371635437,
0.09802238643169403,
0.3544721305370331,
0.14918769896030426,
0.0761786550283432,
-0.0969734713435173,
0.025527169927954674,
-0.1734696477651596,
0.052902206778526306,
-0.047194723039865494,
0.6683246493339539,
-0.2581625282764435,
0.1219673678278923,
-0.2273695468902588,
-0.045058928430080414,
-0.26821234822273254,
0.14574046432971954,
0.21966224908828735,
-0.17659619450569153,
0.203208327293396,
-0.42767953872680664,
0.029849424958229065,
-0.2112298607826233,
0.24297617375850677,
0.4580622613430023,
-0.10234706848859787,
-0.22541405260562897,
0.0898049920797348,
-0.6377158164978027,
0.31430432200431824,
-0.09975476562976837,
-0.1257750540971756,
0.04813551530241966,
0.17482724785804749,
-0.1693083643913269,
0.06353741884231567,
0.12172652035951614,
0.12121713906526566,
-0.2511729598045349,
0.16666297614574432,
-0.058468736708164215,
-0.0380827896296978,
0.058093052357435226,
0.15651091933250427,
-0.11942855268716812,
-0.35113826394081116,
0.5051124095916748,
-0.17309977114200592,
-0.05530920624732971,
0.3530035614967346,
-0.06143415719270706,
0.0419141985476017,
-0.08998620510101318,
0.3109634518623352,
0.12650372087955475,
0.38722822070121765,
0.04210973531007767,
-0.1938995122909546,
-0.27328553795814514,
-0.15681976079940796,
-0.25461700558662415,
0.034733377397060394,
-0.09978318214416504,
0.30633029341697693,
0.10739315301179886,
-0.0842336118221283,
-0.21500751376152039,
0.4758686423301697,
0.030121996998786926,
-0.19139964878559113,
-0.24043932557106018,
0.04048275947570801,
-0.255576491355896,
-0.009742348454892635,
-0.07693075388669968,
-0.20573082566261292,
0.10219856351613998,
0.11405487358570099,
-0.32857176661491394,
-0.43150094151496887,
0.8132106065750122,
-0.3085571825504303,
-0.006655000150203705,
-0.22305046021938324,
0.49516093730926514,
0.23796802759170532,
-0.3107753396034241,
-0.3016999065876007,
0.05847824364900589,
0.2036445289850235,
-0.05379493534564972,
-0.15692007541656494,
-0.06840501725673676,
-0.3126010596752167,
-0.10619807243347168,
-0.025066496804356575,
0.07611555606126785,
-0.08417990803718567,
-0.542725145816803,
0.6180151700973511,
-0.11091780662536621
] |
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.195042222738266,
-0.34095367789268494,
0.002453343942761421,
0.29262301325798035,
0.22568663954734802,
-0.06849873811006546,
0.29512476921081543,
0.029160384088754654,
0.14267335832118988,
0.20322439074516296,
0.2179422527551651,
0.48196476697921753,
-0.3849047124385834,
0.7559521198272705,
-0.33124327659606934,
-0.023950234055519104,
0.08559967577457428,
0.2813452482223511,
0.009190589189529419,
0.08064860105514526,
0.08216628432273865,
-0.022123442962765694,
-0.2473183572292328,
-0.2289152592420578,
-0.47126078605651855,
-0.10759337991476059,
0.03190276771783829,
-0.32825130224227905,
0.12199655920267105,
-0.4922308027744293,
0.07609602808952332,
0.32384923100471497,
0.03680974990129471,
-0.014449827373027802,
-0.00012031644291710109,
0.19504494965076447,
0.1632363498210907,
-0.10036596655845642,
-0.511391818523407,
-0.13245432078838348,
-0.07439889758825302,
-0.23112043738365173,
0.5121966600418091,
-0.48225364089012146,
-0.08607044816017151,
-0.6584894061088562,
-0.1785595864057541,
-0.24249953031539917,
0.5478994250297546,
-0.2570660710334778,
0.0905608981847763,
0.032136429101228714,
-0.12199282646179199,
0.3420044779777527,
-0.04891405254602432,
0.32112330198287964,
-0.08440201729536057,
0.01037677377462387,
-0.04300394654273987,
-0.219582200050354,
-0.07939454168081284,
0.022150930017232895,
-0.08536873012781143,
-0.07243575155735016,
0.5299258232116699,
-0.05799843370914459,
-0.044414058327674866,
-0.24787425994873047,
-0.4991062879562378,
0.11617444455623627,
0.9154422283172607,
-0.2101576030254364,
-0.4176369905471802,
-0.3030015230178833,
-0.028189074248075485,
0.048506319522857666,
0.14001575112342834,
-0.11837159097194672,
-0.11141666769981384,
0.17247815430164337,
0.01091935858130455,
-0.08753632754087448,
-0.17895567417144775,
0.28018060326576233,
-0.19560475647449493,
0.180064857006073,
0.09441232681274414,
-0.11370112746953964,
-0.20661436021327972,
-0.14834220707416534,
-0.16760456562042236,
-0.09055809676647186,
0.11948899924755096,
-0.04136976972222328,
0.02305389940738678,
-0.28013166785240173,
-0.0854681059718132,
-0.33605414628982544,
0.20263871550559998,
-0.17510372400283813,
0.22227543592453003,
0.09907981753349304,
-0.382482647895813,
0.12759581208229065,
0.6394933462142944,
-0.03672029823064804,
0.41301605105400085,
-0.05319546163082123,
0.25141194462776184,
0.2291451245546341,
-0.30116352438926697,
0.047542329877614975,
-0.03710766136646271,
0.25228697061538696,
0.2150706797838211,
-0.09083336591720581,
0.28643518686294556,
0.0030300505459308624,
-0.11551309376955032,
0.12418360263109207,
-0.3680332601070404,
0.018285231664776802,
0.031713563948869705,
-0.013067871332168579,
0.055528413504362106,
0.41026580333709717,
0.1267274022102356,
0.17893294990062714,
-0.16189274191856384,
-0.011343395337462425,
-0.05302099138498306,
-0.18453919887542725,
0.08234156668186188,
-0.09539778530597687,
0.11352531611919403,
0.14717282354831696,
0.31105220317840576,
0.2404351383447647,
0.2882610559463501,
-0.08536301553249359,
-0.15633836388587952,
0.20461328327655792,
-0.19613954424858093,
-0.10382942855358124,
-0.2335038036108017,
-0.013119551353156567,
-0.02882992848753929,
-0.33508628606796265,
-0.2371349036693573,
0.10853835940361023,
-0.046254776418209076,
-0.0845889300107956,
0.04741670936346054,
0.07486613839864731,
-0.3939560055732727,
0.01754281483590603,
0.06253953278064728,
0.428083598613739,
-0.10649662464857101,
-0.2828019857406616,
0.023169860243797302,
-0.020219016820192337,
-0.2077997922897339,
-0.40090274810791016,
0.09267383813858032,
0.3336232304573059,
-0.5214255452156067,
-0.3838834762573242,
0.3892686069011688,
-0.030333977192640305,
-0.1846156120300293,
0.15467874705791473,
-0.3392503261566162,
0.07071913778781891,
0.0896003469824791,
-0.2477031797170639,
0.12874655425548553,
-0.28290197253227234,
-0.3603338301181793,
0.23527975380420685,
0.058247923851013184,
0.49093949794769287,
0.24832388758659363,
0.20244744420051575,
0.30078747868537903,
0.05796942114830017,
0.16573378443717957,
0.48094719648361206,
0.17124806344509125,
0.11050442606210709,
-0.2269265353679657,
-0.21665704250335693,
0.30424439907073975,
0.06282499432563782,
-0.4672164022922516,
0.029322568327188492,
0.10587070137262344,
0.2543950378894806,
0.31612148880958557,
-0.03537717089056969,
-0.05067282170057297,
-0.20575115084648132,
0.15558648109436035,
0.4992496371269226,
0.0885106772184372,
0.1320444941520691,
-0.469452440738678,
0.3865680396556854,
0.10635454952716827,
-0.09959879517555237,
-0.0247831791639328,
-0.4622160792350769,
0.218999981880188,
-0.00494934618473053,
-0.19908638298511505,
0.1347031146287918,
0.03675899654626846,
-0.38139209151268005,
-0.04547522962093353,
0.29131001234054565,
-0.22695887088775635,
-0.16756533086299896,
-0.009179603308439255,
-0.11655697971582413,
-0.041805654764175415,
0.26072070002555847,
0.3651326894760132,
0.18795178830623627,
-0.15899400413036346,
0.35076022148132324,
-0.2357076108455658,
0.0862935408949852,
0.011869954876601696,
0.035992421209812164,
0.3770301938056946,
0.05307178199291229,
-0.345881849527359,
0.2778911590576172,
0.3984857201576233,
0.2282274067401886,
0.2951142489910126,
0.13154688477516174,
0.1643643081188202,
-0.186971515417099,
-0.15870031714439392,
0.6895448565483093,
0.3571081757545471,
0.11063515394926071,
-0.16515392065048218,
0.14613176882266998,
0.2043171226978302,
0.14292046427726746,
-0.29081207513809204,
-0.3829983174800873,
-0.25614431500434875,
-0.24849967658519745,
-0.10919730365276337,
0.015696294605731964,
-0.3025870621204376,
-0.03366883844137192,
-0.00013390928506851196,
0.09700159728527069,
0.32881981134414673,
-0.24019929766654968,
-0.15051507949829102,
0.12014573067426682,
-0.15282601118087769,
0.07478161156177521,
0.2994565963745117,
0.1685398519039154,
-0.05383900925517082,
-0.058385103940963745,
0.2731924057006836,
0.012048738077282906,
0.230501189827919,
0.08843115717172623,
0.2666779160499573,
0.27099287509918213,
0.10400477796792984,
-0.05998930707573891,
-0.09184057265520096,
-0.054754093289375305,
0.12546482682228088,
-0.22222934663295746,
-0.21027393639087677,
-0.043143391609191895,
-0.5672409534454346,
-0.2614386975765228,
0.005609545856714249,
0.1614299714565277,
-0.13210073113441467,
-0.017615271732211113,
0.17718687653541565,
0.2671559453010559,
-0.06408344209194183,
0.08453155308961868,
0.04395575448870659,
0.5306349992752075,
-0.12578390538692474,
-0.43136128783226013,
0.17315258085727692,
-0.1997460275888443,
0.04526178166270256,
0.004909925162792206,
0.17961856722831726,
0.10450495779514313,
0.1649385392665863,
0.4710169732570648,
-0.32894372940063477,
-0.19692160189151764,
-0.12616132199764252,
-0.09766450524330139,
-0.015094101428985596,
0.2602159082889557,
0.07393979281187057,
-0.06632506847381592,
-0.006017245352268219,
-0.13474012911319733,
0.1495552957057953,
0.049477823078632355,
-0.36803197860717773,
0.06225389242172241,
0.19461855292320251,
0.1884172409772873,
0.10314624011516571,
-0.04961299151182175,
-0.35149091482162476,
-0.2868650555610657,
0.38032758235931396,
0.2812099754810333,
0.19769063591957092,
-0.024679336696863174,
-0.07174906134605408,
-0.36569276452064514,
0.20422163605690002,
0.14866206049919128,
-0.1697138100862503,
0.057879488915205,
0.2343151569366455,
-0.21400785446166992,
-0.014822632074356079,
-0.264055460691452,
-0.17370253801345825,
-0.13497984409332275,
0.36861634254455566,
-0.4712340235710144,
-0.14891967177391052,
-0.04220721870660782,
0.36114490032196045,
0.08487973362207413,
-0.060205042362213135,
0.11223182827234268,
0.31311002373695374,
0.0681019052863121,
0.07726653665304184,
-0.0044934190809726715,
0.30475783348083496,
0.2780486047267914,
-0.08975320309400558,
0.39894211292266846,
0.39529186487197876,
-0.1391417533159256,
0.6066805720329285,
0.1556801050901413,
-0.06034339591860771,
0.3073279857635498,
0.029910314828157425,
-0.0919380933046341,
-0.03990304470062256,
0.11495189368724823,
-0.32247331738471985,
-0.24166566133499146,
-0.21149908006191254,
0.20679216086864471,
-0.10505133867263794,
-0.06148749589920044,
-0.34447339177131653,
-0.17063745856285095,
-0.20429065823554993,
-0.36032676696777344,
0.10178413987159729,
-0.44993671774864197,
0.2408176064491272,
-0.25397107005119324,
0.09701807051897049,
0.05988103523850441,
0.017408091574907303,
0.0057520195841789246,
0.09839701652526855,
0.12030390650033951,
-0.0629553273320198,
-0.5437446236610413,
-0.11512995511293411,
-0.1522379219532013,
0.03604116290807724,
-0.09571221470832825,
0.22668248414993286,
0.18131491541862488,
-0.26772984862327576,
0.05080431327223778,
0.16107217967510223,
0.5411654114723206,
0.08115918934345245,
0.09528623521327972,
0.0320473313331604,
-0.2930015027523041,
0.0811145007610321,
-0.36841055750846863,
-0.2105245441198349,
0.4678685665130615,
-0.5512008666992188,
0.4040928781032562,
-0.2362387478351593,
-0.2894870638847351,
-0.18069212138652802,
0.16497771441936493,
-0.3943527042865753,
-0.22392834722995758,
-0.09436766803264618,
0.24745556712150574,
-0.2594015896320343,
-0.1855435073375702,
0.07316473871469498,
0.1679767370223999,
-0.21050859987735748,
-0.2690373361110687,
-0.4303813874721527,
0.11013702303171158,
0.34548282623291016,
0.03312341496348381,
0.21552366018295288,
0.02860155701637268,
0.2964267134666443,
0.2667667865753174,
0.1404266357421875,
-0.1080772876739502,
0.3943465054035187,
0.34589582681655884,
-0.43700653314590454,
-0.32466766238212585,
0.17852622270584106,
0.2307170033454895,
0.15919700264930725,
0.002549764234572649,
0.29913246631622314,
-0.15603391826152802,
-0.18929971754550934,
-0.40057823061943054,
-0.4559052586555481,
0.30067384243011475,
-0.10241419821977615,
-0.10589827597141266,
-0.500930905342102,
0.4984966218471527,
0.07233494520187378,
-0.07441385835409164,
0.18918000161647797,
0.12697628140449524,
-0.2800433337688446,
0.7267438173294067,
0.12878526747226715,
0.4798225164413452,
0.1619555652141571,
0.314823180437088,
0.32137009501457214,
0.40930235385894775,
0.6762347221374512,
-0.13407361507415771,
0.20200522243976593,
-0.28613394498825073,
-0.1554766744375229,
-0.11281757801771164,
0.03362705186009407,
-0.09034695476293564,
0.37864017486572266,
-0.09350290894508362,
0.020913109183311462,
-0.512988269329071,
-0.16645656526088715,
-0.1756296157836914,
0.07913489639759064,
0.13806535303592682,
-0.04779122397303581,
0.0016751866787672043,
-0.05799470096826553,
0.1455654501914978,
0.11462755501270294,
-0.13397333025932312,
-0.31191152334213257,
0.07308636605739594,
-0.12177395820617676,
-0.00868147611618042,
-0.12359849363565445,
-0.09323151409626007,
0.7209895849227905,
0.15573984384536743,
0.11606156826019287,
0.4081271290779114,
0.48490485548973083,
-0.13194811344146729,
0.06123329699039459,
0.08404965698719025,
-0.16013643145561218,
0.0402519553899765,
0.08431121706962585,
-0.007364031858742237,
0.07898818701505661,
0.39686304330825806,
0.15007475018501282,
-0.205683171749115,
0.006552070379257202,
0.054656192660331726,
-0.14077475666999817,
-0.24147561192512512,
-0.07927899062633514,
-0.06092804670333862,
-0.6023522615432739,
-0.21911463141441345,
0.04337393119931221,
-0.16056521236896515,
0.00005173683166503906,
0.002212926745414734,
0.030620653182268143,
-0.0938718318939209,
0.40221452713012695,
0.09281715750694275,
0.02984873205423355,
0.15770916640758514,
0.2738802134990692,
0.34386077523231506,
0.14501133561134338,
0.4382210969924927,
-0.09177787601947784,
-0.14019513130187988,
-0.06619187444448471,
0.25630468130111694,
-0.23460610210895538,
0.12980592250823975,
0.3414359986782074,
0.2569684684276581,
-0.18288984894752502,
-0.23164229094982147,
0.3802390694618225,
0.03808869421482086,
0.35075005888938904,
-0.048671696335077286,
-0.3510758578777313,
-0.15580886602401733,
0.5618460178375244,
0.02780461497604847,
0.20221823453903198,
-0.21224507689476013,
-0.06481429934501648,
-0.29174304008483887,
0.1545388251543045,
-0.19997821748256683,
-0.08561837673187256,
0.169784277677536,
-0.06028050184249878,
-0.00821983814239502,
0.0120675228536129,
-0.20191551744937897,
0.13275103271007538,
0.13571609556674957,
-0.15562304854393005,
0.06661971658468246,
-0.08406554907560349,
-0.06265740096569061,
0.2322271168231964,
0.15268781781196594,
0.41126853227615356,
-0.048500239849090576,
-0.2600753605365753,
-0.08465047180652618,
-0.08673211187124252,
0.27410900592803955,
0.25091689825057983,
-0.036805734038352966,
0.4683455228805542,
0.17399293184280396,
0.4395836293697357,
-0.18149395287036896,
0.41808104515075684,
0.12469222396612167,
-0.0651220828294754,
0.22134244441986084,
-0.15747703611850739,
-0.0132296122610569,
-0.04627478867769241,
-0.4838773012161255,
0.1405802071094513,
-0.31250518560409546,
-0.01292656734585762,
0.08734878897666931,
0.08860839158296585,
-0.06084267050027847,
0.2561115026473999,
0.1277121603488922,
0.4998812973499298,
-0.266589879989624,
0.04585455358028412,
0.35151875019073486,
0.125824436545372,
-0.3162500560283661,
-0.5146944522857666,
0.17385517060756683,
0.06399936228990555,
0.051491182297468185,
0.3151783347129822,
0.24245697259902954,
-0.16735929250717163,
-0.6000824570655823,
-0.18619179725646973,
-0.5240998864173889,
0.04304271191358566,
0.34411492943763733,
0.5182865262031555,
0.3292689025402069,
-0.3191103935241699,
-0.07415395230054855,
0.31849464774131775,
0.3283960521221161,
0.16321027278900146,
-0.07763811200857162,
0.22248417139053345,
0.2616012692451477,
-0.13727805018424988,
0.19780051708221436,
-0.31071484088897705,
0.3221532702445984,
0.09522838890552521,
-0.19768208265304565,
0.17691558599472046,
-0.05870486795902252,
-0.029924459755420685,
-0.06406036019325256,
-0.13506068289279938,
-0.2749088406562805,
-0.20188777148723602,
-0.14722520112991333,
-0.04013867303729057,
0.20838724076747894,
-0.2720373570919037,
-0.34311676025390625,
-0.05415695905685425,
-0.33513227105140686,
-0.19084356725215912,
0.1271904855966568,
0.020803160965442657,
0.17698445916175842,
-0.33507925271987915,
0.4430881142616272,
0.04645475745201111,
0.7053925395011902,
-0.19802366197109222,
-0.30517578125,
0.03171408176422119,
0.012675590813159943,
0.06153289973735809,
0.11124211549758911,
-0.05149025097489357,
0.39182546734809875,
-0.21963423490524292,
0.10802021622657776,
-0.37001222372055054,
-0.04655825346708298,
0.05395288020372391,
0.030514100566506386,
0.036175090819597244,
-0.05957155302166939,
0.2198801040649414,
-0.05943073332309723,
0.026539504528045654,
-0.18234430253505707,
0.3823849856853485,
-0.2663828730583191,
-0.42339786887168884,
0.1538952887058258,
0.2512952387332916,
0.0771121010184288,
0.32394590973854065,
0.11976280063390732,
-0.3507802486419678,
-0.8069362640380859,
0.09735774993896484,
0.3467395603656769,
0.12905243039131165,
0.08094334602355957,
0.04394499957561493,
-0.3472853899002075,
0.26326194405555725,
-0.02449294552206993,
0.19056007266044617,
0.08528294414281845,
0.16956524550914764,
-0.44812458753585815,
0.10615356266498566,
0.12879294157028198,
-0.4516145586967468,
0.21007560193538666,
0.3180866539478302,
0.13741673529148102,
0.2630636692047119,
-0.4126816391944885,
-0.03990594297647476,
-0.13566327095031738,
0.1403411626815796,
-0.27579477429389954,
-0.05669594928622246,
0.05470892786979675,
0.15776535868644714,
-0.06639109551906586,
-0.21471506357192993,
0.08809938281774521,
-0.002303000073879957,
-0.05746622383594513,
0.05840505287051201,
0.00389283150434494,
-0.021728772670030594,
0.010580737143754959,
0.24787922203540802,
-0.07909681648015976,
0.11922669410705566,
0.05449569970369339,
-0.016014339402318,
0.0392758771777153,
-0.06550560146570206,
-0.1930939108133316,
0.30093473196029663,
0.10935838520526886,
0.16461879014968872,
-0.27689576148986816,
0.500413715839386,
0.05143016576766968,
-0.024577312171459198,
-0.06518383324146271,
-0.41268688440322876,
-0.25276780128479004,
0.023933714255690575,
0.01739439368247986,
0.15840190649032593,
0.0032317908480763435,
0.5869089961051941,
-0.2595438063144684,
-0.11268351972103119,
0.014796681702136993,
-0.16577878594398499,
0.23382772505283356,
-0.16162711381912231,
0.16371648013591766,
-0.15150588750839233,
0.45319831371307373,
0.25311279296875,
-0.05119749903678894,
-0.13383832573890686,
-0.11182162165641785,
0.44137558341026306,
-0.2495824098587036,
0.02602914720773697,
0.27567538619041443,
-0.013861244544386864,
-0.36011427640914917,
-0.24066458642482758,
-0.1149677038192749,
-0.33060476183891296,
0.12174397706985474,
0.05865069851279259,
-0.38554930686950684
] |
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.325080007314682,
0.20622238516807556,
-0.10531541705131531,
0.26571422815322876,
0.1269158124923706,
-0.31680142879486084,
-0.04729922488331795,
0.3888249099254608,
-0.3635145127773285,
0.6399993300437927,
-0.18331077694892883,
0.4741291403770447,
-0.317181259393692,
-0.22324226796627045,
-0.23824360966682434,
0.13935893774032593,
-0.21804794669151306,
0.4312540292739868,
-0.03089223802089691,
-0.10628961026668549,
-0.3138831853866577,
0.41243287920951843,
0.06847622990608215,
0.364105761051178,
-0.04866957664489746,
0.2811168134212494,
0.33928805589675903,
0.25214678049087524,
-0.4516153931617737,
-0.45525750517845154,
0.020647311583161354,
-0.15809978544712067,
0.09263470023870468,
0.20786798000335693,
-0.0001093326136469841,
-0.1373206079006195,
0.4591275453567505,
-0.1399277001619339,
-0.16751378774642944,
-0.3479294776916504,
-0.403876930475235,
-0.27972880005836487,
-0.1481725126504898,
-0.12173710018396378,
0.009621147066354752,
-0.3254854083061218,
0.13495683670043945,
-0.24954354763031006,
0.05881042405962944,
0.2552432119846344,
0.2176734358072281,
-0.03869839757680893,
0.291339248418808,
0.3306027054786682,
0.614509642124176,
0.06311603635549545,
-0.040092501789331436,
0.28280356526374817,
0.26677557826042175,
0.26641830801963806,
0.03859702870249748,
0.3749730885028839,
-0.24796627461910248,
-0.06853751838207245,
-0.05091480165719986,
0.03302718698978424,
0.15764495730400085,
-0.0628281757235527,
-0.035408683121204376,
0.41246289014816284,
0.6126580238342285,
-0.29987481236457825,
-0.14856421947479248,
0.008614487946033478,
0.17799875140190125,
-0.43958795070648193,
0.14194001257419586,
-0.00831892155110836,
-0.3555885851383209,
0.31426265835762024,
-0.17055995762348175,
0.12902487814426422,
0.023915663361549377,
0.04755266755819321,
0.026264771819114685,
-0.17061728239059448,
-0.1258174180984497,
-0.012756898999214172,
0.4194498062133789,
0.0074935127049684525,
-0.25135186314582825,
-0.1570550501346588,
-0.23264887928962708,
-0.06848133355379105,
-0.09898678958415985,
-0.21873962879180908,
0.06183941662311554,
-0.1902238130569458,
0.12412125617265701,
-0.1636628955602646,
0.1405649036169052,
0.1416308730840683,
-0.27621495723724365,
0.2710709869861603,
0.04534593224525452,
-0.07306791841983795,
0.10772203654050827,
-0.27067995071411133,
0.5145274996757507,
0.1038353443145752,
-0.09491650760173798,
-0.1698981523513794,
0.003669207915663719,
0.05027014762163162,
0.013772998005151749,
0.3995804190635681,
0.24058274924755096,
-0.47950631380081177,
-0.23267574608325958,
0.4320808947086334,
-0.005292907357215881,
-0.024878039956092834,
0.18971377611160278,
0.2676061689853668,
0.09850405901670456,
0.3487491011619568,
0.05797683447599411,
-0.23945249617099762,
0.06379129737615585,
-0.03660955652594566,
0.14134980738162994,
0.0007798224687576294,
-0.26581576466560364,
0.1781274974346161,
0.2547501027584076,
0.11293554306030273,
0.15441641211509705,
-0.313478022813797,
0.2667558789253235,
-0.2661728858947754,
-0.003096046857535839,
-0.17331211268901825,
0.329849511384964,
0.1569293588399887,
-0.24324463307857513,
-0.03251120448112488,
-0.16559532284736633,
-0.19235120713710785,
-0.23473051190376282,
0.23202839493751526,
-0.25395238399505615,
-0.3166375160217285,
-0.32611939311027527,
0.26101142168045044,
-0.21636579930782318,
0.4524613916873932,
0.11616411060094833,
0.025366123765707016,
-0.3328721225261688,
-0.7487348318099976,
0.2111625075340271,
-0.043177492916584015,
-0.17824095487594604,
-0.09050749242305756,
0.2755756974220276,
0.13109146058559418,
-0.24365845322608948,
0.03464818000793457,
-0.16047413647174835,
-0.39181169867515564,
-0.026694439351558685,
-0.19621995091438293,
-0.0222600270062685,
-0.12388905137777328,
-0.375639408826828,
-0.07307051122188568,
0.25161755084991455,
-0.3289281725883484,
-0.4606013298034668,
-0.09481415152549744,
-0.07200896739959717,
0.27047520875930786,
0.14760786294937134,
0.14599810540676117,
0.14807415008544922,
-0.18937313556671143,
-0.11105155944824219,
0.20856904983520508,
0.036015622317790985,
0.018760835751891136,
-0.209828183054924,
-0.20135684311389923,
-0.05475374311208725,
0.078962042927742,
-0.16790592670440674,
0.17103293538093567,
0.16454154253005981,
0.11658471077680588,
0.3391801416873932,
-0.004333965480327606,
-0.2386075258255005,
-0.2466350644826889,
0.5858112573623657,
-0.3402019739151001,
0.08289849758148193,
-0.46818339824676514,
0.17790134251117706,
0.053250253200531006,
-0.09473315626382828,
-0.10862840712070465,
-0.17907170951366425,
-0.18698562681674957,
0.14729827642440796,
-0.07652916759252548,
-0.23091010749340057,
0.1560075879096985,
0.24740931391716003,
0.5074435472488403,
-0.33731526136398315,
0.17593882977962494,
-0.3638814091682434,
-0.3036751449108124,
-0.28612276911735535,
-0.1380336731672287,
-0.050291161984205246,
0.08256859332323074,
0.16346129775047302,
-0.05952131748199463,
-0.15272676944732666,
0.3500077724456787,
0.0017115548253059387,
0.054063670337200165,
-0.05705942213535309,
0.38598349690437317,
0.03516475856304169,
0.15696656703948975,
-0.3426479995250702,
0.29120177030563354,
0.01197163574397564,
-0.33843427896499634,
-0.08676484227180481,
0.2415032833814621,
0.1130603775382042,
0.002658925950527191,
0.1383262574672699,
0.2576158344745636,
0.20742717385292053,
0.09651144593954086,
0.15820924937725067,
-0.3143143057823181,
0.04690644145011902,
-0.05426052585244179,
-0.454714834690094,
-0.1288536787033081,
0.0687890574336052,
-0.3082234263420105,
0.04496108368039131,
0.011954963207244873,
-0.24120505154132843,
-0.4975944757461548,
0.6720687747001648,
-0.15274129807949066,
-0.0028940513730049133,
0.40489640831947327,
0.13096721470355988,
0.07972811162471771,
0.18314820528030396,
0.30503183603286743,
0.34858769178390503,
0.1450759768486023,
0.10903945565223694,
-0.20415985584259033,
-0.07691352069377899,
-0.025401029735803604,
0.18483564257621765,
0.017466995865106583,
0.12014792114496231,
0.6906841397285461,
-0.026677632704377174,
-0.12685789167881012,
-0.2767479419708252,
-0.495919793844223,
-0.1703050583600998,
-0.13460713624954224,
0.015296008437871933,
-0.27146852016448975,
-0.23542270064353943,
-0.24552369117736816,
-0.4086095690727234,
-0.24520491063594818,
0.062441930174827576,
0.04395449161529541,
0.167100727558136,
0.20424707233905792,
-0.27925246953964233,
0.16982552409172058,
0.013789158314466476,
0.2019468992948532,
-0.3976108133792877,
0.08337120711803436,
-0.08743918687105179,
0.18952856957912445,
0.0057871900498867035,
0.11858358979225159,
0.04464207589626312,
-0.2026018351316452,
0.14352017641067505,
-0.08283726125955582,
0.16127188503742218,
-0.1008506491780281,
0.014463089406490326,
0.2473420947790146,
0.44933968782424927,
-0.09926646202802658,
0.309516966342926,
0.10470577329397202,
0.33706027269363403,
-0.8988005518913269,
0.2480740249156952,
0.0860353633761406,
0.16549541056156158,
0.16095101833343506,
0.2789773643016815,
0.08205897361040115,
-0.3660474121570587,
-0.007798492908477783,
-0.12413086742162704,
-0.3222849667072296,
0.10158224403858185,
-0.4329146146774292,
0.18062034249305725,
0.07000792026519775,
-0.08791248500347137,
0.5499696731567383,
-0.01314137876033783,
0.49277758598327637,
0.06685488671064377,
-0.3381249010562897,
0.09804265201091766,
-0.03208738937973976,
0.23216970264911652,
-0.19643744826316833,
0.018082302063703537,
-0.04997619614005089,
0.12929315865039825,
-0.4076002836227417,
-0.3454473912715912,
0.25507840514183044,
-0.23611649870872498,
0.07648734748363495,
-0.2677549719810486,
0.07624989002943039,
0.4104427993297577,
-0.203167125582695,
-0.17386344075202942,
-0.1300414353609085,
-0.313046932220459,
0.10689043998718262,
0.5635885000228882,
0.04054559767246246,
0.22496238350868225,
0.12628203630447388,
0.06712554395198822,
-0.10446244478225708,
-0.2815692126750946,
0.1568797528743744,
0.28572535514831543,
0.43694254755973816,
-0.040328070521354675,
0.07184476405382156,
-0.1277645379304886,
0.020050212740898132,
-0.40790921449661255,
0.28873923420906067,
0.08601019531488419,
-0.25874048471450806,
-0.2287272810935974,
0.1953759640455246,
-0.1698945164680481,
-0.2989911437034607,
-0.06914161890745163,
0.047742702066898346,
-0.08015834540128708,
0.012492619454860687,
0.27383553981781006,
0.4805371165275574,
-0.02358952909708023,
0.37148866057395935,
0.5627350211143494,
0.4371532201766968,
-0.18020819127559662,
-0.1505148857831955,
-0.7392241954803467,
0.10096096992492676,
0.004502736032009125,
0.19415047764778137,
0.4223358929157257,
-0.26118502020835876,
0.0609850212931633,
-0.13373740017414093,
-0.1281830221414566,
0.320237398147583,
0.042098015546798706,
-0.017761841416358948,
-0.086711585521698,
0.304545521736145,
0.6624308228492737,
-0.10676480829715729,
0.001619722694158554,
0.01462896354496479,
-0.13259901106357574,
0.3348552882671356,
-0.02345903217792511,
0.053892288357019424,
0.11731679737567902,
0.4344419240951538,
0.018103573471307755,
0.013942449353635311,
-0.07760144770145416,
-0.13042618334293365,
-0.17732121050357819,
-0.058633364737033844,
-0.18740281462669373,
0.09521959722042084,
-0.230835422873497,
-0.402834951877594,
0.15687774121761322,
0.12620678544044495,
0.3650140166282654,
0.009029636159539223,
0.417234867811203,
0.06615015119314194,
0.0622742734849453,
-0.14650197327136993,
0.16743719577789307,
0.12210152298212051,
0.13575103878974915,
-0.06156044080853462,
-0.09098176658153534,
0.06592673808336258,
-0.14084173738956451,
0.04733945429325104,
0.2738698422908783,
-0.0449601486325264,
-0.09398714452981949,
-0.026381492614746094,
0.021313972771167755,
-0.11328548938035965,
0.09263356029987335,
0.360894113779068,
-0.06682402640581131,
-0.26253023743629456,
-0.0959194079041481,
0.42830002307891846,
-0.27418845891952515,
-0.2158222496509552,
0.41007646918296814,
0.30442893505096436,
-0.16294413805007935,
0.32843029499053955,
-0.04132569581270218,
0.997359573841095,
0.10041896998882294,
-0.11473987996578217,
-0.12150587886571884,
-0.31060320138931274,
0.20077048242092133,
-0.39107805490493774,
0.10651130974292755,
0.07307389378547668,
-0.2791577875614166,
-0.18934383988380432,
0.050915028899908066,
0.080480195581913,
0.2466225028038025,
-0.19380082190036774,
0.22115427255630493,
0.36490899324417114,
0.0038654357194900513,
0.024648021906614304,
0.2958451509475708,
0.0268621314316988,
-0.12075723707675934,
0.004989675246179104,
0.08158115297555923,
-0.08320537209510803,
0.08740361034870148,
-0.08677122741937637,
-0.05618515610694885,
0.5456070303916931,
-0.06377692520618439,
-0.414394736289978,
-0.04926527664065361,
0.02474038116633892,
-0.10614049434661865,
-0.17951945960521698,
-0.4702014923095703,
-0.16990156471729279,
0.2526401877403259,
-0.38610219955444336,
0.44634509086608887,
-0.006512416526675224,
0.18606796860694885,
-0.10591157525777817,
0.6259040832519531,
0.028885262086987495,
-0.0714711844921112,
0.14579898118972778,
-0.043897662311792374,
-0.0674741268157959,
0.32463616132736206,
-0.0872262492775917,
-0.14358635246753693,
0.4814707040786743,
-0.048491209745407104,
0.12762576341629028,
0.2140480875968933,
-0.11297564208507538,
0.06099715828895569,
-0.23002347350120544,
-0.10508282482624054,
0.19094696640968323,
0.08564131706953049,
-0.474629282951355,
0.187051922082901,
0.01765359193086624,
-0.22598706185817719,
0.07165132462978363,
0.00409572571516037,
-0.20901954174041748,
-0.05471781641244888,
0.0392799936234951,
-0.125213161110878,
-0.046476058661937714,
-0.05072580650448799,
-0.07347925007343292,
-0.20018529891967773,
-0.2113415002822876,
-0.014570369385182858,
0.07134222239255905,
-0.11812055110931396,
-0.10499804466962814,
-0.2976352572441101,
-0.010631877928972244,
0.038872115314006805,
-0.3465324640274048,
-0.39057791233062744,
-0.10019995272159576,
0.3078259229660034,
0.0762527585029602,
0.5631844997406006,
-0.11810646951198578,
0.0746859759092331,
-0.24336837232112885,
-0.4577331244945526,
-0.3201034665107727,
0.0957486480474472,
-0.4220866560935974,
0.2343488484621048,
-0.26214900612831116,
0.43308356404304504,
-0.12236251682043076,
-0.0845097005367279,
0.11340472102165222,
0.3803442716598511,
0.08468049019575119,
-0.07787496596574783,
-0.06010657176375389,
0.18513888120651245,
0.15043720602989197,
0.24838663637638092,
-0.0619940385222435,
-0.14142298698425293,
0.11899761855602264,
-0.20118382573127747,
-0.056244704872369766,
0.12871727347373962,
-0.11167147755622864,
0.3319874405860901,
-0.2250579446554184,
0.16310447454452515,
0.0702061578631401,
0.10349536687135696,
-0.020308606326580048,
0.4221234917640686,
0.0894259586930275,
0.28777608275413513,
-0.17851245403289795,
-0.07935108989477158,
0.02730889990925789,
0.19165633618831635,
-0.10701103508472443,
-0.07100212574005127,
0.3818330764770508,
0.42656785249710083,
-0.09323972463607788,
0.1608300507068634,
0.38119614124298096,
0.14298748970031738,
-0.22076267004013062,
-0.19406592845916748,
0.32219573855400085,
0.22922492027282715,
0.09677630662918091,
-0.1265949308872223,
-0.28320860862731934,
-0.32191213965415955,
0.05207805708050728,
-0.05103377252817154,
-0.21425698697566986,
-0.17910730838775635,
0.41984492540359497,
-0.042131297290325165,
0.2609703540802002,
-0.0664813295006752,
0.06412498652935028,
0.24673093855381012,
-0.20751789212226868,
0.10107317566871643,
-0.15857639908790588,
-0.16828115284442902,
0.27206313610076904,
0.316103994846344,
-0.2915102541446686,
0.182201087474823,
0.19667577743530273,
0.1256175935268402,
-0.00830492377281189,
-0.05644160509109497,
-0.042029086500406265,
0.23570352792739868,
0.022018030285835266,
0.3640440106391907,
0.41025310754776,
-0.00717201828956604,
-0.4408739507198334,
0.24378614127635956,
-0.0997743159532547,
-0.3109509348869324,
-0.037403203547000885,
0.10017828643321991,
0.06346318870782852,
-0.10731431841850281,
-0.04963075369596481,
0.12351296842098236,
0.09150265902280807,
0.2972021996974945,
-0.11384618282318115,
0.014166507869958878,
0.10130271315574646,
0.2639033794403076,
-0.11333749443292618,
0.04610920324921608,
0.2757754325866699,
-0.33031341433525085,
-0.03778071701526642,
0.6085140705108643,
0.2069787085056305,
0.4897293746471405,
-0.06731986999511719,
-0.08703570067882538,
0.20715725421905518,
0.016647648066282272,
0.02395055815577507,
-0.31139689683914185,
-0.021860502660274506,
-0.14176888763904572,
0.345609575510025,
0.1363428831100464,
0.07882145047187805,
0.38122671842575073,
0.22636616230010986,
-0.13082775473594666,
-0.013132207095623016,
0.05384126305580139,
-0.015311509370803833,
-0.4158232808113098,
0.16599135100841522,
0.07020378112792969,
-0.125188946723938,
-0.044042088091373444,
-0.08964396268129349,
-0.22996053099632263,
-0.2457023710012436,
0.13282720744609833,
0.08417632430791855,
-0.12648335099220276,
0.2464057207107544,
0.0901145413517952,
-0.12895219027996063,
-0.22505629062652588,
0.28035300970077515,
0.04217464476823807,
-0.08706014603376389,
-0.21031001210212708,
-0.601995050907135,
0.12427231669425964,
0.3114735782146454,
-0.01812194474041462,
-0.014012482017278671,
-0.2555786371231079,
0.15924710035324097,
0.07860700786113739,
-0.28579002618789673,
-0.08433948457241058,
0.048236384987831116,
0.16656918823719025,
-0.22005560994148254,
-0.4779348373413086,
-0.067501500248909,
-0.002125529572367668,
-0.20410828292369843,
-0.36321336030960083,
0.05102796480059624,
0.05991160497069359,
0.11306191235780716,
-0.06649845093488693,
0.00719645619392395,
-0.40739905834198,
-0.15897692739963531,
0.4003155529499054,
0.18182148039340973,
0.23581549525260925,
-0.39797574281692505,
-0.16993820667266846,
0.2916753590106964,
0.06490496546030045,
0.13532333076000214,
-0.27180084586143494,
-0.18129011988639832,
0.5219826698303223,
0.22347384691238403,
0.4695722758769989,
-0.35451608896255493,
0.29461929202079773,
-0.06790725886821747,
0.2128654569387436,
-0.46690282225608826,
-0.020937347784638405,
-0.150242879986763,
-0.03563955798745155,
-0.04311202093958855,
0.1673310399055481,
0.21832875907421112,
0.10529442876577377,
-0.2948698401451111,
-0.12535887956619263,
0.6542754173278809,
0.021282464265823364,
0.01721154898405075,
-0.0024315628688782454,
0.504578709602356,
-0.03073720633983612,
0.08774362504482269,
-0.7740521430969238,
-0.10694116353988647,
0.11625488102436066,
0.022862913087010384,
-0.30058664083480835,
-0.12152999639511108,
-0.09312181174755096,
0.012186747044324875,
-0.04616717994213104,
0.09217773377895355,
0.3207932710647583,
-0.29542097449302673,
0.15304319560527802,
-0.24363891780376434
] |
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.23499369621276855,
0.25069087743759155,
-0.08755706995725632,
0.02398011088371277,
0.05561872571706772,
-0.26540830731391907,
-0.087335005402565,
0.45494359731674194,
-0.26085108518600464,
0.6982676386833191,
-0.07927187532186508,
0.5527425408363342,
-0.3463275730609894,
-0.06029088795185089,
-0.3464599847793579,
0.06985893845558167,
-0.19057688117027283,
0.4925203323364258,
0.21568560600280762,
-0.16335797309875488,
-0.34169909358024597,
0.3833228051662445,
0.056041568517684937,
0.4037438631057739,
-0.06591230630874634,
0.17300169169902802,
0.39148083329200745,
0.288067102432251,
-0.4241200387477875,
-0.6054302453994751,
0.04185401648283005,
-0.07319428026676178,
0.14009085297584534,
0.19375985860824585,
-0.00011647619248833507,
-0.06401879340410233,
0.5130718350410461,
-0.13276061415672302,
-0.09934565424919128,
-0.32308536767959595,
-0.2152007520198822,
-0.3558833599090576,
-0.22007887065410614,
-0.15004171431064606,
-0.08073955774307251,
-0.4076053202152252,
0.26606419682502747,
-0.28954094648361206,
0.10880804806947708,
0.26886996626853943,
0.13317644596099854,
0.04562242329120636,
0.21263433992862701,
0.3601350784301758,
0.49177438020706177,
0.19587959349155426,
-0.100135937333107,
0.3587965965270996,
0.36389151215553284,
0.0834057480096817,
-0.02635951340198517,
0.4324643909931183,
-0.13258865475654602,
0.05631216987967491,
-0.012152791023254395,
0.05773439258337021,
0.19499388337135315,
-0.1449403464794159,
-0.15689080953598022,
0.6113983392715454,
0.39189085364341736,
-0.2256876528263092,
-0.19239847362041473,
-0.201421856880188,
0.10039859265089035,
-0.4426315426826477,
0.06967394053936005,
-0.036601707339286804,
-0.4258538782596588,
0.2761930227279663,
0.001214442541822791,
0.12320287525653839,
-0.10323779284954071,
0.05506806820631027,
0.15327870845794678,
-0.1738443374633789,
-0.07933377474546432,
0.06676743924617767,
0.4966657757759094,
0.05619886517524719,
-0.21412624418735504,
-0.14149504899978638,
-0.014541290700435638,
-0.07073013484477997,
-0.07731194794178009,
-0.30292555689811707,
0.12933377921581268,
-0.33442845940589905,
0.12206458300352097,
-0.09940542280673981,
-0.10168974101543427,
0.034808047115802765,
-0.25056347250938416,
0.2580146789550781,
0.056423578411340714,
-0.2132367491722107,
0.09338557720184326,
-0.1530706286430359,
0.3342733383178711,
0.16703936457633972,
-0.05704670399427414,
-0.15436002612113953,
0.1348787248134613,
0.07513877004384995,
-0.05166611820459366,
0.382661372423172,
0.3546552062034607,
-0.49296602606773376,
-0.3325035572052002,
0.35427412390708923,
-0.2337588369846344,
-0.032914597541093826,
0.09967809170484543,
0.32885441184043884,
0.08414867520332336,
0.3501633405685425,
0.046075113117694855,
-0.21872682869434357,
0.027827994897961617,
-0.11077775061130524,
0.15118376910686493,
0.10913869738578796,
-0.4631348252296448,
0.08903879672288895,
0.17370089888572693,
0.03867504000663757,
0.2081417739391327,
-0.34032565355300903,
0.28841716051101685,
-0.2867625951766968,
0.16593678295612335,
-0.1487274318933487,
0.37288808822631836,
0.19531294703483582,
-0.19874896109104156,
-0.06087486445903778,
0.0007523708045482635,
-0.20637544989585876,
-0.2784425616264343,
0.23553332686424255,
-0.13226857781410217,
-0.21304966509342194,
-0.24248643219470978,
0.1702917516231537,
-0.2684935927391052,
0.3653542101383209,
0.21630030870437622,
0.18011310696601868,
-0.31390079855918884,
-0.6880707740783691,
0.2766195833683014,
-0.10109005868434906,
-0.27292221784591675,
-0.07493291795253754,
0.11815955489873886,
0.29793521761894226,
-0.17591658234596252,
-0.06666791439056396,
-0.3140404522418976,
-0.47908154129981995,
0.20267947018146515,
-0.19817566871643066,
0.09099004417657852,
-0.1473349630832672,
-0.4196755886077881,
0.0018926635384559631,
0.3087175190448761,
-0.36220693588256836,
-0.30036261677742004,
0.12858173251152039,
-0.1336774230003357,
0.3044016659259796,
0.26749956607818604,
0.15836600959300995,
0.0016569700092077255,
-0.2621529698371887,
-0.16490504145622253,
0.1303633451461792,
-0.11612865328788757,
-0.04527267441153526,
-0.21276795864105225,
-0.23712334036827087,
0.06262359023094177,
0.11093491315841675,
0.03076368384063244,
0.13851553201675415,
0.19591304659843445,
0.04119543358683586,
0.5318983197212219,
0.06032953038811684,
-0.22134412825107574,
-0.275029718875885,
0.6655052900314331,
-0.1688157021999359,
-0.027754461392760277,
-0.45813554525375366,
0.43881288170814514,
0.008572015911340714,
-0.33642905950546265,
-0.03749294579029083,
-0.06668731570243835,
-0.24211986362934113,
-0.025535540655255318,
-0.08312023431062698,
-0.15898612141609192,
0.09485834836959839,
0.16128239035606384,
0.4980529546737671,
-0.2698378264904022,
0.25916630029678345,
-0.3203546106815338,
-0.3035058081150055,
-0.469403475522995,
-0.0767500028014183,
0.021227829158306122,
0.07227683812379837,
0.15468525886535645,
-0.0870681032538414,
-0.011537238955497742,
0.32322534918785095,
0.13525040447711945,
0.024970438331365585,
-0.049906689673662186,
0.34476959705352783,
0.03374190628528595,
0.10653268545866013,
-0.27618464827537537,
0.21356575191020966,
-0.05043084919452667,
-0.4176715314388275,
0.007287980988621712,
0.4966205358505249,
0.0010460377670824528,
0.09480022639036179,
0.037349507212638855,
0.3570552170276642,
0.04475712403655052,
0.08758530765771866,
-0.01997656375169754,
-0.15390899777412415,
-0.07693106681108475,
-0.18822960555553436,
-0.529969334602356,
-0.0883534848690033,
0.15097039937973022,
-0.3901367485523224,
0.01200031116604805,
-0.014683878049254417,
-0.32424119114875793,
-0.4586590528488159,
0.6255930066108704,
-0.18411703407764435,
-0.17023703455924988,
0.3949860632419586,
0.2663081884384155,
0.06111247092485428,
0.26141902804374695,
0.23232023417949677,
0.40519440174102783,
0.17943672835826874,
-0.0634257048368454,
-0.15269753336906433,
-0.20107963681221008,
-0.04825024679303169,
0.13033804297447205,
0.10038495063781738,
0.07592995464801788,
0.5913273096084595,
-0.11160077154636383,
-0.14722061157226562,
-0.35209959745407104,
-0.5800232291221619,
-0.22091646492481232,
-0.13202910125255585,
0.011958654969930649,
-0.1586238145828247,
-0.03607432544231415,
-0.4584788978099823,
-0.48421192169189453,
-0.31983745098114014,
0.14962202310562134,
-0.012668494135141373,
0.16838373243808746,
0.10197898745536804,
-0.2569260895252228,
0.20092035830020905,
-0.04367415979504585,
0.17616692185401917,
-0.29570886492729187,
0.007560962811112404,
-0.017632368952035904,
0.2858242690563202,
-0.023173507302999496,
0.08360280096530914,
0.024894293397665024,
0.06285931915044785,
0.262430340051651,
-0.09051372855901718,
0.07008716464042664,
-0.10504229366779327,
-0.06359677016735077,
0.19306878745555878,
0.30831795930862427,
0.014838157221674919,
0.397844523191452,
0.11563364416360855,
0.3360450863838196,
-0.7889325022697449,
0.11243212968111038,
-0.11441618949174881,
0.14168567955493927,
-0.03358602523803711,
0.275627464056015,
0.15235215425491333,
-0.27052465081214905,
-0.1863337755203247,
-0.19577983021736145,
-0.343595027923584,
0.05497321859002113,
-0.39029064774513245,
0.16770213842391968,
0.33577126264572144,
-0.03478961065411568,
0.5747385621070862,
0.0946677178144455,
0.30366313457489014,
-0.017520444467663765,
-0.2837790250778198,
-0.021054115146398544,
0.06685417890548706,
0.25471407175064087,
-0.08945637941360474,
-0.06321214139461517,
-0.25632795691490173,
0.018658846616744995,
-0.3087717890739441,
-0.531834602355957,
0.21317315101623535,
-0.1845022290945053,
0.022143421694636345,
-0.2020644247531891,
-0.026432693004608154,
0.33490079641342163,
-0.14513957500457764,
-0.08428271859884262,
-0.050223711878061295,
-0.17372596263885498,
0.03368356078863144,
0.6399444341659546,
0.13458551466464996,
0.2021079957485199,
0.09581804275512695,
0.08138904720544815,
0.17313677072525024,
-0.27839192748069763,
0.26287829875946045,
0.3188632130622864,
0.5251576900482178,
0.272217720746994,
0.1322566121816635,
0.003292827634140849,
0.17529147863388062,
-0.4417855143547058,
0.1916755735874176,
0.01727006770670414,
-0.19361665844917297,
-0.06240728124976158,
0.15098172426223755,
-0.16425363719463348,
-0.2697288691997528,
-0.10966520011425018,
0.10843311995267868,
0.003054201602935791,
-0.0996847152709961,
0.22508487105369568,
0.4303279519081116,
-0.008900055661797523,
0.26357337832450867,
0.7091489434242249,
0.6030258536338806,
-0.03255338966846466,
-0.3609011769294739,
-0.7024614810943604,
0.033215124160051346,
-0.1432083398103714,
0.24894919991493225,
0.4139469265937805,
-0.3110957145690918,
0.11181319504976273,
0.001174822449684143,
-0.012143313884735107,
0.46543240547180176,
-0.05397979915142059,
-0.09241707623004913,
-0.13214170932769775,
0.32196494936943054,
0.588615894317627,
-0.20154745876789093,
-0.11262036859989166,
0.1446656733751297,
-0.11915291845798492,
0.22860087454319,
-0.08546476066112518,
-0.0071333711966872215,
0.16703671216964722,
0.4447537064552307,
0.08526909351348877,
0.013368709944188595,
-0.08778884261846542,
-0.2714398503303528,
-0.22719641029834747,
0.14958372712135315,
-0.051440052688121796,
0.08501508086919785,
-0.23526398837566376,
-0.3160477578639984,
0.19992631673812866,
0.27386370301246643,
0.48014920949935913,
0.06878136098384857,
0.389706015586853,
0.19631215929985046,
-0.07757377624511719,
-0.12362481653690338,
0.13433237373828888,
0.20059454441070557,
0.12664785981178284,
-0.141611710190773,
-0.09359809756278992,
0.02326202392578125,
-0.1154964417219162,
0.07915112376213074,
0.4542868435382843,
0.00240899994969368,
0.00947781652212143,
0.024324161931872368,
0.15623176097869873,
-0.11303386092185974,
0.2287178337574005,
0.21971067786216736,
0.026509780436754227,
-0.3204971253871918,
-0.231472909450531,
0.5157607197761536,
-0.2155168354511261,
-0.27851980924606323,
0.3394339680671692,
0.2793477177619934,
-0.11077119410037994,
0.43509864807128906,
0.00942268967628479,
1.016017198562622,
0.007905684411525726,
-0.14214545488357544,
0.014553658664226532,
-0.24643951654434204,
0.38533225655555725,
-0.450660765171051,
0.08403145521879196,
0.05477176979184151,
-0.4080018699169159,
-0.19009284675121307,
0.050907086580991745,
0.169969379901886,
0.16942156851291656,
-0.2756403088569641,
0.3194516897201538,
0.4131614565849304,
-0.158386692404747,
0.19714456796646118,
0.37301939725875854,
-0.08929158747196198,
-0.018981553614139557,
-0.05116747319698334,
0.014586709439754486,
-0.10142263770103455,
0.23553793132305145,
0.012908872216939926,
-0.22948148846626282,
0.3832208812236786,
-0.0011494606733322144,
-0.45499545335769653,
-0.12977565824985504,
0.08535352349281311,
-0.1301700621843338,
0.03047877363860607,
-0.43308353424072266,
-0.021159512922167778,
0.24029181897640228,
-0.18876849114894867,
0.4036574959754944,
-0.027951745316386223,
0.15526245534420013,
-0.023883670568466187,
0.3422278165817261,
-0.11024702340364456,
-0.12983015179634094,
0.3400849401950836,
-0.056531503796577454,
-0.19723735749721527,
0.45023974776268005,
-0.14151741564273834,
-0.21635353565216064,
0.32404935359954834,
-0.048770688474178314,
-0.015344515442848206,
0.1629505306482315,
-0.19850388169288635,
-0.018856383860111237,
-0.2723231911659241,
-0.02409740537405014,
0.11843399703502655,
0.1260056495666504,
-0.49776095151901245,
0.25291258096694946,
0.18827809393405914,
-0.2112019807100296,
0.04301938787102699,
-0.13922744989395142,
-0.10649958997964859,
0.009083937853574753,
0.03312798961997032,
-0.15648207068443298,
0.05845534801483154,
0.014891080558300018,
-0.17539934813976288,
-0.2775364816188812,
-0.011693846434354782,
0.012337029911577702,
0.1919422298669815,
-0.07815533131361008,
-0.031053481623530388,
-0.23025664687156677,
0.1256101429462433,
0.22011315822601318,
-0.34201130270957947,
-0.4277033507823944,
-0.14969395101070404,
0.17805352807044983,
0.04210791736841202,
0.5871782898902893,
-0.13026893138885498,
0.27746930718421936,
-0.22232966125011444,
-0.49826160073280334,
-0.27165865898132324,
0.06272929906845093,
-0.49916213750839233,
0.15814782679080963,
-0.13549549877643585,
0.4078916907310486,
-0.11135544627904892,
-0.18724368512630463,
0.005728688091039658,
0.3741267919540405,
-0.045918066054582596,
0.028759941458702087,
-0.1084630936384201,
0.20035317540168762,
0.1820686161518097,
0.09792321920394897,
0.008640894666314125,
-0.11019639670848846,
0.19513800740242004,
-0.12206442654132843,
-0.21835505962371826,
0.21420204639434814,
-0.13572214543819427,
0.36314114928245544,
-0.3395014703273773,
0.0006814524531364441,
0.06759853661060333,
0.10831663012504578,
-0.14351357519626617,
0.2521805167198181,
0.11688494682312012,
0.2977897822856903,
-0.01856735534965992,
-0.05691314488649368,
-0.03186510130763054,
0.21865275502204895,
-0.07651308178901672,
-0.134352445602417,
0.2908026874065399,
0.5389509797096252,
-0.2065875083208084,
0.18580958247184753,
0.2677815854549408,
0.22845861315727234,
-0.21246664226055145,
-0.10657845437526703,
0.24180591106414795,
0.17307931184768677,
-0.07366760075092316,
-0.0198507197201252,
-0.31772738695144653,
-0.283726304769516,
0.13020993769168854,
0.14074134826660156,
-0.12190745770931244,
-0.2004179060459137,
0.4262310862541199,
0.07589872926473618,
0.2470829039812088,
0.161760151386261,
0.11189484596252441,
0.3006933033466339,
-0.1513318568468094,
0.06813706457614899,
-0.060204386711120605,
-0.24899283051490784,
0.2507275640964508,
0.17502567172050476,
-0.20349302887916565,
0.2927675247192383,
0.035128477960824966,
0.08030112087726593,
-0.3376147449016571,
0.0004811137914657593,
0.026149770244956017,
0.4681928753852844,
-0.1082926094532013,
0.3335976004600525,
0.4713786244392395,
0.11914952844381332,
-0.5242177248001099,
0.17242489755153656,
-0.07706994563341141,
-0.3031218945980072,
0.020084349438548088,
0.0401473194360733,
0.025628522038459778,
-0.034918926656246185,
-0.1839856207370758,
0.07305671274662018,
0.28463417291641235,
0.22204084694385529,
-0.21276268362998962,
-0.013790532946586609,
0.02349228411912918,
0.3108746409416199,
-0.06899361312389374,
0.1640574336051941,
0.3368086814880371,
-0.29678934812545776,
-0.2553691565990448,
0.41075122356414795,
0.1352706253528595,
0.5711640119552612,
-0.13228580355644226,
0.03977876156568527,
0.10387719422578812,
0.03550577163696289,
-0.08698383718729019,
-0.21764107048511505,
0.011975808069109917,
-0.06099111586809158,
0.23916539549827576,
0.11144816130399704,
0.048145998269319534,
0.36672303080558777,
0.13839976489543915,
-0.11180299520492554,
0.032275691628456116,
-0.05544917657971382,
-0.10059557855129242,
-0.4952578544616699,
0.29746681451797485,
0.08666232228279114,
0.01606784760951996,
-0.09051986038684845,
-0.0343036875128746,
-0.22049197554588318,
-0.19293394684791565,
0.08742868900299072,
-0.0006773457862436771,
-0.13735875487327576,
0.24565529823303223,
0.052816785871982574,
-0.20081031322479248,
-0.4368229806423187,
0.3480188250541687,
0.06528329104185104,
-0.2249106466770172,
-0.1583842635154724,
-0.5565834641456604,
0.03769921511411667,
0.19313718378543854,
-0.0742596983909607,
0.010163194499909878,
-0.3441937267780304,
-0.0185345858335495,
0.10628063231706619,
-0.27611005306243896,
0.08879699558019638,
-0.01287008449435234,
0.19917739927768707,
-0.15815424919128418,
-0.43970540165901184,
-0.09203079342842102,
0.01583850383758545,
-0.10788460075855255,
-0.35361650586128235,
-0.06852096319198608,
0.06084280088543892,
0.0500638484954834,
-0.1247434914112091,
0.007315218448638916,
-0.3840760290622711,
-0.10894805192947388,
0.35951346158981323,
0.20480608940124512,
0.3648485839366913,
-0.4073484241962433,
-0.2967878580093384,
0.33366504311561584,
0.11193161457777023,
-0.09624193608760834,
-0.2703551650047302,
-0.2002195417881012,
0.6860784292221069,
0.13435639441013336,
0.4167638421058655,
-0.3278658092021942,
0.440132200717926,
0.019212812185287476,
0.17998313903808594,
-0.399809330701828,
0.015526963397860527,
-0.3630967140197754,
-0.008783908560872078,
-0.06619982421398163,
0.13540410995483398,
0.26750054955482483,
0.18959209322929382,
-0.3330322504043579,
-0.10853622108697891,
0.6840758323669434,
-0.04505039379000664,
0.07843415439128876,
-0.03642203286290169,
0.41208744049072266,
-0.11753635853528976,
0.10095354914665222,
-0.712501585483551,
-0.14927753806114197,
0.10284590721130371,
0.12093180418014526,
-0.2878018319606781,
-0.09865961968898773,
-0.13914312422275543,
-0.049407634884119034,
0.10003805160522461,
-0.0030257031321525574,
0.2538464069366455,
-0.32206034660339355,
0.2660309672355652,
-0.30777835845947266
] |
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.18714353442192078,
-0.2914623022079468,
-0.20474490523338318,
0.2455594390630722,
0.14909157156944275,
-0.09316441416740417,
0.3255345821380615,
0.5325322151184082,
-0.18145301938056946,
0.2625061869621277,
-0.038032419979572296,
0.262340247631073,
-0.2751730978488922,
0.08463217318058014,
-0.13702034950256348,
-0.14146853983402252,
-0.1157294288277626,
0.22831575572490692,
0.012344546616077423,
0.16184987127780914,
-0.222006693482399,
0.11598175019025803,
-0.2556491792201996,
0.18379506468772888,
-0.17824147641658783,
-0.1344490647315979,
0.011586392298340797,
0.04897989705204964,
-0.18314331769943237,
-0.42815518379211426,
0.23486582934856415,
-0.4223311245441437,
0.175195574760437,
0.7575786709785461,
-0.00010833809938048944,
0.2082124501466751,
0.20941293239593506,
-0.06108154356479645,
-0.27399665117263794,
-0.03218691051006317,
0.274000883102417,
-0.0818336009979248,
-0.06049386411905289,
-0.3403692841529846,
-0.1088770255446434,
-0.11809555441141129,
-0.09112488478422165,
0.08609171211719513,
0.29192107915878296,
0.3951644003391266,
0.2997710108757019,
0.5734034776687622,
0.1573595255613327,
-0.004583497531712055,
0.3959799110889435,
-0.29862362146377563,
-0.172372505068779,
0.12629307806491852,
0.23063530027866364,
-0.1093030571937561,
-0.34403863549232483,
0.330562025308609,
0.1133640706539154,
-0.02694791555404663,
-0.05634980648756027,
-0.06686907261610031,
0.2953077554702759,
-0.3012378513813019,
-0.06857764720916748,
0.06763118505477905,
0.10988862067461014,
-0.12438356131315231,
-0.2887358069419861,
-0.22405388951301575,
-0.03386140987277031,
-0.19806484878063202,
0.12846556305885315,
-0.043514788150787354,
-0.1856130063533783,
0.07850777357816696,
0.1347329020500183,
0.258441299200058,
-0.2038278877735138,
-0.08753199875354767,
-0.2553592920303345,
0.6709121465682983,
0.020245639607310295,
-0.05585084855556488,
0.33799058198928833,
-0.05998620390892029,
0.5446831583976746,
0.18543943762779236,
0.0979662835597992,
0.11614890396595001,
-0.2477012723684311,
-0.29859352111816406,
0.20119887590408325,
-0.2829151153564453,
-0.0849229171872139,
0.09727337211370468,
0.07094448804855347,
-0.06162431091070175,
0.3650721609592438,
-0.052364639937877655,
-0.014383170753717422,
0.4467042088508606,
-0.15327757596969604,
0.5062338709831238,
0.1982465386390686,
0.17897863686084747,
-0.16833145916461945,
-0.020264409482479095,
-0.1286522001028061,
-0.3499357998371124,
0.1499236524105072,
0.23463651537895203,
0.021753385663032532,
0.19096112251281738,
-0.24433372914791107,
0.19440509378910065,
-0.07797808945178986,
0.043600015342235565,
0.3095034956932068,
0.4014035761356354,
-0.03745175898075104,
0.09660645574331284,
0.06738600134849548,
0.023932695388793945,
-0.2806928753852844,
0.06229659542441368,
-0.30563241243362427,
0.19659918546676636,
-0.16432806849479675,
-0.39630427956581116,
-0.02458157390356064,
-0.2687660753726959,
0.2929767966270447,
-0.1146547868847847,
0.15901930630207062,
-0.014126494526863098,
-0.09130723774433136,
-0.33500316739082336,
0.14612260460853577,
0.24083729088306427,
-0.16986195743083954,
-0.10555285960435867,
0.23871347308158875,
-0.025853097438812256,
0.04862958937883377,
0.23754048347473145,
-0.296866238117218,
-0.34185126423835754,
-0.006349323317408562,
0.34359022974967957,
-0.06685329228639603,
0.12879887223243713,
0.11334557831287384,
-0.19896115362644196,
0.2983201742172241,
-0.14637339115142822,
0.10355022549629211,
-0.3912956118583679,
-0.01817205175757408,
-0.2944870591163635,
0.23657548427581787,
0.16322506964206696,
-0.13177530467510223,
0.0561787486076355,
0.1417316049337387,
0.12213099002838135,
0.038868248462677,
0.34022268652915955,
-0.22736944258213043,
0.5167084336280823,
-0.3468836843967438,
0.2756422758102417,
0.41289782524108887,
-0.33041518926620483,
-0.6089486479759216,
0.10945837199687958,
-0.35415029525756836,
-0.04571148380637169,
0.05311036854982376,
0.02454274892807007,
0.15998367965221405,
0.02223958633840084,
0.32933661341667175,
0.13692456483840942,
-0.15804500877857208,
0.1062551811337471,
-0.29543039202690125,
-0.016460493206977844,
0.029703043401241302,
0.0708029717206955,
0.5823967456817627,
-0.15623259544372559,
-0.16840216517448425,
-0.07712585479021072,
0.1492237150669098,
-0.0044878460466861725,
-0.06784484535455704,
0.15214771032333374,
0.1257767230272293,
-0.06109239161014557,
0.18609200417995453,
-0.15553328394889832,
-0.09390140324831009,
0.17169055342674255,
-0.3512202799320221,
0.0024178773164749146,
-0.16034545004367828,
0.06807956844568253,
-0.3319402039051056,
0.09542260318994522,
-0.3371698260307312,
-0.21672523021697998,
0.30126744508743286,
-0.03416414558887482,
0.12392167747020721,
-0.08956103026866913,
-0.22292611002922058,
-0.1809651404619217,
-0.14711737632751465,
0.0202627032995224,
-0.14298468828201294,
0.22384561598300934,
-0.36543071269989014,
-0.2202053964138031,
-0.22680141031742096,
0.20460796356201172,
0.12361212074756622,
-0.19334787130355835,
-0.13438117504119873,
0.23267313838005066,
-0.030541641637682915,
-0.06749960780143738,
-0.12533098459243774,
-0.13171707093715668,
-0.02844359166920185,
-0.029998203739523888,
-0.11272303014993668,
0.25503793358802795,
0.2563101351261139,
-0.03482292219996452,
0.15667054057121277,
0.6024567484855652,
-0.00960724800825119,
0.226262629032135,
0.023610256612300873,
-0.24804766476154327,
0.020300934091210365,
-0.14201092720031738,
-0.021308977156877518,
0.18926498293876648,
0.28536516427993774,
-0.15169881284236908,
0.24494825303554535,
-0.16666744649410248,
-0.22648677229881287,
-0.1884656548500061,
0.12422008812427521,
0.04751506820321083,
0.0963224321603775,
0.12619158625602722,
-0.09768866747617722,
0.13039273023605347,
-0.24088987708091736,
0.09318001568317413,
0.26191213726997375,
0.24852263927459717,
0.009734097868204117,
-0.039467260241508484,
0.13311916589736938,
-0.12963882088661194,
0.20925459265708923,
0.08470836281776428,
0.2297535091638565,
0.5835293531417847,
0.11171872913837433,
0.050227437168359756,
-0.17743539810180664,
-0.3453413248062134,
-0.09198636561632156,
0.4372390806674957,
-0.2200707346200943,
0.260189026594162,
0.09873160719871521,
-0.06213626265525818,
-0.1576457917690277,
-0.3469374477863312,
0.036287106573581696,
-0.3373744487762451,
0.18771475553512573,
0.2631378173828125,
-0.1841069757938385,
0.12827478349208832,
-0.12180638313293457,
-0.005365833640098572,
0.3337639272212982,
0.039512380957603455,
0.06327320635318756,
-0.11102351546287537,
-0.15119382739067078,
0.21353983879089355,
0.20900632441043854,
-0.31790071725845337,
0.16440916061401367,
-0.12646779417991638,
-0.003147691488265991,
0.010359236970543861,
-0.2836935520172119,
0.09914635121822357,
-0.2120809108018875,
0.10906053334474564,
0.23379619419574738,
0.231482595205307,
-0.3687378764152527,
-0.22416123747825623,
0.2633112967014313,
-0.3992278277873993,
-0.23665408790111542,
0.03492460027337074,
0.11430953443050385,
0.19671937823295593,
-0.0864332765340805,
-0.3299187123775482,
-0.1772039234638214,
-0.4696308672428131,
0.06652975082397461,
-0.08988597244024277,
0.20996667444705963,
0.44876599311828613,
0.18252918124198914,
0.2639417052268982,
0.36439576745033264,
-0.0712902843952179,
0.02901727519929409,
-0.1778632551431656,
0.44092169404029846,
-0.061473965644836426,
-0.2923325300216675,
-0.26300859451293945,
-0.33668965101242065,
0.13084940612316132,
-0.13686858117580414,
-0.4268147349357605,
0.09110459685325623,
-0.09786319732666016,
-0.1090797483921051,
-0.23417910933494568,
0.12735475599765778,
0.2837292551994324,
-0.032515525817871094,
-0.2429608702659607,
-0.004171460866928101,
0.05569157376885414,
-0.08118826895952225,
0.007200699299573898,
0.09598366171121597,
-0.10182016342878342,
0.28202763199806213,
0.14224790036678314,
0.8831390142440796,
-0.011805115267634392,
-0.0295867957174778,
0.115605428814888,
-0.016876013949513435,
0.05568129941821098,
-0.1177447959780693,
-0.32656607031822205,
-0.09618160873651505,
0.12953202426433563,
-0.2556508779525757,
0.2573155164718628,
-0.11745967715978622,
-0.14738623797893524,
-0.06015655770897865,
-0.09893764555454254,
-0.20951619744300842,
-0.1885662078857422,
0.4506501853466034,
-0.1504627913236618,
0.07783391326665878,
-0.24638907611370087,
0.16143351793289185,
-0.15593348443508148,
0.04751013591885567,
-0.1022527664899826,
-0.03212505578994751,
-0.01638975739479065,
-0.20645295083522797,
-0.1192706972360611,
-0.47222936153411865,
-0.3778592348098755,
0.14187189936637878,
0.2857676148414612,
0.36309513449668884,
0.1994830220937729,
-0.41549932956695557,
0.09981948882341385,
-0.21379289031028748,
0.6662430763244629,
0.12274596095085144,
0.03897782042622566,
0.20780152082443237,
-0.15993203222751617,
-0.29537150263786316,
-0.31963837146759033,
-0.19805392622947693,
0.13109730184078217,
0.23291219770908356,
0.38940805196762085,
0.023314669728279114,
0.054156601428985596,
0.09992668032646179,
-0.04059712588787079,
-0.14357127249240875,
-0.3029596209526062,
-0.29462653398513794,
-0.23793736100196838,
-0.16782450675964355,
0.5118195414543152,
0.27475354075431824,
0.24596814811229706,
0.018930895254015923,
0.015945635735988617,
-0.0995808094739914,
-0.17068299651145935,
0.0556546226143837,
0.23042456805706024,
0.2713621258735657,
-0.06519948691129684,
0.02059924229979515,
0.06490404903888702,
-0.03565513342618942,
0.36086374521255493,
0.3157638907432556,
0.002359554171562195,
0.19555488228797913,
0.14180685579776764,
-0.0032746130600571632,
0.075787752866745,
0.2862294316291809,
-0.03463619202375412,
0.08881547302007675,
-0.12125834822654724,
0.42126768827438354,
0.07182860374450684,
-0.1919165402650833,
0.20607967674732208,
-0.0399542897939682,
-0.3647058606147766,
-0.13239194452762604,
0.16732540726661682,
-0.02257097139954567,
0.13155177235603333,
0.06652846187353134,
-0.16018976271152496,
-0.09078056365251541,
0.4352189898490906,
-0.037828825414180756,
0.7505726218223572,
0.0026656799018383026,
0.12184303998947144,
0.3220246434211731,
0.15643881261348724,
0.03759870305657387,
-0.1322866976261139,
0.37961214780807495,
-0.41479232907295227,
-0.43460991978645325,
-0.020577270537614822,
-0.1339688003063202,
-0.06169690936803818,
-0.18919485807418823,
-0.30671432614326477,
0.1902608722448349,
-0.23619812726974487,
0.22307060658931732,
-0.19963911175727844,
-0.019519377499818802,
0.029204659163951874,
0.101508229970932,
-0.2837763726711273,
0.14644938707351685,
0.02716226875782013,
0.28136929869651794,
-0.1672910749912262,
-0.13503341376781464,
-0.2501462996006012,
-0.39118844270706177,
-0.07939918339252472,
-0.000053102150559425354,
-0.26968392729759216,
0.2585654854774475,
0.06546030938625336,
-0.40915751457214355,
-0.10824534296989441,
0.16721245646476746,
0.04544338211417198,
-0.05655253306031227,
0.09099715203046799,
0.059857942163944244,
0.463821142911911,
0.022112373262643814,
0.023044312372803688,
-0.01423643995076418,
0.30689701437950134,
-0.0633058175444603,
-0.18013828992843628,
0.19583621621131897,
-0.025432545691728592,
-0.40804409980773926,
0.25974830985069275,
0.32598310708999634,
0.14804238080978394,
-0.34864336252212524,
0.03364023566246033,
-0.2117803692817688,
-0.23330996930599213,
-0.33198419213294983,
0.19457073509693146,
-0.10142907500267029,
-0.2396390736103058,
0.1738090217113495,
0.1895715445280075,
-0.3431290090084076,
-0.01816975697875023,
0.45508503913879395,
0.35303229093551636,
0.24877581000328064,
0.5828471183776855,
0.1744764894247055,
-0.24042555689811707,
-0.3317689299583435,
0.20237579941749573,
0.22538317739963531,
-0.28108730912208557,
0.22382840514183044,
-0.1826229691505432,
-0.07804352045059204,
0.19019962847232819,
0.286737859249115,
0.4288102388381958,
0.1648770272731781,
-0.3829512596130371,
-0.1927756518125534,
-0.5515055060386658,
0.17679111659526825,
0.05273689329624176,
0.25628265738487244,
-0.04715987667441368,
0.20847713947296143,
0.015021966770291328,
-0.009165899828076363,
-0.4387006461620331,
0.12553274631500244,
-0.44689881801605225,
0.16329067945480347,
-0.2219419777393341,
-0.16448208689689636,
0.17442426085472107,
0.15103119611740112,
0.20039327442646027,
0.27586856484413147,
-0.25964096188545227,
-0.36836346983909607,
-0.0015313494950532913,
0.08447343856096268,
-0.10550697892904282,
-0.005641646683216095,
-0.11010964959859848,
0.029309846460819244,
-0.0501895509660244,
-0.05208054557442665,
-0.07920745015144348,
0.10054206103086472,
0.22559486329555511,
0.1484065055847168,
0.23558247089385986,
0.07568806409835815,
0.16084596514701843,
0.11984825134277344,
-0.17027702927589417,
0.10041069239377975,
0.07497841119766235,
0.22816258668899536,
-0.005689519457519054,
-0.060822516679763794,
-0.23778672516345978,
0.019549943506717682,
-0.0970616489648819,
0.14464214444160461,
0.07090363651514053,
-0.38219600915908813,
-0.17153841257095337,
0.15149611234664917,
0.143044114112854,
0.38852065801620483,
-0.28384682536125183,
-0.05546102672815323,
0.13709190487861633,
0.33206021785736084,
-0.2296697497367859,
-0.034302111715078354,
-0.10635742545127869,
-0.026510726660490036,
0.146788090467453,
0.41650527715682983,
0.019543658941984177,
-0.1586284190416336,
0.028009161353111267,
0.3485163748264313,
0.09560378640890121,
0.007837425917387009,
0.11775028705596924,
0.5754207968711853,
-0.07555559277534485,
-0.19177089631557465,
0.39724472165107727,
-0.09475299715995789,
0.26717156171798706,
0.05078205093741417,
-0.007247641682624817,
0.18734435737133026,
-0.12844812870025635,
-0.02497195079922676,
-0.14028140902519226,
-0.16238091886043549,
-0.060746509581804276,
0.19467590749263763,
0.04704771563410759,
-0.03795275837182999,
0.2107178419828415,
0.33043235540390015,
-0.08316276222467422,
0.00037315720692276955,
-0.05340874195098877,
0.1321250945329666,
-0.456424742937088,
0.016735538840293884,
-0.008952727541327477,
-0.22710534930229187,
-0.09093865007162094,
-0.115311399102211,
0.08003568649291992,
0.17348647117614746,
0.022632449865341187,
0.022576801478862762,
-0.2424229234457016,
0.16926981508731842,
-0.11824484914541245,
0.3315458595752716,
0.11527340859174728,
-0.5635071992874146,
0.08830351382493973,
0.16769182682037354,
0.08105635643005371,
-0.006335761398077011,
0.3777603209018707,
0.5824559330940247,
0.27472174167633057,
-0.3857876658439636,
0.008333366364240646,
-0.0320751778781414,
-0.229912668466568,
-0.17170894145965576,
-0.012660808861255646,
-0.010800004005432129,
0.06621827185153961,
0.37863120436668396,
0.2713033854961395,
-0.3373681902885437,
0.2552127540111542,
0.027157336473464966,
0.08882969617843628,
0.07697981595993042,
0.18662530183792114,
0.13229849934577942,
-0.1575438380241394,
-0.055140718817710876,
-0.0699387863278389,
-0.4600805938243866,
0.19516271352767944,
-0.04850117489695549,
-0.22267484664916992,
0.25878557562828064,
0.12191909551620483,
0.13070759177207947,
-0.02998354285955429,
0.3776684105396271,
0.49100634455680847,
-0.22767969965934753,
-0.3905942738056183,
-0.01680605113506317,
-0.22629314661026,
0.1809229552745819,
-0.292122483253479,
-0.019002752378582954,
0.155307337641716,
0.2821318507194519,
-0.15646573901176453,
0.021089250221848488,
0.4015529155731201,
-0.2273561954498291,
-0.12542584538459778,
0.42077702283859253,
-0.3386310636997223,
0.00784602016210556,
-0.04681730270385742,
-0.09722774475812912,
0.14610497653484344,
-0.3036542236804962,
-0.05189410224556923,
-0.1777743101119995,
0.2873630225658417,
-0.08383949846029282,
-0.09058138728141785,
0.0023010801523923874,
-0.10330833494663239,
0.39322349429130554,
-0.1766410768032074,
0.2384558767080307,
-0.1576768308877945,
0.13547569513320923,
-0.06067724898457527,
-0.13910630345344543,
-0.17651523649692535,
0.017532184720039368,
0.4550083875656128,
0.3983963131904602,
-0.10919956862926483,
-0.3991149961948395,
-0.2596054971218109,
0.10744118690490723,
0.10040856897830963,
0.05985572189092636,
-0.026543496176600456,
0.2165650725364685,
-0.02518397942185402,
0.0028534242883324623,
-0.10969748347997665,
0.16308706998825073,
0.07563909143209457,
0.0006554406136274338,
-0.36350518465042114,
-0.6706464290618896,
0.43564373254776,
-0.28560471534729004,
-0.2860698103904724,
0.0027962634339928627,
-0.03061443567276001,
0.1976696252822876,
0.2935633659362793,
-0.4231155216693878,
0.11055014282464981,
0.2461618334054947,
0.0902780294418335,
-0.36669066548347473,
0.09039117395877838,
-0.11812613904476166,
0.09522347152233124,
0.017917830497026443,
0.16952738165855408,
0.04554474353790283,
-0.16833698749542236,
-0.23620150983333588,
-0.32438910007476807
] |
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.18714353442192078,
-0.2914623022079468,
-0.20474490523338318,
0.2455594390630722,
0.14909157156944275,
-0.09316441416740417,
0.3255345821380615,
0.5325322151184082,
-0.18145301938056946,
0.2625061869621277,
-0.038032419979572296,
0.262340247631073,
-0.2751730978488922,
0.08463217318058014,
-0.13702034950256348,
-0.14146853983402252,
-0.1157294288277626,
0.22831575572490692,
0.012344546616077423,
0.16184987127780914,
-0.222006693482399,
0.11598175019025803,
-0.2556491792201996,
0.18379506468772888,
-0.17824147641658783,
-0.1344490647315979,
0.011586392298340797,
0.04897989705204964,
-0.18314331769943237,
-0.42815518379211426,
0.23486582934856415,
-0.4223311245441437,
0.175195574760437,
0.7575786709785461,
-0.00010833809938048944,
0.2082124501466751,
0.20941293239593506,
-0.06108154356479645,
-0.27399665117263794,
-0.03218691051006317,
0.274000883102417,
-0.0818336009979248,
-0.06049386411905289,
-0.3403692841529846,
-0.1088770255446434,
-0.11809555441141129,
-0.09112488478422165,
0.08609171211719513,
0.29192107915878296,
0.3951644003391266,
0.2997710108757019,
0.5734034776687622,
0.1573595255613327,
-0.004583497531712055,
0.3959799110889435,
-0.29862362146377563,
-0.172372505068779,
0.12629307806491852,
0.23063530027866364,
-0.1093030571937561,
-0.34403863549232483,
0.330562025308609,
0.1133640706539154,
-0.02694791555404663,
-0.05634980648756027,
-0.06686907261610031,
0.2953077554702759,
-0.3012378513813019,
-0.06857764720916748,
0.06763118505477905,
0.10988862067461014,
-0.12438356131315231,
-0.2887358069419861,
-0.22405388951301575,
-0.03386140987277031,
-0.19806484878063202,
0.12846556305885315,
-0.043514788150787354,
-0.1856130063533783,
0.07850777357816696,
0.1347329020500183,
0.258441299200058,
-0.2038278877735138,
-0.08753199875354767,
-0.2553592920303345,
0.6709121465682983,
0.020245639607310295,
-0.05585084855556488,
0.33799058198928833,
-0.05998620390892029,
0.5446831583976746,
0.18543943762779236,
0.0979662835597992,
0.11614890396595001,
-0.2477012723684311,
-0.29859352111816406,
0.20119887590408325,
-0.2829151153564453,
-0.0849229171872139,
0.09727337211370468,
0.07094448804855347,
-0.06162431091070175,
0.3650721609592438,
-0.052364639937877655,
-0.014383170753717422,
0.4467042088508606,
-0.15327757596969604,
0.5062338709831238,
0.1982465386390686,
0.17897863686084747,
-0.16833145916461945,
-0.020264409482479095,
-0.1286522001028061,
-0.3499357998371124,
0.1499236524105072,
0.23463651537895203,
0.021753385663032532,
0.19096112251281738,
-0.24433372914791107,
0.19440509378910065,
-0.07797808945178986,
0.043600015342235565,
0.3095034956932068,
0.4014035761356354,
-0.03745175898075104,
0.09660645574331284,
0.06738600134849548,
0.023932695388793945,
-0.2806928753852844,
0.06229659542441368,
-0.30563241243362427,
0.19659918546676636,
-0.16432806849479675,
-0.39630427956581116,
-0.02458157390356064,
-0.2687660753726959,
0.2929767966270447,
-0.1146547868847847,
0.15901930630207062,
-0.014126494526863098,
-0.09130723774433136,
-0.33500316739082336,
0.14612260460853577,
0.24083729088306427,
-0.16986195743083954,
-0.10555285960435867,
0.23871347308158875,
-0.025853097438812256,
0.04862958937883377,
0.23754048347473145,
-0.296866238117218,
-0.34185126423835754,
-0.006349323317408562,
0.34359022974967957,
-0.06685329228639603,
0.12879887223243713,
0.11334557831287384,
-0.19896115362644196,
0.2983201742172241,
-0.14637339115142822,
0.10355022549629211,
-0.3912956118583679,
-0.01817205175757408,
-0.2944870591163635,
0.23657548427581787,
0.16322506964206696,
-0.13177530467510223,
0.0561787486076355,
0.1417316049337387,
0.12213099002838135,
0.038868248462677,
0.34022268652915955,
-0.22736944258213043,
0.5167084336280823,
-0.3468836843967438,
0.2756422758102417,
0.41289782524108887,
-0.33041518926620483,
-0.6089486479759216,
0.10945837199687958,
-0.35415029525756836,
-0.04571148380637169,
0.05311036854982376,
0.02454274892807007,
0.15998367965221405,
0.02223958633840084,
0.32933661341667175,
0.13692456483840942,
-0.15804500877857208,
0.1062551811337471,
-0.29543039202690125,
-0.016460493206977844,
0.029703043401241302,
0.0708029717206955,
0.5823967456817627,
-0.15623259544372559,
-0.16840216517448425,
-0.07712585479021072,
0.1492237150669098,
-0.0044878460466861725,
-0.06784484535455704,
0.15214771032333374,
0.1257767230272293,
-0.06109239161014557,
0.18609200417995453,
-0.15553328394889832,
-0.09390140324831009,
0.17169055342674255,
-0.3512202799320221,
0.0024178773164749146,
-0.16034545004367828,
0.06807956844568253,
-0.3319402039051056,
0.09542260318994522,
-0.3371698260307312,
-0.21672523021697998,
0.30126744508743286,
-0.03416414558887482,
0.12392167747020721,
-0.08956103026866913,
-0.22292611002922058,
-0.1809651404619217,
-0.14711737632751465,
0.0202627032995224,
-0.14298468828201294,
0.22384561598300934,
-0.36543071269989014,
-0.2202053964138031,
-0.22680141031742096,
0.20460796356201172,
0.12361212074756622,
-0.19334787130355835,
-0.13438117504119873,
0.23267313838005066,
-0.030541641637682915,
-0.06749960780143738,
-0.12533098459243774,
-0.13171707093715668,
-0.02844359166920185,
-0.029998203739523888,
-0.11272303014993668,
0.25503793358802795,
0.2563101351261139,
-0.03482292219996452,
0.15667054057121277,
0.6024567484855652,
-0.00960724800825119,
0.226262629032135,
0.023610256612300873,
-0.24804766476154327,
0.020300934091210365,
-0.14201092720031738,
-0.021308977156877518,
0.18926498293876648,
0.28536516427993774,
-0.15169881284236908,
0.24494825303554535,
-0.16666744649410248,
-0.22648677229881287,
-0.1884656548500061,
0.12422008812427521,
0.04751506820321083,
0.0963224321603775,
0.12619158625602722,
-0.09768866747617722,
0.13039273023605347,
-0.24088987708091736,
0.09318001568317413,
0.26191213726997375,
0.24852263927459717,
0.009734097868204117,
-0.039467260241508484,
0.13311916589736938,
-0.12963882088661194,
0.20925459265708923,
0.08470836281776428,
0.2297535091638565,
0.5835293531417847,
0.11171872913837433,
0.050227437168359756,
-0.17743539810180664,
-0.3453413248062134,
-0.09198636561632156,
0.4372390806674957,
-0.2200707346200943,
0.260189026594162,
0.09873160719871521,
-0.06213626265525818,
-0.1576457917690277,
-0.3469374477863312,
0.036287106573581696,
-0.3373744487762451,
0.18771475553512573,
0.2631378173828125,
-0.1841069757938385,
0.12827478349208832,
-0.12180638313293457,
-0.005365833640098572,
0.3337639272212982,
0.039512380957603455,
0.06327320635318756,
-0.11102351546287537,
-0.15119382739067078,
0.21353983879089355,
0.20900632441043854,
-0.31790071725845337,
0.16440916061401367,
-0.12646779417991638,
-0.003147691488265991,
0.010359236970543861,
-0.2836935520172119,
0.09914635121822357,
-0.2120809108018875,
0.10906053334474564,
0.23379619419574738,
0.231482595205307,
-0.3687378764152527,
-0.22416123747825623,
0.2633112967014313,
-0.3992278277873993,
-0.23665408790111542,
0.03492460027337074,
0.11430953443050385,
0.19671937823295593,
-0.0864332765340805,
-0.3299187123775482,
-0.1772039234638214,
-0.4696308672428131,
0.06652975082397461,
-0.08988597244024277,
0.20996667444705963,
0.44876599311828613,
0.18252918124198914,
0.2639417052268982,
0.36439576745033264,
-0.0712902843952179,
0.02901727519929409,
-0.1778632551431656,
0.44092169404029846,
-0.061473965644836426,
-0.2923325300216675,
-0.26300859451293945,
-0.33668965101242065,
0.13084940612316132,
-0.13686858117580414,
-0.4268147349357605,
0.09110459685325623,
-0.09786319732666016,
-0.1090797483921051,
-0.23417910933494568,
0.12735475599765778,
0.2837292551994324,
-0.032515525817871094,
-0.2429608702659607,
-0.004171460866928101,
0.05569157376885414,
-0.08118826895952225,
0.007200699299573898,
0.09598366171121597,
-0.10182016342878342,
0.28202763199806213,
0.14224790036678314,
0.8831390142440796,
-0.011805115267634392,
-0.0295867957174778,
0.115605428814888,
-0.016876013949513435,
0.05568129941821098,
-0.1177447959780693,
-0.32656607031822205,
-0.09618160873651505,
0.12953202426433563,
-0.2556508779525757,
0.2573155164718628,
-0.11745967715978622,
-0.14738623797893524,
-0.06015655770897865,
-0.09893764555454254,
-0.20951619744300842,
-0.1885662078857422,
0.4506501853466034,
-0.1504627913236618,
0.07783391326665878,
-0.24638907611370087,
0.16143351793289185,
-0.15593348443508148,
0.04751013591885567,
-0.1022527664899826,
-0.03212505578994751,
-0.01638975739479065,
-0.20645295083522797,
-0.1192706972360611,
-0.47222936153411865,
-0.3778592348098755,
0.14187189936637878,
0.2857676148414612,
0.36309513449668884,
0.1994830220937729,
-0.41549932956695557,
0.09981948882341385,
-0.21379289031028748,
0.6662430763244629,
0.12274596095085144,
0.03897782042622566,
0.20780152082443237,
-0.15993203222751617,
-0.29537150263786316,
-0.31963837146759033,
-0.19805392622947693,
0.13109730184078217,
0.23291219770908356,
0.38940805196762085,
0.023314669728279114,
0.054156601428985596,
0.09992668032646179,
-0.04059712588787079,
-0.14357127249240875,
-0.3029596209526062,
-0.29462653398513794,
-0.23793736100196838,
-0.16782450675964355,
0.5118195414543152,
0.27475354075431824,
0.24596814811229706,
0.018930895254015923,
0.015945635735988617,
-0.0995808094739914,
-0.17068299651145935,
0.0556546226143837,
0.23042456805706024,
0.2713621258735657,
-0.06519948691129684,
0.02059924229979515,
0.06490404903888702,
-0.03565513342618942,
0.36086374521255493,
0.3157638907432556,
0.002359554171562195,
0.19555488228797913,
0.14180685579776764,
-0.0032746130600571632,
0.075787752866745,
0.2862294316291809,
-0.03463619202375412,
0.08881547302007675,
-0.12125834822654724,
0.42126768827438354,
0.07182860374450684,
-0.1919165402650833,
0.20607967674732208,
-0.0399542897939682,
-0.3647058606147766,
-0.13239194452762604,
0.16732540726661682,
-0.02257097139954567,
0.13155177235603333,
0.06652846187353134,
-0.16018976271152496,
-0.09078056365251541,
0.4352189898490906,
-0.037828825414180756,
0.7505726218223572,
0.0026656799018383026,
0.12184303998947144,
0.3220246434211731,
0.15643881261348724,
0.03759870305657387,
-0.1322866976261139,
0.37961214780807495,
-0.41479232907295227,
-0.43460991978645325,
-0.020577270537614822,
-0.1339688003063202,
-0.06169690936803818,
-0.18919485807418823,
-0.30671432614326477,
0.1902608722448349,
-0.23619812726974487,
0.22307060658931732,
-0.19963911175727844,
-0.019519377499818802,
0.029204659163951874,
0.101508229970932,
-0.2837763726711273,
0.14644938707351685,
0.02716226875782013,
0.28136929869651794,
-0.1672910749912262,
-0.13503341376781464,
-0.2501462996006012,
-0.39118844270706177,
-0.07939918339252472,
-0.000053102150559425354,
-0.26968392729759216,
0.2585654854774475,
0.06546030938625336,
-0.40915751457214355,
-0.10824534296989441,
0.16721245646476746,
0.04544338211417198,
-0.05655253306031227,
0.09099715203046799,
0.059857942163944244,
0.463821142911911,
0.022112373262643814,
0.023044312372803688,
-0.01423643995076418,
0.30689701437950134,
-0.0633058175444603,
-0.18013828992843628,
0.19583621621131897,
-0.025432545691728592,
-0.40804409980773926,
0.25974830985069275,
0.32598310708999634,
0.14804238080978394,
-0.34864336252212524,
0.03364023566246033,
-0.2117803692817688,
-0.23330996930599213,
-0.33198419213294983,
0.19457073509693146,
-0.10142907500267029,
-0.2396390736103058,
0.1738090217113495,
0.1895715445280075,
-0.3431290090084076,
-0.01816975697875023,
0.45508503913879395,
0.35303229093551636,
0.24877581000328064,
0.5828471183776855,
0.1744764894247055,
-0.24042555689811707,
-0.3317689299583435,
0.20237579941749573,
0.22538317739963531,
-0.28108730912208557,
0.22382840514183044,
-0.1826229691505432,
-0.07804352045059204,
0.19019962847232819,
0.286737859249115,
0.4288102388381958,
0.1648770272731781,
-0.3829512596130371,
-0.1927756518125534,
-0.5515055060386658,
0.17679111659526825,
0.05273689329624176,
0.25628265738487244,
-0.04715987667441368,
0.20847713947296143,
0.015021966770291328,
-0.009165899828076363,
-0.4387006461620331,
0.12553274631500244,
-0.44689881801605225,
0.16329067945480347,
-0.2219419777393341,
-0.16448208689689636,
0.17442426085472107,
0.15103119611740112,
0.20039327442646027,
0.27586856484413147,
-0.25964096188545227,
-0.36836346983909607,
-0.0015313494950532913,
0.08447343856096268,
-0.10550697892904282,
-0.005641646683216095,
-0.11010964959859848,
0.029309846460819244,
-0.0501895509660244,
-0.05208054557442665,
-0.07920745015144348,
0.10054206103086472,
0.22559486329555511,
0.1484065055847168,
0.23558247089385986,
0.07568806409835815,
0.16084596514701843,
0.11984825134277344,
-0.17027702927589417,
0.10041069239377975,
0.07497841119766235,
0.22816258668899536,
-0.005689519457519054,
-0.060822516679763794,
-0.23778672516345978,
0.019549943506717682,
-0.0970616489648819,
0.14464214444160461,
0.07090363651514053,
-0.38219600915908813,
-0.17153841257095337,
0.15149611234664917,
0.143044114112854,
0.38852065801620483,
-0.28384682536125183,
-0.05546102672815323,
0.13709190487861633,
0.33206021785736084,
-0.2296697497367859,
-0.034302111715078354,
-0.10635742545127869,
-0.026510726660490036,
0.146788090467453,
0.41650527715682983,
0.019543658941984177,
-0.1586284190416336,
0.028009161353111267,
0.3485163748264313,
0.09560378640890121,
0.007837425917387009,
0.11775028705596924,
0.5754207968711853,
-0.07555559277534485,
-0.19177089631557465,
0.39724472165107727,
-0.09475299715995789,
0.26717156171798706,
0.05078205093741417,
-0.007247641682624817,
0.18734435737133026,
-0.12844812870025635,
-0.02497195079922676,
-0.14028140902519226,
-0.16238091886043549,
-0.060746509581804276,
0.19467590749263763,
0.04704771563410759,
-0.03795275837182999,
0.2107178419828415,
0.33043235540390015,
-0.08316276222467422,
0.00037315720692276955,
-0.05340874195098877,
0.1321250945329666,
-0.456424742937088,
0.016735538840293884,
-0.008952727541327477,
-0.22710534930229187,
-0.09093865007162094,
-0.115311399102211,
0.08003568649291992,
0.17348647117614746,
0.022632449865341187,
0.022576801478862762,
-0.2424229234457016,
0.16926981508731842,
-0.11824484914541245,
0.3315458595752716,
0.11527340859174728,
-0.5635071992874146,
0.08830351382493973,
0.16769182682037354,
0.08105635643005371,
-0.006335761398077011,
0.3777603209018707,
0.5824559330940247,
0.27472174167633057,
-0.3857876658439636,
0.008333366364240646,
-0.0320751778781414,
-0.229912668466568,
-0.17170894145965576,
-0.012660808861255646,
-0.010800004005432129,
0.06621827185153961,
0.37863120436668396,
0.2713033854961395,
-0.3373681902885437,
0.2552127540111542,
0.027157336473464966,
0.08882969617843628,
0.07697981595993042,
0.18662530183792114,
0.13229849934577942,
-0.1575438380241394,
-0.055140718817710876,
-0.0699387863278389,
-0.4600805938243866,
0.19516271352767944,
-0.04850117489695549,
-0.22267484664916992,
0.25878557562828064,
0.12191909551620483,
0.13070759177207947,
-0.02998354285955429,
0.3776684105396271,
0.49100634455680847,
-0.22767969965934753,
-0.3905942738056183,
-0.01680605113506317,
-0.22629314661026,
0.1809229552745819,
-0.292122483253479,
-0.019002752378582954,
0.155307337641716,
0.2821318507194519,
-0.15646573901176453,
0.021089250221848488,
0.4015529155731201,
-0.2273561954498291,
-0.12542584538459778,
0.42077702283859253,
-0.3386310636997223,
0.00784602016210556,
-0.04681730270385742,
-0.09722774475812912,
0.14610497653484344,
-0.3036542236804962,
-0.05189410224556923,
-0.1777743101119995,
0.2873630225658417,
-0.08383949846029282,
-0.09058138728141785,
0.0023010801523923874,
-0.10330833494663239,
0.39322349429130554,
-0.1766410768032074,
0.2384558767080307,
-0.1576768308877945,
0.13547569513320923,
-0.06067724898457527,
-0.13910630345344543,
-0.17651523649692535,
0.017532184720039368,
0.4550083875656128,
0.3983963131904602,
-0.10919956862926483,
-0.3991149961948395,
-0.2596054971218109,
0.10744118690490723,
0.10040856897830963,
0.05985572189092636,
-0.026543496176600456,
0.2165650725364685,
-0.02518397942185402,
0.0028534242883324623,
-0.10969748347997665,
0.16308706998825073,
0.07563909143209457,
0.0006554406136274338,
-0.36350518465042114,
-0.6706464290618896,
0.43564373254776,
-0.28560471534729004,
-0.2860698103904724,
0.0027962634339928627,
-0.03061443567276001,
0.1976696252822876,
0.2935633659362793,
-0.4231155216693878,
0.11055014282464981,
0.2461618334054947,
0.0902780294418335,
-0.36669066548347473,
0.09039117395877838,
-0.11812613904476166,
0.09522347152233124,
0.017917830497026443,
0.16952738165855408,
0.04554474353790283,
-0.16833698749542236,
-0.23620150983333588,
-0.32438910007476807
] |
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.18714353442192078,
-0.2914623022079468,
-0.20474490523338318,
0.2455594390630722,
0.14909157156944275,
-0.09316441416740417,
0.3255345821380615,
0.5325322151184082,
-0.18145301938056946,
0.2625061869621277,
-0.038032419979572296,
0.262340247631073,
-0.2751730978488922,
0.08463217318058014,
-0.13702034950256348,
-0.14146853983402252,
-0.1157294288277626,
0.22831575572490692,
0.012344546616077423,
0.16184987127780914,
-0.222006693482399,
0.11598175019025803,
-0.2556491792201996,
0.18379506468772888,
-0.17824147641658783,
-0.1344490647315979,
0.011586392298340797,
0.04897989705204964,
-0.18314331769943237,
-0.42815518379211426,
0.23486582934856415,
-0.4223311245441437,
0.175195574760437,
0.7575786709785461,
-0.00010833809938048944,
0.2082124501466751,
0.20941293239593506,
-0.06108154356479645,
-0.27399665117263794,
-0.03218691051006317,
0.274000883102417,
-0.0818336009979248,
-0.06049386411905289,
-0.3403692841529846,
-0.1088770255446434,
-0.11809555441141129,
-0.09112488478422165,
0.08609171211719513,
0.29192107915878296,
0.3951644003391266,
0.2997710108757019,
0.5734034776687622,
0.1573595255613327,
-0.004583497531712055,
0.3959799110889435,
-0.29862362146377563,
-0.172372505068779,
0.12629307806491852,
0.23063530027866364,
-0.1093030571937561,
-0.34403863549232483,
0.330562025308609,
0.1133640706539154,
-0.02694791555404663,
-0.05634980648756027,
-0.06686907261610031,
0.2953077554702759,
-0.3012378513813019,
-0.06857764720916748,
0.06763118505477905,
0.10988862067461014,
-0.12438356131315231,
-0.2887358069419861,
-0.22405388951301575,
-0.03386140987277031,
-0.19806484878063202,
0.12846556305885315,
-0.043514788150787354,
-0.1856130063533783,
0.07850777357816696,
0.1347329020500183,
0.258441299200058,
-0.2038278877735138,
-0.08753199875354767,
-0.2553592920303345,
0.6709121465682983,
0.020245639607310295,
-0.05585084855556488,
0.33799058198928833,
-0.05998620390892029,
0.5446831583976746,
0.18543943762779236,
0.0979662835597992,
0.11614890396595001,
-0.2477012723684311,
-0.29859352111816406,
0.20119887590408325,
-0.2829151153564453,
-0.0849229171872139,
0.09727337211370468,
0.07094448804855347,
-0.06162431091070175,
0.3650721609592438,
-0.052364639937877655,
-0.014383170753717422,
0.4467042088508606,
-0.15327757596969604,
0.5062338709831238,
0.1982465386390686,
0.17897863686084747,
-0.16833145916461945,
-0.020264409482479095,
-0.1286522001028061,
-0.3499357998371124,
0.1499236524105072,
0.23463651537895203,
0.021753385663032532,
0.19096112251281738,
-0.24433372914791107,
0.19440509378910065,
-0.07797808945178986,
0.043600015342235565,
0.3095034956932068,
0.4014035761356354,
-0.03745175898075104,
0.09660645574331284,
0.06738600134849548,
0.023932695388793945,
-0.2806928753852844,
0.06229659542441368,
-0.30563241243362427,
0.19659918546676636,
-0.16432806849479675,
-0.39630427956581116,
-0.02458157390356064,
-0.2687660753726959,
0.2929767966270447,
-0.1146547868847847,
0.15901930630207062,
-0.014126494526863098,
-0.09130723774433136,
-0.33500316739082336,
0.14612260460853577,
0.24083729088306427,
-0.16986195743083954,
-0.10555285960435867,
0.23871347308158875,
-0.025853097438812256,
0.04862958937883377,
0.23754048347473145,
-0.296866238117218,
-0.34185126423835754,
-0.006349323317408562,
0.34359022974967957,
-0.06685329228639603,
0.12879887223243713,
0.11334557831287384,
-0.19896115362644196,
0.2983201742172241,
-0.14637339115142822,
0.10355022549629211,
-0.3912956118583679,
-0.01817205175757408,
-0.2944870591163635,
0.23657548427581787,
0.16322506964206696,
-0.13177530467510223,
0.0561787486076355,
0.1417316049337387,
0.12213099002838135,
0.038868248462677,
0.34022268652915955,
-0.22736944258213043,
0.5167084336280823,
-0.3468836843967438,
0.2756422758102417,
0.41289782524108887,
-0.33041518926620483,
-0.6089486479759216,
0.10945837199687958,
-0.35415029525756836,
-0.04571148380637169,
0.05311036854982376,
0.02454274892807007,
0.15998367965221405,
0.02223958633840084,
0.32933661341667175,
0.13692456483840942,
-0.15804500877857208,
0.1062551811337471,
-0.29543039202690125,
-0.016460493206977844,
0.029703043401241302,
0.0708029717206955,
0.5823967456817627,
-0.15623259544372559,
-0.16840216517448425,
-0.07712585479021072,
0.1492237150669098,
-0.0044878460466861725,
-0.06784484535455704,
0.15214771032333374,
0.1257767230272293,
-0.06109239161014557,
0.18609200417995453,
-0.15553328394889832,
-0.09390140324831009,
0.17169055342674255,
-0.3512202799320221,
0.0024178773164749146,
-0.16034545004367828,
0.06807956844568253,
-0.3319402039051056,
0.09542260318994522,
-0.3371698260307312,
-0.21672523021697998,
0.30126744508743286,
-0.03416414558887482,
0.12392167747020721,
-0.08956103026866913,
-0.22292611002922058,
-0.1809651404619217,
-0.14711737632751465,
0.0202627032995224,
-0.14298468828201294,
0.22384561598300934,
-0.36543071269989014,
-0.2202053964138031,
-0.22680141031742096,
0.20460796356201172,
0.12361212074756622,
-0.19334787130355835,
-0.13438117504119873,
0.23267313838005066,
-0.030541641637682915,
-0.06749960780143738,
-0.12533098459243774,
-0.13171707093715668,
-0.02844359166920185,
-0.029998203739523888,
-0.11272303014993668,
0.25503793358802795,
0.2563101351261139,
-0.03482292219996452,
0.15667054057121277,
0.6024567484855652,
-0.00960724800825119,
0.226262629032135,
0.023610256612300873,
-0.24804766476154327,
0.020300934091210365,
-0.14201092720031738,
-0.021308977156877518,
0.18926498293876648,
0.28536516427993774,
-0.15169881284236908,
0.24494825303554535,
-0.16666744649410248,
-0.22648677229881287,
-0.1884656548500061,
0.12422008812427521,
0.04751506820321083,
0.0963224321603775,
0.12619158625602722,
-0.09768866747617722,
0.13039273023605347,
-0.24088987708091736,
0.09318001568317413,
0.26191213726997375,
0.24852263927459717,
0.009734097868204117,
-0.039467260241508484,
0.13311916589736938,
-0.12963882088661194,
0.20925459265708923,
0.08470836281776428,
0.2297535091638565,
0.5835293531417847,
0.11171872913837433,
0.050227437168359756,
-0.17743539810180664,
-0.3453413248062134,
-0.09198636561632156,
0.4372390806674957,
-0.2200707346200943,
0.260189026594162,
0.09873160719871521,
-0.06213626265525818,
-0.1576457917690277,
-0.3469374477863312,
0.036287106573581696,
-0.3373744487762451,
0.18771475553512573,
0.2631378173828125,
-0.1841069757938385,
0.12827478349208832,
-0.12180638313293457,
-0.005365833640098572,
0.3337639272212982,
0.039512380957603455,
0.06327320635318756,
-0.11102351546287537,
-0.15119382739067078,
0.21353983879089355,
0.20900632441043854,
-0.31790071725845337,
0.16440916061401367,
-0.12646779417991638,
-0.003147691488265991,
0.010359236970543861,
-0.2836935520172119,
0.09914635121822357,
-0.2120809108018875,
0.10906053334474564,
0.23379619419574738,
0.231482595205307,
-0.3687378764152527,
-0.22416123747825623,
0.2633112967014313,
-0.3992278277873993,
-0.23665408790111542,
0.03492460027337074,
0.11430953443050385,
0.19671937823295593,
-0.0864332765340805,
-0.3299187123775482,
-0.1772039234638214,
-0.4696308672428131,
0.06652975082397461,
-0.08988597244024277,
0.20996667444705963,
0.44876599311828613,
0.18252918124198914,
0.2639417052268982,
0.36439576745033264,
-0.0712902843952179,
0.02901727519929409,
-0.1778632551431656,
0.44092169404029846,
-0.061473965644836426,
-0.2923325300216675,
-0.26300859451293945,
-0.33668965101242065,
0.13084940612316132,
-0.13686858117580414,
-0.4268147349357605,
0.09110459685325623,
-0.09786319732666016,
-0.1090797483921051,
-0.23417910933494568,
0.12735475599765778,
0.2837292551994324,
-0.032515525817871094,
-0.2429608702659607,
-0.004171460866928101,
0.05569157376885414,
-0.08118826895952225,
0.007200699299573898,
0.09598366171121597,
-0.10182016342878342,
0.28202763199806213,
0.14224790036678314,
0.8831390142440796,
-0.011805115267634392,
-0.0295867957174778,
0.115605428814888,
-0.016876013949513435,
0.05568129941821098,
-0.1177447959780693,
-0.32656607031822205,
-0.09618160873651505,
0.12953202426433563,
-0.2556508779525757,
0.2573155164718628,
-0.11745967715978622,
-0.14738623797893524,
-0.06015655770897865,
-0.09893764555454254,
-0.20951619744300842,
-0.1885662078857422,
0.4506501853466034,
-0.1504627913236618,
0.07783391326665878,
-0.24638907611370087,
0.16143351793289185,
-0.15593348443508148,
0.04751013591885567,
-0.1022527664899826,
-0.03212505578994751,
-0.01638975739479065,
-0.20645295083522797,
-0.1192706972360611,
-0.47222936153411865,
-0.3778592348098755,
0.14187189936637878,
0.2857676148414612,
0.36309513449668884,
0.1994830220937729,
-0.41549932956695557,
0.09981948882341385,
-0.21379289031028748,
0.6662430763244629,
0.12274596095085144,
0.03897782042622566,
0.20780152082443237,
-0.15993203222751617,
-0.29537150263786316,
-0.31963837146759033,
-0.19805392622947693,
0.13109730184078217,
0.23291219770908356,
0.38940805196762085,
0.023314669728279114,
0.054156601428985596,
0.09992668032646179,
-0.04059712588787079,
-0.14357127249240875,
-0.3029596209526062,
-0.29462653398513794,
-0.23793736100196838,
-0.16782450675964355,
0.5118195414543152,
0.27475354075431824,
0.24596814811229706,
0.018930895254015923,
0.015945635735988617,
-0.0995808094739914,
-0.17068299651145935,
0.0556546226143837,
0.23042456805706024,
0.2713621258735657,
-0.06519948691129684,
0.02059924229979515,
0.06490404903888702,
-0.03565513342618942,
0.36086374521255493,
0.3157638907432556,
0.002359554171562195,
0.19555488228797913,
0.14180685579776764,
-0.0032746130600571632,
0.075787752866745,
0.2862294316291809,
-0.03463619202375412,
0.08881547302007675,
-0.12125834822654724,
0.42126768827438354,
0.07182860374450684,
-0.1919165402650833,
0.20607967674732208,
-0.0399542897939682,
-0.3647058606147766,
-0.13239194452762604,
0.16732540726661682,
-0.02257097139954567,
0.13155177235603333,
0.06652846187353134,
-0.16018976271152496,
-0.09078056365251541,
0.4352189898490906,
-0.037828825414180756,
0.7505726218223572,
0.0026656799018383026,
0.12184303998947144,
0.3220246434211731,
0.15643881261348724,
0.03759870305657387,
-0.1322866976261139,
0.37961214780807495,
-0.41479232907295227,
-0.43460991978645325,
-0.020577270537614822,
-0.1339688003063202,
-0.06169690936803818,
-0.18919485807418823,
-0.30671432614326477,
0.1902608722448349,
-0.23619812726974487,
0.22307060658931732,
-0.19963911175727844,
-0.019519377499818802,
0.029204659163951874,
0.101508229970932,
-0.2837763726711273,
0.14644938707351685,
0.02716226875782013,
0.28136929869651794,
-0.1672910749912262,
-0.13503341376781464,
-0.2501462996006012,
-0.39118844270706177,
-0.07939918339252472,
-0.000053102150559425354,
-0.26968392729759216,
0.2585654854774475,
0.06546030938625336,
-0.40915751457214355,
-0.10824534296989441,
0.16721245646476746,
0.04544338211417198,
-0.05655253306031227,
0.09099715203046799,
0.059857942163944244,
0.463821142911911,
0.022112373262643814,
0.023044312372803688,
-0.01423643995076418,
0.30689701437950134,
-0.0633058175444603,
-0.18013828992843628,
0.19583621621131897,
-0.025432545691728592,
-0.40804409980773926,
0.25974830985069275,
0.32598310708999634,
0.14804238080978394,
-0.34864336252212524,
0.03364023566246033,
-0.2117803692817688,
-0.23330996930599213,
-0.33198419213294983,
0.19457073509693146,
-0.10142907500267029,
-0.2396390736103058,
0.1738090217113495,
0.1895715445280075,
-0.3431290090084076,
-0.01816975697875023,
0.45508503913879395,
0.35303229093551636,
0.24877581000328064,
0.5828471183776855,
0.1744764894247055,
-0.24042555689811707,
-0.3317689299583435,
0.20237579941749573,
0.22538317739963531,
-0.28108730912208557,
0.22382840514183044,
-0.1826229691505432,
-0.07804352045059204,
0.19019962847232819,
0.286737859249115,
0.4288102388381958,
0.1648770272731781,
-0.3829512596130371,
-0.1927756518125534,
-0.5515055060386658,
0.17679111659526825,
0.05273689329624176,
0.25628265738487244,
-0.04715987667441368,
0.20847713947296143,
0.015021966770291328,
-0.009165899828076363,
-0.4387006461620331,
0.12553274631500244,
-0.44689881801605225,
0.16329067945480347,
-0.2219419777393341,
-0.16448208689689636,
0.17442426085472107,
0.15103119611740112,
0.20039327442646027,
0.27586856484413147,
-0.25964096188545227,
-0.36836346983909607,
-0.0015313494950532913,
0.08447343856096268,
-0.10550697892904282,
-0.005641646683216095,
-0.11010964959859848,
0.029309846460819244,
-0.0501895509660244,
-0.05208054557442665,
-0.07920745015144348,
0.10054206103086472,
0.22559486329555511,
0.1484065055847168,
0.23558247089385986,
0.07568806409835815,
0.16084596514701843,
0.11984825134277344,
-0.17027702927589417,
0.10041069239377975,
0.07497841119766235,
0.22816258668899536,
-0.005689519457519054,
-0.060822516679763794,
-0.23778672516345978,
0.019549943506717682,
-0.0970616489648819,
0.14464214444160461,
0.07090363651514053,
-0.38219600915908813,
-0.17153841257095337,
0.15149611234664917,
0.143044114112854,
0.38852065801620483,
-0.28384682536125183,
-0.05546102672815323,
0.13709190487861633,
0.33206021785736084,
-0.2296697497367859,
-0.034302111715078354,
-0.10635742545127869,
-0.026510726660490036,
0.146788090467453,
0.41650527715682983,
0.019543658941984177,
-0.1586284190416336,
0.028009161353111267,
0.3485163748264313,
0.09560378640890121,
0.007837425917387009,
0.11775028705596924,
0.5754207968711853,
-0.07555559277534485,
-0.19177089631557465,
0.39724472165107727,
-0.09475299715995789,
0.26717156171798706,
0.05078205093741417,
-0.007247641682624817,
0.18734435737133026,
-0.12844812870025635,
-0.02497195079922676,
-0.14028140902519226,
-0.16238091886043549,
-0.060746509581804276,
0.19467590749263763,
0.04704771563410759,
-0.03795275837182999,
0.2107178419828415,
0.33043235540390015,
-0.08316276222467422,
0.00037315720692276955,
-0.05340874195098877,
0.1321250945329666,
-0.456424742937088,
0.016735538840293884,
-0.008952727541327477,
-0.22710534930229187,
-0.09093865007162094,
-0.115311399102211,
0.08003568649291992,
0.17348647117614746,
0.022632449865341187,
0.022576801478862762,
-0.2424229234457016,
0.16926981508731842,
-0.11824484914541245,
0.3315458595752716,
0.11527340859174728,
-0.5635071992874146,
0.08830351382493973,
0.16769182682037354,
0.08105635643005371,
-0.006335761398077011,
0.3777603209018707,
0.5824559330940247,
0.27472174167633057,
-0.3857876658439636,
0.008333366364240646,
-0.0320751778781414,
-0.229912668466568,
-0.17170894145965576,
-0.012660808861255646,
-0.010800004005432129,
0.06621827185153961,
0.37863120436668396,
0.2713033854961395,
-0.3373681902885437,
0.2552127540111542,
0.027157336473464966,
0.08882969617843628,
0.07697981595993042,
0.18662530183792114,
0.13229849934577942,
-0.1575438380241394,
-0.055140718817710876,
-0.0699387863278389,
-0.4600805938243866,
0.19516271352767944,
-0.04850117489695549,
-0.22267484664916992,
0.25878557562828064,
0.12191909551620483,
0.13070759177207947,
-0.02998354285955429,
0.3776684105396271,
0.49100634455680847,
-0.22767969965934753,
-0.3905942738056183,
-0.01680605113506317,
-0.22629314661026,
0.1809229552745819,
-0.292122483253479,
-0.019002752378582954,
0.155307337641716,
0.2821318507194519,
-0.15646573901176453,
0.021089250221848488,
0.4015529155731201,
-0.2273561954498291,
-0.12542584538459778,
0.42077702283859253,
-0.3386310636997223,
0.00784602016210556,
-0.04681730270385742,
-0.09722774475812912,
0.14610497653484344,
-0.3036542236804962,
-0.05189410224556923,
-0.1777743101119995,
0.2873630225658417,
-0.08383949846029282,
-0.09058138728141785,
0.0023010801523923874,
-0.10330833494663239,
0.39322349429130554,
-0.1766410768032074,
0.2384558767080307,
-0.1576768308877945,
0.13547569513320923,
-0.06067724898457527,
-0.13910630345344543,
-0.17651523649692535,
0.017532184720039368,
0.4550083875656128,
0.3983963131904602,
-0.10919956862926483,
-0.3991149961948395,
-0.2596054971218109,
0.10744118690490723,
0.10040856897830963,
0.05985572189092636,
-0.026543496176600456,
0.2165650725364685,
-0.02518397942185402,
0.0028534242883324623,
-0.10969748347997665,
0.16308706998825073,
0.07563909143209457,
0.0006554406136274338,
-0.36350518465042114,
-0.6706464290618896,
0.43564373254776,
-0.28560471534729004,
-0.2860698103904724,
0.0027962634339928627,
-0.03061443567276001,
0.1976696252822876,
0.2935633659362793,
-0.4231155216693878,
0.11055014282464981,
0.2461618334054947,
0.0902780294418335,
-0.36669066548347473,
0.09039117395877838,
-0.11812613904476166,
0.09522347152233124,
0.017917830497026443,
0.16952738165855408,
0.04554474353790283,
-0.16833698749542236,
-0.23620150983333588,
-0.32438910007476807
] |
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.3492950201034546,
-0.4361373484134674,
0.011495620012283325,
0.13727539777755737,
0.14236459136009216,
-0.13144251704216003,
0.16318371891975403,
0.2404133826494217,
-0.09034916758537292,
0.07815946638584137,
0.15260660648345947,
0.2544565200805664,
-0.19957603514194489,
0.1263260394334793,
0.2003088891506195,
0.08880017697811127,
0.426166832447052,
-0.037834152579307556,
0.26855769753456116,
-0.26795440912246704,
-0.3022831082344055,
-0.06311777979135513,
-0.1632101833820343,
-0.2766340970993042,
-0.4100879728794098,
-0.18497255444526672,
-0.03467999026179314,
0.30692392587661743,
-0.15620459616184235,
-0.21452899277210236,
0.037379711866378784,
0.054144345223903656,
0.015772227197885513,
0.6562039256095886,
-0.00011800126958405599,
-0.1345151662826538,
0.5221813321113586,
-0.16618642210960388,
-0.29945388436317444,
-0.18629102408885956,
-0.4774816930294037,
-0.25219935178756714,
-0.17596648633480072,
0.046490512788295746,
0.11942454427480698,
0.2549712359905243,
-0.030479134991765022,
0.043025702238082886,
0.3690435290336609,
0.4134596288204193,
0.167686328291893,
0.2217603623867035,
0.41344621777534485,
-0.08793143182992935,
0.30269721150398254,
0.282089501619339,
-0.105100616812706,
0.2614024877548218,
0.6497218608856201,
0.17680634558200836,
0.05690990388393402,
-0.2427082359790802,
0.06993082165718079,
-0.16739924252033234,
0.06944964826107025,
-0.11062522977590561,
-0.35752612352371216,
-0.3298697769641876,
0.11408165842294693,
-0.0013097822666168213,
0.4589940309524536,
-0.20297980308532715,
-0.4296274483203888,
-0.1060698926448822,
-0.07598759979009628,
-0.2236967831850052,
0.3558030426502228,
0.23314659297466278,
-0.23948009312152863,
-0.07717131078243256,
-0.08560597896575928,
-0.2056450992822647,
-0.17852047085762024,
0.23823662102222443,
0.07589457929134369,
0.19805245101451874,
-0.025820039212703705,
0.044260360300540924,
-0.04099838808178902,
-0.37075769901275635,
0.3923778831958771,
-0.18161778151988983,
0.09088888019323349,
-0.02384035289287567,
-0.5575968623161316,
-0.07034651935100555,
0.04954902455210686,
0.12602029740810394,
0.008591439574956894,
0.16466614603996277,
-0.26889169216156006,
0.051647793501615524,
-0.09015851467847824,
0.06765760481357574,
0.6570221185684204,
-0.007972970604896545,
-0.09273640066385269,
0.08477768301963806,
0.28219014406204224,
0.34472036361694336,
0.04608849063515663,
0.05928613990545273,
-0.07030428946018219,
-0.13733705878257751,
0.230531707406044,
-0.052840955555438995,
0.3855370879173279,
-0.24851247668266296,
-0.3089723289012909,
0.18954238295555115,
0.036269932985305786,
0.25902828574180603,
-0.06281013041734695,
0.04974813759326935,
0.00017370632849633694,
0.03182850033044815,
-0.22554908692836761,
0.3628072142601013,
-0.0069717783480882645,
-0.02049526944756508,
-0.1553627848625183,
0.22216755151748657,
0.1331072598695755,
-0.10216007381677628,
0.323659747838974,
-0.32003721594810486,
0.01847132481634617,
0.32098501920700073,
0.30673766136169434,
-0.17318762838840485,
-0.357686311006546,
-0.18980789184570312,
-0.1060691848397255,
0.22609327733516693,
0.11589783430099487,
0.44007760286331177,
-0.06226199492812157,
-0.10013791918754578,
-0.20096537470817566,
0.1909409463405609,
-0.3873156011104584,
-0.21944047510623932,
0.06312475353479385,
0.12569445371627808,
-0.22079136967658997,
-0.09027434885501862,
-0.5107468366622925,
-0.011281225830316544,
-0.19146853685379028,
-0.11390469968318939,
-0.09416279941797256,
-0.0022206678986549377,
0.15875284373760223,
-0.0426245853304863,
0.16635307669639587,
0.3246029019355774,
-0.323116660118103,
0.3731704354286194,
0.05024026706814766,
0.27882593870162964,
0.12830375134944916,
0.2330397367477417,
0.1437007337808609,
0.2367839217185974,
-0.13197888433933258,
0.1609235554933548,
0.11538956314325333,
-0.6976607441902161,
-0.595661461353302,
-0.08996684104204178,
-0.26885896921157837,
-0.04653999209403992,
-0.12122812122106552,
0.01313558965921402,
0.4189698398113251,
-0.06395266950130463,
0.608258843421936,
0.3658437132835388,
-0.0574498325586319,
0.23935887217521667,
-0.46268588304519653,
-0.09861812740564346,
-0.024739772081375122,
0.4178653657436371,
0.013092759996652603,
-0.032094039022922516,
0.24400752782821655,
0.23001530766487122,
0.13240528106689453,
0.24974627792835236,
0.2914450764656067,
0.33562594652175903,
0.6454253792762756,
-0.281643271446228,
0.014875231310725212,
-0.19820094108581543,
-0.2722032964229584,
0.11580032855272293,
0.27189502120018005,
0.12000700831413269,
-0.20711301267147064,
0.08669718354940414,
-0.39044857025146484,
0.04360446333885193,
-0.3297949731349945,
0.2863488495349884,
0.07187528163194656,
-0.1915452480316162,
-0.21201078593730927,
0.17992280423641205,
-0.28206807374954224,
0.3757934868335724,
0.031342893838882446,
0.03790727257728577,
-0.44003280997276306,
0.5336699485778809,
-0.08037678152322769,
-0.5043728947639465,
0.30835384130477905,
0.0776466429233551,
0.2738250195980072,
-0.10360974073410034,
-0.1956261694431305,
0.1339350789785385,
0.234178826212883,
0.13692332804203033,
-0.005255423486232758,
0.016759321093559265,
0.2642603814601898,
-0.23406772315502167,
-0.08080388605594635,
0.1964033544063568,
0.11857873201370239,
-0.19520258903503418,
-0.15197983384132385,
-0.12112319469451904,
-0.08569392561912537,
0.0792589858174324,
-0.1256406158208847,
0.11554939299821854,
0.13912682235240936,
0.004252709448337555,
0.08277110755443573,
0.4041469693183899,
0.1722850650548935,
0.053286802023649216,
0.11878696084022522,
-0.3269274830818176,
-0.08498463034629822,
0.12876774370670319,
0.21168829500675201,
0.006035115569829941,
0.12721052765846252,
0.1815311312675476,
-0.14507350325584412,
-0.2697731554508209,
0.1996830552816391,
0.061346638947725296,
0.2771127223968506,
-0.048802174627780914,
-0.1443278044462204,
0.046513818204402924,
0.061449360102415085,
-0.1344803273677826,
-0.08032014220952988,
0.11340588331222534,
-0.20449790358543396,
0.330346018075943,
0.3666679859161377,
-0.002526705153286457,
-0.3525660037994385,
-0.02780947834253311,
0.13659614324569702,
0.4154607653617859,
-0.2125602513551712,
-0.1802063286304474,
-0.0055416543036699295,
0.32927998900413513,
0.01981062814593315,
-0.31200650334358215,
-0.5459036827087402,
-0.24179968237876892,
0.0834331214427948,
0.3957819640636444,
-0.02572431042790413,
0.06432116031646729,
0.5462650656700134,
0.44909337162971497,
0.0034591946750879288,
-0.13645978271961212,
-0.0647963359951973,
-0.025532009080052376,
-0.13586050271987915,
0.015444628894329071,
0.2740723490715027,
0.2509216368198395,
0.2522353529930115,
0.031634263694286346,
0.13900874555110931,
-0.2858896255493164,
0.23932421207427979,
-0.03271263837814331,
0.05260322242975235,
0.30905881524086,
-0.2284649908542633,
0.18137603998184204,
0.024338945746421814,
-0.34817737340927124,
0.12542536854743958,
-0.11591508239507675,
-0.1266479641199112,
0.1760997474193573,
0.004896213300526142,
-0.16521558165550232,
0.2892646789550781,
-0.0911625400185585,
-0.3101528286933899,
-0.4877628684043884,
0.2864501476287842,
-0.024641651660203934,
-0.0889834314584732,
-0.04406510666012764,
-0.02594066597521305,
-0.09175021201372147,
0.03401922062039375,
-0.3370574414730072,
-0.06410515308380127,
-0.3835410177707672,
0.2167937010526657,
-0.013579824939370155,
-0.38935357332229614,
0.1753891557455063,
0.18963152170181274,
0.014566458761692047,
0.2475610375404358,
-0.2430829554796219,
-0.2901405692100525,
-0.11121194064617157,
0.1382249891757965,
-0.030576132237911224,
0.17071257531642914,
0.26044732332229614,
-0.16916099190711975,
0.060274019837379456,
-0.013425219804048538,
-0.2368985265493393,
0.0355355329811573,
0.8220511674880981,
0.17307254672050476,
-0.09706448763608932,
0.12576359510421753,
-0.18842189013957977,
0.35933399200439453,
0.37957581877708435,
-0.11079467833042145,
0.4151036739349365,
0.13085682690143585,
0.11090417206287384,
-0.2456636130809784,
-0.3352765142917633,
0.14867791533470154,
-0.008397161960601807,
-0.27943581342697144,
0.08779276907444,
0.043512262403964996,
-0.0911051481962204,
-0.28614506125450134,
-0.3517603874206543,
-0.22860223054885864,
-0.20568205416202545,
-0.07041047513484955,
0.04081607609987259,
0.011568374931812286,
-0.0044584088027477264,
-0.2118443250656128,
-0.047340795397758484,
-0.3382229804992676,
0.08951546251773834,
0.0033417344093322754,
0.008695416152477264,
0.0017416105838492513,
-0.28520113229751587,
-0.18225514888763428,
-0.414173424243927,
-0.021958068013191223,
0.006387297064065933,
0.8863236904144287,
-0.2552696466445923,
0.24128171801567078,
0.1952364146709442,
-0.10444869846105576,
0.54410719871521,
-0.6170209646224976,
0.32581084966659546,
0.02708493545651436,
0.21043089032173157,
-0.41909149289131165,
-0.10576736181974411,
-0.22201360762119293,
0.3051137626171112,
0.0025528091937303543,
0.5505905747413635,
-0.10229744017124176,
0.2416291981935501,
-0.17923098802566528,
0.2837555408477783,
-0.013365164399147034,
-0.17816708981990814,
-0.20076659321784973,
-0.2565494775772095,
-0.31393253803253174,
0.11920572072267532,
0.46833014488220215,
0.22337250411510468,
0.07240377366542816,
-0.24094627797603607,
0.2016754448413849,
0.17321422696113586,
0.04276946932077408,
-0.22142662107944489,
0.27144140005111694,
0.012327631004154682,
0.32815971970558167,
-0.05750931054353714,
0.049688391387462616,
0.2886342406272888,
0.497090220451355,
0.25341999530792236,
-0.22272825241088867,
0.042728349566459656,
-0.17279398441314697,
0.1715625524520874,
0.5290825366973877,
0.24829153716564178,
0.2188800573348999,
-0.3999935984611511,
0.18476974964141846,
-0.4245751202106476,
0.08066749572753906,
0.31661465764045715,
-0.1489255279302597,
-0.35514113306999207,
0.12167137861251831,
0.4305148124694824,
-0.2909526824951172,
0.011726438999176025,
0.3689836263656616,
0.4231278896331787,
-0.0418141707777977,
0.414824903011322,
-0.12910649180412292,
1.001229166984558,
0.0556834451854229,
0.07278841733932495,
-0.10736309736967087,
-0.1854507178068161,
0.24373957514762878,
-0.5012349486351013,
0.08372735977172852,
-0.2432335466146469,
-0.08784261345863342,
0.06420265138149261,
0.02430630847811699,
-0.297624796628952,
0.1221882551908493,
-0.24903209507465363,
0.26681599020957947,
-0.21588654816150665,
0.43318629264831543,
-0.18785852193832397,
0.05964713543653488,
-0.16331182420253754,
-0.15727128088474274,
-0.15318520367145538,
0.18400545418262482,
-0.11165682971477509,
0.059221312403678894,
-0.07594849169254303,
-0.09560287743806839,
-0.1800084114074707,
-0.22014150023460388,
-0.6703557372093201,
0.083657406270504,
0.29086318612098694,
0.14062543213367462,
-0.0301881842315197,
-0.16898155212402344,
0.16054677963256836,
-0.2126540243625641,
0.3410278558731079,
0.12576138973236084,
-0.2980588972568512,
0.15533289313316345,
-0.21216309070587158,
-0.07313328236341476,
0.04806465655565262,
0.1013585776090622,
0.07262983173131943,
-0.18286091089248657,
-0.3632359206676483,
0.04086951166391373,
-0.010870635509490967,
-0.15765194594860077,
-0.1441149264574051,
0.15385282039642334,
-0.12481971085071564,
-0.1743338406085968,
-0.1791621595621109,
0.13962972164154053,
0.08563432097434998,
-0.17537367343902588,
0.10020075738430023,
0.11930781602859497,
-0.026457445695996284,
0.4060797691345215,
0.14914162456989288,
0.08674535155296326,
0.00971875712275505,
0.49989211559295654,
-0.20951345562934875,
-0.37422260642051697,
0.17850641906261444,
0.039095330983400345,
-0.14798827469348907,
-0.1702888309955597,
0.3537331223487854,
0.046273425221443176,
-0.42869842052459717,
0.10794372111558914,
-0.31054553389549255,
0.1954311579465866,
-0.1718939244747162,
-0.04248621687293053,
0.1696528196334839,
-0.14431530237197876,
-0.09846445918083191,
-0.19388005137443542,
-0.24961264431476593,
0.062309909611940384,
0.26164111495018005,
0.09904270619153976,
-0.34727612137794495,
-0.4058040380477905,
0.3666718304157257,
0.11776423454284668,
-0.23637457191944122,
0.1721031218767166,
-0.38790151476860046,
0.127645343542099,
-0.1888159066438675,
-0.1586061418056488,
-0.11957430094480515,
-0.37154248356819153,
-0.032645732164382935,
-0.11330455541610718,
-0.11159652471542358,
-0.14797592163085938,
-0.034204740077257156,
0.203424334526062,
0.39668968319892883,
0.05416608601808548,
-0.1674489974975586,
-0.34281599521636963,
-0.18649950623512268,
0.03196866810321808,
0.11076903343200684,
0.28539538383483887,
-0.10839927196502686,
-0.3599410951137543,
0.671668291091919,
0.01662406697869301,
-0.060672372579574585,
0.22314287722110748,
0.26573705673217773,
0.1173766702413559,
-0.1617153286933899,
-0.06780222803354263,
0.36014556884765625,
-0.058068353682756424,
-0.2325049787759781,
0.2693961560726166,
0.0924006849527359,
-0.07867913693189621,
0.20395025610923767,
-0.38905197381973267,
0.04972018674015999,
-0.00791277177631855,
0.2986243665218353,
0.4592052102088928,
-0.2593846619129181,
-0.08706452697515488,
0.3133184313774109,
0.204217791557312,
-0.09568066895008087,
-0.42885565757751465,
0.3156794607639313,
0.1225043311715126,
-0.14038324356079102,
-0.07690148800611496,
0.3860655426979065,
-0.2985793948173523,
-0.2076312154531479,
0.09285251796245575,
0.6073061227798462,
-0.13727876543998718,
0.010762428864836693,
0.15328127145767212,
-0.0296342633664608,
0.005834728479385376,
-0.056457117199897766,
-0.01448214054107666,
-0.033146075904369354,
0.5955268144607544,
-0.07861056178808212,
0.418943852186203,
0.24421995878219604,
-0.2722873091697693,
0.16689422726631165,
-0.22196991741657257,
-0.15205100178718567,
-0.06886711716651917,
0.10173255205154419,
0.05091552436351776,
0.21451932191848755,
0.18224823474884033,
-0.38108155131340027,
-0.10389788448810577,
-0.4548516571521759,
-0.23296545445919037,
-0.13655614852905273,
0.36794644594192505,
0.25759708881378174,
-0.13000822067260742,
-0.430927574634552,
0.00889851525425911,
-0.11966273188591003,
0.02440354973077774,
0.15940389037132263,
0.21546222269535065,
0.08644572645425797,
0.08731302618980408,
-0.1471388339996338,
0.13702897727489471,
0.2254512906074524,
-0.1574651598930359,
0.13350223004817963,
0.23325932025909424,
-0.1371021717786789,
0.011298539116978645,
0.249794602394104,
0.4389286935329437,
0.31318604946136475,
-0.2357979714870453,
0.4851306080818176,
0.10731014609336853,
0.10159175097942352,
0.17821644246578217,
0.2923118770122528,
-0.047269150614738464,
0.324736088514328,
0.08716543018817902,
0.11553990840911865,
-0.0506291426718235,
0.16670386493206024,
0.050767313688993454,
-0.037899184972047806,
0.03189893066883087,
0.2304554283618927,
-0.19409704208374023,
-0.2115633487701416,
-0.21779480576515198,
-0.18205803632736206,
-0.2993539869785309,
-0.02304067462682724,
0.247173473238945,
-0.17080345749855042,
0.08572720736265182,
-0.2662501335144043,
0.040905486792325974,
-0.31301596760749817,
0.5930444002151489,
0.3890303373336792,
0.0023583024740219116,
-0.16049546003341675,
-0.35781538486480713,
-0.41337499022483826,
0.12673887610435486,
-0.2377757430076599,
0.11473773419857025,
0.11883730441331863,
-0.042986057698726654,
-0.08900246769189835,
0.18870019912719727,
-0.078488290309906,
0.2825828194618225,
-0.5187272429466248,
0.26942145824432373,
-0.43520551919937134,
0.036590687930583954,
0.27605098485946655,
0.08294576406478882,
-0.09849799424409866,
-0.19894254207611084,
0.48787620663642883,
0.013577218167483807,
-0.0539514534175396,
0.05839819833636284,
-0.10580209642648697,
-0.16740858554840088,
-0.18619294464588165,
0.16349707543849945,
-0.11809594929218292,
0.6178478002548218,
-0.14967238903045654,
0.05167320370674133,
-0.3492116630077362,
-0.31589940190315247,
-0.11840749531984329,
-0.16231682896614075,
-0.10321688652038574,
0.322322815656662,
0.12333907932043076,
-0.12794475257396698,
-0.029046116396784782,
-0.015183022245764732,
-0.2860136330127716,
0.26150622963905334,
-0.14891885221004486,
-0.1597871631383896,
0.09680081158876419,
0.3278271555900574,
0.38387802243232727,
-0.1937725841999054,
-0.10213316977024078,
0.06278865039348602,
-0.36855143308639526,
-0.41022661328315735,
0.37323418259620667,
0.095028355717659,
-0.44624462723731995,
-0.37017834186553955,
0.4784136116504669,
0.013666130602359772,
-0.0013104956597089767,
-0.15733739733695984,
-0.045231323689222336,
0.1829776167869568,
-0.046199627220630646,
-0.21604788303375244,
0.3180701732635498,
-0.21852073073387146,
-0.21397103369235992,
0.10767880082130432,
0.07505476474761963,
0.16012755036354065,
-0.05067591369152069,
0.4270552098751068,
-0.15898513793945312
] |
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.3584897816181183,
-0.4968304932117462,
0.041109565645456314,
0.1569756418466568,
0.1653336137533188,
-0.17984622716903687,
0.18572792410850525,
0.24879460036754608,
-0.2612591087818146,
0.1392478197813034,
0.08525040745735168,
0.33221131563186646,
-0.21793584525585175,
0.12285194545984268,
0.2292075753211975,
0.11279504001140594,
0.31552138924598694,
-0.08774919807910919,
0.03963005542755127,
-0.28075212240219116,
-0.26258811354637146,
-0.043641164898872375,
-0.19931235909461975,
-0.26096463203430176,
-0.46309399604797363,
-0.11774661391973495,
-0.026113606989383698,
0.3506705164909363,
-0.09501376748085022,
-0.21967537701129913,
0.0014141891151666641,
0.01693916507065296,
-0.05672590807080269,
0.6552361845970154,
-0.00012430977949406952,
-0.050306566059589386,
0.48568880558013916,
-0.19032450020313263,
-0.13253983855247498,
-0.0495266318321228,
-0.4144658148288727,
-0.3105025887489319,
-0.16067200899124146,
0.051642052829265594,
0.11366329342126846,
0.31077316403388977,
-0.11744213104248047,
0.08589956164360046,
0.31727156043052673,
0.35294342041015625,
0.09158582985401154,
0.3098866939544678,
0.3522002696990967,
-0.032314855605363846,
0.2960551977157593,
0.09659931063652039,
-0.14979423582553864,
0.15975849330425262,
0.7754074335098267,
0.27715209126472473,
0.02626459300518036,
-0.13040290772914886,
0.06234569102525711,
-0.0858004242181778,
0.003980576992034912,
-0.03817322477698326,
-0.19040292501449585,
-0.3854210078716278,
0.17428547143936157,
0.11979372799396515,
0.45005878806114197,
-0.2249285876750946,
-0.4148178994655609,
-0.08375673741102219,
-0.08975616097450256,
-0.2425335794687271,
0.3942578434944153,
0.12953335046768188,
-0.20718175172805786,
-0.024537410587072372,
-0.16830326616764069,
-0.18572998046875,
-0.14056313037872314,
0.1916319876909256,
-0.025013122707605362,
0.14856505393981934,
-0.004162817262113094,
0.04118672013282776,
-0.1123451292514801,
-0.40552598237991333,
0.4876812994480133,
-0.15798905491828918,
0.0637117251753807,
0.011609499342739582,
-0.60875403881073,
-0.13912728428840637,
-0.010091625154018402,
0.06014533340930939,
0.0436529815196991,
0.11066725850105286,
-0.3086557388305664,
0.13049212098121643,
-0.06821446865797043,
0.10952076315879822,
0.5534741878509521,
-0.12817126512527466,
-0.14167684316635132,
-0.03429509699344635,
0.21541708707809448,
0.2539982795715332,
-0.0010158009827136993,
0.05021849274635315,
0.04926740750670433,
-0.20682790875434875,
0.22309915721416473,
-0.10100043565034866,
0.3739466071128845,
-0.20529258251190186,
-0.26131725311279297,
0.23010818660259247,
0.1894037425518036,
0.3819308578968048,
-0.053207460790872574,
0.09922830760478973,
0.05325106158852577,
0.047685928642749786,
-0.31968027353286743,
0.4524967074394226,
0.03848420828580856,
-0.2731170356273651,
-0.15181875228881836,
0.13421840965747833,
0.24984586238861084,
-0.0688791498541832,
0.21942852437496185,
-0.2422505021095276,
-0.041314102709293365,
0.34525471925735474,
0.40781497955322266,
-0.12911081314086914,
-0.3309892416000366,
-0.17443493008613586,
-0.03772834688425064,
0.3172210156917572,
0.11392852663993835,
0.41576921939849854,
0.017453989014029503,
-0.12636500597000122,
-0.19965629279613495,
0.14454081654548645,
-0.4638251066207886,
-0.26350030303001404,
0.10165727883577347,
0.07229244709014893,
-0.1428719460964203,
-0.1094217598438263,
-0.5495977997779846,
0.025428183376789093,
-0.19086956977844238,
-0.005568347871303558,
-0.12223855406045914,
-0.030749842524528503,
0.12725184857845306,
-0.035534754395484924,
0.16557714343070984,
0.2990829348564148,
-0.2804391384124756,
0.34096428751945496,
-0.08627130836248398,
0.3626617193222046,
0.14318254590034485,
0.297942191362381,
0.0680973008275032,
0.3050534725189209,
-0.1173902377486229,
0.153279110789299,
0.3024344742298126,
-0.6667036414146423,
-0.6684146523475647,
-0.03419245406985283,
-0.27048271894454956,
-0.0818696916103363,
-0.09112366288900375,
0.0023261914029717445,
0.5311722755432129,
0.03021269477903843,
0.6351851224899292,
0.277146577835083,
-0.08455006778240204,
0.2821480333805084,
-0.4925002455711365,
-0.11217998713254929,
0.001884404569864273,
0.33881092071533203,
0.11490495502948761,
-0.06592462211847305,
0.27228498458862305,
0.12751442193984985,
0.08250047266483307,
0.23781733214855194,
0.29629841446876526,
0.3864126205444336,
0.5514684915542603,
-0.3444737195968628,
-0.02147054299712181,
-0.2814921736717224,
-0.28634631633758545,
0.15415123105049133,
0.20411516726016998,
0.12722930312156677,
-0.17730368673801422,
0.11688269674777985,
-0.41389191150665283,
0.05859867483377457,
-0.3338686227798462,
0.27319857478141785,
0.024512913078069687,
-0.26018500328063965,
-0.26173025369644165,
0.14503052830696106,
-0.33089813590049744,
0.33285483717918396,
0.10967935621738434,
0.06266363710165024,
-0.2760002911090851,
0.5119192600250244,
-0.015298815444111824,
-0.5032343864440918,
0.2872212827205658,
0.10714200884103775,
0.2976396381855011,
-0.18855322897434235,
-0.11369942873716354,
0.2388191819190979,
0.26392579078674316,
0.14679263532161713,
0.1418139785528183,
0.008066624402999878,
0.2633480131626129,
-0.3424853980541229,
-0.15343326330184937,
0.1756829470396042,
0.08307342231273651,
-0.1684151589870453,
-0.08628124743700027,
-0.039569124579429626,
-0.09057039022445679,
0.07546103000640869,
-0.2367560863494873,
0.18574045598506927,
0.12423041462898254,
0.02476198598742485,
0.07210579514503479,
0.37134817242622375,
0.11027286946773529,
0.11283840239048004,
-0.009993787854909897,
-0.3346749544143677,
-0.14717984199523926,
0.22252508997917175,
0.14736789464950562,
0.07136157155036926,
0.19746863842010498,
0.08296836167573929,
-0.09927060455083847,
-0.15612003207206726,
0.13279499113559723,
0.025285180658102036,
0.2926253378391266,
-0.06024060398340225,
-0.12750723958015442,
0.05862436443567276,
0.005036247428506613,
-0.047156922519207,
-0.07869487255811691,
0.17837446928024292,
-0.2926471531391144,
0.3842920660972595,
0.37375161051750183,
0.04774043709039688,
-0.37816011905670166,
0.082048699259758,
0.2661728858947754,
0.38069388270378113,
-0.22448642551898956,
-0.1854267418384552,
-0.10102291405200958,
0.44835516810417175,
0.005709818564355373,
-0.3223048746585846,
-0.6079058647155762,
-0.2831599712371826,
0.15129613876342773,
0.3026617169380188,
-0.0821927934885025,
0.11074823886156082,
0.5271106958389282,
0.3664741516113281,
-0.01164153590798378,
-0.16998668015003204,
-0.029437363147735596,
-0.004246159922331572,
-0.13959529995918274,
-0.030307156965136528,
0.30191537737846375,
0.299488365650177,
0.19819121062755585,
-0.006908714771270752,
0.1193562000989914,
-0.41286686062812805,
0.19162997603416443,
-0.06318224221467972,
0.051919907331466675,
0.4158497154712677,
-0.20786228775978088,
0.1358605921268463,
-0.08994602411985397,
-0.27600449323654175,
0.15759117901325226,
-0.07386790215969086,
-0.08498965203762054,
0.21403098106384277,
-0.026863671839237213,
-0.2085265964269638,
0.3448077440261841,
-0.07170609384775162,
-0.21871060132980347,
-0.41800352931022644,
0.143241286277771,
-0.08907268941402435,
-0.03719101846218109,
-0.19277165830135345,
-0.13582274317741394,
-0.15382005274295807,
-0.03062310256063938,
-0.3082430064678192,
-0.029408035799860954,
-0.4738157093524933,
0.29262349009513855,
-0.03588138893246651,
-0.465034157037735,
0.25481054186820984,
0.14880487322807312,
0.1191481500864029,
0.2552441358566284,
-0.24550852179527283,
-0.2666918635368347,
-0.014671629294753075,
0.14888454973697662,
0.0013833679258823395,
0.12998417019844055,
0.25152575969696045,
-0.2197476327419281,
0.11099477112293243,
0.023764826357364655,
-0.1647700071334839,
-0.056807465851306915,
0.8588624596595764,
0.1822492927312851,
-0.1743132770061493,
0.15488970279693604,
-0.13346199691295624,
0.45879703760147095,
0.3051324784755707,
0.05404984951019287,
0.3854061961174011,
0.04345887154340744,
0.08975163102149963,
-0.247888445854187,
-0.3057571351528168,
0.11826827377080917,
0.026715844869613647,
-0.2627096474170685,
0.14241746068000793,
0.02106490731239319,
0.1110101193189621,
-0.19065314531326294,
-0.2668261229991913,
-0.25159764289855957,
-0.2798656225204468,
-0.09985459595918655,
0.06614547222852707,
0.11518270522356033,
0.06377407908439636,
-0.2491646409034729,
-0.005966315045952797,
-0.2820760905742645,
0.18777555227279663,
0.16475467383861542,
-0.10476826876401901,
0.059134591370821,
-0.36021700501441956,
-0.1210358515381813,
-0.2770014703273773,
-0.018406808376312256,
0.02663504332304001,
0.8668714165687561,
-0.22887973487377167,
0.20782282948493958,
0.26532870531082153,
-0.03385927900671959,
0.5201855897903442,
-0.6522952318191528,
0.29012995958328247,
0.07318614423274994,
0.11476367712020874,
-0.4540567398071289,
-0.12500998377799988,
-0.16022571921348572,
0.15830311179161072,
0.09542262554168701,
0.6210963129997253,
-0.08005037903785706,
0.1887621283531189,
-0.2635325789451599,
0.2840404212474823,
-0.11179716885089874,
-0.13580060005187988,
-0.1984468251466751,
-0.2501112222671509,
-0.29048722982406616,
0.19054986536502838,
0.4434540271759033,
0.3154779076576233,
0.17165221273899078,
-0.15202303230762482,
0.04546916484832764,
0.1447267234325409,
0.04730173200368881,
-0.15716904401779175,
0.3411515951156616,
-0.006283336319029331,
0.4437733292579651,
-0.148288756608963,
-0.004906415939331055,
0.13106796145439148,
0.484648734331131,
0.3343772292137146,
-0.2615986466407776,
0.07103171199560165,
-0.1857362538576126,
0.24018466472625732,
0.5436403751373291,
0.21804943680763245,
0.23323306441307068,
-0.419849157333374,
0.18016669154167175,
-0.3062313497066498,
0.13431355357170105,
0.3003256320953369,
-0.2418791800737381,
-0.3005867004394531,
0.293035626411438,
0.46103018522262573,
-0.3784443438053131,
0.0530485063791275,
0.28628629446029663,
0.5275207161903381,
0.03616125136613846,
0.319810688495636,
-0.016595564782619476,
1.061445951461792,
-0.026096194982528687,
0.053017742931842804,
-0.07740327715873718,
-0.11285257339477539,
0.12233878672122955,
-0.5169309973716736,
0.04125493764877319,
-0.23116593062877655,
-0.13070037961006165,
0.030879715457558632,
0.03226194903254509,
-0.2244245707988739,
0.2011968493461609,
-0.15298031270503998,
0.327532559633255,
-0.13110817968845367,
0.42093855142593384,
-0.18386927247047424,
0.0018702559173107147,
-0.13012738525867462,
-0.24408593773841858,
-0.18938791751861572,
0.10758128762245178,
-0.06049562245607376,
-0.06260822713375092,
-0.08756092935800552,
-0.18644770979881287,
-0.17617517709732056,
-0.1417170763015747,
-0.5833901762962341,
-0.013235080987215042,
0.1962829977273941,
0.13676512241363525,
0.23072540760040283,
-0.199729323387146,
0.1439117193222046,
-0.19444966316223145,
0.385900616645813,
0.07785522937774658,
-0.3340538740158081,
0.19097205996513367,
-0.10763724893331528,
-0.04279518499970436,
0.07437648624181747,
0.10597851127386093,
0.07356834411621094,
-0.1678118109703064,
-0.24044623970985413,
0.15037576854228973,
-0.04228546842932701,
-0.0957503616809845,
-0.09785895049571991,
0.18734455108642578,
-0.01005832850933075,
-0.10123240947723389,
-0.15645241737365723,
0.1305917203426361,
0.11976553499698639,
-0.17137402296066284,
0.037612490355968475,
0.18710730969905853,
-0.10069810599088669,
0.45398664474487305,
0.09589646756649017,
0.032281726598739624,
0.03874332830309868,
0.4382895231246948,
-0.28730058670043945,
-0.2974306046962738,
0.1230410635471344,
-0.0007962808012962341,
-0.12470364570617676,
-0.17776092886924744,
0.44808536767959595,
-0.07645808905363083,
-0.36880698800086975,
0.11182484030723572,
-0.3699497878551483,
0.20023129880428314,
-0.14428183436393738,
0.0653405636548996,
0.16770049929618835,
-0.27610689401626587,
-0.23805055022239685,
-0.15277451276779175,
-0.2627618610858917,
0.10565729439258575,
0.18746569752693176,
-0.015951145440340042,
-0.31473425030708313,
-0.2521539032459259,
0.27920928597450256,
0.12325131893157959,
-0.16283018887043,
0.1762610375881195,
-0.33935242891311646,
0.17725850641727448,
-0.09153032302856445,
-0.16614395380020142,
-0.057625848799943924,
-0.3410721719264984,
-0.11146499216556549,
-0.10161231458187103,
-0.12656155228614807,
-0.09124602377414703,
-0.06521272659301758,
0.23162361979484558,
0.41571882367134094,
0.08922907710075378,
-0.23881345987319946,
-0.32093799114227295,
-0.15686926245689392,
0.0402352549135685,
0.1250298023223877,
0.26526394486427307,
-0.09859409928321838,
-0.3788248300552368,
0.7903065085411072,
-0.11465055495500565,
-0.19665071368217468,
0.2242199033498764,
0.33656373620033264,
0.05122772604227066,
-0.1646774858236313,
-0.10986283421516418,
0.2840547263622284,
-0.08778682351112366,
-0.2065575271844864,
0.2975846827030182,
0.10284062474966049,
-0.21776005625724792,
0.31583714485168457,
-0.3809059262275696,
0.1126410961151123,
0.06246952712535858,
0.272504985332489,
0.40636327862739563,
-0.3071085512638092,
-0.20750679075717926,
0.26449963450431824,
0.12350872904062271,
-0.06644517183303833,
-0.5301055312156677,
0.18247053027153015,
0.19288033246994019,
-0.12848398089408875,
-0.04254458099603653,
0.364976704120636,
-0.28428155183792114,
-0.25760382413864136,
0.1556260585784912,
0.5011104941368103,
-0.2473217397928238,
-0.09353336691856384,
0.09776115417480469,
-0.028761763125658035,
0.10348549485206604,
-0.0029739104211330414,
0.007700871676206589,
-0.11446540802717209,
0.5254014730453491,
-0.04961156100034714,
0.377071350812912,
0.2613500952720642,
-0.4188603460788727,
0.17882093787193298,
-0.23533493280410767,
-0.13374274969100952,
-0.09451799094676971,
0.18307551741600037,
-0.02177754044532776,
0.17578905820846558,
0.07709462940692902,
-0.17063437402248383,
-0.16747622191905975,
-0.42941367626190186,
-0.15860940515995026,
-0.09466316550970078,
0.28822872042655945,
0.46319645643234253,
-0.08073937892913818,
-0.40396082401275635,
0.009450431913137436,
-0.14634068310260773,
0.08888870477676392,
0.16580337285995483,
0.2519463002681732,
0.1631595492362976,
0.0008503459393978119,
-0.23479706048965454,
0.28197282552719116,
0.12116406857967377,
-0.20908737182617188,
0.1651402711868286,
0.2092653065919876,
-0.20327600836753845,
0.05498452112078667,
0.20351862907409668,
0.36934933066368103,
0.22683221101760864,
-0.302761971950531,
0.46303707361221313,
0.07520003616809845,
0.13933028280735016,
0.1720668375492096,
0.17688536643981934,
-0.2009667456150055,
0.3306441307067871,
0.16785436868667603,
0.059395186603069305,
-0.0020559364929795265,
0.019491219893097878,
0.04120704159140587,
-0.02209194004535675,
-0.03563052788376808,
0.2444685995578766,
-0.14403656125068665,
-0.11985385417938232,
-0.1972389817237854,
-0.07726728171110153,
-0.26463308930397034,
-0.12463711202144623,
0.27909308671951294,
-0.1939534991979599,
0.11168602854013443,
-0.24712316691875458,
-0.003721516579389572,
-0.3170691132545471,
0.624367356300354,
0.33741453289985657,
-0.12131880968809128,
-0.23603561520576477,
-0.38227903842926025,
-0.5243752002716064,
0.146505206823349,
-0.2058197557926178,
0.10526825487613678,
0.3347705006599426,
0.1066986620426178,
-0.047573186457157135,
0.2805348038673401,
-0.029604703187942505,
0.25890761613845825,
-0.6548188924789429,
0.33202746510505676,
-0.36044690012931824,
0.02058178186416626,
0.14986315369606018,
0.08027215301990509,
-0.05259597301483154,
-0.20339301228523254,
0.5771456956863403,
0.14251752197742462,
-0.08880698680877686,
0.18370702862739563,
-0.08343592286109924,
-0.13481399416923523,
-0.09029324352741241,
0.007932774722576141,
-0.15524160861968994,
0.48909541964530945,
-0.10971178114414215,
0.11981210857629776,
-0.33325549960136414,
-0.39729854464530945,
-0.14462116360664368,
-0.12969207763671875,
-0.1584622859954834,
0.26432421803474426,
0.1406448930501938,
-0.1318039894104004,
-0.010482692159712315,
-0.04445682093501091,
-0.21789471805095673,
0.231118306517601,
-0.1730147749185562,
-0.1179695650935173,
0.12695515155792236,
0.4526057839393616,
0.34725239872932434,
-0.18321600556373596,
-0.04409991204738617,
0.1554209142923355,
-0.30567607283592224,
-0.4684608578681946,
0.38779255747795105,
0.1114451214671135,
-0.4804456830024719,
-0.3982424736022949,
0.4845566153526306,
0.0803133025765419,
0.005226956680417061,
-0.22698956727981567,
-0.1444421112537384,
0.23956312239170074,
-0.0378202423453331,
-0.1563633382320404,
0.24598754942417145,
-0.14951345324516296,
-0.2393711656332016,
0.08083613216876984,
-0.013606563210487366,
0.10135620087385178,
0.0014233086258172989,
0.29103362560272217,
-0.14345386624336243
] |
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:

### 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:

### 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.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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:

### 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:

### 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.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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:

### 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:

### 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.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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)

|
### Describe the bug
step 'Generating train split' in load_dataset is too slow:

### 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:

### 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)

|
[
-0.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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:

### 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:

### 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.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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:

### 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:

### 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.43044018745422363,
-0.21508733928203583,
-0.003619099035859108,
0.4080132246017456,
0.20815591514110565,
0.01632867008447647,
0.27846309542655945,
0.5538163781166077,
0.13296939432621002,
-0.0480373352766037,
-0.33031442761421204,
0.2580046057701111,
-0.25866419076919556,
0.1724783182144165,
-0.03352470323443413,
-0.5277879238128662,
-0.055495016276836395,
0.12873193621635437,
-0.1810329258441925,
0.00829988718032837,
-0.15883111953735352,
0.32608112692832947,
-0.28614795207977295,
-0.08371403813362122,
-0.5168244242668152,
-0.03705044090747833,
0.11645267903804779,
0.2051592469215393,
-0.054849423468112946,
-0.12558574974536896,
0.04409279674291611,
0.026551801711320877,
0.004645891487598419,
0.3295149505138397,
-0.00011379315401427448,
0.1364593356847763,
0.1170714944601059,
-0.004228796809911728,
-0.1424046903848648,
-0.04238799214363098,
-0.1541743278503418,
-0.11602728068828583,
-0.03187156096100807,
-0.04198575019836426,
-0.29074257612228394,
0.10740222781896591,
-0.24939610064029694,
-0.08678881078958511,
0.6245570778846741,
0.27553555369377136,
0.2120601087808609,
0.34255027770996094,
-0.27366265654563904,
-0.021518537774682045,
0.21694594621658325,
0.08314742892980576,
-0.011207770556211472,
0.15324389934539795,
0.08595122396945953,
0.05251254141330719,
-0.2752772569656372,
0.30252209305763245,
0.0006948187947273254,
-0.01912708953022957,
-0.06432723253965378,
0.06459001451730728,
-0.1615385115146637,
-0.20722602307796478,
-0.11732741445302963,
0.33430129289627075,
0.14416280388832092,
-0.09193723648786545,
-0.26624128222465515,
-0.30030640959739685,
-0.12420979887247086,
-0.4132465124130249,
0.1596933752298355,
0.019234664738178253,
-0.18359056115150452,
0.0932144895195961,
-0.3009684085845947,
-0.07335090637207031,
0.015843167901039124,
-0.1528933197259903,
0.310839980840683,
-0.06166596710681915,
-0.07687806338071823,
0.00023009628057479858,
0.37187984585762024,
0.047199174761772156,
-0.449212908744812,
0.17489802837371826,
0.03794979676604271,
0.06416743248701096,
-0.8196505308151245,
-0.06061175465583801,
-0.27926206588745117,
-0.3125564157962799,
-0.012684633955359459,
0.34362542629241943,
-0.03880796208977699,
0.19665804505348206,
0.39663535356521606,
-0.003710925579071045,
-0.04928680881857872,
0.3218391239643097,
-0.2591937780380249,
0.1362651288509369,
0.21974141895771027,
0.10049239546060562,
-0.1267770677804947,
0.03208625689148903,
-0.2767086625099182,
-0.38092175126075745,
-0.059086013585329056,
-0.07073162496089935,
0.10871927440166473,
-0.08116014301776886,
-0.4334816038608551,
-0.017507042735815048,
-0.21778786182403564,
-0.09292899072170258,
0.33714374899864197,
0.42445915937423706,
-0.1518763154745102,
0.15057238936424255,
0.06234133988618851,
0.019984044134616852,
-0.38883644342422485,
-0.14296984672546387,
-0.21636414527893066,
0.05450008064508438,
-0.0554361492395401,
0.2546389698982239,
0.04124915227293968,
-0.1426723152399063,
0.3838999569416046,
0.06641031801700592,
0.19650320708751678,
-0.2695895731449127,
0.15935108065605164,
-0.14405280351638794,
-0.3190307021141052,
0.1755407303571701,
-0.09773750603199005,
0.2712737023830414,
-0.12288364768028259,
0.2379174381494522,
-0.18254029750823975,
-0.1318146288394928,
-0.49653130769729614,
-0.605414628982544,
-0.009632835164666176,
0.20626933872699738,
-0.0001950133591890335,
0.23316240310668945,
-0.12870419025421143,
0.24085697531700134,
0.2109704315662384,
-0.13813726603984833,
-0.02151685208082199,
-0.04939398169517517,
-0.47924378514289856,
0.11678886413574219,
0.5768755078315735,
0.5262378454208374,
-0.12718267738819122,
-0.24952222406864166,
0.07274451851844788,
-0.038808997720479965,
0.48930466175079346,
0.731666624546051,
-0.2329484522342682,
0.41346144676208496,
-0.31961357593536377,
0.20157481729984283,
0.43725576996803284,
-0.04491639509797096,
-0.3386625647544861,
0.4355176091194153,
-0.36171841621398926,
0.13889548182487488,
0.40951013565063477,
0.11344678699970245,
0.1826280802488327,
-0.03926185518503189,
0.18947751820087433,
0.4380927085876465,
0.061782144010066986,
0.2829910218715668,
-0.37287437915802,
-0.3537996709346771,
0.24893367290496826,
0.3203558921813965,
-0.20862819254398346,
0.02744358777999878,
-0.14035660028457642,
0.5666726231575012,
0.4002740681171417,
0.0007955729961395264,
-0.052390873432159424,
0.27959388494491577,
0.04887617751955986,
-0.16764944791793823,
0.09840849786996841,
-0.005191516131162643,
-0.3127175271511078,
0.24837520718574524,
-0.1556536853313446,
0.17020484805107117,
0.11932165920734406,
-0.03799305483698845,
-0.37174880504608154,
-0.1950290948152542,
-0.3148077726364136,
-0.1553773730993271,
0.0802430585026741,
-0.16087183356285095,
0.3632439374923706,
-0.0036255568265914917,
0.1314968764781952,
0.4400974214076996,
-0.04413433372974396,
0.14292456209659576,
-0.5844368934631348,
0.18531768023967743,
0.12875080108642578,
-0.07791732251644135,
0.11590422689914703,
0.21561801433563232,
0.07316528260707855,
-0.1612776815891266,
-0.18321335315704346,
0.5104209184646606,
0.18040847778320312,
0.36574065685272217,
-0.24072903394699097,
-0.06047879159450531,
0.1507832109928131,
-0.1489826738834381,
0.0518324114382267,
0.03855273127555847,
-0.03335600718855858,
-0.15786126255989075,
-0.033037036657333374,
0.349412739276886,
-0.09975744783878326,
0.15035830438137054,
-0.09803992509841919,
-0.062291212379932404,
0.027822652831673622,
0.016176264733076096,
-0.02521611750125885,
-0.07043896615505219,
0.34671252965927124,
0.044471465051174164,
0.6391888856887817,
0.2992265820503235,
-0.04305670037865639,
-0.12896758317947388,
0.5586963891983032,
-0.16796669363975525,
-0.04630770534276962,
0.19791847467422485,
-0.13411933183670044,
-0.3137648403644562,
0.011422604322433472,
-0.10546627640724182,
0.23832887411117554,
0.14643803238868713,
-0.04103336110711098,
-0.04254361242055893,
0.16876037418842316,
-0.2622801661491394,
0.29163235425949097,
0.16055935621261597,
0.08184764534235,
0.22291713953018188,
0.08703134208917618,
-0.07561471313238144,
-0.42438578605651855,
-0.15842093527317047,
0.18333923816680908,
0.29082170128822327,
-0.2637762129306793,
0.006044836714863777,
-0.097683846950531,
0.15074899792671204,
-0.31594690680503845,
0.06671203672885895,
-0.06868095695972443,
0.026116834953427315,
0.17701658606529236,
0.13491597771644592,
-0.05174071341753006,
0.20700547099113464,
0.025259703397750854,
0.1189427599310875,
0.3613814413547516,
-0.3030951917171478,
-0.2953169643878937,
0.21909773349761963,
0.06086770445108414,
0.06569863855838776,
0.061906829476356506,
0.24916794896125793,
0.03037370555102825,
-0.23295927047729492,
-0.1532967984676361,
0.16914312541484833,
-0.09278947860002518,
0.0198565274477005,
-0.08806702494621277,
0.2641405165195465,
0.12458363175392151,
0.01156817376613617,
0.1506449431180954,
-0.4251604676246643,
0.2408073991537094,
0.06568248569965363,
-0.276461660861969,
0.313933789730072,
-0.1836748570203781,
0.1947024166584015,
-0.08769428730010986,
-0.6062116622924805,
-0.07710094004869461,
-0.32758405804634094,
0.2954457402229309,
-0.3137088716030121,
0.07911014556884766,
0.1315738558769226,
-0.009068992920219898,
0.10968226194381714,
-0.07530572265386581,
0.17213718593120575,
-0.1866631954908371,
-0.3233907222747803,
0.37042441964149475,
-0.14954759180545807,
-0.038001228123903275,
-0.40179887413978577,
-0.1602066159248352,
0.39991798996925354,
-0.13649067282676697,
-0.233878031373024,
0.07352789491415024,
-0.35377177596092224,
0.023451726883649826,
-0.14356009662151337,
-0.26809296011924744,
0.2694717049598694,
-0.10162138938903809,
0.017971834167838097,
0.19487008452415466,
-0.05768120288848877,
0.4015560746192932,
0.0415632501244545,
-0.0782601460814476,
-0.2079172134399414,
0.562529444694519,
-0.09637235105037689,
0.8373686075210571,
0.4370814263820648,
0.17743675410747528,
-0.0309176966547966,
-0.04313158243894577,
-0.1513999104499817,
-0.27684131264686584,
-0.19356121122837067,
0.28397080302238464,
-0.05746127665042877,
-0.22941870987415314,
0.2939753830432892,
-0.0269729346036911,
-0.03497133404016495,
0.058076776564121246,
-0.007422605529427528,
-0.049322836101055145,
-0.3180755078792572,
0.09886393696069717,
-0.08641214668750763,
0.04304727539420128,
-0.06782373040914536,
0.1771056354045868,
0.11667443811893463,
-0.16795217990875244,
0.13977305591106415,
0.04768994823098183,
0.3082104027271271,
-0.09581346809864044,
-0.3515580892562866,
0.02555413357913494,
-0.6309380531311035,
-0.029573023319244385,
0.18705198168754578,
0.12150516360998154,
-0.04707910120487213,
-0.185358464717865,
0.33323273062705994,
0.17447738349437714,
0.6720068454742432,
0.2988263666629791,
-0.025781407952308655,
-0.08839574456214905,
-0.2986564040184021,
-0.12440896779298782,
0.016876038163900375,
-0.1435917615890503,
-0.16725772619247437,
0.396560937166214,
0.4201565980911255,
-0.406482070684433,
-0.2999269366264343,
0.1811983585357666,
0.13909120857715607,
-0.14177070558071136,
-0.12767274677753448,
-0.26447951793670654,
-0.010086331516504288,
-0.1399284303188324,
0.2313169538974762,
0.09281180053949356,
0.3586348295211792,
-0.2995510399341583,
-0.3955063819885254,
0.21640975773334503,
-0.19481098651885986,
0.15862157940864563,
0.23282307386398315,
0.33477622270584106,
-0.05504775792360306,
0.5648510456085205,
0.33859387040138245,
0.021345891058444977,
-0.18338124454021454,
0.3916037678718567,
-0.10146665573120117,
-0.25648239254951477,
0.21943512558937073,
0.11751633882522583,
0.21360959112644196,
0.28898775577545166,
-0.26552513241767883,
0.1697675883769989,
0.07091321051120758,
0.38931041955947876,
-0.3147010803222656,
0.12817834317684174,
0.4567513167858124,
-0.015305649489164352,
-0.18893764913082123,
-0.35534602403640747,
0.1744663119316101,
-0.004192125052213669,
0.037861451506614685,
-0.14715999364852905,
-0.16443826258182526,
-0.11922767758369446,
0.3455883264541626,
-0.13840621709823608,
0.7162397503852844,
-0.23087896406650543,
0.05941254645586014,
0.3539137840270996,
0.2516520619392395,
0.39261242747306824,
-0.26684504747390747,
0.17179609835147858,
-0.3036055266857147,
-0.17180845141410828,
0.18007394671440125,
-0.04891040548682213,
-0.17689931392669678,
0.11893288791179657,
-0.14116519689559937,
0.2698650062084198,
0.11472783982753754,
-0.021812964230775833,
-0.3022575378417969,
0.2976984977722168,
0.12487682700157166,
-0.3741000294685364,
-0.21252226829528809,
0.05746941268444061,
-0.1539148986339569,
0.25557032227516174,
0.2627365291118622,
-0.13983149826526642,
0.08958566188812256,
-0.20020171999931335,
-0.0349431075155735,
0.0918569341301918,
-0.30647116899490356,
0.20479556918144226,
-0.03743263706564903,
-0.24345888197422028,
0.14317485690116882,
0.24945978820323944,
-0.10638958215713501,
0.21912606060504913,
-0.06784871220588684,
0.11973731219768524,
-0.11328724771738052,
0.1900150626897812,
0.07233177870512009,
-0.1800513118505478,
0.21011774241924286,
0.17084386944770813,
-0.11766913533210754,
-0.0034298673272132874,
-0.1901644617319107,
-0.21817579865455627,
0.11657336354255676,
-0.14621932804584503,
0.17186805605888367,
-0.28727278113365173,
-0.09010085463523865,
-0.006396748125553131,
-0.06437109410762787,
-0.3567105233669281,
0.11748908460140228,
0.22441138327121735,
-0.2545637786388397,
0.13047870993614197,
-0.06163111701607704,
-0.31359848380088806,
-0.08341719210147858,
0.3424532413482666,
0.09072728455066681,
0.11294527351856232,
0.6744593381881714,
0.08011293411254883,
-0.052560336887836456,
-0.21471717953681946,
0.11264657229185104,
0.19776596128940582,
-0.8890565037727356,
0.19947966933250427,
0.07660169154405594,
0.03760673105716705,
-0.13787604868412018,
0.1865956336259842,
-0.09502887725830078,
-0.1380401849746704,
-0.014069966971874237,
-0.13807159662246704,
-0.4365450143814087,
0.08505071699619293,
0.037618331611156464,
0.12398757040500641,
-0.11604341864585876,
0.03400815278291702,
-0.3553750514984131,
0.29950645565986633,
-0.27449434995651245,
-0.010980503633618355,
-0.2758505344390869,
0.07556022703647614,
0.11585834622383118,
-0.3161073923110962,
0.40434959530830383,
0.19064702093601227,
0.15510454773902893,
0.16928081214427948,
-0.04317483678460121,
-0.17626172304153442,
-0.2345825880765915,
0.032402679324150085,
-0.188442200422287,
-0.14463800191879272,
-0.012307739816606045,
0.23016591370105743,
-0.24573048949241638,
-0.19472189247608185,
0.32040947675704956,
0.15687280893325806,
0.2107606828212738,
0.1129576787352562,
0.14168129861354828,
-0.12426096946001053,
-0.25794416666030884,
0.19450995326042175,
-0.29691678285598755,
-0.003249131143093109,
0.07275710254907608,
0.16928862035274506,
-0.10174748301506042,
-0.16773435473442078,
-0.11112448573112488,
0.0868007242679596,
0.30714213848114014,
-0.036797016859054565,
0.15550865232944489,
-0.15167783200740814,
-0.2872696816921234,
0.14017823338508606,
0.22689609229564667,
0.24801889061927795,
0.035087183117866516,
-0.1270945817232132,
0.08356491476297379,
0.23533527553081512,
-0.058448754251003265,
0.019182894378900528,
-0.1148747056722641,
-0.23636597394943237,
0.14540189504623413,
0.27358680963516235,
0.0004757493734359741,
0.22284293174743652,
0.17671167850494385,
0.011451233178377151,
0.05872303619980812,
0.15346890687942505,
0.09693560004234314,
0.46631190180778503,
0.20623905956745148,
0.03388786315917969,
0.2172033041715622,
-0.016880761831998825,
0.2643588185310364,
0.1841297596693039,
-0.24076464772224426,
0.373426228761673,
-0.31289172172546387,
0.5481720566749573,
0.08261620998382568,
-0.13656213879585266,
-0.40354233980178833,
0.2889455258846283,
-0.4939025640487671,
-0.13489285111427307,
-0.3552156984806061,
0.577817976474762,
-0.2575846314430237,
-0.1137879490852356,
-0.4320697784423828,
0.25156787037849426,
-0.20957040786743164,
-0.2579476237297058,
0.06128636747598648,
-0.023113682866096497,
-0.40491488575935364,
0.08407752215862274,
0.11222560703754425,
0.013127591460943222,
0.08841471374034882,
0.03267120569944382,
0.09105533361434937,
-0.0038045886904001236,
-0.4402085244655609,
0.255116730928421,
-0.04904711991548538,
-0.3533816933631897,
0.1721470206975937,
-0.010347329080104828,
-0.14693255722522736,
0.2372882217168808,
0.2088519185781479,
0.11532501131296158,
0.09531198441982269,
0.015037965029478073,
-0.08165417611598969,
0.19621340930461884,
0.01918996311724186,
-0.005984656512737274,
0.4459269344806671,
0.02619609609246254,
0.1398603618144989,
0.18494296073913574,
0.060534246265888214,
-0.21330147981643677,
-0.13204003870487213,
-0.07799981534481049,
0.14797435700893402,
-0.4768470227718353,
0.5830919146537781,
-0.10840913653373718,
-0.019310064613819122,
-0.3616846203804016,
-0.042278073728084564,
-0.3304790258407593,
0.04203125089406967,
0.06589210033416748,
-0.28070563077926636,
0.01075197197496891,
-0.021211441606283188,
0.0683395192027092,
-0.1892368197441101,
0.509807825088501,
0.015102297067642212,
0.04642673209309578,
-0.43393468856811523,
-0.04722362756729126,
-0.3302796483039856,
-0.12556511163711548,
0.15068237483501434,
0.33530768752098083,
-0.00020222924649715424,
0.32247379422187805,
-0.16652509570121765,
0.19095928966999054,
-0.24930913746356964,
-0.07832861691713333,
-0.2522059679031372,
0.0023310109972953796,
-0.1859460026025772,
0.16350489854812622,
-0.537580668926239,
-0.006978493183851242,
0.030018426477909088,
-0.42346423864364624,
0.25240838527679443,
0.2999711036682129,
-0.07995083183050156,
-0.0034334324300289154,
0.10941672325134277,
-0.016798634082078934,
0.028700731694698334,
0.18435272574424744,
0.22359870374202728,
-0.008420653641223907,
-0.15867158770561218,
0.07603108137845993,
-0.12415716052055359,
-0.24795611202716827,
-0.17510154843330383,
-0.13287973403930664,
-0.008828327059745789,
0.531423807144165,
0.1837790459394455,
0.05975019186735153,
-0.44247865676879883,
0.3096257150173187,
0.187489852309227,
-0.5126051306724548,
-0.29363247752189636,
0.18034853041172028,
-0.14690345525741577,
0.29369238018989563,
0.2922099530696869,
0.19661301374435425,
0.050171397626399994,
-0.019495993852615356,
-0.20699568092823029,
-0.29195842146873474,
0.4020979106426239,
-0.3442252576351166,
0.15224555134773254,
-0.20676107704639435,
0.4142702519893646,
0.3039455711841583,
-0.0237735603004694,
-0.24698230624198914,
0.077463798224926,
0.24087241291999817,
0.0653906911611557,
0.19802226126194,
0.3220897316932678,
0.06829528510570526,
0.08109399676322937,
-0.16401249170303345,
0.27776700258255005,
0.10273389518260956,
-0.16305382549762726,
0.22855758666992188,
-0.33134567737579346
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.32510867714881897,
-0.4293314516544342,
-0.06096174567937851,
0.08869542926549911,
0.2131727784872055,
-0.06696058809757233,
0.19706682860851288,
0.5384528636932373,
0.05225832387804985,
0.3061685562133789,
0.08448539674282074,
0.10903318226337433,
0.03724022954702377,
0.22024405002593994,
0.14667865633964539,
0.23326154053211212,
0.2534916400909424,
-0.10799238085746765,
0.2797039747238159,
-0.06858117133378983,
-0.06573092192411423,
-0.15738074481487274,
0.10763372480869293,
-0.10093243420124054,
-0.7575778961181641,
0.04432864859700203,
0.2258763313293457,
0.20645415782928467,
0.19215016067028046,
-0.1674756109714508,
0.2072247713804245,
0.2527881860733032,
-0.16246667504310608,
0.6471036672592163,
-0.0001234189694514498,
-0.0579044483602047,
0.2519097924232483,
0.023043496534228325,
-0.36646386981010437,
0.09019945561885834,
-0.10475049167871475,
-0.1300034075975418,
-0.2037355601787567,
0.10039597004652023,
0.03635634481906891,
0.45928946137428284,
-0.1904730200767517,
-0.16487853229045868,
0.213181734085083,
-0.06513648480176926,
0.02760692499577999,
0.17410950362682343,
0.01420077309012413,
-0.24395357072353363,
0.2072005569934845,
0.13026945292949677,
-0.3073073625564575,
-0.0719003677368164,
0.490717351436615,
0.13820911943912506,
-0.11790534108877182,
-0.07936453819274902,
-0.11190273612737656,
-0.11168408393859863,
0.016268540173768997,
-0.35359641909599304,
-0.08978535979986191,
-0.31436845660209656,
0.3438000977039337,
0.24355632066726685,
0.14077112078666687,
-0.08090808242559433,
-0.2698417901992798,
-0.07041998207569122,
-0.11939378827810287,
-0.14709556102752686,
0.28435760736465454,
0.1613919883966446,
-0.2762322723865509,
0.0654551088809967,
-0.13129189610481262,
-0.4053601920604706,
-0.12707577645778656,
-0.035546280443668365,
-0.14915576577186584,
-0.031680554151535034,
0.17511606216430664,
0.0874326229095459,
0.2067565768957138,
-0.05901388078927994,
0.39414092898368835,
-0.2691798210144043,
0.09018592536449432,
-0.27556687593460083,
-0.4174015522003174,
0.13888438045978546,
0.08934527635574341,
0.07516971230506897,
-0.04232873022556305,
-0.1248975545167923,
-0.22944191098213196,
0.44265279173851013,
-0.19254308938980103,
0.0722402036190033,
0.27406084537506104,
-0.12669597566127777,
0.03561166673898697,
-0.06530970335006714,
0.3070809841156006,
0.1440414935350418,
-0.2572273910045624,
0.09562039375305176,
0.004041200038045645,
-0.11015008389949799,
-0.013009684160351753,
-0.02575034275650978,
0.07924601435661316,
-0.22842031717300415,
-0.3421904146671295,
0.2250162959098816,
-0.16784843802452087,
0.26858288049697876,
0.20871485769748688,
0.24827343225479126,
0.0870916098356247,
0.337347149848938,
-0.275402307510376,
0.0220075361430645,
-0.23613736033439636,
-0.19603212177753448,
-0.1894156038761139,
-0.137654647231102,
0.2214827537536621,
0.3356516361236572,
0.1945112645626068,
-0.3410739004611969,
-0.2485634684562683,
0.07881925255060196,
0.49135822057724,
-0.13061802089214325,
-0.20826520025730133,
-0.13527143001556396,
0.1267029047012329,
0.4150705933570862,
0.11111791431903839,
0.4254838824272156,
-0.13801872730255127,
-0.12039346992969513,
-0.21549537777900696,
0.057632457464933395,
-0.18095797300338745,
-0.2985505759716034,
0.2368873804807663,
0.09342865645885468,
-0.14131811261177063,
0.012495303526520729,
-0.1953085958957672,
-0.20652705430984497,
-0.10413352400064468,
0.3453900218009949,
-0.04829079657793045,
0.0718260258436203,
-0.05895165354013443,
-0.009029625914990902,
0.1673339158296585,
0.39144688844680786,
-0.46486201882362366,
0.281120240688324,
0.06217790022492409,
0.4197709560394287,
-0.2656342089176178,
0.3187045156955719,
-0.07181244343519211,
0.17225031554698944,
-0.11614024639129639,
0.008509412407875061,
-0.24467098712921143,
-0.6641228795051575,
-0.43778708577156067,
0.4218232333660126,
-0.16200503706932068,
0.16865721344947815,
0.03097960352897644,
0.14459486305713654,
0.42355430126190186,
-0.3691795766353607,
0.32884618639945984,
0.2769603729248047,
-0.12845098972320557,
0.16866275668144226,
-0.25608664751052856,
-0.23015065491199493,
-0.3430407643318176,
0.3827190399169922,
0.21052579581737518,
-0.21591195464134216,
0.012101233005523682,
0.46206918358802795,
0.23962250351905823,
0.1523669958114624,
0.35822218656539917,
0.26409244537353516,
0.5892543196678162,
-0.15352560579776764,
-0.14096969366073608,
-0.1500268578529358,
-0.5206419825553894,
0.43066152930259705,
0.38630014657974243,
-0.12492425739765167,
-0.14289474487304688,
-0.0786508172750473,
-0.22074100375175476,
0.1517203003168106,
-0.3061749339103699,
0.359323650598526,
-0.03207958862185478,
-0.2808373272418976,
-0.034529708325862885,
0.23081572353839874,
0.013168159872293472,
0.3753029704093933,
-0.05340350791811943,
0.00011459167581051588,
-0.0845310240983963,
0.5892949104309082,
0.12691347301006317,
-0.23005512356758118,
0.06565319001674652,
0.19912463426589966,
0.14771538972854614,
-0.3349974453449249,
-0.15287044644355774,
0.11965625733137131,
0.025633221492171288,
0.17577877640724182,
0.26884761452674866,
0.05140380561351776,
0.30284756422042847,
-0.034122683107852936,
0.23010282218456268,
0.1259920448064804,
-0.11914526671171188,
-0.24972763657569885,
-0.11160031706094742,
0.1640501320362091,
-0.018670618534088135,
0.2442590296268463,
-0.1308332234621048,
0.018514523282647133,
0.1371942013502121,
-0.09259077906608582,
0.07588063925504684,
0.10112710297107697,
0.31888553500175476,
-0.04317905381321907,
0.07725617289543152,
-0.03980296105146408,
0.0987013727426529,
0.4627968966960907,
0.6134483814239502,
0.012249112129211426,
-0.4130662679672241,
0.1094222366809845,
-0.009646959602832794,
0.060472697019577026,
0.05362611263990402,
0.025167081505060196,
-0.07241895794868469,
0.010686971247196198,
-0.08244629204273224,
-0.30172285437583923,
-0.14531028270721436,
-0.39215579628944397,
-0.07417061179876328,
0.2588632106781006,
0.0007042802753858268,
0.17541801929473877,
0.08643878996372223,
-0.124695785343647,
-0.13938388228416443,
-0.2253023386001587,
0.23488308489322662,
0.26724347472190857,
-0.07326921820640564,
0.013060713186860085,
-0.25176629424095154,
0.19057270884513855,
0.11472753435373306,
-0.3452690839767456,
-0.45844632387161255,
-0.593555748462677,
0.03924774378538132,
0.4138108491897583,
-0.005098387598991394,
0.1574244201183319,
0.22899821400642395,
0.22785870730876923,
0.1977001130580902,
-0.22055746614933014,
-0.42036426067352295,
-0.2874382734298706,
-0.06433409452438354,
-0.10546669363975525,
0.6536205410957336,
0.11534861475229263,
0.15954764187335968,
0.2457083910703659,
-0.0609595812857151,
-0.4167057275772095,
0.03605058789253235,
0.01421055942773819,
-0.13694874942302704,
0.254003643989563,
-0.36565515398979187,
0.2590973377227783,
0.04458014667034149,
-0.0024777445942163467,
0.17514511942863464,
-0.22877918183803558,
0.001056259498000145,
0.2825094163417816,
-0.023783383890986443,
-0.23724302649497986,
0.03020487353205681,
0.19706761837005615,
-0.036492347717285156,
-0.5179988145828247,
0.14239832758903503,
-0.1319682002067566,
0.010187573730945587,
-0.033969853073358536,
0.2523225247859955,
-0.07725086063146591,
0.13748612999916077,
-0.5111334323883057,
0.10514199733734131,
-0.4406028091907501,
0.15532216429710388,
-0.03851088881492615,
-0.2520192265510559,
0.03835596516728401,
0.12053562700748444,
-0.09105493128299713,
0.15005259215831757,
-0.6417416334152222,
0.05651601031422615,
-0.4287381172180176,
0.3723193109035492,
-0.027623571455478668,
-0.19984152913093567,
-0.044800445437431335,
-0.11843083053827286,
0.021422838792204857,
0.087454654276371,
-0.06351085007190704,
0.1166093647480011,
0.443479061126709,
-0.14121457934379578,
-0.03429551050066948,
0.2353561818599701,
0.191669300198555,
0.26536425948143005,
0.23575791716575623,
-0.14393159747123718,
0.27466556429862976,
0.3120889365673065,
0.20163865387439728,
-0.30557548999786377,
-0.20440895855426788,
0.17411810159683228,
-0.07299739122390747,
-0.275699257850647,
0.013595931231975555,
0.004383925348520279,
0.30324962735176086,
-0.05015835538506508,
-0.13071024417877197,
0.22629275918006897,
-0.5607284307479858,
0.0230637826025486,
-0.21239307522773743,
0.034838512539863586,
0.006517905741930008,
-0.033571548759937286,
-0.11715465784072876,
-0.40232470631599426,
0.2563616931438446,
-0.07678668200969696,
0.1688813716173172,
-0.040854886174201965,
0.049370650202035904,
0.2007370889186859,
-0.5037559866905212,
0.05050257593393326,
-0.07239291071891785,
0.36358681321144104,
-0.15393950045108795,
0.019536111503839493,
0.23668710887432098,
-0.2818392515182495,
0.682880699634552,
-0.3002769351005554,
0.3237892985343933,
-0.10701081156730652,
0.018488455563783646,
-0.36444091796875,
-0.17236191034317017,
-0.08260326087474823,
0.2303772270679474,
0.0020695235580205917,
0.7693328857421875,
-0.08069579303264618,
-0.35368654131889343,
-0.19044020771980286,
0.16172859072685242,
-0.23571230471134186,
-0.22333134710788727,
-0.16529981791973114,
-0.26137176156044006,
-0.30354103446006775,
0.22521811723709106,
0.10040105134248734,
0.15587185323238373,
-0.2812289893627167,
-0.3021181523799896,
0.026003215461969376,
-0.0011470187455415726,
0.08619485795497894,
-0.16672854125499725,
-0.02684985101222992,
0.03621600568294525,
0.6639814376831055,
-0.31516510248184204,
0.0034260228276252747,
0.2593730092048645,
0.3635823428630829,
0.27729907631874084,
0.13558143377304077,
0.168401300907135,
-0.07802947610616684,
0.16677625477313995,
0.8263388872146606,
0.15940746665000916,
0.23823627829551697,
-0.2188807725906372,
0.33666980266571045,
-0.41873446106910706,
0.003567639272660017,
0.1965886503458023,
-0.09242216497659683,
-0.1609356850385666,
0.24352526664733887,
0.41675812005996704,
-0.09666475653648376,
0.10659733414649963,
0.11423070728778839,
0.3840647339820862,
0.17648594081401825,
0.20738881826400757,
0.13277357816696167,
0.979924738407135,
-0.3102875351905823,
0.16982366144657135,
-0.04234720766544342,
-0.003109075129032135,
-0.043544065207242966,
-0.6333487033843994,
-0.11661198735237122,
-0.20018015801906586,
-0.3024236857891083,
0.11174903810024261,
0.08568991720676422,
-0.10316929966211319,
0.05581319332122803,
-0.09285910427570343,
0.08555848151445389,
-0.19770920276641846,
0.41906440258026123,
-0.19768016040325165,
0.24399971961975098,
-0.3261730372905731,
-0.4959624707698822,
-0.15647707879543304,
0.16487151384353638,
0.031437017023563385,
-0.048538144677877426,
-0.05942180007696152,
0.011712763458490372,
-0.13057342171669006,
0.18725834786891937,
-0.31405749917030334,
0.021645620465278625,
0.3123140037059784,
-0.023132912814617157,
-0.14394254982471466,
-0.1429283171892166,
0.054209742695093155,
-0.5641482472419739,
0.30512768030166626,
0.23124100267887115,
-0.17710991203784943,
0.32575973868370056,
-0.15534168481826782,
0.021448666229844093,
0.17042042315006256,
-0.11341261863708496,
0.2670806646347046,
0.0774368941783905,
-0.11875776201486588,
0.16013318300247192,
0.16236057877540588,
-0.1942884624004364,
-0.09682619571685791,
-0.015536993741989136,
-0.015436694025993347,
-0.01255607046186924,
-0.06439366936683655,
0.09323713183403015,
-0.10974469780921936,
-0.16716249287128448,
0.05558814853429794,
0.05979766696691513,
-0.18935441970825195,
0.37835273146629333,
-0.09678737819194794,
-0.15456902980804443,
-0.008890155702829361,
0.37132295966148376,
-0.3275613486766815,
-0.1932196468114853,
0.09207228571176529,
0.3188649117946625,
-0.1847861409187317,
-0.20151641964912415,
0.35159602761268616,
-0.012421154417097569,
-0.5109383463859558,
0.2792472541332245,
-0.3503433167934418,
-0.011181831359863281,
0.1670176386833191,
0.016943760216236115,
-0.006683774292469025,
-0.19413715600967407,
-0.16645602881908417,
-0.09571626782417297,
-0.1483001708984375,
-0.05033324658870697,
0.10745754837989807,
0.2067868858575821,
-0.476942777633667,
0.09458208084106445,
-0.021793993189930916,
0.40373629331588745,
-0.1947639137506485,
0.16495423018932343,
-0.3420087993144989,
0.23262566328048706,
-0.29311221837997437,
-0.4595697224140167,
0.03741355612874031,
-0.2678849995136261,
-0.04574770852923393,
0.09241920709609985,
-0.15294162929058075,
-0.12227409332990646,
-0.23628856241703033,
0.1903356909751892,
0.1893203854560852,
0.1739175170660019,
-0.16682031750679016,
-0.3432016968727112,
0.17436768114566803,
-0.17570562660694122,
0.18914997577667236,
0.1338556408882141,
-0.09900887310504913,
-0.26908937096595764,
0.732658326625824,
0.19018957018852234,
-0.024524787440896034,
0.44166240096092224,
0.46100154519081116,
0.5311335921287537,
-0.028858812525868416,
0.03738965466618538,
0.05452387034893036,
0.04260355234146118,
-0.28762513399124146,
0.3660691976547241,
0.2803625762462616,
0.04939068481326103,
0.39157962799072266,
-0.23035971820354462,
0.1374916434288025,
0.08632523566484451,
0.3758821189403534,
0.4908483028411865,
-0.03577255830168724,
-0.49716058373451233,
0.24364691972732544,
0.09298474341630936,
0.10267992317676544,
-0.24107800424098969,
0.2818644940853119,
-0.05562826246023178,
-0.036441411823034286,
0.20599853992462158,
0.18303626775741577,
-0.29970109462738037,
-0.010596513748168945,
0.3796975612640381,
0.5373080372810364,
-0.19911064207553864,
-0.37585631012916565,
-0.04197753593325615,
0.12178333103656769,
-0.009604331105947495,
0.024430586025118828,
-0.11847862601280212,
0.2110508382320404,
0.802615225315094,
0.06376764178276062,
0.18039803206920624,
0.1867922842502594,
-0.07245185971260071,
0.18699216842651367,
-0.12172377109527588,
-0.30467820167541504,
0.10303418338298798,
-0.15545597672462463,
-0.04155055433511734,
0.07164701819419861,
0.21780869364738464,
-0.1886184960603714,
-0.18763676285743713,
-0.43360966444015503,
0.06782642006874084,
-0.14034509658813477,
0.23643618822097778,
0.07064376771450043,
0.011293172836303711,
-0.4067602753639221,
0.2310401201248169,
-0.06329777836799622,
0.22097152471542358,
0.4582328498363495,
0.5591537952423096,
0.21365582942962646,
0.24056144058704376,
-0.21015912294387817,
-0.06845507025718689,
0.22913116216659546,
-0.18099239468574524,
0.0904482826590538,
0.411953330039978,
-0.29224422574043274,
-0.2338348627090454,
-0.24112407863140106,
0.22108185291290283,
0.1934107095003128,
-0.4581367075443268,
0.43371713161468506,
0.30625879764556885,
0.06670314073562622,
0.09879862517118454,
0.18956226110458374,
-0.18547013401985168,
0.20504280924797058,
0.15339836478233337,
0.031063219532370567,
-0.08198058605194092,
-0.35252845287323,
-0.030681293457746506,
0.32235097885131836,
-0.059329621493816376,
0.4218238592147827,
0.11201243102550507,
-0.1746683418750763,
-0.21328380703926086,
-0.058081530034542084,
-0.22172871232032776,
-0.09328410774469376,
0.26636549830436707,
-0.5355955958366394,
0.07447626441717148,
-0.1866757571697235,
0.02572805806994438,
-0.4233061671257019,
0.6617637872695923,
0.24154861271381378,
0.07221462577581406,
-0.3551912307739258,
-0.2943958342075348,
-0.235279843211174,
0.2907284200191498,
-0.44818681478500366,
-0.014662638306617737,
0.06173195689916611,
0.4491550326347351,
0.06895585358142853,
0.025518719106912613,
-0.2532501220703125,
-0.2560182511806488,
-0.12963354587554932,
0.28376251459121704,
-0.13120689988136292,
0.06262803077697754,
0.1275707185268402,
0.01593598909676075,
-0.14396293461322784,
-0.4498976171016693,
0.35577940940856934,
0.10339115560054779,
-0.036319177597761154,
0.08136764913797379,
-0.23051893711090088,
0.4120982587337494,
-0.25365549325942993,
0.024521425366401672,
-0.1809060126543045,
0.012953482568264008,
0.07804342359304428,
-0.27691230177879333,
-0.3581109941005707,
-0.10688221454620361,
0.034435249865055084,
-0.29862281680107117,
-0.16860713064670563,
0.10910934209823608,
0.020839838311076164,
0.036850154399871826,
-0.13909202814102173,
0.199222132563591,
-0.08289040625095367,
0.3873385190963745,
0.08963917940855026,
-0.1866353154182434,
-0.26398828625679016,
0.3944455087184906,
0.2805514633655548,
0.23066505789756775,
0.10722105205059052,
0.3361836373806,
-0.43927890062332153,
-0.15550418198108673,
0.36137643456459045,
0.2324036955833435,
-0.4046545922756195,
0.006576591171324253,
0.2529052495956421,
-0.18358075618743896,
-0.023216785863041878,
-0.1305062472820282,
-0.12933409214019775,
-0.013140023685991764,
-0.005517926067113876,
-0.12338189780712128,
0.3363454043865204,
0.07808700203895569,
-0.08841858804225922,
-0.07756832242012024,
0.00037498027086257935,
0.07786964625120163,
0.02099495194852352,
0.12060946226119995,
0.16289062798023224
] |
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.04710442200303078,
-0.41798636317253113,
-0.21846047043800354,
0.25921615958213806,
0.27266204357147217,
0.06292108446359634,
0.3563428819179535,
0.2676527798175812,
0.21745391190052032,
0.05035842955112457,
0.19395604729652405,
0.30664584040641785,
-0.2323111742734909,
0.20342665910720825,
-0.062113888561725616,
-0.2593870460987091,
0.08841202408075333,
0.3514935076236725,
-0.13381509482860565,
0.0620170459151268,
-0.24053281545639038,
-0.027858084067702293,
-0.31974655389785767,
0.07457149773836136,
-0.007608373649418354,
0.05707748234272003,
0.100465789437294,
-0.024947330355644226,
0.15988090634346008,
-0.6049399971961975,
0.28790518641471863,
-0.149139866232872,
0.019849859178066254,
0.32377368211746216,
-0.00010375829151598737,
0.019800089299678802,
0.34191370010375977,
-0.16544826328754425,
-0.08550576865673065,
0.14313511550426483,
-0.1220293864607811,
-0.2844848036766052,
-0.031158650293946266,
-0.3491472899913788,
-0.19866299629211426,
-0.26800337433815,
-0.2031780183315277,
-0.594183623790741,
0.33203738927841187,
0.2959827184677124,
0.34590041637420654,
0.25856855511665344,
0.2651171088218689,
-0.25749480724334717,
-0.01548004150390625,
0.18089306354522705,
-0.12845726311206818,
-0.0060783494263887405,
0.3408774733543396,
0.11314621567726135,
0.16457617282867432,
0.13059276342391968,
-0.1344243735074997,
0.11708404123783112,
0.312821626663208,
-0.053207553923130035,
0.39407235383987427,
-0.2437315583229065,
-0.1069321557879448,
0.16523036360740662,
0.3610401153564453,
-0.05357685685157776,
-0.18203118443489075,
-0.20121142268180847,
-0.262515127658844,
-0.26448890566825867,
0.15473893284797668,
-0.26640015840530396,
-0.20313625037670135,
0.20632681250572205,
-0.07874923944473267,
0.3907146155834198,
-0.22993162274360657,
0.14628326892852783,
-0.04359755665063858,
-0.02776724100112915,
-0.017046526074409485,
0.04167315363883972,
-0.1192317008972168,
-0.5155988931655884,
0.18481965363025665,
0.014176735654473305,
-0.009562987834215164,
-0.0938849002122879,
-0.2894482910633087,
-0.29814836382865906,
0.106112539768219,
-0.5606130957603455,
0.2093029022216797,
-0.05674251914024353,
0.1505177915096283,
0.17143994569778442,
0.04243538901209831,
-0.07798140496015549,
-0.0359562411904335,
0.14009396731853485,
-0.0802483782172203,
-0.23755061626434326,
0.11568106710910797,
0.22041809558868408,
0.055707212537527084,
0.17004498839378357,
0.1361330896615982,
-0.26097172498703003,
0.2579144537448883,
0.1976235806941986,
0.29167455434799194,
-0.04475884139537811,
-0.3332902491092682,
0.10341793298721313,
-0.18412327766418457,
0.17126840353012085,
0.03926922008395195,
0.2885779142379761,
0.19740687310695648,
0.15423771739006042,
-0.03151605278253555,
0.13286295533180237,
0.10700386017560959,
0.042585115879774094,
-0.22705140709877014,
-0.1629076898097992,
-0.053471941500902176,
-0.157843217253685,
0.11485856771469116,
0.27532050013542175,
0.17816950380802155,
-0.027798611670732498,
0.03558579087257385,
-0.016814744099974632,
-0.2574976682662964,
-0.19778679311275482,
0.3033004403114319,
0.10882005095481873,
-0.2272164523601532,
-0.0034091398119926453,
0.07954435050487518,
0.11029338836669922,
-0.055586863309144974,
0.07367119193077087,
-0.06050717085599899,
0.05721035227179527,
-0.32464638352394104,
0.33431974053382874,
0.10519947111606598,
0.08715346455574036,
-0.10123566538095474,
0.03780517727136612,
0.26543861627578735,
-0.17296327650547028,
0.0576738640666008,
-0.1729719042778015,
-0.16085277497768402,
-0.36072006821632385,
0.10302475839853287,
0.25578051805496216,
-0.1098833978176117,
0.3903701901435852,
0.16066384315490723,
0.00505763478577137,
0.12115401774644852,
0.16192249953746796,
-0.033042747527360916,
-0.061130590736866,
-0.35631442070007324,
0.09594009816646576,
0.19857922196388245,
-0.20495276153087616,
-0.15620054304599762,
0.15130357444286346,
0.03493625670671463,
-0.02300116792321205,
0.2030218541622162,
0.11855780333280563,
0.1665697693824768,
-0.29970449209213257,
0.0816759392619133,
0.3415933847427368,
0.009001005440950394,
0.06412949413061142,
-0.16273073852062225,
-0.13897113502025604,
0.24546508491039276,
0.0966494232416153,
-0.1500980705022812,
0.015737853944301605,
0.040528204292058945,
-0.0486280731856823,
0.18196254968643188,
-0.1856204867362976,
-0.07877685874700546,
0.22755616903305054,
0.34803059697151184,
-0.15598902106285095,
0.10871721059083939,
-0.4654588997364044,
-0.4646006226539612,
0.2781715989112854,
-0.03746383264660835,
-0.36357545852661133,
-0.16886572539806366,
-0.0019101276993751526,
-0.365299791097641,
-0.009517771191895008,
-0.2788395285606384,
0.05030438303947449,
0.31288859248161316,
0.08334709703922272,
0.16688841581344604,
0.041441794484853745,
-0.09056338667869568,
-0.021224895492196083,
0.048134759068489075,
-0.0040605273097753525,
-0.22829318046569824,
0.4557194709777832,
-0.14375853538513184,
-0.21110393106937408,
0.10002259910106659,
0.3359682559967041,
0.18386465311050415,
-0.14404140412807465,
-0.035809215158224106,
0.2509452700614929,
0.2826004922389984,
-0.2906845211982727,
-0.4518152177333832,
-0.0477062463760376,
0.2732480764389038,
-0.4507535696029663,
-0.09724847227334976,
0.5742955207824707,
0.18885597586631775,
-0.14073260128498077,
-0.05976444482803345,
0.28920450806617737,
-0.03786398097872734,
0.19933083653450012,
-0.0008972920477390289,
0.03364703804254532,
0.40461111068725586,
0.02861141785979271,
0.13861849904060364,
-0.23224908113479614,
0.1207590252161026,
-0.001101270318031311,
0.07943971455097198,
-0.03714483976364136,
-0.2717805504798889,
0.35424667596817017,
0.3288266360759735,
0.03686117008328438,
0.2208014726638794,
0.03592441603541374,
0.04846881330013275,
0.018324170261621475,
0.07696577161550522,
-0.1406034231185913,
0.24067005515098572,
0.1070082038640976,
-0.12144032120704651,
-0.10592205077409744,
-0.16016043722629547,
-0.3054324686527252,
0.1251087784767151,
-0.15667442977428436,
0.22503671050071716,
0.23815125226974487,
0.3602884113788605,
0.004021129570901394,
-0.1414152979850769,
-0.39233559370040894,
-0.08155204355716705,
0.1736193746328354,
-0.14292822778224945,
0.11765772849321365,
-0.49738743901252747,
-0.5018405318260193,
-0.0992448627948761,
-0.08633189648389816,
0.2825612425804138,
-0.15539886057376862,
-0.1629946380853653,
0.21749301254749298,
-0.22466884553432465,
0.22577831149101257,
0.14682359993457794,
0.027090340852737427,
0.5003238320350647,
0.00855665560811758,
-0.2942657768726349,
0.15477289259433746,
-0.0858311802148819,
0.16914856433868408,
0.15571531653404236,
0.08371517807245255,
0.2576209604740143,
0.10116299986839294,
-0.21796807646751404,
-0.3053639233112335,
-0.30835485458374023,
-0.055289506912231445,
-0.11944021284580231,
0.04033516347408295,
0.2694130837917328,
0.23417970538139343,
0.17320846021175385,
-0.13777707517147064,
0.04558299854397774,
0.06424306333065033,
-0.33573585748672485,
0.2683330476284027,
0.09328571707010269,
-0.16538715362548828,
-0.29233261942863464,
-0.2621244490146637,
-0.17808139324188232,
-0.4526142477989197,
0.20079080760478973,
0.0735471099615097,
0.23395349085330963,
0.17960941791534424,
0.009876769967377186,
0.19677278399467468,
0.034787215292453766,
0.07653263956308365,
-0.1447371393442154,
0.5057510137557983,
0.24779389798641205,
-0.1005408838391304,
-0.30027833580970764,
-0.19945824146270752,
-0.2739053964614868,
-0.08660292625427246,
0.09610289335250854,
-0.2166614681482315,
-0.37160205841064453,
-0.3397776782512665,
0.05209600552916527,
-0.13596667349338531,
-0.21793505549430847,
0.2175457775592804,
0.12522666156291962,
-0.22327962517738342,
-0.17034947872161865,
-0.0409126803278923,
0.20429061353206635,
0.060369692742824554,
-0.14952248334884644,
0.21299725770950317,
0.5319019556045532,
0.0751594603061676,
0.03784703090786934,
0.3697429895401001,
-0.29822009801864624,
0.4855276346206665,
0.001698661595582962,
0.195030078291893,
-0.35971590876579285,
-0.18101835250854492,
-0.051903821527957916,
0.14004965126514435,
-0.05965082347393036,
0.02535659819841385,
-0.41536945104599,
-0.23569174110889435,
0.03329791873693466,
0.26244786381721497,
-0.020304106175899506,
-0.054743509739637375,
-0.10533289611339569,
-0.12212590873241425,
0.1688099503517151,
-0.08518439531326294,
0.25902286171913147,
0.011509716510772705,
-0.09580834209918976,
-0.12883074581623077,
-0.025152921676635742,
0.22461572289466858,
-0.04543256014585495,
-0.4586372971534729,
-0.21681171655654907,
-0.1660783290863037,
0.24556560814380646,
0.19789807498455048,
0.7688114047050476,
-0.22403378784656525,
-0.013212544843554497,
-0.1709773689508438,
0.07603764533996582,
0.3257194757461548,
-0.18024252355098724,
0.18379923701286316,
0.21192477643489838,
-0.0772373378276825,
-0.31308963894844055,
-0.09174531698226929,
-0.14255653321743011,
0.1091337725520134,
-0.07304137945175171,
0.5789587497711182,
-0.22845050692558289,
0.01129836868494749,
0.15475592017173767,
0.29608607292175293,
0.04468050226569176,
-0.08312641084194183,
-0.0852176621556282,
-0.32903963327407837,
-0.2037200927734375,
0.014617636799812317,
0.3654848337173462,
0.31403377652168274,
-0.03383849561214447,
-0.4097108244895935,
-0.3987472951412201,
-0.44826751947402954,
-0.06247681379318237,
0.06946742534637451,
0.35563012957572937,
-0.0015889337519183755,
0.26231837272644043,
-0.28405946493148804,
0.16388589143753052,
0.2541489899158478,
0.05034168064594269,
0.10778945684432983,
-0.17674043774604797,
0.09507393836975098,
-0.2930372655391693,
0.010163649916648865,
0.3663020431995392,
-0.20652015507221222,
0.18023288249969482,
-0.3409329056739807,
0.04447857290506363,
-0.09500319510698318,
-0.18549475073814392,
0.22844907641410828,
-0.09928856790065765,
-0.2958436608314514,
-0.14041315019130707,
0.24489444494247437,
-0.08738954365253448,
0.03569352626800537,
0.0664941668510437,
-0.11186511814594269,
-0.4245510399341583,
0.508695662021637,
0.20954088866710663,
0.6204478144645691,
0.2869951128959656,
0.09854665398597717,
0.5469993948936462,
0.11500056087970734,
0.270393043756485,
0.38944464921951294,
0.057043932378292084,
-0.38123688101768494,
-0.4136081337928772,
-0.1505180299282074,
-0.32609736919403076,
-0.020193561911582947,
0.08195528388023376,
-0.3083688020706177,
0.4172402024269104,
-0.20332035422325134,
0.26250630617141724,
0.1266467571258545,
-0.21755915880203247,
0.10480550676584244,
-0.10236313939094543,
-0.3038027584552765,
0.2093791961669922,
-0.0034283623099327087,
-0.21259614825248718,
-0.05935900658369064,
-0.44889771938323975,
-0.005653154104948044,
-0.05738496780395508,
-0.3051314055919647,
-0.03384508192539215,
-0.33612629771232605,
0.25724226236343384,
0.054224893450737,
-0.24795350432395935,
0.016241326928138733,
0.12021000683307648,
0.3753122091293335,
0.0581415519118309,
-0.1473599225282669,
-0.20985224843025208,
0.16917380690574646,
0.05446762964129448,
-0.19078880548477173,
-0.11952020227909088,
0.3211010694503784,
-0.0372871533036232,
0.16980403661727905,
0.13366472721099854,
-0.045653488487005234,
-0.22519347071647644,
-0.15071171522140503,
0.18058060109615326,
-0.2443750649690628,
-0.07271646708250046,
-0.395489901304245,
-0.1498870700597763,
-0.3200405240058899,
-0.30919140577316284,
0.23119021952152252,
-0.03252272307872772,
-0.031502507627010345,
0.2791801691055298,
-0.07089881598949432,
-0.10316263139247894,
-0.09029051661491394,
0.09799649566411972,
0.2143251597881317,
0.02034923806786537,
0.25548022985458374,
0.11535456776618958,
-0.27810996770858765,
-0.33880096673965454,
0.20081022381782532,
0.06216400861740112,
-0.23235470056533813,
0.29618778824806213,
-0.2951040267944336,
-0.07478490471839905,
-0.01637543924152851,
0.22146308422088623,
0.06665530800819397,
0.09915848821401596,
-0.05986214056611061,
-0.3167398273944855,
-0.18271414935588837,
0.21827036142349243,
-0.07887203991413116,
0.21400707960128784,
-0.27912285923957825,
0.20203647017478943,
-0.32837626338005066,
-0.16108845174312592,
-0.4142491817474365,
0.057756878435611725,
-0.2673042416572571,
-0.005166158080101013,
-0.11860683560371399,
-0.13504371047019958,
-0.0749206468462944,
0.002567763440310955,
0.26873472332954407,
0.3639912009239197,
-0.29587119817733765,
-0.3228549063205719,
0.09384419023990631,
0.09074842929840088,
0.028118042275309563,
-0.20415927469730377,
-0.15772275626659393,
-0.31680959463119507,
-0.3111022710800171,
-0.029937829822301865,
-0.09084038436412811,
-0.016918927431106567,
0.09050203859806061,
0.01732005551457405,
0.3415350914001465,
0.18863269686698914,
0.11462131142616272,
0.16494916379451752,
-0.2054087519645691,
0.013604626059532166,
-0.11632943898439407,
-0.02346767485141754,
-0.14315006136894226,
-0.07015468925237656,
-0.2507389783859253,
0.12684091925621033,
-0.17350222170352936,
-0.13996005058288574,
0.45171231031417847,
-0.22473208606243134,
-0.31629490852355957,
0.2763192355632782,
0.3224530816078186,
0.2534186840057373,
-0.33612656593322754,
-0.14395371079444885,
0.04570429399609566,
0.35777780413627625,
-0.2622300386428833,
-0.032069601118564606,
0.03221805766224861,
0.25675714015960693,
0.2456502914428711,
0.3134858012199402,
0.2492416799068451,
-0.21003903448581696,
0.19965551793575287,
0.2119215726852417,
0.2285010814666748,
-0.21879251301288605,
-0.049037858843803406,
0.38189801573753357,
0.13143038749694824,
-0.07731035351753235,
0.10097871720790863,
0.08210796117782593,
0.5738420486450195,
0.6612241864204407,
0.061581045389175415,
0.3648394048213959,
0.29572048783302307,
-0.18129101395606995,
0.09370163828134537,
-0.0012824609875679016,
-0.1307033896446228,
0.2839379906654358,
-0.03740766644477844,
0.1265767365694046,
0.2662622034549713,
0.15311385691165924,
-0.3817649781703949,
-0.2768877446651459,
-0.2246408462524414,
-0.09581255912780762,
-0.20689481496810913,
0.11691761016845703,
0.19301113486289978,
-0.004852294921875,
-0.24499963223934174,
-0.37791189551353455,
-0.21604493260383606,
0.1031118854880333,
0.18366429209709167,
0.05834142863750458,
0.05548194795846939,
-0.31514832377433777,
0.23301604390144348,
0.2465730607509613,
0.1518874317407608,
-0.05076833441853523,
0.35070908069610596,
0.4531875252723694,
-0.03034926950931549,
0.05250612646341324,
0.2983865737915039,
0.27180585265159607,
0.25199592113494873,
-0.21164967119693756,
-0.07964493334293365,
-0.2551904320716858,
-0.23054206371307373,
-0.1067473292350769,
0.2815169095993042,
0.009318873286247253,
0.0028188414871692657,
0.3695008456707001,
0.21507714688777924,
-0.17255543172359467,
0.15067896246910095,
0.23422420024871826,
-0.13705234229564667,
-0.29929473996162415,
0.45909053087234497,
-0.33238354325294495,
0.05405649542808533,
0.22126272320747375,
-0.018206551671028137,
-0.4808657169342041,
-0.06835301965475082,
0.19060516357421875,
0.0768950805068016,
0.2899590730667114,
0.3105178475379944,
0.13970163464546204,
-0.26347270607948303,
0.30977797508239746,
-0.004798565059900284,
0.22330144047737122,
-0.0559023842215538,
-0.09542575478553772,
-0.46187084913253784,
0.20735153555870056,
0.14966744184494019,
-0.03058408759534359,
0.30138882994651794,
0.12927758693695068,
0.09016601741313934,
0.03456692025065422,
0.003001600503921509,
0.013099899515509605,
0.08230146020650864,
0.3068798780441284,
-0.49578234553337097,
-0.16133224964141846,
0.05870281532406807,
-0.09419648349285126,
-0.08207206428050995,
-0.40551549196243286,
0.380834698677063,
-0.16678136587142944,
0.27225372195243835,
-0.20074953138828278,
0.08001844584941864,
-0.05929001793265343,
0.35464200377464294,
0.2655179500579834,
0.2444104701280594,
0.1577252596616745,
-0.027255626395344734,
-0.09036336839199066,
-0.09626133739948273,
-0.31052327156066895,
-0.02257004752755165,
0.3220643103122711,
0.2720545828342438,
0.36253827810287476,
-0.13911105692386627,
0.02651757001876831,
0.02864987403154373,
0.3302372992038727,
0.04790838807821274,
0.055014222860336304,
-0.3996938169002533,
0.4148034453392029,
-0.2634257376194,
0.18720267713069916,
0.07682104408740997,
0.053424715995788574,
0.02976522408425808,
0.25360459089279175,
-0.10441914945840836,
-0.6678898334503174,
0.49736276268959045,
0.1397109478712082,
-0.36296406388282776,
0.011703352443873882,
0.12347804754972458,
0.2633357644081116,
0.19111382961273193,
-0.2296278476715088,
-0.1261516809463501,
0.36815178394317627,
-0.06593623757362366,
-0.17572861909866333,
0.29004359245300293,
-0.052375536412000656,
0.005468446761369705,
-0.15694639086723328,
0.4868297576904297,
0.0703839659690857,
-0.18574459850788116,
0.05399574711918831,
-0.2175309807062149
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.