html_url
stringlengths
51
51
comments
stringlengths
67
24.7k
title
stringlengths
6
280
body
stringlengths
51
36.2k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
sequence
https://github.com/huggingface/datasets/issues/6597
IIUC, this could also be "fixed" by `create_repo("dataset_name")` not defaulting to `create_repo("user/dataset_name")` (when the user's token is available), which would be consistent with the rest of the `HfApi` ops used in the `push_to_hub` implementation. This is a (small) breaking change for `huggingface_hub`, but justified to make the API more consistent.
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`.
50
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`. IIUC, this could also be "fixed" by `create_repo("dataset_name")` not defaulting to `create_repo("user/dataset_name")` (when the user's token is available), which would be consistent with the rest of the `HfApi` ops used in the `push_to_hub` implementation. This is a (small) breaking change for `huggingface_hub`, but justified to make the API more consistent.
[ 0.015438482165336609, -0.24919451773166656, 0.0909704715013504, 0.20266947150230408, 0.17012590169906616, -0.09327994287014008, 0.33426424860954285, 0.1293419897556305, 0.10203634202480316, 0.2504817545413971, -0.17379999160766602, 0.16911724209785461, 0.13417616486549377, 0.18486499786376953, 0.33700326085090637, 0.00355176767334342, 0.37373703718185425, 0.05171223357319832, 0.10083949565887451, -0.2227458357810974, -0.3209478557109833, 0.20130577683448792, 0.3155643939971924, 0.24302104115486145, -0.38403260707855225, 0.07512932270765305, -0.0822150930762291, 0.3141355812549591, 0.04285726696252823, -0.2703762948513031, 0.381867915391922, 0.08118689060211182, -0.187546506524086, 0.5335442423820496, -0.00011352430010447279, 0.032377928495407104, 0.32375937700271606, 0.14692780375480652, -0.07764139026403427, -0.1377038210630417, -0.010118387639522552, -0.03416093438863754, 0.20317047834396362, -0.145224928855896, -0.1636558473110199, 0.19253720343112946, -0.1017942950129509, -0.16848769783973694, 0.1554388850927353, 0.02717026323080063, 0.16871929168701172, 0.2954501807689667, -0.215132474899292, -0.3792538642883301, 0.24198895692825317, 0.2198897898197174, -0.2396954596042633, -0.1938498169183731, -0.07619832456111908, 0.043617166578769684, 0.0403938852250576, 0.05226244032382965, 0.1358782798051834, -0.008792130276560783, 0.3499837815761566, 0.19785721600055695, -0.04423876106739044, -0.17525912821292877, 0.08280886709690094, 0.20463357865810394, 0.0020503029227256775, -0.3363734781742096, -0.18119990825653076, -0.2266252189874649, -0.07720816880464554, -0.26171875, 0.18662208318710327, 0.2123548984527588, -0.046385087072849274, -0.03636479005217552, 0.16176597774028778, -0.08432255685329437, -0.053364094346761703, -0.1654127985239029, -0.3474386930465698, 0.19285184144973755, -0.04683656245470047, 0.21263180673122406, 0.0522976815700531, -0.10138466954231262, 0.06061931699514389, -0.22353911399841309, 0.08178189396858215, -0.2885648012161255, -0.3020673990249634, -0.06670694053173065, 0.12056215107440948, 0.1724579632282257, 0.17624716460704803, -0.06231488287448883, -0.06324582546949387, 0.03075983002781868, -0.1829710304737091, -0.07587205618619919, 0.30829811096191406, -0.06915590167045593, -0.0482216402888298, 0.12731346487998962, 0.3331897258758545, 0.230097696185112, 0.08743730187416077, 0.051207128912210464, 0.15289627015590668, -0.016327813267707825, 0.11902226507663727, -0.3139321804046631, 0.5192510485649109, -0.1886286437511444, -0.24054041504859924, 0.15161418914794922, 0.12083028256893158, 0.2854456603527069, -0.05104907974600792, 0.25258418917655945, 0.05923638492822647, 0.07650621235370636, -0.20635583996772766, 0.4083736538887024, -0.19485202431678772, -0.01619287207722664, -0.35425645112991333, -0.12043152749538422, -0.1735084056854248, 0.06902241706848145, 0.03100854903459549, -0.29896974563598633, 0.09078947454690933, 0.2467953860759735, 0.26728036999702454, -0.1283719837665558, -0.09905122220516205, 0.1312398910522461, -0.051006607711315155, 0.23462283611297607, 0.28534799814224243, 0.2924600839614868, 0.1311950534582138, -0.3079206347465515, -0.2401861846446991, 0.11798633635044098, -0.3773583769798279, -0.16128629446029663, 0.007875194773077965, 0.20182475447654724, -0.058218151330947876, 0.021327055990695953, -0.47829562425613403, -0.10099470615386963, -0.07956798374652863, 0.14405182003974915, 0.03555387258529663, -0.10582209378480911, -0.09019763767719269, -0.24662764370441437, -0.0029645562171936035, 0.1744874119758606, 0.16627492010593414, -0.12877200543880463, -0.0778149962425232, 0.04691034182906151, 0.1649138480424881, 0.3313930630683899, -0.13963009417057037, 0.08928783237934113, -0.31186074018478394, 0.24460723996162415, 0.12366741895675659, -0.6206342577934265, -0.36080753803253174, -0.23052598536014557, -0.2461414784193039, 0.1624334752559662, 0.1833711564540863, 0.034876562654972076, 0.26033368706703186, -0.08892741799354553, 0.24719254672527313, 0.1505468487739563, 0.15008321404457092, 0.17409859597682953, -0.20474596321582794, -0.025881491601467133, 0.04110565409064293, -0.07966998219490051, 0.05524221807718277, 0.21327164769172668, 0.14958608150482178, 0.26596906781196594, 0.1730917990207672, -0.21138370037078857, 0.35901927947998047, 0.05938703566789627, 0.3196263015270233, 0.06833236664533615, 0.07005263864994049, 0.050139665603637695, -0.16368594765663147, 0.09642506390810013, -0.009244531393051147, 0.18709340691566467, -0.0008850283920764923, -0.4542750418186188, -0.43277707695961, 0.05658646672964096, -0.36993882060050964, -0.11257076263427734, 0.08746469765901566, 0.19152523577213287, -0.05690772831439972, -0.09721484780311584, -0.02257368713617325, 0.48097798228263855, -0.09999658167362213, 0.36283886432647705, -0.4081099033355713, 0.5923627018928528, 0.07231134921312332, -0.043861910700798035, 0.06515716016292572, 0.4730664789676666, 0.42086347937583923, -0.1541859209537506, 0.024269498884677887, 0.1276303380727768, 0.259639173746109, 0.234492689371109, 0.1132555902004242, 0.24414277076721191, 0.2902412414550781, -0.1648636758327484, 0.17541901767253876, 0.08339287340641022, 0.12544086575508118, -0.12359503656625748, -0.11287081241607666, 0.36889582872390747, 0.1119919866323471, 0.16600173711776733, -0.15368010103702545, 0.130827397108078, 0.264818012714386, -0.0013761669397354126, 0.07731126248836517, -0.17178253829479218, -0.018297282978892326, 0.07703277468681335, 0.0722421407699585, 0.017098506912589073, -0.1575428694486618, 0.279214471578598, 0.48250216245651245, -0.01178266853094101, 0.030840342864394188, 0.06619742512702942, -0.275278240442276, -0.154794842004776, 0.1916249841451645, 0.08696343004703522, 0.08126148581504822, 0.07136828452348709, 0.021308107301592827, 0.22510893642902374, -0.10836023092269897, -0.14316408336162567, -0.030855871737003326, -0.02337169274687767, -0.22792693972587585, -0.08860008418560028, 0.2509044408798218, -0.055873118340969086, -0.34727421402931213, 0.2775126099586487, -0.03519032523036003, 0.09796968102455139, -0.3823314309120178, -0.1713615208864212, -0.22204908728599548, -0.0037119388580322266, -0.10967616736888885, -0.2885034680366516, -0.3210916817188263, -0.4585382640361786, -0.041058249771595, 0.5180985331535339, -0.04613644629716873, 0.09305647760629654, 0.13586904108524323, 0.23850582540035248, -0.3008367419242859, 0.01695082150399685, -0.22288648784160614, -0.10420495271682739, -0.05905583128333092, 0.05400349199771881, -0.013963498175144196, 0.04453994333744049, 0.24435172975063324, -0.13748672604560852, 0.33168739080429077, -0.5492722392082214, -0.3512861728668213, 0.11461556702852249, -0.25528576970100403, 0.06617090851068497, 0.06705127656459808, -0.047894757241010666, 0.2615301311016083, -0.12859168648719788, 0.1464330554008484, -0.29124677181243896, -0.24251940846443176, 0.13350003957748413, -0.18995341658592224, -0.15784123539924622, 0.05952198803424835, 0.009777428582310677, 0.009549157693982124, -0.20420710742473602, 0.060553520917892456, 0.17715948820114136, 0.09420012682676315, -0.029623933136463165, -0.3841792643070221, 0.0521693080663681, 0.020154237747192383, -0.20640146732330322, -0.34809765219688416, -0.14491528272628784, -0.09713517129421234, -0.2335827797651291, -0.221814826130867, 0.01663704216480255, -0.13702814280986786, 0.22358818352222443, -0.1101173684000969, -0.3155533969402313, -0.4981982707977295, -0.23160436749458313, 0.3555920422077179, -0.02311769127845764, 0.04261180758476257, 0.19880017638206482, 0.06053983047604561, -0.02102210745215416, -0.08942591398954391, -0.41790759563446045, 0.14565406739711761, 0.5093021392822266, -0.28066879510879517, -0.07690896093845367, -0.09636072814464569, -0.24560269713401794, 0.35579153895378113, 0.31062841415405273, 0.1560700535774231, 0.6169494390487671, -0.09883132576942444, 0.47514811158180237, -0.43596088886260986, -0.13569432497024536, 0.03264351561665535, 0.18427060544490814, 0.09996844828128815, 0.4049713611602783, 0.04050024598836899, 0.06010504066944122, 0.1909005343914032, -0.36196696758270264, -0.17794862389564514, -0.5026760101318359, -0.3564576208591461, 0.06398200988769531, -0.21312081813812256, 0.13489149510860443, -0.013049066066741943, -0.2555274963378906, -0.1673997938632965, 0.30906054377555847, 0.34259098768234253, -0.23928242921829224, 0.08687563240528107, -0.5691158175468445, 0.07470659911632538, -0.5470923185348511, 0.1835412085056305, -0.2303580939769745, 0.15136751532554626, -0.010515429079532623, 0.031392134726047516, 0.2776808738708496, 0.0996258333325386, 0.8311391472816467, -0.3115123510360718, 0.14163461327552795, -0.04891865700483322, -0.01656734198331833, -0.40508976578712463, -0.04390167072415352, -0.10944774001836777, 0.26145467162132263, -0.4130733907222748, 0.7072532176971436, -0.21280533075332642, -0.2786579728126526, 0.007740329951047897, -0.04816744849085808, -0.09215038269758224, 0.18650951981544495, -0.2121415138244629, -0.38191932439804077, -0.22606950998306274, 0.173415407538414, 0.04859102517366409, 0.37484660744667053, -0.04616072401404381, -0.14748723804950714, -0.09382248669862747, -0.12346405535936356, 0.04062727838754654, 0.12808051705360413, 0.3118191659450531, -0.0018998794257640839, 0.19885733723640442, -0.03279869630932808, 0.26752784848213196, 0.2237829566001892, 0.6339151263237, -0.10645788162946701, -0.6870294213294983, 0.05852962285280228, -0.06843943893909454, 0.17005842924118042, 0.45944878458976746, 0.09557437896728516, 0.3866049647331238, -0.36369505524635315, 0.11407245695590973, -0.3710491359233856, 0.19127750396728516, 0.2654570937156677, 0.08417056500911713, -0.34431004524230957, -0.1326558142900467, 0.2998742163181305, 0.023508034646511078, -0.13423897325992584, 0.24553972482681274, 0.9367734789848328, -0.31878983974456787, 0.5409505367279053, -0.14136560261249542, 1.0033704042434692, 0.025619061663746834, 0.42319732904434204, 0.28099632263183594, -0.4333280324935913, 0.6217578649520874, -0.26201751828193665, -0.0035323016345500946, -0.42063385248184204, 0.025446537882089615, 0.05331326276063919, 0.025886259973049164, 0.029813405126333237, -0.26437506079673767, -0.07161574065685272, 0.1853923499584198, -0.21372264623641968, 0.5504489541053772, -0.18524843454360962, 0.18715105950832367, -0.09620016813278198, -0.42404478788375854, -0.15688928961753845, 0.21241536736488342, -0.011570895090699196, 0.1431806981563568, -0.1461666077375412, 0.006721474230289459, -0.344632625579834, 0.004175454378128052, -0.02446684241294861, 0.19816115498542786, 0.05090640112757683, -0.18353912234306335, 0.043724965304136276, -0.13275469839572906, -0.059858985245227814, -0.11435873806476593, 1.0006722211837769, 0.0069245873019099236, -0.2422933280467987, 0.2318151891231537, -0.23962755501270294, 0.20846855640411377, -0.03630445897579193, -0.1694645881652832, 0.1700008362531662, 0.021687187254428864, -0.37960779666900635, -0.1495327651500702, 0.11889614164829254, -0.1315467357635498, -0.07472050189971924, 0.05295143276453018, 0.08307655900716782, -0.4339052140712738, 0.10350975394248962, 0.14721232652664185, 0.07970736920833588, -0.2729911506175995, 0.10545456409454346, -0.06572186201810837, -0.1838650107383728, -0.1389169991016388, -0.00900870468467474, -0.37692832946777344, -0.049996938556432724, 0.010001406073570251, 0.1984853595495224, 0.19870276749134064, 0.16832411289215088, -0.3958948254585266, -0.062259282916784286, -0.0819498673081398, -0.18254169821739197, 0.43859750032424927, -0.39738360047340393, 0.0718248039484024, -0.12392060458660126, -0.2540801167488098, 0.0998096615076065, 0.2231673151254654, 0.054531704634428024, -0.07464607059955597, -0.057024598121643066, -0.10054543614387512, -0.05113174766302109, 0.03461809083819389, -0.21451377868652344, 0.10173691064119339, 0.2603514790534973, 0.202758327126503, -0.17243242263793945, 0.04667159169912338, -0.28888368606567383, 0.17305788397789001, -0.0945029929280281, 0.2212722897529602, -0.05770975723862648, -0.2631433308124542, 0.05067907273769379, -0.23213313519954681, 0.07571781426668167, 0.1735362559556961, -0.230737566947937, -0.23837721347808838, -0.3798850178718567, 0.1566690355539322, 0.1725585013628006, -0.1036723330616951, -0.10195732116699219, 0.09310342371463776, 0.1086830198764801, -0.27310553193092346, 0.6663407683372498, 0.2524029612541199, -0.021757472306489944, -0.25356581807136536, 0.8539038896560669, 0.10884953290224075, -0.20060381293296814, 0.1622728407382965, 0.22788803279399872, -0.0349600575864315, -0.3551473319530487, -0.021167559549212456, -0.417603462934494, -0.03228679299354553, 0.307204931974411, 0.3474805951118469, 0.6547709703445435, 0.1380648910999298, -0.030784577131271362, -0.14816835522651672, -0.08384108543395996, 0.04037553817033768, 0.3304613530635834, 0.15826530754566193, -0.16033713519573212, -0.29257652163505554, 0.18597060441970825, 0.15798655152320862, -0.12656432390213013, -0.3595026433467865, 0.6165555715560913, -0.06286454200744629, 0.09633414447307587, 0.3044627904891968, 0.6580751538276672, 0.2398742139339447, -0.10078111290931702, -0.10046687722206116, 0.5232782959938049, -0.16502246260643005, 0.33581167459487915, 0.10404011607170105, -0.2515929341316223, 0.18901222944259644, 0.43407875299453735, 0.11241107434034348, -0.0643300712108612, 0.5753309726715088, 0.0966452807188034, 0.4571661949157715, 0.22271917760372162, -0.2089390754699707, 0.4118124544620514, -0.15909332036972046, 0.06448863446712494, -0.09759178757667542, 0.015238184481859207, 0.08268800377845764, 0.13792438805103302, 0.24428044259548187, -0.14261916279792786, -0.35083723068237305, -0.4052416682243347, 0.05619637295603752, -0.40062636137008667, -0.1708884984254837, 0.07933767139911652, -0.05091501772403717, -0.16169580817222595, 0.10880011320114136, -0.24233387410640717, -0.28904256224632263, -0.037474051117897034, -0.1654912233352661, -0.008676107972860336, -0.04437160864472389, -0.15523864328861237, 0.12295311689376831, 0.13271750509738922, -0.028219178318977356, 0.239038348197937, 0.029523033648729324, -0.34726691246032715, -0.008612276054918766, 0.30791786313056946, 0.3524678647518158, -0.09737782925367355, -0.028555700555443764, 0.09016966074705124, 0.36439651250839233, 0.13299426436424255, 0.07226812839508057, -0.06755416095256805, 0.006089296191930771, 0.07196653634309769, 0.09461508691310883, 0.14286059141159058, -0.13957703113555908, -0.23822249472141266, 0.07178521156311035, 0.05087663605809212, -0.28826990723609924, 0.32023704051971436, -0.4579978287220001, -0.160980224609375, -0.15667185187339783, 0.20905698835849762, -0.2820785343647003, -0.162669375538826, 0.3944746255874634, -0.09702666103839874, 0.14778026938438416, -0.4504823386669159, 0.07281611859798431, 0.03426859900355339, 0.31305792927742004, -0.003498038277029991, -0.3764116168022156, -0.23389089107513428, -0.20591022074222565, -0.5347474813461304, 0.6548901796340942, -0.2989310026168823, 0.15617485344409943, 0.16271361708641052, -0.14669401943683624, -0.07339523732662201, -0.10515842586755753, -0.10497703403234482, 0.20678861439228058, -0.06406062096357346, -0.009253498166799545, -0.20321106910705566, 0.10238340497016907, 0.1480119675397873, -0.5023021101951599, 0.0621495395898819, -0.25349169969558716, 0.3794822096824646, 0.14100536704063416, -0.011313874274492264, 0.25654542446136475, 0.263011634349823, 0.21198125183582306, -0.3605739176273346, 0.2156066596508026, 0.17518340051174164, 0.19271992146968842, -0.04282510653138161, -0.04067877680063248, -0.17361488938331604, -0.2942180335521698, -0.5240721702575684, 0.16552838683128357, -0.4019489586353302, 0.06369826197624207, 0.033196188509464264, -0.19494500756263733, -0.17799387872219086, 0.10164625942707062, 0.2791283428668976, 0.17898863554000854, -0.1447395533323288, 0.2899530827999115, -0.32634493708610535, 0.05746736750006676, 0.32403069734573364, 0.22841455042362213, 0.13152708113193512, 0.23535972833633423, -0.10696305334568024, -0.39469510316848755, 0.39391395449638367, -0.14088653028011322, -0.38701504468917847, 0.03746120259165764, 0.3415803909301758, 0.12050631642341614, -0.40758535265922546, -0.25619393587112427, -0.01841726154088974, 0.12338203191757202, -0.19340035319328308, -0.033282071352005005, 0.261723130941391, -0.23211973905563354, -0.09920624643564224, 0.022709988057613373, 0.005024844780564308, 0.3209182024002075, -0.2541312575340271, 0.597865879535675, -0.22578281164169312 ]
https://github.com/huggingface/datasets/issues/6597
Hmm, creating repo with implicit namespace (e.g. `create_repo("dataset_name")`) is a convenient feature used in a lot of integrations. It is not consistent with other HfApi methods specifically because it is the method to create repos. Once the repo is created, the return value provides the explicit repo_id (`namespace/repo_name`) that has to be passed to every `HfApi` method. Otherwise, libraries/scripts would often need to do a `whoami` call to get the namespace before creating a repo. Another solution for https://github.com/huggingface/datasets/issues/6597#issuecomment-1893746690 could be that implicit namespace is allowed (same as today) except if the `repo_id` is in a hard-coded list of canonical datasets. This list can be maintained automatically and should be slowly decreasing. **Caveat:** as a normal user I wouldn't be able to implicitly push to `imagenet-1k` if I wanted to push to `Wauplin/imagenet-1k`. Shouldn't be too problematic, no? Worse case, would need to add a `whoami` call and allow implicit-canonical-name for non-HF users for instance (a bit too over-engineered IMO but doable).
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`.
162
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`. Hmm, creating repo with implicit namespace (e.g. `create_repo("dataset_name")`) is a convenient feature used in a lot of integrations. It is not consistent with other HfApi methods specifically because it is the method to create repos. Once the repo is created, the return value provides the explicit repo_id (`namespace/repo_name`) that has to be passed to every `HfApi` method. Otherwise, libraries/scripts would often need to do a `whoami` call to get the namespace before creating a repo. Another solution for https://github.com/huggingface/datasets/issues/6597#issuecomment-1893746690 could be that implicit namespace is allowed (same as today) except if the `repo_id` is in a hard-coded list of canonical datasets. This list can be maintained automatically and should be slowly decreasing. **Caveat:** as a normal user I wouldn't be able to implicitly push to `imagenet-1k` if I wanted to push to `Wauplin/imagenet-1k`. Shouldn't be too problematic, no? Worse case, would need to add a `whoami` call and allow implicit-canonical-name for non-HF users for instance (a bit too over-engineered IMO but doable).
[ -0.05977807939052582, -0.03659529983997345, 0.11248317360877991, 0.10316121578216553, 0.3251781463623047, -0.11299433559179306, 0.43455737829208374, 0.2440657913684845, 0.14013831317424774, 0.32332760095596313, -0.33410531282424927, 0.3199589252471924, 0.16297756135463715, 0.12308022379875183, 0.20524966716766357, 0.03705506771802902, 0.26899945735931396, 0.014116492122411728, 0.006628796458244324, -0.22308102250099182, -0.41085660457611084, 0.04901973158121109, 0.29507768154144287, 0.1370788812637329, -0.2578670382499695, 0.07038754969835281, -0.1777668595314026, 0.22274252772331238, 0.04356729984283447, -0.203155979514122, 0.37786975502967834, 0.26189714670181274, -0.09016792476177216, 0.634026825428009, -0.00011230853124288842, 0.1717502772808075, 0.3922570049762726, 0.1441270112991333, -0.3107644319534302, -0.08075900375843048, -0.20740684866905212, 0.012277066707611084, 0.103012815117836, -0.2285134494304657, -0.06206190958619118, 0.2538836598396301, -0.013530849479138851, -0.23258128762245178, 0.15169569849967957, -0.006102990359067917, 0.16763681173324585, 0.2778698205947876, -0.09957729279994965, -0.36867600679397583, 0.41225743293762207, 0.23840880393981934, -0.33982184529304504, -0.10506545007228851, -0.08701138198375702, 0.046372219920158386, 0.050960931926965714, 0.1915317326784134, 0.12014555931091309, 0.045495424419641495, 0.2072119265794754, 0.21089166402816772, 0.040538862347602844, -0.19295597076416016, 0.021484995260834694, 0.2253447026014328, 0.17963528633117676, -0.33864593505859375, -0.3816934823989868, -0.22644957900047302, -0.15401196479797363, -0.23017609119415283, 0.1819608211517334, 0.22510835528373718, -0.11296512186527252, -0.024341000244021416, -0.058869875967502594, 0.014443311840295792, -0.08798623830080032, -0.012742985039949417, -0.17504580318927765, 0.24575559794902802, 0.04570920765399933, 0.1777157485485077, 0.1573440134525299, -0.19769681990146637, -0.06916916370391846, -0.279570609331131, 0.07858727872371674, -0.24952973425388336, -0.1750980168581009, -0.0972195640206337, 0.02976343408226967, -0.014473862946033478, 0.3824990689754486, -0.03153765946626663, -0.12370114773511887, 0.05669250339269638, -0.23988556861877441, 0.008628717623651028, 0.2893761992454529, 0.07227850705385208, -0.09836028516292572, 0.20535723865032196, 0.35092756152153015, 0.32469478249549866, 0.10304426401853561, 0.028851032257080078, 0.03329809755086899, 0.04624954238533974, 0.18105900287628174, -0.2683749794960022, 0.5649973154067993, -0.2486787736415863, -0.24442070722579956, 0.059520985931158066, 0.007769368588924408, 0.27374017238616943, -0.15380440652370453, 0.27364885807037354, 0.055705513805150986, 0.030506066977977753, -0.1247704029083252, 0.43659907579421997, -0.16947202384471893, -0.08578876405954361, -0.23772338032722473, -0.21054017543792725, -0.2132616937160492, 0.021302636712789536, 0.026518896222114563, -0.2536662220954895, 0.05268599092960358, 0.19195428490638733, 0.3829682767391205, -0.13073314726352692, -0.04512705281376839, 0.0953482985496521, -0.11288292706012726, 0.3446022570133209, 0.19714996218681335, 0.1475694179534912, 0.17411671578884125, -0.41458117961883545, -0.18543002009391785, 0.060504112392663956, -0.3984892666339874, -0.1335357427597046, -0.04425305873155594, 0.2050321251153946, 0.07946629077196121, 0.02480209246277809, -0.5232733488082886, -0.15538904070854187, 0.0306922048330307, 0.17921090126037598, -0.007939085364341736, -0.09638587385416031, -0.04752564802765846, -0.20108449459075928, 0.11173960566520691, 0.28311556577682495, 0.018902480602264404, -0.10581114143133163, -0.12211557477712631, 0.07169214636087418, 0.18955378234386444, 0.29178372025489807, -0.13249363005161285, -0.032615888863801956, -0.28105100989341736, 0.12939436733722687, 0.025941070169210434, -0.5734636783599854, -0.2753417193889618, 0.03291894868016243, -0.1165628507733345, 0.18140238523483276, 0.13757409155368805, -0.04806030914187431, 0.2064935266971588, -0.22442889213562012, 0.19285695254802704, 0.17536158859729767, -0.02217523567378521, 0.22106431424617767, -0.2980760931968689, -0.1395142674446106, -0.05131710693240166, 0.09401127696037292, 0.07193757593631744, 0.24052931368350983, 0.24585577845573425, 0.2226521074771881, 0.11160631477832794, -0.24841263890266418, 0.3267415463924408, 0.021233126521110535, 0.43616926670074463, 0.15451861917972565, 0.13634498417377472, 0.04213327914476395, -0.20511190593242645, 0.1020563542842865, 0.01938685029745102, 0.28069543838500977, -0.0868142768740654, -0.500942051410675, -0.4004760980606079, 0.08439532667398453, -0.3904734253883362, -0.10661096125841141, 0.11625473201274872, 0.25406575202941895, -0.1673847734928131, -0.08771375566720963, 0.032512933015823364, 0.5732247829437256, -0.1687871366739273, 0.394747257232666, -0.37477245926856995, 0.5655501484870911, 0.017360655590891838, 0.002864006906747818, 0.07140220701694489, 0.4375894367694855, 0.372385174036026, -0.29814350605010986, -0.024470046162605286, 0.23756003379821777, 0.19451527297496796, 0.04841521754860878, 0.24582676589488983, 0.25487035512924194, 0.23098810017108917, -0.24698247015476227, 0.21585793793201447, 0.1566026508808136, 0.19384735822677612, 0.04178816080093384, -0.1450432538986206, 0.3656301498413086, 0.10969385504722595, 0.2056499719619751, -0.17654168605804443, 0.10950259864330292, 0.36099329590797424, -0.17717143893241882, -0.0070060305297374725, -0.25723618268966675, -0.09981060773134232, 0.17334212362766266, 0.023699842393398285, -0.018060242757201195, -0.08680829405784607, 0.26353663206100464, 0.3738059997558594, 0.012372270226478577, -0.01747918128967285, 0.08121839910745621, -0.26163578033447266, -0.1010502278804779, 0.0914246216416359, 0.26448386907577515, 0.04956935718655586, 0.14865857362747192, -0.10524577647447586, 0.14222362637519836, -0.22158506512641907, -0.07483179122209549, 0.04586644470691681, 0.1500767320394516, 0.022371649742126465, -0.13327372074127197, 0.34004005789756775, -0.017127130180597305, -0.24409162998199463, 0.15913079679012299, 0.03444787859916687, 0.1283804178237915, -0.42770424485206604, -0.09336134791374207, -0.24211624264717102, -0.15119343996047974, -0.08244188129901886, -0.01460878923535347, -0.35733091831207275, -0.45722904801368713, -0.08255539834499359, 0.3527660071849823, -0.1141914427280426, 0.2285502701997757, 0.12173959612846375, 0.29838961362838745, -0.2679619789123535, -0.06782541424036026, -0.2455100119113922, -0.14773429930210114, -0.11707058548927307, 0.041269928216934204, 0.11775517463684082, -0.20303824543952942, 0.3980371356010437, -0.05060945078730583, 0.21222585439682007, -0.5286516547203064, -0.38128477334976196, 0.10706403851509094, -0.2967281639575958, 0.18989942967891693, -0.014814749360084534, -0.13200414180755615, 0.332000732421875, -0.1795870065689087, 0.15734407305717468, -0.12707999348640442, -0.27786120772361755, 0.1252453327178955, -0.11666250973939896, -0.18735840916633606, -0.06816399842500687, 0.07208992540836334, 0.11329181492328644, -0.18213051557540894, 0.036260806024074554, 0.188935786485672, 0.07376687228679657, 0.1180160790681839, -0.3695157766342163, 0.10864855349063873, 0.06872624158859253, -0.2227649837732315, -0.30311447381973267, -0.01214878261089325, -0.031499892473220825, -0.14489170908927917, -0.18249203264713287, 0.09258480370044708, -0.12615376710891724, 0.12557998299598694, 0.17452850937843323, -0.3391905128955841, -0.5050773620605469, -0.20515002310276031, 0.5296434164047241, 0.0623447522521019, 0.03042914904654026, 0.28289327025413513, 0.047928545624017715, -0.05438689514994621, -0.1577134132385254, -0.466619610786438, 0.1619076132774353, 0.3385436534881592, -0.20668843388557434, -0.03502049297094345, 0.06630502641201019, -0.16076278686523438, 0.4012126624584198, 0.21560461819171906, 0.08648045361042023, 0.5967228412628174, -0.07876411825418472, 0.4655742049217224, -0.4287131130695343, -0.11199747771024704, 0.12858818471431732, 0.11301102489233017, 0.09797251969575882, 0.37255895137786865, 0.04023386910557747, -0.2036314308643341, 0.0889413133263588, -0.30237680673599243, -0.2249888926744461, -0.45619434118270874, -0.37538355588912964, 0.01021021418273449, -0.13809862732887268, 0.19217517971992493, -0.13134801387786865, -0.2359384298324585, -0.15506581962108612, 0.2635084390640259, 0.3689071536064148, -0.2366134226322174, 0.043226249516010284, -0.44148319959640503, 0.20942318439483643, -0.3067355751991272, 0.19973129034042358, -0.14148098230361938, 0.17441344261169434, -0.009571023285388947, 0.034456200897693634, 0.2702353000640869, -0.004533972591161728, 0.7913320064544678, -0.44323113560676575, 0.2081916332244873, -0.023518554866313934, -0.10970473289489746, -0.26367461681365967, -0.05496501922607422, -0.2429497092962265, 0.22934693098068237, -0.2949514091014862, 0.6799044013023376, -0.3741920590400696, -0.3306266665458679, 0.11901417374610901, -0.04772336408495903, -0.06258207559585571, 0.19823111593723297, -0.11185838282108307, -0.2902217507362366, -0.23593705892562866, 0.1526416391134262, 0.04284009337425232, 0.28630465269088745, -0.08844472467899323, -0.038136597722768784, -0.1609308123588562, 0.013089895248413086, -0.021062888205051422, 0.07664412260055542, 0.2748080790042877, 0.11203677952289581, 0.2862255871295929, -0.08180688321590424, 0.37935343384742737, 0.35687902569770813, 0.5914340615272522, -0.12718531489372253, -0.7278500199317932, 0.029340073466300964, -0.15585604310035706, 0.1739114224910736, 0.40829920768737793, 0.12985703349113464, 0.1092451736330986, -0.37604331970214844, 0.1933450549840927, -0.2902134358882904, 0.10441377758979797, 0.30081674456596375, 0.039049841463565826, -0.3129197955131531, -0.2547581195831299, 0.28986579179763794, -0.044764094054698944, -0.13220591843128204, 0.3073439598083496, 0.8300334811210632, -0.3867587745189667, 0.5575939416885376, -0.01991666853427887, 1.0052136182785034, -0.04423756152391434, 0.3952365219593048, 0.2799164354801178, -0.41095641255378723, 0.5700827240943909, -0.30167144536972046, -0.08866545557975769, -0.3402063548564911, 0.16381032764911652, 0.12476201355457306, 0.05996514856815338, 0.04442637786269188, -0.329018235206604, -0.1822807788848877, 0.1487366259098053, -0.16949717700481415, 0.5241379141807556, -0.007938714697957039, 0.08051474392414093, -0.017640238627791405, -0.48786988854408264, -0.07870741188526154, 0.228986918926239, -0.04966035857796669, 0.01441505178809166, -0.10185141861438751, -0.05332859605550766, -0.28934693336486816, 0.02413942664861679, -0.0687224492430687, 0.29841724038124084, -0.0816091001033783, -0.1480739712715149, 0.1354524940252304, 0.05828094482421875, 0.05438512563705444, -0.07296466827392578, 1.0307246446609497, 0.11740221083164215, -0.2745482325553894, 0.19817110896110535, -0.14001749455928802, 0.23253613710403442, -0.05113277584314346, -0.20182088017463684, 0.30608734488487244, 0.0037858188152313232, -0.20375986397266388, -0.3154503405094147, 0.037441615015268326, -0.12220052629709244, -0.047710493206977844, -0.0565473772585392, 0.13125590980052948, -0.4054866135120392, 0.18722105026245117, 0.18036684393882751, 0.07857063412666321, -0.29734763503074646, 0.11458044499158859, -0.19066883623600006, -0.1481528878211975, -0.2568823993206024, 0.015361068770289421, -0.3979000747203827, -0.010927197523415089, 0.011691346764564514, 0.18397250771522522, 0.2182171642780304, 0.19782675802707672, -0.4198189079761505, -0.08262035995721817, -0.11097444593906403, -0.1493099182844162, 0.3738681375980377, -0.4965696930885315, 0.08486433327198029, -0.14993125200271606, -0.1856391280889511, 0.09948243945837021, 0.13872885704040527, -0.002760405885055661, -0.17108412086963654, -0.04427554830908775, -0.15887904167175293, 0.0027374327182769775, -0.03429146856069565, -0.3489267826080322, 0.014564594253897667, 0.09582504630088806, 0.2201911211013794, -0.07019563019275665, -0.009750822558999062, -0.3177352845668793, 0.10260974615812302, -0.19235029816627502, 0.16621237993240356, 0.11066776514053345, -0.20263566076755524, 0.12242441624403, -0.2745177149772644, 0.09538363665342331, 0.13999806344509125, -0.28544116020202637, -0.21602579951286316, -0.4852214455604553, 0.1476907581090927, 0.17603549361228943, -0.15891218185424805, -0.047231774777173996, -0.044204749166965485, -0.03547920659184456, -0.3067522644996643, 0.49938416481018066, 0.11762399226427078, -0.10718603432178497, -0.22938302159309387, 0.9484637379646301, 0.10505945980548859, -0.16468565165996552, 0.19724076986312866, 0.14446137845516205, 0.06716340780258179, -0.30126768350601196, 0.02211170084774494, -0.45285263657569885, -0.07848921418190002, 0.16553251445293427, 0.3220427334308624, 0.47888046503067017, 0.26104190945625305, 0.1446751058101654, -0.24450550973415375, -0.11698798835277557, 0.06535002589225769, 0.3642674684524536, 0.0666516125202179, -0.18645422160625458, -0.309261679649353, 0.21424797177314758, 0.15605339407920837, -0.14865908026695251, -0.25109246373176575, 0.5870227217674255, -0.08507609367370605, 0.12667620182037354, 0.3474198281764984, 0.5995209813117981, 0.2717757225036621, -0.029564306139945984, -0.08964843302965164, 0.5845053195953369, -0.2687779366970062, 0.27781006693840027, 0.23067232966423035, -0.16290681064128876, 0.2642260193824768, 0.30887582898139954, 0.1345554143190384, -0.09973670542240143, 0.4290516972541809, -0.01926364004611969, 0.4643242061138153, 0.30409449338912964, -0.1820554882287979, 0.3440558612346649, -0.14024585485458374, 0.055206622928380966, 0.03586824983358383, -0.005435485392808914, 0.13111373782157898, 0.003393009305000305, 0.26615971326828003, -0.03825764358043671, -0.3020477592945099, -0.38542675971984863, 0.015233855694532394, -0.2594309151172638, -0.1314862072467804, -0.17522433400154114, -0.10279503464698792, -0.32107287645339966, 0.10754507780075073, -0.2530713379383087, -0.15921221673488617, 0.17181922495365143, -0.12175814807415009, 0.021495293825864792, -0.1794995367527008, -0.12150059640407562, 0.14204025268554688, 0.16687384247779846, -0.109965480864048, 0.28610652685165405, -0.05516964569687843, -0.25823187828063965, -0.0829109251499176, 0.4233897030353546, 0.3761536180973053, -0.045732930302619934, -0.04173262417316437, 0.047539111226797104, 0.35751697421073914, 0.1612488329410553, 0.07537424564361572, -0.07630659639835358, -0.056204210966825485, 0.09467661380767822, 0.1378220021724701, 0.10955868661403656, -0.12288571894168854, -0.11231954395771027, -0.044840775430202484, -0.008882353082299232, -0.20617249608039856, 0.3139583468437195, -0.28420567512512207, -0.11000294238328934, -0.05165095627307892, 0.13209587335586548, -0.1856909990310669, -0.16586333513259888, 0.4418795108795166, -0.1472829282283783, 0.09241077303886414, -0.3427301049232483, 0.0869549959897995, 0.030887380242347717, 0.32415279746055603, 0.18686184287071228, -0.386003315448761, -0.2514830231666565, -0.16822540760040283, -0.5709586143493652, 0.4791809618473053, -0.4061506688594818, -0.016731128096580505, 0.23577262461185455, -0.050205573439598083, 0.10594993084669113, -0.10445665568113327, -0.15980875492095947, -0.04891841113567352, 0.0374164804816246, -0.08470034599304199, -0.34522926807403564, -0.015812668949365616, 0.13985179364681244, -0.41669443249702454, 0.0917820855975151, -0.3897078335285187, 0.3157920241355896, 0.20565073192119598, -0.005865134298801422, 0.3575693666934967, 0.3436446487903595, 0.3068995177745819, -0.39543789625167847, 0.16700232028961182, 0.13533353805541992, 0.1733723282814026, -0.028249017894268036, -0.09711441397666931, -0.15419241786003113, -0.3137553930282593, -0.5140765309333801, 0.016465358436107635, -0.34864649176597595, 0.09801508486270905, -0.09060182422399521, -0.16378086805343628, -0.2127332091331482, -0.03859354183077812, 0.20262673497200012, 0.22380603849887848, -0.07583822309970856, 0.29624906182289124, -0.26415014266967773, -0.020931776612997055, 0.34456387162208557, 0.22010737657546997, 0.09890148788690567, 0.19624777138233185, -0.1997479498386383, -0.39908313751220703, 0.35904210805892944, -0.18629103899002075, -0.4825447201728821, 0.07403374463319778, 0.3602624535560608, 0.05898619815707207, -0.4353143870830536, -0.2106739580631256, 0.06056113541126251, 0.21184973418712616, -0.12209643423557281, -0.23922374844551086, 0.29694512486457825, -0.16047237813472748, -0.13587765395641327, 0.018756777048110962, -0.13634702563285828, 0.272533118724823, -0.2594897449016571, 0.4963993430137634, -0.08892820030450821 ]
https://github.com/huggingface/datasets/issues/6597
As canonical datasets are going to disappear in the following couple of months, I would not make any effort on their support. I propose reverting #6519, so that the behavior of `push_to_hub` is aligned with the one described in its dosctring: "Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user." I'm opening a PR.
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`.
58
Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace. ## Steps to reproduce the bug The command: ```python commit_info = ds.push_to_hub( "caner", config_name="default", commit_message="Convert dataset to Parquet", commit_description="Convert dataset to Parquet.", create_pr=True, token=token, ) ``` creates the additional dataset `albertvillanova/caner`. As canonical datasets are going to disappear in the following couple of months, I would not make any effort on their support. I propose reverting #6519, so that the behavior of `push_to_hub` is aligned with the one described in its dosctring: "Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user." I'm opening a PR.
[ -0.11891815066337585, -0.05135495960712433, 0.05666367709636688, 0.08923321962356567, 0.2523309886455536, -0.1649923175573349, 0.24353288114070892, 0.13927210867404938, -0.03309636563062668, 0.23708900809288025, 0.011932600289583206, 0.4353119730949402, -0.10320337861776352, 0.06003129482269287, 0.28004300594329834, 0.048541247844696045, 0.33860939741134644, 0.020444165915250778, -0.035493798553943634, -0.08317258954048157, -0.5006035566329956, -0.013246928341686726, 0.10822488367557526, 0.15267254412174225, -0.2815743684768677, 0.09620394557714462, 0.09897918999195099, 0.18556061387062073, -0.055774033069610596, -0.43649744987487793, 0.29661497473716736, 0.2090456336736679, -0.08748824149370193, 0.48639175295829773, -0.00011663133045658469, 0.045249246060848236, 0.39725741744041443, 0.15415102243423462, -0.05295765772461891, -0.1296321153640747, -0.21777236461639404, 0.05721995234489441, 0.2456304430961609, -0.12688803672790527, -0.14092493057250977, 0.05054950714111328, 0.03049418143928051, -0.3893197178840637, -0.02994707226753235, 0.2032405138015747, 0.15665218234062195, 0.03775821626186371, -0.01927054673433304, -0.3978765606880188, 0.124422088265419, 0.2856203317642212, -0.17489011585712433, 0.02312956005334854, -0.027006831020116806, -0.007649894803762436, 0.12415730953216553, 0.029999326914548874, 0.05990796536207199, 0.03689632564783096, 0.48747915029525757, 0.0767693743109703, 0.16468361020088196, -0.2037990540266037, 0.04835999011993408, 0.0791485458612442, 0.11164941638708115, -0.3534608483314514, -0.07578955590724945, -0.22314822673797607, -0.1386028528213501, -0.20959143340587616, 0.17252245545387268, 0.13079063594341278, -0.1100715845823288, 0.06055289879441261, 0.026214107871055603, -0.07827173173427582, -0.14764872193336487, -0.1486569046974182, -0.4621342718601227, 0.44851216673851013, -0.03155101090669632, 0.19710147380828857, 0.04596756026148796, -0.1608695387840271, 0.3192278742790222, -0.1202467828989029, 0.031665701419115067, -0.5584366321563721, -0.12431497126817703, -0.0030810311436653137, 0.1961367428302765, 0.22912004590034485, 0.14684146642684937, 0.05361486226320267, -0.03971850872039795, -0.000025025568902492523, -0.15962985157966614, -0.1297701597213745, 0.2961072325706482, -0.0017260909080505371, 0.07290208339691162, 0.3446643352508545, 0.17710527777671814, 0.20619596540927887, -0.10209319740533829, 0.15252535045146942, 0.04353382810950279, -0.32567134499549866, 0.19443248212337494, -0.08964601159095764, 0.6540652513504028, -0.011649809777736664, -0.11285585910081863, 0.2444547712802887, 0.14503374695777893, 0.3590492010116577, -0.0036361925303936005, 0.15064460039138794, 0.12320640683174133, 0.12770967185497284, -0.2187453806400299, 0.2787615954875946, -0.06442682445049286, -0.07163193821907043, -0.24592068791389465, -0.0500231608748436, -0.30617332458496094, -0.15455666184425354, 0.046853139996528625, -0.3228677213191986, 0.04361210763454437, 0.31579428911209106, 0.27717310190200806, -0.2419682890176773, -0.07974867522716522, 0.14639194309711456, 0.06949807703495026, 0.1787422001361847, 0.1539183109998703, 0.23447304964065552, 0.1058279499411583, -0.5483894944190979, -0.24577030539512634, 0.44044390320777893, -0.3668965697288513, -0.32181859016418457, -0.12761200964450836, 0.19121506810188293, -0.11991091072559357, 0.08933253586292267, -0.45366138219833374, 0.0018806979060173035, -0.09930254518985748, 0.10367214679718018, 0.10001608729362488, -0.3523588180541992, -0.04933268949389458, -0.2823945879936218, 0.03218904137611389, 0.16209417581558228, -0.08150289952754974, 0.11206753551959991, -0.09638248383998871, 0.2030719816684723, 0.19323766231536865, 0.04063182324171066, -0.2601463198661804, 0.05436905100941658, -0.16269689798355103, 0.10244524478912354, 0.12058884650468826, -0.5923395752906799, -0.3941619098186493, -0.3727356195449829, -0.25960326194763184, -0.010579794645309448, 0.17246036231517792, -0.008845560252666473, 0.2895660102367401, -0.08208683133125305, 0.2510779798030853, 0.061725836247205734, 0.14049582183361053, 0.2185530960559845, -0.324007511138916, -0.02931397780776024, 0.202956885099411, -0.08481836318969727, 0.15878508985042572, 0.15926754474639893, 0.2639029622077942, 0.3451225757598877, 0.11155331134796143, -0.14151732623577118, 0.23279617726802826, 0.06364960968494415, 0.39358121156692505, -0.03264244273304939, 0.1233782172203064, 0.01144581288099289, -0.18305031955242157, 0.11157800257205963, 0.24459700286388397, 0.21755236387252808, -0.04634528607130051, -0.3349955379962921, -0.4790153205394745, 0.12598615884780884, -0.4003435969352722, -0.10879486799240112, 0.0882672592997551, 0.24949190020561218, -0.10523545742034912, -0.05185171589255333, -0.12986122071743011, 0.38279008865356445, -0.22883588075637817, 0.3223334550857544, -0.34949636459350586, 0.4261358976364136, 0.07777541130781174, -0.03180748596787453, -0.060431547462940216, 0.30848681926727295, 0.4144720435142517, -0.08667370676994324, -0.026926422491669655, 0.20012763142585754, 0.2451748549938202, 0.27335551381111145, 0.004180907271802425, 0.20581553876399994, 0.16570550203323364, -0.3988296687602997, 0.1354363113641739, 0.10560542345046997, 0.08311137557029724, 0.06037738919258118, -0.2868897318840027, 0.4247514605522156, -0.12739846110343933, 0.09689610451459885, -0.28365299105644226, 0.11694525927305222, 0.2436811327934265, -0.09742428362369537, 0.025655709207057953, -0.21615342795848846, -0.017762959003448486, 0.33454883098602295, 0.1312555968761444, 0.023624500259757042, -0.05538178235292435, 0.26286622881889343, 0.21183165907859802, 0.15325796604156494, 0.08546385169029236, 0.015474657528102398, -0.2481600046157837, -0.14894999563694, 0.21014679968357086, 0.3480343520641327, 0.16972625255584717, 0.04751570150256157, 0.036885470151901245, 0.24493882060050964, -0.09070966392755508, -0.14268741011619568, 0.16427777707576752, -0.029127582907676697, -0.11468245089054108, 0.08829702436923981, 0.2919880747795105, -0.14829276502132416, -0.2831140160560608, 0.4085628092288971, 0.0715319961309433, 0.3098626434803009, -0.3805638551712036, -0.18830493092536926, -0.22771409153938293, -0.00018721818923950195, -0.15234456956386566, -0.0845845639705658, -0.21859055757522583, -0.4227384030818939, -0.08299028873443604, 0.48648205399513245, -0.16627690196037292, 0.10753326863050461, 0.119688019156456, 0.10077197104692459, -0.17803926765918732, 0.03299415856599808, -0.044525548815727234, -0.08743961155414581, -0.068583644926548, 0.026234135031700134, 0.06904895603656769, -0.07633088529109955, 0.32611238956451416, -0.08104443550109863, 0.33806464076042175, -0.6109368801116943, -0.45036622881889343, 0.04126203805208206, -0.12824848294258118, 0.2611331641674042, 0.053336989134550095, -0.0454496406018734, 0.24234122037887573, -0.23174060881137848, 0.0025725625455379486, -0.25343745946884155, -0.06259416788816452, -0.013757381588220596, -0.1995553970336914, -0.06942468136548996, -0.008342228829860687, -0.10856227576732635, -0.07416864484548569, -0.19079749286174774, 0.06200139597058296, 0.3626709580421448, 0.016255246475338936, 0.07256396114826202, -0.28648537397384644, -0.04878836125135422, 0.2459431290626526, -0.30583828687667847, -0.20855963230133057, -0.17863819003105164, 0.0358547642827034, -0.23484110832214355, 0.032226722687482834, 0.03379605710506439, -0.172219380736351, 0.13312217593193054, 0.090268075466156, -0.14299513399600983, -0.46112266182899475, -0.20861010253429413, 0.46193528175354004, -0.0380205474793911, -0.038415491580963135, 0.2686082720756531, 0.2875693142414093, -0.009270533919334412, -0.022984743118286133, -0.40001440048217773, -0.051394812762737274, 0.5264201164245605, -0.2336486577987671, -0.051839981228113174, -0.15026909112930298, -0.14122402667999268, 0.19145715236663818, 0.24376437067985535, 0.11617745459079742, 0.3911169171333313, -0.05618342012166977, 0.452464759349823, -0.31398680806159973, -0.07929103076457977, -0.0017397440969944, 0.16864293813705444, -0.017561599612236023, 0.3547956347465515, -0.015964534133672714, -0.05350777134299278, 0.18244299292564392, -0.3158637583255768, -0.3143618404865265, -0.49419769644737244, -0.37396353483200073, -0.21879711747169495, -0.059089627116918564, 0.05248093605041504, -0.15753783285617828, -0.2583343982696533, -0.26615187525749207, 0.0815424919128418, 0.3463146388530731, -0.24214479327201843, -0.028829514980316162, -0.6320925951004028, 0.1985180824995041, -0.38203662633895874, 0.06914936006069183, -0.1785920262336731, 0.3096732497215271, 0.09834296256303787, 0.03620003163814545, 0.1567479819059372, 0.18063050508499146, 0.7975251078605652, -0.5968824028968811, 0.31889790296554565, -0.14961472153663635, 0.17794468998908997, -0.18050271272659302, -0.09510374814271927, -0.03425776958465576, 0.4639583230018616, -0.612617015838623, 0.4646787643432617, -0.07161076366901398, -0.11661083996295929, -0.007944555021822453, -0.11324302852153778, -0.028589926660060883, 0.1699504256248474, -0.11085467785596848, -0.44443953037261963, -0.10519067943096161, 0.2066785991191864, 0.3228000998497009, 0.2495768964290619, -0.13493025302886963, 0.01666315644979477, -0.18667446076869965, -0.05915370583534241, 0.265353262424469, -0.04245731234550476, 0.39325156807899475, 0.12755487859249115, 0.046042606234550476, 0.06732870638370514, 0.13467486202716827, 0.3194877803325653, 0.5517463088035583, -0.10197747498750687, -0.792567789554596, -0.01557167898863554, -0.09682241082191467, 0.2319941520690918, 0.5327823758125305, 0.0018606558442115784, 0.2225818634033203, -0.29019421339035034, -0.027050606906414032, -0.25737982988357544, 0.26010769605636597, 0.1687895953655243, 0.02259138971567154, -0.47205039858818054, -0.2801082134246826, 0.23516936600208282, 0.12411333620548248, -0.14405187964439392, 0.2493966519832611, 0.6235043406486511, -0.4371246099472046, 0.4608389437198639, -0.017207656055688858, 1.0583586692810059, 0.008003433234989643, 0.36619433760643005, 0.16031908988952637, -0.3985464870929718, 0.8082411289215088, -0.2661188840866089, 0.0026908814907073975, -0.423404723405838, 0.03293123468756676, 0.007529206573963165, -0.04153625667095184, 0.0561930313706398, -0.26194149255752563, -0.12923327088356018, 0.050694189965724945, -0.25868719816207886, 0.6507608294487, 0.04621896892786026, 0.15963007509708405, -0.03191077709197998, -0.18084871768951416, -0.011496614664793015, 0.15100514888763428, -0.11933020502328873, -0.10868538916110992, -0.11978846043348312, -0.010688889771699905, -0.2714283764362335, 0.052590273320674896, -0.17665505409240723, 0.21032842993736267, 0.14556026458740234, 0.022740382701158524, -0.06461156904697418, -0.16594277322292328, 0.04172912985086441, 0.15212270617485046, 0.9973570108413696, 0.23741699755191803, -0.2782588601112366, 0.27666693925857544, -0.06326339393854141, 0.2945006489753723, 0.09109959751367569, -0.24627776443958282, 0.1108969897031784, 0.08123381435871124, -0.19551509618759155, -0.1022685319185257, 0.1617143750190735, -0.26969629526138306, -0.3577789068222046, 0.10200953483581543, 0.13207727670669556, -0.38284099102020264, 0.07572552561759949, 0.1050117239356041, -0.10486909747123718, -0.24761897325515747, 0.09275037050247192, -0.28201770782470703, -0.09569501876831055, -0.03090221807360649, -0.17132753133773804, -0.49784770607948303, 0.011580221354961395, 0.045933421701192856, 0.45052677392959595, 0.1705826371908188, 0.061596352607011795, -0.3313209116458893, -0.09244595468044281, -0.0450553297996521, -0.07746075093746185, 0.2247055619955063, -0.31902241706848145, 0.1388399749994278, -0.1998971700668335, -0.04019278287887573, 0.2563377022743225, 0.08066625893115997, 0.083014577627182, 0.04493401199579239, -0.011851072311401367, 0.04391545057296753, 0.05313751846551895, -0.049218278378248215, -0.3069734573364258, 0.12005899846553802, 0.2038859724998474, 0.3447510004043579, -0.19493746757507324, -0.1421063244342804, -0.2653394043445587, 0.15362346172332764, 0.06913969665765762, 0.14897902309894562, -0.1526767909526825, -0.18474379181861877, -0.23819243907928467, -0.2618493139743805, 0.06858223676681519, 0.17037728428840637, -0.16324186325073242, -0.20469674468040466, -0.26198723912239075, 0.18289121985435486, 0.2135663628578186, -0.05163974314928055, -0.16888244450092316, -0.043993424624204636, 0.12607347965240479, -0.08852201700210571, 0.2939351499080658, 0.3452841341495514, -0.03491600975394249, -0.1779932975769043, 0.9577744007110596, 0.20452453196048737, -0.0912441611289978, 0.19412150979042053, 0.10100292414426804, 0.0318179726600647, -0.40695005655288696, 0.19934889674186707, -0.31468665599823, -0.015343442559242249, 0.05050039291381836, 0.24429403245449066, 0.5553062558174133, 0.21609099209308624, -0.061749882996082306, -0.20015159249305725, -0.12700270116329193, 0.010608185082674026, 0.3293534219264984, 0.23692595958709717, -0.27563679218292236, -0.283896803855896, 0.06304515153169632, 0.13039684295654297, -0.08000892400741577, -0.4311843514442444, 0.4808182716369629, 0.035950083285570145, 0.08223613351583481, 0.24216553568840027, 0.7051267623901367, 0.14911781251430511, -0.1140524372458458, -0.02627991884946823, 0.5228055715560913, -0.3865283131599426, 0.49766725301742554, 0.2978450655937195, -0.2560865879058838, 0.08088715374469757, 0.40866604447364807, 0.1950387805700302, -0.08560539782047272, 0.6624047756195068, 0.18048298358917236, 0.49161893129348755, 0.3219645023345947, -0.4123460352420807, 0.3709620237350464, 0.061292022466659546, 0.09074176847934723, -0.05693582445383072, -0.14162763953208923, 0.04101432114839554, 0.27029985189437866, 0.3173711895942688, -0.20863422751426697, -0.19167041778564453, -0.29266485571861267, -0.16475844383239746, -0.37427979707717896, -0.17476728558540344, -0.06294675916433334, -0.20040836930274963, -0.32149538397789, 0.21467562019824982, -0.41989392042160034, -0.1083066314458847, -0.034493982791900635, -0.02163824811577797, -0.12368088960647583, -0.008786182850599289, 0.0505840964615345, 0.08224499225616455, 0.18905635178089142, -0.1590639352798462, 0.2516714334487915, -0.04045554995536804, -0.2921704947948456, -0.01734454184770584, 0.3293430507183075, 0.37823641300201416, 0.0878860205411911, -0.1616813689470291, -0.05989707261323929, 0.34660661220550537, 0.09445580840110779, 0.039276331663131714, -0.06269368529319763, 0.058680228888988495, 0.12219752371311188, 0.03122057393193245, 0.16593196988105774, -0.06783837825059891, -0.009360188618302345, 0.019394338130950928, -0.04162690043449402, -0.20760506391525269, 0.05613924562931061, -0.14520734548568726, -0.20976226031780243, 0.16073179244995117, 0.1510443389415741, -0.32227084040641785, -0.36143913865089417, 0.5044333934783936, 0.08076818287372589, 0.12099410593509674, -0.43210506439208984, 0.05507422983646393, 0.13946247100830078, 0.3081315755844116, -0.04678645730018616, -0.2746727466583252, -0.2452649027109146, -0.3692135214805603, -0.6363661885261536, 0.7927396893501282, -0.12685877084732056, 0.051235273480415344, 0.23253001272678375, -0.24966147541999817, -0.0033073686063289642, -0.013976890593767166, -0.3878430128097534, 0.1559598296880722, -0.23806358873844147, 0.040150515735149384, -0.19025570154190063, 0.0932379961013794, 0.29605725407600403, -0.41785359382629395, 0.018571458756923676, -0.254704087972641, 0.45595914125442505, 0.1663440465927124, -0.009054049849510193, -0.04176604002714157, 0.17393523454666138, 0.41046926379203796, 0.17491036653518677, 0.1809477061033249, 0.1555204540491104, 0.3445761799812317, -0.10988739132881165, 0.10173607617616653, -0.23830834031105042, -0.32711929082870483, -0.5210790038108826, 0.310211181640625, -0.32997241616249084, -0.04648124426603317, -0.051065657287836075, -0.23888806998729706, -0.16207818686962128, -0.22663259506225586, 0.24929915368556976, 0.35409632325172424, -0.30535319447517395, -0.06844346225261688, -0.23055365681648254, 0.03869343176484108, 0.16531091928482056, 0.1915096640586853, 0.17086000740528107, 0.2518194913864136, -0.0995904803276062, -0.48617297410964966, 0.3014439046382904, 0.07245592772960663, -0.5622507929801941, -0.008606825023889542, 0.26571357250213623, 0.16364814341068268, -0.22755120694637299, -0.23056301474571228, -0.09845203906297684, 0.26235952973365784, -0.19916827976703644, -0.006459251046180725, 0.23973917961120605, -0.31216102838516235, -0.07491490244865417, -0.1108715832233429, -0.0395553782582283, 0.36164921522140503, -0.18626534938812256, 0.35387861728668213, -0.23099026083946228 ]
https://github.com/huggingface/datasets/issues/6595
Hi ! I think the issue comes from the "float16" features that are not supported yet in Parquet Feel free to open an issue in `pyarrow` about this. In the meantime, I'd encourage you to use "float32" for your "pooled_prompt_embeds" and "prompt_embeds" features. You can cast them to "float32" using ```python from datasets import Value ds = ds.cast_column("pooled_prompt_embeds", Value("float32")) ds = ds.cast_column("prompt_embeds", Value("float32")) ```
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
64
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih Hi ! I think the issue comes from the "float16" features that are not supported yet in Parquet Feel free to open an issue in `pyarrow` about this. In the meantime, I'd encourage you to use "float32" for your "pooled_prompt_embeds" and "prompt_embeds" features. You can cast them to "float32" using ```python from datasets import Value ds = ds.cast_column("pooled_prompt_embeds", Value("float32")) ds = ds.cast_column("prompt_embeds", Value("float32")) ```
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq hm. Thank you very much. Do you think it won't have any impact on the training? That it won't break it or the quality won't degrade because of this? I need to use it for [SDXL training](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py)
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
38
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq hm. Thank you very much. Do you think it won't have any impact on the training? That it won't break it or the quality won't degrade because of this? I need to use it for [SDXL training](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py)
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
Increasing the precision should not degrade training (it only increases the precision), but make sure that it doesn't break your pytorch code (e.g. if it expects a float16 instead of a float32 somewhere)
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
33
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih Increasing the precision should not degrade training (it only increases the precision), but make sure that it doesn't break your pytorch code (e.g. if it expects a float16 instead of a float32 somewhere)
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq just fyi pyarrow 15.0.0 (just released) supports float16 as the underlying parquetcpp does as well now :)
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
18
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq just fyi pyarrow 15.0.0 (just released) supports float16 as the underlying parquetcpp does as well now :)
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
Oh that's amazing ! (and great timing ^^) @kopyl can you try to update `pyarrow` and try again ? Btw @assignUser there seems to be some casting implementations missing with float16 in 15.0.0, e.g. ``` ArrowNotImplementedError: Unsupported cast from int64 to halffloat using function cast_half_float ``` ``` ArrowNotImplementedError: Unsupported cast from double to halffloat using function cast_half_float ```
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
58
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih Oh that's amazing ! (and great timing ^^) @kopyl can you try to update `pyarrow` and try again ? Btw @assignUser there seems to be some casting implementations missing with float16 in 15.0.0, e.g. ``` ArrowNotImplementedError: Unsupported cast from int64 to halffloat using function cast_half_float ``` ``` ArrowNotImplementedError: Unsupported cast from double to halffloat using function cast_half_float ```
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
Ah you are right casting is not implemented yet, it's even mentioned in the docs. This pr references the relevant issues if you'd like to track them https://github.com/apache/arrow/pull/38494
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
28
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih Ah you are right casting is not implemented yet, it's even mentioned in the docs. This pr references the relevant issues if you'd like to track them https://github.com/apache/arrow/pull/38494
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq i just recently found out that it's supported in 15.0.0, but wanted to try it first before telling you... Trying this right now and it seemingly works (although i need to wait till the end to make sure there is nothing wrong). Will update you when it's finished. <img width="918" alt="image" src="https://github.com/huggingface/datasets/assets/17604849/4821e215-e782-4736-8c76-d06187078175"> A couple of questions though: 1. What does that missing casting implementation mean for my specific case and what does it mean in general? 2. Do you know how to `push_to_hub` with multiple processes?
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
87
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq i just recently found out that it's supported in 15.0.0, but wanted to try it first before telling you... Trying this right now and it seemingly works (although i need to wait till the end to make sure there is nothing wrong). Will update you when it's finished. <img width="918" alt="image" src="https://github.com/huggingface/datasets/assets/17604849/4821e215-e782-4736-8c76-d06187078175"> A couple of questions though: 1. What does that missing casting implementation mean for my specific case and what does it mean in general? 2. Do you know how to `push_to_hub` with multiple processes?
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq also it's strange that there was no error for a dataset with the same features, same data type, but smaller (much smaller). Altho i'm not sure about this, but chances are the dataset was loaded directly, not `load_from_disk`.... Maybe because of this.
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
43
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq also it's strange that there was no error for a dataset with the same features, same data type, but smaller (much smaller). Altho i'm not sure about this, but chances are the dataset was loaded directly, not `load_from_disk`.... Maybe because of this.
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
> What does that missing casting implementation mean for my specific case and what does it mean in general? Nothing for you, just that casting to float16 using `.cast_column("my_column_name", Value("float16"))` raises an error > Do you know how to push_to_hub with multiple processes? It's not possible (yet ?). Mostly because we haven't implemented yet how to do parallel uploads to the Hub from `datasets`. Though if you want faster uploads you can already enable `hf_transfer` ``` pip install hf_transfer ``` and setting `HF_HUB_ENABLE_HF_TRANSFER=1` as an environment variable see https://huggingface.co/docs/huggingface_hub/guides/upload#tips-and-tricks-for-large-uploads
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
89
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih > What does that missing casting implementation mean for my specific case and what does it mean in general? Nothing for you, just that casting to float16 using `.cast_column("my_column_name", Value("float16"))` raises an error > Do you know how to push_to_hub with multiple processes? It's not possible (yet ?). Mostly because we haven't implemented yet how to do parallel uploads to the Hub from `datasets`. Though if you want faster uploads you can already enable `hf_transfer` ``` pip install hf_transfer ``` and setting `HF_HUB_ENABLE_HF_TRANSFER=1` as an environment variable see https://huggingface.co/docs/huggingface_hub/guides/upload#tips-and-tricks-for-large-uploads
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq thank you very much. That would be amazing, I need to create a feature request for this :) By the way, in short, how does hf_transfer improves the upload speed under the hood?
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
34
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq thank you very much. That would be amazing, I need to create a feature request for this :) By the way, in short, how does hf_transfer improves the upload speed under the hood?
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6595
@lhoestq i was just able to successfully upload without the dataset with the new pyarrow update and without increasing the precision :)
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
22
Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 ### Describe the bug I'm aware of the issue #5695 . I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16 So i 1. Map dataset 2. Save to disk 3. Try to upload: ``` import datasets from datasets import load_from_disk dataset = load_from_disk("ds") datasets.config.DEFAULT_MAX_BATCH_SIZE = 1 dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB") ``` And i get this error: `pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat` Full traceback: ``` >>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB") Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1451/1451 [00:00<00:00, 6827.40 examples/s] Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub shard.to_parquet(buffer) File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write() File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs) File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__ self.writer = _parquet.ParquetWriter( File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__ File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat ``` Smaller datasets with the same way of saving and pushing work wonders. Big ones are not. I'm currently trying to upload dataset like this: `HfApi().upload_folder...` But i'm not sure that in this case "load_dataset" would work well. This setting num_shards does not help too: ``` dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500}) ``` Tried 3000, 500, 478, 100 Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB... ### Steps to reproduce the bug Described above ### Expected behavior Should be able to upload... ### Environment info Total dataset size: 978G Amount of `.arrow` files: 2101 Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size) Some files: - "ds/train/state.json": https://pastebin.com/tJ3ZLGAg - "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih @lhoestq i was just able to successfully upload without the dataset with the new pyarrow update and without increasing the precision :)
[ -0.28692787885665894, -0.0044410377740859985, 0.16262230277061462, 0.20641998946666718, 0.36014455556869507, -0.21503600478172302, 0.30898481607437134, 0.37914708256721497, -0.34722834825515747, 0.15772300958633423, 0.015633590519428253, 0.6490374207496643, -0.33155137300491333, 0.27174314856529236, 0.03232838585972786, 0.07780680060386658, 0.044387124478816986, 0.10664567351341248, 0.00963687151670456, 0.0048987120389938354, -0.15758396685123444, -0.19536621868610382, -0.14263565838336945, -0.008043792098760605, -0.2817932367324829, 0.00037721171975135803, 0.07331936061382294, 0.35752421617507935, -0.2141372263431549, -0.3937336802482605, 0.08243649452924728, -0.12624694406986237, 0.21178603172302246, 0.28647738695144653, -0.00012834150402341038, 0.06488712131977081, 0.40767624974250793, 0.03624340891838074, -0.17105402052402496, 0.0033700168132781982, 0.2343895137310028, -0.5461286306381226, 0.24369822442531586, -0.35758259892463684, 0.05803541839122772, -0.4624326229095459, -0.13803523778915405, 0.33080971240997314, 0.17463010549545288, 0.25066423416137695, 0.12405610084533691, 0.0697508156299591, 0.16663311421871185, 0.3094941973686218, 0.6788209080696106, 0.3536756932735443, -0.16680309176445007, 0.15855228900909424, 0.3307241201400757, 0.04394958168268204, -0.43183979392051697, 0.15646421909332275, 0.09077764302492142, -0.09082549810409546, 0.05356065183877945, -0.04597010463476181, -0.00040668994188308716, -0.09710194170475006, 0.280001699924469, 0.14481139183044434, 0.23019567131996155, -0.2740357518196106, -0.22610828280448914, -0.44828444719314575, 0.08256423473358154, -0.42230916023254395, 0.30815255641937256, 0.30906522274017334, -0.05385312810540199, -0.13982877135276794, -0.14953960478305817, -0.31468409299850464, -0.3078705966472626, 0.06161489337682724, -0.18401801586151123, 0.4608347713947296, -0.0480378195643425, 0.21515226364135742, 0.22612346708774567, -0.2553112804889679, 0.20504365861415863, 0.02997533604502678, -0.10449019074440002, -0.06120007485151291, -0.3290233612060547, 0.041264601051807404, -0.078033447265625, -0.03780768811702728, 0.1668643206357956, 0.12543977797031403, -0.08024343103170395, 0.03766786307096481, 0.18836542963981628, 0.008389811962842941, 0.275597482919693, 0.19091089069843292, -0.32839420437812805, 0.17092935740947723, 0.024846717715263367, 0.17379999160766602, 0.1079457551240921, 0.22107496857643127, -0.27618104219436646, -0.17445756494998932, 0.19315402209758759, -0.14756394922733307, 0.40419018268585205, -0.18426558375358582, -0.22625389695167542, 0.08654677122831345, -0.2322331964969635, 0.155229389667511, 0.08980399370193481, 0.2970046401023865, -0.10243669152259827, 0.34675347805023193, -0.15615585446357727, 0.2291359007358551, -0.054334770888090134, -0.007317960262298584, -0.08237145841121674, 0.12905538082122803, -0.1065257117152214, -0.10816631466150284, 0.01833231747150421, -0.30802851915359497, 0.028467662632465363, 0.04258029907941818, 0.0660407617688179, -0.15129998326301575, -0.13408830761909485, -0.17006731033325195, 0.05530896782875061, 0.2526071071624756, -0.18148986995220184, 0.13070470094680786, -0.09777101129293442, -0.1417735517024994, -0.12302564829587936, 0.5319883823394775, -0.49179941415786743, -0.39513012766838074, -0.43652814626693726, 0.08617695420980453, -0.31598836183547974, -0.06973753869533539, -0.5748798251152039, 0.053794801235198975, 0.10401085019111633, 0.04331004619598389, 0.14214898645877838, -0.3146522343158722, -0.14436964690685272, -0.3037573993206024, 0.2021169811487198, 0.0013077184557914734, -0.5543399453163147, 0.0861220508813858, 0.09240235388278961, -0.0743994414806366, 0.4539240002632141, 0.12665218114852905, -0.296231210231781, -0.09934785962104797, -0.25425341725349426, 0.21887391805648804, 0.3095845878124237, -0.3343796730041504, -0.6185442805290222, 0.25418150424957275, -0.31391483545303345, 0.14846298098564148, 0.12044719606637955, -0.08597426116466522, 0.3489328622817993, 0.10245229303836823, -0.12779581546783447, 0.3595367670059204, -0.00784748699516058, 0.1956247091293335, -0.44611167907714844, -0.2642143666744232, 0.23005789518356323, 0.4100196957588196, 0.2968016266822815, -0.1755615472793579, 0.23321053385734558, 0.10344618558883667, 0.27910134196281433, -0.15002211928367615, 0.28916746377944946, 0.04790230095386505, 0.15392422676086426, -0.08834744989871979, -0.002467028796672821, 0.08344808220863342, -0.594890832901001, 0.2965248227119446, 0.0477508008480072, -0.08078782260417938, -0.3421595096588135, 0.06908641755580902, -0.18677596747875214, 0.30863484740257263, -0.34628695249557495, 0.11969265341758728, -0.022761544212698936, -0.01871144026517868, -0.028580300509929657, 0.1380607932806015, -0.06199570745229721, -0.15921145677566528, -0.3845697045326233, 0.15430906414985657, -0.0006786398589611053, 0.4430534243583679, 0.2269676774740219, -0.41227516531944275, -0.04970059171319008, 0.2720855474472046, -0.017679810523986816, -0.11930510401725769, -0.2252207100391388, 0.3112631142139435, -0.10421660542488098, 0.2572666108608246, -0.38973844051361084, -0.051454655826091766, 0.2198101431131363, -0.3343258798122406, 0.04028276354074478, 0.07242009043693542, 0.18527854979038239, -0.14531996846199036, 0.1698031723499298, 0.4245418608188629, 0.24095474183559418, 0.2904515266418457, -0.010134086012840271, -0.05459826439619064, 0.012592986226081848, 0.039926834404468536, 0.008881688117980957, -0.16239458322525024, 0.008838442154228687, 0.13472050428390503, 0.26566922664642334, 0.053050898015499115, -0.1601804494857788, -0.04060773551464081, 0.3669394552707672, -0.13288086652755737, 0.09428849071264267, 0.34957823157310486, -0.3089854121208191, -0.0002693459391593933, 0.24877378344535828, 0.10846177488565445, 0.07167858630418777, 0.10897835344076157, 0.01181017979979515, 0.11622335016727448, 0.02885151281952858, 0.050982505083084106, 0.041280657052993774, 0.22892649471759796, 0.604545533657074, 0.27275604009628296, 0.5209612250328064, -0.15604262053966522, -0.35989174246788025, -0.028957948088645935, 0.07208938151597977, 0.37964364886283875, -0.30939024686813354, -0.023045670241117477, -0.18052861094474792, 0.1293940544128418, -0.20778098702430725, -0.26482704281806946, -0.1782638132572174, -0.23459982872009277, -0.006258354056626558, 0.3661822974681854, -0.10901319235563278, 0.022802572697401047, -0.504794716835022, -0.027133986353874207, 0.018496006727218628, -0.27501824498176575, 0.05059099197387695, -0.17071092128753662, -0.36962389945983887, -0.02110457606613636, 0.4587472975254059, -0.12515506148338318, 0.1882333904504776, 0.10954666882753372, 0.36828452348709106, -0.4664030075073242, -0.4941613972187042, 0.05754927918314934, -0.1431126892566681, -0.10074504464864731, -0.09491655975580215, -0.23862922191619873, 0.05986213684082031, -0.2815753221511841, 0.24395814538002014, -0.13518336415290833, -0.314698189496994, 0.37958937883377075, -0.25443974137306213, 0.13119395077228546, -0.051734134554862976, -0.06292867660522461, -0.10624285787343979, -0.2702234983444214, 0.1995532363653183, 0.25065261125564575, 0.24147990345954895, -0.04999775066971779, 0.10889159142971039, 0.34600579738616943, 0.03145759552717209, -0.18200407922267914, 0.03269542381167412, -0.05292186141014099, 0.4130009412765503, 0.10543136298656464, -0.35748153924942017, 0.18042714893817902, -0.19938120245933533, -0.08630204945802689, 0.3706178665161133, -0.6093620657920837, -0.07186820358037949, -0.10554596036672592, 0.0535542368888855, -0.21204666793346405, -0.21262113749980927, 0.18315356969833374, 0.09810569882392883, 0.11497870832681656, 0.09448108077049255, -0.13937070965766907, 0.1843811571598053, 0.18531151115894318, 0.1253596693277359, -0.14149513840675354, 0.5173704028129578, 0.18273186683654785, 0.7609702944755554, -0.2514157295227051, -0.15328505635261536, 0.4215608835220337, -0.004206467419862747, 0.03788496181368828, -0.0025092773139476776, -0.21491405367851257, 0.21247780323028564, -0.11012335121631622, 0.11766456067562103, 0.2312818020582199, -0.00467262789607048, -0.3780919313430786, 0.05106711387634277, 0.00816192477941513, -0.13097117841243744, -0.15248221158981323, 0.16578003764152527, -0.3027144968509674, -0.173457533121109, -0.23631538450717926, -0.014544129371643066, -0.03919021412730217, -0.2933063209056854, 0.20753119885921478, -0.03539060801267624, -0.13088950514793396, -0.003271784633398056, -0.5666692852973938, -0.12902413308620453, -0.2909240424633026, 0.1284714639186859, 0.22086048126220703, 0.2876637279987335, 0.1764615774154663, -0.4290253520011902, 0.34269237518310547, -0.3482767641544342, 0.5372195243835449, 0.03365065157413483, 0.06724715232849121, -0.026255004107952118, -0.049901604652404785, -0.6352043747901917, -0.3425317406654358, -0.23720985651016235, 0.09782671928405762, -0.011633837595582008, 0.4497288465499878, -0.37375980615615845, -0.0046253502368927, 0.18555936217308044, 0.01582036167383194, -0.2207271158695221, -0.11730600893497467, -0.3683891296386719, -0.3900814652442932, -0.16116251051425934, 0.21008646488189697, -0.08549202978610992, 0.29503268003463745, -0.16788676381111145, 0.016835637390613556, -0.3898255228996277, -0.12822921574115753, -0.05260232090950012, -0.025086771696805954, 0.33373787999153137, 0.002650834619998932, 0.1876506209373474, -0.23384447395801544, 0.6536868214607239, 0.5415233969688416, 0.5010397434234619, 0.24643200635910034, -0.3950539529323578, 0.1993260532617569, 0.0015073977410793304, 0.2977420687675476, 0.23868107795715332, -0.1627882868051529, 0.3150475025177002, -0.18478578329086304, 0.22801437973976135, -0.36710095405578613, 0.2160699963569641, 0.32284075021743774, -0.18221019208431244, -0.20746314525604248, 0.13856923580169678, 0.5834920406341553, 0.2318260669708252, 0.013657256960868835, -0.008939945138990879, 0.4135984182357788, -0.24463817477226257, 0.22423872351646423, 0.17254453897476196, 0.9377955198287964, -0.16507020592689514, 0.2108382135629654, 0.5665386319160461, -0.2723202705383301, 0.1996874064207077, 0.1886368691921234, 0.03959786519408226, -0.45790672302246094, -0.06346439570188522, 0.09854656457901001, -0.11666402220726013, 0.082853764295578, 0.014697459526360035, 0.04519137740135193, 0.10905759036540985, -0.31836390495300293, 0.4060683250427246, 0.05332563817501068, 0.23933632671833038, -0.07346481829881668, -0.21219736337661743, -0.3807991147041321, -0.031983986496925354, -0.12887339293956757, -0.10769511014223099, 0.01231406256556511, -0.1826002150774002, -0.018371805548667908, -0.25399571657180786, -0.12476039677858353, 0.3193656802177429, -0.26416024565696716, 0.08476407080888748, 0.052289366722106934, -0.4152507185935974, 0.14123618602752686, 0.15897105634212494, -0.21014940738677979, -0.21267621219158173, -0.09899556636810303, -0.025041669607162476, 0.22496044635772705, 0.11330704391002655, 0.21585899591445923, -0.04115910083055496, 0.28295785188674927, -0.07864437997341156, 0.029086410999298096, 0.2765578627586365, -0.09365473687648773, -0.09817129373550415, 0.10659219324588776, 0.18263809382915497, 0.4168858230113983, -0.14366690814495087, -0.1832347810268402, -0.14230811595916748, 0.07930241525173187, -0.16993609070777893, -0.013499293476343155, -0.17892663180828094, -0.0795440748333931, 0.029252927750349045, 0.10932968556880951, -0.4153364300727844, 0.0435468927025795, 0.3104068338871002, 0.26022884249687195, 0.02336879074573517, 0.6574612855911255, 0.1011461541056633, -0.1274321973323822, -0.0027328431606292725, 0.043795160949230194, 0.4172667860984802, -0.5469599962234497, 0.013855047523975372, -0.11043375730514526, 0.03677062690258026, -0.024795569479465485, -0.04512740671634674, 0.16467256844043732, -0.07169226557016373, -0.25648194551467896, -0.15067988634109497, -0.44850218296051025, 0.20868071913719177, -0.09615588188171387, 0.019732553511857986, -0.2248377650976181, 0.011388421058654785, -0.085748091340065, 0.12806576490402222, -0.15794245898723602, 0.41796427965164185, 0.007664486765861511, 0.2007383555173874, -0.17626440525054932, -0.0410008430480957, 0.0777272880077362, 0.12619759142398834, 0.003964174538850784, 0.10371854901313782, -0.03160195052623749, -0.032059431076049805, -0.13564956188201904, 0.13790513575077057, 0.24949640035629272, -0.058961253613233566, 0.0010304450988769531, -0.21521387994289398, -0.04556751996278763, 0.09724458307027817, 0.3059769868850708, 0.028214186429977417, -0.12514019012451172, -0.3924717605113983, 0.6406344175338745, 0.028523892164230347, -0.19758617877960205, 0.2864784300327301, -0.18720051646232605, 0.289547324180603, 0.0917229950428009, 0.2597770392894745, 0.16811463236808777, -0.011829443275928497, -0.10842917859554291, 0.07066512852907181, 0.25520309805870056, -0.01300356350839138, 0.11520706117153168, -0.5115820169448853, -0.044873591512441635, -0.1531463861465454, 0.28612008690834045, 0.34986385703086853, -0.28732776641845703, -0.31640154123306274, 0.3721511662006378, 0.10377749800682068, -0.17924967408180237, -0.038160692900419235, 0.3873246908187866, -0.17553922533988953, -0.016284964978694916, 0.3582703471183777, 0.08701205253601074, 0.0912797749042511, -0.4745889902114868, 0.22484688460826874, -0.19880099594593048, 0.2047765851020813, -0.09780913591384888, 0.5577723979949951, -0.42872533202171326, -0.06432685256004333, 0.527766227722168, -0.028468556702136993, 0.24214275181293488, 0.23489627242088318, -0.01083725318312645, 0.9540224075317383, 0.10424578189849854, -0.019396429881453514, 0.19414818286895752, -0.6462528109550476, -0.18381737172603607, 0.28100454807281494, 0.08463999629020691, 0.06836876273155212, -0.030822616070508957, 0.6247882843017578, 0.5054935812950134, -0.29815900325775146, -0.20873317122459412, 0.11152100563049316, -0.35007697343826294, -0.2414996325969696, -0.0002682209014892578, -0.32071393728256226, -0.2228795289993286, 0.30384957790374756, -0.25577956438064575, -0.21012870967388153, 0.29467862844467163, 0.13642463088035583, -0.18853265047073364, -0.11754324287176132, -0.012352032586932182, 0.35055989027023315, 0.12605030834674835, -0.21098466217517853, 0.4667269289493561, 0.03488748148083687, -0.008752629160881042, -0.0008418653160333633, -0.05305611714720726, 0.3887566030025482, 0.5587513446807861, -0.25538015365600586, -0.3039206862449646, 0.3673570454120636, 0.10891787707805634, 0.06696153432130814, 0.1895175278186798, 0.035410620272159576, 0.19887565076351166, 0.45779678225517273, -0.0015284717082977295, -0.13382965326309204, 0.02674785628914833, 0.07029777020215988, 0.11988351494073868, 0.0907236784696579, 0.13092133402824402, -0.025602687150239944, -0.2670104205608368, -0.16739441454410553, 0.07153134047985077, -0.08386416733264923, -0.36983522772789, 0.33789288997650146, 0.010778550058603287, 0.13048896193504333, -0.13841569423675537, 0.025288201868534088, -0.13139232993125916, 0.5006673336029053, 0.44702959060668945, -0.1341085135936737, -0.11530622839927673, -0.05443544685840607, -0.5407018661499023, 0.5433887243270874, -0.3874911963939667, 0.041204825043678284, 0.0914793387055397, 0.323763906955719, -0.0644955188035965, 0.04292565584182739, 0.11541347950696945, 0.3992866277694702, 0.11660704016685486, -0.05029482766985893, -0.35721540451049805, -0.014218704774975777, 0.2831236720085144, -0.09338326752185822, -0.14389577507972717, -0.4796702563762665, 0.2346724569797516, -0.10061018168926239, -0.034008484333753586, 0.07000524550676346, 0.10943871736526489, -0.15247729420661926, -0.2076038271188736, 0.5004398822784424, -0.11808068305253983, 0.364885151386261, 0.1840827614068985, -0.14290916919708252, -0.24913744628429413, -0.26092007756233215, -0.1742405891418457, 0.17882263660430908, -0.0768154039978981, 0.3622146546840668, 0.040559910237789154, 0.23748016357421875, -0.11797160655260086, -0.17792339622974396, -0.06395480036735535, 0.06468166410923004, -0.07224631309509277, 0.24296365678310394, -0.026193782687187195, 0.2886037230491638, -0.028887491673231125, -0.1097373366355896, 0.21014800667762756, 0.0283593088388443, -0.21019145846366882, -0.5273830890655518, 0.5341638326644897, -0.2805638015270233, -0.11210817843675613, 0.02702568843960762, 0.16643229126930237, 0.16392359137535095, -0.04843372479081154, -0.5384548902511597, -0.022395916283130646, 0.21042267978191376, -0.020939206704497337, -0.10820503532886505, 0.11949830502271652, -0.26638635993003845, 0.07350380718708038, -0.16153913736343384, 0.08611112833023071, -0.07548746466636658, -0.0847281888127327, -0.14078964293003082, -0.29982349276542664 ]
https://github.com/huggingface/datasets/issues/6592
Hi! `tqdm` doesn't work well in non-interactive environments, so there isn't much we can do about this. It's best to [disable it](https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/utilities#datasets.disable_progress_bars) in such environments and instead use logging to track progress.
Logs are delayed when doing .map when `docker logs`
### Describe the bug When I run my SD training in a Docker image and then listen to logs like `docker logs train -f`, the progress bar is delayed. It's updating every few percent. When you have a large dataset that has to be mapped (like 1+ million samples), it's crucial to see the updates in real-time, not every couple hours to make sure nothing got frozen or broken ### Steps to reproduce the bug 1. Run any huge dataset processing as a Docker image 2. `docker logs image_name` to it ### Expected behavior ... ### Environment info ...
32
Logs are delayed when doing .map when `docker logs` ### Describe the bug When I run my SD training in a Docker image and then listen to logs like `docker logs train -f`, the progress bar is delayed. It's updating every few percent. When you have a large dataset that has to be mapped (like 1+ million samples), it's crucial to see the updates in real-time, not every couple hours to make sure nothing got frozen or broken ### Steps to reproduce the bug 1. Run any huge dataset processing as a Docker image 2. `docker logs image_name` to it ### Expected behavior ... ### Environment info ... Hi! `tqdm` doesn't work well in non-interactive environments, so there isn't much we can do about this. It's best to [disable it](https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/utilities#datasets.disable_progress_bars) in such environments and instead use logging to track progress.
[ -0.5378693342208862, -0.46852540969848633, -0.023110635578632355, -0.14820663630962372, 0.2111946940422058, -0.05372349172830582, 0.33600133657455444, 0.13271595537662506, -0.030799970030784607, 0.34662723541259766, -0.05821090191602707, 0.3205311596393585, -0.1769188642501831, 0.22483918070793152, 0.040432486683130264, 0.16777244210243225, 0.09079477190971375, -0.06420503556728363, -0.5752913355827332, 0.07442426681518555, 0.10298039764165878, 0.051697783172130585, -0.26153355836868286, 0.005649242550134659, -0.6055144667625427, -0.09786573052406311, -0.06632602214813232, -0.156321182847023, -0.08839868009090424, -0.3280082941055298, 0.08170191943645477, 0.1443731188774109, 0.02320646494626999, 0.8334176540374756, -0.0001162689586635679, 0.07379406690597534, 0.325501948595047, 0.12293379753828049, 0.07312080264091492, -0.004381731152534485, -0.055953510105609894, -0.5082775950431824, 0.14349491894245148, -0.07825435698032379, -0.14443954825401306, -0.15273581445217133, 0.07877610623836517, 0.13237984478473663, 0.6983026266098022, -0.1806267499923706, 0.17426332831382751, 0.34241020679473877, -0.373404860496521, 0.022516291588544846, 0.10741642862558365, -0.012320108711719513, -0.24271133542060852, 0.5841785073280334, 0.4775216281414032, -0.030080435797572136, -0.34660667181015015, 0.5930808782577515, 0.06845471262931824, 0.13196775317192078, 0.234863743185997, 0.13964512944221497, 0.6387960910797119, -0.39989542961120605, 0.03716876357793808, 0.39677950739860535, 0.487854540348053, 0.10672168433666229, -0.2724163234233856, -0.35790711641311646, 0.03152140974998474, -0.16393935680389404, 0.20379137992858887, -0.2560712695121765, -0.04837527871131897, -0.0009356031659990549, -0.7967394590377808, -0.031052416190505028, 0.038071244955062866, -0.24226202070713043, -0.17397832870483398, -0.0499921590089798, -0.22917485237121582, 0.10493098199367523, -0.16878600418567657, 0.058217670768499374, -0.3078886568546295, 0.10686801373958588, 0.10903394967317581, 0.058574266731739044, -0.3876720070838928, -0.15771518647670746, -0.018412955105304718, -0.3246106505393982, -0.10383690148591995, 0.28322842717170715, -0.23559166491031647, 0.11063665896654129, -0.07785461843013763, 0.2746574878692627, 0.11749918758869171, 0.21184340119361877, -0.08660569787025452, 0.018299996852874756, 0.49478599429130554, 0.050846438854932785, -0.38442152738571167, 0.06801658868789673, 0.13999122381210327, -0.21030135452747345, 0.168991819024086, -0.08088237047195435, 0.11459195613861084, 0.066592738032341, 0.23644083738327026, 0.012485645711421967, 0.4046701192855835, 0.11570311337709427, 0.16341088712215424, 0.3329157829284668, -0.12932035326957703, -0.15164855122566223, 0.08301679790019989, 0.1361384093761444, -0.2390339970588684, 0.2691415250301361, -0.12516912817955017, -0.32174044847488403, -0.16784004867076874, 0.26419204473495483, -0.24375727772712708, 0.13759969174861908, 0.22228731215000153, -0.02655193954706192, 0.018648210912942886, 0.05920570343732834, -0.020682014524936676, -0.07819980382919312, 0.3349764347076416, 0.3243032991886139, -0.2556231617927551, 0.11719934642314911, -0.1355942189693451, 0.032838091254234314, -0.19458186626434326, 0.00896137673407793, -0.26036590337753296, -0.1991954743862152, 0.0749540627002716, 0.09651867300271988, 0.03191535919904709, 0.19464051723480225, -0.379652738571167, 0.39065632224082947, 0.20882393419742584, -0.1338968425989151, 0.11031463742256165, -0.3729246258735657, -0.5186256766319275, 0.02911590039730072, 0.4584236145019531, 0.3136073350906372, 0.0662151575088501, -0.1903255581855774, 0.04022378847002983, 0.14244498312473297, 0.24464601278305054, 0.1688431352376938, 0.009382583200931549, 0.2869972884654999, -0.07501674443483353, 0.1845029592514038, 0.0898718535900116, -0.31194359064102173, -0.1852911114692688, 0.0936870276927948, -0.4784454107284546, -0.029092006385326385, -0.11890418082475662, 0.14621809124946594, 0.7360666394233704, -0.03889267146587372, 0.1401035189628601, 0.12743708491325378, -0.06411880999803543, 0.016009896993637085, -0.02592851221561432, 0.029409021139144897, -0.02913438342511654, 0.16969792544841766, -0.1558210402727127, -0.06581878662109375, -0.02626238763332367, -0.009053494781255722, 0.055923495441675186, 0.32750025391578674, 0.16434311866760254, 0.3630479574203491, 0.11937767267227173, -0.1260717511177063, 0.007060479372739792, -0.2173478901386261, -0.3239745497703552, 0.15086472034454346, 0.11299638450145721, -0.024609439074993134, 0.18458890914916992, 0.026189476251602173, -0.016683347523212433, 0.12991979718208313, -0.11588802933692932, -0.2264520674943924, -0.03584125638008118, 0.01538490317761898, 0.14191934466362, 0.22516021132469177, -0.16730913519859314, -0.08543699234724045, -0.3987801671028137, 0.20189183950424194, 0.12913551926612854, 0.2132975161075592, 0.16740845143795013, -0.3093196749687195, 0.08808103203773499, 0.027967490255832672, -0.056186240166425705, -0.29180315136909485, -0.12633463740348816, 0.21744103729724884, -0.045872971415519714, 0.48106709122657776, 0.21295061707496643, 0.23608358204364777, 0.2677462697029114, -0.05348717421293259, -0.13998587429523468, -0.039950303733348846, -0.2297472357749939, -0.14467012882232666, 0.07594013214111328, 0.06390072405338287, 0.027934886515140533, 0.3996681272983551, -0.23140805959701538, 0.04135478287935257, 0.18102151155471802, 0.053627029061317444, -0.28056150674819946, -0.11179430782794952, 0.16221599280834198, -0.17238041758537292, 0.33893510699272156, -0.363663911819458, -0.17476768791675568, 0.2798140048980713, 0.5837681293487549, 0.1502481997013092, -0.19525891542434692, 0.2748531699180603, -0.2448064386844635, 0.04414115846157074, 0.15690059959888458, -0.022810645401477814, 0.043592240661382675, -0.009329242631793022, 0.45683473348617554, 0.19799497723579407, -0.18799415230751038, -0.15676403045654297, -0.13104721903800964, -0.08426746726036072, 0.06512993574142456, 0.20276084542274475, 0.19269773364067078, -0.015887994319200516, -0.04470857232809067, 0.13961447775363922, -0.05178365111351013, -0.06947224587202072, 0.05985385179519653, 0.11604321002960205, -0.19721344113349915, 0.050788164138793945, -0.19677391648292542, -0.045255303382873535, -0.2034240961074829, -0.3879685401916504, 0.2791292667388916, 0.29621776938438416, -0.18507394194602966, 0.48811075091362, 0.4346408545970917, 0.05686517059803009, 0.3118783235549927, 0.06865694373846054, -0.4190518856048584, -0.03830242156982422, -0.09208773076534271, -0.020795615389943123, -0.02577855996787548, -0.12368409335613251, 0.2400941103696823, -0.34349995851516724, 0.03073742240667343, -0.4706163704395294, -0.5390496850013733, 0.07343681156635284, -0.29575684666633606, 0.24385836720466614, -0.04294302687048912, 0.2601461112499237, -0.014159321784973145, 0.2914206087589264, 0.22397755086421967, -0.4895758032798767, -0.1724528670310974, -0.22851134836673737, -0.20504598319530487, -0.05751046538352966, -0.1536020040512085, 0.11042031645774841, -0.1657012552022934, -0.27819985151290894, 0.28700321912765503, -0.04216676205396652, -0.06387579441070557, -0.04633713886141777, -0.059890568256378174, 0.22260089218616486, -0.3873823285102844, 0.10302545875310898, -0.038855019956827164, -0.5785691738128662, 0.30630189180374146, -0.14969953894615173, -0.09829091280698776, -0.03755946457386017, 0.041364654898643494, -0.018641555681824684, -0.1432565450668335, -0.6688516139984131, -0.5573723316192627, -0.28216567635536194, 0.24094782769680023, -0.02379637397825718, 0.029105419293045998, 0.23175178468227386, -0.19480548799037933, -0.11779782176017761, 0.09054049849510193, -0.33539924025535583, -0.025055956095457077, 0.3260852098464966, 0.20348553359508514, -0.05209650099277496, 0.2375909388065338, -0.06432772427797318, 0.6656942963600159, 0.27039480209350586, -0.08965098112821579, -0.20674699544906616, -0.10056793689727783, 0.4572184085845947, -0.3458636999130249, 0.0911034494638443, 0.16778764128684998, -0.13863271474838257, -0.20336732268333435, 0.0814482644200325, 0.1535218507051468, 0.30878642201423645, 0.007751986384391785, 0.1315002143383026, 0.12676145136356354, -0.21516624093055725, -0.051574379205703735, -0.3151555061340332, -0.05539272353053093, 0.068261057138443, 0.2521475851535797, 0.01629696786403656, -0.12224452197551727, 0.012252971529960632, 0.356056272983551, 0.22930413484573364, -0.06258086860179901, -0.4475184679031372, -0.17217890918254852, -0.5859792232513428, 0.15968890488147736, -0.05991674214601517, 0.037896618247032166, -0.21953296661376953, 0.03341176360845566, 0.38173907995224, 0.022396858781576157, 0.31559208035469055, -0.10564079880714417, 0.07191093266010284, -0.08404500037431717, -0.39868754148483276, -0.23552145063877106, -0.20928233861923218, -0.033716123551130295, 0.13317620754241943, 0.40164831280708313, 0.7272648811340332, -0.0981874018907547, 0.009039275348186493, -0.20546822249889374, 0.12453576922416687, -0.17302636802196503, -0.2393888682126999, -0.3352092504501343, -0.15705832839012146, -0.10925300419330597, 0.15470203757286072, 0.04901987314224243, -0.40765246748924255, -0.027136677876114845, -0.31955769658088684, 0.24365083873271942, 0.029440216720104218, -0.3894333243370056, 0.2722935080528259, 0.06269364804029465, 0.012526974081993103, 0.3474457263946533, 0.36822012066841125, 0.14130300283432007, -0.11199229210615158, 0.34345269203186035, -0.023659931495785713, -0.24102900922298431, 0.13983342051506042, -0.09536580741405487, -0.08502338826656342, 0.49235057830810547, 0.11253871023654938, 0.2898254096508026, 0.21217817068099976, 0.513776421546936, -0.46396827697753906, 0.21703043580055237, 0.4486234784126282, 0.476737916469574, -0.07453341782093048, -0.012633107602596283, 0.3377799689769745, 0.10936109721660614, 0.07012182474136353, 0.5275147557258606, -0.2114134430885315, 0.016935933381319046, -0.09209464490413666, 0.014331143349409103, 0.8672400116920471, -0.3197614252567291, 0.12007762491703033, 0.15464116632938385, -0.09510282427072525, 0.23638774454593658, -0.13524048030376434, 0.09850937128067017, -0.19900023937225342, -0.11088325083255768, -0.019200395792722702, -0.21481162309646606, -0.1548401415348053, -0.17924614250659943, -0.10321874171495438, 0.13528242707252502, -0.05833229422569275, 0.6470811367034912, -0.38043510913848877, -0.049495868384838104, 0.23768503963947296, -0.34840914607048035, -0.37873610854148865, 0.14933714270591736, 0.15161466598510742, 0.3543093502521515, 0.13710537552833557, -0.032147910445928574, 0.23332957923412323, 0.04596523940563202, 0.018977195024490356, -0.14602747559547424, 0.17562206089496613, -0.1249026209115982, 0.5305547714233398, -0.2650928497314453, -0.19035013020038605, 0.1042441874742508, 0.06105813756585121, 0.06704852730035782, -0.13076455891132355, 0.27266210317611694, 0.03442663699388504, 0.35380175709724426, 0.008579667657613754, -0.25858980417251587, 0.28364646434783936, -0.14661172032356262, 0.10955515503883362, 0.2137582004070282, -0.19443590939044952, -0.3720874488353729, 0.04106779396533966, 0.30304858088493347, 0.10333079099655151, 0.3006027936935425, 0.32754263281822205, 0.09015434980392456, -0.039349380880594254, -0.1362249106168747, 0.08727425336837769, 0.05749386548995972, -0.2177382856607437, 0.5721909403800964, 0.1861812025308609, -0.3460535705089569, -0.006214888766407967, 0.36466583609580994, -0.09460234642028809, 0.29070985317230225, 0.47530221939086914, 0.05104118585586548, -0.24197715520858765, -0.04448381066322327, 0.12354102730751038, 0.16816601157188416, -0.11394176632165909, 0.2618456184864044, -0.18573160469532013, 0.15568943321704865, 0.11209239810705185, 0.1571938693523407, 0.11876973509788513, -0.34929949045181274, -0.4480002820491791, -0.1854703426361084, -0.6698125004768372, -0.003939364105463028, -0.2879183292388916, -0.10040576756000519, 0.023470573127269745, 0.36568817496299744, 0.04271102696657181, 0.2261229157447815, -0.27369236946105957, -0.1404421627521515, -0.5328817367553711, 0.2694500684738159, 0.3198195695877075, -0.09874024987220764, 0.15448318421840668, 0.11307014524936676, -0.0781177505850792, 0.21494056284427643, -0.546708881855011, -0.14655053615570068, 0.015548229217529297, 0.10916347801685333, -0.07817763090133667, -0.054082948714494705, -0.0814068615436554, -0.11590937525033951, -0.2631900906562805, -0.1578814536333084, 0.10823744535446167, 0.007292039692401886, 0.0277426615357399, -0.31949758529663086, -0.3000054359436035, 0.1320865899324417, 0.15139564871788025, 0.11831191182136536, -0.024596843868494034, 0.25184574723243713, -0.1710696816444397, -0.05565817281603813, 0.07125240564346313, -0.03273056447505951, -0.2542632222175598, 0.014641173183918, 0.0598980188369751, -0.11199460923671722, 0.4912734627723694, 0.025627560913562775, 0.3892211318016052, -0.04577930271625519, 0.6025848984718323, 0.15383504331111908, -0.2089393436908722, -0.48139244318008423, 0.3206244707107544, 0.07851256430149078, -0.056202542036771774, 0.01737324893474579, 0.05562626197934151, 0.21342891454696655, 0.1569218933582306, -0.07284407317638397, 0.10809475183486938, 0.3270524740219116, -0.10672487318515778, 0.31082794070243835, 0.026076149195432663, -0.4855372905731201, -0.10401463508605957, -0.15468977391719818, -0.1242901161313057, 0.3682680130004883, 0.5303033590316772, 0.3623141348361969, -0.09338634461164474, 0.1486278474330902, 0.29897361993789673, 0.3952963054180145, -0.030053509399294853, -0.03948373720049858, -0.05311770364642143, -0.1074921041727066, 0.03338972106575966, 0.33228862285614014, -0.22370348870754242, -0.10965924710035324, -0.054321203380823135, 0.17709805071353912, -0.4878920912742615, -0.3575590252876282, -0.2407957911491394, 0.30938848853111267, -0.13824568688869476, -0.008362378925085068, 0.3644551634788513, 0.105600506067276, 0.2460038810968399, 0.12580975890159607, -0.0017466640565544367, 0.2711411714553833, 0.34839439392089844, 0.029695387929677963, 0.009545039385557175, -0.10771267861127853, -0.4884333610534668, -0.14193329215049744, 0.27157142758369446, -0.20382457971572876, 0.2276345044374466, 0.021687492728233337, 0.20222941040992737, 0.2872689366340637, 0.1623433530330658, 0.3170051574707031, 0.1820131242275238, -0.02163715288043022, -0.002611178904771805, 0.03648541867733002, -0.06434053182601929, 0.13534021377563477, 0.5368284583091736, -0.09606234729290009, -0.6452897191047668, 0.36418983340263367, 0.04194255918264389, -0.21803100407123566, 0.3268670439720154, -0.07205238938331604, 0.3020477890968323, -0.14882858097553253, 0.08937835693359375, -0.14557641744613647, 0.08074004203081131, -0.33378949761390686, -0.042883846908807755, -0.261406809091568, 0.058481331914663315, 0.21106791496276855, -0.43592891097068787, 0.029274247586727142, -0.10977309942245483, 0.06605575978755951, -0.3566701412200928, 0.5574354529380798, 0.6178803443908691, -0.016312239691615105, 0.045237988233566284, -0.14543572068214417, -0.3284856677055359, 0.12486577033996582, -0.17823390662670135, -0.1731695681810379, -0.23144946992397308, 0.29214605689048767, -0.04424813389778137, 0.2595977783203125, 0.5342922210693359, -0.4022986590862274, -0.10385285317897797, -0.21433866024017334, -0.25801876187324524, 0.0669403225183487, -0.2614174783229828, 0.033776409924030304, -0.06586174666881561, -0.2519775927066803, 0.4331672787666321, 0.056380439549684525, -0.014876965433359146, 0.3630107045173645, 0.2634352743625641, -0.07304137200117111, 0.28078514337539673, 0.37652891874313354, -0.006155766546726227, -0.026190005242824554, -0.09183618426322937, -0.21721330285072327, -0.006944688037037849, -0.27984166145324707, -0.21631842851638794, -0.04113475978374481, -0.32786282896995544, 0.35971179604530334, -0.12800011038780212, -0.05856017768383026, -0.3390309810638428, -0.03717825561761856, 0.13102521002292633, -0.2752212584018707, -0.012436851859092712, -0.02468382939696312, 0.05353941023349762, 0.07747353613376617, 0.28159844875335693, 0.16691258549690247, 0.21932865679264069, -0.056459154933691025, -0.20006202161312103, -0.23455065488815308, 0.6014279127120972, -0.17627805471420288, -0.32051533460617065, -0.030726436525583267, -0.06094273179769516, 0.15734130144119263, -0.0020095836371183395, -0.5110329389572144, -0.057124435901641846, 0.1305316686630249, -0.04099152237176895, -0.10792894661426544, 0.3010040521621704, -0.06906429678201675, 0.01338135451078415, -0.19022098183631897, 0.05270951986312866, -0.059910815209150314, -0.038953494280576706, -0.1784621775150299, -0.08101754635572433 ]
https://github.com/huggingface/datasets/issues/6591
Hi! Indeed, Dropbox is not a reliable host. I've just merged https://huggingface.co/datasets/PolyAI/minds14/discussions/24 to fix this by hosting the data files inside the repo.
The datasets models housed in Dropbox can't support a lot of users downloading them
### Describe the bug I'm using the datasets ``` from datasets import load_dataset, Audio dataset = load_dataset("PolyAI/minds14", name="en-US", split="train") ``` And it seems that sometimes when I imagine a lot of users are accessing the same resources, the Dropbox host fails: `raise ConnectionError(f"Couldn't reach {url} (error {response.status_code})") ConnectionError: Couldn't reach https://www.dropbox.com/s/e2us0hcs3ilr20e/MInDS-14.zip?dl=1 (error 429)` My question is if we can somehow host these files elsewhere or can you change the limit of simultaneous users accessing those resources or any other solution? Also, has anyone had this issue before? Thanks ### Steps to reproduce the bug 1: Create a python script like so: ``` from datasets import load_dataset, Audio dataset = load_dataset("PolyAI/minds14", name="en-US", split="train") ``` 2: Execute this by a certain number of users at the same time ### Expected behavior I woudl expect that this shouldnt happen unless its a huge amount of users, which it is not the case ### Environment info This was done in an Ubuntu 22 environment.
23
The datasets models housed in Dropbox can't support a lot of users downloading them ### Describe the bug I'm using the datasets ``` from datasets import load_dataset, Audio dataset = load_dataset("PolyAI/minds14", name="en-US", split="train") ``` And it seems that sometimes when I imagine a lot of users are accessing the same resources, the Dropbox host fails: `raise ConnectionError(f"Couldn't reach {url} (error {response.status_code})") ConnectionError: Couldn't reach https://www.dropbox.com/s/e2us0hcs3ilr20e/MInDS-14.zip?dl=1 (error 429)` My question is if we can somehow host these files elsewhere or can you change the limit of simultaneous users accessing those resources or any other solution? Also, has anyone had this issue before? Thanks ### Steps to reproduce the bug 1: Create a python script like so: ``` from datasets import load_dataset, Audio dataset = load_dataset("PolyAI/minds14", name="en-US", split="train") ``` 2: Execute this by a certain number of users at the same time ### Expected behavior I woudl expect that this shouldnt happen unless its a huge amount of users, which it is not the case ### Environment info This was done in an Ubuntu 22 environment. Hi! Indeed, Dropbox is not a reliable host. I've just merged https://huggingface.co/datasets/PolyAI/minds14/discussions/24 to fix this by hosting the data files inside the repo.
[ -0.34906262159347534, 0.30475425720214844, -0.036654695868492126, 0.5930954217910767, 0.2086874395608902, -0.12326231598854065, 0.3543434739112854, 0.08312855660915375, 0.21345342695713043, 0.14639872312545776, -0.38722750544548035, -0.04541517421603203, -0.1008751392364502, 0.19324469566345215, -0.0011590104550123215, -0.22802318632602692, 0.11695431172847748, -0.2087624967098236, -0.18063272535800934, 0.01932821422815323, 0.0036475583910942078, -0.17517144978046417, -0.0603385865688324, -0.05301240086555481, -0.11521061509847641, -0.162139430642128, 0.020772404968738556, 0.19726631045341492, -0.09253740310668945, -0.06385917216539383, 0.3169559836387634, 0.3259480893611908, -0.006197478622198105, 0.47269031405448914, -0.00012059611617587507, 0.10101113468408585, 0.11729992181062698, 0.010809704661369324, -0.4866940975189209, -0.3966272473335266, -0.31543058156967163, -0.18912914395332336, -0.16727082431316376, -0.024103671312332153, 0.08138547837734222, 0.16363206505775452, -0.09641788899898529, -0.26491278409957886, 0.4691128730773926, 0.049543604254722595, 0.13248705863952637, 0.538135290145874, 0.2096829116344452, 0.018230915069580078, 0.366950660943985, 0.28578585386276245, -0.02341148629784584, 1.031994342803955, 0.5136939287185669, -0.25483590364456177, 0.01966508850455284, 0.10691266506910324, 0.01710514724254608, 0.09721969813108444, 0.002421930432319641, -0.15899665653705597, -0.20539017021656036, -0.5709231495857239, -0.2839927077293396, 0.44344672560691833, 0.6144892573356628, 0.1821741759777069, -0.612619161605835, -0.47819703817367554, -0.1445782631635666, 0.2922690808773041, 0.22078439593315125, 0.29425618052482605, -0.10822989046573639, 0.09603406488895416, -0.13825750350952148, -0.0720628872513771, -0.15264959633350372, 0.20686675608158112, 0.2214779108762741, 0.19082415103912354, -0.017407219856977463, 0.1342446357011795, 0.2525429427623749, -0.2261800765991211, 0.34398531913757324, -0.16740533709526062, 0.00879954919219017, 0.03120427578687668, -0.43475788831710815, -0.15999135375022888, -0.3491464853286743, 0.015955397859215736, 0.4355824291706085, 0.18698260188102722, 0.3502656817436218, -0.061050936579704285, -0.2933349311351776, 0.07961131632328033, 0.48076674342155457, -0.030551636591553688, -0.2366350293159485, -0.13127706944942474, 0.43354836106300354, 0.35784682631492615, 0.05127765238285065, 0.0528116337954998, -0.12714405357837677, -0.2279665470123291, -0.48746705055236816, -0.20933890342712402, 0.33159881830215454, -0.01247810572385788, -0.2988400161266327, 0.017094198614358902, -0.34144866466522217, -0.08493968844413757, 0.17944660782814026, -0.07533742487430573, -0.06158168613910675, 0.5560657978057861, -0.08181233704090118, -0.0327601283788681, -0.12452339380979538, -0.6439999341964722, -0.014974763616919518, 0.0804469883441925, 0.007933340966701508, 0.20813050866127014, 0.039389386773109436, -0.13607817888259888, 0.20017631351947784, 0.10636721551418304, 0.27311620116233826, -0.40299925208091736, 0.4125467538833618, -0.18519631028175354, -0.42668408155441284, 0.21395322680473328, 0.06018347293138504, 0.14263585209846497, -0.0768895298242569, -0.2923147976398468, 0.06350699067115784, -0.09679040312767029, -0.42343005537986755, -0.24606342613697052, -0.014537932351231575, 0.034412089735269547, 0.08502897620201111, -0.013651415705680847, -0.44952666759490967, -0.03133884817361832, 0.15037645399570465, -0.13077889382839203, -0.09320289641618729, 0.08713125437498093, 0.08229470252990723, 0.09522079676389694, 0.1650177240371704, 0.784038245677948, -0.18594737350940704, 0.20476004481315613, -0.04840681329369545, 0.19633594155311584, 0.12999385595321655, 0.40290355682373047, -0.3453598916530609, 0.1799461990594864, -0.2160215675830841, -0.14010222256183624, 0.17064492404460907, -0.4134587049484253, -0.4820816218852997, 0.3513178825378418, -0.31770190596580505, 0.001693911850452423, 0.20589591562747955, 0.10538385808467865, 0.38574695587158203, -0.06955049932003021, 0.44237709045410156, 0.1328412890434265, 0.1388503611087799, -0.0659477561712265, -0.22212037444114685, -0.38198956847190857, 0.1707647442817688, 0.1460590660572052, -0.04746117815375328, 0.07430727779865265, 0.23825670778751373, 0.5121104717254639, 0.3691937029361725, 0.03758842498064041, 0.15790262818336487, 0.13321152329444885, 0.1868947446346283, 0.07206705957651138, -0.23774446547031403, -0.002927906811237335, -0.08964955806732178, 0.12463760375976562, 0.1851743459701538, -0.16570526361465454, 0.4350147247314453, -0.022662300616502762, -0.21597783267498016, 0.02775045484304428, -0.08349204063415527, 0.23790711164474487, -0.043844517320394516, -0.03316919133067131, -0.10011879354715347, 0.07653118669986725, 0.01914956420660019, 0.3858061134815216, -0.2725967764854431, 0.1561327427625656, -0.4965721368789673, 0.6936954259872437, -0.3075629770755768, 0.0355728380382061, 0.20337000489234924, -0.13875415921211243, 0.12903858721256256, -0.12545298039913177, -0.06137695908546448, 0.27099668979644775, 0.01660235971212387, -0.1250087022781372, 0.2715582549571991, 0.4489666223526001, 0.5344020128250122, 0.06611188501119614, 0.045813724398612976, 0.1261754333972931, 0.17391479015350342, 0.06975587457418442, 0.00844527781009674, 0.12995979189872742, 0.029143627732992172, 0.3422437906265259, 0.09858892858028412, 0.18958231806755066, 0.37119537591934204, 0.19246900081634521, -0.05055705085396767, 0.0059462785720825195, 0.10050137341022491, -0.32987502217292786, 0.651333749294281, -0.09648546576499939, -0.5143778920173645, -0.09021414071321487, -0.19333362579345703, -0.04143471270799637, 0.13709130883216858, 0.05784588307142258, 0.02356533333659172, -0.29618093371391296, 0.31294676661491394, 0.3223075270652771, 0.44270551204681396, -0.01187177188694477, 0.2536565661430359, -0.13536451756954193, 0.2525619864463806, -0.38384905457496643, 0.14354823529720306, 0.1298704296350479, -0.3148688077926636, 0.11463847756385803, 0.2929903566837311, -0.05536171793937683, -0.3125128746032715, -0.4400450587272644, 0.13902705907821655, 0.10137081146240234, -0.4092806577682495, 0.14167529344558716, -0.08791182935237885, -0.1490957885980606, -0.09803302586078644, -0.2737939953804016, -0.38486072421073914, -0.1811661720275879, -0.09884242713451385, 0.5308657288551331, -0.16051515936851501, 0.0030668266117572784, -0.0523412749171257, 0.40032345056533813, -0.018542330712080002, 0.7165916562080383, -0.22272488474845886, 0.353158563375473, -0.017031598836183548, -0.04305245354771614, 0.4778655171394348, -0.25951850414276123, 0.2189568132162094, -0.05803099647164345, -0.2861115336418152, -0.2743470072746277, -0.038729749619960785, -0.05602557957172394, 0.3778602182865143, 0.3329117000102997, -0.08080961555242538, 0.4306657910346985, 0.3781977891921997, -0.21177101135253906, -0.0866936668753624, 0.22042705118656158, 0.14474454522132874, -0.10891503095626831, -0.10517188906669617, -0.017533067613840103, 0.08187788724899292, -0.16206365823745728, -0.4709759056568146, -0.3829686641693115, 0.06312212347984314, -0.16653558611869812, 0.1185225397348404, 0.3813387155532837, 0.3101556599140167, -0.05377796292304993, -0.2704675793647766, -0.15217676758766174, -0.05707055330276489, -0.7085325717926025, 0.19924357533454895, -0.13225731253623962, -0.3466174304485321, -0.045939892530441284, 0.24667701125144958, -0.15609237551689148, -0.23059113323688507, -0.28649193048477173, -0.3517354726791382, -0.23138251900672913, -0.004945434629917145, -0.14051073789596558, 0.07661132514476776, -0.09523758292198181, -0.15922442078590393, 0.04006531834602356, 0.21455709636211395, 0.09993869811296463, 0.20014606416225433, 0.39993953704833984, 0.14909206330776215, 0.00029321014881134033, 0.04636295139789581, 0.09404988586902618, 0.2747355103492737, 0.3187411427497864, 0.09903356432914734, 0.5184029340744019, 0.22993534803390503, 0.4053952395915985, -0.11443421989679337, -0.13574905693531036, -0.05525942146778107, -0.06019115447998047, -0.12520399689674377, 0.26373910903930664, 0.14137977361679077, 0.07755628228187561, -0.20382076501846313, -0.5625351071357727, 0.04997768998146057, -0.27683785557746887, -0.1582871377468109, -0.2893672585487366, 0.019709065556526184, 0.06064578890800476, -0.11397548019886017, -0.026401016861200333, -0.13879624009132385, -0.14083005487918854, 0.23154258728027344, 0.2929227352142334, 0.12422927469015121, -0.1126146912574768, -0.011391948908567429, -0.2010079324245453, 0.0720105990767479, -0.1025591641664505, 0.6583530306816101, -0.2290605902671814, 0.40352630615234375, 0.1955634206533432, 0.10835246741771698, 0.5710563063621521, -0.06533316522836685, 0.33667561411857605, -0.3773016333580017, 0.22548533976078033, 0.04691373556852341, -0.1947566270828247, 0.01599794626235962, -0.05856527015566826, 0.15598300099372864, 0.447812020778656, -0.20418119430541992, -0.062213726341724396, -0.2246263027191162, 0.2936951518058777, -0.17234164476394653, -0.0051294490694999695, 0.11074036359786987, -0.33743399381637573, -0.2704894542694092, 0.16707107424736023, 0.026788152754306793, -0.03695268929004669, -0.1638488471508026, -0.39723634719848633, 0.3504811227321625, -0.0009193569421768188, 0.08551670610904694, -0.02027731016278267, -0.11701366305351257, 0.20044159889221191, 0.40045660734176636, 0.14510734379291534, 0.05178489536046982, 0.5281598567962646, 0.47957274317741394, 0.002642693929374218, -0.18869109451770782, -0.1388319879770279, 0.02055780589580536, 0.04423202574253082, 0.47010499238967896, -0.07010363787412643, 0.22544129192829132, 0.2717859447002411, 0.19994528591632843, -0.09975354373455048, 0.1847398579120636, 0.2004639357328415, -0.11443585157394409, -0.3668820858001709, -0.5607014298439026, 0.2666074335575104, -0.26201510429382324, -0.11891275644302368, 0.01540878601372242, -0.04304993897676468, -0.09479637444019318, 0.3055400550365448, -0.054974265396595, 1.0395841598510742, 0.03977903723716736, 0.33776459097862244, -0.22277604043483734, -0.31248605251312256, 0.2570669651031494, -0.4514039158821106, -0.0525435209274292, -0.17208102345466614, -0.20307135581970215, -0.14640960097312927, -0.040761034935712814, 0.12513549625873566, 0.3256374001502991, 0.1769498735666275, 0.24215953052043915, -0.35880956053733826, -0.027354862540960312, -0.10208683460950851, 0.40548792481422424, -0.06043323129415512, -0.06945507228374481, -0.03438136726617813, 0.106120765209198, -0.22445686161518097, -0.13409510254859924, -0.13487161695957184, -0.1994473934173584, -0.04950692132115364, -0.20532570779323578, -0.2601102888584137, 0.03618671000003815, -0.1484188586473465, 0.21064305305480957, -0.2702657878398895, -0.1839393675327301, 0.19895808398723602, 0.22018185257911682, -0.13423576951026917, 0.2697121202945709, -0.21610087156295776, -0.0909712016582489, -0.4067266583442688, 0.03327227011322975, 0.11488193273544312, 0.10712172836065292, -0.023108255118131638, -0.037498075515031815, -0.23849694430828094, -0.20578332245349884, 0.04751927778124809, 0.012976102530956268, -0.21358554065227509, 0.16574594378471375, -0.029137812554836273, -0.19631555676460266, 0.0025145262479782104, -0.1536080241203308, -0.07182200253009796, -0.2828516662120819, 0.013795126229524612, 0.09832484275102615, -0.18958553671836853, 0.05454159155488014, -0.13447582721710205, 0.09502758085727692, -0.06728289276361465, 0.48401015996932983, -0.24403099715709686, 0.6413314342498779, 0.16697052121162415, -0.03291972726583481, -0.1474524438381195, -0.028939664363861084, 0.498877614736557, -0.3084981441497803, -0.33750247955322266, 0.17533349990844727, -0.07534293830394745, 0.22304323315620422, -0.5090773105621338, 0.17488586902618408, 0.29821619391441345, -0.07153521478176117, 0.06182470917701721, -0.4839436709880829, -0.12489714473485947, -0.0028875917196273804, 0.05955422297120094, -0.013905579224228859, -0.1388559490442276, -0.2938847541809082, -0.04019872844219208, 0.04889398813247681, -0.1475439965724945, -0.04070571810007095, -0.4518354535102844, -0.06870944797992706, 0.12597166001796722, -0.07122578471899033, 0.035223934799432755, -0.030017821118235588, -0.07604116201400757, -0.12478338181972504, 0.024748999625444412, -0.043620407581329346, -0.14139260351657867, 0.2122957408428192, 0.331927627325058, -0.20307934284210205, 0.137737438082695, -0.43489640951156616, -0.09451411664485931, 0.006318286061286926, -0.14222636818885803, 0.1893482804298401, 0.10771037638187408, -0.19460973143577576, 0.1059972420334816, 0.259208083152771, -0.3611067533493042, 0.6863635182380676, 0.009709194302558899, 0.08135591447353363, -0.01156570017337799, 0.08195675909519196, 0.533565104007721, -0.15314581990242004, -0.48906782269477844, 0.022555552423000336, 0.09814313054084778, -0.04573561251163483, 0.45453041791915894, -0.1193055510520935, 0.027171872556209564, 0.4367977976799011, 0.2256019115447998, 0.5700404047966003, -0.043804578483104706, 0.08966866135597229, 0.16351643204689026, 0.053895581513643265, -0.1267017424106598, -0.4981590509414673, 0.2596032917499542, 0.09639875590801239, -0.06487494707107544, 0.06021331250667572, 0.4172857701778412, -0.4280468821525574, -0.37558984756469727, 0.08334562927484512, 0.2634715437889099, 0.3853907883167267, 0.024904191493988037, 0.3410814702510834, 0.015588469803333282, 0.080381378531456, 0.09330346435308456, -0.07530716806650162, 0.28908517956733704, 0.2401297241449356, -0.15543146431446075, 0.19618773460388184, 0.05985713005065918, -0.048066381365060806, 0.047636453062295914, -0.3706510663032532, 0.11941644549369812, -0.09854184836149216, 0.1165054440498352, 0.009202834218740463, -0.18145626783370972, 0.1166512668132782, -0.3196353018283844, 0.14032207429409027, -0.17908614873886108, -0.021638527512550354, 0.12672023475170135, 0.0030631422996520996, 0.09913025796413422, -0.16117337346076965, -0.16479039192199707, -0.1036285012960434, -0.07345674932003021, -0.2539909780025482, 0.2951852083206177, 0.0459800660610199, -0.11420553922653198, -0.28488487005233765, -0.02579999342560768, 0.48290008306503296, -0.15654206275939941, -0.41036486625671387, 0.24331550300121307, 0.5072838664054871, -0.11213860660791397, 0.03974579647183418, 0.3100396394729614, 0.26596832275390625, 0.15341120958328247, 0.1809539496898651, 0.0965755507349968, 0.1777205765247345, -0.019949153065681458, -0.12869304418563843, 0.22673925757408142, 0.018982285633683205, 0.0541980117559433, 0.3400738835334778, -0.0021012891083955765, -0.07208514213562012, 0.20349445939064026, -0.016284694895148277, -0.17181280255317688, -0.3644014000892639, 0.37769901752471924, -0.20838646590709686, -0.3342970311641693, -0.1482611894607544, -0.17382043600082397, -0.33766666054725647, 0.22595328092575073, 0.2937901020050049, -0.24256104230880737, 0.07959824800491333, -0.18095871806144714, -0.026401568204164505, -0.12631279230117798, 0.4996488392353058, 0.28008705377578735, -0.13654954731464386, -0.0726889818906784, -0.012880951166152954, -0.46603459119796753, 0.1569090485572815, -0.3219239413738251, 0.22696469724178314, -0.25114142894744873, -0.11716865003108978, -0.10073478519916534, 0.03455562889575958, -0.016760043799877167, 0.049851272255182266, -0.30194833874702454, 0.434814453125, -0.270252525806427, -0.16739073395729065, -0.08417458832263947, 0.20493924617767334, -0.1196732148528099, -0.2310779094696045, 0.5603910684585571, -0.01928672194480896, -0.11945578455924988, 0.13712474703788757, 0.14710001647472382, 0.04321959614753723, -0.27187734842300415, 0.3970136046409607, 0.19369781017303467, 0.4182116687297821, 0.019577644765377045, 0.00705999881029129, -0.2533201575279236, -0.15868709981441498, -0.2283119112253189, -0.146126851439476, -0.01895628683269024, 0.27509942650794983, -0.2425115704536438, -0.08223223686218262, -0.27752289175987244, 0.10042151808738708, -0.27389031648635864, 0.1594095528125763, -0.1747795194387436, -0.32918649911880493, -0.0919608473777771, 0.04560423642396927, 0.2267928570508957, 0.04353092610836029, -0.12125203013420105, -0.25256243348121643, -0.26080673933029175, -0.20873695611953735, 0.19289849698543549, -0.27708396315574646, -0.32899290323257446, -0.23428687453269958, 0.3372357189655304, -0.11157642304897308, -0.1409219652414322, 0.08947369456291199, -0.039101600646972656, 0.48309803009033203, -0.06864911317825317, -0.07798925787210464, 0.17048205435276031, -0.020144524052739143, 0.090975821018219, 0.06976588070392609, 0.36426424980163574, 0.013355394825339317, -0.1229887455701828, 0.4651418924331665, -0.12192465364933014 ]
https://github.com/huggingface/datasets/issues/6585
Hi ! This issue comes from the fact that `map()` with `num_proc>1` shards the dataset in multiple chunks to be processed (one per process) and merges them. The DatasetInfos of each chunk are then merged together, but for some fields like `dataset_name` it's not been implemented and default to None. The DatasetInfo merge is defined here, in case you'd like to contribute an improvement: https://github.com/huggingface/datasets/blob/d2e0034122a788015c0834a72e6c6279e7ecbac5/src/datasets/info.py#L269-L270
losing DatasetInfo in Dataset.map when num_proc > 1
### Describe the bug Hello and thanks for developing this package! When I process a Dataset with the map function using multiple processors some set attributes of the DatasetInfo get lost and are None in the resulting Dataset. ### Steps to reproduce the bug ```python from datasets import Dataset, DatasetInfo def run_map(num_proc): dataset = Dataset.from_dict( {"col1": [0, 1], "col2": [3, 4]}, info=DatasetInfo( dataset_name="my_dataset", ), ) ds = dataset.map(lambda x: x, num_proc=num_proc) print(ds.info.dataset_name) run_map(1) run_map(2) ``` This puts out: ```bash Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 724.66 examples/s] my_dataset Map (num_proc=2): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 18.25 examples/s] None ``` ### Expected behavior I expect the DatasetInfo to be kept as it was and there should be no difference in the output of running map with num_proc=1 and num_proc=2. Expected output: ```bash Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 724.66 examples/s] my_dataset Map (num_proc=2): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 18.25 examples/s] my_dataset ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.17 - Python version: 3.8.18 - `huggingface_hub` version: 0.20.2 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.9.2
65
losing DatasetInfo in Dataset.map when num_proc > 1 ### Describe the bug Hello and thanks for developing this package! When I process a Dataset with the map function using multiple processors some set attributes of the DatasetInfo get lost and are None in the resulting Dataset. ### Steps to reproduce the bug ```python from datasets import Dataset, DatasetInfo def run_map(num_proc): dataset = Dataset.from_dict( {"col1": [0, 1], "col2": [3, 4]}, info=DatasetInfo( dataset_name="my_dataset", ), ) ds = dataset.map(lambda x: x, num_proc=num_proc) print(ds.info.dataset_name) run_map(1) run_map(2) ``` This puts out: ```bash Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 724.66 examples/s] my_dataset Map (num_proc=2): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 18.25 examples/s] None ``` ### Expected behavior I expect the DatasetInfo to be kept as it was and there should be no difference in the output of running map with num_proc=1 and num_proc=2. Expected output: ```bash Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 724.66 examples/s] my_dataset Map (num_proc=2): 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:00<00:00, 18.25 examples/s] my_dataset ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.17 - Python version: 3.8.18 - `huggingface_hub` version: 0.20.2 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.9.2 Hi ! This issue comes from the fact that `map()` with `num_proc>1` shards the dataset in multiple chunks to be processed (one per process) and merges them. The DatasetInfos of each chunk are then merged together, but for some fields like `dataset_name` it's not been implemented and default to None. The DatasetInfo merge is defined here, in case you'd like to contribute an improvement: https://github.com/huggingface/datasets/blob/d2e0034122a788015c0834a72e6c6279e7ecbac5/src/datasets/info.py#L269-L270
[ -0.35594192147254944, -0.10743378102779388, -0.007776990532875061, 0.6413049101829529, 0.2363981008529663, 0.20442619919776917, 0.16280147433280945, 0.22665756940841675, 0.17084787786006927, 0.3607620298862457, 0.25110965967178345, 0.6130760908126831, 0.121337890625, 0.14003291726112366, -0.1783961057662964, 0.17011480033397675, 0.09898559749126434, 0.02765503153204918, -0.0899694412946701, -0.13389089703559875, -0.36770856380462646, 0.06443457305431366, -0.307568222284317, -0.26112422347068787, -0.1411897987127304, -0.1100536361336708, 0.04930867999792099, 0.17221558094024658, 0.3406822085380554, -0.24031834304332733, 0.060937099158763885, -0.15086036920547485, -0.19922806322574615, 0.3899756669998169, -0.00012630113633349538, 0.0312701016664505, 0.21787425875663757, 0.05240496248006821, -0.0708666443824768, -0.10022728890180588, -0.47568100690841675, -0.23188304901123047, -0.1475551724433899, -0.21139919757843018, 0.09373269975185394, 0.21084699034690857, -0.17675811052322388, -0.7475442290306091, -0.21800382435321808, 0.1603916883468628, 0.09108671545982361, 0.07896046340465546, -0.22437423467636108, 0.2967505156993866, -0.03423871099948883, 0.2327192723751068, -0.0967441201210022, -0.37960097193717957, 0.14458759129047394, -0.06349065154790878, 0.46268290281295776, 0.3652350902557373, -0.16776007413864136, -0.011929257772862911, -0.0702095627784729, 0.16012035310268402, 0.3667883276939392, -0.5146741271018982, 0.34131184220314026, -0.03113381937146187, 0.06641543656587601, -0.3808515965938568, -0.4555741548538208, -0.36409488320350647, 0.09394752234220505, -0.35504186153411865, -0.040010496973991394, 0.03291039168834686, 0.11277399957180023, 0.18530942499637604, -0.17637063562870026, 0.1864423155784607, 0.11593656241893768, 0.17687544226646423, -0.21544329822063446, 0.4166242182254791, 0.06126561388373375, 0.2978060841560364, -0.06925695389509201, 0.19794383645057678, -0.3226947486400604, -0.2461216151714325, -0.09116329997777939, 0.11376911401748657, -0.28054043650627136, 0.04972320795059204, 0.29494038224220276, 0.2129015475511551, 0.03602214157581329, -0.16849122941493988, -0.03505358844995499, 0.023824196308851242, -0.2337193638086319, 0.26547467708587646, 0.3721844553947449, -0.220251202583313, 0.16316644847393036, 0.27946358919143677, 0.3314630389213562, -0.3442727327346802, -0.2105642557144165, -0.0665743350982666, 0.5086453557014465, 0.03971705585718155, 0.4166730046272278, 0.09467218071222305, 0.5206435918807983, -0.2105320245027542, -0.14259377121925354, 0.38411933183670044, -0.43340864777565, 0.04695957154035568, -0.07658735662698746, 0.2025316208600998, 0.17701135575771332, 0.5956434011459351, -0.24882008135318756, 0.10171288996934891, -0.27996736764907837, -0.2748727798461914, -0.29467037320137024, -0.2955440282821655, -0.0785306990146637, 0.131984144449234, 0.15046818554401398, 0.11237539350986481, 0.1970292627811432, 0.10498499870300293, 0.18695199489593506, -0.40307918190956116, 0.22271080315113068, -0.5375765562057495, 0.16016298532485962, 0.23253917694091797, -0.19779962301254272, 0.4305339455604553, 0.022278906777501106, -0.1635550558567047, -0.135986328125, 0.23581786453723907, -0.012416243553161621, -0.027838125824928284, 0.13797134160995483, 0.06756116449832916, -0.0734746977686882, 0.22052820026874542, -0.13818509876728058, 0.3382094204425812, 0.35474497079849243, -0.14990174770355225, 0.050476133823394775, -0.5391979217529297, -0.654456377029419, -0.22861941158771515, -0.010196175426244736, 0.6097245812416077, -0.2593623995780945, -0.07461350411176682, 0.046567898243665695, 0.09082925319671631, 0.18695494532585144, 0.28927451372146606, -0.05412444844841957, 0.18184904754161835, -0.007341977208852768, 0.03950588405132294, 0.22433368861675262, -0.4511169195175171, -0.8372582793235779, 0.1797613650560379, -0.11557497829198837, 0.03837817907333374, 0.03740262985229492, 0.09568601101636887, 0.23682533204555511, -0.12303490936756134, -0.1525932103395462, 0.2633562982082367, -0.183447927236557, 0.25063198804855347, -0.14988616108894348, -0.01819417253136635, 0.36995255947113037, -0.10850463807582855, 0.32885411381721497, 0.13415563106536865, 0.2925404906272888, -0.6212630867958069, 0.36426568031311035, 0.05031675100326538, 0.386599063873291, 0.4405115246772766, 0.16884127259254456, 0.11976442486047745, 0.07913549244403839, -0.29631170630455017, -0.23875606060028076, 0.25431913137435913, 0.21158839762210846, -0.1773904711008072, -0.34483209252357483, -0.20443439483642578, 0.030630789697170258, 0.140895277261734, 0.03339745104312897, -0.049728069454431534, -0.01624615490436554, 0.06770157814025879, -0.17575277388095856, 0.11382189393043518, -0.02655978500843048, 0.37636706233024597, 0.16989925503730774, -0.050325505435466766, -0.11086833477020264, 0.2983427345752716, 0.22249306738376617, -0.2117142677307129, -0.21228507161140442, 0.12854093313217163, 0.4177859425544739, 0.1305915117263794, -0.19762574136257172, 0.2743111252784729, 0.4598274827003479, 0.1394636034965515, -0.07753509283065796, 0.17671456933021545, 0.5364245176315308, 0.02607119083404541, -0.12010534852743149, 0.04024128243327141, 0.27028152346611023, -0.10780757665634155, 0.0010097203776240349, -0.09311004728078842, 0.14807848632335663, 0.27476513385772705, -0.03482517600059509, -0.006703265011310577, 0.08004046231508255, -0.06312156468629837, 0.08195280283689499, -0.2767476439476013, -0.3134356439113617, -0.032946038991212845, 0.2195151448249817, 0.13385415077209473, -0.33383840322494507, 0.36051735281944275, 0.38806816935539246, 0.1298401653766632, -0.096927210688591, -0.21269504725933075, -0.19485154747962952, 0.14956261217594147, 0.36893230676651, 0.17512039840221405, 0.6095551252365112, 0.19070975482463837, 0.1394045501947403, -0.016988031566143036, -0.02497808262705803, -0.003059547394514084, 0.062440820038318634, 0.30445289611816406, 0.2651797831058502, 0.17454424500465393, 0.33301135897636414, 0.03594342619180679, -0.09668415039777756, -0.27451586723327637, 0.3312295377254486, 0.1900404393672943, -0.38681739568710327, 0.206656351685524, -0.45298048853874207, 0.19861763715744019, -0.12597113847732544, -0.18392375111579895, -0.01222940068691969, -0.4596298933029175, -0.3597833216190338, 0.3552776575088501, -0.13707886636257172, 0.11161939799785614, -0.35067087411880493, -0.23193344473838806, 0.05945982784032822, -0.06344440579414368, -0.05401534587144852, -0.4144245386123657, -0.300696462392807, -0.21743513643741608, 0.0749051421880722, 0.01642879843711853, 0.08432529121637344, 0.1702679544687271, -0.4421917796134949, -0.3615204691886902, -0.2066950798034668, 0.05157479643821716, 0.0009290585294365883, 0.19155944883823395, -0.18752814829349518, 0.01085895299911499, -0.09921135008335114, 0.143227219581604, 0.2520485520362854, -0.027068041265010834, -0.05598302558064461, 0.022304385900497437, 0.029901720583438873, -0.3769029974937439, -0.1283242255449295, -0.24457433819770813, -0.2589172124862671, -0.2124147117137909, 0.19151782989501953, -0.14359761774539948, 0.27310851216316223, -0.041984397917985916, 0.025126565247774124, -0.1753607839345932, 0.032125119119882584, 0.0983661562204361, -0.34466058015823364, 0.04897169768810272, 0.11147324740886688, -0.09362317621707916, -0.009173305705189705, -0.1713203340768814, 0.0817953422665596, 0.051847051829099655, 0.2609020471572876, -0.4275144636631012, -0.19959357380867004, -0.16942764818668365, 0.38043510913848877, -0.18621017038822174, 0.20628848671913147, 0.4279334843158722, 0.2794992923736572, 0.07661867886781693, -0.28331753611564636, -0.5095665454864502, 0.2173764407634735, 0.11621488630771637, 0.03631136566400528, 0.07607686519622803, 0.2567773759365082, 0.005189821124076843, 0.2989523410797119, 0.4018958806991577, -0.193274587392807, 0.1335030198097229, -0.06880085170269012, 0.11448756605386734, 0.018821191042661667, -0.34145256876945496, -0.002738337963819504, -0.026522822678089142, -0.326626181602478, 0.02099701389670372, -0.007896138355135918, -0.3057970404624939, 0.09154336154460907, 0.1794181764125824, -0.4391363263130188, -0.22499987483024597, -0.2314828783273697, 0.0998133048415184, 0.2449023276567459, 0.18407800793647766, 0.32713714241981506, -0.28062474727630615, 0.07613489776849747, 0.26877719163894653, -0.09431111812591553, 0.008554507046937943, -0.09798090159893036, -0.17427995800971985, -0.2644246518611908, -0.3419572114944458, 0.33397096395492554, 0.15741631388664246, 0.41717326641082764, -0.0872916579246521, -0.274536669254303, -0.07676300406455994, 0.2728009819984436, 0.6902691125869751, -0.38460901379585266, -0.008143916726112366, 0.1636873334646225, -0.22649484872817993, -0.1628563404083252, -0.12408633530139923, -0.1135963648557663, 0.3296022415161133, 0.3787417411804199, 0.336773544549942, -0.0860222652554512, -0.10798569023609161, 0.023850392550230026, 0.013043567538261414, -0.06972561031579971, -0.24391117691993713, -0.15750205516815186, -0.11026901006698608, -0.10627731680870056, 0.10054264962673187, -0.02017604187130928, 0.07695921510457993, -0.14378468692302704, -0.28759822249412537, -0.23418399691581726, -0.24000105261802673, 0.22387120127677917, 0.00709833949804306, 0.3196587860584259, 0.07650905102491379, 0.1699950098991394, 0.18530896306037903, 0.03935305029153824, 0.35033729672431946, 0.3700484037399292, -0.007611934095621109, -0.26464396715164185, -0.10882943868637085, -0.02213125303387642, 0.3677254021167755, 0.19673588871955872, 0.05035488307476044, -0.07152172923088074, -0.14509953558444977, 0.22888275980949402, -0.35638460516929626, -0.01144237071275711, 0.24068070948123932, 0.16978120803833008, -0.336238294839859, -0.22236207127571106, 0.33021846413612366, 0.22288812696933746, -0.4029877185821533, 0.636753499507904, -0.10057045519351959, -0.34368741512298584, 0.26373156905174255, 0.08471125364303589, 0.7401434779167175, -0.05073816329240799, -0.07181601226329803, -0.06378971040248871, -0.06284350156784058, 0.08493484556674957, 0.06619589030742645, 0.12153567373752594, -0.3118433952331543, -0.35213175415992737, -0.050457973033189774, -0.11154084652662277, 0.14156977832317352, 0.07076874375343323, -0.15405723452568054, 0.2893168330192566, 0.014265745878219604, 0.2638320028781891, 0.029943235218524933, -0.1149764135479927, 0.16464316844940186, -0.24405820667743683, -0.04802323877811432, -0.0006364993751049042, -0.023622389882802963, 0.054281238466501236, -0.05561577528715134, 0.045296069234609604, -0.1582537591457367, 0.008523456752300262, -0.12809191644191742, -0.08269068598747253, -0.5457926988601685, 0.37530457973480225, 0.015167893841862679, -0.1662636399269104, 0.07270537316799164, 0.29053494334220886, 0.16165465116500854, 0.11152491718530655, -0.16588492691516876, 0.06140988692641258, 0.29959145188331604, 0.33196696639060974, 0.1942473202943802, -0.1261816769838333, 0.04487118870019913, 0.2756675183773041, -0.41547244787216187, 0.04984327405691147, -0.041305359452962875, 0.14382000267505646, -0.08918727189302444, 0.02778647094964981, 0.010927221737802029, -0.196149542927742, 0.0714789405465126, 0.17221768200397491, 0.17019546031951904, -0.3306872844696045, -0.02277771383523941, 0.25536614656448364, -0.12670394778251648, 0.6503556370735168, -0.20819327235221863, -0.4529479146003723, -0.12220051884651184, 0.36969658732414246, 0.00875156931579113, 0.20383310317993164, 0.2584493160247803, 0.0015102550387382507, -0.17857375741004944, -0.13457712531089783, 0.10475524514913559, -0.48538994789123535, 0.12558411061763763, 0.17352257668972015, -0.25738224387168884, 0.10916799306869507, -0.2187325358390808, -0.06554937362670898, -0.2754349112510681, 0.17389914393424988, -0.16845330595970154, -0.4918147325515747, -0.29696008563041687, 0.010329796001315117, -0.0691164880990982, 0.2000957578420639, 0.05453789234161377, -0.07744885236024857, -0.23873838782310486, 0.28907328844070435, -0.1617112010717392, -0.05358362942934036, 0.0003320947289466858, 0.20173333585262299, 0.3523816168308258, 0.3472467362880707, -0.04317859187722206, -0.3646465539932251, 0.039651058614254, 0.12949512898921967, 0.02047773078083992, -0.0478280633687973, -0.23661036789417267, 0.20436836779117584, -0.04161514714360237, 0.020357750356197357, 0.030892081558704376, -0.19237945973873138, 0.14105971157550812, -0.3336057662963867, 0.2383660227060318, 0.3599640429019928, -0.21202073991298676, 0.3447701334953308, 0.19394716620445251, 0.0423760712146759, 0.043050616979599, 0.19487504661083221, -0.11338106542825699, -0.05450398102402687, 0.18694481253623962, 0.49162518978118896, 0.33071067929267883, 0.1579645872116089, -0.0457458570599556, -0.22906729578971863, -0.16173739731311798, 0.01183277741074562, 0.4408111572265625, -0.28591498732566833, 0.029314465820789337, 0.6418352723121643, 0.07937265932559967, -0.08232080936431885, -0.26718106865882874, 0.006325051188468933, -0.008781496435403824, 0.1612546145915985, -0.08816511929035187, -0.1373210847377777, 0.5955939888954163, 0.22597762942314148, 0.03966046869754791, 0.4454430937767029, 0.22847357392311096, -0.19303332269191742, -0.26312822103500366, 0.10835124552249908, 0.009701572358608246, -0.10246652364730835, 0.21070118248462677, 0.28714877367019653, 0.07704555988311768, 0.26282382011413574, 0.10849104821681976, 0.19146761298179626, 0.11038786172866821, 0.5869245529174805, 0.40343958139419556, 0.2666608691215515, 0.08257342129945755, 0.028690138831734657, -0.06668177247047424, -0.32836809754371643, 0.23162473738193512, 0.025598689913749695, -0.5226951837539673, 0.10814300179481506, 0.16252091526985168, 0.2508004307746887, -0.28316935896873474, -0.174340158700943, 0.010030776262283325, 0.32012462615966797, -0.34288644790649414, -0.15194261074066162, -0.12713868916034698, -0.03836604952812195, 0.04116646945476532, -0.02727755531668663, 0.1110863909125328, -0.13250836730003357, 0.8480552434921265, 0.25969576835632324, -0.17815375328063965, -0.4755786955356598, -0.3180554211139679, 0.18830598890781403, 0.43876516819000244, -0.4128590226173401, 0.026398146525025368, -0.011982318013906479, -0.2705170512199402, -0.10047046840190887, 0.01951119862496853, 0.41877779364585876, 0.17664676904678345, -0.10336573421955109, -0.016054769977927208, 0.32242220640182495, -0.11059100925922394, -0.20350514352321625, 0.14349137246608734, -0.20204780995845795, 0.2362092137336731, 0.21010740101337433, -0.019963111728429794, 0.010874781757593155, -0.15774455666542053, 0.2580581307411194, 0.22539134323596954, -0.48315954208374023, 0.5516542196273804, -0.05386661738157272, -0.34037718176841736, -0.0376458466053009, -0.050237711519002914, 0.04792758822441101, -0.1304076910018921, 0.5736386775970459, -0.06705734133720398, 0.2939422130584717, -0.08101220428943634, -0.01717090792953968, 0.025525934994220734, 0.1136024221777916, 0.07263126969337463, -0.2183569371700287, -0.4334840774536133, 0.053540393710136414, -0.3399921655654907, 0.14727002382278442, -0.2330610305070877, -0.049836792051792145, -0.04473022371530533, 0.23417454957962036, -0.08368808776140213, 0.050053682178258896, 0.4345478117465973, -0.11061763018369675, 0.27675217390060425, 0.542506217956543, -0.33700719475746155, -0.17609980702400208, -0.49057096242904663, -0.2936343550682068, 0.194915309548378, -0.3812665641307831, 0.3425144851207733, -0.056202732026576996, -0.0022916868329048157, -0.2948168218135834, 0.1076584905385971, -0.10958889871835709, -0.2525510787963867, 0.5578663349151611, 0.34866631031036377, 0.26537346839904785, -0.08427861332893372, 0.04487708956003189, 0.05938449129462242, -0.0052610598504543304, -0.24481524527072906, 0.054170943796634674, -0.3595515787601471, 0.4696041941642761, -0.2648372948169708, -0.21702080965042114, -0.06766049563884735, -0.028621481731534004, 0.17721596360206604, -0.12665051221847534, -0.29523739218711853, -0.0040254369378089905, -0.22649675607681274, 0.1719791442155838, 0.03309076279401779, 0.2708493769168854, 0.08124013245105743, 0.23166054487228394, -0.1681220531463623, -0.37550705671310425, 0.372430682182312, -0.35769495368003845, -0.47016143798828125, -0.5362527370452881, 0.2839357256889343, -0.04547811299562454, -0.10880829393863678, -0.30145853757858276, -0.26413804292678833, 0.4097033441066742, -0.2291336953639984, -0.42861565947532654, 0.06979820132255554, -0.0770396962761879, -0.04243933781981468, 0.0142274871468544, 0.11767908930778503, 0.1152326837182045, -0.1443515121936798, 0.4914076626300812, -0.03415418416261673 ]
https://github.com/huggingface/datasets/issues/6584
@lhoestq ``` Traceback (most recent call last): File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 88, in _run_code exec(code, run_globals) File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module> cli.main() File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/mnt/sda/code/dataset_ai/dataset_ai/example/test.py", line 83, in <module> data = xnumpy_fromfile(current_dir, download_config=config,dtype=numpy.float32,) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/sda/code/dataset_ai/dataset_ai/src/datasets/download/streaming_download_manager.py", line 765, in xnumpy_fromfile return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: embedded null byte ```
np.fromfile not supported
How to do np.fromfile to use it like np.load ```python def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs): import numpy as np if hasattr(filepath_or_buffer, "read"): return np.fromfile(filepath_or_buffer, *args, **kwargs) else: filepath_or_buffer = str(filepath_or_buffer) return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ``` this is not work
105
np.fromfile not supported How to do np.fromfile to use it like np.load ```python def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs): import numpy as np if hasattr(filepath_or_buffer, "read"): return np.fromfile(filepath_or_buffer, *args, **kwargs) else: filepath_or_buffer = str(filepath_or_buffer) return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ``` this is not work @lhoestq ``` Traceback (most recent call last): File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 88, in _run_code exec(code, run_globals) File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module> cli.main() File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/mnt/sda/code/dataset_ai/dataset_ai/example/test.py", line 83, in <module> data = xnumpy_fromfile(current_dir, download_config=config,dtype=numpy.float32,) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/sda/code/dataset_ai/dataset_ai/src/datasets/download/streaming_download_manager.py", line 765, in xnumpy_fromfile return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: embedded null byte ```
[ -0.17793172597885132, -0.15880124270915985, -0.05569717288017273, 0.12712755799293518, 0.36935845017433167, -0.17062661051750183, 0.31794315576553345, 0.3332071900367737, 0.26488226652145386, 0.1581835001707077, -0.04350850731134415, 0.40969303250312805, 0.08633576333522797, 0.3399331569671631, 0.11457675695419312, -0.12579527497291565, -0.1291278898715973, 0.2135966420173645, 0.26952293515205383, 0.0920061394572258, -0.4582267999649048, 0.29106199741363525, -0.15148983895778656, 0.23194420337677002, 0.11535000801086426, -0.14217618107795715, 0.19686637818813324, 0.4493582248687744, -0.2380470335483551, -0.27301305532455444, 0.17876353859901428, -0.2360306978225708, 0.30034342408180237, 0.1283111870288849, -0.00010223464050795883, 0.14951181411743164, 0.25511160492897034, -0.0920022651553154, -0.10412002354860306, -0.419685035943985, 0.5573023557662964, -0.13144299387931824, 0.2643290162086487, -0.30971598625183105, -0.20096135139465332, -0.2077960968017578, 0.026092899963259697, -0.13247600197792053, 0.4913041293621063, 0.27381253242492676, 0.21719972789287567, 0.5509709119796753, 0.43281182646751404, -0.2116941213607788, 0.10725995153188705, -0.0631960928440094, -0.10853724181652069, 0.31375643610954285, 0.4199593961238861, -0.08465764671564102, 0.27570268511772156, -0.09330013394355774, -0.2159658521413803, -0.20217415690422058, 0.16206513345241547, 0.024726487696170807, 0.6670992374420166, -0.1832498162984848, -0.28643956780433655, 0.44843536615371704, -0.11688166856765747, -0.0411839485168457, -0.04139627516269684, -0.20383349061012268, -0.2405073046684265, -0.6173346042633057, 0.0642809346318245, 0.1535879373550415, -0.34208759665489197, 0.2667074203491211, 0.2525641620159149, -0.060192182660102844, -0.12065744400024414, 0.27991852164268494, 0.10029730200767517, -0.10147836804389954, -0.1878153532743454, 0.10149780660867691, 0.3808545172214508, 0.0574653334915638, 0.07660270482301712, 0.20305439829826355, 0.20154577493667603, 0.059301845729351044, -0.07734636217355728, 0.19685012102127075, 0.12982270121574402, -0.17535550892353058, -0.03847596049308777, -0.17589980363845825, 0.3307467997074127, 0.05336974933743477, -0.34251534938812256, 0.23301897943019867, -0.04229024052619934, 0.317856103181839, 0.17848600447177887, -0.07463010400533676, 0.0832548439502716, 0.519162654876709, 0.03425052762031555, -0.14061234891414642, -0.29112082719802856, -0.37702298164367676, -0.24768392741680145, 0.20108072459697723, 0.24315530061721802, 0.11872071027755737, -0.23895056545734406, -0.3003348410129547, 0.16785362362861633, 0.05129106342792511, 0.22689618170261383, 0.20876947045326233, 0.2561333179473877, 0.3033464848995209, 0.33553868532180786, 0.07876461744308472, -0.19130544364452362, -0.39063242077827454, -0.13434119522571564, 0.1744059920310974, -0.24920868873596191, -0.23898495733737946, -0.1047743558883667, -0.15414761006832123, 0.3238731622695923, 0.03407764807343483, -0.09069540351629257, -0.18091453611850739, 0.262184739112854, -0.04750198498368263, 0.10615824162960052, 0.016061492264270782, 0.09481452405452728, -0.15898221731185913, 0.5132429599761963, -0.5795819759368896, -0.06862612068653107, 0.2862568497657776, -0.3763435184955597, -0.14202022552490234, -0.1936493068933487, 0.21585215628147125, 0.1851082146167755, 0.22520720958709717, -0.0643167570233345, -0.22686974704265594, 0.0002685748040676117, -0.2975388467311859, 0.07020261138677597, -0.3960443437099457, -0.14174121618270874, -0.3448600471019745, 0.20255881547927856, 0.17915308475494385, -0.1375695765018463, -0.06246519088745117, 0.056566424667835236, -0.3454098701477051, 0.24631504714488983, -0.03193558752536774, -0.28053560853004456, -0.0015139281749725342, -0.20970338582992554, -0.04959319531917572, 0.6083080768585205, -0.5470092296600342, -0.1404537856578827, 0.39451929926872253, -0.28379157185554504, -0.16560348868370056, 0.20787984132766724, 0.2541908025741577, -0.11600425839424133, -0.1459742784500122, 0.12351293861865997, 0.423662006855011, 0.13928183913230896, -0.16920223832130432, -0.20358970761299133, -0.30583539605140686, -0.2042429894208908, 0.24266697466373444, -0.17069654166698456, 0.021521644666790962, 0.15231366455554962, -0.048517610877752304, 0.6023910045623779, -0.2640919089317322, -0.2603972554206848, 0.023031972348690033, 0.13188397884368896, 0.10226289927959442, -0.13586173951625824, -0.131170853972435, 0.025849739089608192, 0.1336078643798828, -0.6103296279907227, -0.31242477893829346, 0.18975397944450378, 0.007811814546585083, -0.031895022839307785, -0.03202781453728676, -0.3838118314743042, -0.09726357460021973, 0.16245101392269135, 0.2112172544002533, 0.12264396250247955, -0.07746481895446777, -0.3067817687988281, 0.22557590901851654, -0.5752643346786499, 0.185513436794281, -0.5080645084381104, 0.14136691391468048, -0.0138405067846179, -0.26749300956726074, -0.23234020173549652, -0.0012589450925588608, 0.2401919662952423, -0.08092042803764343, 0.07279911637306213, 0.3964519798755646, 0.35428905487060547, 0.01563228666782379, -0.34450721740722656, -0.2926371693611145, 0.19022661447525024, 0.1351029872894287, 0.14247387647628784, 0.42357125878334045, -0.03856123983860016, 0.08963646739721298, 0.000057620927691459656, 0.3551836311817169, -0.47521403431892395, -0.06231921166181564, 0.38147324323654175, 0.19716888666152954, 0.1978565901517868, -0.09924746304750443, -0.007767859846353531, 0.04974859952926636, 0.33421286940574646, 0.4071531295776367, 0.20428496599197388, -0.20864291489124298, -0.18664759397506714, -0.2407771348953247, 0.3229544460773468, 0.09730614721775055, 0.1260099709033966, -0.16866694390773773, -0.058529939502477646, 0.11390066146850586, -0.2809091806411743, 0.043084144592285156, 0.011366434395313263, 0.1656685471534729, -0.13938552141189575, 0.17368267476558685, 0.16769151389598846, -0.23414011299610138, 0.051813431084156036, -0.13010689616203308, 0.24413177371025085, 0.21796730160713196, -0.20846952497959137, -0.2167353332042694, -0.10853558778762817, 0.03217196464538574, -0.23123593628406525, 0.032263658940792084, -0.15929965674877167, 0.05005528777837753, -0.1273975670337677, -0.3202100992202759, -0.16036124527454376, -0.0715656653046608, 0.33219510316848755, 0.0336516872048378, -0.25482261180877686, 0.21137194335460663, 0.13697002828121185, -0.046112194657325745, 0.011093996465206146, -0.3119087815284729, 0.09630110114812851, -0.4849742352962494, 0.1926461160182953, 0.16140857338905334, -0.18762366473674774, 0.13829372823238373, 0.2422204464673996, -0.0298178531229496, 0.024595478549599648, -0.2917923331260681, -0.1954127550125122, 0.005427191033959389, -0.04498746246099472, 0.1200321614742279, 0.20907153189182281, 0.24787499010562897, 0.19184660911560059, 0.004726465791463852, -0.22632962465286255, -0.08305974304676056, 0.1780305802822113, -0.43856358528137207, -0.09090320765972137, 0.10164818167686462, 0.050149474292993546, -0.023792890831828117, -0.1770325005054474, -0.35804763436317444, -0.3905452787876129, -0.5255942940711975, 0.3343174457550049, 0.39167433977127075, 0.17071294784545898, 0.3251967132091522, 0.07246316224336624, 0.26919305324554443, 0.16369077563285828, 0.025443334132432938, 0.11664039641618729, -0.16547971963882446, 0.1278609037399292, -0.253319650888443, -0.27915289998054504, -0.056844767183065414, 0.03503798693418503, -0.19225622713565826, 0.009336616843938828, -0.05711446329951286, -0.4918099343776703, 0.15484458208084106, 0.26688286662101746, 0.05512958765029907, 0.1030053049325943, 0.4054703116416931, 0.13293565809726715, -0.14342236518859863, -0.011798098683357239, 0.11136656999588013, 0.32684364914894104, -0.018923325464129448, 0.011626124382019043, 0.4046143889427185, 0.31188294291496277, -0.007161937654018402, 0.10838223993778229, 0.3209652304649353, -0.014667626470327377, 0.5507137179374695, -0.08446038514375687, 0.34821996092796326, -0.19884397089481354, -0.09537924826145172, -0.28029924631118774, -0.05189526081085205, -0.11334320902824402, 0.07123943418264389, -0.050129324197769165, 0.0775327980518341, -0.38134729862213135, -0.3082020580768585, -0.2793189287185669, 0.007565245032310486, -0.22993265092372894, 0.401363730430603, 0.1600918173789978, -0.37700361013412476, 0.12381445616483688, 0.005258936434984207, 0.09371835738420486, 0.12286164611577988, 0.2419227957725525, 0.2923811376094818, 0.007066961377859116, -0.31339478492736816, -0.11844173073768616, -0.10492405295372009, 0.3330603539943695, -0.022483527660369873, -0.058926910161972046, 0.06213440001010895, -0.23572155833244324, 0.10236905515193939, -0.1786496341228485, 0.43102577328681946, 0.3813733160495758, 0.15543676912784576, 0.2824917733669281, -0.19534248113632202, -0.38842278718948364, -0.04770251736044884, -0.07161150872707367, 0.07451409846544266, 0.26274165511131287, 0.34377846121788025, -0.16169244050979614, 0.10827314853668213, 0.0983874499797821, 0.33195123076438904, -0.1095246821641922, -0.007057391107082367, -0.3217768669128418, -0.33553850650787354, -0.22284752130508423, -0.19978290796279907, 0.014134034514427185, 0.40090101957321167, 0.04264979809522629, 0.20483513176441193, 0.11523974686861038, -0.10546933114528656, -0.0015389062464237213, -0.16419333219528198, 0.5238053202629089, -0.1333312690258026, -0.23581819236278534, 0.0157820712774992, 0.3004288971424103, -0.14917109906673431, 0.4085143804550171, -0.16369953751564026, -0.3256951570510864, -0.04598696529865265, -0.01599523425102234, -0.019422397017478943, 0.18935555219650269, -0.024980029091238976, -0.074813112616539, 0.04000503569841385, -0.03513849899172783, 0.36482957005500793, -0.01177675649523735, 0.2603280544281006, -0.11701460927724838, 0.20770356059074402, -0.3484600782394409, 0.47743844985961914, 0.05948902666568756, 0.1667812168598175, 0.28489625453948975, -0.046615712344646454, -0.1969514936208725, 0.14558805525302887, 0.05898671597242355, 0.5934922695159912, -0.029864680022001266, -0.0073331790044903755, 0.6051344871520996, 0.03721719980239868, 0.24727162718772888, -0.25942373275756836, 0.19127939641475677, -0.4065625071525574, -0.21806345880031586, -0.028920531272888184, -0.3164665102958679, 0.13568679988384247, 0.03208796679973602, -0.14020246267318726, 0.265961229801178, -0.3941226005554199, -0.09044710546731949, 0.0263131782412529, 0.22932939231395721, 0.008379893377423286, 0.09866015613079071, -0.40682798624038696, 0.0546342097222805, -0.021191101521253586, 0.013672498986124992, -0.06272734701633453, -0.3343020975589752, 0.07827229797840118, -0.06258079409599304, 0.20130670070648193, 0.18001732230186462, -0.30016860365867615, 0.19741696119308472, 0.06982181966304779, -0.21560344099998474, -0.3801981806755066, 0.5649957060813904, 0.3375896215438843, -0.10242283344268799, 0.020109063014388084, -0.013865494169294834, 0.002548675984144211, -0.3058716952800751, 0.013076059520244598, 0.19428278505802155, 0.5013838410377502, -0.19969478249549866, -0.008630350232124329, 0.34943440556526184, -0.028247013688087463, -0.32091987133026123, -0.11653155088424683, -0.13465501368045807, 0.08135263621807098, -0.15175780653953552, -0.24045425653457642, -0.08764784038066864, -0.18936559557914734, -0.2002497911453247, 0.16990257799625397, -0.020763084292411804, -0.19015176594257355, -0.091011181473732, -0.045567821711301804, -0.11433430016040802, 0.04761715233325958, -0.049512218683958054, -0.036474429070949554, 0.1828930377960205, 0.34517329931259155, 0.2848605513572693, -0.14555495977401733, -0.16589272022247314, -0.016656406223773956, -0.022826462984085083, 0.055318593978881836, 0.3532012104988098, 0.31139612197875977, 0.281380832195282, 0.03507448360323906, 0.25412213802337646, 0.09137687087059021, 0.1446179300546646, -0.08560238033533096, -0.2027968168258667, -0.3206574320793152, 0.03653678297996521, -0.04710749536752701, -0.03979703038930893, 0.35577595233917236, 0.14083799719810486, 0.08524150401353836, -0.2569182217121124, -0.3384056091308594, 0.24378767609596252, -0.018986668437719345, -0.16379958391189575, 0.4085610508918762, -0.18763932585716248, -0.0952555239200592, 0.2426835298538208, 0.25983649492263794, -0.18598052859306335, -0.21354010701179504, -0.22461500763893127, -0.07231815904378891, 0.06533090770244598, -0.09367042779922485, -0.25531843304634094, 0.2546628713607788, -0.43627482652664185, -0.23880308866500854, -0.11214929074048996, 0.06076483428478241, 0.02670038491487503, -0.04460429400205612, 0.26465293765068054, 0.1191219836473465, 0.236186683177948, -0.12531767785549164, 0.3446555733680725, -0.3337306082248688, 0.16332927346229553, -0.2247311919927597, -0.036169975996017456, -0.02964639663696289, -0.09476593881845474, -0.5129696726799011, -0.09875135123729706, 0.18602769076824188, -0.08531935513019562, 0.38745588064193726, -0.09229940176010132, -0.16837593913078308, -0.16987541317939758, 0.28911346197128296, 0.13870859146118164, -0.2153160274028778, 0.3822225332260132, 0.013618439435958862, 0.27204179763793945, -0.361816942691803, 0.16025662422180176, 0.03915109112858772, -0.15210631489753723, 0.08665917813777924, 0.17254972457885742, 0.09911875426769257, -0.341788649559021, 0.20571765303611755, 0.09607633948326111, 0.24726465344429016, -0.2656354010105133, -0.12816131114959717, 0.6889211535453796, 0.1687089204788208, -0.1431271731853485, 0.08528097718954086, 0.07853126525878906, 0.335976243019104, 0.35549232363700867, -0.42238447070121765, -0.05185813456773758, 0.013680996373295784, -0.0024069789797067642, -0.05663452669978142, -0.16437000036239624, -0.02138175442814827, 0.2622295618057251, -0.1873880922794342, -0.1721307337284088, -0.1873750537633896, 0.2522646188735962, -0.22492079436779022, 0.4340990483760834, -0.20988212525844574, 0.39362770318984985, -0.08456988632678986, -0.14200621843338013, -0.21168985962867737, -0.26911941170692444, 0.003974393010139465, 0.011493772268295288, 0.08453148603439331, 0.06009027361869812, -0.460464745759964, 0.21548248827457428, -0.14361995458602905, 0.16445758938789368, 0.15575635433197021, -0.02946038916707039, 0.027833180502057076, -0.33022341132164, 0.08279909938573837, 0.2952633202075958, 0.386748731136322, -0.05103762447834015, 0.07460395991802216, 0.37763169407844543, 0.3395847678184509, -0.27781665325164795, -0.25091224908828735, -0.02777162380516529, -0.10259711742401123, -0.016649968922138214, -0.15488432347774506, 0.15769831836223602, 0.3974829912185669, 0.30693143606185913, 0.23214402794837952, -0.2775309085845947, -0.03298060595989227, -0.13995742797851562, 0.19580085575580597, -0.2012869268655777, 0.47412243485450745, 0.07461026310920715, -0.2701053023338318, -0.28366202116012573, -0.07438191771507263, -0.4485670328140259, 0.28675809502601624, 0.13793939352035522, 0.2866939306259155, 0.13875867426395416, 0.1890069544315338, 0.14344368875026703, -0.21314163506031036, -0.2180728018283844, 0.1520557403564453, -0.008898714557290077, -0.14735011756420135, -0.06316260248422623, -0.46298760175704956, 0.24532777070999146, 0.3583851754665375, -0.6251113414764404, -0.03208398446440697, -0.04353739321231842, 0.16535837948322296, -0.04440082237124443, -0.014278769493103027, -0.18703646957874298, 0.33457380533218384, 0.07790765911340714, 0.002504117786884308, 0.020631683990359306, 0.14747227728366852, 0.05995707958936691, -0.05169760435819626, -0.4274790287017822, 0.03165988624095917, -0.07174646854400635, 0.16454234719276428, -0.30708858370780945, 0.06922218948602676, 0.07759158313274384, 0.30569958686828613, 0.25510960817337036, 0.08082249015569687, 0.01894013211131096, -0.11268550157546997, -0.023539312183856964, 0.09874340891838074, 0.15902678668498993, -0.23316648602485657, 0.022645635530352592, -0.1863987296819687, 0.16384455561637878, -0.12545154988765717, -0.15150800347328186, -0.5044673681259155, 0.26913517713546753, -0.18853086233139038, -0.03804877772927284, -0.3254348635673523, -0.15885378420352936, -0.14111122488975525, -0.17642085254192352, 0.2813575267791748, 0.11981354653835297, 0.049721427261829376, -0.02541784942150116, -0.3050187826156616, -0.08578585088253021, 0.17071619629859924, -0.10412261635065079, -0.07138782739639282, -0.050647057592868805, 0.14750584959983826, -0.1497892290353775, 0.08364573866128922, 0.09775520861148834, 0.25072258710861206, 0.46711111068725586, 0.04955516755580902, 0.02232331782579422, 0.09893965721130371, -0.3244880139827728, 0.17379719018936157, 0.031207643449306488, -0.259377658367157, 0.18543781340122223, -0.055893853306770325, -0.4065796136856079, -0.22621911764144897 ]
https://github.com/huggingface/datasets/issues/6584
I used this method to read point cloud data in the script ```python with open(velodyne_filepath,"rb") as obj: velodyne_data = numpy.frombuffer(obj.read(), dtype=numpy.float32).reshape([-1, 4]) ```
np.fromfile not supported
How to do np.fromfile to use it like np.load ```python def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs): import numpy as np if hasattr(filepath_or_buffer, "read"): return np.fromfile(filepath_or_buffer, *args, **kwargs) else: filepath_or_buffer = str(filepath_or_buffer) return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ``` this is not work
23
np.fromfile not supported How to do np.fromfile to use it like np.load ```python def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs): import numpy as np if hasattr(filepath_or_buffer, "read"): return np.fromfile(filepath_or_buffer, *args, **kwargs) else: filepath_or_buffer = str(filepath_or_buffer) return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs) ``` this is not work I used this method to read point cloud data in the script ```python with open(velodyne_filepath,"rb") as obj: velodyne_data = numpy.frombuffer(obj.read(), dtype=numpy.float32).reshape([-1, 4]) ```
[ -0.26546746492385864, -0.19931796193122864, -0.07483597099781036, 0.15513744950294495, 0.2779790163040161, -0.2699272930622101, 0.21601557731628418, 0.22307102382183075, 0.18922102451324463, 0.20724502205848694, 0.07521598786115646, 0.3033961057662964, 0.22715897858142853, 0.43538713455200195, 0.26911595463752747, -0.14375469088554382, -0.06807918101549149, 0.08431855589151382, 0.052878350019454956, 0.035888671875, -0.37577369809150696, 0.323514461517334, -0.14866909384727478, 0.13237228989601135, 0.13445866107940674, -0.18322701752185822, 0.1959649622440338, 0.43219903111457825, -0.13340625166893005, -0.19001054763793945, 0.20535704493522644, -0.24196183681488037, 0.20488294959068298, 0.24474504590034485, -0.00010891222336795181, 0.09626561403274536, 0.1775851845741272, -0.1528681218624115, -0.1628773808479309, -0.2409006506204605, 0.4450203776359558, -0.08633096516132355, 0.216374933719635, -0.4087597727775574, -0.24801968038082123, -0.06126442551612854, -0.0061818016692996025, -0.21908265352249146, 0.45087265968322754, 0.28436028957366943, 0.14892500638961792, 0.453052818775177, 0.3770756125450134, 0.03834345191717148, -0.04240153729915619, -0.011329900473356247, -0.1569978892803192, 0.2819691300392151, 0.5050457715988159, 0.07292735576629639, 0.2645619511604309, -0.07636088132858276, -0.35036131739616394, -0.22358232736587524, 0.3492504358291626, 0.11415879428386688, 0.5681220889091492, -0.23590895533561707, -0.32071205973625183, 0.4746730327606201, 0.1257944256067276, 0.080701544880867, -0.101342111825943, -0.03622075915336609, -0.21638371050357819, -0.36993932723999023, -0.10578663647174835, 0.239216148853302, -0.30793696641921997, 0.22246196866035461, 0.17681914567947388, -0.030639061704277992, -0.2082318365573883, 0.4509415626525879, 0.07920601963996887, 0.016861148178577423, -0.17301955819129944, 0.10761009156703949, 0.2501479983329773, 0.00964571163058281, 0.060099486261606216, 0.1664908528327942, 0.16350378096103668, 0.04851894453167915, -0.005299756303429604, 0.1319010853767395, -0.0578589029610157, -0.200669065117836, 0.08217998594045639, -0.07994034141302109, 0.7466168403625488, 0.1485716998577118, -0.28956174850463867, 0.3400097191333771, 0.14850297570228577, 0.17685775458812714, 0.0612868033349514, -0.1212419718503952, 0.3461947739124298, 0.5734533667564392, 0.25580185651779175, -0.1788904368877411, -0.22595322132110596, -0.23446330428123474, -0.09320338070392609, 0.317087858915329, 0.44200757145881653, 0.020716533064842224, -0.13733991980552673, -0.239386647939682, 0.4153718054294586, 0.12385368347167969, 0.2973354756832123, 0.17388927936553955, 0.11575475335121155, 0.38134765625, 0.2945275902748108, 0.09704574197530746, -0.2133275717496872, -0.40199682116508484, -0.07167254388332367, 0.1731773316860199, -0.05444367974996567, -0.13300037384033203, 0.08625528216362, 0.0036520734429359436, 0.3598964810371399, -0.038986071944236755, 0.09308925271034241, -0.2678678631782532, 0.22173310816287994, -0.1509189009666443, 0.20680131018161774, 0.039359770715236664, 0.20394745469093323, -0.2423972189426422, 0.294408917427063, -0.29293376207351685, -0.055360548198223114, 0.29290470480918884, -0.6260541677474976, -0.18524520099163055, -0.21707291901111603, 0.15481625497341156, 0.25130048394203186, 0.13885411620140076, -0.52712482213974, -0.40666663646698, -0.043121930211782455, -0.44824275374412537, 0.027995241805911064, -0.24974265694618225, -0.1798294633626938, -0.3551468551158905, 0.13165482878684998, 0.11529156565666199, -0.18041962385177612, 0.1401437222957611, 0.04329776018857956, -0.18384051322937012, 0.3045192062854767, -0.099378302693367, -0.19566132128238678, -0.2680472433567047, -0.2941347360610962, 0.03871588408946991, 0.5166333317756653, -0.680370032787323, -0.017775092273950577, 0.5191072225570679, -0.2244163304567337, -0.35039693117141724, 0.23545466363430023, 0.3001861572265625, -0.13132841885089874, -0.15178313851356506, 0.1327504813671112, 0.4430803656578064, 0.2158738374710083, -0.009283848106861115, -0.004451826214790344, -0.2226639688014984, -0.3679255247116089, 0.24467168748378754, -0.3249710500240326, 0.07349585741758347, 0.22806251049041748, -0.20989137887954712, 0.53314608335495, -0.24471427500247955, -0.08189220726490021, 0.2192976474761963, 0.1841782033443451, -0.13294367492198944, -0.07139720022678375, -0.15764476358890533, -0.17990805208683014, 0.09706149995326996, -0.4800347685813904, -0.3473232388496399, 0.07535035908222198, -0.07346126437187195, 0.015310186892747879, -0.05870674550533295, -0.1639823019504547, 0.017473284155130386, 0.10751419514417648, 0.037713099271059036, 0.14166313409805298, -0.2564381957054138, -0.34956076741218567, -0.01210886798799038, -0.3823791742324829, 0.16685381531715393, -0.4069750905036926, 0.23116686940193176, -0.047034911811351776, -0.3086971044540405, -0.09893807023763657, 0.01772565022110939, 0.42632392048835754, -0.12559953331947327, -0.03060624748468399, 0.40449681878089905, 0.33511286973953247, 0.10051029920578003, -0.3393191993236542, 0.17481128871440887, 0.17862336337566376, 0.17504127323627472, 0.12248092144727707, 0.3629966676235199, 0.028832513839006424, -0.0026389434933662415, -0.042694613337516785, 0.5198348164558411, -0.5507766008377075, -0.036319803446531296, 0.3580939471721649, 0.1776040494441986, 0.1959986537694931, -0.12467484921216965, 0.023181453347206116, -0.1071229875087738, 0.15335611999034882, 0.16553722321987152, 0.05844560265541077, -0.3011470139026642, -0.2127726674079895, -0.24178054928779602, 0.16380856931209564, -0.11622500419616699, 0.16788826882839203, -0.22428424656391144, -0.1346018761396408, 0.056024931371212006, -0.053457699716091156, -0.030297808349132538, 0.08842697739601135, 0.18642066419124603, -0.14175960421562195, 0.12313137948513031, 0.4089583158493042, -0.27550747990608215, 0.03914767503738403, -0.08512033522129059, 0.22482457756996155, 0.205889493227005, -0.21872560679912567, -0.1936292201280594, -0.12383616715669632, -0.08442334830760956, -0.25525516271591187, -0.07035987079143524, -0.19301852583885193, 0.049531176686286926, -0.09247379750013351, -0.4499662220478058, -0.14221549034118652, 0.22645437717437744, 0.37345924973487854, -0.1027679294347763, -0.3028831481933594, 0.5073546171188354, 0.13490962982177734, -0.2796339988708496, 0.07035806775093079, -0.0716044008731842, 0.22534900903701782, -0.5209082961082458, -0.18035303056240082, 0.14996406435966492, -0.14234936237335205, 0.10437898337841034, 0.07579594105482101, 0.1097354143857956, -0.051683999598026276, -0.25265124440193176, -0.03945831209421158, -0.24469465017318726, 0.08773067593574524, 0.18405839800834656, 0.21685075759887695, 0.49996131658554077, 0.16016703844070435, 0.15638643503189087, -0.2538023889064789, 0.024713188409805298, 0.07846046984195709, -0.5074639916419983, -0.12011846899986267, 0.15883027017116547, -0.14868399500846863, -0.1542847454547882, -0.14621125161647797, -0.1903148889541626, -0.3847699463367462, -0.37897711992263794, 0.09784571826457977, 0.3560131788253784, 0.23542693257331848, 0.10670644044876099, -0.004464946687221527, 0.1434135138988495, 0.36096644401550293, 0.03070048987865448, 0.08300506323575974, -0.2734803855419159, 0.18088504672050476, -0.3310181498527527, -0.39075320959091187, 0.07739429175853729, 0.07782943546772003, -0.020941516384482384, -0.009938068687915802, -0.1488022357225418, -0.6850120425224304, 0.01992584951221943, 0.4037059247493744, -0.06692539155483246, 0.1005530133843422, 0.42877086997032166, 0.0004537925124168396, -0.10924480855464935, -0.08239061385393143, 0.13593991100788116, 0.08914276957511902, 0.32848483324050903, 0.0007528625428676605, 0.4041387140750885, 0.10343562066555023, -0.03165026009082794, -0.06272141635417938, 0.1594822108745575, -0.1222139224410057, 0.5661975741386414, -0.32952648401260376, -0.003487236797809601, -0.17196772992610931, 0.003471851348876953, -0.10514991730451584, -0.18174020946025848, -0.1335451453924179, -0.018653683364391327, -0.0012648198753595352, 0.11289381980895996, -0.44251590967178345, -0.35863834619522095, -0.48949432373046875, -0.022565528750419617, -0.27196550369262695, 0.46014273166656494, 0.204166978597641, -0.28889942169189453, 0.10157501697540283, -0.025754403322935104, -0.12163745611906052, 0.040045369416475296, 0.26063403487205505, 0.31482744216918945, -0.004101000726222992, -0.04485375061631203, -0.13311168551445007, -0.22923380136489868, 0.4939444065093994, -0.05155419185757637, -0.12199211120605469, 0.04675087332725525, -0.03744448348879814, 0.10564365983009338, -0.2650052309036255, 0.46784263849258423, 0.18776045739650726, 0.2537241578102112, 0.1204816997051239, -0.1372065544128418, -0.324761301279068, 0.02365073561668396, -0.11069627851247787, -0.12628096342086792, 0.28580281138420105, 0.4510369300842285, -0.10791211575269699, 0.03702830150723457, 0.05431168153882027, 0.3244098722934723, -0.12346912175416946, 0.15757112205028534, -0.23092003166675568, -0.46823596954345703, -0.2297275960445404, -0.21702687442302704, 0.06931019574403763, 0.36676469445228577, 0.12291155010461807, -0.033915597945451736, 0.1580430120229721, -0.08074251562356949, -0.09841905534267426, -0.11644881963729858, 0.4655033051967621, -0.22316795587539673, -0.29714053869247437, 0.10773637890815735, 0.3522282838821411, 0.20742788910865784, 0.4629148244857788, 0.38699495792388916, -0.005059625953435898, 0.056694455444812775, -0.03184074908494949, -0.015427462756633759, 0.14539992809295654, -0.08185724914073944, -0.20184382796287537, 0.058172501623630524, 0.13960136473178864, 0.2656700313091278, -0.06785662472248077, 0.11220064759254456, -0.07902209460735321, 0.12129529565572739, -0.35836851596832275, 0.3639809787273407, 0.18780472874641418, 0.1209162175655365, 0.03138912469148636, -0.10939909517765045, -0.17280498147010803, 0.45332661271095276, 0.19820931553840637, 0.656170666217804, 0.027672331780195236, -0.0021610725671052933, 0.6561883687973022, 0.19518838822841644, 0.09565231204032898, -0.5075036883354187, 0.1984119564294815, -0.32743293046951294, -0.08893914520740509, -0.1948167383670807, -0.23308907449245453, 0.17622441053390503, 0.19546130299568176, -0.280650794506073, 0.3953736126422882, -0.3501790165901184, -0.21979503333568573, -0.1778540015220642, 0.2369270920753479, -0.0872369259595871, -0.05491184443235397, -0.1298656463623047, 0.011674679815769196, -0.14271658658981323, 0.07754272222518921, -0.002078048884868622, -0.281934916973114, -0.02285180240869522, -0.15839064121246338, 0.2183845490217209, 0.20504575967788696, -0.22260409593582153, 0.26690077781677246, -0.2009091079235077, -0.11672322452068329, -0.49620112776756287, 0.6723939180374146, 0.29481956362724304, -0.09196151793003082, -0.07974488288164139, 0.08378106355667114, 0.13418550789356232, -0.2444887012243271, -0.10864827036857605, 0.031593527644872665, 0.2736097276210785, -0.28187626600265503, -0.10713185369968414, 0.09958784282207489, -0.008992336690425873, -0.33443135023117065, -0.16081379354000092, -0.15327931940555573, -0.06664514541625977, -0.19630089402198792, -0.24341709911823273, -0.09104195982217789, -0.3576379716396332, -0.12852506339550018, 0.12608596682548523, -0.00560370460152626, -0.18307608366012573, -0.14295797049999237, 0.3956573009490967, -0.007008589804172516, 0.03763116896152496, 0.25583547353744507, 0.03946531563997269, -0.03549093380570412, 0.24095962941646576, 0.08799004554748535, -0.04110873118042946, -0.2153070569038391, 0.07050032913684845, 0.03415866196155548, 0.009237810969352722, 0.252244770526886, 0.4386003017425537, 0.252199649810791, 0.21661052107810974, 0.462119460105896, 0.019978245720267296, 0.29946190118789673, -0.11423581838607788, -0.4455297887325287, -0.17901074886322021, 0.15856775641441345, 0.08851780742406845, -0.06635027378797531, 0.4445619583129883, -0.010577904060482979, -0.10548371076583862, -0.24503383040428162, -0.29089677333831787, 0.20592889189720154, -0.00958484411239624, -0.16407938301563263, 0.5768635869026184, -0.13253670930862427, -0.12850266695022583, 0.1627444475889206, 0.19673962891101837, -0.140711709856987, -0.11191496253013611, -0.16056516766548157, -0.06883492320775986, 0.11421684920787811, -0.0592644102871418, -0.25470635294914246, 0.027906130999326706, -0.39537274837493896, -0.3457571268081665, -0.10037735104560852, 0.17097406089305878, -0.019595623016357422, -0.02489718422293663, 0.2554399371147156, -0.00942782498896122, 0.26532143354415894, -0.2613362967967987, 0.3536728620529175, -0.35523778200149536, 0.18620096147060394, -0.32984209060668945, -0.01345716044306755, -0.003862142562866211, -0.12865446507930756, -0.36204105615615845, -0.14925798773765564, 0.20529843866825104, -0.0599246546626091, 0.5130007266998291, -0.09716528654098511, -0.15921062231063843, -0.32558169960975647, 0.23850597441196442, 0.10403521358966827, -0.18411216139793396, 0.32041600346565247, -0.06861941516399384, 0.23509731888771057, -0.2462814450263977, 0.03490332141518593, 0.0015042442828416824, -0.05965384840965271, 0.11437900364398956, 0.20189169049263, 0.20940923690795898, -0.2049885094165802, 0.03462895005941391, -0.010693259537220001, 0.3378753364086151, -0.32330575585365295, -0.11591547727584839, 0.5376895666122437, 0.12504002451896667, -0.10444603860378265, 0.020755546167492867, 0.10019834339618683, 0.3018823564052582, 0.5084912776947021, -0.36540693044662476, 0.07075349986553192, 0.2903735339641571, 0.2598414421081543, -0.1315014362335205, -0.18510478734970093, 0.09102697670459747, 0.14053218066692352, -0.2540823519229889, -0.029498301446437836, -0.046827465295791626, 0.04402836784720421, -0.19252434372901917, 0.3532586395740509, -0.33795297145843506, 0.44157060980796814, -0.09025144577026367, -0.08346040546894073, -0.506597101688385, -0.14648883044719696, 0.17531755566596985, -0.06631018221378326, 0.12208519130945206, 0.07014110684394836, -0.4592408239841461, 0.32974106073379517, -0.12182766199111938, 0.25087064504623413, 0.060612112283706665, 0.015269646421074867, 0.1983422040939331, -0.16452249884605408, -0.0007612742483615875, 0.23819293081760406, 0.5214352011680603, -0.031605254858732224, -0.020603353157639503, 0.39519667625427246, 0.3484560549259186, -0.14474913477897644, -0.028455043211579323, 0.01258944347500801, -0.2245146632194519, -0.015219669789075851, -0.19171705842018127, 0.2617094814777374, 0.4211971163749695, 0.35294830799102783, 0.21108373999595642, -0.12762093544006348, 0.11951850354671478, -0.20365218818187714, 0.37503665685653687, -0.1602090299129486, 0.25860920548439026, 0.0656353235244751, -0.27140143513679504, -0.40539538860321045, -0.22006399929523468, -0.3612903952598572, 0.24878135323524475, 0.15052418410778046, 0.15576408803462982, 0.19242671132087708, 0.30322781205177307, 0.08101917058229446, -0.15440954267978668, -0.15543928742408752, 0.17370925843715668, -0.09513199329376221, -0.1657179892063141, -0.03174564242362976, -0.32538294792175293, 0.1089971587061882, 0.40141651034355164, -0.5643208026885986, -0.0653034895658493, -0.06128763407468796, 0.055763255804777145, 0.06900723278522491, -0.12535637617111206, -0.3142315745353699, 0.40196692943573, 0.3554381728172302, -0.031495414674282074, -0.1223829984664917, 0.03703634440898895, 0.22308975458145142, -0.03184571862220764, -0.4678541421890259, -0.016567613929510117, 0.07607507705688477, 0.10042930394411087, -0.2748074233531952, 0.025545969605445862, -0.046859752386808395, 0.2874101996421814, 0.24773649871349335, 0.0835631713271141, 0.2162768393754959, -0.2320203185081482, 0.12645083665847778, 0.08433645218610764, -0.010562965646386147, -0.15639647841453552, 0.061888813972473145, -0.16210946440696716, 0.16667631268501282, 0.10382385551929474, -0.10949592292308807, -0.5155984163284302, 0.14035044610500336, -0.40139472484588623, -0.13422703742980957, -0.15801411867141724, -0.028716765344142914, -0.2701391577720642, -0.13934877514839172, 0.13484904170036316, 0.048077937215566635, 0.03143104910850525, -0.13986733555793762, -0.11665869504213333, -0.17814192175865173, 0.3199712932109833, -0.08957800269126892, 0.08359207957983017, 0.06421223282814026, 0.15047648549079895, -0.358960896730423, -0.026409339159727097, 0.19777008891105652, 0.25858262181282043, 0.31449735164642334, 0.04161693900823593, 0.03140933811664581, 0.10488535463809967, -0.2864397168159485, 0.0038055330514907837, -0.0038380324840545654, 0.018433256074786186, 0.2405998557806015, -0.2005312293767929, -0.49389514327049255, -0.265735924243927 ]
https://github.com/huggingface/datasets/issues/6579
Hi @haok1402, I have created an issue in the Discussion tab of the corresponding dataset: https://huggingface.co/datasets/eli5/discussions/7 Let's continue the discussion there!
Unable to load `eli5` dataset with streaming
### Describe the bug Unable to load `eli5` dataset with streaming. ### Steps to reproduce the bug This fails with FileNotFoundError: https://files.pushshift.io/reddit/submissions ``` from datasets import load_dataset load_dataset("eli5", streaming=True) ``` This works correctly. ``` from datasets import load_dataset load_dataset("eli5") ``` ### Expected behavior - Loading `eli5` dataset should not raise an error under the streaming mode. - Or at the very least, show a warning that streaming mode is not supported with `eli5` dataset. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.2.0-39-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.6.0
21
Unable to load `eli5` dataset with streaming ### Describe the bug Unable to load `eli5` dataset with streaming. ### Steps to reproduce the bug This fails with FileNotFoundError: https://files.pushshift.io/reddit/submissions ``` from datasets import load_dataset load_dataset("eli5", streaming=True) ``` This works correctly. ``` from datasets import load_dataset load_dataset("eli5") ``` ### Expected behavior - Loading `eli5` dataset should not raise an error under the streaming mode. - Or at the very least, show a warning that streaming mode is not supported with `eli5` dataset. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.2.0-39-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.6.0 Hi @haok1402, I have created an issue in the Discussion tab of the corresponding dataset: https://huggingface.co/datasets/eli5/discussions/7 Let's continue the discussion there!
[ -0.3034294843673706, -0.37919026613235474, 0.0074720680713653564, 0.35745134949684143, 0.3565647602081299, -0.05574629455804825, 0.20355500280857086, 0.06192155182361603, 0.0340673103928566, 0.1009824275970459, -0.22593586146831512, 0.18525493144989014, 0.04847179725766182, 0.3414548337459564, 0.04651985317468643, -0.0871707946062088, 0.17384453117847443, 0.07062694430351257, -0.12542176246643066, 0.060710176825523376, 0.010979920625686646, 0.005735715851187706, -0.22949263453483582, -0.10699515044689178, -0.15859480202198029, 0.23986469209194183, -0.0038858577609062195, 0.3995707631111145, -0.2897292673587799, -0.178878515958786, 0.2816711366176605, 0.1206703707575798, 0.29406553506851196, 0.39182406663894653, -0.00011336134048178792, 0.14824515581130981, 0.4644579589366913, -0.19557785987854004, -0.22858336567878723, -0.4194473624229431, 0.0016756132245063782, -0.014226194471120834, 0.23251983523368835, 0.016643226146697998, -0.1023687869310379, -0.04633717238903046, 0.18986037373542786, -0.004772469401359558, 0.6474074721336365, 0.1131286770105362, 0.21177938580513, 0.32296448945999146, 0.1193036288022995, -0.033186398446559906, 0.004915529862046242, -0.028756026178598404, -0.1626887321472168, 0.10263973474502563, 0.06403274834156036, 0.10555275529623032, -0.056062981486320496, 0.2424221932888031, -0.11523889005184174, -0.01210988499224186, 0.5077376961708069, 0.01579856127500534, -0.2756880521774292, -0.2713199853897095, -0.03443553298711777, 0.36769619584083557, 0.5924935340881348, -0.1489214301109314, -0.4117317497730255, -0.20502963662147522, -0.015582025051116943, -0.30661144852638245, 0.31127676367759705, -0.09017626941204071, -0.056134551763534546, 0.16288504004478455, 0.10780996829271317, -0.1282055377960205, -0.27795112133026123, 0.11015325784683228, 0.024312905967235565, 0.15306305885314941, -0.17195554077625275, -0.03449418768286705, -0.02532562054693699, -0.13353824615478516, -0.10148641467094421, -0.13475126028060913, -0.3042074739933014, 0.13093191385269165, -0.36690303683280945, 0.24786047637462616, 0.1889471411705017, 0.32003188133239746, 0.28620702028274536, 0.267807275056839, 0.07798875868320465, 0.0531129390001297, -0.26474881172180176, 0.1233709305524826, 0.25458428263664246, 0.15501508116722107, 0.19067266583442688, -0.06648075580596924, 0.1727742850780487, 0.45515668392181396, -0.1440957635641098, -0.3547530472278595, -0.017576146870851517, -0.022711722180247307, -0.3502625524997711, -0.3198820650577545, 0.3932309150695801, -0.4045545756816864, -0.5150323510169983, 0.13991433382034302, -0.34588342905044556, 0.0615864172577858, 0.1776261180639267, 0.48475149273872375, -0.17257478833198547, 0.2544748783111572, 0.024761095643043518, 0.34542030096054077, -0.12776124477386475, -0.12065380811691284, -0.2801695168018341, -0.0645308792591095, -0.08609028905630112, 0.0007374435663223267, 0.08462360501289368, -0.551811695098877, 0.3983936905860901, 0.058449652045965195, 0.48875606060028076, 0.07921719551086426, -0.3093852400779724, -0.014881633222103119, -0.20882382988929749, 0.2827589213848114, -0.0016243904829025269, 0.12742871046066284, 0.20302288234233856, -0.046917181462049484, 0.09761859476566315, 0.03294525295495987, 0.15178251266479492, -0.2879399061203003, -0.02680910751223564, 0.16247870028018951, -0.3946671485900879, -0.047418657690286636, -0.36319392919540405, 0.2532098591327667, -0.3575736880302429, -0.33394792675971985, -0.10595957934856415, 0.04187639057636261, -0.15527021884918213, -0.11064240336418152, 0.49982476234436035, 0.520005464553833, 0.04429060220718384, -0.2254820168018341, -0.18478086590766907, -0.17317096889019012, 0.21800917387008667, 0.2567920684814453, -0.113367460668087, -0.32319071888923645, -0.11487461626529694, 0.2973101735115051, 0.36679261922836304, -0.2610388994216919, -0.6415413618087769, 0.20476184785366058, -0.1139429584145546, 0.4550272822380066, 0.25094661116600037, -0.019200418144464493, 0.047773104161024094, -0.16298328340053558, 0.13386288285255432, 0.2738981246948242, -0.004812288098037243, -0.1492805927991867, -0.3575519323348999, -0.2662699520587921, -0.012843318283557892, 0.16925881803035736, -0.053885601460933685, 0.04146471247076988, 0.07111654430627823, 0.07123735547065735, 0.1510302722454071, -0.04328615218400955, -0.11160112917423248, 0.045448265969753265, 0.4298023581504822, 0.31652742624282837, -0.12230269610881805, -0.22768566012382507, -0.44775301218032837, 0.31284099817276, 0.2565295994281769, 0.037517987191677094, -0.09056665003299713, -0.09972474724054337, -0.20113146305084229, -0.02173348143696785, -0.21664315462112427, -0.37185031175613403, 0.11867252737283707, -0.09416776150465012, -0.07898876070976257, 0.1660584956407547, -0.40320277214050293, 0.5581983923912048, -0.3892466425895691, 0.17247793078422546, -0.24780818819999695, 0.44186657667160034, -0.041016045957803726, -0.2742414176464081, 0.03841986507177353, -0.0895967185497284, 0.06542212516069412, -0.05233003944158554, -0.13289260864257812, 0.33730170130729675, -0.3090935945510864, 0.24299666285514832, -0.1332109272480011, 0.14380061626434326, 0.18552212417125702, -0.37933361530303955, 0.05065616965293884, 0.1307225525379181, 0.21945364773273468, 0.05265156924724579, -0.19593070447444916, 0.22259894013404846, -0.1261504590511322, -0.005276687443256378, 0.10569168627262115, 0.06527244299650192, 0.34865888953208923, 0.010175526142120361, -0.12989002466201782, -0.12840420007705688, 0.5232700705528259, 0.13347554206848145, 0.3094758689403534, -0.11766181141138077, -0.43564531207084656, 0.0025549903512001038, 0.12581560015678406, 0.23162133991718292, -0.1344369351863861, 0.18198831379413605, -0.3662605583667755, -0.0336214080452919, 0.13221853971481323, -0.1662737876176834, 0.44805723428726196, 0.23030304908752441, -0.009845888242125511, 0.23521201312541962, -0.08821853250265121, -0.05892845243215561, 0.2425093948841095, 0.02220980077981949, 0.031629182398319244, 0.3426946997642517, 0.08425292372703552, 0.09663277864456177, -0.47268834710121155, -0.21408966183662415, -0.1423092782497406, 0.1584935486316681, -0.42905694246292114, 0.1548968255519867, -0.11290476471185684, -0.2480735182762146, 0.12653467059135437, -0.3394361436367035, -0.3156892955303192, -0.20220761001110077, 0.054864536970853806, 0.6259101033210754, -0.12733866274356842, 0.13152849674224854, -0.1878024786710739, 0.010121062397956848, 0.015013612806797028, 0.09034987539052963, -0.492493212223053, -0.10352600365877151, -0.13293005526065826, 0.09241046011447906, 0.43039470911026, 0.12088528275489807, 0.23378410935401917, -0.06294972449541092, -0.14814013242721558, -0.2720623314380646, -0.35701984167099, 0.08190777897834778, -0.20823833346366882, 0.6623492240905762, -0.11147788166999817, 0.2902466058731079, 0.013375319540500641, -0.32209643721580505, 0.34997889399528503, -0.35180121660232544, -0.18139450252056122, 0.15058773756027222, -0.033271729946136475, 0.07811007648706436, -0.04754164442420006, -0.3255394399166107, -0.05873212218284607, -0.5046719908714294, 0.23011836409568787, -0.006073690950870514, -0.13422948122024536, 0.26615652441978455, -0.001596599817276001, 0.10382574051618576, 0.026072580367326736, -0.03017565794289112, -0.2122337371110916, -0.4160885214805603, 0.29867643117904663, -0.07450926303863525, -0.2934236526489258, 0.07241867482662201, 0.17391644418239594, -0.167758509516716, 0.15386682748794556, -0.26092398166656494, -0.22367851436138153, -0.03788747638463974, 0.09439364075660706, -0.053253937512636185, -0.05445094406604767, 0.11172963678836823, -0.12616008520126343, 0.0014117062091827393, -0.11490736901760101, -0.05153337121009827, -0.04525128751993179, 0.2968049645423889, 0.05600964277982712, -0.15626034140586853, 0.6900193691253662, 0.07974199950695038, 0.6245879530906677, 0.36309537291526794, 0.026636751368641853, 0.5495598316192627, 0.043104059994220734, 0.3278808295726776, -0.37123119831085205, -0.2209334671497345, 0.025699611753225327, -0.10266552865505219, -0.11864402890205383, 0.27504783868789673, 0.13045218586921692, 0.18084518611431122, -0.3468560576438904, -0.18353235721588135, -0.19463378190994263, -0.14713707566261292, 0.02958967722952366, -0.16055557131767273, -0.11066317558288574, 0.04445897787809372, -0.008505120873451233, 0.09641037881374359, -0.22509242594242096, -0.09488828480243683, 0.4739759862422943, 0.32988160848617554, -0.022184360772371292, -0.13504983484745026, 0.00912143662571907, -0.5304208993911743, 0.3634377121925354, 0.054072458297014236, 0.147467702627182, -0.24107767641544342, -0.0788269191980362, 0.17578327655792236, -0.12047165632247925, 0.5259800553321838, -0.08924941718578339, 0.07844291627407074, 0.01833118498325348, 0.012101002037525177, -0.20970195531845093, -0.08606453984975815, -0.09132734686136246, 0.1587660163640976, 0.25191041827201843, -0.0792611762881279, -0.40122753381729126, -0.1290794312953949, 0.1291467398405075, 0.0006210468709468842, 0.03231702744960785, -0.26168596744537354, -0.4434654414653778, -0.020916372537612915, -0.305958092212677, -0.05519711226224899, 0.18711860477924347, 0.1676587462425232, -0.242452472448349, 0.21272897720336914, -0.058437757194042206, -0.012962870299816132, 0.25396624207496643, -0.022207114845514297, 0.17944620549678802, -0.052060194313526154, 0.1962786763906479, 0.3467584252357483, -0.010823763906955719, 0.11506148427724838, 0.793571949005127, 0.4130028486251831, -0.753388524055481, -0.17832697927951813, 0.2305048406124115, -0.03675859421491623, 0.2962479293346405, -0.05060846358537674, 0.027944430708885193, 0.281890869140625, -0.013216301798820496, -0.08185207098722458, 0.061115335673093796, 0.291806161403656, -0.01806623488664627, -0.04445350542664528, -0.33511921763420105, 0.6527771353721619, 0.06295831501483917, 0.13550592958927155, 0.6307625770568848, 0.25191986560821533, -0.038506414741277695, 0.16823455691337585, -0.2001873254776001, 0.8563508987426758, 0.04322923719882965, 0.053918369114398956, 0.3995651304721832, -0.06028871238231659, 0.48245155811309814, -0.17603150010108948, 0.02551780268549919, -0.3126024603843689, -0.5816286206245422, -0.04996030405163765, -0.06877533346414566, 0.24957679212093353, -0.17991633713245392, -0.11143767088651657, 0.28699785470962524, -0.14313268661499023, 0.4302147626876831, 0.06552718579769135, -0.0026520192623138428, -0.4551086723804474, -0.03866209462285042, -0.8380074501037598, 0.12146173417568207, 0.06298588216304779, 0.26260054111480713, -0.12394370883703232, -0.18513183295726776, -0.13907897472381592, -0.2314637005329132, -0.36463961005210876, 0.38172584772109985, -0.03585750237107277, 0.00803065299987793, -0.03967902064323425, -0.28525838255882263, 0.14918950200080872, 0.417282372713089, 0.13578392565250397, -0.42984265089035034, -0.3586377203464508, 0.20156489312648773, -0.22092418372631073, -0.03100043535232544, 0.03722221404314041, 0.0315791592001915, 0.48297059535980225, -0.18852241337299347, -0.13662609457969666, 0.324079692363739, -0.026968995109200478, -0.23520752787590027, 0.08592461049556732, -0.07945989072322845, 0.11887103319168091, -0.20392924547195435, -0.15412373840808868, 0.08619408309459686, 0.11156619340181351, -0.19131407141685486, 0.1501150280237198, 0.14412707090377808, -0.127656951546669, -0.15577444434165955, 0.0038516889326274395, 0.014176160097122192, -0.15157727897167206, 0.6070519685745239, -0.2533271610736847, 0.05014559626579285, 0.3152852952480316, 0.18957924842834473, -0.16298744082450867, -0.07013554871082306, 0.009766332805156708, -0.08957632631063461, -0.4517832398414612, 0.027529194951057434, 0.15530171990394592, 0.11213520169258118, -0.11696593463420868, 0.28293177485466003, 0.04942454397678375, -0.34734025597572327, 0.01325514167547226, -0.27794694900512695, -0.13833624124526978, 0.25618064403533936, -0.39258939027786255, 0.005729898810386658, -0.1098366305232048, 0.20200605690479279, 0.05271279811859131, -0.056758470833301544, -0.30400705337524414, 0.06304814666509628, -0.04197772964835167, -0.023544209077954292, 0.0991227924823761, 0.012427246198058128, 0.4627840220928192, -0.0702693834900856, 0.17795370519161224, 0.09240402281284332, -0.3628734350204468, -0.17621514201164246, -0.12969867885112762, 0.1576923429965973, 0.11958800256252289, -0.12905454635620117, -0.2066842019557953, 0.009164571762084961, -0.19291900098323822, -0.19443751871585846, 0.35214298963546753, 0.30844539403915405, -0.06327494978904724, 0.012884184718132019, 0.301002562046051, 0.23691917955875397, -0.3544045388698578, 0.04492545500397682, -0.05201546847820282, 0.2143375724554062, -0.011242255568504333, -0.09392420202493668, -0.12671253085136414, 0.00567520409822464, -0.16503234207630157, -0.030901223421096802, 0.021556435152888298, 0.11872823536396027, 0.35455238819122314, -0.21912799775600433, 0.008861280977725983, -0.031631454825401306, 0.2388065755367279, 0.5788992643356323, -0.12752515077590942, 0.1430666148662567, 0.23470453917980194, 0.21500378847122192, -0.1800878643989563, 0.0315827950835228, 0.2633490264415741, 0.04137832671403885, 0.032420456409454346, -0.13633224368095398, 0.17114034295082092, -0.1519375592470169, 0.08582853525876999, 0.18271447718143463, 0.3000504970550537, -0.09982448816299438, 0.3566102683544159, 0.18774153292179108, 0.049980565905570984, 0.26733407378196716, -0.010602880269289017, 0.050563763827085495, 0.3546149730682373, 0.4179285168647766, -0.07920384407043457, -0.03787655383348465, -0.4717273712158203, 0.2952254116535187, -0.09375157952308655, -0.5170793533325195, -0.3737940490245819, 0.16668105125427246, -0.047918614000082016, 0.2603183388710022, -0.026935599744319916, 0.24030721187591553, -0.2024262249469757, 0.21525096893310547, -0.3282676339149475, 0.08327696472406387, -0.06578332185745239, -0.11146533489227295, -0.03797856718301773, -0.19394713640213013, -0.10122283548116684, 0.13057750463485718, -0.10203643143177032, 0.14278021454811096, 0.038534097373485565, 0.23717212677001953, -0.07215020060539246, -0.26291126012802124, -0.1333065629005432, 0.3909260928630829, 0.23389360308647156, -0.15374970436096191, 0.26548707485198975, 0.2724364399909973, -0.04544442519545555, 0.3041606843471527, 0.29078230261802673, 0.48201999068260193, 0.06375858187675476, -0.09460075199604034, 0.09135279059410095, 0.1759018450975418, -0.09363776445388794, -0.042856112122535706, 0.25920891761779785, 0.042503464967012405, 0.1650674194097519, 0.10847926139831543, 0.20050272345542908, -0.2137656807899475, 0.06017094478011131, -0.24826966226100922, 0.4016021490097046, -0.48734140396118164, 0.07415703684091568, -0.2607218027114868, 0.16422095894813538, -0.08578330278396606, -0.14715950191020966, -0.4149051010608673, 0.2734323740005493, -0.11339078098535538, 0.11641834676265717, 0.00014907494187355042, 0.007291056215763092, 0.07369540631771088, 0.08933781087398529, 0.1575286090373993, 0.376031756401062, 0.1730920672416687, -0.10126692056655884, -0.17618529498577118, -0.7052342891693115, 0.1718607246875763, 0.24634677171707153, 0.07649053633213043, 0.1196618527173996, 0.019474543631076813, 0.08685918152332306, 0.11480437219142914, -0.08318866789340973, -0.2550559639930725, 0.008377797901630402, 0.23024366796016693, -0.22094279527664185, -0.16183626651763916, -0.10272923111915588, 0.13478778302669525, -0.2657577395439148, -0.07872018963098526, 0.0025948090478777885, -0.25510072708129883, 0.07431142777204514, -0.0013291537761688232, -0.014721490442752838, -0.1412362903356552, -0.10218525677919388, 0.40023893117904663, 0.12460537254810333, 0.44317710399627686, -0.20408861339092255, -0.24575898051261902, -0.3297351598739624, -0.29659074544906616, -0.1882312297821045, -0.05968955531716347, -0.08337995409965515, 0.5255988240242004, -0.19000054895877838, -0.13749784231185913, -0.3249165713787079, 0.3034455180168152, -0.021593548357486725, -0.0075635649263858795, -0.47874128818511963, 0.038568899035453796, -0.1441737711429596, 0.21922962367534637, -0.21034634113311768, 0.4164908826351166, -0.21996335685253143, -0.09443114697933197, -0.315171480178833, -0.19277355074882507, 0.7371947169303894, -0.3276502788066864, -0.09867661446332932, -0.058540359139442444, 0.20623669028282166, 0.34273701906204224, -0.10457850247621536, -0.5046932697296143, 0.3040298521518707, 0.20532174408435822, 0.011208036914467812, -0.21776580810546875, 0.18417616188526154, 0.26837214827537537, 0.037700772285461426, -0.1067621111869812, -0.06172013655304909, 0.04450291395187378, -0.027739040553569794, 0.33862918615341187, -0.20603972673416138 ]
https://github.com/huggingface/datasets/issues/6577
Hi! We should be able to avoid this error by retrying to read the data when it happens. I'll open a PR in `huggingface_hub` to address this.
502 Server Errors when streaming large dataset
### Describe the bug When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming: ``` huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train) I’m wondering whether this is coming from datasets? Or from the Hub side? ### Steps to reproduce the bug Reproducer: ```python from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm NUM_EPOCHS = 20 dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True) dataset = dataset.with_format("torch") dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16) for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0): for batch in tqdm(dataloader, desc="Batch", position=1): continue ``` Running the above script tends to fail within about 2 hours with a traceback like the following: <details> <summary> Traceback: </summary> ```python 1029 for batch in train_loader: 1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__ 1031 data = self._next_data() 1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data 1033 return self._process_data(data) 1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data 1035 data.reraise() 1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise 1037 raise exception 1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10. 1039 Original Traceback (most recent call last): 1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status 1041 response.raise_for_status() 1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status 1043 raise HTTPError(http_error_msg, response=self) 1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet 1045 The above exception was the direct cause of the following exception: 1046 Traceback (most recent call last): 1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop 1048 data = fetcher.fetch(index) 1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch 1050 data.append(next(self.dataset_iter)) 1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__ 1052 yield from self._iter_pytorch() 1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch 1054 for key, example in ex_iterable: 1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__ 1056 for x in self.ex_iterable: 1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1058 yield from self._iter() 1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1060 for key, example in iterator: 1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1062 yield from self._iter() 1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1064 for key, example in iterator: 1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1066 yield from self._iter() 1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1068 for key, example in iterator: 1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1070 for key, example in self.ex_iterable: 1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1072 yield from self._iter() 1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1074 for key, example in iterator: 1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1076 for key, example in self.ex_iterable: 1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__ 1078 for key, pa_table in self.generate_tables_fn(**self.kwargs): 1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables 1080 for batch_idx, record_batch in enumerate( 1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches 1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118 1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries 1084 out = read(*args, **kwargs) 1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read 1086 out = self.cache._fetch(self.loc, self.loc + length) 1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch 1088 self.cache = self.fetcher(start, end) # new block replaces old 1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range 1090 hf_raise_for_status(r) 1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status 1092 raise HfHubHTTPError(str(e), response=response) from e 1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` </details> ### Expected behavior Should be able to stream the dataset without any 502 error. ### Environment info - `datasets` version: 2.16.2.dev0 - Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - `huggingface_hub` version: 0.20.1 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
27
502 Server Errors when streaming large dataset ### Describe the bug When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming: ``` huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train) I’m wondering whether this is coming from datasets? Or from the Hub side? ### Steps to reproduce the bug Reproducer: ```python from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm NUM_EPOCHS = 20 dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True) dataset = dataset.with_format("torch") dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16) for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0): for batch in tqdm(dataloader, desc="Batch", position=1): continue ``` Running the above script tends to fail within about 2 hours with a traceback like the following: <details> <summary> Traceback: </summary> ```python 1029 for batch in train_loader: 1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__ 1031 data = self._next_data() 1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data 1033 return self._process_data(data) 1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data 1035 data.reraise() 1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise 1037 raise exception 1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10. 1039 Original Traceback (most recent call last): 1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status 1041 response.raise_for_status() 1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status 1043 raise HTTPError(http_error_msg, response=self) 1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet 1045 The above exception was the direct cause of the following exception: 1046 Traceback (most recent call last): 1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop 1048 data = fetcher.fetch(index) 1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch 1050 data.append(next(self.dataset_iter)) 1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__ 1052 yield from self._iter_pytorch() 1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch 1054 for key, example in ex_iterable: 1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__ 1056 for x in self.ex_iterable: 1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1058 yield from self._iter() 1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1060 for key, example in iterator: 1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1062 yield from self._iter() 1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1064 for key, example in iterator: 1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1066 yield from self._iter() 1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1068 for key, example in iterator: 1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1070 for key, example in self.ex_iterable: 1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1072 yield from self._iter() 1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1074 for key, example in iterator: 1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1076 for key, example in self.ex_iterable: 1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__ 1078 for key, pa_table in self.generate_tables_fn(**self.kwargs): 1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables 1080 for batch_idx, record_batch in enumerate( 1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches 1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118 1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries 1084 out = read(*args, **kwargs) 1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read 1086 out = self.cache._fetch(self.loc, self.loc + length) 1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch 1088 self.cache = self.fetcher(start, end) # new block replaces old 1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range 1090 hf_raise_for_status(r) 1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status 1092 raise HfHubHTTPError(str(e), response=response) from e 1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` </details> ### Expected behavior Should be able to stream the dataset without any 502 error. ### Environment info - `datasets` version: 2.16.2.dev0 - Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - `huggingface_hub` version: 0.20.1 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0 Hi! We should be able to avoid this error by retrying to read the data when it happens. I'll open a PR in `huggingface_hub` to address this.
[ -0.22672490775585175, -0.5951704978942871, 0.15816134214401245, 0.31269171833992004, 0.21198102831840515, -0.14130067825317383, 0.1209697276353836, 0.03074195235967636, -0.4138365089893341, -0.19666787981987, -0.00406932458281517, -0.03385841101408005, -0.0011482946574687958, 0.14881344139575958, 0.11635453999042511, -0.15325546264648438, -0.018423426896333694, -0.2293916791677475, -0.49636757373809814, -0.11409241706132889, -0.1513170450925827, 0.11971064656972885, 0.19027164578437805, 0.12175499647855759, -0.5765932202339172, -0.03333793580532074, -0.03813065588474274, 0.4741724133491516, -0.22466257214546204, -0.41784512996673584, -0.012973986566066742, -0.24887585639953613, 0.10712557286024094, 0.3409941494464874, -0.00012958036677446216, 0.06612342596054077, 0.32800665497779846, 0.09679264575242996, -0.37890905141830444, 0.2015654444694519, -0.3142157793045044, -0.2047288715839386, 0.0072572678327560425, 0.0950944721698761, 0.16116994619369507, 0.072980135679245, -0.05159886181354523, -0.11118688434362411, 0.24864473938941956, 0.48270919919013977, 0.025718238204717636, 0.39231446385383606, -0.18166249990463257, -0.07569253444671631, 0.2968015670776367, -0.15837451815605164, -0.016870956867933273, 0.19652248919010162, 0.11026878654956818, 0.14411115646362305, -0.533576488494873, 0.1020396500825882, 0.07703634351491928, -0.2314254492521286, 0.22270958125591278, -0.2081197053194046, 0.017239686101675034, -0.3296172618865967, 0.014222441241145134, 0.34328022599220276, -0.0257575586438179, -0.06744563579559326, -0.2672533690929413, -0.4688505530357361, -0.2029171884059906, -0.18874110281467438, 0.1997726410627365, 0.34820282459259033, 0.05980873107910156, 0.21571853756904602, -0.31371399760246277, -0.3511556088924408, -0.05281972885131836, -0.0783199593424797, -0.11182388663291931, 0.14608179032802582, -0.028770383447408676, 0.21108926832675934, -0.19614958763122559, -0.1788134127855301, 0.017705697566270828, -0.17413505911827087, -0.22262710332870483, -0.17558656632900238, -0.7149903178215027, 0.11598201841115952, 0.25070270895957947, 0.02055630087852478, 0.04721028357744217, 0.4523201882839203, 0.21365460753440857, 0.009275522083044052, -0.1335587203502655, 0.19188028573989868, 0.3552560806274414, 0.05184231325984001, -0.1883874386548996, -0.04300034046173096, 0.24472744762897491, 0.31591129302978516, 0.15628066658973694, 0.15922848880290985, 0.11707708239555359, -0.11919926106929779, -0.4622672200202942, -0.2228398472070694, 0.15629853308200836, -0.14966869354248047, -0.4521414637565613, 0.4145105183124542, 0.024873986840248108, 0.09140567481517792, 0.5031002759933472, 0.1112595871090889, -0.06577540934085846, 0.6213890910148621, -0.32740992307662964, 0.11265508830547333, -0.11412841081619263, -0.4606536030769348, -0.21923089027404785, -0.012871094979345798, -0.03803730010986328, 0.026693541556596756, -0.08487702161073685, -0.4903702437877655, -0.031054385006427765, 0.13593843579292297, 0.2695939838886261, -0.065561443567276, -0.1579052358865738, -0.2916228771209717, -0.019354198127985, 0.32376986742019653, 0.017073646187782288, 0.33621954917907715, 0.14316101372241974, 0.3105735778808594, 0.05726860463619232, -0.11297301948070526, -0.24364250898361206, -0.5234113335609436, 0.1443571150302887, 0.03365568444132805, -0.16230644285678864, 0.013128388673067093, -0.13867507874965668, 0.07041953504085541, -0.038236457854509354, -0.01849021017551422, 0.03580581024289131, 0.1877537965774536, -0.27448296546936035, -0.10131444036960602, 0.048353999853134155, 0.5301847457885742, -0.025478675961494446, -0.12243214249610901, 0.32633069157600403, 0.13287587463855743, 0.21472576260566711, 0.401135116815567, -0.05677241086959839, -0.08240224421024323, -0.1918359398841858, 0.00909346342086792, 0.12591451406478882, -0.35094141960144043, -0.16236776113510132, 0.47476106882095337, -0.2446492612361908, 0.047882504761219025, 0.30246037244796753, 0.024051979184150696, 0.4103977680206299, -0.09217751026153564, 0.5288958549499512, 0.09697408974170685, 0.11719273775815964, 0.11742234230041504, -0.5494970083236694, -0.3037050664424896, -0.33910951018333435, 0.13529494404792786, 0.28706490993499756, 0.07853124290704727, 0.2601461112499237, -0.2787840962409973, -0.001945633441209793, -0.014338904991745949, 0.14392805099487305, 0.40381404757499695, 0.04539820924401283, 0.10766620934009552, 0.04843098297715187, 0.05432486534118652, -0.2885257303714752, 0.15902172029018402, 0.014194674789905548, -0.0754743218421936, 0.22077849507331848, 0.12797081470489502, -0.15276959538459778, -0.12732043862342834, 0.028189631178975105, 0.011863034218549728, -0.08291417360305786, 0.01761770248413086, 0.020462535321712494, 0.09355143457651138, -0.3534315228462219, 0.6511549949645996, -0.21352432668209076, 0.3303191065788269, -0.4098541736602783, 0.31914854049682617, 0.26558253169059753, -0.20557045936584473, 0.330650269985199, -0.028565648943185806, 0.40957215428352356, 0.0787227526307106, -0.009647663682699203, 0.4893660247325897, -0.1775600165128708, 0.31364282965660095, 0.15041059255599976, 0.07618175446987152, 0.37186816334724426, -0.0406486913561821, -0.18454405665397644, -0.11051410436630249, -0.1071634441614151, 0.07860352843999863, 0.07524879276752472, 0.16725414991378784, -0.20867064595222473, 0.276738703250885, 0.19121070206165314, 0.3572307229042053, 0.16338856518268585, 0.20940670371055603, -0.23248887062072754, 0.09987440705299377, 0.4095522463321686, -0.023355966433882713, 0.1845775842666626, 0.14176639914512634, -0.3438040018081665, 0.0417972132563591, 0.020726006478071213, -0.01702876016497612, 0.017278460785746574, 0.24636396765708923, -0.17327891290187836, -0.05267995595932007, 0.21483340859413147, 0.29279541969299316, 0.30839061737060547, -0.06165790930390358, -0.14914679527282715, 0.026728695258498192, -0.12757231295108795, -0.1684267520904541, 0.3210414946079254, 0.3712770342826843, -0.08640669286251068, 0.2834063768386841, 0.10521852970123291, -0.06639612466096878, -0.4625815451145172, -0.13998320698738098, 0.11659596115350723, 0.18084947764873505, -0.612250804901123, 0.14959612488746643, -0.2159741222858429, -0.16699206829071045, -0.2239597886800766, 0.04878241568803787, -0.42752689123153687, -0.3954008221626282, -0.07361836731433868, 0.2628181576728821, -0.44333603978157043, -0.0038208812475204468, -0.2800581455230713, 0.33701324462890625, 0.017631560564041138, 0.29494214057922363, 0.05060480535030365, -0.10700035840272903, -0.08237345516681671, -0.09216105937957764, 0.10486789047718048, -0.30124181509017944, 0.12147880345582962, -0.22688496112823486, 0.13715732097625732, -0.5803179740905762, -0.1423576921224594, 0.3004574775695801, 0.07903420180082321, 0.12404653429985046, 0.08588050305843353, 0.13927213847637177, -0.22440552711486816, -0.16106274724006653, 0.13689298927783966, 0.1888943314552307, 0.08987265080213547, 0.26420140266418457, -0.062311042100191116, 0.08602101355791092, 0.1270870715379715, 0.028624296188354492, 0.16411304473876953, -0.4027656614780426, 0.2627314031124115, -0.193173348903656, 0.18966515362262726, -0.1445847898721695, -0.11715415120124817, 0.019943691790103912, -0.14017324149608612, -0.012395823374390602, -0.0659443736076355, -0.8555179238319397, 0.3188782334327698, -0.10088853538036346, -0.2066129893064499, -0.0030669420957565308, 0.16384945809841156, 0.12470357120037079, 0.3376142084598541, -0.4241468906402588, -0.26946866512298584, -0.22868098318576813, -0.06590334326028824, -0.15028557181358337, 0.1089400127530098, -0.003155849874019623, -0.15887629985809326, 0.01584462821483612, -0.03151727840304375, 0.04305429756641388, 0.18267321586608887, 0.2849319577217102, 0.23950356245040894, -0.026885105296969414, 0.4528467357158661, 0.005732789635658264, 0.3141430616378784, 0.3306630253791809, 0.2839587330818176, 0.5497276186943054, -0.0018575415015220642, 0.2872813045978546, 0.1868283599615097, -0.05232542008161545, 0.03644433245062828, -0.1970205307006836, -0.14365491271018982, 0.254458487033844, 0.13426965475082397, 0.21452727913856506, -0.19766682386398315, -0.24735745787620544, 0.01562592387199402, -0.22945502400398254, 0.026850489899516106, -0.48607173562049866, 0.2694200873374939, 0.08030916750431061, 0.041126884520053864, 0.15169356763362885, -0.08215107768774033, -0.06762069463729858, 0.08130106329917908, 0.16521668434143066, 0.028559528291225433, -0.03482794016599655, -0.008382786065340042, -0.4206946790218353, 0.09163278341293335, 0.09905307739973068, 0.7096068263053894, -0.0615299716591835, -0.12938912212848663, 0.2116037905216217, 0.010657928884029388, 0.39509162306785583, -0.3172484040260315, 0.012574898079037666, -0.2421964406967163, 0.04231882095336914, -0.5206639766693115, -0.0050808340311050415, -0.004529736936092377, 0.32748132944107056, 0.2589341402053833, 0.4298582673072815, -0.4116394519805908, -0.04754411056637764, 0.0803312435746193, -0.2097700983285904, -0.04071522131562233, 0.1626887172460556, -0.47547170519828796, -0.2500946521759033, -0.14146867394447327, 0.07308825105428696, 0.2419528365135193, 0.0035720691084861755, -0.2041843831539154, 0.28397437930107117, -0.044327471405267715, -0.015516042709350586, 0.1918792426586151, -0.03469420596957207, 0.3075754642486572, -0.3205716609954834, 0.43420541286468506, 0.34288352727890015, 0.5453113913536072, 0.13054607808589935, 0.7411035299301147, 0.008386833593249321, -0.6654378175735474, 0.3813937306404114, 0.2571749687194824, 0.2564491927623749, 0.606289267539978, -0.03342883288860321, 0.1426626741886139, 0.10491780936717987, 0.32428258657455444, -0.14262592792510986, 0.16808241605758667, 0.33423516154289246, -0.18668141961097717, -0.4840812683105469, -0.08128422498703003, 0.3273612856864929, -0.005633346736431122, -0.018827445805072784, 0.12816433608531952, 0.3300391733646393, -0.08899201452732086, 0.006897959858179092, 0.03414777293801308, 1.019761323928833, 0.053157221525907516, 0.21712079644203186, 0.09811221808195114, -0.2882554233074188, 0.5061947107315063, -0.3468606472015381, 0.12844529747962952, -0.4757455885410309, -0.10918602347373962, -0.01360352337360382, -0.09119898080825806, -0.10634923726320267, -0.05248023942112923, -0.028233066201210022, 0.32107552886009216, -0.017837367951869965, 0.4316791892051697, 0.09291714429855347, 0.16111144423484802, -0.4321517050266266, -0.14563791453838348, -0.4679882228374481, -0.04537387564778328, -0.2641971707344055, -0.036326318979263306, -0.13536086678504944, -0.13826924562454224, 0.10615428537130356, -0.4177361726760864, -0.20005109906196594, -0.00033511966466903687, -0.10809265077114105, 0.23594655096530914, 0.05139743536710739, -0.3846437335014343, -0.09776482731103897, -0.046796396374702454, 0.05883149057626724, -0.10908280313014984, -0.05633845925331116, 0.29460397362709045, -0.10369241237640381, 0.25387072563171387, 0.008054818958044052, -0.10652114450931549, 0.1780494898557663, 0.0226130411028862, -0.11851784586906433, 0.17838791012763977, -0.03330677002668381, -0.0030749067664146423, -0.30997976660728455, 0.19416624307632446, 0.10190753638744354, -0.1199241429567337, 0.17343232035636902, -0.1859561800956726, -0.1432022750377655, -0.2118232697248459, -0.042621396481990814, 0.13449102640151978, -0.10999070852994919, 0.09605901688337326, 0.05924689769744873, -0.3104195296764374, -0.07502275705337524, 0.5249305367469788, -0.15637975931167603, -0.023470886051654816, 0.16096079349517822, 0.11795837432146072, -0.30359235405921936, 0.029589585959911346, 0.18040309846401215, -0.11649274080991745, -0.5765732526779175, 0.15966321527957916, -0.2519155442714691, -0.015898793935775757, -0.22581864893436432, -0.0486895926296711, -0.008237045258283615, -0.04696470871567726, -0.1391143500804901, -0.2623436152935028, -0.07387153059244156, 0.32643502950668335, -0.07572051137685776, -0.04779554903507233, 0.07069860398769379, -0.09862690418958664, 0.08551457524299622, -0.18132412433624268, -0.0911041721701622, 0.27499204874038696, -0.08627867698669434, 0.1121857613325119, 0.013174600899219513, -0.14820066094398499, 0.23615092039108276, -0.23861165344715118, -0.20424272119998932, 0.2226412147283554, 0.06953206658363342, 0.061504825949668884, -0.166920006275177, 0.22030295431613922, 0.09317873418331146, -0.27773547172546387, -0.34477245807647705, 0.06736557185649872, 0.035880133509635925, 0.09807208180427551, 0.21973396837711334, 0.3733527362346649, -0.004801902920007706, -0.5639166831970215, 0.1510172188282013, -0.09470643848180771, -0.2933691442012787, 0.40253451466560364, 0.14065779745578766, 0.3823642432689667, 0.011888597160577774, 0.17359128594398499, 0.0007951259613037109, -0.16897563636302948, 0.14607955515384674, 0.2095707207918167, 0.3190028667449951, -0.16734574735164642, 0.24086084961891174, -0.4783458411693573, 0.09576575458049774, 0.04329719394445419, 0.1891784965991974, 0.4678424596786499, -0.09056324511766434, -0.4894031286239624, 0.18036586046218872, 0.015209009870886803, 0.09686841070652008, -0.26079145073890686, 0.10626772046089172, 0.07290369272232056, -0.07329972088336945, 0.0849592536687851, 0.25038355588912964, -0.3534901738166809, -0.295000821352005, 0.29196488857269287, 0.5073562264442444, 0.2431287169456482, 0.19352246820926666, 0.23567581176757812, 0.18957629799842834, 0.10859668254852295, -0.13063450157642365, -0.05761494114995003, 0.06744387000799179, 0.4154256582260132, -0.05511883273720741, 0.15863031148910522, 0.0007302723824977875, -0.13447131216526031, 0.258188933134079, -0.4820250868797302, -0.2258700132369995, 0.10853177309036255, -0.2744225859642029, 0.08310365676879883, -0.2313379943370819, 0.7644414305686951, 0.09496366232633591, -0.06422585994005203, -0.3673376739025116, 0.27588579058647156, -0.15686926245689392, -0.08982204645872116, -0.0481451116502285, -0.20955924689769745, -0.18224412202835083, 0.3722248375415802, -0.07823806256055832, 0.27425533533096313, 0.14035704731941223, 0.20170211791992188, 0.19801174104213715, -0.30333971977233887, -0.012817848473787308, 0.3088618218898773, 0.3186323940753937, -0.1443990021944046, 0.4410896897315979, 0.6181504130363464, -0.12263123691082001, 0.3608301877975464, 0.01645803265273571, 0.5661805272102356, 0.10305178165435791, -0.07626405358314514, 0.18596620857715607, 0.09776881337165833, 0.2110048532485962, -0.022475555539131165, 0.09037983417510986, -0.15529479086399078, -0.16951121389865875, 0.35793977975845337, -0.009985620155930519, -0.041285451501607895, 0.052751604467630386, -0.2274063527584076, 0.16304843127727509, -0.1524517685174942, 0.16100265085697174, -0.32655203342437744, -0.025905422866344452, -0.22791306674480438, -0.16830086708068848, -0.4317322075366974, 0.12829338014125824, 0.4793339967727661, -0.16311612725257874, 0.007963061332702637, -0.16751742362976074, -0.0529576912522316, -0.13345055282115936, 0.9205738306045532, 0.2560823857784271, -0.21817532181739807, -0.24679982662200928, -0.3968575596809387, -0.3903970718383789, 0.15272361040115356, -0.1467907428741455, 0.15076538920402527, 0.10183476656675339, 0.2021477222442627, -0.3132683336734772, 0.20067967474460602, 0.10606424510478973, 0.2352461814880371, -0.5360376834869385, 0.34090471267700195, -0.10899443924427032, -0.04042832553386688, -0.05499086529016495, 0.038410983979701996, -0.07540322840213776, -0.0892721489071846, 0.48329365253448486, 0.29282504320144653, -0.12660017609596252, 0.14312633872032166, -0.15975388884544373, -0.2924485206604004, -0.47435837984085083, -0.0570555254817009, 0.31711554527282715, 0.30722537636756897, 0.10390964150428772, -0.3858226537704468, -0.3338167667388916, -0.5497469902038574, -0.03785398229956627, 0.0984053909778595, -0.08973702043294907, 0.34696164727211, 0.051265276968479156, -0.14142708480358124, -0.22974924743175507, 0.4220114052295685, 0.07918164134025574, 0.06415876746177673, -0.14108118414878845, -0.1482563465833664, 0.06182734668254852, 0.27667471766471863, 0.11395929753780365, 0.44164493680000305, 0.10638823360204697, 0.31401628255844116, -0.07405323535203934, -0.7448225617408752, 0.5567172169685364, -0.4150905907154083, -0.05144559219479561, -0.2703673839569092, 0.46540409326553345, 0.6008333563804626, -0.00043955445289611816, -0.26801174879074097, -0.07360287010669708, 0.07351283729076385, -0.033120956271886826, -0.01746033877134323, 0.05493350327014923, -0.08129412680864334, -0.1256699413061142, -0.013926409184932709, -0.194503054022789, 0.10245335102081299, -0.28349098563194275, 0.4803299307823181, -0.11475228518247604 ]
https://github.com/huggingface/datasets/issues/6577
Thanks for the fix @mariosasko! Just wondering whether "500 error" should also be excluded? I got these errors overnight: ``` huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/da tasets/sanchit-gandhi/concatenated-train-set-label-length-256/resolve/91e6a0cd0356605b021384ded813cfcf356a221c/train/tra in-02618-of-04012.parquet (Request ID: Root=1-65b18b81-627f2c2943bbb8ab68d19ee2;129537bd-1934-4257-a4d8-1cb774f8e1f8) Internal Error - We're working hard to fix this as soon as possible! ```
502 Server Errors when streaming large dataset
### Describe the bug When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming: ``` huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train) I’m wondering whether this is coming from datasets? Or from the Hub side? ### Steps to reproduce the bug Reproducer: ```python from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm NUM_EPOCHS = 20 dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True) dataset = dataset.with_format("torch") dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16) for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0): for batch in tqdm(dataloader, desc="Batch", position=1): continue ``` Running the above script tends to fail within about 2 hours with a traceback like the following: <details> <summary> Traceback: </summary> ```python 1029 for batch in train_loader: 1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__ 1031 data = self._next_data() 1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data 1033 return self._process_data(data) 1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data 1035 data.reraise() 1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise 1037 raise exception 1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10. 1039 Original Traceback (most recent call last): 1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status 1041 response.raise_for_status() 1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status 1043 raise HTTPError(http_error_msg, response=self) 1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet 1045 The above exception was the direct cause of the following exception: 1046 Traceback (most recent call last): 1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop 1048 data = fetcher.fetch(index) 1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch 1050 data.append(next(self.dataset_iter)) 1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__ 1052 yield from self._iter_pytorch() 1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch 1054 for key, example in ex_iterable: 1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__ 1056 for x in self.ex_iterable: 1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1058 yield from self._iter() 1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1060 for key, example in iterator: 1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1062 yield from self._iter() 1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1064 for key, example in iterator: 1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1066 yield from self._iter() 1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1068 for key, example in iterator: 1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1070 for key, example in self.ex_iterable: 1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1072 yield from self._iter() 1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1074 for key, example in iterator: 1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1076 for key, example in self.ex_iterable: 1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__ 1078 for key, pa_table in self.generate_tables_fn(**self.kwargs): 1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables 1080 for batch_idx, record_batch in enumerate( 1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches 1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118 1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries 1084 out = read(*args, **kwargs) 1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read 1086 out = self.cache._fetch(self.loc, self.loc + length) 1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch 1088 self.cache = self.fetcher(start, end) # new block replaces old 1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range 1090 hf_raise_for_status(r) 1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status 1092 raise HfHubHTTPError(str(e), response=response) from e 1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` </details> ### Expected behavior Should be able to stream the dataset without any 502 error. ### Environment info - `datasets` version: 2.16.2.dev0 - Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - `huggingface_hub` version: 0.20.1 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
49
502 Server Errors when streaming large dataset ### Describe the bug When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming: ``` huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train) I’m wondering whether this is coming from datasets? Or from the Hub side? ### Steps to reproduce the bug Reproducer: ```python from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm NUM_EPOCHS = 20 dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True) dataset = dataset.with_format("torch") dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16) for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0): for batch in tqdm(dataloader, desc="Batch", position=1): continue ``` Running the above script tends to fail within about 2 hours with a traceback like the following: <details> <summary> Traceback: </summary> ```python 1029 for batch in train_loader: 1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__ 1031 data = self._next_data() 1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data 1033 return self._process_data(data) 1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data 1035 data.reraise() 1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise 1037 raise exception 1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10. 1039 Original Traceback (most recent call last): 1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status 1041 response.raise_for_status() 1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status 1043 raise HTTPError(http_error_msg, response=self) 1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet 1045 The above exception was the direct cause of the following exception: 1046 Traceback (most recent call last): 1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop 1048 data = fetcher.fetch(index) 1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch 1050 data.append(next(self.dataset_iter)) 1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__ 1052 yield from self._iter_pytorch() 1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch 1054 for key, example in ex_iterable: 1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__ 1056 for x in self.ex_iterable: 1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1058 yield from self._iter() 1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1060 for key, example in iterator: 1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1062 yield from self._iter() 1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1064 for key, example in iterator: 1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__ 1066 yield from self._iter() 1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter 1068 for key, example in iterator: 1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1070 for key, example in self.ex_iterable: 1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__ 1072 yield from self._iter() 1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter 1074 for key, example in iterator: 1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__ 1076 for key, example in self.ex_iterable: 1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__ 1078 for key, pa_table in self.generate_tables_fn(**self.kwargs): 1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables 1080 for batch_idx, record_batch in enumerate( 1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches 1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118 1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries 1084 out = read(*args, **kwargs) 1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read 1086 out = self.cache._fetch(self.loc, self.loc + length) 1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch 1088 self.cache = self.fetcher(start, end) # new block replaces old 1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range 1090 hf_raise_for_status(r) 1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status 1092 raise HfHubHTTPError(str(e), response=response) from e 1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet ``` </details> ### Expected behavior Should be able to stream the dataset without any 502 error. ### Environment info - `datasets` version: 2.16.2.dev0 - Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29 - Python version: 3.8.10 - `huggingface_hub` version: 0.20.1 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0 Thanks for the fix @mariosasko! Just wondering whether "500 error" should also be excluded? I got these errors overnight: ``` huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/da tasets/sanchit-gandhi/concatenated-train-set-label-length-256/resolve/91e6a0cd0356605b021384ded813cfcf356a221c/train/tra in-02618-of-04012.parquet (Request ID: Root=1-65b18b81-627f2c2943bbb8ab68d19ee2;129537bd-1934-4257-a4d8-1cb774f8e1f8) Internal Error - We're working hard to fix this as soon as possible! ```
[ -0.22672490775585175, -0.5951704978942871, 0.15816134214401245, 0.31269171833992004, 0.21198102831840515, -0.14130067825317383, 0.1209697276353836, 0.03074195235967636, -0.4138365089893341, -0.19666787981987, -0.00406932458281517, -0.03385841101408005, -0.0011482946574687958, 0.14881344139575958, 0.11635453999042511, -0.15325546264648438, -0.018423426896333694, -0.2293916791677475, -0.49636757373809814, -0.11409241706132889, -0.1513170450925827, 0.11971064656972885, 0.19027164578437805, 0.12175499647855759, -0.5765932202339172, -0.03333793580532074, -0.03813065588474274, 0.4741724133491516, -0.22466257214546204, -0.41784512996673584, -0.012973986566066742, -0.24887585639953613, 0.10712557286024094, 0.3409941494464874, -0.00012958036677446216, 0.06612342596054077, 0.32800665497779846, 0.09679264575242996, -0.37890905141830444, 0.2015654444694519, -0.3142157793045044, -0.2047288715839386, 0.0072572678327560425, 0.0950944721698761, 0.16116994619369507, 0.072980135679245, -0.05159886181354523, -0.11118688434362411, 0.24864473938941956, 0.48270919919013977, 0.025718238204717636, 0.39231446385383606, -0.18166249990463257, -0.07569253444671631, 0.2968015670776367, -0.15837451815605164, -0.016870956867933273, 0.19652248919010162, 0.11026878654956818, 0.14411115646362305, -0.533576488494873, 0.1020396500825882, 0.07703634351491928, -0.2314254492521286, 0.22270958125591278, -0.2081197053194046, 0.017239686101675034, -0.3296172618865967, 0.014222441241145134, 0.34328022599220276, -0.0257575586438179, -0.06744563579559326, -0.2672533690929413, -0.4688505530357361, -0.2029171884059906, -0.18874110281467438, 0.1997726410627365, 0.34820282459259033, 0.05980873107910156, 0.21571853756904602, -0.31371399760246277, -0.3511556088924408, -0.05281972885131836, -0.0783199593424797, -0.11182388663291931, 0.14608179032802582, -0.028770383447408676, 0.21108926832675934, -0.19614958763122559, -0.1788134127855301, 0.017705697566270828, -0.17413505911827087, -0.22262710332870483, -0.17558656632900238, -0.7149903178215027, 0.11598201841115952, 0.25070270895957947, 0.02055630087852478, 0.04721028357744217, 0.4523201882839203, 0.21365460753440857, 0.009275522083044052, -0.1335587203502655, 0.19188028573989868, 0.3552560806274414, 0.05184231325984001, -0.1883874386548996, -0.04300034046173096, 0.24472744762897491, 0.31591129302978516, 0.15628066658973694, 0.15922848880290985, 0.11707708239555359, -0.11919926106929779, -0.4622672200202942, -0.2228398472070694, 0.15629853308200836, -0.14966869354248047, -0.4521414637565613, 0.4145105183124542, 0.024873986840248108, 0.09140567481517792, 0.5031002759933472, 0.1112595871090889, -0.06577540934085846, 0.6213890910148621, -0.32740992307662964, 0.11265508830547333, -0.11412841081619263, -0.4606536030769348, -0.21923089027404785, -0.012871094979345798, -0.03803730010986328, 0.026693541556596756, -0.08487702161073685, -0.4903702437877655, -0.031054385006427765, 0.13593843579292297, 0.2695939838886261, -0.065561443567276, -0.1579052358865738, -0.2916228771209717, -0.019354198127985, 0.32376986742019653, 0.017073646187782288, 0.33621954917907715, 0.14316101372241974, 0.3105735778808594, 0.05726860463619232, -0.11297301948070526, -0.24364250898361206, -0.5234113335609436, 0.1443571150302887, 0.03365568444132805, -0.16230644285678864, 0.013128388673067093, -0.13867507874965668, 0.07041953504085541, -0.038236457854509354, -0.01849021017551422, 0.03580581024289131, 0.1877537965774536, -0.27448296546936035, -0.10131444036960602, 0.048353999853134155, 0.5301847457885742, -0.025478675961494446, -0.12243214249610901, 0.32633069157600403, 0.13287587463855743, 0.21472576260566711, 0.401135116815567, -0.05677241086959839, -0.08240224421024323, -0.1918359398841858, 0.00909346342086792, 0.12591451406478882, -0.35094141960144043, -0.16236776113510132, 0.47476106882095337, -0.2446492612361908, 0.047882504761219025, 0.30246037244796753, 0.024051979184150696, 0.4103977680206299, -0.09217751026153564, 0.5288958549499512, 0.09697408974170685, 0.11719273775815964, 0.11742234230041504, -0.5494970083236694, -0.3037050664424896, -0.33910951018333435, 0.13529494404792786, 0.28706490993499756, 0.07853124290704727, 0.2601461112499237, -0.2787840962409973, -0.001945633441209793, -0.014338904991745949, 0.14392805099487305, 0.40381404757499695, 0.04539820924401283, 0.10766620934009552, 0.04843098297715187, 0.05432486534118652, -0.2885257303714752, 0.15902172029018402, 0.014194674789905548, -0.0754743218421936, 0.22077849507331848, 0.12797081470489502, -0.15276959538459778, -0.12732043862342834, 0.028189631178975105, 0.011863034218549728, -0.08291417360305786, 0.01761770248413086, 0.020462535321712494, 0.09355143457651138, -0.3534315228462219, 0.6511549949645996, -0.21352432668209076, 0.3303191065788269, -0.4098541736602783, 0.31914854049682617, 0.26558253169059753, -0.20557045936584473, 0.330650269985199, -0.028565648943185806, 0.40957215428352356, 0.0787227526307106, -0.009647663682699203, 0.4893660247325897, -0.1775600165128708, 0.31364282965660095, 0.15041059255599976, 0.07618175446987152, 0.37186816334724426, -0.0406486913561821, -0.18454405665397644, -0.11051410436630249, -0.1071634441614151, 0.07860352843999863, 0.07524879276752472, 0.16725414991378784, -0.20867064595222473, 0.276738703250885, 0.19121070206165314, 0.3572307229042053, 0.16338856518268585, 0.20940670371055603, -0.23248887062072754, 0.09987440705299377, 0.4095522463321686, -0.023355966433882713, 0.1845775842666626, 0.14176639914512634, -0.3438040018081665, 0.0417972132563591, 0.020726006478071213, -0.01702876016497612, 0.017278460785746574, 0.24636396765708923, -0.17327891290187836, -0.05267995595932007, 0.21483340859413147, 0.29279541969299316, 0.30839061737060547, -0.06165790930390358, -0.14914679527282715, 0.026728695258498192, -0.12757231295108795, -0.1684267520904541, 0.3210414946079254, 0.3712770342826843, -0.08640669286251068, 0.2834063768386841, 0.10521852970123291, -0.06639612466096878, -0.4625815451145172, -0.13998320698738098, 0.11659596115350723, 0.18084947764873505, -0.612250804901123, 0.14959612488746643, -0.2159741222858429, -0.16699206829071045, -0.2239597886800766, 0.04878241568803787, -0.42752689123153687, -0.3954008221626282, -0.07361836731433868, 0.2628181576728821, -0.44333603978157043, -0.0038208812475204468, -0.2800581455230713, 0.33701324462890625, 0.017631560564041138, 0.29494214057922363, 0.05060480535030365, -0.10700035840272903, -0.08237345516681671, -0.09216105937957764, 0.10486789047718048, -0.30124181509017944, 0.12147880345582962, -0.22688496112823486, 0.13715732097625732, -0.5803179740905762, -0.1423576921224594, 0.3004574775695801, 0.07903420180082321, 0.12404653429985046, 0.08588050305843353, 0.13927213847637177, -0.22440552711486816, -0.16106274724006653, 0.13689298927783966, 0.1888943314552307, 0.08987265080213547, 0.26420140266418457, -0.062311042100191116, 0.08602101355791092, 0.1270870715379715, 0.028624296188354492, 0.16411304473876953, -0.4027656614780426, 0.2627314031124115, -0.193173348903656, 0.18966515362262726, -0.1445847898721695, -0.11715415120124817, 0.019943691790103912, -0.14017324149608612, -0.012395823374390602, -0.0659443736076355, -0.8555179238319397, 0.3188782334327698, -0.10088853538036346, -0.2066129893064499, -0.0030669420957565308, 0.16384945809841156, 0.12470357120037079, 0.3376142084598541, -0.4241468906402588, -0.26946866512298584, -0.22868098318576813, -0.06590334326028824, -0.15028557181358337, 0.1089400127530098, -0.003155849874019623, -0.15887629985809326, 0.01584462821483612, -0.03151727840304375, 0.04305429756641388, 0.18267321586608887, 0.2849319577217102, 0.23950356245040894, -0.026885105296969414, 0.4528467357158661, 0.005732789635658264, 0.3141430616378784, 0.3306630253791809, 0.2839587330818176, 0.5497276186943054, -0.0018575415015220642, 0.2872813045978546, 0.1868283599615097, -0.05232542008161545, 0.03644433245062828, -0.1970205307006836, -0.14365491271018982, 0.254458487033844, 0.13426965475082397, 0.21452727913856506, -0.19766682386398315, -0.24735745787620544, 0.01562592387199402, -0.22945502400398254, 0.026850489899516106, -0.48607173562049866, 0.2694200873374939, 0.08030916750431061, 0.041126884520053864, 0.15169356763362885, -0.08215107768774033, -0.06762069463729858, 0.08130106329917908, 0.16521668434143066, 0.028559528291225433, -0.03482794016599655, -0.008382786065340042, -0.4206946790218353, 0.09163278341293335, 0.09905307739973068, 0.7096068263053894, -0.0615299716591835, -0.12938912212848663, 0.2116037905216217, 0.010657928884029388, 0.39509162306785583, -0.3172484040260315, 0.012574898079037666, -0.2421964406967163, 0.04231882095336914, -0.5206639766693115, -0.0050808340311050415, -0.004529736936092377, 0.32748132944107056, 0.2589341402053833, 0.4298582673072815, -0.4116394519805908, -0.04754411056637764, 0.0803312435746193, -0.2097700983285904, -0.04071522131562233, 0.1626887172460556, -0.47547170519828796, -0.2500946521759033, -0.14146867394447327, 0.07308825105428696, 0.2419528365135193, 0.0035720691084861755, -0.2041843831539154, 0.28397437930107117, -0.044327471405267715, -0.015516042709350586, 0.1918792426586151, -0.03469420596957207, 0.3075754642486572, -0.3205716609954834, 0.43420541286468506, 0.34288352727890015, 0.5453113913536072, 0.13054607808589935, 0.7411035299301147, 0.008386833593249321, -0.6654378175735474, 0.3813937306404114, 0.2571749687194824, 0.2564491927623749, 0.606289267539978, -0.03342883288860321, 0.1426626741886139, 0.10491780936717987, 0.32428258657455444, -0.14262592792510986, 0.16808241605758667, 0.33423516154289246, -0.18668141961097717, -0.4840812683105469, -0.08128422498703003, 0.3273612856864929, -0.005633346736431122, -0.018827445805072784, 0.12816433608531952, 0.3300391733646393, -0.08899201452732086, 0.006897959858179092, 0.03414777293801308, 1.019761323928833, 0.053157221525907516, 0.21712079644203186, 0.09811221808195114, -0.2882554233074188, 0.5061947107315063, -0.3468606472015381, 0.12844529747962952, -0.4757455885410309, -0.10918602347373962, -0.01360352337360382, -0.09119898080825806, -0.10634923726320267, -0.05248023942112923, -0.028233066201210022, 0.32107552886009216, -0.017837367951869965, 0.4316791892051697, 0.09291714429855347, 0.16111144423484802, -0.4321517050266266, -0.14563791453838348, -0.4679882228374481, -0.04537387564778328, -0.2641971707344055, -0.036326318979263306, -0.13536086678504944, -0.13826924562454224, 0.10615428537130356, -0.4177361726760864, -0.20005109906196594, -0.00033511966466903687, -0.10809265077114105, 0.23594655096530914, 0.05139743536710739, -0.3846437335014343, -0.09776482731103897, -0.046796396374702454, 0.05883149057626724, -0.10908280313014984, -0.05633845925331116, 0.29460397362709045, -0.10369241237640381, 0.25387072563171387, 0.008054818958044052, -0.10652114450931549, 0.1780494898557663, 0.0226130411028862, -0.11851784586906433, 0.17838791012763977, -0.03330677002668381, -0.0030749067664146423, -0.30997976660728455, 0.19416624307632446, 0.10190753638744354, -0.1199241429567337, 0.17343232035636902, -0.1859561800956726, -0.1432022750377655, -0.2118232697248459, -0.042621396481990814, 0.13449102640151978, -0.10999070852994919, 0.09605901688337326, 0.05924689769744873, -0.3104195296764374, -0.07502275705337524, 0.5249305367469788, -0.15637975931167603, -0.023470886051654816, 0.16096079349517822, 0.11795837432146072, -0.30359235405921936, 0.029589585959911346, 0.18040309846401215, -0.11649274080991745, -0.5765732526779175, 0.15966321527957916, -0.2519155442714691, -0.015898793935775757, -0.22581864893436432, -0.0486895926296711, -0.008237045258283615, -0.04696470871567726, -0.1391143500804901, -0.2623436152935028, -0.07387153059244156, 0.32643502950668335, -0.07572051137685776, -0.04779554903507233, 0.07069860398769379, -0.09862690418958664, 0.08551457524299622, -0.18132412433624268, -0.0911041721701622, 0.27499204874038696, -0.08627867698669434, 0.1121857613325119, 0.013174600899219513, -0.14820066094398499, 0.23615092039108276, -0.23861165344715118, -0.20424272119998932, 0.2226412147283554, 0.06953206658363342, 0.061504825949668884, -0.166920006275177, 0.22030295431613922, 0.09317873418331146, -0.27773547172546387, -0.34477245807647705, 0.06736557185649872, 0.035880133509635925, 0.09807208180427551, 0.21973396837711334, 0.3733527362346649, -0.004801902920007706, -0.5639166831970215, 0.1510172188282013, -0.09470643848180771, -0.2933691442012787, 0.40253451466560364, 0.14065779745578766, 0.3823642432689667, 0.011888597160577774, 0.17359128594398499, 0.0007951259613037109, -0.16897563636302948, 0.14607955515384674, 0.2095707207918167, 0.3190028667449951, -0.16734574735164642, 0.24086084961891174, -0.4783458411693573, 0.09576575458049774, 0.04329719394445419, 0.1891784965991974, 0.4678424596786499, -0.09056324511766434, -0.4894031286239624, 0.18036586046218872, 0.015209009870886803, 0.09686841070652008, -0.26079145073890686, 0.10626772046089172, 0.07290369272232056, -0.07329972088336945, 0.0849592536687851, 0.25038355588912964, -0.3534901738166809, -0.295000821352005, 0.29196488857269287, 0.5073562264442444, 0.2431287169456482, 0.19352246820926666, 0.23567581176757812, 0.18957629799842834, 0.10859668254852295, -0.13063450157642365, -0.05761494114995003, 0.06744387000799179, 0.4154256582260132, -0.05511883273720741, 0.15863031148910522, 0.0007302723824977875, -0.13447131216526031, 0.258188933134079, -0.4820250868797302, -0.2258700132369995, 0.10853177309036255, -0.2744225859642029, 0.08310365676879883, -0.2313379943370819, 0.7644414305686951, 0.09496366232633591, -0.06422585994005203, -0.3673376739025116, 0.27588579058647156, -0.15686926245689392, -0.08982204645872116, -0.0481451116502285, -0.20955924689769745, -0.18224412202835083, 0.3722248375415802, -0.07823806256055832, 0.27425533533096313, 0.14035704731941223, 0.20170211791992188, 0.19801174104213715, -0.30333971977233887, -0.012817848473787308, 0.3088618218898773, 0.3186323940753937, -0.1443990021944046, 0.4410896897315979, 0.6181504130363464, -0.12263123691082001, 0.3608301877975464, 0.01645803265273571, 0.5661805272102356, 0.10305178165435791, -0.07626405358314514, 0.18596620857715607, 0.09776881337165833, 0.2110048532485962, -0.022475555539131165, 0.09037983417510986, -0.15529479086399078, -0.16951121389865875, 0.35793977975845337, -0.009985620155930519, -0.041285451501607895, 0.052751604467630386, -0.2274063527584076, 0.16304843127727509, -0.1524517685174942, 0.16100265085697174, -0.32655203342437744, -0.025905422866344452, -0.22791306674480438, -0.16830086708068848, -0.4317322075366974, 0.12829338014125824, 0.4793339967727661, -0.16311612725257874, 0.007963061332702637, -0.16751742362976074, -0.0529576912522316, -0.13345055282115936, 0.9205738306045532, 0.2560823857784271, -0.21817532181739807, -0.24679982662200928, -0.3968575596809387, -0.3903970718383789, 0.15272361040115356, -0.1467907428741455, 0.15076538920402527, 0.10183476656675339, 0.2021477222442627, -0.3132683336734772, 0.20067967474460602, 0.10606424510478973, 0.2352461814880371, -0.5360376834869385, 0.34090471267700195, -0.10899443924427032, -0.04042832553386688, -0.05499086529016495, 0.038410983979701996, -0.07540322840213776, -0.0892721489071846, 0.48329365253448486, 0.29282504320144653, -0.12660017609596252, 0.14312633872032166, -0.15975388884544373, -0.2924485206604004, -0.47435837984085083, -0.0570555254817009, 0.31711554527282715, 0.30722537636756897, 0.10390964150428772, -0.3858226537704468, -0.3338167667388916, -0.5497469902038574, -0.03785398229956627, 0.0984053909778595, -0.08973702043294907, 0.34696164727211, 0.051265276968479156, -0.14142708480358124, -0.22974924743175507, 0.4220114052295685, 0.07918164134025574, 0.06415876746177673, -0.14108118414878845, -0.1482563465833664, 0.06182734668254852, 0.27667471766471863, 0.11395929753780365, 0.44164493680000305, 0.10638823360204697, 0.31401628255844116, -0.07405323535203934, -0.7448225617408752, 0.5567172169685364, -0.4150905907154083, -0.05144559219479561, -0.2703673839569092, 0.46540409326553345, 0.6008333563804626, -0.00043955445289611816, -0.26801174879074097, -0.07360287010669708, 0.07351283729076385, -0.033120956271886826, -0.01746033877134323, 0.05493350327014923, -0.08129412680864334, -0.1256699413061142, -0.013926409184932709, -0.194503054022789, 0.10245335102081299, -0.28349098563194275, 0.4803299307823181, -0.11475228518247604 ]
https://github.com/huggingface/datasets/issues/6568
Seems like I just used the old code which did not have `keep_in_memory=True` argument, sorry. Although i encountered a different problem – at 97% my python process just hung for around 11 minutes with no logs (when running dataset.map without `keep_in_memory=True` over around 3 million of dataset samples)...
keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
48
keep_in_memory=True does not seem to work UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( Seems like I just used the old code which did not have `keep_in_memory=True` argument, sorry. Although i encountered a different problem – at 97% my python process just hung for around 11 minutes with no logs (when running dataset.map without `keep_in_memory=True` over around 3 million of dataset samples)...
[ -0.5037835240364075, -0.29181116819381714, -0.12347058951854706, 0.014672212302684784, 0.3082585036754608, -0.032749563455581665, 0.06944156438112259, 0.22768092155456543, 0.14811402559280396, 0.21746718883514404, -0.13731825351715088, 0.2877124547958374, -0.2045990377664566, 0.29882973432540894, -0.12862589955329895, 0.15352129936218262, 0.10632164776325226, 0.0549330897629261, -0.16557031869888306, -0.007164791226387024, -0.275452584028244, 0.11598708480596542, -0.3187810778617859, -0.18235576152801514, -0.30599239468574524, -0.05199853330850601, 0.0767739936709404, -0.04706953093409538, -0.07505758851766586, -0.3602343201637268, 0.12010399997234344, 0.07784105837345123, -0.24763518571853638, 0.4803788959980011, -0.00010249038314213976, 0.05173367261886597, 0.38155660033226013, 0.12593665719032288, -0.22589443624019623, -0.01163455843925476, 0.02087462693452835, -0.1546342521905899, 0.020442768931388855, -0.028541482985019684, -0.1147371381521225, -0.007442742586135864, 0.14353220164775848, -0.3624698519706726, 0.42005354166030884, 0.008349470794200897, 0.3454478979110718, 0.44653603434562683, 0.12267833948135376, -0.07657814025878906, 0.04115266352891922, 0.12131746858358383, -0.06549707055091858, 0.09637050330638885, 0.14788833260536194, -0.2264476716518402, -0.06817632913589478, 0.4063165485858917, -0.08390946686267853, 0.12046931684017181, 0.04752999544143677, -0.02551751211285591, -0.18666592240333557, -0.26629799604415894, 0.2845291793346405, 0.13695552945137024, 0.1279313564300537, -0.17488320171833038, -0.2890092730522156, -0.33573609590530396, -0.1848001629114151, -0.2687380313873291, 0.12658408284187317, 0.1439673900604248, -0.2822686731815338, 0.06144312396645546, -0.36983293294906616, -0.12365024536848068, 0.014212250709533691, -0.04472370818257332, -0.21047541499137878, 0.050871800631284714, -0.18978899717330933, 0.06323596090078354, 0.3802511990070343, -0.08110573142766953, -0.35178712010383606, 0.10103416442871094, -0.028701800853013992, -0.059580959379673004, -0.46616071462631226, 0.00981517881155014, 0.3747028410434723, 0.21672427654266357, 0.3365113139152527, -0.1387670934200287, -0.11491270363330841, 0.15411892533302307, 0.13596759736537933, 0.10210546851158142, 0.27772149443626404, 0.13400542736053467, -0.051819853484630585, 0.10614444315433502, 0.556812584400177, -0.032551560550928116, -0.2049024999141693, 0.005117945373058319, 0.23321190476417542, -0.3166777491569519, 0.26170647144317627, -0.2650798559188843, 0.3934401571750641, -0.19274738430976868, -0.04550008103251457, 0.20194798707962036, 0.029496125876903534, 0.16796602308750153, -0.03512465953826904, 0.4332428276538849, -0.01847190223634243, -0.03628198057413101, 0.17418722808361053, -0.18730951845645905, -0.34913548827171326, 0.0979585349559784, -0.29705682396888733, -0.016252560541033745, -0.3040006756782532, -0.061237409710884094, 0.17442210018634796, -0.10713164508342743, 0.4727219045162201, 0.015944499522447586, -0.008489884436130524, 0.10230370610952377, 0.1679242104291916, -0.27985307574272156, 0.3125671148300171, 0.41218429803848267, -0.029335398226976395, 0.1622910350561142, -0.09403269737958908, 0.08778363466262817, -0.056810662150382996, 0.2851606607437134, 0.11636726558208466, -0.20394299924373627, 0.22161875665187836, 0.25072991847991943, -0.06944964081048965, -0.009664701297879219, -0.3128071129322052, 0.08037739992141724, 0.2942344844341278, 0.10249489545822144, -0.007904447615146637, -0.13010725378990173, -0.17004132270812988, -0.06660006195306778, 0.27546417713165283, 0.42602062225341797, -0.11877154558897018, -0.0020347759127616882, -0.01682627573609352, -0.182029128074646, -0.06496299803256989, 0.3628074824810028, 0.02607591077685356, -0.015502702444791794, -0.2541733384132385, 0.07615940272808075, -0.053491994738578796, -0.17528733611106873, -0.331194132566452, 0.026325900107622147, -0.07935549318790436, -0.08663555234670639, -0.17194151878356934, 0.06138676032423973, 0.24843257665634155, 0.19773660600185394, 0.20281851291656494, 0.04844822362065315, -0.031241081655025482, 0.289880633354187, -0.23708689212799072, -0.19826176762580872, 0.011494047939777374, 0.2366209626197815, 0.06873974949121475, -0.22341319918632507, -0.010081678628921509, -0.008416388183832169, 0.35756585001945496, 0.023582955822348595, 0.11322606354951859, 0.28546881675720215, 0.3423699736595154, -0.14166922867298126, -0.11809144914150238, -0.2589459717273712, -0.30100369453430176, 0.09711018204689026, 0.17341238260269165, 0.04815123602747917, -0.182968407869339, -0.1040821373462677, 0.018674444407224655, 0.0784032940864563, -0.16008713841438293, -0.25850796699523926, 0.21190384030342102, -0.06875165551900864, 0.061140745878219604, 0.27127689123153687, -0.19948896765708923, 0.10204306989908218, 0.053478024899959564, 0.0910709798336029, -0.4021000266075134, 0.09747209399938583, 0.057586729526519775, -0.3263404667377472, 0.1574302464723587, -0.017799928784370422, -0.02998247742652893, 0.02806267887353897, -0.1119438111782074, 0.3463819622993469, 0.06389184296131134, 0.24642038345336914, -0.1228875145316124, 0.01206786185503006, 0.1828273981809616, 0.018889382481575012, 0.14156723022460938, -0.06921269744634628, -0.034042540937662125, 0.029617831110954285, -0.1243840754032135, 0.11718631535768509, 0.09383618831634521, 0.279622346162796, 0.16721075773239136, -0.07576820999383926, 0.17763996124267578, -0.03113037720322609, -0.09498333930969238, -0.11115729063749313, 0.257642924785614, 0.09155549108982086, 0.32346364855766296, 0.09076488763093948, -0.259543776512146, 0.10810630023479462, 0.617824137210846, 0.028561294078826904, 0.07363233715295792, 0.1169939637184143, -0.179660826921463, -0.15384188294410706, 0.2524823248386383, 0.015807025134563446, 0.32683002948760986, 0.3379792273044586, 0.24769265949726105, 0.05354958772659302, -0.02901756577193737, -0.09096819162368774, 0.2468603253364563, 0.08491726964712143, 0.008602172136306763, 0.09967860579490662, 0.2151777744293213, -0.3715510368347168, -0.5469002723693848, 0.0346808135509491, -0.03272368386387825, 0.1422475129365921, -0.10581126064062119, -0.2109609842300415, -0.24948765337467194, -0.057516686618328094, 0.06798112392425537, 0.10242906212806702, -0.2720481753349304, -0.33172324299812317, 0.001983080990612507, 0.2822442352771759, -0.28525155782699585, 0.4085726737976074, 0.07176724076271057, 0.11249257624149323, 0.22510981559753418, -0.016614684835076332, -0.22440806031227112, -0.27750182151794434, -0.00600481079891324, 0.1291276216506958, 0.08510399609804153, -0.10035504400730133, 0.5298952460289001, 0.09763221442699432, -0.20158971846103668, -0.200644388794899, -0.2721961736679077, 0.14775536954402924, -0.13437415659427643, 0.1843968778848648, 0.15815040469169617, 0.42412635684013367, 0.06060586869716644, 0.12339504808187485, 0.2645522356033325, -0.5142367482185364, -0.2351801097393036, -0.08321066200733185, 0.19927069544792175, -0.025635601952672005, -0.21625405550003052, -0.1785011738538742, -0.2061380296945572, -0.48711687326431274, 0.5636680126190186, -0.12480546534061432, -0.07927583158016205, 0.2872636020183563, 0.2601504325866699, 0.2077801674604416, -0.15376439690589905, -0.04750952869653702, -0.390525758266449, -0.3946371078491211, 0.22795408964157104, -0.29259729385375977, -0.27530840039253235, 0.05064105987548828, 0.22150984406471252, 0.02028309367597103, 0.09739787876605988, -0.4046177268028259, -0.3588367700576782, -0.5100377798080444, 0.16217543184757233, 0.0861155092716217, 0.24100494384765625, 0.19848985970020294, -0.01637454517185688, -0.30279189348220825, -0.05008368939161301, -0.22608640789985657, 0.17892886698246002, -0.06042816862463951, -0.08375898003578186, -0.01067289337515831, 0.3854925334453583, 0.1806248277425766, 0.3795938789844513, 0.2953445017337799, 0.10525007545948029, 0.002298913896083832, -0.12453220784664154, 0.5051476955413818, -0.4441539943218231, -0.21181423962116241, 0.0798448845744133, -0.050797730684280396, -0.16854476928710938, 0.10784901678562164, 0.16535402834415436, -0.11203564703464508, -0.007048264145851135, -0.1728724241256714, 0.059797510504722595, -0.3547194004058838, -0.024076813831925392, 0.2956535220146179, 0.04113934561610222, 0.12917287647724152, 0.1363878846168518, -0.13128727674484253, -0.12569560110569, 0.14100036025047302, -0.05080053582787514, 0.07478632032871246, -0.2715843915939331, -0.3536982536315918, 0.06126852706074715, -0.8544574975967407, 0.26988595724105835, -0.1572260707616806, 0.23292607069015503, -0.0732157826423645, -0.14698779582977295, -0.01663810759782791, -0.06641952693462372, 0.6519909501075745, -0.00793717335909605, 0.06317823380231857, -0.05014696717262268, -0.22777003049850464, -0.27645859122276306, 0.22391757369041443, -0.12094287574291229, 0.1789100468158722, 0.17272445559501648, 0.3531675338745117, -0.2728424668312073, -0.15393519401550293, 0.2190573811531067, 0.15408316254615784, -0.0406566821038723, -0.057800501585006714, -0.318667471408844, -0.3207644522190094, -0.2622770071029663, 0.20975475013256073, 0.2436915785074234, -0.2072480320930481, -0.0009195581078529358, -0.3772742450237274, -0.11469153314828873, -0.2725306749343872, -0.00763113796710968, 0.07197390496730804, 0.3255554437637329, -0.02693270891904831, 0.3300155997276306, 0.24896548688411713, -0.017146524041891098, 0.25573286414146423, 0.4418405294418335, -0.27755680680274963, 0.0002685263752937317, 0.08773814141750336, -0.006728176027536392, 0.302693247795105, 0.33157455921173096, -0.0797237753868103, 0.15631398558616638, -0.07230626046657562, 0.491380512714386, -0.4566209316253662, 0.17741602659225464, 0.183791846036911, 0.37590208649635315, -0.2085428237915039, -0.2014622688293457, 0.30624592304229736, 0.15685006976127625, 0.03388592600822449, 0.3972787857055664, -0.0000805780291557312, -0.30822208523750305, 0.19613124430179596, -0.08129627257585526, 0.7626072764396667, -0.16925878822803497, 0.2584724426269531, 0.16896715760231018, -0.0026512891054153442, 0.17371414601802826, -0.04340082406997681, 0.06885514408349991, -0.26657044887542725, -0.26475054025650024, 0.13297145068645477, 0.0028564780950546265, 0.18094202876091003, -0.1626219004392624, -0.04724786430597305, 0.10726289451122284, 0.14924558997154236, 0.18457376956939697, -0.34440386295318604, 0.1924269050359726, -0.027025854215025902, -0.3089561462402344, -0.38095682859420776, 0.30860990285873413, 0.18177610635757446, -0.029269905760884285, -0.04876795783638954, 0.07350486516952515, 0.19542743265628815, -0.13735555112361908, -0.1495414674282074, -0.04636796563863754, -0.2537527084350586, 0.26689133048057556, -0.1418142169713974, -0.07040712237358093, -0.17056694626808167, 0.06923562288284302, 0.04971325024962425, 0.30272597074508667, -0.04199014604091644, 0.23120395839214325, -0.07552269846200943, 0.11896444857120514, 0.03777359053492546, -0.0011169835925102234, 0.1719733029603958, 0.007792025804519653, -0.22227123379707336, -0.004374286159873009, -0.12217199057340622, -0.2525942027568817, -0.07389409840106964, 0.02596125565469265, -0.18842823803424835, -0.22233858704566956, -0.005762241780757904, -0.051758185029029846, -0.07042296230792999, -0.1439674198627472, 0.21556447446346283, 0.2369375079870224, -0.03340299800038338, 0.4123642146587372, 0.01480117253959179, -0.24706321954727173, -0.13690605759620667, 0.4746687114238739, -0.1341458559036255, 0.3414495587348938, 0.33177924156188965, 0.09954883903265, -0.3330954611301422, -0.2995886504650116, 0.01381133496761322, 0.16365090012550354, -0.05590495467185974, 0.48369142413139343, 0.07760006189346313, 0.04530663788318634, 0.03695300593972206, 0.08588850498199463, -0.1446191519498825, -0.20436275005340576, -0.001203484833240509, -0.11804617196321487, -0.6011271476745605, 0.19207319617271423, -0.02760440669953823, 0.4238705337047577, -0.0036136656999588013, 0.07775299996137619, -0.0235418900847435, -0.035572610795497894, -0.4508097171783447, -0.08985385298728943, -0.26987355947494507, 0.08033104240894318, 0.2636842727661133, -0.2233455628156662, 0.29157212376594543, -0.2038598656654358, 0.19257313013076782, 0.4304125905036926, -0.2724350094795227, -0.34627532958984375, -0.008782241493463516, 0.04258604347705841, -0.052871428430080414, -0.08669914305210114, 0.126791849732399, -0.16512559354305267, 0.012739578261971474, -0.25218769907951355, 0.33505678176879883, 0.2384990006685257, 0.014188585802912712, 0.05907053500413895, 0.07551383227109909, -0.0015271548181772232, 0.36171871423721313, 0.16706426441669464, -0.0031859204173088074, -0.16586825251579285, 0.04243805259466171, 0.0024740202352404594, -0.10864343494176865, 0.011339791119098663, 0.0594964437186718, 0.04019976779818535, 0.02737155370414257, 0.06662856042385101, 0.23155297338962555, -0.09048689901828766, -0.29589521884918213, 0.2109367996454239, 0.6399414539337158, 0.38284119963645935, -0.11719780415296555, -0.17746055126190186, 0.2689012289047241, 0.3647826015949249, -0.31351885199546814, 0.0211675763130188, 0.2580697238445282, -0.06566942483186722, 0.3154837489128113, 0.13210166990756989, -0.0930526852607727, 0.14854483306407928, -0.004576206207275391, 0.29431191086769104, 0.31831908226013184, -0.29743343591690063, 0.05174177885055542, -0.060806650668382645, 0.018626883625984192, -0.05768538638949394, 0.3913150727748871, 0.3816699981689453, 0.30679047107696533, 0.4986681640148163, -0.11099377274513245, 0.2365117371082306, -0.16926181316375732, 0.2737438380718231, -0.1957969069480896, -0.3212488293647766, 0.18562862277030945, 0.36194324493408203, -0.3765043616294861, 0.1629592478275299, 0.017665740102529526, 0.35642173886299133, -0.20900914072990417, -0.29626038670539856, -0.22838540375232697, 0.4613748788833618, -0.23948198556900024, -0.17476786673069, 0.3602641820907593, -0.08141003549098969, 0.005210086703300476, 0.22175699472427368, 0.1276531219482422, -0.1387622356414795, 0.37165367603302, 0.001034887507557869, -0.02970051020383835, -0.21938855946063995, -0.07491305470466614, -0.09473404288291931, 0.29985663294792175, -0.1543775498867035, -0.06496413797140121, -0.013350024819374084, 0.034999191761016846, -0.22657500207424164, 0.3398306965827942, 0.34870773553848267, 0.201370969414711, -0.15565872192382812, 0.19235140085220337, -0.007483590394258499, -0.05460526421666145, -0.33466339111328125, 0.2736705243587494, -0.03377041593194008, 0.15181699395179749, 0.22000929713249207, 0.24566082656383514, -0.29664671421051025, 0.0717356875538826, 0.011998878791928291, 0.08555460721254349, -0.3438021242618561, 0.10637839138507843, 0.13648010790348053, -0.30720484256744385, -0.23070216178894043, -0.34896519780158997, -0.35805797576904297, -0.14737752079963684, 0.1818852424621582, -0.42975714802742004, 0.10976926982402802, -0.27157872915267944, 0.16410747170448303, -0.0938938558101654, 0.4737684726715088, 0.07643100619316101, -0.02416757121682167, -0.20770014822483063, -0.054441675543785095, -0.7003724575042725, -0.1550997644662857, -0.2110345959663391, -0.09320367127656937, -0.17945316433906555, 0.14064714312553406, -0.04602175951004028, -0.016240524128079414, 0.10612793266773224, -0.17342545092105865, 0.010475825518369675, -0.02488798275589943, -0.24906224012374878, 0.059487901628017426, -0.20165716111660004, -0.08984234184026718, 0.2186451107263565, -0.3949018716812134, 0.1505843997001648, -0.20553404092788696, 0.142907053232193, -0.09532414376735687, 0.1988769769668579, -0.027684848755598068, 0.037868354469537735, 0.4251376986503601, 0.12305150926113129, -0.006416656076908112, -0.11994977295398712, -0.20152175426483154, -0.20024311542510986, -0.1711677610874176, -0.162582665681839, -0.17853830754756927, 0.05197589099407196, 0.3508046269416809, -0.17110295593738556, -0.33817681670188904, -0.20157423615455627, 0.12113184481859207, 0.05710804462432861, -0.06887851655483246, 0.04046206176280975, 0.19910332560539246, 0.17954784631729126, 0.09737157821655273, 0.008256234228610992, 0.4219166040420532, -0.12768298387527466, 0.1378035992383957, -0.38622230291366577, -0.4040508270263672, 0.4103242754936218, -0.38890311121940613, -0.281185507774353, -0.10803684592247009, 0.21590906381607056, 0.12759673595428467, -0.3243325650691986, -0.577500581741333, 0.02792412042617798, 0.15833619236946106, 0.04595794156193733, -0.3311629891395569, 0.32235509157180786, -0.1471520960330963, -0.03419409319758415, -0.15183308720588684, 0.5162773132324219, 0.18694309890270233, -0.34409549832344055, 0.3139776885509491, -0.09894512593746185 ]
https://github.com/huggingface/datasets/issues/6568
Can you open a new issue and provide a bit more details ? What kind of map operations did you run ?
keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
22
keep_in_memory=True does not seem to work UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( Can you open a new issue and provide a bit more details ? What kind of map operations did you run ?
[ -0.3748677968978882, -0.49990132451057434, -0.11895636469125748, 0.2844051420688629, 0.3289105296134949, -0.2569744288921356, 0.14168044924736023, 0.1253788322210312, 0.10821300745010376, 0.3469023108482361, -0.14063313603401184, 0.25066202878952026, -0.0918361097574234, 0.2976199984550476, -0.05970807000994682, 0.11980603635311127, 0.020184140652418137, 0.09874440729618073, -0.3077094852924347, -0.08217497169971466, -0.18651646375656128, 0.10428296029567719, -0.18431994318962097, -0.1975100338459015, -0.22302846610546112, -0.04478062689304352, -0.05312839895486832, 0.22295349836349487, -0.14082171022891998, -0.172740638256073, 0.05876965820789337, 0.07440710067749023, -0.33300402760505676, 0.2317264974117279, -0.00009949349623639137, 0.10695318132638931, 0.2392432987689972, -0.033344343304634094, -0.11180027574300766, 0.13491690158843994, -0.06368723511695862, -0.08409987390041351, -0.11728879064321518, -0.056987613439559937, -0.1339026242494583, 0.11455637216567993, 0.05519378185272217, -0.27211880683898926, 0.44077417254447937, -0.02771953120827675, 0.3935902714729309, 0.3193121552467346, 0.1444503664970398, -0.08760534226894379, 0.09327071160078049, 0.19484363496303558, -0.009339280426502228, 0.059764761477708817, 0.09506207704544067, -0.15492451190948486, -0.08775176107883453, 0.47716453671455383, -0.035314593464136124, 0.16602446138858795, 0.16720515489578247, 0.06147710233926773, -0.16606038808822632, 0.00760231539607048, 0.2716730535030365, 0.030725087970495224, 0.0694434642791748, -0.07590481638908386, -0.09531305730342865, -0.25001561641693115, -0.2844617962837219, -0.23704548180103302, 0.19374965131282806, -0.007756344974040985, -0.2079554796218872, 0.15029707551002502, -0.22563599050045013, -0.17801903188228607, 0.0354267954826355, 0.03899544104933739, -0.14695854485034943, 0.004043370485305786, -0.21927779912948608, -0.027474049478769302, 0.46228739619255066, -0.17522229254245758, -0.30221083760261536, 0.1759909689426422, -0.24297748506069183, -0.006349558010697365, -0.1693500578403473, -0.06890831142663956, 0.2765328586101532, 0.16397961974143982, 0.34299081563949585, -0.05848018825054169, 0.07465203106403351, 0.3174237906932831, 0.14134763181209564, 0.14326652884483337, 0.1401401162147522, 0.2168641835451126, -0.04168760031461716, 0.06290249526500702, 0.4237405061721802, 0.06119144335389137, -0.11339814960956573, -0.1297009140253067, 0.16216987371444702, -0.1531054973602295, 0.0794273242354393, -0.2392638772726059, 0.3217742443084717, -0.21018919348716736, 0.043325915932655334, 0.08401413261890411, 0.08149991929531097, 0.07310082018375397, -0.0015542879700660706, 0.4603322446346283, 0.06430016458034515, -0.16522058844566345, 0.09318187087774277, -0.025729862973093987, -0.2984858453273773, -0.033520717173814774, -0.4251870810985565, -0.04766687750816345, -0.2511928975582123, 0.08086544275283813, 0.1321374475955963, 0.054546188563108444, 0.4426302909851074, -0.03677420690655708, -0.11032917350530624, 0.01351737231016159, 0.07016069442033768, -0.14959418773651123, 0.3142413794994354, 0.21540144085884094, -0.04444519802927971, 0.11243894696235657, 0.04176200181245804, -0.007434174418449402, 0.13205057382583618, 0.10759931802749634, -0.0814671590924263, -0.25155338644981384, 0.17229335010051727, 0.3198665976524353, 0.06748761236667633, 0.00681169331073761, -0.2521425783634186, 0.1511092483997345, 0.3088558614253998, 0.08793861418962479, -0.08117102831602097, 0.09702648967504501, -0.31437087059020996, -0.048246465623378754, 0.17408348619937897, 0.3933316469192505, -0.18928280472755432, -0.10707926005125046, 0.17048028111457825, -0.19389089941978455, 0.04169483855366707, 0.3848651051521301, -0.0703044906258583, -0.14310961961746216, -0.2738276720046997, 0.2251555621623993, -0.07737848907709122, -0.18717651069164276, -0.44418397545814514, -0.03084097057580948, -0.1399168223142624, -0.1456916630268097, -0.09291127324104309, -0.006618265062570572, 0.16789734363555908, 0.30946892499923706, 0.19379255175590515, -0.015834586694836617, 0.022698184475302696, 0.29488900303840637, -0.33296728134155273, -0.019088372588157654, -0.09127453714609146, -0.013771101832389832, 0.09452188014984131, -0.0928717851638794, 0.04939160495996475, 0.1462092399597168, 0.34187427163124084, -0.02731163054704666, 0.2743295729160309, 0.24584296345710754, 0.3078875243663788, -0.07638220489025116, -0.06037742644548416, -0.09974776208400726, -0.2770719528198242, 0.04049783945083618, 0.025373131036758423, 0.10520395636558533, -0.009978193789720535, -0.05262591317296028, -0.18285465240478516, 0.021020129323005676, -0.06413872539997101, -0.21186500787734985, 0.33505845069885254, 0.060647591948509216, -0.06413985788822174, 0.08157558739185333, -0.151872918009758, 0.14147235453128815, -0.08721660822629929, 0.15396437048912048, -0.27891525626182556, 0.18211829662322998, -0.13077057898044586, -0.3213925361633301, 0.04329301416873932, 0.025691267102956772, 0.02816116251051426, -0.060166649520397186, -0.04243973270058632, 0.21091145277023315, 0.046461451798677444, 0.22687038779258728, -0.16074857115745544, 0.03077729046344757, 0.2094593495130539, -0.159121572971344, 0.10015396028757095, -0.22993215918540955, 0.09972051531076431, -0.10214551538228989, -0.1055605560541153, 0.13090071082115173, 0.05082041025161743, 0.15172848105430603, 0.1986623853445053, -0.11737193167209625, 0.09479545801877975, -0.10457974672317505, 0.09909142553806305, -0.33087772130966187, 0.20170047879219055, 0.08827519416809082, 0.1987900733947754, 0.22033649682998657, -0.22513282299041748, 0.16919194161891937, 0.5853829383850098, 0.22418582439422607, 0.13272619247436523, 0.06667323410511017, -0.15092438459396362, -0.16630832850933075, 0.1667003333568573, 0.026370033621788025, 0.31463855504989624, 0.3028225898742676, 0.16798333823680878, 0.09962686896324158, 0.08429600298404694, -0.14295119047164917, 0.20129966735839844, -0.04737098887562752, 0.01242571696639061, 0.1177787035703659, 0.17907074093818665, -0.39715656638145447, -0.741890013217926, 0.2822563648223877, 0.06425460427999496, 0.1937677264213562, -0.13714057207107544, -0.17801980674266815, -0.2891502380371094, -0.21017678081989288, 0.02487276867032051, 0.06424908339977264, -0.2890172600746155, -0.19726233184337616, 0.09362854808568954, 0.3512144088745117, -0.27291572093963623, 0.34569022059440613, 0.26207348704338074, 0.2179577499628067, 0.0965251624584198, 0.2135656327009201, -0.1926964819431305, -0.14052753150463104, -0.08392749726772308, 0.17928209900856018, 0.03476755693554878, -0.15021158754825592, 0.3050076961517334, 0.09494802355766296, -0.15305601060390472, -0.17369045317173004, -0.26562753319740295, 0.2324819266796112, -0.08092355728149414, 0.14995433390140533, 0.08795028924942017, 0.3646423816680908, -0.15714114904403687, -0.0008408613502979279, 0.2958933711051941, -0.4084019064903259, -0.45488449931144714, -0.06205182895064354, 0.06918598711490631, -0.042104337364435196, -0.33111119270324707, -0.18451842665672302, 0.04813358932733536, -0.4370303153991699, 0.5021949410438538, -0.003763347864151001, 0.034413933753967285, 0.36743223667144775, 0.2332385778427124, 0.058594055473804474, -0.17019444704055786, 0.01668597012758255, -0.5375038981437683, -0.3316696584224701, 0.08801698684692383, -0.31667959690093994, -0.3478384017944336, -0.10026827454566956, 0.15654167532920837, 0.15487056970596313, 0.041570182889699936, -0.3296569287776947, -0.4352273941040039, -0.2598135471343994, 0.09469598531723022, 0.06518875062465668, 0.05064525455236435, 0.2947534918785095, -0.09153810143470764, -0.3478730618953705, -0.20852696895599365, -0.21337981522083282, 0.3790097236633301, -0.024777092039585114, -0.013857003301382065, -0.09460269659757614, 0.29699456691741943, 0.1745387315750122, 0.37046927213668823, 0.11198122799396515, 0.15887832641601562, 0.28055569529533386, -0.12015990912914276, 0.4716363549232483, -0.3175649344921112, -0.2708582878112793, 0.17388945817947388, 0.08771498501300812, -0.05868956074118614, 0.15054060518741608, 0.12927907705307007, -0.1728588193655014, -0.03204595670104027, -0.029400087893009186, 0.050916701555252075, -0.27333328127861023, -0.04385857284069061, 0.4405304789543152, -0.017913855612277985, 0.27990972995758057, 0.041510507464408875, -0.1363847404718399, -0.07094205915927887, 0.1623205989599228, -0.1021396666765213, -0.04872916266322136, -0.1986662745475769, -0.37603867053985596, 0.09285014122724533, -0.7190296053886414, 0.18889279663562775, -0.13513889908790588, 0.047889698296785355, -0.2704117000102997, -0.23312465846538544, 0.090709388256073, -0.05569418519735336, 0.6433628797531128, 0.04493676871061325, 0.035071082413196564, -0.07366912066936493, -0.3152034878730774, -0.19214758276939392, 0.2501184344291687, -0.18339887261390686, 0.042923979461193085, 0.16032475233078003, 0.433919757604599, -0.25621509552001953, -0.1072407066822052, 0.1266861855983734, -0.09966431558132172, -0.19848179817199707, -0.031896211206912994, -0.21431802213191986, -0.31423717737197876, -0.3234539330005646, 0.12631484866142273, 0.19332754611968994, -0.010704174637794495, 0.22229886054992676, -0.3223228454589844, -0.11214423179626465, -0.1837804615497589, -0.0764828622341156, 0.11101874709129333, 0.38737717270851135, 0.02185380458831787, 0.13547348976135254, 0.3103000521659851, 0.08225063979625702, 0.21675749123096466, 0.5323046445846558, -0.11447488516569138, 0.09063975512981415, 0.06747039407491684, -0.1502954661846161, 0.2731176018714905, 0.2846755087375641, -0.04294314235448837, 0.12260738015174866, 0.040077727288007736, 0.3132968246936798, -0.44377392530441284, 0.23288200795650482, 0.19648021459579468, 0.22749844193458557, 0.08511982858181, -0.05580989271402359, 0.21171586215496063, -0.045613981783390045, -0.07385566830635071, 0.3160918951034546, 0.11918690800666809, -0.32190370559692383, 0.21477176249027252, 0.13833585381507874, 0.9003668427467346, -0.08095330744981766, 0.16500461101531982, 0.25271719694137573, -0.07260031998157501, 0.1203811839222908, -0.017654970288276672, 0.05572579801082611, -0.3753812313079834, -0.2359798103570938, 0.15591421723365784, 0.13105833530426025, 0.031754545867443085, -0.06130538508296013, -0.10081803798675537, -0.1149383932352066, 0.21593095362186432, 0.17602279782295227, -0.3710457980632782, -0.14212752878665924, 0.07429290562868118, -0.3368307650089264, -0.27613046765327454, 0.3611154854297638, 0.18425512313842773, 0.0489700548350811, -0.10691791772842407, 0.034355830401182175, 0.19111713767051697, -0.1827060878276825, -0.12267729640007019, -0.04601423442363739, -0.2539278268814087, 0.31187695264816284, -0.015798596665263176, -0.026409178972244263, -0.3856257200241089, 0.055513493716716766, 0.25987520813941956, 0.1925368309020996, -0.019032763317227364, 0.14281141757965088, 0.012575547210872173, 0.06477005779743195, -0.22801923751831055, 0.05705150589346886, 0.19801495969295502, -0.051251012831926346, -0.24508124589920044, -0.07155177742242813, 0.0037471987307071686, -0.2288733273744583, -0.21622906625270844, -0.024608958512544632, -0.19879278540611267, -0.24360986053943634, 0.05386435240507126, -0.0580388680100441, -0.015586026012897491, -0.21781571209430695, 0.280256986618042, 0.09962150454521179, 0.012915138155221939, 0.15880462527275085, 0.3157019317150116, -0.17852945625782013, -0.08342891931533813, 0.5218777656555176, 0.02153085730969906, 0.16034048795700073, 0.2681378424167633, 0.018735378980636597, -0.2793113589286804, -0.37114542722702026, -0.13900823891162872, 0.11041946709156036, -0.05842300131917, 0.4223214387893677, 0.12136724591255188, -0.14382219314575195, 0.010515466332435608, 0.2021077275276184, -0.02829207479953766, -0.038415975868701935, -0.04764683544635773, -0.06688183546066284, -0.6658767461776733, 0.18023711442947388, -0.09829512238502502, 0.39418721199035645, 0.046783447265625, -0.008384188637137413, -0.07008335739374161, 0.19735369086265564, -0.5009440183639526, -0.01973862573504448, -0.3363814949989319, 0.12690004706382751, 0.06914544105529785, -0.30367588996887207, 0.1788996309041977, -0.1770917773246765, 0.22726261615753174, 0.38700971007347107, -0.3704051077365875, -0.40138572454452515, -0.09558417648077011, 0.0537763386964798, 0.06497800350189209, -0.12427940964698792, -0.0010188929736614227, 0.019634217023849487, -0.06324297189712524, -0.21778416633605957, 0.38763558864593506, 0.2684803903102875, 0.018301721662282944, 0.05363054573535919, 0.1926758587360382, -0.017353031784296036, 0.2437094897031784, -0.02970218099653721, 0.1249745637178421, -0.04093823954463005, -0.04316670447587967, -0.20362889766693115, -0.2082592397928238, -0.07187191396951675, 0.1365594118833542, 0.09442894160747528, 0.09903495013713837, 0.039921827614307404, 0.2261071503162384, -0.14283092319965363, -0.2722800374031067, 0.20098762214183807, 0.4573427736759186, 0.046297550201416016, -0.08699226379394531, -0.07399925589561462, 0.16678595542907715, 0.4242320954799652, -0.2979971766471863, -0.05669742822647095, 0.30892837047576904, -0.140764057636261, 0.23095658421516418, 0.19089072942733765, 0.00873509794473648, -0.007769830524921417, 0.00786740705370903, 0.23644615709781647, 0.1627102494239807, -0.34140482544898987, -0.10350942611694336, -0.12016530334949493, -0.196022167801857, -0.06856545805931091, 0.5251096487045288, 0.3520168364048004, 0.37141093611717224, 0.4246827960014343, -0.12836144864559174, 0.17384247481822968, -0.2421666830778122, 0.34189414978027344, -0.08061868697404861, -0.38570868968963623, 0.10149133205413818, 0.3660455346107483, -0.16781461238861084, 0.1670505553483963, -0.05790604278445244, 0.28311407566070557, -0.07546212524175644, -0.27027422189712524, -0.2291860282421112, 0.3116385340690613, -0.4151802361011505, -0.2886396646499634, 0.11867422610521317, -0.13608548045158386, -0.07884213328361511, 0.2110448181629181, 0.13462796807289124, -0.023788508027791977, 0.5373774170875549, -0.10577210038900375, -0.07632069289684296, -0.2881694436073303, -0.11246801912784576, 0.005937889218330383, 0.22049236297607422, -0.1491621732711792, 0.1492404043674469, -0.027791481465101242, 0.04344424232840538, -0.0559689961373806, 0.38223397731781006, 0.24103599786758423, 0.16030292212963104, 0.10014253854751587, 0.18982166051864624, -0.09795483946800232, -0.0850963145494461, -0.47997620701789856, 0.2872130870819092, 0.09150081872940063, 0.2150365561246872, 0.13874715566635132, 0.2679569125175476, -0.35277777910232544, 0.14221903681755066, 0.06748749315738678, 0.14847125113010406, 0.00013694167137145996, -0.07957349717617035, 0.08527970314025879, -0.15775161981582642, -0.2124006152153015, -0.31576284766197205, -0.25399351119995117, -0.09405162185430527, 0.05684706196188927, -0.3796083927154541, 0.29175126552581787, -0.19724400341510773, 0.16211777925491333, 0.00751156359910965, 0.5201836824417114, -0.02420702949166298, -0.25285136699676514, -0.18261924386024475, -0.23214930295944214, -0.6121253371238708, 0.15016776323318481, -0.06799814105033875, 0.11676298081874847, -0.18204742670059204, 0.19914200901985168, -0.03645792230963707, -0.02579863741993904, 0.09724006056785583, -0.15668681263923645, 0.050387755036354065, -0.13580480217933655, -0.41749653220176697, -0.02587067522108555, -0.029584337025880814, -0.10305605083703995, 0.3333725929260254, -0.18187487125396729, 0.16874757409095764, -0.004061322659254074, 0.1887005716562271, -0.08566159009933472, 0.24665014445781708, -0.32551997900009155, 0.03417706489562988, 0.4030531644821167, 0.044075652956962585, 0.0268828384578228, -0.1559140980243683, -0.1455482691526413, -0.07062797248363495, -0.30595308542251587, -0.23000338673591614, -0.1390606313943863, 0.09589678794145584, 0.34144651889801025, -0.1738189160823822, -0.26223325729370117, -0.0878981202840805, 0.23286223411560059, 0.14377166330814362, 0.01891370117664337, -0.08794252574443817, 0.3457202911376953, 0.1719226837158203, 0.0042954012751579285, 0.021373700350522995, 0.31019148230552673, -0.0015756729990243912, 0.0411088764667511, -0.2943633794784546, -0.5705053806304932, 0.4930059611797333, -0.14320774376392365, -0.15882840752601624, -0.02708354964852333, 0.11767958104610443, 0.19851435720920563, -0.43275848031044006, -0.7165586352348328, 0.021250203251838684, 0.12633384764194489, -0.05990437790751457, -0.27181148529052734, 0.3156498372554779, -0.2276005893945694, 0.010012470185756683, -0.16137999296188354, 0.5174587965011597, 0.2719056010246277, -0.2919190227985382, 0.3250465989112854, -0.019553717225790024 ]
https://github.com/huggingface/datasets/issues/6568
Hey. I will try to find some free time to describe it. (can't do it now, cause i need to reproduce it myself to be sure about everything, which requires spinning a new Azuree VM, copying a huge dataset to drive from network disk for a long time etc...)
keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
49
keep_in_memory=True does not seem to work UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( Hey. I will try to find some free time to describe it. (can't do it now, cause i need to reproduce it myself to be sure about everything, which requires spinning a new Azuree VM, copying a huge dataset to drive from network disk for a long time etc...)
[ -0.30082494020462036, -0.45631641149520874, -0.1075349673628807, 0.14783304929733276, 0.19342222809791565, -0.2760157883167267, 0.03683233633637428, 0.1468944251537323, -0.1389954388141632, 0.28641635179519653, -0.086149200797081, 0.16647785902023315, -0.02673282101750374, 0.308779776096344, 0.10982458293437958, 0.13566145300865173, 0.11805873364210129, 0.03258257359266281, -0.1588260531425476, -0.1451004296541214, -0.13876503705978394, 0.18450148403644562, -0.20908913016319275, -0.2822563350200653, -0.17810991406440735, -0.031742364168167114, -0.09117155522108078, 0.2862855792045593, -0.04851476848125458, -0.17018002271652222, -0.030273709446191788, -0.04936989024281502, -0.16204065084457397, 0.16443637013435364, -0.00010415558790555224, 0.08115314692258835, 0.09313318133354187, -0.03815339505672455, -0.196955144405365, 0.1811891347169876, 0.07322296500205994, -0.1597176492214203, -0.08903101086616516, 0.010793164372444153, -0.1342519372701645, 0.039286594837903976, -0.019875241443514824, -0.43840116262435913, 0.4021068513393402, 0.1610317826271057, 0.3293534517288208, 0.4898652136325836, 0.08364672213792801, -0.1310565024614334, -0.006420299410820007, 0.008088544011116028, -0.17871958017349243, 0.08321470022201538, 0.2768016457557678, 0.022088423371315002, -0.18897749483585358, 0.4887706935405731, -0.003937564790248871, 0.2326938509941101, 0.2219928652048111, 0.11044679582118988, 0.11741819977760315, -0.0029446890112012625, 0.24262815713882446, -0.04589748755097389, 0.12447568029165268, -0.17022444307804108, -0.1788240671157837, -0.3691335618495941, -0.16084180772304535, -0.17972567677497864, 0.2271975576877594, 0.0665130615234375, -0.2191465049982071, 0.1715533435344696, -0.15588900446891785, -0.2868758738040924, -0.13167192041873932, 0.015659894794225693, -0.12092848122119904, -0.09521031379699707, -0.15469422936439514, -0.05575023964047432, 0.460716187953949, -0.07422617077827454, -0.22442315518856049, 0.12921275198459625, -0.38639476895332336, -0.008393021300435066, -0.383023738861084, -0.16746786236763, 0.01373199000954628, -0.03099285066127777, 0.3640015423297882, 0.32378360629081726, 0.2687147855758667, 0.3360629081726074, 0.14563047885894775, 0.07927218079566956, 0.17293564975261688, 0.39807891845703125, -0.034341614693403244, -0.14070777595043182, 0.49168431758880615, 0.06886035203933716, 0.08826713263988495, -0.029713332653045654, 0.1331736147403717, -0.07159591466188431, 0.2276323437690735, -0.28528866171836853, 0.3993089497089386, -0.19939984381198883, -0.14931076765060425, 0.15259934961795807, 0.0956076830625534, 0.1552804410457611, 0.0620625764131546, 0.39355969429016113, -0.01843569613993168, -0.1509016752243042, 0.0068059563636779785, -0.12237769365310669, -0.36893388628959656, -0.275278776884079, -0.36611485481262207, -0.05957268178462982, -0.2968607246875763, 0.10289356112480164, 0.2906438708305359, -0.09120574593544006, 0.3864310383796692, -0.10634184628725052, -0.02152193710207939, -0.030748490244150162, 0.20423369109630585, -0.25811460614204407, 0.30397024750709534, 0.1511920690536499, -0.1180029809474945, 0.01477251946926117, -0.03111416846513748, -0.10725144296884537, 0.07505364716053009, 0.15600897371768951, 0.032125912606716156, -0.3458130359649658, 0.0358567088842392, 0.27961114048957825, 0.05277150124311447, -0.09402617812156677, -0.2259427011013031, 0.19421780109405518, 0.17876474559307098, 0.04344383627176285, -0.028428856283426285, 0.06591200828552246, -0.10802589356899261, 0.03243575617671013, 0.19694694876670837, 0.20493772625923157, -0.34853652119636536, 0.0031456127762794495, 0.08018960058689117, -0.24347524344921112, 0.016965482383966446, 0.33137643337249756, -0.027254847809672356, -0.2170223593711853, -0.21864448487758636, 0.1291659027338028, -0.29141250252723694, -0.14341913163661957, -0.395010381937027, 0.008342839777469635, -0.1395609974861145, -0.16826260089874268, -0.008473381400108337, 0.10451550781726837, 0.491651713848114, 0.16496878862380981, 0.34391456842422485, 0.0609833262860775, 0.05250846594572067, 0.29265594482421875, -0.3604908585548401, -0.08956578373908997, -0.4136759638786316, 0.044177763164043427, 0.008212090469896793, -0.2715396285057068, -0.04346363991498947, 0.3930783271789551, 0.16300377249717712, -0.06820939481258392, 0.4234105050563812, 0.22907961905002594, 0.35905227065086365, -0.09352949261665344, 0.04708722606301308, -0.07821942120790482, -0.6689528822898865, 0.13763639330863953, 0.03698382526636124, 0.03619137033820152, 0.06014564633369446, -0.157075434923172, 0.018648359924554825, 0.1153981015086174, -0.1191752552986145, -0.29814764857292175, 0.2457435131072998, -0.05781200900673866, -0.04748670384287834, 0.056037843227386475, -0.2919575572013855, 0.11914055794477463, -0.13625995814800262, 0.21948488056659698, -0.09037846326828003, 0.2610569894313812, -0.012491057626903057, -0.4069810211658478, 0.06800273060798645, 0.022013194859027863, -0.07767494022846222, -0.03471479192376137, -0.05981804057955742, 0.2632446587085724, -0.10723268985748291, 0.27777692675590515, -0.3366716504096985, 0.11802355200052261, 0.3301564157009125, -0.08524170517921448, 0.27622032165527344, -0.11273352056741714, 0.04461017623543739, -0.09132999181747437, -0.17603938281536102, 0.07472610473632812, -0.14924216270446777, 0.25754275918006897, 0.17488020658493042, -0.16595914959907532, 0.07718992233276367, -0.14511990547180176, -0.06832259893417358, -0.33130085468292236, 0.2723037302494049, -0.16169261932373047, 0.3295406103134155, 0.034911349415779114, -0.3837600350379944, 0.2606959342956543, 0.3108646869659424, 0.24023090302944183, 0.16187967360019684, 0.060924824327230453, -0.2881937623023987, -0.1753646433353424, 0.3412482440471649, -0.0522899404168129, 0.4062328338623047, 0.3077271580696106, 0.2328881025314331, 0.14186637103557587, 0.03996919468045235, -0.21054109930992126, 0.1985752284526825, 0.07001842558383942, 0.06896388530731201, 0.19538980722427368, 0.19483718276023865, -0.4964079260826111, -0.7477690577507019, 0.23906534910202026, 0.29976263642311096, 0.08395711332559586, -0.18121647834777832, -0.06864619255065918, -0.2339630424976349, -0.217458114027977, -0.016823286190629005, 0.006180882453918457, -0.17629390954971313, -0.14282497763633728, 0.1678771674633026, 0.6262645125389099, -0.28578445315361023, 0.21010231971740723, 0.030784495174884796, 0.401760995388031, -0.006026402115821838, 0.031622521579265594, -0.21056976914405823, -0.012918492779135704, -0.12654632329940796, 0.189076766371727, 0.030536193400621414, -0.20332962274551392, 0.3739793300628662, 0.2689999043941498, -0.12057557702064514, -0.40691477060317993, -0.328429639339447, 0.28974297642707825, -0.08231668174266815, 0.29395297169685364, -0.09654408693313599, 0.27470964193344116, -0.006081126630306244, 0.035630080848932266, 0.2503201365470886, -0.38363179564476013, -0.305121511220932, -0.025988493114709854, 0.05752343684434891, -0.023209398612380028, -0.29056259989738464, -0.3642636835575104, 0.06397955864667892, -0.3620833158493042, 0.3316110074520111, -0.14065290987491608, 0.1109616830945015, 0.21889425814151764, 0.1636417955160141, 0.0942678302526474, -0.12895110249519348, -0.08818452060222626, -0.37266436219215393, -0.3000727891921997, 0.06685216724872589, -0.3052096664905548, -0.2817413806915283, 0.12205309420824051, 0.19095078110694885, 0.05675787106156349, -0.051508452743291855, -0.30717331171035767, -0.6100958585739136, -0.3246263861656189, 0.20137429237365723, -0.15970614552497864, -0.0809432789683342, 0.3086215555667877, -0.21522775292396545, -0.3787584602832794, -0.09675534814596176, -0.180003821849823, 0.4041720926761627, 0.08134400099515915, 0.032325636595487595, -0.16789983212947845, 0.11940142512321472, 0.2956467270851135, 0.2613748610019684, 0.18024973571300507, 0.13745109736919403, 0.27993324398994446, -0.023641658946871758, 0.4055575132369995, -0.3060932159423828, -0.10794483125209808, 0.16752299666404724, -0.07473621517419815, -0.08605119585990906, 0.2337884157896042, 0.2530996799468994, -0.06608911603689194, 0.10698528587818146, -0.023687925189733505, 0.22828924655914307, -0.2091529816389084, 0.0027516260743141174, 0.369418203830719, -0.025103725492954254, 0.2564166784286499, 0.14388954639434814, -0.010889913886785507, -0.18528826534748077, 0.013593286275863647, -0.03264350816607475, -0.19695201516151428, -0.1028798446059227, -0.4580973982810974, 0.08325769007205963, -0.764717161655426, 0.14021149277687073, -0.24498529732227325, 0.13601890206336975, -0.19987767934799194, -0.07762742787599564, 0.1854333132505417, -0.19128580391407013, 0.6604037284851074, 0.13652315735816956, 0.03684432432055473, -0.1417613923549652, -0.3315153419971466, -0.11364072561264038, 0.0964532196521759, -0.2511960566043854, 0.11173257231712341, 0.21266449987888336, 0.4664648473262787, -0.17456844449043274, -0.16527889668941498, 0.20228758454322815, -0.06024579703807831, -0.231408953666687, 0.13809092342853546, -0.1386324167251587, -0.37020188570022583, -0.30537161231040955, 0.21063202619552612, 0.2645334005355835, -0.004775054752826691, 0.14953696727752686, -0.21176594495773315, -0.11951681971549988, -0.157038614153862, -0.04208112880587578, 0.011913470923900604, 0.3730044662952423, 0.014035891741514206, 0.3471229374408722, 0.2985026240348816, 0.09019739925861359, 0.27501365542411804, 0.541290283203125, 0.048477813601493835, -0.1040298193693161, 0.07947590947151184, -0.12423136830329895, 0.35937562584877014, 0.36396464705467224, -0.030328653752803802, 0.014038728550076485, -0.01813509687781334, 0.2509722411632538, -0.41360148787498474, 0.23353388905525208, 0.0570966899394989, 0.29110464453697205, 0.067817822098732, -0.06597299873828888, 0.2764221727848053, -0.05864822119474411, -0.011198192834854126, 0.07195276021957397, 0.14344657957553864, -0.4339948296546936, 0.23473238945007324, 0.22095614671707153, 0.7580066919326782, 0.05090099573135376, 0.3355156183242798, 0.19209977984428406, 0.12829291820526123, 0.06193891167640686, -0.06693028658628464, 0.23236733675003052, -0.3206988573074341, -0.29173770546913147, 0.12199738621711731, 0.06507080793380737, 0.012670129537582397, -0.21837234497070312, -0.10227232426404953, 0.03647923469543457, 0.35087862610816956, 0.03841864690184593, -0.32848411798477173, 0.05131484568119049, -0.08779621124267578, -0.4928326904773712, -0.14662733674049377, 0.3188757300376892, 0.0965479388833046, 0.04519737511873245, -0.0707416981458664, 0.1190674677491188, 0.20861636102199554, -0.06125839799642563, -0.13484469056129456, -0.03089025989174843, -0.2394016683101654, 0.26985225081443787, -0.15950748324394226, -0.03339055925607681, -0.31741493940353394, -0.14006954431533813, 0.27561572194099426, 0.09552636742591858, -0.05827956646680832, 0.15397462248802185, 0.057519737631082535, -0.041108060628175735, -0.1505393087863922, -0.11494015157222748, 0.27322450280189514, -0.14768607914447784, -0.2876369059085846, 0.05277819558978081, 0.018844716250896454, -0.17101338505744934, -0.24489997327327728, -0.10513991117477417, -0.14848186075687408, -0.1318957507610321, 0.07135221362113953, 0.0285184383392334, -0.16759976744651794, -0.27876514196395874, 0.22955793142318726, 0.08890651166439056, -0.039346687495708466, 0.295399010181427, 0.191183403134346, -0.13585253059864044, -0.06612097471952438, 0.5295789241790771, 0.10913611948490143, 0.03294460475444794, 0.3842127025127411, 0.15485595166683197, -0.1812470704317093, -0.33553770184516907, 0.06152139604091644, -0.08210553228855133, -0.09883188456296921, 0.446914941072464, 0.040752261877059937, -0.1664067953824997, 0.13709081709384918, 0.46030768752098083, 0.01699693873524666, -0.11753736436367035, -0.19544169306755066, -0.06950235366821289, -0.3836546540260315, 0.20854398608207703, 0.03926656395196915, 0.4051854908466339, 0.07619862258434296, 0.02554170787334442, 0.024329982697963715, 0.029963595792651176, -0.4627191722393036, -0.06244247406721115, -0.27584308385849, 0.054169222712516785, -0.09843030571937561, -0.2351056933403015, 0.2635294198989868, -0.16831038892269135, 0.09011238068342209, 0.29586663842201233, -0.3609200119972229, -0.34733596444129944, -0.07259754836559296, 0.09018061310052872, 0.08005189150571823, -0.11308368295431137, -0.09144647419452667, -0.05627121776342392, -0.13828009366989136, -0.1504892110824585, 0.5688748359680176, 0.24927181005477905, 0.0002329256385564804, -0.029516084119677544, 0.1003720760345459, 0.1381959319114685, 0.40667861700057983, 0.06471158564090729, 0.22145609557628632, 0.0626898780465126, -0.027880297973752022, -0.06064571440219879, -0.21147476136684418, -0.08363679051399231, 0.05029093846678734, 0.09728483855724335, 0.06576952338218689, 0.11897537112236023, 0.028945881873369217, -0.18573638796806335, -0.27598512172698975, -0.008768197149038315, 0.21122632920742035, 0.1975831389427185, -0.021859703585505486, -0.18574756383895874, 0.10405533015727997, 0.3498401343822479, -0.16525566577911377, -0.11866691708564758, -0.18388891220092773, -0.26805979013442993, 0.23727929592132568, 0.07695112377405167, 0.06149443984031677, 0.05272263288497925, -0.1188100278377533, 0.33689212799072266, 0.4275178909301758, -0.3242305517196655, -0.13526560366153717, -0.23203527927398682, -0.14807912707328796, 0.026500873267650604, 0.5221849679946899, 0.19612690806388855, 0.3812491297721863, 0.39915019273757935, -0.1532438099384308, 0.23051030933856964, 0.18200519680976868, 0.487130343914032, -0.020556677132844925, -0.19388070702552795, -0.05643875151872635, 0.3132990002632141, 0.008923862129449844, 0.24660593271255493, -0.03940964490175247, 0.19890998303890228, -0.06477437913417816, -0.24748098850250244, -0.37836360931396484, 0.26823288202285767, -0.28819966316223145, -0.2394358217716217, -0.11569543182849884, -0.16814304888248444, 0.1486005187034607, 0.16915960609912872, 0.007873919792473316, -0.15373575687408447, 0.4488006830215454, -0.09352501481771469, -0.05705196410417557, -0.20576077699661255, -0.09323425590991974, 0.09523481130599976, -0.04261079058051109, -0.03878258168697357, 0.20021235942840576, 0.19742591679096222, 0.09980598092079163, -0.11069440841674805, 0.3573836088180542, 0.2519681453704834, 0.15973150730133057, 0.13543951511383057, 0.3464065492153168, -0.19438697397708893, -0.05968330428004265, -0.357327401638031, 0.27752068638801575, 0.0681830421090126, 0.13401935994625092, 0.17237114906311035, 0.22770504653453827, -0.24226808547973633, 0.17416243255138397, 0.1133624017238617, -0.10579036921262741, -0.021554699167609215, 0.22822730243206024, 0.2127567082643509, -0.16246631741523743, -0.10205647349357605, -0.3395230770111084, -0.22990170121192932, -0.22163401544094086, 0.1894596517086029, -0.49136632680892944, 0.08647748827934265, -0.05173352360725403, 0.16187900304794312, -0.07482907176017761, 0.579692006111145, -0.07793157547712326, -0.3437822759151459, -0.20279660820960999, -0.04446820169687271, -0.5785212516784668, 0.16197986900806427, -0.1888168454170227, -0.021350957453250885, -0.003427550196647644, 0.40353602170944214, -0.03189747408032417, 0.12283138930797577, 0.09333289414644241, -0.0029727332293987274, -0.05134175345301628, -0.03122870624065399, -0.5178283452987671, 0.04713486507534981, 0.12122592329978943, 0.07612211257219315, 0.26000720262527466, -0.3338191509246826, 0.23772798478603363, 0.019780844449996948, 0.09077851474285126, -0.030342411249876022, 0.34427937865257263, -0.07259992510080338, -0.02672090381383896, 0.5312130451202393, -0.030746299773454666, 0.0646834522485733, -0.03784620389342308, -0.11282225698232651, -0.19083787500858307, -0.23294246196746826, -0.2778780162334442, -0.24923734366893768, 0.15821504592895508, 0.33386147022247314, -0.15654268860816956, -0.197543203830719, -0.031889431178569794, 0.256832480430603, 0.17336075007915497, -0.11235268414020538, -0.05495872348546982, 0.4865339696407318, 0.17652159929275513, 0.1889026165008545, -0.12607674300670624, 0.3847203254699707, -0.003808382898569107, -0.04034372419118881, -0.31600067019462585, -0.5725783109664917, 0.42845505475997925, -0.2136804163455963, -0.1258551925420761, -0.10197747498750687, 0.3591984510421753, 0.2280511111021042, -0.41149118542671204, -0.5168395042419434, 0.054224058985710144, 0.08508674055337906, -0.07265642285346985, -0.3501569330692291, 0.3177300989627838, -0.10213378816843033, -0.09210271388292313, -0.24502971768379211, 0.4091232120990753, 0.26228415966033936, -0.4342893362045288, 0.18414202332496643, -0.08526493608951569 ]
https://github.com/huggingface/datasets/issues/6568
@lhoestq loading dataset like this does not spawn 50 python processes: ``` datasets.load_dataset("/preprocessed_2256k/train", num_proc=50) ``` I have 64 vCPU so i hoped it could speed up the dataset loading... My dataset onlly has images and metadata.csv with text column alongside image file path column
keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
44
keep_in_memory=True does not seem to work UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( @lhoestq loading dataset like this does not spawn 50 python processes: ``` datasets.load_dataset("/preprocessed_2256k/train", num_proc=50) ``` I have 64 vCPU so i hoped it could speed up the dataset loading... My dataset onlly has images and metadata.csv with text column alongside image file path column
[ -0.4864200949668884, -0.2658992111682892, -0.0638510063290596, 0.3380093276500702, 0.3865876793861389, -0.06995498389005661, 0.20234602689743042, 0.1355111449956894, 0.1304621696472168, 0.05938532203435898, -0.12590380012989044, 0.1253167688846588, -0.19034166634082794, 0.3952617347240448, 0.040891747921705246, 0.01570921018719673, 0.056251272559165955, 0.059994373470544815, -0.24295859038829803, 0.017994612455368042, -0.5089954733848572, 0.1362379491329193, -0.39961859583854675, -0.3019794523715973, -0.2798430323600769, -0.004508913494646549, 0.05806935578584671, 0.2682557702064514, -0.18849995732307434, -0.3360542953014374, -0.10210621356964111, 0.25092020630836487, 0.14340737462043762, 0.31947606801986694, -0.00011357237963238731, 0.09302876144647598, 0.3088180720806122, -0.009572241455316544, -0.2837750315666199, -0.014283448457717896, 0.07036757469177246, -0.3840183615684509, 0.10679361969232559, 0.06360357999801636, -0.10085965692996979, -0.11920907348394394, 0.038813456892967224, -0.25050821900367737, 0.40626731514930725, 0.20074714720249176, 0.19080328941345215, 0.3819972276687622, -0.07909628003835678, 0.08569031208753586, 0.11178795993328094, 0.23445135354995728, 0.004845164716243744, 0.14690831303596497, 0.14151650667190552, -0.19133196771144867, 0.08588423579931259, 0.23164528608322144, -0.1690763533115387, 0.05304306000471115, 0.1458500623703003, 0.13363675773143768, -0.276760995388031, -0.36623597145080566, 0.11589999496936798, 0.13052719831466675, 0.2758895754814148, -0.07687327265739441, -0.2713189125061035, -0.3322552442550659, -0.09731649607419968, -0.7100062370300293, 0.20670658349990845, 0.13085761666297913, -0.09234589338302612, 0.00849138293415308, -0.37104034423828125, -0.08996351063251495, 0.08978420495986938, -0.10908736288547516, 0.1999855637550354, -0.2534879148006439, -0.11732451617717743, 0.040439456701278687, 0.5532022714614868, 0.07924630492925644, -0.13607847690582275, 0.029786627739667892, 0.02306056022644043, 0.2092723250389099, -0.7658474445343018, 0.08028265833854675, 0.0701235756278038, 0.0013316534459590912, 0.22604238986968994, 0.22294916212558746, -0.14449761807918549, 0.1606581211090088, 0.12780442833900452, 0.154441237449646, 0.11165500432252884, 0.17174190282821655, -0.3809620440006256, 0.15774354338645935, 0.4845882058143616, 0.05443302541971207, -0.23338423669338226, -0.15219080448150635, -0.26918697357177734, -0.3319953382015228, 0.1752406805753708, -0.3827139735221863, 0.19862662255764008, 0.0075265392661094666, -0.08363115042448044, 0.16938167810440063, 0.13928371667861938, -0.2123033106327057, 0.10709673166275024, 0.428094744682312, 0.21421736478805542, 0.2685331702232361, 0.1142895370721817, -0.1296716183423996, -0.6325213313102722, -0.04888416826725006, -0.2687237560749054, 0.1545810103416443, -0.29547810554504395, 0.1747046858072281, 0.13389161229133606, 0.022482261061668396, 0.274949848651886, 0.14151696860790253, -0.08349645137786865, -0.0717252641916275, 0.2568890452384949, -0.32577478885650635, 0.08557376265525818, 0.41402730345726013, -0.13419489562511444, 0.0051869601011276245, 0.0933874249458313, 0.14635668694972992, -0.1594468355178833, 0.3398091793060303, -0.31601041555404663, -0.35254842042922974, 0.1366925835609436, 0.14422592520713806, 0.07035179436206818, 0.10773533582687378, -0.6651045083999634, 0.2598963975906372, 0.14728295803070068, 0.16851820051670074, -0.048490971326828, -0.0893188863992691, -0.378359317779541, 0.019015125930309296, 0.3990427255630493, 0.5853838920593262, -0.3815883994102478, -0.012690469622612, 0.1932031512260437, -0.12185336649417877, 0.2008071392774582, 0.45428183674812317, -0.09651640057563782, 0.2333429455757141, -0.35561996698379517, -0.3515275716781616, 0.020026788115501404, -0.23440824449062347, -0.29010066390037537, 0.11882121860980988, -0.05232870578765869, -0.020888667553663254, 0.039977483451366425, 0.3450838029384613, 0.04571175202727318, 0.26196905970573425, 0.045462466776371, 0.17447200417518616, 0.003472590819001198, 0.24178385734558105, -0.36370527744293213, -0.2622608542442322, -0.13083049654960632, 0.30341100692749023, 0.04796142503619194, 0.07083521783351898, -0.1883581429719925, -0.06787009537220001, 0.33988475799560547, -0.028685394674539566, 0.16547435522079468, 0.09867725521326065, 0.21721014380455017, 0.018053464591503143, 0.1419920176267624, 0.014995783567428589, -0.4329841136932373, 0.23339703679084778, 0.3130558133125305, 0.038410745561122894, -0.05723962560296059, 0.1610409915447235, -0.06831902265548706, 0.06133446842432022, -0.23065970838069916, -0.22579726576805115, -0.029674747958779335, -0.08005385845899582, -0.05625814199447632, 0.04728454351425171, -0.4716620445251465, 0.5344868302345276, -0.11427746713161469, 0.23578588664531708, -0.44083505868911743, 0.25780779123306274, 0.18113099038600922, -0.18106089532375336, 0.032833732664585114, 0.07742944359779358, -0.1864050328731537, -0.07267529517412186, -0.057576000690460205, 0.21837224066257477, 0.22942012548446655, 0.2253899872303009, -0.06056860461831093, 0.07527704536914825, 0.2121906727552414, 0.01111682504415512, -0.054498255252838135, -0.5403537750244141, 0.12981680035591125, -0.0009141489863395691, -0.1421503722667694, 0.2986258864402771, -0.2603801190853119, 0.2915685176849365, 0.19016452133655548, -0.3218925893306732, 0.09315274655818939, 0.01010114699602127, -0.02558959648013115, -0.06142884120345116, 0.42354172468185425, 0.5165380835533142, 0.5774425864219666, 0.3316936194896698, -0.2961747944355011, -0.042892128229141235, 0.3814983367919922, 0.17326916754245758, -0.26259803771972656, 0.2581217885017395, 0.09897714853286743, -0.1194530576467514, 0.09178062528371811, -0.17749905586242676, 0.4177272915840149, 0.21300837397575378, -0.25917187333106995, 0.04225017875432968, 0.07804776728153229, -0.2074775993824005, 0.13317830860614777, 0.10471785068511963, 0.12972316145896912, 0.12376940250396729, 0.1858120709657669, -0.13033823668956757, -0.5710299611091614, 0.016176193952560425, 0.14812803268432617, 0.2544626295566559, -0.15737555921077728, -0.06730673462152481, -0.19885995984077454, 0.048748135566711426, 0.027402542531490326, 0.3200720250606537, -0.06225718557834625, -0.010001078248023987, -0.20211823284626007, 0.23664844036102295, -0.09028886258602142, 0.31165313720703125, -0.048841893672943115, 0.34533026814460754, 0.10741154104471207, -0.3001602590084076, -0.05816289782524109, -0.05757209658622742, 0.10991564393043518, 0.011524554342031479, 0.2003021091222763, -0.19557973742485046, 0.44709908962249756, 0.11733421683311462, -0.22996562719345093, -0.17068414390087128, -0.1468363255262375, 0.23325201869010925, -0.08502107858657837, 0.3986823558807373, -0.02704377844929695, 0.18262293934822083, -0.06760919094085693, -0.01680769771337509, 0.2827867567539215, -0.19638237357139587, -0.14843866229057312, -0.04401327297091484, 0.1903986930847168, 0.13794788718223572, -0.0740652084350586, -0.35370945930480957, -0.14127394556999207, -0.4006098210811615, 0.3816494345664978, -0.0843074768781662, -0.020569924265146255, 0.24027279019355774, 0.17140567302703857, -0.07581070065498352, 0.16559085249900818, -0.09293776750564575, -0.2827988862991333, -0.5695139169692993, 0.08849360048770905, -0.13043805956840515, -0.15751513838768005, -0.048616353422403336, -0.05498515069484711, 0.1437220722436905, 0.193117156624794, -0.5401646494865417, -0.40832075476646423, -0.4350118041038513, 0.1543773114681244, 0.03405559062957764, 0.1907733827829361, 0.16411633789539337, -0.14980176091194153, -0.1530224084854126, 0.016198650002479553, -0.14126445353031158, 0.2098139375448227, -0.20802311599254608, -0.06516413390636444, 0.11442922055721283, 0.598962128162384, -0.23277974128723145, 0.6119824647903442, 0.1603822410106659, 0.1379438042640686, 0.35580214858055115, -0.21946914494037628, 0.4293556213378906, -0.39689305424690247, -0.22581738233566284, 0.08205065131187439, 0.01487451046705246, -0.22670359909534454, 0.12243552505970001, 0.010393574833869934, 0.0036163944751024246, -0.09311700612306595, 0.08576394617557526, 0.11448879539966583, -0.1220848560333252, 0.11628036201000214, 0.20364968478679657, 0.05722929537296295, 0.1192774772644043, -0.06493449211120605, 0.03186199069023132, -0.15619918704032898, -0.1553301215171814, 0.0676996037364006, 0.24487172067165375, -0.22805003821849823, -0.28206515312194824, 0.04089363291859627, -0.8198462724685669, 0.02917231246829033, -0.20607107877731323, 0.2036939412355423, 0.06654965877532959, -0.20801937580108643, 0.18495377898216248, -0.018786532804369926, 0.8917117118835449, 0.0929974690079689, -0.21541307866573334, -0.028734005987644196, -0.39011266827583313, -0.1062711700797081, 0.012396663427352905, -0.0014794468879699707, -0.12150795757770538, -0.0901065543293953, 0.49614283442497253, -0.20260971784591675, -0.1350662112236023, 0.29756784439086914, 0.021243784576654434, -0.19072023034095764, -0.36022692918777466, -0.48390933871269226, -0.35041314363479614, -0.25715309381484985, 0.2021278738975525, 0.08815410733222961, 0.013514794409275055, -0.30630531907081604, -0.17061884701251984, -0.11245452612638474, -0.20157957077026367, 0.07335798442363739, -0.04009970277547836, 0.2785266637802124, 0.11664173752069473, 0.46200352907180786, 0.31659629940986633, 0.05595768615603447, 0.3603644371032715, 0.6707118153572083, -0.3416856527328491, -0.22018492221832275, 0.23454226553440094, 0.13269051909446716, 0.4208217263221741, 0.27222442626953125, -0.05517888441681862, 0.1647096872329712, -0.04747328907251358, 0.4150520861148834, -0.5888201594352722, 0.2981433868408203, 0.306521475315094, 0.11498723924160004, -0.21373552083969116, -0.4804089069366455, 0.5744403004646301, 0.2318187654018402, 0.1203574538230896, 0.13001862168312073, -0.016652528196573257, -0.16248297691345215, 0.06671111285686493, 0.14249907433986664, 0.8251379728317261, -0.35844483971595764, 0.3799523115158081, 0.19447533786296844, 0.0879795253276825, 0.4308767020702362, -0.25287896394729614, 0.09712962061166763, -0.4947822690010071, -0.22316545248031616, 0.10552891343832016, 0.010537512600421906, -0.03547126427292824, 0.016761694103479385, -0.030813492834568024, 0.20987701416015625, 0.12077760696411133, 0.1362323760986328, -0.28229954838752747, 0.21870337426662445, -0.012405751273036003, -0.5421637296676636, -0.4523282051086426, 0.11284352093935013, 0.2952735722064972, -0.038167163729667664, -0.014202173799276352, 0.31535398960113525, 0.2034505009651184, -0.06170106306672096, -0.07954251766204834, -0.14639151096343994, -0.09452174603939056, 0.33772242069244385, -0.06952772289514542, -0.32403847575187683, -0.2357209324836731, 0.0850609689950943, 0.19114479422569275, 0.017142541706562042, 0.08941220492124557, 0.2575017213821411, -0.006077278405427933, 0.018762703984975815, -0.17232930660247803, -0.23322473466396332, 0.19871175289154053, 0.051430441439151764, -0.15120357275009155, 0.004031922668218613, -0.12142996490001678, -0.25027137994766235, -0.15547341108322144, 0.12267497181892395, 0.02161034569144249, -0.05776890739798546, -0.07064013183116913, -0.04487287998199463, -0.0005746632814407349, -0.20202955603599548, 0.11744976043701172, 0.2534501254558563, 0.07996974885463715, 0.2918994426727295, 0.015985900536179543, -0.37022078037261963, -0.2102779746055603, 0.2732226550579071, 0.06955937296152115, 0.03309931606054306, 0.45632031559944153, 0.3046403229236603, -0.14482104778289795, -0.19852274656295776, 0.11706045269966125, 0.44671353697776794, -0.05575741454958916, 0.6009750366210938, 0.4710198938846588, -0.0006104558706283569, 0.10452459752559662, 0.17056192457675934, -0.24512161314487457, -0.44690683484077454, 0.038701921701431274, -0.10473146289587021, -0.626976728439331, 0.1512797325849533, -0.32294389605522156, 0.3723980486392975, 0.18296858668327332, -0.1370755434036255, -0.03280705586075783, 0.15547731518745422, -0.26886916160583496, -0.23275618255138397, -0.3333580791950226, 0.00929502584040165, 0.137204110622406, 0.013515046797692776, 0.17105379700660706, -0.04191698506474495, 0.040312834084033966, 0.20610493421554565, -0.2414349764585495, -0.20958882570266724, -0.128836989402771, 0.1586562991142273, -0.02963845804333687, -0.08652180433273315, 0.09838314354419708, 0.008256077766418457, -0.2708699703216553, -0.33991074562072754, 0.3178812265396118, 0.13655556738376617, -0.027395673096179962, 0.011743362993001938, -0.020589083433151245, 0.06996219605207443, 0.10025745630264282, 0.31677207350730896, -0.06654410064220428, 0.16076019406318665, 0.27046090364456177, -0.11055251955986023, -0.015483086928725243, 0.006095007061958313, -0.09921477735042572, -0.035050686448812485, 0.3023274540901184, -0.056966930627822876, 0.09549526870250702, -0.2127334326505661, -0.22802621126174927, 0.15102547407150269, 0.45291951298713684, 0.5004758238792419, 0.003742203116416931, -0.23757332563400269, 0.1754450798034668, 0.17336174845695496, -0.18807685375213623, -0.022754238918423653, -0.06734392046928406, -0.11934319883584976, 0.1735042929649353, 0.3127801716327667, 0.14442485570907593, 0.35126549005508423, -0.1013350784778595, 0.14802055060863495, 0.45022332668304443, -0.4019404649734497, -0.009507019072771072, -0.14994190633296967, 0.005769029259681702, 0.09225229918956757, 0.3148740231990814, 0.3334061801433563, 0.19417676329612732, 0.44250860810279846, -0.25863608717918396, 0.057395823299884796, -0.062281664460897446, 0.5144004821777344, -0.22423353791236877, -0.5518926382064819, 0.05997437611222267, 0.4130280613899231, -0.433584988117218, 0.1531911939382553, -0.23101985454559326, 0.3426001965999603, -0.013622289523482323, -0.14723320305347443, -0.15525278449058533, 0.4408141076564789, -0.1939605325460434, -0.35800307989120483, 0.18797186017036438, -0.13321883976459503, -0.30814239382743835, 0.4436805546283722, 0.04321177303791046, -0.14181223511695862, 0.17004552483558655, 0.0654255598783493, -0.05013011395931244, -0.4013538360595703, 0.06461131572723389, 0.20629490911960602, 0.2199922353029251, -0.05838478356599808, 0.14035239815711975, 0.017069458961486816, -0.07695178687572479, 0.19445687532424927, 0.16383321583271027, 0.3162400722503662, 0.38862067461013794, 0.22762693464756012, -0.03360980749130249, -0.1604597568511963, 0.11911739408969879, -0.24092867970466614, 0.34261414408683777, -0.037618331611156464, 0.27846190333366394, -0.04205172508955002, 0.08562329411506653, -0.14928266406059265, 0.11225725710391998, 0.10872793197631836, 0.014943491667509079, -0.43491289019584656, 0.08952078968286514, 0.21858708560466766, -0.07198416441679001, -0.23573094606399536, -0.055375438183546066, -0.24599438905715942, -0.04775822535157204, 0.243470698595047, -0.2760218381881714, 0.05762536823749542, -0.020589685067534447, 0.066735178232193, -0.21325543522834778, 0.6746929883956909, 0.1725866049528122, -0.020490873605012894, -0.31402987241744995, 0.021960049867630005, -0.8156689405441284, -0.15115097165107727, -0.20565497875213623, -0.11821288615465164, 0.029498271644115448, 0.30762457847595215, -0.05607234314084053, 0.000034907832741737366, -0.006424345076084137, -0.018244775012135506, 0.1227264553308487, 0.13955053687095642, -0.27327394485473633, 0.05645810067653656, -0.3007882833480835, 0.1239134892821312, -0.041834767907857895, -0.3312096893787384, 0.22978299856185913, 0.06252144277095795, -0.1092565655708313, -0.113385871052742, 0.1029280573129654, 0.010444968938827515, 0.062210362404584885, 0.423383504152298, 0.1830098181962967, 0.04046136513352394, -0.11607213318347931, 0.019002802670001984, -0.40743446350097656, -0.26627668738365173, -0.29071176052093506, -0.2017703354358673, 0.03304920718073845, 0.22994500398635864, -0.24017804861068726, -0.13376939296722412, -0.31876954436302185, 0.18842703104019165, 0.024968542158603668, -0.2347348928451538, -0.08645285665988922, 0.0047273337841033936, 0.3915562629699707, 0.24364130198955536, -0.0005939565598964691, 0.39728885889053345, 0.04176349192857742, 0.03286390006542206, -0.32694804668426514, -0.3227914571762085, 0.2582935094833374, -0.3563790023326874, -0.13428515195846558, -0.23050706088542938, 0.13302934169769287, 0.20184697210788727, -0.05997646600008011, -0.4397728443145752, 0.16215023398399353, 0.16761130094528198, 0.04906074330210686, -0.3321441411972046, 0.5901539325714111, 0.0889197438955307, -0.027270078659057617, -0.22034870088100433, 0.39551880955696106, 0.11243011057376862, -0.2531346380710602, 0.2044147253036499, -0.07738125324249268 ]
https://github.com/huggingface/datasets/issues/6568
now noticed ``` 'Setting num_proc from 50 back to 1 for the train split to disable multiprocessing as it only contains one shard ``` Any way to work around this?
keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
30
keep_in_memory=True does not seem to work UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( now noticed ``` 'Setting num_proc from 50 back to 1 for the train split to disable multiprocessing as it only contains one shard ``` Any way to work around this?
[ -0.3578808009624481, -0.48597973585128784, -0.05335165560245514, 0.24324099719524384, 0.22478020191192627, -0.3293018937110901, 0.29327523708343506, 0.05787957087159157, -0.25964412093162537, 0.37969741225242615, -0.09009426832199097, -0.006218463182449341, -0.20374412834644318, 0.6056236624717712, -0.003964388743042946, -0.05188514292240143, 0.014305666089057922, -0.10616683214902878, -0.18805444240570068, 0.08745705336332321, -0.10141142457723618, 0.2243935763835907, -0.24813079833984375, -0.20832495391368866, -0.6507155895233154, -0.1951770782470703, -0.08187202364206314, 0.30371034145355225, -0.027473775669932365, -0.16011783480644226, 0.032059647142887115, 0.25530776381492615, -0.2393893003463745, 0.25924167037010193, -0.00011199811706319451, 0.003858335316181183, 0.08936865627765656, -0.0068795569241046906, 0.0639672726392746, 0.0011911541223526, -0.07453648000955582, 0.09006284922361374, -0.004590917378664017, -0.0022110342979431152, 0.08836168050765991, 0.45725584030151367, 0.04421311616897583, -0.01185549795627594, 0.6775997877120972, 0.1009189635515213, 0.19698883593082428, 0.1573413908481598, -0.045135580003261566, 0.09688381850719452, 0.10370831191539764, 0.3175036907196045, -0.09209815412759781, -0.07918616384267807, -0.08392740786075592, -0.082135871052742, -0.039662934839725494, 0.3110266923904419, 0.027068406343460083, 0.020764708518981934, -0.09342887252569199, 0.16109493374824524, -0.14246101677417755, -0.22316868603229523, 0.11276805400848389, 0.23662801086902618, -0.24964609742164612, -0.12793929874897003, -0.15893100202083588, -0.33939531445503235, -0.15856541693210602, -0.6865773797035217, 0.26314276456832886, -0.02793247252702713, -0.4057537913322449, 0.34906941652297974, -0.3489551544189453, -0.24933569133281708, 0.05101214349269867, -0.16915439069271088, 0.009066298604011536, -0.04944271594285965, -0.03683634474873543, 0.05208936333656311, 0.6444265246391296, 0.060060370713472366, -0.3530973792076111, 0.37558552622795105, 0.020366951823234558, -0.16325967013835907, -0.4156920909881592, -0.07712395489215851, 0.03890835866332054, 0.024703163653612137, 0.12914729118347168, 0.14677628874778748, -0.18285082280635834, 0.4129562973976135, 0.11155939102172852, 0.09216918796300888, 0.2122572809457779, 0.0617806650698185, -0.15996001660823822, 0.013389982283115387, 0.49384891986846924, 0.22334112226963043, -0.14316993951797485, -0.09580020606517792, 0.18655744194984436, -0.3199255168437958, -0.024393964558839798, -0.1641862988471985, 0.05945076048374176, -0.16836833953857422, -0.002664804458618164, 0.06387030333280563, 0.24696049094200134, -0.10446037352085114, 0.1254979372024536, 0.44265881180763245, 0.21493412554264069, 0.20267261564731598, -0.19617457687854767, -0.100125253200531, -0.538806140422821, -0.23911595344543457, -0.3593156635761261, 0.08537928760051727, -0.417003870010376, 0.31177636981010437, 0.0033655762672424316, 0.07987399399280548, 0.1354438066482544, 0.19590255618095398, 0.10626552999019623, -0.04572507366538048, -0.09296125918626785, -0.401461660861969, 0.3060646057128906, 0.37197810411453247, -0.16167297959327698, 0.08617386966943741, -0.1542196422815323, 0.08493582904338837, -0.07283328473567963, 0.18264618515968323, -0.22212740778923035, -0.45712345838546753, 0.14754419028759003, 0.1444939523935318, -0.11382566392421722, 0.12366439402103424, -0.39521801471710205, 0.25563791394233704, 0.4081910252571106, 0.2036469280719757, -0.054315779358148575, -0.026835810393095016, -0.38368648290634155, -0.09267019480466843, 0.36591026186943054, 0.25714385509490967, -0.18669702112674713, -0.05135888606309891, 0.02000095322728157, -0.3806607723236084, 0.4154045879840851, 0.4160219132900238, -0.08708485960960388, -0.15314698219299316, -0.2501649260520935, 0.37213748693466187, 0.0814070776104927, 0.06833991408348083, -0.3841646909713745, -0.06569620966911316, -0.11580934375524521, -0.04950340837240219, 0.18346776068210602, 0.13892751932144165, 0.13960343599319458, 0.24930651485919952, 0.1253565400838852, 0.13696396350860596, -0.08444471657276154, 0.09244625270366669, -0.34711164236068726, -0.19120705127716064, -0.24230366945266724, -0.03346357122063637, 0.3372730612754822, -0.07114189118146896, -0.027341347187757492, -0.052044034004211426, 0.40003758668899536, 0.05636310204863548, 0.2669881284236908, 0.010287905111908913, 0.20222537219524384, -0.1122891828417778, -0.0035442784428596497, -0.3009513020515442, -0.21699610352516174, 0.12178181111812592, 0.05211978405714035, 0.11478079855442047, -0.05855834484100342, -0.03920092061161995, 0.05387869477272034, -0.0783822163939476, -0.059552475810050964, -0.1665613055229187, 0.06279164552688599, -0.29007017612457275, -0.24146345257759094, 0.01038331538438797, -0.4448743462562561, 0.36917027831077576, -0.02630297839641571, 0.13120777904987335, -0.2524096667766571, 0.36313506960868835, -0.04470837861299515, -0.44701245427131653, -0.15598848462104797, 0.16628387570381165, -0.01722842827439308, -0.05702103301882744, -0.0685163214802742, 0.2522210478782654, 0.11717937141656876, 0.2294306457042694, -0.28589051961898804, 0.1279725879430771, 0.22674117982387543, -0.03876372426748276, -0.29861173033714294, -0.48389682173728943, -0.17622949182987213, -0.10816077888011932, 0.005345797631889582, 0.3865184187889099, -0.013270399533212185, 0.2523554861545563, 0.23312880098819733, -0.002654988318681717, 0.14025704562664032, -0.416838675737381, 0.3115900456905365, -0.33901000022888184, 0.3454311192035675, 0.047529663890600204, 0.013550452888011932, 0.22633865475654602, -0.4345492124557495, 0.2326623648405075, 0.6498938202857971, 0.326546311378479, -0.1312388777732849, 0.029288042336702347, 0.13153669238090515, -0.2274473011493683, 0.3152323365211487, 0.29960572719573975, 0.313563734292984, 0.25327470898628235, 0.12896206974983215, 0.07452316582202911, -0.022962450981140137, -0.3402717113494873, 0.015626605600118637, 0.06763134896755219, 0.018399164080619812, 0.10136356204748154, 0.11134611815214157, -0.2921924889087677, -0.4122515320777893, 0.2422589510679245, 0.14479076862335205, 0.23251459002494812, -0.2735693156719208, -0.08400164544582367, -0.5269862413406372, 0.022499337792396545, -0.28880685567855835, 0.21167074143886566, -0.42831164598464966, -0.21360361576080322, 0.1426624357700348, 0.3651584982872009, -0.22380639612674713, 0.2783217132091522, 0.29813289642333984, 0.2683582603931427, -0.2632085680961609, 0.2569703161716461, -0.19354236125946045, -0.10694171488285065, -0.22024385631084442, 0.07425839453935623, 0.3603128492832184, 0.014214873313903809, 0.34646177291870117, 0.16439613699913025, -0.5217716097831726, 0.0010929573327302933, 0.009197816252708435, 0.25748178362846375, -0.07475996017456055, 0.2249719649553299, -0.03200322389602661, 0.11244580149650574, -0.2122131735086441, -0.1398163139820099, 0.1892150193452835, -0.3112550377845764, -0.18452951312065125, -0.0030382275581359863, 0.18671995401382446, 0.17559728026390076, -0.32366928458213806, -0.2148159146308899, 0.0037954282015562057, -0.25602656602859497, 0.5320466160774231, -0.26570600271224976, 0.16059531271457672, 0.1642816811800003, 0.1790696233510971, 0.0368218794465065, -0.0731009989976883, -0.19522397220134735, -0.3988766372203827, -0.48953163623809814, 0.11587095260620117, -0.09322148561477661, -0.2711470127105713, 0.043099358677864075, 0.1207924485206604, 0.003681897185742855, 0.24413159489631653, -0.37594282627105713, -0.2717736065387726, -0.3490332365036011, 0.047964803874492645, 0.08161894232034683, 0.06986603885889053, 0.3732230067253113, -0.22249452769756317, -0.26061758399009705, -0.029255706816911697, -0.06895432621240616, 0.5542057752609253, -0.1574300080537796, 0.20470917224884033, -0.040662750601768494, 0.299895316362381, 0.3388313353061676, 0.8381049036979675, 0.054660193622112274, 0.056278374046087265, 0.094397634267807, -0.18653187155723572, 0.0939786359667778, -0.0824902132153511, -0.19298195838928223, 0.2673775553703308, -0.06851880252361298, -0.15325340628623962, 0.04721636697649956, 0.04412296414375305, -0.04403556138277054, -0.06920403242111206, 0.06502743065357208, 0.15921737253665924, -0.45535629987716675, 0.10055723786354065, 0.3378814160823822, -0.03162616118788719, 0.09108678996562958, -0.053978048264980316, 0.219122514128685, -0.12140905112028122, -0.051651742309331894, 0.11708361655473709, -0.13081705570220947, -0.2391374260187149, -0.4335097670555115, -0.13257233798503876, -0.7964127063751221, 0.22985431551933289, 0.09144693613052368, 0.15728960931301117, -0.15889577567577362, -0.21795536577701569, 0.305002897977829, 0.006322845816612244, 0.8306612372398376, 0.027559133246541023, -0.19222018122673035, -0.03732109069824219, -0.31854158639907837, 0.07087890803813934, 0.021186068654060364, -0.10015511512756348, 0.1770460307598114, 0.1919541209936142, 0.22389613091945648, -0.15217164158821106, -0.18336555361747742, 0.35731759667396545, -0.20721665024757385, -0.20659416913986206, -0.2282109558582306, -0.31846293807029724, -0.16325703263282776, -0.19069048762321472, 0.29689136147499084, 0.3442803621292114, -0.04493408650159836, -0.2192300409078598, -0.249332457780838, 0.027229340746998787, -0.14258834719657898, 0.21678617596626282, 0.02905474603176117, 0.2761278450489044, -0.017392998561263084, 0.027473390102386475, 0.2533250153064728, 0.009251005947589874, 0.34571731090545654, 0.39306947588920593, -0.2638913094997406, 0.06309162080287933, 0.18970035016536713, -0.15595903992652893, 0.41192182898521423, 0.4516066908836365, -0.09896184504032135, 0.29750287532806396, 0.1119438037276268, 0.437764436006546, -0.3690999448299408, 0.3052923083305359, 0.20711487531661987, 0.15506432950496674, 0.0176420658826828, -0.011986754834651947, 0.2661837339401245, 0.10137582570314407, 0.039855584502220154, 0.16975973546504974, 0.14263716340065002, -0.23025134205818176, 0.18252459168434143, 0.0014512352645397186, 1.1119740009307861, -0.24834993481636047, 0.3510984778404236, 0.17414939403533936, 0.06336888670921326, 0.30016884207725525, -0.13010549545288086, 0.21687766909599304, -0.26961252093315125, 0.007337141782045364, 0.0843234658241272, 0.1150449886918068, 0.028166916221380234, -0.13830435276031494, -0.05275357887148857, 0.06303509324789047, 0.12225097417831421, 0.08897525072097778, -0.3862951099872589, -0.03949481248855591, 0.17319515347480774, -0.3625902831554413, -0.05121147260069847, 0.11894309520721436, 0.16976779699325562, -0.2078884094953537, -0.06566713005304337, 0.05287567153573036, 0.12693676352500916, -0.022692859172821045, -0.3622291684150696, -0.13446448743343353, -0.10420180857181549, 0.39217594265937805, 0.001279524527490139, -0.23174510896205902, -0.13714087009429932, 0.027688946574926376, 0.36861634254455566, -0.11597158014774323, 0.10391610860824585, 0.18812650442123413, -0.05688958615064621, 0.10238772630691528, -0.21495503187179565, -0.0522686243057251, 0.38166046142578125, -0.04815260320901871, -0.35592013597488403, -0.15589328110218048, 0.12039075791835785, -0.21529510617256165, -0.16984029114246368, 0.06268147379159927, -0.036736324429512024, -0.10304908454418182, 0.2994903326034546, 0.03840169310569763, 0.09436319768428802, -0.274122953414917, 0.14838853478431702, 0.029622748494148254, -0.1705893725156784, 0.32388219237327576, 0.03457864746451378, -0.23378387093544006, -0.07115615904331207, 0.2914366126060486, 0.1405998170375824, 0.09821031242609024, 0.24629876017570496, 0.11694223433732986, -0.2020403891801834, -0.24805384874343872, -0.11417455226182938, 0.21654146909713745, -0.05069193243980408, 0.4952891170978546, 0.051545582711696625, -0.09759673476219177, -0.09900667518377304, 0.02608540654182434, -0.16469793021678925, -0.04126350209116936, -0.15406951308250427, 0.020007625222206116, -0.5290787816047668, 0.07990413904190063, -0.25201013684272766, 0.41443586349487305, -0.0076828524470329285, 0.347925066947937, -0.0639505535364151, 0.37961167097091675, -0.30485308170318604, -0.008542433381080627, -0.3826800584793091, 0.0900263860821724, 0.06273644417524338, -0.26005819439888, 0.033320195972919464, -0.2502703070640564, 0.02776464819908142, 0.37146955728530884, -0.40702804923057556, -0.2468130886554718, -0.15237239003181458, 0.12203141301870346, -0.12159246951341629, -0.16197839379310608, 0.016121182590723038, 0.20789840817451477, -0.10691908001899719, -0.06987432390451431, 0.37105873227119446, 0.3338504731655121, 0.09808825701475143, 0.2967238426208496, 0.5582310557365417, 0.17701725661754608, -0.0728982463479042, -0.014452925883233547, 0.06323114782571793, 0.20097088813781738, 0.05355590581893921, -0.025303544476628304, -0.19665415585041046, -0.052651651203632355, 0.09428533911705017, -0.09498228132724762, 0.2762358784675598, 0.0431089922785759, -0.2069888710975647, -0.1465284824371338, -0.37997695803642273, -0.03292436525225639, 0.43722549080848694, 0.3794437646865845, -0.020815545693039894, -0.12138038873672485, 0.4389260709285736, 0.21466630697250366, -0.17244431376457214, 0.05028529092669487, 0.5239749550819397, -0.017524056136608124, 0.10165038704872131, 0.2984945774078369, 0.33673638105392456, 0.11735670268535614, -0.06248989328742027, 0.1594723016023636, -0.036814622581005096, -0.37831440567970276, 0.039003536105155945, -0.2840259075164795, -0.13536055386066437, -0.0766146183013916, 0.414246141910553, 0.06191529333591461, 0.32210803031921387, 0.39104121923446655, -0.4024730324745178, 0.32895195484161377, -0.3899276554584503, 0.47662776708602905, -0.028566498309373856, -0.4226239323616028, -0.13373973965644836, 0.23259875178337097, -0.44897371530532837, 0.10023412108421326, -0.1235731914639473, 0.7821851968765259, 0.04355986788868904, -0.2580694556236267, 0.040449582040309906, 0.44126689434051514, -0.25255146622657776, -0.23197197914123535, 0.19137823581695557, -0.09847632050514221, -0.3177949786186218, 0.2579593360424042, 0.20622332394123077, 0.09288941323757172, 0.8318274617195129, 0.1298416703939438, -0.13225077092647552, 0.012592220678925514, -0.08622810244560242, 0.13014379143714905, 0.3282659649848938, -0.22797414660453796, -0.0030533410608768463, 0.07637155801057816, -0.06370814144611359, 0.06097160652279854, 0.08831632137298584, 0.2598792612552643, 0.10929784178733826, 0.1212032288312912, 0.020828623324632645, -0.01656471937894821, 0.14001959562301636, -0.3342362940311432, 0.2195536494255066, 0.13697290420532227, 0.43176987767219543, -0.05398865416646004, 0.06582342088222504, -0.19778724014759064, 0.0473342128098011, 0.04985331743955612, 0.3403056263923645, -0.33578652143478394, 0.20465132594108582, 0.23372973501682281, -0.18572382628917694, -0.04273547977209091, -0.13876672089099884, -0.22308310866355896, -0.09329588711261749, 0.2891005873680115, -0.6056492328643799, 0.19950851798057556, -0.030780881643295288, 0.0746820867061615, -0.04091542586684227, 0.5644431114196777, -0.10133486986160278, -0.1744948923587799, -0.14946043491363525, -0.06387952715158463, -0.692146897315979, 0.0677446648478508, -0.08881412446498871, 0.18549591302871704, -0.07329036295413971, 0.3653481602668762, -0.24058155715465546, -0.03781270980834961, 0.1550385057926178, -0.28416746854782104, 0.08961400389671326, 0.17317594587802887, -0.42749711871147156, 0.2647445499897003, -0.24340705573558807, -0.2935662567615509, 0.25695139169692993, -0.11661777645349503, 0.34718087315559387, 0.19665302336215973, -0.09457852691411972, 0.12383060157299042, 0.0426461398601532, 0.0738922506570816, 0.09342767298221588, 0.22157010436058044, 0.22119711339473724, 0.10457386076450348, -0.04855150729417801, 0.07149912416934967, -0.22659608721733093, -0.17575126886367798, -0.32962530851364136, -0.26566562056541443, 0.007545603439211845, 0.37728410959243774, -0.38994744420051575, -0.009546982124447823, -0.2521820366382599, 0.24555259943008423, 0.04702509939670563, -0.044068969786167145, -0.05590515583753586, 0.14321894943714142, 0.4310380816459656, 0.23188042640686035, 0.1370222121477127, 0.49069660902023315, -0.0722580999135971, -0.05217788368463516, -0.4278322458267212, -0.4367756247520447, 0.3216027617454529, -0.0891064777970314, -0.09588737040758133, -0.3952716886997223, 0.2795923054218292, 0.3125171959400177, -0.154462993144989, -0.8380304574966431, -0.3824373185634613, 0.011561036109924316, 0.061270035803318024, -0.34754741191864014, 0.48526570200920105, -0.1036086231470108, -0.1557854861021042, -0.13157281279563904, 0.23750513792037964, 0.26854658126831055, -0.3220546841621399, 0.29575401544570923, -0.179657980799675 ]
https://github.com/huggingface/datasets/issues/6567
I think you are reporting an issue with the `transformers` library. Note this is the repository of the `datasets` library. I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues EDIT: I have not the rights to transfer the issue ~~I am transferring your issue to their repository.~~
AttributeError: 'str' object has no attribute 'to'
### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4
49
AttributeError: 'str' object has no attribute 'to' ### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4 I think you are reporting an issue with the `transformers` library. Note this is the repository of the `datasets` library. I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues EDIT: I have not the rights to transfer the issue ~~I am transferring your issue to their repository.~~
[ -0.08758515119552612, -0.32732489705085754, 0.08826373517513275, 0.04437369853258133, 0.5676831007003784, 0.01807337999343872, 0.5729138255119324, 0.4033966362476349, -0.17493602633476257, 0.32560089230537415, -0.011736348271369934, 0.22309105098247528, -0.11257587373256683, -0.03418769687414169, 0.058715254068374634, -0.31582483649253845, 0.04296316206455231, 0.14200225472450256, -0.1409429907798767, -0.06308028101921082, 0.019868023693561554, 0.3189191222190857, -0.05012856423854828, 0.3180600106716156, -0.43863457441329956, -0.053569309413433075, 0.09534945338964462, -0.10458208620548248, 0.12058557569980621, -0.22580477595329285, 0.23994189500808716, -0.10195490717887878, 0.03177399933338165, 0.30587491393089294, -0.00011427733988966793, 0.11357990652322769, 0.06372198462486267, 0.12427397072315216, -0.43306446075439453, -0.1904914826154709, -0.26234737038612366, 0.03362240642309189, 0.3975362777709961, -0.21864116191864014, -0.1910867989063263, 0.2939935326576233, 0.021646713837981224, -0.0771799236536026, 0.20161163806915283, 0.5999909043312073, 0.25665760040283203, 0.4940606951713562, 0.19188997149467468, -0.31422242522239685, 0.24433113634586334, 0.08435021340847015, -0.2600957453250885, 0.2964865565299988, 0.04011329263448715, 0.030204609036445618, 0.14810681343078613, 0.10082562267780304, 0.15658998489379883, 0.20641788840293884, 0.19086766242980957, 0.18289895355701447, 0.04017634689807892, -0.18469776213169098, -0.02361437678337097, 0.22368460893630981, 0.04456726834177971, -0.3989562392234802, -0.20626680552959442, -0.1067623421549797, 0.09859790652990341, -0.1264142245054245, 0.008064497262239456, -0.014277184382081032, -0.12729237973690033, 0.01920010894536972, -0.1108882948756218, -0.10854896903038025, 0.003855764865875244, -0.06101442128419876, -0.292597234249115, 0.27594852447509766, -0.09867203235626221, -0.04531680420041084, 0.12831327319145203, 0.09447157382965088, 0.05450925603508949, 0.03038642555475235, 0.1925235092639923, 0.056616559624671936, -0.32642364501953125, -0.1264466941356659, -0.1282173991203308, -0.46333858370780945, -0.2967069745063782, -0.21198570728302002, 0.2960624098777771, -0.310381680727005, 0.217337504029274, 0.29139018058776855, 0.11448173224925995, 0.2750653624534607, -0.45043566823005676, 0.5767239928245544, 0.244816854596138, 0.36879444122314453, -0.1918736696243286, -0.12059594690799713, -0.019716398790478706, 0.02430862933397293, 0.14482322335243225, -0.09030731767416, 0.3346872329711914, -0.16491727530956268, -0.49701106548309326, 0.13371124863624573, -0.41073787212371826, 0.10295136272907257, -0.00035140663385391235, 0.12161166965961456, -0.1853535771369934, 0.33133596181869507, 0.4100289046764374, -0.0157000869512558, -0.3211379647254944, 0.2369135469198227, -0.35809847712516785, 0.33828112483024597, -0.1189446970820427, -0.22098562121391296, -0.0666191428899765, 0.03774367645382881, -0.032864123582839966, -0.09405364096164703, 0.25931310653686523, 0.05166761577129364, 0.0004991218447685242, -0.13515542447566986, -0.011737894266843796, 0.5023083686828613, -0.2077518105506897, 0.19703945517539978, 0.13962578773498535, -0.5701727867126465, -0.15046192705631256, 0.2689779996871948, -0.3194403052330017, -0.2566714882850647, -0.050332650542259216, 0.25283440947532654, -0.2353225201368332, -0.17211827635765076, -0.3584791123867035, 0.015891987830400467, 0.13527172803878784, -0.22465907037258148, -0.021136801689863205, -0.44969239830970764, -0.31730619072914124, -0.0886833518743515, 0.19800665974617004, 0.014968767762184143, -0.27258050441741943, -0.3952726721763611, 0.16325941681861877, -0.13755743205547333, 0.13810083270072937, 0.04095734655857086, -0.041604962199926376, 0.3618042469024658, -0.13041101396083832, 0.04461447894573212, 0.20841193199157715, -0.19489505887031555, -0.42400649189949036, -0.06800515949726105, -0.19204184412956238, -0.016870349645614624, -0.029132820665836334, 0.13551510870456696, 0.11614131927490234, 0.042175766080617905, -0.1693546622991562, 0.2386055886745453, 0.01295381411910057, 0.188044011592865, -0.35809510946273804, 0.09437309205532074, -0.0032786745578050613, 0.30341699719429016, 0.24236755073070526, 0.41919898986816406, -0.07505440711975098, 0.5642216205596924, 0.189848393201828, 0.013551315292716026, 0.152187779545784, 0.02036997675895691, 0.47854629158973694, -0.4029935598373413, -0.20181433856487274, -0.15690721571445465, -0.22153811156749725, -0.03167128935456276, 0.07575391978025436, 0.36443856358528137, -0.014066480100154877, 0.17580127716064453, -0.13522449135780334, 0.11127728968858719, -0.09686634689569473, -0.28456395864486694, 0.09343741834163666, 0.105296291410923, -0.10822047293186188, 0.022218473255634308, -0.31601205468177795, 0.42404109239578247, -0.05623848736286163, 0.21113955974578857, -0.40670180320739746, 0.4350358545780182, -0.22909919917583466, -0.1633545160293579, -0.23626521229743958, 0.19383665919303894, -0.05783478543162346, -0.055516768246889114, -0.3348681926727295, 0.14074701070785522, -0.14827199280261993, -0.10085225850343704, -0.07216109335422516, 0.44187793135643005, 0.3167802691459656, -0.09186418354511261, -0.215629443526268, 0.3691719174385071, 0.35273972153663635, -0.04933606833219528, -0.2118990123271942, 0.3370470702648163, 0.12394005060195923, 0.29588136076927185, 0.2593684792518616, 0.2183387279510498, 0.014123968780040741, -0.10420036315917969, 0.0334332212805748, 0.16987812519073486, 0.08548077940940857, 0.05179877206683159, 0.058176204562187195, -0.019222410395741463, -0.4287348985671997, -0.046130623668432236, 0.42611637711524963, 0.06745576858520508, 0.018848730251193047, 0.35685300827026367, -0.20551623404026031, 0.1021183505654335, -0.12648087739944458, 0.3355500400066376, 0.5218337178230286, -0.01232524961233139, -0.08149158954620361, 0.14315849542617798, -0.021850338205695152, -0.2628588080406189, 0.23861795663833618, 0.017743900418281555, -0.1646205335855484, -0.008773408830165863, 0.26240983605384827, 0.1607111394405365, -0.07805108278989792, -0.44960224628448486, -0.16130203008651733, 0.362535297870636, -0.34172287583351135, 0.3437931537628174, 0.09285584837198257, 0.32768094539642334, -0.483480840921402, -0.31222569942474365, -0.07782717049121857, -0.3827926218509674, 0.0844026654958725, 0.38302475214004517, -0.09323745220899582, 0.11557202786207199, -0.17427238821983337, 0.05813458561897278, 0.07772059738636017, -0.048652756959199905, -0.10177460312843323, 0.048557061702013016, -0.3949509561061859, 0.128805011510849, -0.08165327459573746, -0.1171666830778122, -0.1848565936088562, -0.08107689023017883, 0.23077325522899628, 0.27326542139053345, -0.1900751292705536, 0.06061265617609024, -0.08477772772312164, 0.12471629679203033, 0.17156998813152313, 0.1490536481142044, -0.2594197988510132, -0.30067336559295654, 0.5005359649658203, -0.3058415353298187, -0.2192993313074112, 0.3871685862541199, 0.09997428953647614, -0.05988685041666031, -0.006135977804660797, -0.5211727619171143, -0.2241022288799286, -0.35634541511535645, 0.07029077410697937, -0.09889330714941025, 0.18880580365657806, 0.38657963275909424, 0.3998183012008667, 0.22101789712905884, 0.19581717252731323, 0.13928082585334778, 0.05005870386958122, -0.2715661823749542, 0.2696123719215393, -0.013182342052459717, -0.30086320638656616, -0.27527040243148804, -0.006792761385440826, 0.2634026110172272, -0.123146653175354, -0.5247805714607239, -0.03732258081436157, -0.3209400475025177, 0.03727634251117706, -0.20965373516082764, 0.15693973004817963, 0.35497331619262695, 0.18411101400852203, -0.12770962715148926, 0.03977853059768677, -0.11750276386737823, 0.14900729060173035, 0.13180865347385406, -0.013068240135908127, -0.1140984296798706, 0.13988228142261505, -0.008346758782863617, 0.4515620172023773, -0.23243889212608337, -0.49271830916404724, 0.23644064366817474, -0.14586254954338074, -0.05267074704170227, -0.1407422572374344, -0.648513913154602, 0.17912410199642181, 0.008252471685409546, -0.22524090111255646, 0.031131921336054802, -0.1652589589357376, 0.12208296358585358, -0.2702326774597168, 0.03246108442544937, 0.1924402415752411, -0.3298083543777466, 0.16506727039813995, -0.04472730681300163, 0.10981449484825134, -0.1882145255804062, 0.005054101347923279, -0.004024907946586609, -0.00452210009098053, 0.1434651017189026, 0.14753708243370056, -0.12432782351970673, -0.15119807422161102, -0.14070576429367065, -0.4676625430583954, -0.23974324762821198, 0.11574403941631317, -0.013119012117385864, 0.5061631798744202, -0.09242924302816391, -0.287717342376709, 0.19515211880207062, 0.1546899378299713, 0.43048402667045593, 0.3727838099002838, -0.0674203559756279, 0.3951696753501892, -0.28912103176116943, -0.2214917540550232, -0.2513844966888428, -0.38991543650627136, -0.09655977785587311, 0.14376585185527802, 0.2740156948566437, -0.12801995873451233, -0.12749652564525604, 0.2530774772167206, -0.00601625069975853, -0.20985229313373566, 0.0836346298456192, -0.36885660886764526, -0.22663648426532745, -0.2847502529621124, 0.24166128039360046, -0.0016026347875595093, 0.3828981816768646, 0.1381385773420334, -0.11297167837619781, -0.1682649403810501, -0.3790956139564514, 0.1751476526260376, 0.06319337338209152, -0.054088130593299866, -0.0459090881049633, 0.2721274793148041, -0.17221394181251526, 0.15161775052547455, 0.21226061880588531, 0.3196388781070709, 0.12007422745227814, -0.2156243771314621, -0.01005497295409441, 0.16253826022148132, 0.2514963746070862, 0.15312254428863525, -0.08114504814147949, 0.16502371430397034, -0.09553883224725723, 0.3300096392631531, 0.004477363079786301, 0.23179000616073608, 0.2406769096851349, 0.030290547758340836, -0.002940051257610321, -0.037595558911561966, 0.2302762269973755, -0.047035668045282364, 0.11717748641967773, 0.09739400446414948, -0.03827700391411781, -0.10399554669857025, 0.08622796088457108, 0.054677315056324005, 1.107297420501709, 0.05398347228765488, 0.1958358734846115, 0.3732786178588867, -0.2156713902950287, 0.2701660692691803, -0.25110432505607605, 0.25904640555381775, -0.44972994923591614, -0.5446449518203735, -0.05955551564693451, -0.15259358286857605, 0.09004276245832443, -0.11513344943523407, -0.1622541844844818, 0.15357491374015808, -0.12357813864946365, 0.3503260016441345, 0.2394338697195053, -0.04672675207257271, 0.09749215841293335, -0.16108667850494385, -0.35443294048309326, 0.13142509758472443, -0.25358086824417114, 0.3702431917190552, 0.12199011445045471, -0.20371249318122864, -0.29973721504211426, -0.20377641916275024, -0.027321353554725647, 0.2369409203529358, -0.18058577179908752, 0.11062946915626526, 0.4199519753456116, -0.2924826443195343, 0.19358986616134644, 0.001721749547868967, 0.08592641353607178, 0.20637579262256622, -0.05129818618297577, 0.10016541182994843, -0.22233596444129944, 0.18206411600112915, 0.08806454390287399, 0.1114332377910614, 0.5541040897369385, -0.10231100022792816, -0.248545303940773, 0.1692265272140503, -0.007652450352907181, -0.05519811436533928, 0.23640239238739014, 0.05747983977198601, 0.08912820369005203, -0.4969985783100128, 0.015296407043933868, 0.06259237974882126, -0.05149507522583008, -0.3470431864261627, 0.20607517659664154, 0.07150081545114517, -0.49973493814468384, 0.28008654713630676, 0.2227068394422531, -0.2510972023010254, -0.032746583223342896, 0.523213267326355, 0.03107370436191559, 0.2990812659263611, 0.472490131855011, 0.08169074356555939, -0.10290248692035675, -0.1903047263622284, -0.09046679735183716, 0.4304616153240204, -0.6447473168373108, 0.4572187662124634, -0.30041834712028503, -0.1736561805009842, -0.39786356687545776, 0.42532414197921753, -0.09676986932754517, 0.10200174152851105, -0.18702924251556396, -0.3029313087463379, -0.4575052559375763, -0.1244705393910408, 0.12482468783855438, 0.2770746052265167, -0.28217241168022156, 0.497815877199173, 0.04063054919242859, -0.009988637641072273, -0.3482639193534851, 0.12228643894195557, -0.4575382173061371, 0.10888273268938065, 0.00896868109703064, -0.20028173923492432, 0.1874534785747528, -0.09552978724241257, 0.15270832180976868, 0.19912424683570862, -0.0027638617902994156, -0.2449517697095871, -0.25264281034469604, 0.11221463233232498, 0.18908634781837463, -0.03207921236753464, -0.03359771519899368, 0.252795934677124, -0.12431011348962784, -0.1534135937690735, -0.04329004883766174, 0.2113657295703888, -0.07674998044967651, 0.35750728845596313, 0.19289687275886536, -0.019030705094337463, 0.06872501969337463, -0.11098766326904297, 0.05288261920213699, -0.016270998865365982, 0.1864132136106491, -0.07087063044309616, -0.01538035273551941, -0.03935842961072922, -0.37513697147369385, 0.14133106172084808, -0.11981384456157684, -0.05138125643134117, 0.3015194535255432, -0.2523069381713867, -0.15779241919517517, 0.1467491090297699, 0.24719509482383728, 0.1500653475522995, -0.1352858543395996, 0.11254700273275375, -0.04623716324567795, 0.23992857336997986, -0.31987082958221436, 0.010005228221416473, 0.12103066593408585, -0.055496007204055786, -0.07129302620887756, 0.26744091510772705, -0.08544853329658508, -0.02998039871454239, 0.013458581641316414, 0.19102084636688232, 0.004127047955989838, 0.05335010215640068, 0.028245899826288223, 0.4502750635147095, -0.05245917662978172, 0.33423659205436707, 0.31148356199264526, -0.13707348704338074, 0.07470415532588959, 0.16486358642578125, -0.24388054013252258, 0.18711620569229126, 0.11718027293682098, -0.1628168374300003, 0.35223913192749023, -0.0728127658367157, -0.11726783215999603, -0.00827520340681076, 0.19942639768123627, -0.17484115064144135, -0.07456520199775696, 0.32516783475875854, -0.1469372808933258, -0.15035516023635864, 0.044066883623600006, 0.08715330064296722, -0.33034586906433105, 0.11424466222524643, 0.05506230890750885, -0.0010963231325149536, -0.5420821905136108, -0.09862291067838669, -0.10525024682283401, 0.06938578188419342, 0.5946497321128845, -0.04664622247219086, -0.07413570582866669, -0.2673405408859253, -0.138398215174675, 0.3255883455276489, 0.18868666887283325, -0.17175689339637756, 0.234541118144989, 0.27081891894340515, -0.1949029415845871, -0.10538385808467865, 0.5402457118034363, 0.427590012550354, 0.07438290864229202, -0.02717532590031624, 0.08558015525341034, -0.10104241967201233, -0.18880793452262878, 0.10323627293109894, 0.24270892143249512, -0.12081184983253479, 0.2649831175804138, 0.08678179234266281, 0.12321725487709045, -0.21204006671905518, 0.4372066259384155, -0.20560836791992188, 0.030435506254434586, -0.26736482977867126, 0.8229358196258545, -0.019096730276942253, -0.3099750876426697, -0.30728793144226074, -0.02139940857887268, -0.23454022407531738, 0.21983206272125244, 0.20088410377502441, -0.05430874973535538, 0.008260492235422134, -0.222096785902977, 0.08547194302082062, 0.026699203997850418, 0.2693706452846527, 0.18922892212867737, 0.08690944314002991, -0.5263440012931824, 0.050333619117736816, -0.2152126282453537, 0.2483057975769043, 0.08911274373531342, 0.14144791662693024, -0.13402990996837616, -0.07316125929355621, -0.08717609941959381, 0.10741861164569855, 0.09264709055423737, -0.1484655886888504, 0.057479456067085266, 0.1307927817106247, -0.11942476034164429, -0.16555680334568024, -0.1378258913755417, -0.09692222625017166, 0.1851930469274521, -0.1746809333562851, 0.01622929982841015, -0.021307550370693207, 0.0724841058254242, -0.07268103212118149, -0.06956682354211807, -0.10350316762924194, 0.0077083478681743145, 0.11530503630638123, 0.037248045206069946, 0.2832149267196655, 0.010529778897762299, 0.1197502389550209, 0.13643786311149597, -0.14719830453395844, -0.2857438027858734, 0.09743674099445343, 0.04881143197417259, 0.6039170026779175, 0.1559256762266159, -0.08582102507352829, -0.4458862245082855, -0.01223510131239891, 0.08635810017585754, 0.03320680931210518, -0.2374192774295807, 0.2504565119743347, -0.2068198174238205, 0.1736845225095749, 0.34076112508773804, 0.232599139213562, 0.011972052976489067, 0.10694210231304169, -0.6414797306060791, -0.7082111835479736, 0.4613809585571289, -0.31442150473594666, -0.2555356025695801, -0.12849895656108856, 0.13970646262168884, 0.09191963821649551, -0.023206794634461403, -0.7739472389221191, 0.03471145033836365, 0.2363339066505432, -0.29960769414901733, -0.33853402733802795, 0.26479408144950867, 0.14712265133857727, 0.2800688147544861, 0.0754094272851944, 0.7390705943107605, 0.11314120888710022, 0.1022886335849762, 0.054533444344997406, -0.1350041627883911 ]
https://github.com/huggingface/datasets/issues/6567
Thanks, I hope someone from transformers library addresses this issue. On Mon, Jan 8, 2024 at 15:29 Albert Villanova del Moral < ***@***.***> wrote: > I think you are reporting an issue with the transformers library. Note > this is the repository of the datasets library. I am transferring your > issue to their repository. > > β€” > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AE4LJNOYMD6WJMXFKPMH6DLYNO7PJAVCNFSM6AAAAABBQ63HWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY4DQNJYGY> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
AttributeError: 'str' object has no attribute 'to'
### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4
91
AttributeError: 'str' object has no attribute 'to' ### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4 Thanks, I hope someone from transformers library addresses this issue. On Mon, Jan 8, 2024 at 15:29 Albert Villanova del Moral < ***@***.***> wrote: > I think you are reporting an issue with the transformers library. Note > this is the repository of the datasets library. I am transferring your > issue to their repository. > > β€” > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AE4LJNOYMD6WJMXFKPMH6DLYNO7PJAVCNFSM6AAAAABBQ63HWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY4DQNJYGY> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -0.021199770271778107, -0.24903526902198792, 0.0938526839017868, 0.019450323656201363, 0.608004629611969, 0.023181691765785217, 0.6019617319107056, 0.42540740966796875, -0.18105585873126984, 0.31553900241851807, 0.025728940963745117, 0.1877838373184204, -0.1374649852514267, -0.15173020958900452, 0.03735188767313957, -0.2979094982147217, 0.07160252332687378, 0.12853991985321045, -0.11001992225646973, -0.04551273211836815, 0.02573089301586151, 0.3605198562145233, -0.07435831427574158, 0.2769191563129425, -0.44601714611053467, 0.019362619146704674, 0.15459582209587097, -0.1662847399711609, 0.1520530879497528, -0.23885253071784973, 0.27474743127822876, -0.1591241955757141, 0.052128612995147705, 0.24640002846717834, -0.00011664444173220545, 0.13894528150558472, 0.13794846832752228, 0.11776197701692581, -0.41954290866851807, -0.17298199236392975, -0.25566136837005615, 0.07812657952308655, 0.37530815601348877, -0.19499099254608154, -0.17641681432724, 0.31153562664985657, 0.06642130017280579, -0.10199432820081711, 0.10874517261981964, 0.5685552954673767, 0.23341378569602966, 0.45376044511795044, 0.2287592589855194, -0.29368436336517334, 0.3004910945892334, 0.11217159032821655, -0.26145458221435547, 0.254713773727417, 0.030155042186379433, 0.03936564177274704, 0.14868342876434326, 0.09585278481245041, 0.17566341161727905, 0.15813995897769928, 0.165415957570076, 0.14920255541801453, 0.06839296966791153, -0.09586271643638611, -0.06935617327690125, 0.21833589673042297, 0.06747892498970032, -0.39860817790031433, -0.1870635747909546, -0.0417594388127327, 0.06540611386299133, -0.023592472076416016, 0.036171115934848785, -0.020592696964740753, -0.0924844890832901, 0.011620580218732357, -0.0603831447660923, -0.0938398540019989, -0.019504360854625702, -0.07875825464725494, -0.29344266653060913, 0.3653905391693115, -0.024436865001916885, -0.03798744082450867, 0.06816869974136353, 0.11766096949577332, 0.08825364708900452, 0.0332917682826519, 0.14593733847141266, 0.08185891807079315, -0.3014514446258545, -0.14405901730060577, -0.1342582404613495, -0.5682247877120972, -0.3655480444431305, -0.20679442584514618, 0.29601597785949707, -0.31092917919158936, 0.25613659620285034, 0.2856135964393616, 0.13427233695983887, 0.28976091742515564, -0.46441054344177246, 0.6654629707336426, 0.20903344452381134, 0.3257468342781067, -0.20055270195007324, -0.11815999448299408, -0.014102991670370102, 0.07779170572757721, 0.2110021710395813, -0.04988245666027069, 0.3108813464641571, -0.14687302708625793, -0.40248680114746094, 0.16543427109718323, -0.46418827772140503, 0.09994398057460785, -0.006226830184459686, 0.09460770338773727, -0.17740370333194733, 0.41594988107681274, 0.39489424228668213, -0.03781851381063461, -0.24811187386512756, 0.24627217650413513, -0.34002381563186646, 0.386615514755249, -0.0693100169301033, -0.31701815128326416, -0.027706071734428406, 0.09459595382213593, -0.0713639110326767, -0.12923723459243774, 0.2142089158296585, -0.034026049077510834, -0.02676551789045334, -0.13352638483047485, 0.07805219292640686, 0.5457662343978882, -0.2333633303642273, 0.22712472081184387, 0.12572890520095825, -0.6100165247917175, -0.14959970116615295, 0.37645453214645386, -0.3563147485256195, -0.31682088971138, -0.07681050151586533, 0.23415181040763855, -0.24566861987113953, -0.18127456307411194, -0.27610769867897034, -0.02915983647108078, 0.15594255924224854, -0.24529482424259186, 0.0037842728197574615, -0.4680045545101166, -0.2785598635673523, -0.09132099151611328, 0.12276683002710342, 0.007020220160484314, -0.24311508238315582, -0.3575798273086548, 0.1808808147907257, -0.11225870251655579, 0.15736374258995056, 0.0015461184084415436, -0.053122103214263916, 0.31468114256858826, -0.1191500723361969, 0.04419104754924774, 0.21685338020324707, -0.2327624261379242, -0.4126972556114197, -0.048802800476551056, -0.1482512354850769, -0.01901455968618393, -0.004680212587118149, 0.18330657482147217, 0.08870355784893036, 0.013169709593057632, -0.26135537028312683, 0.2507016360759735, 0.03291639685630798, 0.24059250950813293, -0.3885344862937927, 0.08947305381298065, 0.040283046662807465, 0.3042069673538208, 0.27701666951179504, 0.4342876374721527, -0.07197484374046326, 0.6959620714187622, 0.19318734109401703, 0.07411752641201019, 0.17428088188171387, -0.011462187394499779, 0.44244855642318726, -0.4442189931869507, -0.16211964190006256, -0.13793721795082092, -0.20412227511405945, -0.06681007146835327, 0.08675454556941986, 0.37375104427337646, -0.0011976100504398346, 0.21346136927604675, -0.07478291541337967, 0.1396542489528656, -0.08042895793914795, -0.29955095052719116, 0.07081075757741928, 0.06651845574378967, -0.11955328285694122, -0.03109617531299591, -0.3191260099411011, 0.36795344948768616, -0.006189718842506409, 0.16662326455116272, -0.38868987560272217, 0.4023779332637787, -0.22733277082443237, -0.1331518441438675, -0.30276280641555786, 0.17490825057029724, -0.0833800658583641, -0.044088538736104965, -0.37781116366386414, 0.12963031232357025, -0.08454206585884094, -0.09978924691677094, -0.1411270946264267, 0.46466293931007385, 0.30689966678619385, -0.16514618694782257, -0.2099834680557251, 0.46767401695251465, 0.3996541500091553, -0.024581320583820343, -0.21110470592975616, 0.3039235472679138, 0.0820196270942688, 0.3255273401737213, 0.2471287101507187, 0.23137837648391724, 0.0042586252093315125, -0.10602864623069763, 0.034372478723526, 0.1280738264322281, 0.05358860269188881, 0.05885239318013191, -0.00007062405347824097, -0.009827254340052605, -0.3654436469078064, -0.0927097499370575, 0.3498446047306061, 0.08151915669441223, 0.012256650254130363, 0.36154836416244507, -0.19603519141674042, 0.09434303641319275, -0.17225177586078644, 0.40984785556793213, 0.4668833315372467, -0.06655430048704147, -0.10280859470367432, 0.10315178334712982, -0.021943632513284683, -0.2627517879009247, 0.2635389566421509, 0.05764959752559662, -0.14150482416152954, 0.016891835257411003, 0.28338509798049927, 0.2220316082239151, -0.014579154551029205, -0.48702865839004517, -0.12619194388389587, 0.33308735489845276, -0.33481287956237793, 0.31876713037490845, 0.12425228208303452, 0.3677959442138672, -0.5087293982505798, -0.33469241857528687, -0.07022780179977417, -0.39383435249328613, 0.057939302176237106, 0.3414885103702545, -0.16022685170173645, 0.07927420735359192, -0.27421891689300537, -0.017609328031539917, 0.09911545366048813, -0.11851388961076736, -0.07336500287055969, 0.06489267200231552, -0.3614612817764282, 0.10049831122159958, -0.07202015817165375, -0.14593538641929626, -0.2929452955722809, 0.004013463854789734, 0.22100336849689484, 0.3148559629917145, -0.14645911753177643, 0.07149089872837067, -0.024303369224071503, 0.027811935171484947, 0.16331206262111664, 0.05006813257932663, -0.24127385020256042, -0.3101409077644348, 0.4530181884765625, -0.35925328731536865, -0.173493430018425, 0.465393602848053, 0.08158981800079346, -0.04347202926874161, 0.00011371821165084839, -0.5201785564422607, -0.22756005823612213, -0.334360271692276, -0.01807381957769394, -0.13408783078193665, 0.2505797743797302, 0.4248095452785492, 0.3686685264110565, 0.1529752016067505, 0.23842690885066986, 0.10012699663639069, 0.09708871692419052, -0.23380407691001892, 0.29975247383117676, -0.011006370186805725, -0.25301069021224976, -0.30877041816711426, -0.04117075353860855, 0.2104823738336563, -0.09696021676063538, -0.4940272569656372, 0.06864899396896362, -0.3084922432899475, -0.015622138977050781, -0.245461106300354, 0.08300366997718811, 0.3719520568847656, 0.24921151995658875, -0.1066797524690628, 0.04810190200805664, -0.07151791453361511, 0.17453600466251373, 0.1642017364501953, -0.019065745174884796, -0.10834665596485138, 0.09193100035190582, 0.014046765863895416, 0.358916699886322, -0.2622724771499634, -0.4446808099746704, 0.240381121635437, -0.07402638345956802, -0.11802749335765839, -0.134881392121315, -0.5695095062255859, 0.16736304759979248, 0.017258048057556152, -0.3008360266685486, 0.006830599159002304, -0.13130062818527222, 0.09702536463737488, -0.2620965242385864, 0.0284324511885643, 0.23880326747894287, -0.29869306087493896, 0.1994086056947708, -0.13158831000328064, 0.1158813089132309, -0.20526868104934692, -0.004942543804645538, 0.0020236894488334656, -0.005613148212432861, 0.1523512899875641, 0.12274220585823059, -0.11246272921562195, -0.12922774255275726, -0.102730393409729, -0.4654839038848877, -0.15121692419052124, 0.03716915473341942, 0.05105481669306755, 0.5678057670593262, -0.050313036888837814, -0.33613505959510803, 0.16710515320301056, 0.15794479846954346, 0.4026002287864685, 0.38314032554626465, 0.023037845268845558, 0.4232916831970215, -0.22256982326507568, -0.19145682454109192, -0.31416797637939453, -0.3777885437011719, -0.11126219481229782, 0.12569178640842438, 0.20589104294776917, -0.029101654887199402, -0.0709025114774704, 0.2476269155740738, -0.027860824018716812, -0.23100383579730988, 0.05575214698910713, -0.32386577129364014, -0.2025500237941742, -0.2388700246810913, 0.22385916113853455, 0.031115978956222534, 0.3907196819782257, 0.1679268628358841, -0.13663913309574127, -0.17824934422969818, -0.3845663070678711, 0.15063118934631348, -0.061693158000707626, -0.08325101435184479, -0.10512815415859222, 0.26113754510879517, -0.2412692755460739, 0.13887432217597961, 0.15531209111213684, 0.2771884799003601, 0.1930357664823532, -0.1412528157234192, 0.055007513612508774, 0.16005417704582214, 0.23936614394187927, 0.11086130142211914, -0.08980774879455566, 0.128902405500412, -0.11215993762016296, 0.272635281085968, -0.0013602860271930695, 0.1446182280778885, 0.1625707745552063, -0.0541885606944561, -0.022343166172504425, -0.0034580081701278687, 0.215750589966774, -0.14168497920036316, 0.14417801797389984, 0.033477142453193665, -0.08197705447673798, -0.09865595400333405, 0.1734706461429596, 0.08445113152265549, 1.0828909873962402, 0.05932239443063736, 0.14836791157722473, 0.34021276235580444, -0.2539185881614685, 0.2776731550693512, -0.33117908239364624, 0.2886314392089844, -0.47163668274879456, -0.5364699363708496, -0.06729930639266968, -0.17934244871139526, 0.05818004161119461, -0.12057284265756607, -0.1269281506538391, 0.11270330846309662, -0.13946053385734558, 0.32774803042411804, 0.2939988374710083, -0.02635902911424637, 0.11116965115070343, -0.13726288080215454, -0.2858603596687317, 0.10720150172710419, -0.20576997101306915, 0.3739166557788849, 0.14980454742908478, -0.21039904654026031, -0.2912142872810364, -0.24345317482948303, -0.08591535687446594, 0.30689123272895813, -0.10390983521938324, 0.13446535170078278, 0.5016880631446838, -0.22960147261619568, 0.19666370749473572, -0.020897692069411278, 0.0068595558404922485, 0.18237483501434326, -0.03582663834095001, 0.16054034233093262, -0.1784389764070511, 0.1992562711238861, 0.16658377647399902, 0.18654312193393707, 0.6019720435142517, -0.11180911958217621, -0.2251293659210205, 0.16281293332576752, -0.0518888458609581, -0.14954127371311188, 0.2506723403930664, 0.02522245980799198, 0.13614417612552643, -0.45104658603668213, 0.041539695113897324, 0.06212534010410309, -0.11562825739383698, -0.32476675510406494, 0.20134472846984863, 0.038601186126470566, -0.5123504996299744, 0.2778242528438568, 0.2047768533229828, -0.2681867480278015, -0.03365308791399002, 0.5383485555648804, 0.03500783443450928, 0.3448544144630432, 0.4541092813014984, 0.09172755479812622, -0.10968519747257233, -0.18083801865577698, -0.10136756300926208, 0.4145587384700775, -0.7181199789047241, 0.44905608892440796, -0.38746365904808044, -0.192584827542305, -0.3855218291282654, 0.40149784088134766, -0.1132199838757515, 0.1891433149576187, -0.2359769195318222, -0.3247711658477783, -0.45325160026550293, -0.16936863958835602, 0.1468696892261505, 0.2329394817352295, -0.35160815715789795, 0.5262702107429504, 0.025812961161136627, -0.021257223561406136, -0.31506600975990295, 0.09330452233552933, -0.4375864267349243, 0.14378955960273743, -0.10503202676773071, -0.17794881761074066, 0.13510049879550934, -0.11691129952669144, 0.1444721519947052, 0.17529962956905365, 0.04671136289834976, -0.20980602502822876, -0.31181800365448, 0.11527813971042633, 0.2191079556941986, -0.005731493234634399, -0.08266197144985199, 0.2514042258262634, -0.12759548425674438, -0.11749903857707977, -0.10644561052322388, 0.22913852334022522, -0.13863405585289001, 0.4301932454109192, 0.2096853405237198, -0.02520860731601715, 0.030514054000377655, -0.07342405617237091, 0.01499803178012371, 0.0069225989282131195, 0.20792320370674133, -0.043555282056331635, 0.03210192918777466, -0.00929626077413559, -0.45709165930747986, 0.09480486065149307, -0.21295638382434845, -0.028819987550377846, 0.3294591009616852, -0.245169997215271, -0.1515205204486847, 0.15402570366859436, 0.15182076394557953, 0.09559155255556107, -0.1412326693534851, 0.09075485914945602, -0.11639777570962906, 0.21810570359230042, -0.2753159999847412, -0.01628175564110279, 0.01454954594373703, -0.021983155980706215, -0.13169537484645844, 0.2319543957710266, -0.075400210916996, -0.10762719064950943, 0.031999316066503525, 0.20313780009746552, 0.042879730463027954, 0.020097054541110992, 0.046898942440748215, 0.5115418434143066, -0.04982634261250496, 0.35688257217407227, 0.24844515323638916, -0.19180192053318024, 0.052353717386722565, 0.12317515164613724, -0.21125754714012146, 0.14914797246456146, 0.20894856750965118, -0.15801076591014862, 0.310865193605423, -0.01779455691576004, -0.14193236827850342, 0.05143578350543976, 0.21801641583442688, -0.14285123348236084, -0.03282536566257477, 0.22125890851020813, -0.08218394219875336, -0.06564420461654663, 0.054939985275268555, 0.03773351013660431, -0.30475008487701416, 0.07707077264785767, 0.1437220424413681, 0.01004442572593689, -0.5928364396095276, -0.08277080953121185, -0.11307407915592194, 0.12206880003213882, 0.5545052886009216, -0.024347715079784393, -0.12488169968128204, -0.22798630595207214, -0.10289892554283142, 0.28723451495170593, 0.19281068444252014, -0.24277320504188538, 0.21456465125083923, 0.27746766805648804, -0.21452638506889343, -0.07718516886234283, 0.4867764413356781, 0.4229413568973541, 0.10328006744384766, -0.03713091462850571, 0.08207206428050995, -0.11970588564872742, -0.1985229253768921, 0.14211711287498474, 0.25403472781181335, -0.09328268468379974, 0.2598032057285309, 0.01821829006075859, 0.10703324526548386, -0.16172394156455994, 0.45253053307533264, -0.16765332221984863, 0.059409383684396744, -0.1912667155265808, 0.9066122174263, 0.04643916338682175, -0.3559562861919403, -0.25470101833343506, 0.04677823930978775, -0.18526926636695862, 0.18553020060062408, 0.15623393654823303, -0.03583845868706703, 0.02724170684814453, -0.16879919171333313, 0.06693413108587265, 0.05801345780491829, 0.22361822426319122, 0.15362218022346497, 0.06881541013717651, -0.5263348817825317, 0.0419185608625412, -0.0990147739648819, 0.292471706867218, 0.11855653673410416, 0.18714845180511475, -0.08368690311908722, -0.08548735082149506, -0.13369610905647278, 0.045251090079545975, 0.025711707770824432, -0.12427349388599396, 0.03623941168189049, 0.2195485383272171, -0.050971951335668564, -0.13714148104190826, -0.06487150490283966, -0.042336732149124146, 0.14930887520313263, -0.19385938346385956, 0.01668303832411766, 0.03417765349149704, 0.06735360622406006, -0.10207908600568771, -0.11277581006288528, -0.013798844069242477, 0.0871603712439537, 0.08951731026172638, 0.0151048693805933, 0.27939459681510925, -0.0067639946937561035, 0.13318857550621033, 0.09133948385715485, -0.10149428993463516, -0.2646749019622803, 0.02178838476538658, 0.02619856595993042, 0.5807562470436096, 0.19053855538368225, -0.006084938533604145, -0.4290986657142639, -0.08902890235185623, -0.027289368212223053, 0.12139217555522919, -0.29400962591171265, 0.23399177193641663, -0.2917524576187134, 0.2238202840089798, 0.3038783073425293, 0.12663909792900085, 0.06927581131458282, 0.08816982060670853, -0.6744308471679688, -0.7016345262527466, 0.39566928148269653, -0.3009098470211029, -0.2449234277009964, -0.146192729473114, 0.14068683981895447, 0.04937729611992836, 0.053878672420978546, -0.7765921354293823, 0.006193146109580994, 0.23158125579357147, -0.26740455627441406, -0.32136988639831543, 0.19122716784477234, 0.19671326875686646, 0.30891305208206177, 0.05099571496248245, 0.702396810054779, 0.12149723619222641, 0.14434298872947693, -0.010687842965126038, -0.12689489126205444 ]
https://github.com/huggingface/datasets/issues/6567
@andysingal, I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues I don't have the rights to transfer this issue to their repo.
AttributeError: 'str' object has no attribute 'to'
### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4
24
AttributeError: 'str' object has no attribute 'to' ### Describe the bug ``` -------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>() 8 report_to="wandb") 9 ---> 10 trainer = Trainer( 11 model=model, 12 args=training_args, 1 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device) 688 689 def _move_model_to_device(self, model, device): --> 690 model = model.to(device) 691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them. 692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"): AttributeError: 'str' object has no attribute 'to' ``` ### Steps to reproduce the bug here is the notebook: ``` https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing ``` ### Expected behavior run the Training ### Environment info Colab Notebook , T4 @andysingal, I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues I don't have the rights to transfer this issue to their repo.
[ 0.0757463276386261, -0.4929776191711426, 0.0982719212770462, 0.06737048178911209, 0.5980656743049622, -0.017362095415592194, 0.5761122107505798, 0.3846137523651123, -0.1268261820077896, 0.3702743947505951, -0.019784869626164436, 0.16745971143245697, -0.11638899147510529, -0.06340529769659042, 0.08663733303546906, -0.3659118413925171, 0.05191367119550705, 0.0997089296579361, -0.06795185059309006, -0.03547881543636322, 0.03974558413028717, 0.3885669410228729, -0.04581362009048462, 0.30980125069618225, -0.41295114159584045, 0.04393681138753891, 0.11130215972661972, -0.15564587712287903, 0.20409458875656128, -0.17835445702075958, 0.2191045880317688, -0.13358692824840546, -0.0015909560024738312, 0.2377568632364273, -0.00011663842451525852, 0.15458974242210388, 0.060707855969667435, 0.11298779398202896, -0.3586145043373108, -0.16879230737686157, -0.19015422463417053, 0.07972786575555801, 0.3544091582298279, -0.1650061309337616, -0.1778651475906372, 0.3098980784416199, 0.04567945748567581, -0.00918307900428772, 0.20973888039588928, 0.588948667049408, 0.23994861543178558, 0.4866815507411957, 0.22274097800254822, -0.2852988541126251, 0.23989281058311462, 0.07056660950183868, -0.21584555506706238, 0.3510495126247406, -0.03782854601740837, 0.023371152579784393, 0.15724873542785645, 0.08463342487812042, 0.16869452595710754, 0.11244536936283112, 0.14743667840957642, 0.2325524389743805, 0.11793653666973114, -0.15595878660678864, -0.06920745223760605, 0.23038499057292938, -0.13653242588043213, -0.32761862874031067, -0.17296406626701355, -0.0693528801202774, 0.06814566254615784, -0.07018961012363434, 0.011744356714189053, -0.025858938694000244, -0.10725265741348267, 0.03776983544230461, -0.04632612317800522, -0.10076829046010971, -0.021956712007522583, -0.1220005452632904, -0.27045220136642456, 0.3282963037490845, -0.08492830395698547, -0.05487428978085518, 0.14096619188785553, 0.1366068422794342, -0.08915726840496063, 0.039171986281871796, 0.18155895173549652, 0.09688424319028854, -0.2566233277320862, -0.14445549249649048, -0.09656259417533875, -0.5046318173408508, -0.3058854043483734, -0.2228083610534668, 0.3150405287742615, -0.3485186994075775, 0.27839305996894836, 0.29800695180892944, 0.008140657097101212, 0.3337225615978241, -0.4582713544368744, 0.5429752469062805, 0.17697006464004517, 0.3969680070877075, -0.19115664064884186, -0.10454532504081726, 0.01255810633301735, 0.06066008284687996, 0.17967712879180908, -0.03637650981545448, 0.3309522271156311, -0.10407151281833649, -0.4566602408885956, 0.2062692791223526, -0.4712292551994324, 0.1190711259841919, -0.029059695079922676, 0.10649731010198593, -0.16602367162704468, 0.3581608533859253, 0.4270789623260498, -0.003456825390458107, -0.31261953711509705, 0.25857678055763245, -0.3479400873184204, 0.3799443542957306, -0.01147780567407608, -0.2844330668449402, -0.11676944047212601, 0.10806172341108322, -0.026748551055788994, -0.10757756978273392, 0.25535205006599426, -0.05711871758103371, -0.09402622282505035, -0.060167346149683, 0.02746877819299698, 0.5261686444282532, -0.253221333026886, 0.14009299874305725, 0.1619645059108734, -0.616222083568573, -0.13281899690628052, 0.2601146399974823, -0.29610079526901245, -0.33198946714401245, -0.040280748158693314, 0.24444429576396942, -0.19666816294193268, -0.17892727255821228, -0.3224177956581116, -0.019477088004350662, 0.13237550854682922, -0.12945470213890076, 0.029337914660573006, -0.4290938377380371, -0.316103458404541, -0.06882792711257935, 0.17615322768688202, 0.031566500663757324, -0.1593867689371109, -0.4330437183380127, 0.28674763441085815, -0.1382964849472046, 0.14584533870220184, 0.0004036165773868561, 0.029271092265844345, 0.38545796275138855, -0.15983855724334717, -0.026703178882598877, 0.15346631407737732, -0.22899731993675232, -0.38307425379753113, -0.07028506696224213, -0.21841612458229065, 0.04125291109085083, 0.08010251820087433, 0.05439796298742294, 0.038998205214738846, 0.04937572777271271, -0.11348800361156464, 0.21765337884426117, 0.014483032748103142, 0.21299253404140472, -0.3635227084159851, 0.1354409158229828, -0.02159387618303299, 0.24297073483467102, 0.21837911009788513, 0.4485528767108917, -0.13592877984046936, 0.5633639097213745, 0.18997839093208313, 0.0713241845369339, 0.1398559808731079, -0.029482394456863403, 0.4295644164085388, -0.4469780921936035, -0.1702221930027008, -0.15912406146526337, -0.21932359039783478, -0.0654982253909111, -0.023896466940641403, 0.37707242369651794, 0.03268459066748619, 0.14592038094997406, -0.14058318734169006, 0.0982230007648468, -0.07111652195453644, -0.3303133547306061, 0.09594815224409103, 0.05280604213476181, -0.06119581311941147, 0.04956745356321335, -0.29471030831336975, 0.36969512701034546, 0.004067137837409973, 0.2301563322544098, -0.35685625672340393, 0.3780409097671509, -0.2863309383392334, -0.12368510663509369, -0.33054399490356445, 0.17482784390449524, -0.011481896042823792, -0.08995633572340012, -0.30055925250053406, 0.1379968374967575, -0.14781835675239563, -0.04357730969786644, -0.14595693349838257, 0.388837069272995, 0.35593515634536743, -0.09043796360492706, -0.30050039291381836, 0.4163092374801636, 0.374538779258728, -0.04220300912857056, -0.16933666169643402, 0.3684239983558655, 0.14432698488235474, 0.3732443153858185, 0.24935004115104675, 0.23057004809379578, -0.07854853570461273, -0.07445478439331055, 0.03668425232172012, 0.1988632082939148, 0.084074005484581, -0.009435148909687996, -0.011632576584815979, -0.043790511786937714, -0.43299126625061035, -0.08234918117523193, 0.34833014011383057, 0.07324077188968658, -0.008733035996556282, 0.3192554712295532, -0.16296038031578064, 0.11500676721334457, -0.2000523805618286, 0.2611315846443176, 0.40235838294029236, -0.050984691828489304, -0.14493270218372345, 0.14218555390834808, 0.037032417953014374, -0.2372732311487198, 0.2829584777355194, 0.028482504189014435, -0.1477276235818863, 0.03157241642475128, 0.2645944058895111, 0.20097601413726807, -0.03324747458100319, -0.4827786087989807, -0.19154566526412964, 0.27560955286026, -0.3807355761528015, 0.33209794759750366, 0.20967772603034973, 0.38774052262306213, -0.49320662021636963, -0.3261827826499939, -0.08679629117250443, -0.35786932706832886, 0.04912734404206276, 0.4149859547615051, -0.15134142339229584, 0.06207042187452316, -0.16735967993736267, 0.027044445276260376, 0.10586119443178177, -0.04706043004989624, -0.1568298488855362, 0.14895856380462646, -0.35892608761787415, 0.10131961852312088, -0.12194506824016571, -0.20067095756530762, -0.30534160137176514, -0.055158574134111404, 0.1533564031124115, 0.3767434358596802, -0.18681614100933075, 0.07246115803718567, -0.09227534383535385, 0.08543858677148819, 0.15552741289138794, 0.10413497686386108, -0.2591327726840973, -0.24975749850273132, 0.48389217257499695, -0.28016966581344604, -0.23971068859100342, 0.4750175476074219, 0.11504966020584106, -0.013728026300668716, -0.03931032866239548, -0.4820314049720764, -0.19042281806468964, -0.321294367313385, 0.10971342772245407, -0.10913704335689545, 0.219911590218544, 0.43203210830688477, 0.3673401474952698, 0.22940941154956818, 0.22840556502342224, 0.18034058809280396, 0.13706181943416595, -0.19192469120025635, 0.22688399255275726, -0.0016415566205978394, -0.2513865530490875, -0.36599308252334595, -0.045820336788892746, 0.15072330832481384, -0.21481077373027802, -0.487557590007782, -0.0708254873752594, -0.3494149148464203, -0.03320927172899246, -0.2560819685459137, 0.10327264666557312, 0.38822853565216064, 0.21830734610557556, -0.1028750091791153, 0.062432482838630676, -0.08412333577871323, 0.1901051551103592, 0.20029425621032715, -0.11194639652967453, -0.10280653834342957, 0.1162562370300293, 0.00875847041606903, 0.4080480635166168, -0.24095690250396729, -0.3996953070163727, 0.18103429675102234, -0.13535545766353607, -0.11763523519039154, -0.1884288638830185, -0.6196489930152893, 0.1783050298690796, 0.06941311061382294, -0.2891942262649536, -0.028560683131217957, -0.1539917290210724, 0.18040266633033752, -0.26421207189559937, 0.007501006126403809, 0.24016998708248138, -0.29259952902793884, 0.1770535558462143, -0.07263219356536865, 0.027143755927681923, -0.17666243016719818, -0.01896878331899643, 0.050307631492614746, 0.07811839133501053, 0.2018360197544098, 0.1379314512014389, -0.0694321021437645, -0.11735512316226959, -0.1349909007549286, -0.5162981152534485, -0.19071903824806213, 0.08251413702964783, 0.04520951211452484, 0.4773796796798706, -0.042377669364213943, -0.35273855924606323, 0.21000418066978455, 0.1143089234828949, 0.4560565948486328, 0.42471662163734436, 0.028159277513623238, 0.3689001202583313, -0.2641289234161377, -0.2165558934211731, -0.25999367237091064, -0.3870614767074585, -0.14838333427906036, 0.1706523299217224, 0.2959992289543152, -0.08578089624643326, -0.1179676204919815, 0.26092103123664856, -0.07631674408912659, -0.25108522176742554, 0.12164437025785446, -0.4077277183532715, -0.21305841207504272, -0.23373427987098694, 0.30753207206726074, 0.0543813481926918, 0.3992098569869995, 0.19251206517219543, -0.07346305251121521, -0.1314486414194107, -0.42003893852233887, 0.105855792760849, -0.036409132182598114, -0.10395081341266632, -0.09955069422721863, 0.2151152640581131, -0.20672129094600677, 0.1401093602180481, 0.08558814972639084, 0.2572696805000305, 0.15859833359718323, -0.23017190396785736, -0.0464809313416481, 0.20773319900035858, 0.2819799780845642, 0.15420402586460114, -0.061199769377708435, 0.14768993854522705, -0.07394582033157349, 0.3613271415233612, -0.03015933185815811, 0.1490619033575058, 0.17251767218112946, 0.0075690001249313354, 0.06908345222473145, 0.06479751318693161, 0.21964776515960693, -0.16064009070396423, 0.1235315352678299, -0.010853192768990993, 0.08701770007610321, -0.13432157039642334, 0.17309929430484772, -0.0001382976770401001, 1.119912028312683, 0.13091865181922913, 0.16484029591083527, 0.4307404160499573, -0.2848649024963379, 0.21139687299728394, -0.22783268988132477, 0.2663682699203491, -0.42584243416786194, -0.49607062339782715, -0.0710759311914444, -0.1540263444185257, 0.004197584465146065, -0.19661635160446167, -0.15801770985126495, 0.14009466767311096, -0.17670774459838867, 0.32398608326911926, 0.2762417197227478, -0.10160793364048004, 0.13025888800621033, -0.12170439213514328, -0.29735350608825684, 0.1017279326915741, -0.17880122363567352, 0.4385213851928711, 0.14618337154388428, -0.20250394940376282, -0.27436530590057373, -0.257724404335022, -0.006714090704917908, 0.2284075915813446, -0.2051597237586975, 0.061756279319524765, 0.4854869246482849, -0.2592623233795166, 0.09081709384918213, 0.007585247978568077, 0.04066289961338043, 0.13241615891456604, -0.02572336234152317, 0.09513883292675018, -0.19902876019477844, 0.19970014691352844, 0.12267151474952698, 0.12202136963605881, 0.5873230695724487, -0.08682629466056824, -0.24018576741218567, 0.12898027896881104, -0.04574371874332428, -0.0846891701221466, 0.2345002442598343, 0.03807079792022705, 0.08504028618335724, -0.4329543709754944, 0.049261730164289474, 0.04740409925580025, -0.09657926857471466, -0.35469865798950195, 0.19668269157409668, 0.006447497755289078, -0.5674805045127869, 0.1650136113166809, 0.20456522703170776, -0.24755987524986267, -0.03410716354846954, 0.5049222111701965, 0.03910426050424576, 0.35217854380607605, 0.41928935050964355, 0.04535149037837982, -0.08351737260818481, -0.17478182911872864, -0.08544538170099258, 0.4745052456855774, -0.6889722943305969, 0.49685004353523254, -0.36776626110076904, -0.20772294700145721, -0.49060875177383423, 0.4232516884803772, -0.05712365731596947, 0.14132598042488098, -0.1638156622648239, -0.2989742159843445, -0.47862327098846436, -0.13416892290115356, 0.1578959822654724, 0.22792527079582214, -0.3047301173210144, 0.532139003276825, 0.005801394581794739, 0.008744927123188972, -0.3190688490867615, 0.11810901015996933, -0.4422301650047302, 0.10608041286468506, -0.03058955818414688, -0.22860178351402283, 0.2248086780309677, -0.056025952100753784, 0.16142550110816956, 0.22689391672611237, 0.05468699336051941, -0.2301059365272522, -0.28650766611099243, 0.1020301952958107, 0.1769256591796875, -0.006593883037567139, -0.04284190386533737, 0.35543596744537354, -0.1185581237077713, -0.12139203399419785, -0.07404399663209915, 0.20464296638965607, -0.05145047977566719, 0.37375348806381226, 0.1827147901058197, 0.05741134285926819, 0.07698895037174225, -0.13506488502025604, 0.03737784922122955, -0.006790287792682648, 0.19735835492610931, -0.10468724370002747, -0.06680797785520554, -0.025758974254131317, -0.3858826458454132, 0.12258449196815491, -0.1496051847934723, -0.037859734147787094, 0.3082321882247925, -0.23636659979820251, -0.24616390466690063, 0.07940937578678131, 0.1766890287399292, 0.07142607867717743, -0.14132119715213776, 0.1558825671672821, -0.08951430767774582, 0.22464033961296082, -0.27010872960090637, 0.08298070728778839, 0.10139212012290955, -0.07249465584754944, -0.08524204790592194, 0.29161331057548523, -0.16227102279663086, -0.06502444297075272, 0.006508512422442436, 0.24884860217571259, -0.031088601797819138, 0.04467450827360153, -0.0013622231781482697, 0.3302004337310791, -0.05217582732439041, 0.36406493186950684, 0.2957881689071655, -0.19056081771850586, 0.10123203694820404, 0.057419076561927795, -0.19985538721084595, 0.09426027536392212, 0.10057928413152695, -0.15303906798362732, 0.3934313952922821, 0.016065150499343872, -0.18594825267791748, 0.030495498329401016, 0.16863000392913818, -0.11285434663295746, -0.057595714926719666, 0.31030428409576416, -0.10639092326164246, -0.15730880200862885, 0.07089398056268692, 0.03468797355890274, -0.3403416574001312, 0.06494714319705963, 0.15075048804283142, -0.00788029283285141, -0.5050100088119507, -0.10510151088237762, -0.02000677026808262, 0.08215053379535675, 0.5677183866500854, -0.04201488196849823, -0.10028372704982758, -0.14852872490882874, -0.2710264027118683, 0.3087542951107025, 0.2709955871105194, -0.23261646926403046, 0.22852563858032227, 0.34351423382759094, -0.23384149372577667, -0.14475825428962708, 0.5633389949798584, 0.43315279483795166, 0.0407768152654171, -0.10668942332267761, 0.1013452559709549, -0.07421189546585083, -0.20739492774009705, 0.11666150391101837, 0.23515291512012482, -0.12291468679904938, 0.23692458868026733, 0.02689124271273613, 0.12370285391807556, -0.20214402675628662, 0.4402475655078888, -0.1514202505350113, 0.03534192591905594, -0.22239243984222412, 0.8842219114303589, -0.035164471715688705, -0.32933348417282104, -0.3221450448036194, 0.006371214985847473, -0.20632290840148926, 0.22446951270103455, 0.014162447303533554, -0.019560379907488823, 0.07458094507455826, -0.14137724041938782, 0.07327024638652802, 0.07825028896331787, 0.19506984949111938, 0.17763154208660126, 0.03672456741333008, -0.48503488302230835, 0.13063086569309235, -0.0848851352930069, 0.2523498237133026, 0.17174288630485535, 0.1953240931034088, -0.10677577555179596, -0.058132704347372055, -0.14613518118858337, 0.07480311393737793, 0.086324542760849, -0.17884695529937744, 0.07335008680820465, 0.20008806884288788, -0.048946622759103775, -0.13435611128807068, -0.07140698283910751, -0.09865394234657288, 0.18631310760974884, -0.16163310408592224, 0.026264380663633347, -0.019700367003679276, 0.08620073646306992, -0.07257822155952454, -0.02848341315984726, -0.10928123444318771, 0.0654572993516922, 0.06650541722774506, 0.04797227680683136, 0.21638020873069763, 0.00013862550258636475, 0.08283990621566772, 0.17284490168094635, -0.06134580448269844, -0.2557108700275421, 0.03306017071008682, -0.0012929970398545265, 0.5639699101448059, 0.1571512520313263, -0.15514527261257172, -0.4210185110569, -0.018509749323129654, 0.08894897997379303, 0.028211630880832672, -0.2639956474304199, 0.27535706758499146, -0.2685801386833191, 0.16624288260936737, 0.3076024353504181, 0.20193049311637878, 0.03947465121746063, 0.08377757668495178, -0.6669365167617798, -0.7254316806793213, 0.41686052083969116, -0.29002445936203003, -0.23636047542095184, -0.10034742951393127, 0.19616572558879852, 0.052787162363529205, 0.013354213908314705, -0.7676568627357483, 0.008879929780960083, 0.21738600730895996, -0.29953935742378235, -0.3462603986263275, 0.2937743067741394, 0.13255660235881805, 0.24275317788124084, 0.0681343674659729, 0.6872341632843018, 0.1506785750389099, 0.1390015184879303, 0.061967089772224426, -0.17281284928321838 ]
https://github.com/huggingface/datasets/issues/6566
I also see the same error and get passed it by casting that line to float. so `for x in obj.detach().cpu().numpy()` becomes `for x in obj.detach().to(torch.float).cpu().numpy()` I got the idea from [this ](https://github.com/kohya-ss/sd-webui-additional-networks/pull/128/files) PR where someone was facing a similar issue (in a different repository). I guess numpy doesn't support bfloat16.
I train controlnet_sdxl in bf16 datatype, got unsupported ERROR in datasets
### Describe the bug ``` Traceback (most recent call last): File "train_controlnet_sdxl.py", line 1252, in <module> main(args) File "train_controlnet_sdxl.py", line 1013, in main train_dataset = train_dataset.map(compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single writer.write_batch(batch) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 557, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 248, in pyarrow.lib.array File "pyarrow/array.pxi", line 113, in pyarrow.lib._handle_arrow_array_protocol File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 191, in __arrow_array__ out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True)) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 447, in cast_to_python_objects return _cast_to_python_objects( File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 324, in _cast_to_python_objects for x in obj.detach().cpu().numpy() TypeError: Got unsupported ScalarType BFloat16 ``` ### Steps to reproduce the bug Here is my train script I use BF16 type,I use diffusers train my model ``` export MODEL_DIR="/home/mhh/sd_models/stable-diffusion-xl-base-1.0" export OUTPUT_DIR="./control_net" export VAE_NAME="/home/mhh/sd_models/sdxl-vae-fp16-fix" accelerate launch train_controlnet_sdxl.py \ --pretrained_model_name_or_path=$MODEL_DIR \ --output_dir=$OUTPUT_DIR \ --pretrained_vae_model_name_or_path=$VAE_NAME \ --dataset_name=/home/mhh/sd_datasets/fusing/fill50k \ --mixed_precision="bf16" \ --resolution=1024 \ --learning_rate=1e-5 \ --max_train_steps=200 \ --validation_image "/home/mhh/sd_datasets/controlnet_image/conditioning_image_1.png" "/home/mhh/sd_datasets/controlnet_image/conditioning_image_2.png" \ --validation_prompt "red circle with blue background" "cyan circle with brown floral background" \ --validation_steps=50 \ --train_batch_size=1 \ --gradient_accumulation_steps=4 \ --report_to="wandb" \ --seed=42 \ ``` ### Expected behavior When I changed the data type to fp16, it worked. ### Environment info datasets 2.16.1 numpy 1.24.4
51
I train controlnet_sdxl in bf16 datatype, got unsupported ERROR in datasets ### Describe the bug ``` Traceback (most recent call last): File "train_controlnet_sdxl.py", line 1252, in <module> main(args) File "train_controlnet_sdxl.py", line 1013, in main train_dataset = train_dataset.map(compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single writer.write_batch(batch) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 557, in write_batch arrays.append(pa.array(typed_sequence)) File "pyarrow/array.pxi", line 248, in pyarrow.lib.array File "pyarrow/array.pxi", line 113, in pyarrow.lib._handle_arrow_array_protocol File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 191, in __arrow_array__ out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True)) File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 447, in cast_to_python_objects return _cast_to_python_objects( File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 324, in _cast_to_python_objects for x in obj.detach().cpu().numpy() TypeError: Got unsupported ScalarType BFloat16 ``` ### Steps to reproduce the bug Here is my train script I use BF16 type,I use diffusers train my model ``` export MODEL_DIR="/home/mhh/sd_models/stable-diffusion-xl-base-1.0" export OUTPUT_DIR="./control_net" export VAE_NAME="/home/mhh/sd_models/sdxl-vae-fp16-fix" accelerate launch train_controlnet_sdxl.py \ --pretrained_model_name_or_path=$MODEL_DIR \ --output_dir=$OUTPUT_DIR \ --pretrained_vae_model_name_or_path=$VAE_NAME \ --dataset_name=/home/mhh/sd_datasets/fusing/fill50k \ --mixed_precision="bf16" \ --resolution=1024 \ --learning_rate=1e-5 \ --max_train_steps=200 \ --validation_image "/home/mhh/sd_datasets/controlnet_image/conditioning_image_1.png" "/home/mhh/sd_datasets/controlnet_image/conditioning_image_2.png" \ --validation_prompt "red circle with blue background" "cyan circle with brown floral background" \ --validation_steps=50 \ --train_batch_size=1 \ --gradient_accumulation_steps=4 \ --report_to="wandb" \ --seed=42 \ ``` ### Expected behavior When I changed the data type to fp16, it worked. ### Environment info datasets 2.16.1 numpy 1.24.4 I also see the same error and get passed it by casting that line to float. so `for x in obj.detach().cpu().numpy()` becomes `for x in obj.detach().to(torch.float).cpu().numpy()` I got the idea from [this ](https://github.com/kohya-ss/sd-webui-additional-networks/pull/128/files) PR where someone was facing a similar issue (in a different repository). I guess numpy doesn't support bfloat16.
[ -0.5037292242050171, -0.22553563117980957, -0.013837732374668121, 0.18832528591156006, 0.5082089304924011, 0.14244911074638367, 0.488095223903656, 0.20407439768314362, 0.4085872173309326, 0.15492910146713257, 0.07041168957948685, 0.09321921318769455, -0.4428427815437317, 0.28239578008651733, 0.10053114593029022, 0.04923497885465622, 0.1566818207502365, 0.18906539678573608, -0.20537079870700836, 0.05932542681694031, -0.38782569766044617, -0.10407666116952896, -0.5449900031089783, 0.01786739006638527, -0.47240033745765686, -0.2847910225391388, 0.10106676816940308, 0.0760425329208374, -0.26560813188552856, -0.5933980941772461, 0.5540056228637695, -0.2382853627204895, 0.31497901678085327, 0.42568451166152954, -0.0001094119215849787, 0.28895479440689087, 0.19321148097515106, 0.05921038240194321, -0.13738280534744263, -0.1644386500120163, 0.07785386592149734, 0.00851428508758545, -0.12660203874111176, -0.16152338683605194, -0.20107367634773254, -0.3531474173069, -0.0967109352350235, -0.40552425384521484, 0.17166215181350708, 0.35842227935791016, 0.2291528284549713, 0.24770085513591766, 0.19409853219985962, -0.12670841813087463, 0.025664933025836945, 0.1525047868490219, -0.13990724086761475, 0.13149774074554443, 0.05385778844356537, -0.059447936713695526, -0.04273928329348564, 0.18506701290607452, 0.05205827206373215, -0.2117960900068283, 0.029535168781876564, -0.18660758435726166, 0.041014425456523895, -0.2149946689605713, 0.17546670138835907, 0.26512956619262695, 0.062196001410484314, -0.2689892649650574, -0.3593844473361969, 0.0330536812543869, 0.07458016276359558, -0.4075605273246765, 0.08380727469921112, -0.049107491970062256, 0.16828545928001404, 0.18594972789287567, -0.11483098566532135, -0.12974029779434204, -0.07147113978862762, -0.09048003703355789, -0.021350115537643433, 0.7118738889694214, -0.1398741602897644, 0.2223092019557953, 0.13704349100589752, -0.16141770780086517, 0.22810059785842896, -0.08952391147613525, 0.023749079555273056, 0.2571730315685272, -0.5380403995513916, -0.04599703475832939, -0.28618696331977844, -0.29045599699020386, 0.1291792243719101, -0.12271369248628616, -0.3157559335231781, -0.1691504716873169, 0.13364022970199585, 0.16690929234027863, 0.06146805360913277, 0.06548421829938889, -0.1285485029220581, 0.5814549326896667, 0.20494501292705536, 0.2396288812160492, -0.022172629833221436, -0.08472020924091339, -0.26982587575912476, -0.21639284491539001, 0.1468052715063095, 0.08716140687465668, 0.02583061158657074, 0.06282966583967209, -0.47517576813697815, 0.16250461339950562, -0.07409445196390152, 0.10354617238044739, 0.375002384185791, 0.2657804787158966, -0.05740322172641754, 0.1444956213235855, 0.22382602095603943, 0.12634462118148804, 0.061405785381793976, -0.011969704180955887, -0.26555415987968445, 0.046508416533470154, -0.09802347421646118, -0.27414852380752563, -0.061606258153915405, -0.04723897576332092, 0.04964739829301834, -0.01119665801525116, -0.11207695305347443, 0.04542429745197296, -0.04237506538629532, -0.27616187930107117, 0.37173834443092346, 0.11631825566291809, -0.18367835879325867, -0.0030671656131744385, 0.16420525312423706, 0.14852525293827057, -0.061530619859695435, 0.10357220470905304, -0.15267722308635712, -0.4167586863040924, -0.39422327280044556, 0.27572566270828247, 0.15878237783908844, -0.004857821390032768, -0.2876134216785431, 0.003928042948246002, 0.07573442161083221, -0.017364658415317535, 0.19253572821617126, -0.1388632208108902, -0.2105644792318344, -0.2150433361530304, 0.38659146428108215, 0.10370629280805588, -0.1552981734275818, -0.02883957326412201, -0.0340079665184021, -0.31922394037246704, 0.4776534140110016, 0.18602214753627777, -0.2943902611732483, 0.06480686366558075, -0.261482834815979, 0.22619491815567017, 0.43347692489624023, -0.42142099142074585, -0.11686308681964874, 0.3153285086154938, 0.0191849023103714, -0.06694906204938889, -0.25840774178504944, 0.020117636770009995, 0.3545074164867401, 0.1747685968875885, 0.15626275539398193, 0.1274457424879074, -0.042813990265131, 0.047290802001953125, -0.19493192434310913, -0.27590829133987427, 0.4948500990867615, 0.2087814062833786, 0.18492892384529114, -0.04165629670023918, 0.22091324627399445, 0.041096050292253494, 0.35744670033454895, -0.10943260043859482, 0.17134764790534973, 0.32693004608154297, 0.33637598156929016, -0.21720343828201294, -0.057254303246736526, -0.2865225672721863, -0.5543864965438843, 0.19799016416072845, 0.267440527677536, -0.09123191237449646, 0.13048918545246124, -0.1833638846874237, -0.13773812353610992, 0.18468257784843445, -0.14300322532653809, -0.17340737581253052, 0.17159968614578247, -0.12738099694252014, -0.020320087671279907, -0.09306924790143967, -0.31050974130630493, -0.029846180230379105, -0.6016952395439148, 0.06532353907823563, 0.050238415598869324, 0.1230054423213005, -0.16293229162693024, -0.17764857411384583, 0.19136539101600647, 0.31594711542129517, -0.07891400158405304, -0.14586737751960754, -0.22313152253627777, 0.4866800904273987, -0.07175987958908081, 0.005955185741186142, -0.02171313762664795, -0.020578667521476746, 0.09762490540742874, -0.48248544335365295, -0.15377581119537354, 0.22889143228530884, -0.039463549852371216, 0.00875122845172882, 0.4946105182170868, 0.14735907316207886, 0.2599775493144989, 0.01119181513786316, -0.039385098963975906, 0.20076988637447357, 0.04799220710992813, 0.0658622533082962, 0.06338279694318771, -0.25017139315605164, -0.04634321108460426, -0.1362091302871704, 0.4365898370742798, 0.13440193235874176, -0.3552299439907074, -0.16163960099220276, 0.5429256558418274, 0.18263857066631317, -0.008001390844583511, 0.06626403331756592, 0.02407504990696907, 0.09608364850282669, 0.07770191878080368, 0.09427101910114288, 0.0948239266872406, 0.06242452189326286, -0.0533849336206913, 0.11605506390333176, -0.059679511934518814, 0.006086070090532303, 0.38765430450439453, -0.20511922240257263, 0.5205270648002625, 0.16432377696037292, -0.14867745339870453, 0.06480701267719269, -0.19450944662094116, -0.14091536402702332, -0.040072545409202576, 0.28813180327415466, -0.17508888244628906, -0.1478569507598877, -0.2811691164970398, -0.18411871790885925, -0.36045801639556885, -0.07374756038188934, -0.1503336876630783, 0.1276124119758606, -0.2105897068977356, -0.11606085300445557, -0.0924011692404747, 0.47740551829338074, -0.556367039680481, 0.1943741738796234, 0.15702441334724426, 0.1076408326625824, 0.008003078401088715, 0.06172368675470352, -0.3073118031024933, 0.11756521463394165, 0.20405767858028412, -0.4568619132041931, 0.3436024785041809, 0.29437240958213806, -0.035171132534742355, -0.25557875633239746, -0.2118779718875885, 0.05777334049344063, -0.06629155576229095, 0.09328678995370865, 0.34891006350517273, 0.00026237592101097107, -0.16515478491783142, -0.4226212501525879, 0.260547399520874, -0.5075392127037048, -0.24879661202430725, 0.004043020308017731, -0.24055133759975433, -0.09103453159332275, -0.2338862121105194, -0.2316528856754303, -0.4306623935699463, -0.32663124799728394, -0.06956254690885544, -0.265508770942688, 0.08671285212039948, 0.12444227933883667, 0.017855070531368256, 0.08065296709537506, 0.2739766538143158, -0.21582743525505066, -0.13056020438671112, -0.29899394512176514, 0.21020381152629852, -0.03402707725763321, -0.20268160104751587, 0.012559972703456879, -0.247101828455925, 0.3456135094165802, 0.2886073887348175, -0.22956345975399017, 0.47208356857299805, -0.046015143394470215, -0.11055976897478104, -0.36993682384490967, -0.06950298696756363, 0.16385531425476074, 0.000058554112911224365, -0.06595028936862946, -0.22258102893829346, -0.20049931108951569, 0.13211223483085632, -0.33349791169166565, 0.3570571839809418, 0.10653112828731537, 0.2513759136199951, 0.17470592260360718, 0.238937646150589, 0.32097867131233215, -0.3210079073905945, 0.41817203164100647, -0.2877710461616516, 0.13525032997131348, 0.06176483631134033, -0.3122310936450958, 0.35431548953056335, 0.0028114095330238342, -0.005061671137809753, -0.01663268357515335, -0.3010801672935486, -0.12453383952379227, -0.09694445878267288, 0.016605712473392487, -0.18110299110412598, -0.024203121662139893, 0.08822377771139145, -0.37780940532684326, 0.5962285399436951, -0.11195097118616104, -0.06293658912181854, 0.01102001965045929, 0.033961765468120575, 0.18162637948989868, 0.02937033586204052, 0.03893871232867241, 0.03267715871334076, -0.25284135341644287, -0.26579323410987854, -0.18794192373752594, 0.18112201988697052, 0.1805158406496048, 0.5061678886413574, 0.005788795650005341, 0.10350976884365082, -0.04788041114807129, 0.026623006910085678, 0.5294820666313171, -0.27992182970046997, 0.03580636531114578, 0.020582430064678192, 0.19017712771892548, -0.4493984580039978, -0.13251955807209015, -0.07932483404874802, 0.11152489483356476, 0.1173662543296814, 0.48502621054649353, -0.2612381875514984, -0.36291515827178955, 0.3930164575576782, -0.21772637963294983, -0.1516590416431427, -0.2144317477941513, -0.17133323848247528, 0.0028204694390296936, -0.21674199402332306, 0.13175824284553528, 0.1280522495508194, 0.20407608151435852, -0.23199506103992462, -0.2047184705734253, -0.14929866790771484, 0.0464644730091095, -0.16396227478981018, -0.037067707628011703, 0.3909647464752197, 0.022227872163057327, 0.1725478321313858, 0.02455468475818634, 0.2640373706817627, 0.6258909702301025, 0.22225907444953918, -0.11327303946018219, -0.07771813869476318, 0.02064136043190956, 0.10103517770767212, 0.36782214045524597, 0.09223487973213196, -0.2060624063014984, 0.3955838978290558, 0.3894786536693573, 0.11659504473209381, -0.18035045266151428, 0.06751691550016403, 0.4633970260620117, -0.0948466956615448, -0.32688620686531067, -0.29294610023498535, 0.10510270297527313, 0.2478596419095993, 0.17908160388469696, 0.3285386264324188, 0.13436664640903473, -0.2852713167667389, 0.05248201638460159, 0.3595203459262848, 0.6413891315460205, 0.05969090387225151, 0.013706440106034279, 0.13760143518447876, -0.23760545253753662, 0.06360123306512833, 0.37334904074668884, 0.004612918943166733, -0.3576982915401459, 0.1910378336906433, -0.046111710369586945, -0.08805631101131439, 0.20172208547592163, 0.06018662080168724, -0.14629018306732178, 0.131667360663414, -0.07127431035041809, 0.45987457036972046, -0.09761113673448563, 0.016385823488235474, -0.24404117465019226, -0.093860924243927, -0.25673767924308777, 0.14639535546302795, -0.09467314183712006, -0.12129208445549011, -0.2794356942176819, -0.19521476328372955, 0.024271264672279358, -0.3885918855667114, -0.12638074159622192, 0.1071128100156784, -0.5967444181442261, 0.31406205892562866, 0.34687042236328125, 0.12477411329746246, 0.1733107566833496, 0.19054526090621948, 0.1966010481119156, 0.07704088091850281, -0.0861637070775032, -0.052650921046733856, 0.08652369678020477, 0.04420817643404007, -0.14326675236225128, 0.026314515620470047, 0.4150155484676361, -0.08478447794914246, -0.377006858587265, 0.030101895332336426, -0.19840078055858612, -0.31511086225509644, 0.2798898220062256, -0.07756032049655914, -0.09862007200717926, -0.1527371108531952, -0.07426948100328445, -0.22305962443351746, -0.11374638974666595, -0.1385779231786728, 0.1750238537788391, -0.13883310556411743, -0.32119929790496826, 0.2394915372133255, 0.14917032420635223, -0.023190289735794067, -0.05494549497961998, 0.19442357122898102, 0.05238094553351402, 0.5251802206039429, 0.5473232865333557, -0.08808039128780365, -0.1580827832221985, -0.2781907916069031, -0.10954093933105469, 0.48640382289886475, 0.038745611906051636, 0.12821288406848907, -0.04743969067931175, 0.061424434185028076, 0.1455167531967163, 0.3213338553905487, 0.19735562801361084, 0.06558804214000702, -0.03654470667243004, -0.1333155632019043, -0.546312689781189, 0.1098206639289856, -0.26562294363975525, 0.26601874828338623, -0.20094409584999084, 0.6640206575393677, -0.054096344858407974, -0.1865680068731308, -0.3591737151145935, 0.16856440901756287, -0.46077078580856323, 0.29087600111961365, -0.19420590996742249, -0.06738603115081787, 0.16292297840118408, -0.026636481285095215, 0.21582622826099396, 0.12225489318370819, -0.2755264639854431, -0.21628381311893463, -0.13974489271640778, 0.09524738788604736, 0.21783609688282013, -0.4227474629878998, -0.048826783895492554, -0.1880033314228058, -0.3173165023326874, 0.13016502559185028, -0.07720809429883957, 0.08996794372797012, 0.1054297462105751, 0.20465239882469177, -0.13507498800754547, 0.11542248725891113, 0.0836634561419487, 0.056276120245456696, -0.03009732812643051, 0.15559875965118408, -0.004508215934038162, 0.0888587236404419, 0.08187857270240784, -0.15772831439971924, -0.00028709322214126587, -0.09955534338951111, 0.13068033754825592, 0.0873490571975708, 0.21977753937244415, -0.2819613218307495, -0.14330187439918518, 0.32148149609565735, 0.5813008546829224, 0.27278220653533936, -0.27558159828186035, -0.11993587017059326, 0.1123419925570488, 0.24450142681598663, -0.23659348487854004, 0.12197978794574738, 0.12480401992797852, 0.020183388143777847, -0.029224388301372528, 0.22200194001197815, 0.33756744861602783, 0.062760129570961, -0.0452788807451725, 0.07822945713996887, 0.059543464332818985, -0.23915380239486694, 0.03228633850812912, 0.2895474135875702, 0.02857097238302231, 0.15356381237506866, 0.029719149693846703, 0.12436720728874207, 0.47143059968948364, 0.41775259375572205, -0.055845435708761215, 0.4289676249027252, -0.028488095849752426, 0.056087225675582886, 0.20698818564414978, -0.4616311192512512, 0.21476081013679504, 0.014184102416038513, -0.36001116037368774, -0.04206465557217598, -0.10486650466918945, 0.3361084461212158, -0.15397155284881592, -0.40083548426628113, 0.08622310310602188, 0.1182030439376831, -0.40628373622894287, 0.05745028704404831, -0.2889648377895355, 0.023471176624298096, -0.18726593255996704, -0.08300860971212387, 0.08630886673927307, 0.2536284327507019, 0.2832528054714203, 0.06264445185661316, -0.2181580662727356, -0.22769610583782196, -0.018734972923994064, 0.4464884400367737, 0.2945705056190491, -0.14078110456466675, 0.18763256072998047, 0.28796035051345825, 0.0787549614906311, 0.020920399576425552, 0.5863887667655945, 0.4155171513557434, 0.45940956473350525, 0.012267332524061203, 0.007270261645317078, 0.19308316707611084, -0.12115450203418732, -0.0018909052014350891, 0.04971467703580856, 0.16064710915088654, -0.00665418803691864, 0.31181707978248596, 0.18615742027759552, -0.0955173522233963, 0.03426327928900719, 0.0032180193811655045, 0.18270614743232727, 0.045712441205978394, 0.05489164963364601, -0.1136038601398468, -0.12693078815937042, -0.38774216175079346, 0.017840102314949036, -0.061131637543439865, 0.10784722864627838, 0.5204010009765625, -0.198045551776886, 0.30621370673179626, -0.2929861545562744, 0.10810457915067673, 0.07508671283721924, 0.5347382426261902, 0.30885425209999084, 0.06684255599975586, -0.13425177335739136, -0.40056952834129333, -0.5852621793746948, 0.26353710889816284, -0.07653588056564331, 0.10967370867729187, 0.0021748170256614685, 0.14715468883514404, -0.09168641269207001, -0.373577356338501, 0.3498714566230774, -0.16557416319847107, 0.17951083183288574, 0.08288241922855377, -0.20519137382507324, 0.03142626956105232, -0.093535415828228, -0.10324615985155106, 0.12569227814674377, -0.48020094633102417, 0.22559165954589844, -0.002419453114271164, 0.032081931829452515, -0.06438642740249634, 0.09940151125192642, -0.16539700329303741, -0.0435316264629364, 0.6498481035232544, 0.13601060211658478, 0.2711316645145416, -0.3490021228790283, 0.007677234709262848, -0.14774109423160553, -0.03559113293886185, -0.31492140889167786, 0.09775571525096893, 0.144550621509552, 0.3633309602737427, -0.09554526209831238, -0.3346664011478424, -0.2770150303840637, 0.013944346457719803, 0.1640373170375824, -0.1452486217021942, -0.2952762246131897, 0.27979162335395813, -0.11255951225757599, -0.19282034039497375, 0.22473593056201935, 0.18983881175518036, 0.18595100939273834, 0.05782265216112137, -0.3402698040008545, -0.5313521027565002, 0.48867958784103394, 0.07081496715545654, -0.11095033586025238, -0.2147495448589325, 0.041295334696769714, 0.4172348976135254, -0.19105631113052368, -0.756514310836792, 0.04346299171447754, 0.29645687341690063, -0.05277052894234657, 0.07735695689916611, 0.12668395042419434, -0.04486686736345291, 0.2018168717622757, 0.016644246876239777, 0.34247228503227234, -0.1772146224975586, -0.10330215096473694, 0.19543814659118652, -0.1763134002685547 ]
https://github.com/huggingface/datasets/issues/6565
My current workaround this issue is to return `None` in the second element and then filter out samples which have `None` in them. ```python def merge_samples(batch): if len(batch['a']) == 1: batch['c'] = [batch['a'][0]] batch['d'] = [None] else: batch['c'] = [batch['a'][0]] batch['d'] = [batch['a'][1]] return batch def filter_fn(x): return x['d'] is not None # other code... mapped = mapped.filter(filter_fn) ```
`drop_last_batch=True` for IterableDataset map function is ignored with multiprocessing DataLoader
### Describe the bug Scenario: - Interleaving two iterable datasets of unequal lengths (`all_exhausted`), followed by a batch mapping with batch size 2 to effectively merge the two datasets and get a sample from each dataset in a single batch, with `drop_last_batch=True` to skip the last batch in case it doesn't have two samples. What works: - Using DataLoader with `num_workers=0` What does not work: - Using DataLoader with `num_workers=1`, errors in the last batch. Basically, `drop_last_batch=True` is ignored when using multiple dataloading workers. Please take a look at the minimal repro script below. ### Steps to reproduce the bug ```python from datasets import Dataset, interleave_datasets from torch.utils.data import DataLoader def merge_samples(batch): assert len(batch['a']) == 2, "Batch size must be 2" batch['c'] = [batch['a'][0]] batch['d'] = [batch['a'][1]] return batch def gen1(): for ii in range(1, 8385): yield {"a": ii} def gen2(): for ii in range(1, 5302): yield {"a": ii} if __name__ == '__main__': dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=1024) dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=1024) interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy="all_exhausted") mapped = interleaved.map(merge_samples, batched=True, batch_size=2, remove_columns=interleaved.column_names, drop_last_batch=True) # Works loader = DataLoader(mapped, batch_size=32, num_workers=0) i = 0 for b in loader: print(i, b['c'].shape, b['d'].shape) i += 1 print("DataLoader with num_workers=0 works") # Doesn't work loader = DataLoader(mapped, batch_size=32, num_workers=1) i = 0 for b in loader: print(i, b['c'].shape, b['d'].shape) i += 1 ``` ### Expected behavior `drop_last_batch=True` should have same behaviour for `num_workers=0` and `num_workers>=1` ### Environment info - `datasets` version: 2.16.1 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.10.12 - `huggingface_hub` version: 0.20.2 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.6.0 I have also tested on Linux and got the same behavior.
59
`drop_last_batch=True` for IterableDataset map function is ignored with multiprocessing DataLoader ### Describe the bug Scenario: - Interleaving two iterable datasets of unequal lengths (`all_exhausted`), followed by a batch mapping with batch size 2 to effectively merge the two datasets and get a sample from each dataset in a single batch, with `drop_last_batch=True` to skip the last batch in case it doesn't have two samples. What works: - Using DataLoader with `num_workers=0` What does not work: - Using DataLoader with `num_workers=1`, errors in the last batch. Basically, `drop_last_batch=True` is ignored when using multiple dataloading workers. Please take a look at the minimal repro script below. ### Steps to reproduce the bug ```python from datasets import Dataset, interleave_datasets from torch.utils.data import DataLoader def merge_samples(batch): assert len(batch['a']) == 2, "Batch size must be 2" batch['c'] = [batch['a'][0]] batch['d'] = [batch['a'][1]] return batch def gen1(): for ii in range(1, 8385): yield {"a": ii} def gen2(): for ii in range(1, 5302): yield {"a": ii} if __name__ == '__main__': dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=1024) dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=1024) interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy="all_exhausted") mapped = interleaved.map(merge_samples, batched=True, batch_size=2, remove_columns=interleaved.column_names, drop_last_batch=True) # Works loader = DataLoader(mapped, batch_size=32, num_workers=0) i = 0 for b in loader: print(i, b['c'].shape, b['d'].shape) i += 1 print("DataLoader with num_workers=0 works") # Doesn't work loader = DataLoader(mapped, batch_size=32, num_workers=1) i = 0 for b in loader: print(i, b['c'].shape, b['d'].shape) i += 1 ``` ### Expected behavior `drop_last_batch=True` should have same behaviour for `num_workers=0` and `num_workers>=1` ### Environment info - `datasets` version: 2.16.1 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.10.12 - `huggingface_hub` version: 0.20.2 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.6.0 I have also tested on Linux and got the same behavior. My current workaround this issue is to return `None` in the second element and then filter out samples which have `None` in them. ```python def merge_samples(batch): if len(batch['a']) == 1: batch['c'] = [batch['a'][0]] batch['d'] = [None] else: batch['c'] = [batch['a'][0]] batch['d'] = [batch['a'][1]] return batch def filter_fn(x): return x['d'] is not None # other code... mapped = mapped.filter(filter_fn) ```
[ -0.29564857482910156, -0.06441396474838257, -0.031954340636730194, 0.10420383512973785, -0.08406788110733032, -0.06830085813999176, 0.658607006072998, 0.2046472430229187, 0.2394963800907135, 0.4104592502117157, -0.027381081134080887, 0.37076422572135925, -0.1618267297744751, -0.24033448100090027, -0.3354009985923767, 0.06458159536123276, 0.1024688258767128, 0.01339704915881157, -0.16959287226200104, 0.09647218883037567, -0.1789240837097168, 0.25936171412467957, -0.5185925960540771, -0.19963566958904266, -0.22980336844921112, 0.2035800963640213, -0.1307854801416397, 0.098019078373909, 0.3334900140762329, -0.07039228081703186, 0.3505817949771881, 0.11531728506088257, 0.207238107919693, 0.5579012036323547, -0.00012212585716042668, 0.14409157633781433, 0.22173282504081726, 0.04811714589595795, -0.17738023400306702, -0.2759828567504883, -0.1439393013715744, -0.17852634191513062, -0.15303263068199158, -0.10714977979660034, 0.13689669966697693, 0.07031205296516418, -0.02997848019003868, -0.4961398243904114, 0.1800316870212555, -0.08173292875289917, 0.10004227608442307, 0.4679620862007141, -0.13357219099998474, 0.06264536082744598, 0.10214578360319138, -0.0023317113518714905, 0.11308010667562485, 0.3563404083251953, 0.4128827452659607, -0.37000155448913574, -0.222243994474411, 0.18639327585697174, -0.2049829661846161, 0.03562706708908081, -0.32723385095596313, -0.15817585587501526, -0.022236138582229614, -0.4500707685947418, 0.022871535271406174, 0.0920163244009018, 0.09300167858600616, -0.28012987971305847, -0.22787916660308838, -0.4202061891555786, -0.037993330508470535, -0.19997692108154297, 0.25820615887641907, -0.07312021404504776, -0.1721690148115158, -0.07924032211303711, -0.12781769037246704, 0.3217103183269501, -0.08861004561185837, 0.13715660572052002, -0.003710143268108368, 0.48199689388275146, -0.05870414525270462, 0.2128358781337738, 0.306289941072464, 0.0542418546974659, 0.12397883832454681, -0.14690887928009033, 0.22633647918701172, -0.008758284151554108, -0.44367384910583496, -0.08481292426586151, 0.0819128006696701, -0.10830648988485336, 0.16747495532035828, 0.1564934253692627, -0.1582515686750412, -0.09397877752780914, 0.29275786876678467, 0.14634951949119568, 0.4376104176044464, -0.03953654319047928, -0.10082139074802399, 0.009069237858057022, 0.2321096658706665, -0.02364763244986534, -0.041095830500125885, 0.08128070086240768, 0.20536646246910095, -0.6338819861412048, 0.12796452641487122, 0.2158777415752411, 0.3606489598751068, 0.003309592604637146, -0.4774684011936188, -0.2719123065471649, -0.22513476014137268, -0.2321697622537613, -0.017497152090072632, -0.008885741233825684, 0.02407071366906166, 0.5214048027992249, -0.11589076370000839, 0.3609742522239685, -0.31928643584251404, -0.40069150924682617, -0.0144596416503191, -0.14448396861553192, -0.12251609563827515, -0.10076360404491425, 0.36722707748413086, -0.10856516659259796, 0.37964585423469543, 0.44232696294784546, 0.05622628703713417, 0.018977679312229156, 0.36014583706855774, -0.337155282497406, 0.23265747725963593, 0.09094514697790146, 0.32081520557403564, 0.19173817336559296, 0.03488343581557274, 0.002959735691547394, -0.05084284394979477, 0.26879405975341797, -0.45748165249824524, -0.12282556295394897, -0.062087282538414, 0.05584948509931564, -0.06962277740240097, 0.02355557307600975, -0.44477730989456177, -0.04461580514907837, 0.45074817538261414, -0.0895533338189125, 0.21174685657024384, -0.2770940065383911, -0.06848234683275223, -0.31929296255111694, 0.07344862818717957, 0.5102411508560181, -0.12362167239189148, -0.009271688759326935, 0.04938765987753868, -0.05070602893829346, 0.45984140038490295, 0.06050251051783562, -0.16703873872756958, 0.06958042085170746, -0.308129221200943, 0.022736117243766785, 0.03740110248327255, -0.3894785940647125, -0.24894702434539795, 0.6811385154724121, -0.1833345890045166, 0.4567883610725403, 0.031206300482153893, 0.04176304116845131, 0.45551222562789917, -0.2664852738380432, 0.14118431508541107, 0.2814567983150482, -0.2805463671684265, 0.0913252979516983, -0.15709269046783447, 0.05667576938867569, 0.4247930645942688, 0.1346810758113861, 0.1881440430879593, 0.058971792459487915, 0.014992918819189072, -0.04334573447704315, 0.5442727208137512, 0.2013568878173828, 0.22444698214530945, 0.2603001296520233, -0.12776640057563782, -0.19271856546401978, 0.14909964799880981, 0.05433134734630585, -0.46760815382003784, 0.19676972925662994, 0.006180308759212494, -0.3392447829246521, 0.23601122200489044, 0.12372817099094391, 0.18487092852592468, -0.04684861749410629, -0.3999021649360657, -0.21342939138412476, -0.023987075313925743, 0.1980476677417755, -0.1464422345161438, -0.16744622588157654, -0.12338390201330185, 0.2350412905216217, 0.04168421030044556, 0.03894167020916939, -0.35758858919143677, 0.1953769326210022, 0.08899977803230286, -0.2233991026878357, -0.05179940164089203, 0.21279945969581604, 0.21259722113609314, -0.10602481663227081, -0.09683744609355927, 0.5127167701721191, 0.03354235365986824, 0.08644863963127136, -0.04509811848402023, -0.051719918847084045, 0.1737382858991623, -0.2146972417831421, 0.0604434534907341, 0.22862476110458374, -0.0013104677200317383, -0.10077613592147827, 0.032905060797929764, 0.37153422832489014, -0.166244238615036, 0.37634530663490295, -0.18961185216903687, -0.008101437240839005, 0.04813176393508911, -0.17340373992919922, -0.3037054240703583, -0.06368692964315414, 0.025259174406528473, -0.3471037447452545, 0.3706599771976471, -0.22931647300720215, -0.23771849274635315, 0.08998004347085953, 0.2394229769706726, 0.24975600838661194, -0.15076559782028198, -0.08611057698726654, 0.004457484930753708, 0.0699714720249176, 0.20619800686836243, -0.0927460789680481, 0.7959359288215637, 0.12949654459953308, 0.08070721477270126, -0.3199504613876343, 0.2524524927139282, -0.12900219857692719, -0.024220988154411316, 0.11953873932361603, 0.08559027314186096, 0.16837367415428162, 0.10647816210985184, 0.08717081695795059, -0.07068607211112976, -0.2383439689874649, -0.09580826759338379, -0.17605507373809814, -0.17459213733673096, 0.13950535655021667, -0.13124002516269684, 0.04887973517179489, -0.23812580108642578, -0.40347912907600403, -0.34824514389038086, -0.3919660151004791, -0.2014351487159729, 0.4156161844730377, -0.21545493602752686, 0.2681756317615509, -0.11806702613830566, 0.00277160108089447, -0.09877366572618484, -0.07224801182746887, -0.04666732996702194, 0.34003525972366333, -0.11490162461996078, -0.029501132667064667, 0.12426440417766571, -0.24107405543327332, 0.1913917511701584, 0.28658726811408997, -0.39999452233314514, -0.31206339597702026, 0.1043815165758133, 0.09145840257406235, -0.1442214697599411, -0.08558162301778793, 0.17584159970283508, -0.08679431676864624, 0.2548012137413025, -0.08833836019039154, -0.03212893381714821, -0.1927868127822876, 0.08007986843585968, 0.023676656186580658, -0.13030391931533813, 0.034122537821531296, -0.15374642610549927, -0.0026412233710289, -0.1361943483352661, -0.36363399028778076, -0.1700756698846817, -0.1828577220439911, -0.046877384185791016, 0.07735033333301544, 0.1211797222495079, -0.0779898464679718, 0.3492963910102844, -0.2937641739845276, -0.02486477605998516, -0.7863902449607849, 0.11480887979269028, -0.27780696749687195, -0.04726371541619301, -0.03977157920598984, 0.11938923597335815, 0.17024432122707367, 0.2868203818798065, -0.174601212143898, 0.2267833799123764, -0.04720402508974075, 0.1824842393398285, -0.030529256910085678, 0.3391844630241394, 0.1196332573890686, 0.06950923800468445, 0.07521358132362366, -0.24164661765098572, 0.12217798829078674, 0.349107027053833, -0.034929610788822174, 0.3143142759799957, 0.29546263813972473, 0.22915855050086975, 0.21451154351234436, 0.8670512437820435, 0.44442957639694214, 0.12695497274398804, 0.38955724239349365, 0.1377497911453247, 0.005015396513044834, 0.27428776025772095, -0.3994016647338867, -0.01104247197508812, -0.13918492197990417, 0.28219375014305115, 0.06439267843961716, -0.25452977418899536, -0.37272268533706665, -0.03725554049015045, -0.19309577345848083, -0.2715055048465729, -0.12472280859947205, 0.32368403673171997, -0.5145384073257446, 0.05347725749015808, -0.25253888964653015, 0.01315116137266159, -0.25555187463760376, -0.07507732510566711, -0.05641105771064758, -0.022952400147914886, 0.46443524956703186, -0.0004574693739414215, 0.2545141577720642, 0.02723720297217369, -0.5072177648544312, 0.2435271441936493, -0.011695951223373413, 0.3975214958190918, 0.4204678237438202, -0.23732762038707733, -0.14436516165733337, 0.15538467466831207, 0.8186808228492737, -0.15426482260227203, 0.06261444091796875, 0.21048805117607117, -0.22885259985923767, -0.12987008690834045, -0.3145139515399933, -0.1449446976184845, 0.38640737533569336, 0.49737548828125, 0.21815869212150574, -0.2296830713748932, -0.32239675521850586, 0.2892724871635437, -0.13099469244480133, 0.10298888385295868, -0.2810494899749756, -0.3713549077510834, 0.0017494261264801025, -0.31053322553634644, 0.05387827754020691, 0.3178982138633728, 0.25731873512268066, -0.3982676565647125, -0.04633254185318947, -0.08590136468410492, -0.21692687273025513, 0.07979631423950195, -0.039273664355278015, 0.025384634733200073, -0.02735946699976921, 0.22195610404014587, 0.20804834365844727, 0.11405349522829056, 0.396508127450943, 0.3410337567329407, -0.40522095561027527, -0.3416665494441986, 0.3719812333583832, -0.21686789393424988, 0.4774898588657379, 0.263692170381546, -0.07634150981903076, 0.028412003070116043, 0.0715736374258995, 0.11561968922615051, -0.03314211964607239, -0.20774051547050476, 0.2222447395324707, -0.040615569800138474, -0.6187974810600281, 0.004128254950046539, 0.18603482842445374, 0.2429148554801941, 0.14197546243667603, 0.6918272376060486, -0.4246825575828552, -0.16037991642951965, 0.1320694088935852, -0.04576202481985092, 0.6113078594207764, 0.25547826290130615, -0.031719837337732315, 0.13408733904361725, 0.23976118862628937, -0.10941459238529205, 0.03243626654148102, 0.3818567991256714, -0.23060011863708496, -0.36413851380348206, 0.09235301613807678, -0.1275707185268402, 0.2182944416999817, 0.21039406955242157, -0.07712946832180023, 0.3506586253643036, -0.07037204504013062, 0.17290113866329193, -0.17410260438919067, -0.08197367191314697, -0.05531519651412964, -0.3046770989894867, 0.1737392246723175, -0.013920743018388748, 0.171758234500885, 0.3705644905567169, -0.11221259832382202, -0.31887930631637573, 0.2995176613330841, -0.32825183868408203, -0.10566449910402298, 0.19410225749015808, -0.3443030118942261, 0.3107466399669647, 0.18230901658535004, -0.16088375449180603, 0.23521073162555695, 0.318111389875412, 0.2166644185781479, -0.38664481043815613, 0.07219675183296204, -0.14461034536361694, 0.26485955715179443, 0.21701650321483612, 0.005475148558616638, -0.2244410663843155, 0.19807831943035126, -0.058260366320610046, -0.04626183211803436, -0.02021607756614685, 0.032383162528276443, -0.42036598920822144, -0.1890123337507248, 0.6131531596183777, -0.05785360559821129, -0.11528714001178741, 0.053217753767967224, 0.08268074691295624, 0.1946486532688141, -0.340227335691452, -0.02687978371977806, 0.1025705337524414, -0.05811479315161705, 0.2919226288795471, -0.6810059547424316, -0.16887275874614716, -0.14148956537246704, 0.3758436143398285, 0.06169624626636505, -0.0285414457321167, 0.22767366468906403, 0.07299383729696274, -0.07707837224006653, -0.05217558518052101, -0.1986183524131775, 0.12012074887752533, -0.5138775110244751, 0.3281696140766144, -0.3114825487136841, 0.19456087052822113, 0.11324122548103333, 0.16519546508789062, -0.23356714844703674, 0.13111138343811035, -0.06369520723819733, -0.23503082990646362, -0.27061063051223755, 0.03372257202863693, 0.009891616180539131, 0.0947883203625679, -0.17525434494018555, 0.37954866886138916, 0.2427690029144287, 0.3123517632484436, -0.20033925771713257, 0.04378823935985565, 0.07866031676530838, 0.11155780404806137, 0.17733535170555115, 0.10834749042987823, -0.05668855085968971, 0.14958089590072632, -0.11874575912952423, 0.3008357882499695, 0.15812215209007263, -0.08951813727617264, -0.2135518193244934, 0.11831487715244293, -0.047303758561611176, -0.019789274781942368, 0.12047355622053146, -0.14895227551460266, -0.17876097559928894, -0.2448546290397644, 0.4002630114555359, 0.08816014230251312, 0.02216210588812828, 0.10871683061122894, 0.2580004930496216, 0.30270013213157654, 0.0024192333221435547, 0.04333005100488663, 0.06101822108030319, -0.030789244920015335, 0.08606673777103424, 0.4252483546733856, 0.15212951600551605, -0.12069527059793472, -0.3310932219028473, -0.23139597475528717, 0.26945579051971436, 0.2693237364292145, -0.10750588774681091, -0.35863053798675537, -0.17045658826828003, 0.10747155547142029, 0.1348874419927597, 0.0747290551662445, -0.219235360622406, -0.005574028939008713, -0.06425978243350983, 0.08768891543149948, -0.2153458595275879, -0.10572116076946259, 0.2611790895462036, 0.010548464953899384, 0.0003821626305580139, 0.3128330707550049, 0.18501660227775574, -0.17683738470077515, 0.15221214294433594, 0.18386876583099365, 0.053233709186315536, -0.2978713810443878, 0.16241253912448883, 0.15416382253170013, -0.10062816739082336, 0.22374790906906128, 0.13013680279254913, 0.21753443777561188, 0.0648534893989563, 0.14561522006988525, -0.04199809953570366, 0.8913434147834778, 0.2553320527076721, -0.29818129539489746, -0.14244553446769714, -0.7889389991760254, -0.08844582736492157, -0.1122286468744278, -0.2845819592475891, 0.2769738733768463, -0.013193607330322266, 0.19640083611011505, -0.22034871578216553, -0.2812257707118988, -0.07775706797838211, 0.19665123522281647, -0.1681050956249237, -0.053026922047138214, 0.05842136591672897, -0.051549240946769714, 0.0010833144187927246, -0.08991202712059021, 0.06148069351911545, -0.04213691130280495, 0.6090590953826904, 0.013576067052781582, -0.2852725684642792, -0.29422393441200256, -0.2871480882167816, 0.19769930839538574, 0.17085081338882446, -0.182340607047081, -0.13873688876628876, 0.16622589528560638, 0.05810878053307533, -0.16773420572280884, 0.20483797788619995, 0.5825796127319336, 0.28921765089035034, 0.06452330946922302, -0.11774822324514389, 0.08065339922904968, -0.015480943024158478, -0.2692580819129944, 0.24767810106277466, -0.13536150753498077, -0.20635999739170074, 0.2697327435016632, 0.040565960109233856, -0.1620214432477951, -0.16068394482135773, 0.3520524501800537, 0.15179070830345154, -0.3777996301651001, 0.12706609070301056, 0.036309123039245605, -0.07363323122262955, -0.16635911166667938, -0.08913955092430115, -0.12103478610515594, -0.10162947326898575, 0.1618775725364685, -0.04252694547176361, 0.000253528356552124, -0.0458918996155262, 0.02270573377609253, -0.03611595183610916, 0.024078544229269028, 0.22420482337474823, 0.08141867816448212, -0.4932078421115875, -0.16123174130916595, -0.4598226249217987, 0.1328836977481842, -0.2719130218029022, 0.42398080229759216, -0.02051267772912979, 0.4041275084018707, -0.11800724267959595, -0.08412797749042511, 0.3290722370147705, -0.06240078806877136, 0.3660956025123596, 0.4654206931591034, -0.33009642362594604, -0.11571121215820312, -0.1956319361925125, -0.058384209871292114, 0.3208259046077728, -0.4701782166957855, 0.09850484877824783, 0.04248521849513054, 0.03427805006504059, -0.1540575474500656, -0.06593945622444153, 0.4212643802165985, -0.008962529711425304, 0.2809622287750244, 0.06616262346506119, 0.025304798036813736, -0.04506554454565048, -0.2552250027656555, -0.2977229356765747, 0.2725107669830322, -0.27559325098991394, -0.20609509944915771, 0.17865951359272003, 0.27769356966018677, -0.2565370500087738, 0.04155392199754715, -0.3494873344898224, 0.21687084436416626, 0.2126937061548233, 0.4554237723350525, -0.3663049340248108, 0.11198009550571442, -0.06222817674279213, 0.4432608187198639, -0.0509856715798378, 0.3541387915611267, -0.04122129827737808, 0.24695977568626404, -0.5926719307899475, -0.13536567986011505, 0.06994685530662537, -0.6332335472106934, -0.4468545913696289, -0.611618161201477, 0.2981855273246765, -0.21910560131072998, 0.1408456414937973, -0.3438819944858551, 0.03549662232398987, 0.2456866353750229, -0.10904677957296371, -0.12524081766605377, 0.3833305835723877, 0.11702033132314682, 0.21686585247516632, 0.15149231255054474, -0.03694625571370125, 0.33688774704933167, -0.1886671632528305, 0.4126129150390625, -0.24639427661895752 ]
https://github.com/huggingface/datasets/issues/6563
<del>Installing `datasets` from `main` did the trick so I guess it will be fixed in the next release. NVM https://github.com/huggingface/datasets/blob/d26abadce0b884db32382b92422d8a6aa997d40a/src/datasets/utils/info_utils.py#L5
`ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py)
### Describe the bug Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore. ```text + python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb Traceback (most recent call last): File "/home/trainer/sft_train.py", line 22, in <module> from datasets import load_dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module> from .arrow_dataset import Dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_reader import ArrowReader File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module> from ..utils import tqdm as hf_tqdm File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module> from .info_utils import VerificationMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module> from huggingface_hub.utils import insecure_hashlib ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py) ``` ### Steps to reproduce the bug Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`. ### Expected behavior The dataset should be (downloaded - if needed - and) returned. ### Environment info ```text trainer@a311ae86939e:/mnt$ pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub Required-by: trl, lm-eval, evaluate trainer@a311ae86939e:/mnt$ pip show huggingface_hub Name: huggingface-hub Version: 0.17.3 Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub Home-page: https://github.com/huggingface/huggingface_hub Author: Hugging Face, Inc. Author-email: julien@huggingface.co License: Apache Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate trainer@a311ae86939e:/mnt$ huggingface-cli env Copy-and-paste the text below in your GitHub issue. - huggingface_hub version: 0.17.3 - Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29 - Python version: 3.8.10 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /home/trainer/.cache/huggingface/token - Has saved token ?: True - Who am I ?: wasertech - Configured git credential helpers: - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.2 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 10.2.0 - hf_transfer: N/A - gradio: N/A - tensorboard: N/A - numpy: 1.24.4 - pydantic: N/A - aiohttp: 3.9.1 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets - HF_TOKEN_PATH: /home/trainer/.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 ```
20
`ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py) ### Describe the bug Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore. ```text + python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb Traceback (most recent call last): File "/home/trainer/sft_train.py", line 22, in <module> from datasets import load_dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module> from .arrow_dataset import Dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_reader import ArrowReader File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module> from ..utils import tqdm as hf_tqdm File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module> from .info_utils import VerificationMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module> from huggingface_hub.utils import insecure_hashlib ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py) ``` ### Steps to reproduce the bug Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`. ### Expected behavior The dataset should be (downloaded - if needed - and) returned. ### Environment info ```text trainer@a311ae86939e:/mnt$ pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub Required-by: trl, lm-eval, evaluate trainer@a311ae86939e:/mnt$ pip show huggingface_hub Name: huggingface-hub Version: 0.17.3 Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub Home-page: https://github.com/huggingface/huggingface_hub Author: Hugging Face, Inc. Author-email: julien@huggingface.co License: Apache Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate trainer@a311ae86939e:/mnt$ huggingface-cli env Copy-and-paste the text below in your GitHub issue. - huggingface_hub version: 0.17.3 - Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29 - Python version: 3.8.10 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /home/trainer/.cache/huggingface/token - Has saved token ?: True - Who am I ?: wasertech - Configured git credential helpers: - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.2 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 10.2.0 - hf_transfer: N/A - gradio: N/A - tensorboard: N/A - numpy: 1.24.4 - pydantic: N/A - aiohttp: 3.9.1 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets - HF_TOKEN_PATH: /home/trainer/.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 ``` <del>Installing `datasets` from `main` did the trick so I guess it will be fixed in the next release. NVM https://github.com/huggingface/datasets/blob/d26abadce0b884db32382b92422d8a6aa997d40a/src/datasets/utils/info_utils.py#L5
[ -0.05503574013710022, -0.570375382900238, -0.049042604863643646, 0.1578817367553711, 0.3562760055065155, -0.001315489411354065, 0.1583208292722702, 0.356046199798584, 0.1492595672607422, 0.24469077587127686, -0.12720763683319092, 0.24285480380058289, -0.30560654401779175, 0.23566791415214539, 0.18623284995555878, -0.07730528712272644, 0.12018708884716034, -0.006815508008003235, -0.1834503412246704, -0.004905052483081818, 0.0646306574344635, 0.3446134626865387, -0.03930874168872833, 0.1625463366508484, -0.2528021037578583, -0.06337335705757141, 0.05465546250343323, 0.2832421660423279, -0.3274714946746826, -0.4297003448009491, 0.43969830870628357, -0.19447414577007294, -0.0003150627017021179, 0.36574533581733704, -0.0001097631175071001, 0.27306026220321655, 0.26921409368515015, 0.02205720543861389, 0.041014038026332855, -0.49850142002105713, 0.05073900520801544, -0.19502726197242737, 0.3544453978538513, -0.06878796219825745, -0.09512395411729813, 0.1798321157693863, -0.05911431461572647, 0.0995078757405281, 0.5016686320304871, 0.33418890833854675, 0.29547110199928284, 0.5323150753974915, 0.29041624069213867, -0.15466062724590302, 0.13523930311203003, -0.16771632432937622, -0.25040575861930847, 0.4010012149810791, -0.04360530525445938, 0.18989622592926025, 0.12260714173316956, 0.2627636194229126, 0.20741337537765503, -0.23946473002433777, 0.27062299847602844, -0.1388823539018631, 0.06569836288690567, -0.2155165672302246, -0.267523854970932, 0.04618535935878754, -0.15713828802108765, -0.21949739754199982, -0.3484641909599304, -0.06001218035817146, 0.03637152165174484, -0.13197846710681915, 0.35665223002433777, -0.0033776238560676575, 0.06365451216697693, 0.14934761822223663, 0.015429772436618805, -0.09081652760505676, -0.000501483678817749, -0.036441508680582047, 0.2353529930114746, 0.20688554644584656, -0.17990310490131378, 0.09282150864601135, 0.18987791240215302, -0.029424674808979034, 0.09412626922130585, 0.23005369305610657, -0.1388433575630188, -0.0011007077991962433, -0.0740840807557106, 0.040637195110321045, -0.06756357103586197, 0.015535014681518078, 0.010203897953033447, 0.22832262516021729, 0.09220458567142487, 0.027616586536169052, 0.023984089493751526, 0.17538447678089142, -0.14817769825458527, 0.2482171505689621, -0.24280224740505219, 0.04199706017971039, 0.17217206954956055, 0.5455189347267151, 0.011137068271636963, 0.12120616436004639, -0.08107072114944458, -0.23734994232654572, -0.22506403923034668, -0.06702623516321182, 0.21401891112327576, -0.041909560561180115, -0.07935543358325958, 0.04301328584551811, -0.1179865300655365, 0.00869092345237732, 0.3152030110359192, 0.3541220724582672, -0.24161647260189056, -0.0003039110451936722, 0.25598061084747314, -0.06416851282119751, -0.13091224431991577, 0.3032524585723877, -0.3098946511745453, 0.46506863832473755, -0.29154136776924133, -0.041948799043893814, -0.03957849368453026, -0.6315667629241943, 0.4697030484676361, -0.0034328848123550415, 0.13636472821235657, -0.24935166537761688, -0.20580579340457916, -0.01918553188443184, 0.07588156312704086, 0.27790403366088867, -0.05570382997393608, 0.07670312374830246, 0.04576755687594414, -0.013848423957824707, -0.09177642315626144, -0.22526900470256805, -0.5321235656738281, -0.33220505714416504, -0.33084383606910706, 0.20148645341396332, -0.16019728779792786, 0.09071168303489685, 0.01587945967912674, -0.21021121740341187, -0.05110751464962959, 0.010511666536331177, 0.03967709094285965, -0.13785138726234436, -0.05119539797306061, -0.10996684432029724, 0.2835252285003662, 0.10481323301792145, -0.029140576720237732, -0.401447057723999, 0.37460002303123474, -0.17754974961280823, -0.15043455362319946, 0.12956830859184265, -0.2896295487880707, 0.15535993874073029, -0.2503799796104431, 0.28886157274246216, 0.17402364313602448, -0.5002461671829224, -0.4616802930831909, -0.10986919701099396, -0.1329672932624817, -0.024461399763822556, 0.0036823563277721405, 0.07995472848415375, -0.1485685110092163, 0.1744820773601532, 0.03356438875198364, 0.08234268426895142, 0.249517560005188, -0.12715116143226624, -0.4160052239894867, -0.3570456802845001, -0.37299734354019165, 0.021579429507255554, 0.28857719898223877, -0.06638035178184509, 0.06996290385723114, 0.23414568603038788, 0.24626600742340088, 0.11734819412231445, 0.020930692553520203, 0.37738990783691406, 0.3836027681827545, 0.10779274255037308, -0.059357672929763794, -0.0727204978466034, 0.06376457214355469, 0.20565976202487946, -0.13377991318702698, 0.23598618805408478, -0.3564564287662506, -0.08216311037540436, -0.28276944160461426, -0.029882539063692093, -0.1834908127784729, -0.21108850836753845, 0.1497318148612976, 0.0700811892747879, 0.22404955327510834, 0.24250756204128265, -0.3975621461868286, 0.2850659489631653, -0.08533124625682831, 0.37123316526412964, -0.5446773767471313, 0.4186219573020935, -0.2740083932876587, -0.3283194601535797, -0.0001946091651916504, 0.21069318056106567, 0.15343326330184937, -0.207493394613266, -0.24480295181274414, 0.2785851061344147, -0.3914758861064911, 0.05433354154229164, -0.16201384365558624, 0.055295296013355255, 0.1171640008687973, -0.28529584407806396, -0.11968932300806046, -0.3112425208091736, 0.056425634771585464, 0.10448592156171799, 0.3978382647037506, 0.3044312000274658, -0.03930553048849106, -0.0021907612681388855, 0.08702505379915237, 0.014907516539096832, -0.00881146639585495, -0.075241819024086, 0.0023879706859588623, -0.04725676029920578, 0.23635759949684143, -0.12626993656158447, 0.13439756631851196, -0.1779010146856308, 0.0383286327123642, -0.1393502801656723, 0.6093623638153076, 0.14134404063224792, -0.18156005442142487, 0.07726870477199554, -0.055798787623643875, 0.06340563297271729, 0.05563647300004959, 0.09382519125938416, 0.14531740546226501, 0.004689030349254608, -0.2993091642856598, 0.31313619017601013, 0.035093121230602264, -0.22940970957279205, 0.20787829160690308, 0.1344732940196991, 0.17816543579101562, 0.1000850573182106, 0.0673031359910965, 0.00565970316529274, -0.31029683351516724, -0.1418951451778412, -0.10886476933956146, 0.16367948055267334, -0.25326448678970337, 0.17161747813224792, -0.22367852926254272, 0.028183437883853912, -0.08936825394630432, -0.32263854146003723, -0.17590615153312683, -0.30464601516723633, -0.12607696652412415, 0.35459598898887634, 0.009456276893615723, 0.21038922667503357, 0.12264702469110489, -0.00988815724849701, 0.04937656223773956, -0.07457797229290009, -0.1019643247127533, 0.04140792787075043, -0.17084921896457672, 0.035692110657691956, 0.21479099988937378, -0.08555789291858673, 0.1414702981710434, -0.09449638426303864, -0.03938981145620346, -0.14953340590000153, -0.32621490955352783, 0.24992644786834717, -0.17298828065395355, 0.23213952779769897, 0.4273306727409363, 0.0429992750287056, -0.4793611168861389, -0.32182690501213074, 0.2879447937011719, -0.3579753637313843, -0.25113213062286377, -0.1841374933719635, -0.0007009431719779968, 0.0013167932629585266, -0.1155160591006279, -0.1778787225484848, -0.40733951330184937, -0.27050429582595825, 0.32893991470336914, 0.09977357089519501, 0.10801786184310913, 0.43801894783973694, 0.08633917570114136, 0.2951852083206177, -0.24655500054359436, 0.1448424756526947, 0.012833502143621445, -0.7301996946334839, 0.2583271265029907, -0.10317905992269516, -0.45869070291519165, 0.07945861667394638, -0.07522378116846085, 0.40010106563568115, -0.3198997974395752, -0.5177266001701355, -0.2940681576728821, -0.09623275697231293, 0.1741977483034134, -0.02380463108420372, 0.2226293385028839, 0.1313493251800537, -0.10479198396205902, -0.0795704647898674, -0.034809671342372894, -0.09479470551013947, 0.10503959655761719, -0.2023141235113144, 0.18519827723503113, 0.049339160323143005, 0.3795161247253418, 0.05621223896741867, 0.4962100088596344, -0.03239118307828903, -0.11068928241729736, 0.4720694422721863, 0.018757695332169533, 0.23900093138217926, -0.17399291694164276, -0.40687674283981323, 0.02702796459197998, 0.0799521878361702, 0.1437576711177826, 0.13605928421020508, -0.03494485095143318, 0.5085555911064148, -0.2100672721862793, -0.2194957137107849, -0.1969095766544342, -0.19596034288406372, -0.08095303177833557, 0.07370708882808685, -0.0892721563577652, 0.045198939740657806, -0.03759148716926575, 0.029836460947990417, -0.1291860193014145, 0.3572050929069519, 0.4005986154079437, -0.21864400804042816, 0.08896057307720184, -0.25074341893196106, -0.15885795652866364, -0.47573143243789673, 0.08069050312042236, -0.0065083615481853485, 0.2651136517524719, 0.082771897315979, -0.1335873156785965, 0.13596031069755554, -0.08928336203098297, 0.5148127675056458, 0.3903963565826416, -0.09748934209346771, -0.11680124700069427, -0.4482274651527405, -0.22266051173210144, -0.3001860976219177, -0.09029397368431091, 0.03416045010089874, 0.21628981828689575, 0.45723041892051697, -0.21087303757667542, -0.20541954040527344, 0.22273452579975128, -0.067814402282238, -0.11811386048793793, 0.027971453964710236, -0.4053630232810974, -0.5155017971992493, -0.3042808771133423, 0.06121988967061043, 0.05099470913410187, 0.44301414489746094, 0.2094588577747345, -0.0019773393869400024, -0.07932552695274353, -0.33160433173179626, 0.14301402866840363, 0.00668756291270256, 0.12313452363014221, 0.14201006293296814, 0.16311785578727722, -0.10401047766208649, 0.37217453122138977, 0.09597477316856384, 0.5300309658050537, -0.06700944900512695, -0.12669429183006287, -0.15917885303497314, 0.12597930431365967, -0.012249283492565155, 0.2870619595050812, -0.10018733143806458, 0.4619482159614563, 0.04807118698954582, 0.34175530076026917, -0.043652333319187164, 0.032744843512773514, 0.17952558398246765, 0.013191796839237213, -0.16944098472595215, 0.06649189442396164, 0.3779057562351227, 0.09160031378269196, 0.2014898806810379, 0.3530895411968231, 0.43019038438796997, -0.25074127316474915, 0.21815259754657745, -0.051477376371622086, 0.9168078899383545, 0.013813869096338749, 0.1679973304271698, 0.5615696310997009, 0.10657317191362381, 0.6010767221450806, -0.0010026916861534119, -0.040080659091472626, -0.36792415380477905, -0.279813289642334, -0.00006587058305740356, -0.13384397327899933, 0.28551438450813293, -0.6301578879356384, -0.034857407212257385, 0.05786864832043648, -0.13931649923324585, 0.3769320249557495, -0.16135121881961823, 0.0760054737329483, -0.1622963845729828, -0.04413430392742157, -0.26825565099716187, 0.1522493064403534, 0.04617411643266678, 0.3651314079761505, -0.10541678965091705, -0.30897295475006104, -0.1287134736776352, -0.3912026882171631, -0.07298734039068222, 0.1831986904144287, -0.17049454152584076, 0.3526376187801361, 0.37705278396606445, 0.042374417185783386, 0.06414797902107239, -0.06935913115739822, 0.3752814829349518, 0.07108770310878754, -0.0940977931022644, 0.1433742493391037, -0.09793403744697571, -0.295745313167572, -0.17065468430519104, 0.23322704434394836, 0.3303510844707489, -0.2559635639190674, -0.10937739908695221, 0.17946802079677582, -0.014108266681432724, -0.20651908218860626, 0.06783126294612885, 0.018610451370477676, 0.16855941712856293, -0.19126279652118683, -0.28267958760261536, -0.14377760887145996, -0.08814684301614761, -0.3667019009590149, 0.13468612730503082, 0.14723749458789825, -0.308603972196579, -0.1302204728126526, 0.3540686368942261, -0.22272983193397522, -0.09467367082834244, 0.5199782252311707, -0.04585158824920654, -0.1004597395658493, 0.4745761752128601, 0.117484450340271, -0.179630309343338, -0.0929839015007019, -0.0482218861579895, 0.5407167673110962, -0.4157629609107971, 0.13193635642528534, 0.07154788821935654, -0.060223862528800964, -0.06233645975589752, 0.303808331489563, 0.35405972599983215, 0.18177251517772675, 0.06656067073345184, -0.29197660088539124, -0.2959316372871399, 0.23027649521827698, 0.017261750996112823, 0.14091020822525024, -0.18091896176338196, 0.3162849545478821, -0.1307234764099121, -0.05347129702568054, -0.3342663645744324, 0.23833361268043518, -0.4087732434272766, -0.08497793972492218, -0.34426912665367126, -0.054384805262088776, 0.24022269248962402, -0.014732655137777328, 0.16567441821098328, 0.38691017031669617, -0.36510220170021057, -0.23490247130393982, -0.269077867269516, 0.06326751410961151, 0.1435186117887497, -0.1183539628982544, -0.028379492461681366, 0.0050593093037605286, 0.07035395503044128, 0.056194007396698, -0.004134446382522583, 0.4491237699985504, 0.14145150780677795, 0.07992766797542572, 0.20502416789531708, 0.049603138118982315, -0.00947214663028717, -0.07021695375442505, -0.0065633319318294525, 0.30655062198638916, -0.024574296548962593, -0.05209413915872574, -0.19509398937225342, -0.018938317894935608, -0.25128650665283203, -0.01287217065691948, -0.011155791580677032, 0.0884515792131424, 0.049557194113731384, -0.2621614634990692, -0.25907325744628906, 0.05336872488260269, 0.16654132306575775, 0.385515034198761, -0.4096128046512604, -0.049367114901542664, 0.14627806842327118, 0.20651039481163025, -0.1589566171169281, 0.019668709486722946, -0.10652945190668106, -0.02506684511899948, -0.049453169107437134, 0.07953047752380371, 0.3124969005584717, -0.05470108240842819, -0.13305526971817017, 0.277599960565567, 0.007821984589099884, 0.008034445345401764, 0.3043350875377655, 0.27489006519317627, -0.13384310901165009, 0.06865876913070679, 0.23065529763698578, -0.11873647570610046, 0.04768023639917374, 0.34556692838668823, -0.60428786277771, 0.5652643442153931, -0.26434969902038574, 0.02267787605524063, 0.08622576296329498, -0.056592922657728195, -0.07822161912918091, 0.017898857593536377, 0.011625397950410843, -0.29178863763809204, -0.19329480826854706, 0.7534425258636475, -0.09977518022060394, -0.24616111814975739, -0.004010230302810669, 0.3180309534072876, -0.17698293924331665, -0.10203766077756882, -0.029417235404253006, -0.06690514087677002, -0.37416690587997437, 0.09699535369873047, 0.032150749117136, -0.1233627200126648, 0.10098427534103394, 0.20276795327663422, -0.34889939427375793, -0.16150638461112976, -0.3210834860801697, 0.29249563813209534, 0.24198253452777863, -0.21386060118675232, 0.2589525580406189, 0.33922404050827026, -0.1921374499797821, -0.23459333181381226, 0.15181927382946014, 0.37253883481025696, 0.18044424057006836, 0.2207133173942566, -0.09540699422359467, 0.06680906563997269, -0.04838065057992935, 0.1249694973230362, 0.17483875155448914, 0.1653462052345276, 0.39083918929100037, 0.03103175386786461, 0.17809271812438965, -0.2772482633590698, 0.06747911870479584, -0.17802098393440247, 0.33205854892730713, -0.08214607834815979, 0.41823065280914307, -0.318302184343338, 0.15612824261188507, -0.22939075529575348, 0.2827470898628235, -0.5040220618247986, 0.059672366827726364, 0.37693923711776733, 0.1721276044845581, 0.1490074098110199, -0.2590879499912262, 0.1004202663898468, -0.1537923663854599, 0.5293654799461365, 0.4074843227863312, -0.048658862709999084, -0.2254548966884613, -0.0919400006532669, -0.2642293870449066, 0.27231132984161377, 0.07791268825531006, 0.02284625917673111, -0.1346227526664734, -0.071851447224617, -0.31069883704185486, -0.038787733763456345, 0.11857569217681885, -0.060859184712171555, 0.17126555740833282, -0.27290523052215576, -0.30125319957733154, 0.11432332545518875, -0.10107305645942688, -0.09064796566963196, 0.32226383686065674, -0.06473593413829803, 0.21098068356513977, -0.29980385303497314, 0.03323435038328171, -0.18797419965267181, -0.09243586659431458, -0.17996378242969513, -0.3288770318031311, 0.5169206261634827, 0.011884870007634163, -0.002718329429626465, -0.14294475317001343, -0.2705756425857544, -0.23423174023628235, -0.3904566168785095, 0.03565492480993271, 0.2231830358505249, 0.09145231544971466, 0.526541531085968, 0.022411786019802094, -0.15896572172641754, -0.4728771448135376, 0.26143375039100647, -0.11656424403190613, -0.13248223066329956, -0.1283644735813141, 0.08290019631385803, 0.09536483883857727, 0.15442794561386108, 0.385268896818161, 0.3285098373889923, -0.04340346157550812, 0.08331557363271713, -0.34214651584625244, -0.4008074402809143, 0.7584791779518127, -0.21596357226371765, -0.0037720724940299988, 0.12111152708530426, 0.2293199747800827, 0.49718043208122253, -0.29592177271842957, -0.7881664037704468, 0.11429448425769806, 0.09733763337135315, -0.007079853676259518, -0.2689081132411957, 0.43021151423454285, 0.0543724000453949, 0.21988141536712646, 0.07891766726970673, 0.020408131182193756, 0.1710038185119629, -0.11377453804016113, 0.3454023003578186, -0.16966277360916138 ]
https://github.com/huggingface/datasets/issues/6563
Ha yes I had pinned `tokenizers` to an old version so it downgraded `huggingface_hub`. Note to myself keep HuggingFace modules relatively close together chronologically release wise.
`ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py)
### Describe the bug Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore. ```text + python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb Traceback (most recent call last): File "/home/trainer/sft_train.py", line 22, in <module> from datasets import load_dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module> from .arrow_dataset import Dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_reader import ArrowReader File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module> from ..utils import tqdm as hf_tqdm File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module> from .info_utils import VerificationMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module> from huggingface_hub.utils import insecure_hashlib ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py) ``` ### Steps to reproduce the bug Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`. ### Expected behavior The dataset should be (downloaded - if needed - and) returned. ### Environment info ```text trainer@a311ae86939e:/mnt$ pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub Required-by: trl, lm-eval, evaluate trainer@a311ae86939e:/mnt$ pip show huggingface_hub Name: huggingface-hub Version: 0.17.3 Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub Home-page: https://github.com/huggingface/huggingface_hub Author: Hugging Face, Inc. Author-email: julien@huggingface.co License: Apache Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate trainer@a311ae86939e:/mnt$ huggingface-cli env Copy-and-paste the text below in your GitHub issue. - huggingface_hub version: 0.17.3 - Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29 - Python version: 3.8.10 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /home/trainer/.cache/huggingface/token - Has saved token ?: True - Who am I ?: wasertech - Configured git credential helpers: - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.2 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 10.2.0 - hf_transfer: N/A - gradio: N/A - tensorboard: N/A - numpy: 1.24.4 - pydantic: N/A - aiohttp: 3.9.1 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets - HF_TOKEN_PATH: /home/trainer/.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 ```
26
`ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py) ### Describe the bug Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore. ```text + python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb Traceback (most recent call last): File "/home/trainer/sft_train.py", line 22, in <module> from datasets import load_dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module> from .arrow_dataset import Dataset File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_reader import ArrowReader File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module> from ..utils import tqdm as hf_tqdm File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module> from .info_utils import VerificationMode File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module> from huggingface_hub.utils import insecure_hashlib ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py) ``` ### Steps to reproduce the bug Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`. ### Expected behavior The dataset should be (downloaded - if needed - and) returned. ### Environment info ```text trainer@a311ae86939e:/mnt$ pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub Required-by: trl, lm-eval, evaluate trainer@a311ae86939e:/mnt$ pip show huggingface_hub Name: huggingface-hub Version: 0.17.3 Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub Home-page: https://github.com/huggingface/huggingface_hub Author: Hugging Face, Inc. Author-email: julien@huggingface.co License: Apache Location: /home/trainer/llm-train/lib/python3.8/site-packages Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate trainer@a311ae86939e:/mnt$ huggingface-cli env Copy-and-paste the text below in your GitHub issue. - huggingface_hub version: 0.17.3 - Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29 - Python version: 3.8.10 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /home/trainer/.cache/huggingface/token - Has saved token ?: True - Who am I ?: wasertech - Configured git credential helpers: - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.2 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 10.2.0 - hf_transfer: N/A - gradio: N/A - tensorboard: N/A - numpy: 1.24.4 - pydantic: N/A - aiohttp: 3.9.1 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets - HF_TOKEN_PATH: /home/trainer/.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 ``` Ha yes I had pinned `tokenizers` to an old version so it downgraded `huggingface_hub`. Note to myself keep HuggingFace modules relatively close together chronologically release wise.
[ -0.05503574013710022, -0.570375382900238, -0.049042604863643646, 0.1578817367553711, 0.3562760055065155, -0.001315489411354065, 0.1583208292722702, 0.356046199798584, 0.1492595672607422, 0.24469077587127686, -0.12720763683319092, 0.24285480380058289, -0.30560654401779175, 0.23566791415214539, 0.18623284995555878, -0.07730528712272644, 0.12018708884716034, -0.006815508008003235, -0.1834503412246704, -0.004905052483081818, 0.0646306574344635, 0.3446134626865387, -0.03930874168872833, 0.1625463366508484, -0.2528021037578583, -0.06337335705757141, 0.05465546250343323, 0.2832421660423279, -0.3274714946746826, -0.4297003448009491, 0.43969830870628357, -0.19447414577007294, -0.0003150627017021179, 0.36574533581733704, -0.0001097631175071001, 0.27306026220321655, 0.26921409368515015, 0.02205720543861389, 0.041014038026332855, -0.49850142002105713, 0.05073900520801544, -0.19502726197242737, 0.3544453978538513, -0.06878796219825745, -0.09512395411729813, 0.1798321157693863, -0.05911431461572647, 0.0995078757405281, 0.5016686320304871, 0.33418890833854675, 0.29547110199928284, 0.5323150753974915, 0.29041624069213867, -0.15466062724590302, 0.13523930311203003, -0.16771632432937622, -0.25040575861930847, 0.4010012149810791, -0.04360530525445938, 0.18989622592926025, 0.12260714173316956, 0.2627636194229126, 0.20741337537765503, -0.23946473002433777, 0.27062299847602844, -0.1388823539018631, 0.06569836288690567, -0.2155165672302246, -0.267523854970932, 0.04618535935878754, -0.15713828802108765, -0.21949739754199982, -0.3484641909599304, -0.06001218035817146, 0.03637152165174484, -0.13197846710681915, 0.35665223002433777, -0.0033776238560676575, 0.06365451216697693, 0.14934761822223663, 0.015429772436618805, -0.09081652760505676, -0.000501483678817749, -0.036441508680582047, 0.2353529930114746, 0.20688554644584656, -0.17990310490131378, 0.09282150864601135, 0.18987791240215302, -0.029424674808979034, 0.09412626922130585, 0.23005369305610657, -0.1388433575630188, -0.0011007077991962433, -0.0740840807557106, 0.040637195110321045, -0.06756357103586197, 0.015535014681518078, 0.010203897953033447, 0.22832262516021729, 0.09220458567142487, 0.027616586536169052, 0.023984089493751526, 0.17538447678089142, -0.14817769825458527, 0.2482171505689621, -0.24280224740505219, 0.04199706017971039, 0.17217206954956055, 0.5455189347267151, 0.011137068271636963, 0.12120616436004639, -0.08107072114944458, -0.23734994232654572, -0.22506403923034668, -0.06702623516321182, 0.21401891112327576, -0.041909560561180115, -0.07935543358325958, 0.04301328584551811, -0.1179865300655365, 0.00869092345237732, 0.3152030110359192, 0.3541220724582672, -0.24161647260189056, -0.0003039110451936722, 0.25598061084747314, -0.06416851282119751, -0.13091224431991577, 0.3032524585723877, -0.3098946511745453, 0.46506863832473755, -0.29154136776924133, -0.041948799043893814, -0.03957849368453026, -0.6315667629241943, 0.4697030484676361, -0.0034328848123550415, 0.13636472821235657, -0.24935166537761688, -0.20580579340457916, -0.01918553188443184, 0.07588156312704086, 0.27790403366088867, -0.05570382997393608, 0.07670312374830246, 0.04576755687594414, -0.013848423957824707, -0.09177642315626144, -0.22526900470256805, -0.5321235656738281, -0.33220505714416504, -0.33084383606910706, 0.20148645341396332, -0.16019728779792786, 0.09071168303489685, 0.01587945967912674, -0.21021121740341187, -0.05110751464962959, 0.010511666536331177, 0.03967709094285965, -0.13785138726234436, -0.05119539797306061, -0.10996684432029724, 0.2835252285003662, 0.10481323301792145, -0.029140576720237732, -0.401447057723999, 0.37460002303123474, -0.17754974961280823, -0.15043455362319946, 0.12956830859184265, -0.2896295487880707, 0.15535993874073029, -0.2503799796104431, 0.28886157274246216, 0.17402364313602448, -0.5002461671829224, -0.4616802930831909, -0.10986919701099396, -0.1329672932624817, -0.024461399763822556, 0.0036823563277721405, 0.07995472848415375, -0.1485685110092163, 0.1744820773601532, 0.03356438875198364, 0.08234268426895142, 0.249517560005188, -0.12715116143226624, -0.4160052239894867, -0.3570456802845001, -0.37299734354019165, 0.021579429507255554, 0.28857719898223877, -0.06638035178184509, 0.06996290385723114, 0.23414568603038788, 0.24626600742340088, 0.11734819412231445, 0.020930692553520203, 0.37738990783691406, 0.3836027681827545, 0.10779274255037308, -0.059357672929763794, -0.0727204978466034, 0.06376457214355469, 0.20565976202487946, -0.13377991318702698, 0.23598618805408478, -0.3564564287662506, -0.08216311037540436, -0.28276944160461426, -0.029882539063692093, -0.1834908127784729, -0.21108850836753845, 0.1497318148612976, 0.0700811892747879, 0.22404955327510834, 0.24250756204128265, -0.3975621461868286, 0.2850659489631653, -0.08533124625682831, 0.37123316526412964, -0.5446773767471313, 0.4186219573020935, -0.2740083932876587, -0.3283194601535797, -0.0001946091651916504, 0.21069318056106567, 0.15343326330184937, -0.207493394613266, -0.24480295181274414, 0.2785851061344147, -0.3914758861064911, 0.05433354154229164, -0.16201384365558624, 0.055295296013355255, 0.1171640008687973, -0.28529584407806396, -0.11968932300806046, -0.3112425208091736, 0.056425634771585464, 0.10448592156171799, 0.3978382647037506, 0.3044312000274658, -0.03930553048849106, -0.0021907612681388855, 0.08702505379915237, 0.014907516539096832, -0.00881146639585495, -0.075241819024086, 0.0023879706859588623, -0.04725676029920578, 0.23635759949684143, -0.12626993656158447, 0.13439756631851196, -0.1779010146856308, 0.0383286327123642, -0.1393502801656723, 0.6093623638153076, 0.14134404063224792, -0.18156005442142487, 0.07726870477199554, -0.055798787623643875, 0.06340563297271729, 0.05563647300004959, 0.09382519125938416, 0.14531740546226501, 0.004689030349254608, -0.2993091642856598, 0.31313619017601013, 0.035093121230602264, -0.22940970957279205, 0.20787829160690308, 0.1344732940196991, 0.17816543579101562, 0.1000850573182106, 0.0673031359910965, 0.00565970316529274, -0.31029683351516724, -0.1418951451778412, -0.10886476933956146, 0.16367948055267334, -0.25326448678970337, 0.17161747813224792, -0.22367852926254272, 0.028183437883853912, -0.08936825394630432, -0.32263854146003723, -0.17590615153312683, -0.30464601516723633, -0.12607696652412415, 0.35459598898887634, 0.009456276893615723, 0.21038922667503357, 0.12264702469110489, -0.00988815724849701, 0.04937656223773956, -0.07457797229290009, -0.1019643247127533, 0.04140792787075043, -0.17084921896457672, 0.035692110657691956, 0.21479099988937378, -0.08555789291858673, 0.1414702981710434, -0.09449638426303864, -0.03938981145620346, -0.14953340590000153, -0.32621490955352783, 0.24992644786834717, -0.17298828065395355, 0.23213952779769897, 0.4273306727409363, 0.0429992750287056, -0.4793611168861389, -0.32182690501213074, 0.2879447937011719, -0.3579753637313843, -0.25113213062286377, -0.1841374933719635, -0.0007009431719779968, 0.0013167932629585266, -0.1155160591006279, -0.1778787225484848, -0.40733951330184937, -0.27050429582595825, 0.32893991470336914, 0.09977357089519501, 0.10801786184310913, 0.43801894783973694, 0.08633917570114136, 0.2951852083206177, -0.24655500054359436, 0.1448424756526947, 0.012833502143621445, -0.7301996946334839, 0.2583271265029907, -0.10317905992269516, -0.45869070291519165, 0.07945861667394638, -0.07522378116846085, 0.40010106563568115, -0.3198997974395752, -0.5177266001701355, -0.2940681576728821, -0.09623275697231293, 0.1741977483034134, -0.02380463108420372, 0.2226293385028839, 0.1313493251800537, -0.10479198396205902, -0.0795704647898674, -0.034809671342372894, -0.09479470551013947, 0.10503959655761719, -0.2023141235113144, 0.18519827723503113, 0.049339160323143005, 0.3795161247253418, 0.05621223896741867, 0.4962100088596344, -0.03239118307828903, -0.11068928241729736, 0.4720694422721863, 0.018757695332169533, 0.23900093138217926, -0.17399291694164276, -0.40687674283981323, 0.02702796459197998, 0.0799521878361702, 0.1437576711177826, 0.13605928421020508, -0.03494485095143318, 0.5085555911064148, -0.2100672721862793, -0.2194957137107849, -0.1969095766544342, -0.19596034288406372, -0.08095303177833557, 0.07370708882808685, -0.0892721563577652, 0.045198939740657806, -0.03759148716926575, 0.029836460947990417, -0.1291860193014145, 0.3572050929069519, 0.4005986154079437, -0.21864400804042816, 0.08896057307720184, -0.25074341893196106, -0.15885795652866364, -0.47573143243789673, 0.08069050312042236, -0.0065083615481853485, 0.2651136517524719, 0.082771897315979, -0.1335873156785965, 0.13596031069755554, -0.08928336203098297, 0.5148127675056458, 0.3903963565826416, -0.09748934209346771, -0.11680124700069427, -0.4482274651527405, -0.22266051173210144, -0.3001860976219177, -0.09029397368431091, 0.03416045010089874, 0.21628981828689575, 0.45723041892051697, -0.21087303757667542, -0.20541954040527344, 0.22273452579975128, -0.067814402282238, -0.11811386048793793, 0.027971453964710236, -0.4053630232810974, -0.5155017971992493, -0.3042808771133423, 0.06121988967061043, 0.05099470913410187, 0.44301414489746094, 0.2094588577747345, -0.0019773393869400024, -0.07932552695274353, -0.33160433173179626, 0.14301402866840363, 0.00668756291270256, 0.12313452363014221, 0.14201006293296814, 0.16311785578727722, -0.10401047766208649, 0.37217453122138977, 0.09597477316856384, 0.5300309658050537, -0.06700944900512695, -0.12669429183006287, -0.15917885303497314, 0.12597930431365967, -0.012249283492565155, 0.2870619595050812, -0.10018733143806458, 0.4619482159614563, 0.04807118698954582, 0.34175530076026917, -0.043652333319187164, 0.032744843512773514, 0.17952558398246765, 0.013191796839237213, -0.16944098472595215, 0.06649189442396164, 0.3779057562351227, 0.09160031378269196, 0.2014898806810379, 0.3530895411968231, 0.43019038438796997, -0.25074127316474915, 0.21815259754657745, -0.051477376371622086, 0.9168078899383545, 0.013813869096338749, 0.1679973304271698, 0.5615696310997009, 0.10657317191362381, 0.6010767221450806, -0.0010026916861534119, -0.040080659091472626, -0.36792415380477905, -0.279813289642334, -0.00006587058305740356, -0.13384397327899933, 0.28551438450813293, -0.6301578879356384, -0.034857407212257385, 0.05786864832043648, -0.13931649923324585, 0.3769320249557495, -0.16135121881961823, 0.0760054737329483, -0.1622963845729828, -0.04413430392742157, -0.26825565099716187, 0.1522493064403534, 0.04617411643266678, 0.3651314079761505, -0.10541678965091705, -0.30897295475006104, -0.1287134736776352, -0.3912026882171631, -0.07298734039068222, 0.1831986904144287, -0.17049454152584076, 0.3526376187801361, 0.37705278396606445, 0.042374417185783386, 0.06414797902107239, -0.06935913115739822, 0.3752814829349518, 0.07108770310878754, -0.0940977931022644, 0.1433742493391037, -0.09793403744697571, -0.295745313167572, -0.17065468430519104, 0.23322704434394836, 0.3303510844707489, -0.2559635639190674, -0.10937739908695221, 0.17946802079677582, -0.014108266681432724, -0.20651908218860626, 0.06783126294612885, 0.018610451370477676, 0.16855941712856293, -0.19126279652118683, -0.28267958760261536, -0.14377760887145996, -0.08814684301614761, -0.3667019009590149, 0.13468612730503082, 0.14723749458789825, -0.308603972196579, -0.1302204728126526, 0.3540686368942261, -0.22272983193397522, -0.09467367082834244, 0.5199782252311707, -0.04585158824920654, -0.1004597395658493, 0.4745761752128601, 0.117484450340271, -0.179630309343338, -0.0929839015007019, -0.0482218861579895, 0.5407167673110962, -0.4157629609107971, 0.13193635642528534, 0.07154788821935654, -0.060223862528800964, -0.06233645975589752, 0.303808331489563, 0.35405972599983215, 0.18177251517772675, 0.06656067073345184, -0.29197660088539124, -0.2959316372871399, 0.23027649521827698, 0.017261750996112823, 0.14091020822525024, -0.18091896176338196, 0.3162849545478821, -0.1307234764099121, -0.05347129702568054, -0.3342663645744324, 0.23833361268043518, -0.4087732434272766, -0.08497793972492218, -0.34426912665367126, -0.054384805262088776, 0.24022269248962402, -0.014732655137777328, 0.16567441821098328, 0.38691017031669617, -0.36510220170021057, -0.23490247130393982, -0.269077867269516, 0.06326751410961151, 0.1435186117887497, -0.1183539628982544, -0.028379492461681366, 0.0050593093037605286, 0.07035395503044128, 0.056194007396698, -0.004134446382522583, 0.4491237699985504, 0.14145150780677795, 0.07992766797542572, 0.20502416789531708, 0.049603138118982315, -0.00947214663028717, -0.07021695375442505, -0.0065633319318294525, 0.30655062198638916, -0.024574296548962593, -0.05209413915872574, -0.19509398937225342, -0.018938317894935608, -0.25128650665283203, -0.01287217065691948, -0.011155791580677032, 0.0884515792131424, 0.049557194113731384, -0.2621614634990692, -0.25907325744628906, 0.05336872488260269, 0.16654132306575775, 0.385515034198761, -0.4096128046512604, -0.049367114901542664, 0.14627806842327118, 0.20651039481163025, -0.1589566171169281, 0.019668709486722946, -0.10652945190668106, -0.02506684511899948, -0.049453169107437134, 0.07953047752380371, 0.3124969005584717, -0.05470108240842819, -0.13305526971817017, 0.277599960565567, 0.007821984589099884, 0.008034445345401764, 0.3043350875377655, 0.27489006519317627, -0.13384310901165009, 0.06865876913070679, 0.23065529763698578, -0.11873647570610046, 0.04768023639917374, 0.34556692838668823, -0.60428786277771, 0.5652643442153931, -0.26434969902038574, 0.02267787605524063, 0.08622576296329498, -0.056592922657728195, -0.07822161912918091, 0.017898857593536377, 0.011625397950410843, -0.29178863763809204, -0.19329480826854706, 0.7534425258636475, -0.09977518022060394, -0.24616111814975739, -0.004010230302810669, 0.3180309534072876, -0.17698293924331665, -0.10203766077756882, -0.029417235404253006, -0.06690514087677002, -0.37416690587997437, 0.09699535369873047, 0.032150749117136, -0.1233627200126648, 0.10098427534103394, 0.20276795327663422, -0.34889939427375793, -0.16150638461112976, -0.3210834860801697, 0.29249563813209534, 0.24198253452777863, -0.21386060118675232, 0.2589525580406189, 0.33922404050827026, -0.1921374499797821, -0.23459333181381226, 0.15181927382946014, 0.37253883481025696, 0.18044424057006836, 0.2207133173942566, -0.09540699422359467, 0.06680906563997269, -0.04838065057992935, 0.1249694973230362, 0.17483875155448914, 0.1653462052345276, 0.39083918929100037, 0.03103175386786461, 0.17809271812438965, -0.2772482633590698, 0.06747911870479584, -0.17802098393440247, 0.33205854892730713, -0.08214607834815979, 0.41823065280914307, -0.318302184343338, 0.15612824261188507, -0.22939075529575348, 0.2827470898628235, -0.5040220618247986, 0.059672366827726364, 0.37693923711776733, 0.1721276044845581, 0.1490074098110199, -0.2590879499912262, 0.1004202663898468, -0.1537923663854599, 0.5293654799461365, 0.4074843227863312, -0.048658862709999084, -0.2254548966884613, -0.0919400006532669, -0.2642293870449066, 0.27231132984161377, 0.07791268825531006, 0.02284625917673111, -0.1346227526664734, -0.071851447224617, -0.31069883704185486, -0.038787733763456345, 0.11857569217681885, -0.060859184712171555, 0.17126555740833282, -0.27290523052215576, -0.30125319957733154, 0.11432332545518875, -0.10107305645942688, -0.09064796566963196, 0.32226383686065674, -0.06473593413829803, 0.21098068356513977, -0.29980385303497314, 0.03323435038328171, -0.18797419965267181, -0.09243586659431458, -0.17996378242969513, -0.3288770318031311, 0.5169206261634827, 0.011884870007634163, -0.002718329429626465, -0.14294475317001343, -0.2705756425857544, -0.23423174023628235, -0.3904566168785095, 0.03565492480993271, 0.2231830358505249, 0.09145231544971466, 0.526541531085968, 0.022411786019802094, -0.15896572172641754, -0.4728771448135376, 0.26143375039100647, -0.11656424403190613, -0.13248223066329956, -0.1283644735813141, 0.08290019631385803, 0.09536483883857727, 0.15442794561386108, 0.385268896818161, 0.3285098373889923, -0.04340346157550812, 0.08331557363271713, -0.34214651584625244, -0.4008074402809143, 0.7584791779518127, -0.21596357226371765, -0.0037720724940299988, 0.12111152708530426, 0.2293199747800827, 0.49718043208122253, -0.29592177271842957, -0.7881664037704468, 0.11429448425769806, 0.09733763337135315, -0.007079853676259518, -0.2689081132411957, 0.43021151423454285, 0.0543724000453949, 0.21988141536712646, 0.07891766726970673, 0.020408131182193756, 0.1710038185119629, -0.11377453804016113, 0.3454023003578186, -0.16966277360916138 ]
https://github.com/huggingface/datasets/issues/6561
In particular, I would like to have an example of how to replace the following configuration (from https://huggingface.co/docs/hub/datasets-manual-configuration#splits) ``` --- configs: - config_name: default data_files: - split: train path: "data/*.csv" - split: test path: "holdout/*.csv" --- ``` with the `data_dir` field.
Document YAML configuration with "data_dir"
See https://huggingface.co/datasets/uonlp/CulturaX/discussions/15#6597e83f185db94370d6bf50 for reference
41
Document YAML configuration with "data_dir" See https://huggingface.co/datasets/uonlp/CulturaX/discussions/15#6597e83f185db94370d6bf50 for reference In particular, I would like to have an example of how to replace the following configuration (from https://huggingface.co/docs/hub/datasets-manual-configuration#splits) ``` --- configs: - config_name: default data_files: - split: train path: "data/*.csv" - split: test path: "holdout/*.csv" --- ``` with the `data_dir` field.
[ -0.25297069549560547, -0.1603081226348877, 0.0808432325720787, 0.018189026042819023, 0.23896105587482452, 0.40161192417144775, 0.35298261046409607, 0.054908160120248795, 0.022724732756614685, 0.16462454199790955, 0.032079875469207764, 0.03859062120318413, 0.06359618902206421, 0.4298962652683258, 0.2220606654882431, 0.11304203420877457, 0.005755413323640823, 0.06944163143634796, -0.28166818618774414, 0.17195771634578705, -0.02676953375339508, 0.239849254488945, -0.026044845581054688, -0.05713890120387077, -0.4810565710067749, 0.0312751829624176, -0.2794279456138611, 0.44168782234191895, -0.08901810646057129, -0.18763229250907898, 0.41576939821243286, 0.2949965298175812, 0.040975622832775116, 0.2636059820652008, -0.00012194869486847892, 0.015112310647964478, 0.10147620737552643, -0.3961111903190613, -0.2500552833080292, -0.17175957560539246, -0.5098714232444763, -0.07918880879878998, 0.03551991283893585, -0.17750287055969238, -0.06461841613054276, 0.18292710185050964, -0.014481818303465843, -0.23539406061172485, 0.020092375576496124, 0.16957084834575653, 0.08699770271778107, -0.07173599302768707, -0.32932692766189575, -0.19579556584358215, -0.04157301038503647, 0.5005322694778442, -0.06797058880329132, 0.26813334226608276, 0.26614460349082947, -0.14350301027297974, -0.0612729974091053, 0.09753777086734772, 0.01711394637823105, -0.009924945421516895, 0.31051504611968994, 0.3154563307762146, -0.017002150416374207, -0.06593349575996399, 0.06280346214771271, 0.2085907757282257, 0.5782788395881653, -0.5501216650009155, -0.045939069241285324, -0.4163127839565277, -0.0633881539106369, -0.1590094268321991, 0.0855524018406868, 0.20402151346206665, -0.08152322471141815, 0.3614334464073181, -0.11459185183048248, -0.5428118109703064, -0.1092211976647377, 0.14283670485019684, -0.15737877786159515, 0.2183896005153656, 0.13443070650100708, -0.1479710340499878, 0.19613850116729736, 0.1172972172498703, 0.05455298721790314, -0.0007107481360435486, -0.060892440378665924, -0.15528856217861176, 0.2303571105003357, -0.1485535353422165, -0.2873808443546295, -0.0833611860871315, 0.227189838886261, 0.02713100239634514, -0.0030516367405653, 0.14377620816230774, -0.1350547969341278, 0.29794853925704956, 0.16861507296562195, 0.2307278960943222, 0.4162183403968811, 0.4276280403137207, 0.17114824056625366, 0.4241078197956085, 0.23162159323692322, -0.23071281611919403, 0.04721925035119057, -0.41884225606918335, -0.2316349297761917, -0.10693265497684479, 0.19720228016376495, 0.0710897371172905, -0.2619386911392212, -0.31885454058647156, 0.003835909068584442, -0.03581269830465317, 0.33462628722190857, 0.27813923358917236, 0.1967339813709259, -0.180939182639122, -0.22458185255527496, 0.08793677389621735, 0.014992259442806244, 0.09722527861595154, -0.18996810913085938, 0.3409692645072937, -0.13026973605155945, 0.32650160789489746, 0.1314961314201355, -0.09360093623399734, 0.49830448627471924, 0.15029074251651764, 0.2996501326560974, 0.008838489651679993, 0.04653684049844742, 0.22066569328308105, 0.0384427011013031, 0.3394763767719269, -0.05813344568014145, 0.062176771461963654, 0.14494435489177704, 0.013527221977710724, -0.3901437222957611, 0.025704842060804367, -0.34121620655059814, -0.5800713300704956, -0.013262338005006313, 0.07562246173620224, -0.06378095597028732, -0.04763574153184891, -0.2631256878376007, 0.12243151664733887, -0.1780664324760437, -0.23709788918495178, 0.20572924613952637, 0.1853693127632141, 0.08130231499671936, 0.054638538509607315, 0.22852042317390442, 0.5947345495223999, -0.12425368279218674, -0.23033463954925537, 0.024324648082256317, 0.0024976953864097595, 0.0850149542093277, -0.040166329592466354, -0.22681169211864471, 0.09720365703105927, -0.19041553139686584, 0.703637421131134, 0.29431474208831787, -0.7205708622932434, -0.005391592159867287, 0.04982784390449524, 0.015295781195163727, -0.2006373554468155, 0.09823161363601685, -0.06499838083982468, 0.3917410671710968, 0.011174790561199188, -0.1209428682923317, 0.1922517716884613, -0.11272691935300827, 0.03449690341949463, -0.08528812229633331, -0.182090625166893, -0.46763405203819275, 0.0002986043691635132, -0.2523534595966339, 0.02638634666800499, 0.06999590992927551, 0.27614307403564453, 0.18170253932476044, -0.1556130051612854, 0.3468243479728699, 0.2889132797718048, 0.29786765575408936, 0.11935897171497345, 0.07143250107765198, -0.010465145111083984, -0.44899672269821167, 0.1190386712551117, 0.2585357427597046, -0.16622990369796753, -0.10118480026721954, -0.3215538263320923, -0.38943010568618774, -0.3655884861946106, -0.19836510717868805, -0.3211561441421509, -0.04076581075787544, 0.023446179926395416, -0.053288109600543976, -0.07140343636274338, -0.25209611654281616, 0.16526727378368378, 0.009675651788711548, 0.3742046654224396, -0.11663137376308441, 0.248128280043602, 0.042714543640613556, 0.23360231518745422, -0.1663004755973816, 0.04172767326235771, -0.03574046492576599, -0.3274952173233032, 0.242308109998703, 0.7822792530059814, 0.13261111080646515, 0.5109871029853821, 0.36549457907676697, 0.2349785715341568, 0.48181307315826416, 0.10115504264831543, 0.051091551780700684, -0.15169177949428558, -0.14264632761478424, 0.0930941179394722, -0.5479763150215149, 0.3190452456474304, -0.46942293643951416, 0.046267975121736526, 0.22633369266986847, 0.1797773838043213, 0.13400417566299438, -0.1471061408519745, -0.18720084428787231, -0.5954815149307251, 0.03757698833942413, -0.22069865465164185, 0.11925061047077179, 0.012427683919668198, -0.08375893533229828, 0.16204681992530823, 0.15735918283462524, -0.048544928431510925, 0.09330292046070099, 0.250122606754303, -0.2721461057662964, 0.024104177951812744, 0.20479919016361237, 0.46727532148361206, 0.4115791916847229, 0.10964270681142807, 0.23927730321884155, 0.2653115689754486, -0.08650517463684082, -0.2779240608215332, 0.48170357942581177, -0.008893553167581558, 0.07814764976501465, 0.3058798015117645, 0.028958968818187714, -0.15973541140556335, -0.2362356036901474, -0.20370787382125854, 0.1008792445063591, 0.10915521532297134, -0.1309622824192047, 0.12750697135925293, -0.4569314122200012, -0.10707145929336548, -0.2537185549736023, -0.3489172160625458, -0.037317149341106415, -0.34187379479408264, 0.2831711173057556, 0.12282654643058777, -0.17488613724708557, 0.2078382521867752, 0.12807831168174744, 0.05908869951963425, -0.14929130673408508, -0.3590760827064514, -0.1535697728395462, 0.04129180312156677, 0.08421763777732849, -0.014912739396095276, -0.13048021495342255, 0.28965240716934204, 0.042761512100696564, -0.28675252199172974, -0.08244062215089798, -0.8189095854759216, -0.036904625594615936, 0.32639360427856445, 0.2219398021697998, 0.3290746808052063, 0.48677441477775574, 0.2606654763221741, 0.08599346876144409, -0.2811889052391052, 0.08481377363204956, 0.37822407484054565, -0.09974096715450287, -0.02808351069688797, 0.028010938316583633, 0.38434720039367676, -0.2278980314731598, -0.3783363401889801, -0.13883835077285767, -0.33395659923553467, 0.11854491382837296, 0.00990072637796402, 0.0014839693903923035, 0.1320810765028, 0.07229931652545929, -0.032657891511917114, -0.11875633150339127, -0.2463333010673523, 0.032300952821969986, -0.24845972657203674, 0.2628606855869293, -0.3342870771884918, 0.130059614777565, 0.15215922892093658, 0.16760283708572388, 0.09053227305412292, 0.13482409715652466, -0.22111089527606964, -0.26152169704437256, -0.04216206818819046, 0.11670207977294922, -0.013424009084701538, 0.006892440840601921, 0.5189574360847473, 0.19893909990787506, 0.018088411539793015, -0.06195884943008423, -0.0892559215426445, 0.23635146021842957, 0.17291578650474548, 0.21643021702766418, -0.0400468185544014, 0.038937438279390335, 0.23550185561180115, 0.4670705199241638, -0.07965618371963501, 0.1473933756351471, 0.05290624499320984, -0.5279660224914551, 0.23847225308418274, -0.04167181998491287, 0.023755386471748352, -0.1496041715145111, -0.06437496840953827, -0.03080645576119423, 0.3943527042865753, 0.25966644287109375, 0.26900714635849, 0.10621707141399384, -0.2475266307592392, -0.06386228650808334, -0.5313288569450378, 0.08740700781345367, -0.13406845927238464, 0.23152795433998108, 0.05045243352651596, -0.07972423732280731, 0.1392352133989334, -0.04696611687541008, 0.10973792523145676, 0.6075596809387207, -0.07211308181285858, 0.1511818915605545, -0.06947219371795654, 0.2507358491420746, -0.4283883273601532, 0.15602000057697296, -0.09139013290405273, -0.315724641084671, -0.07915621995925903, -0.19327890872955322, 0.060176003724336624, -0.07212433218955994, 0.661035418510437, -0.11174089461565018, -0.13900409638881683, -0.07977069914340973, -0.21026469767093658, 0.1023806780576706, -0.05207487940788269, -0.1930364966392517, 0.18949240446090698, 0.13316795229911804, 0.708533763885498, -0.3380926847457886, -0.2599657475948334, 0.10558579862117767, -0.034674230962991714, 0.05045965313911438, 0.2321060448884964, 0.09983226656913757, -0.4123949110507965, -0.21314191818237305, -0.1732572466135025, -0.03793317452073097, -0.0005335137248039246, 0.20567549765110016, 0.06030404567718506, 0.1776222437620163, -0.0365959070622921, 0.17873409390449524, 0.07665155827999115, 0.2977384328842163, -0.37830850481987, -0.08331019431352615, 0.43870651721954346, 0.387616902589798, 0.8013381361961365, 0.03858328238129616, -0.06608305871486664, -0.12857824563980103, 0.06693349778652191, -0.11496672034263611, 0.4075590968132019, 0.5270451307296753, 0.058049287647008896, 0.3059636056423187, -0.07535161823034286, -0.1494559347629547, -0.20797279477119446, 0.22359171509742737, 0.346493124961853, 0.0953516960144043, -0.18740493059158325, -0.21222645044326782, 0.33415111899375916, 0.19140960276126862, -0.12813733518123627, 0.39913398027420044, 0.2924734950065613, -0.5233151912689209, -0.1368257999420166, 0.18769846856594086, 0.818301796913147, -0.0021991170942783356, 0.3384094834327698, 0.127936452627182, -0.17147764563560486, 0.161000594496727, -0.583098292350769, 0.16154271364212036, -0.24957668781280518, 0.08608939498662949, -0.22440218925476074, -0.16038843989372253, 0.4025702178478241, 0.11695295572280884, -0.420534610748291, 0.19030547142028809, -0.3310315012931824, 0.34859800338745117, -0.40736812353134155, -0.14972594380378723, -0.6283941864967346, -0.1818772703409195, 0.07551993429660797, -0.018748333677649498, 0.25549155473709106, 0.07845310866832733, -0.013709008693695068, -0.0010079406201839447, -0.22279667854309082, -0.06683120876550674, -0.48408517241477966, -0.4781372547149658, -0.1802118867635727, -0.059742800891399384, 0.1414651721715927, -0.3194965124130249, 0.041712500154972076, 0.3676939606666565, 0.184881791472435, -0.02611904963850975, -0.29122355580329895, 0.24775223433971405, -0.2537621855735779, -0.05406651645898819, -0.05576539784669876, -0.16473135352134705, 0.017647242173552513, 0.0432383194565773, -0.08499645441770554, -0.13275572657585144, -0.10174933820962906, -0.200312539935112, -0.2223912924528122, -0.08720533549785614, -0.070877805352211, -0.5074385404586792, -0.24234701693058014, -0.12681502103805542, -0.03434593975543976, -0.37097257375717163, -0.005133370868861675, -0.2866237461566925, 0.04166019707918167, -0.0495246946811676, -0.054206036031246185, -0.10119159519672394, -0.2128814160823822, 0.13267582654953003, -0.37459123134613037, -0.12000449746847153, 0.3676696717739105, -0.23770233988761902, -0.05231727659702301, -0.2173823118209839, 0.42400631308555603, 0.26061826944351196, -0.2117622196674347, 0.15565040707588196, 0.05121629685163498, -0.17418763041496277, 0.23056040704250336, 0.2486838698387146, 0.2423296570777893, 0.12104152143001556, -0.3507893681526184, -0.40898922085762024, -0.003020554780960083, 0.40862128138542175, -0.04356654733419418, 0.18607167899608612, -0.34310469031333923, 0.13781417906284332, -0.23376867175102234, -0.20467454195022583, -0.1896931231021881, 0.4232683479785919, -0.11493849754333496, 0.10023252665996552, 0.28360772132873535, 0.3598446249961853, 0.3095914125442505, -0.07220733910799026, -0.03768123686313629, -0.22838656604290009, 0.04618317261338234, -0.06849997490644455, -0.3264971673488617, 0.18512363731861115, -0.2904362380504608, 0.07716657221317291, 0.33875131607055664, 0.12918847799301147, -0.21077673137187958, -0.2539485991001129, 0.1978435516357422, 0.23542872071266174, -0.012793350964784622, 0.1273108720779419, 0.12805774807929993, -0.2614273726940155, -0.3810001015663147, -0.31217554211616516, 0.19407400488853455, 0.20548570156097412, -0.22325611114501953, 0.18509802222251892, -0.5386332869529724, -0.13368667662143707, -0.0042132847011089325, 0.45355919003486633, 0.40183961391448975, -0.12515486776828766, 0.10687237977981567, 0.34522056579589844, 0.2477446347475052, 0.11687591671943665, 0.6300196051597595, 0.17267343401908875, -0.0008332282304763794, 0.1717100441455841, 0.1588670015335083, 0.09080864489078522, -0.10085372626781464, -0.31677311658859253, 0.1728321760892868, -0.3114766776561737, 0.16447457671165466, 0.30411362648010254, 0.400104284286499, 0.09859926998615265, -0.028067033737897873, -0.09919100999832153, 0.3875187933444977, -0.2633410394191742, 0.29691457748413086, 0.7590733766555786, -0.370705246925354, 0.2513316869735718, 0.280171662569046, 0.1889207512140274, 0.568100094795227, 0.5256155133247375, -0.061205118894577026, 0.15747787058353424, 0.032934218645095825, -0.007102189585566521, -0.12717439234256744, -0.4207005202770233, 0.019478360190987587, 0.01540287584066391, 0.0498967170715332, -0.10178396105766296, -0.014447033405303955, 0.5567613840103149, -0.18637748062610626, 0.23371517658233643, 0.11186963319778442, 0.21935409307479858, 0.04068576917052269, -0.30335888266563416, 0.23431330919265747, -0.38932108879089355, -0.09098272025585175, -0.05721939727663994, -0.13273991644382477, -0.19403427839279175, 0.34725046157836914, -0.17895565927028656, 0.21965181827545166, -0.08226712048053741, 0.6928899884223938, -0.2912473678588867, 0.1927458643913269, -0.10612236708402634, -0.12133147567510605, -0.12888014316558838, -0.18439911305904388, 0.17763812839984894, 0.3350032866001129, 0.2994871437549591, 0.010445917025208473, 0.21681267023086548, 0.07599323242902756, -0.415545254945755, -0.08791732043027878, 0.16363003849983215, -0.1226491704583168, 0.25393590331077576, -0.3838382959365845, -0.05837646499276161, 0.09141457825899124, -0.08735033124685287, 0.07297826558351517, 0.2462700605392456, -0.08224660903215408, -0.1246994137763977, 0.053244732320308685, 0.2169896960258484, -0.11128993332386017, 0.1491207480430603, -0.07384797930717468, -0.15820251405239105, -0.3729400038719177, 0.38374775648117065, 0.10691430419683456, 0.21954259276390076, 0.2963602542877197, 0.01872565969824791, 0.3594815731048584, 0.24587808549404144, -0.0901084840297699, -0.43583086133003235, -0.03401187062263489, -0.2421802282333374, -0.3909038305282593, -0.2366829216480255, -0.044946521520614624, -0.3582873046398163, -0.10796419531106949, -0.18778352439403534, 0.06838004291057587, -0.10767628252506256, 0.03743424639105797, -0.030984336510300636, 0.27297264337539673, 0.0579177588224411, -0.07111148536205292, -0.0887710303068161, 0.09400597214698792, 0.12006042152643204, 0.08279598504304886, -0.2518688142299652, 0.15219560265541077, 0.13621404767036438, -0.17792430520057678, 0.11757020652294159, 0.3637777268886566, 0.28220653533935547, -0.021486444398760796, -0.17996065318584442, -0.04642874747514725, 0.22076451778411865, -0.3198099732398987, 0.03168974071741104, -0.08407413959503174, -0.25243324041366577, -0.2372661530971527, 0.03816521167755127, -0.009074577130377293, -0.16330018639564514, -0.335627019405365, -0.5731877684593201, -0.21920092403888702, 0.15925593674182892, 0.30671074986457825, -0.09336937963962555, -0.4195077419281006, 0.12834817171096802, -0.13372120261192322, -0.028187021613121033, 0.4535829424858093, 0.5473644733428955, -0.24498295783996582, -0.21540135145187378, -0.23657222092151642, -0.3919028043746948, 0.38585618138313293, 0.05000248923897743, -0.15908917784690857, -0.09339092671871185, 0.15691831707954407, 0.4403911530971527, 0.005593249574303627, -0.29038718342781067, -0.1261390596628189, 0.2395915687084198, -0.04182828962802887, -0.3284205198287964, 0.21559622883796692, 0.17806069552898407, -0.23512448370456696, -0.10627033561468124, 0.4551457464694977, 0.3536151945590973, -0.3553655445575714, -0.18642929196357727, -0.2281600832939148 ]
https://github.com/huggingface/datasets/issues/6559
Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`) You can load it this way instead: ```python from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir) ```
Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']
### Describe the bug python script is: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` the script success when datasets version is 2.14.7. when using 2.16.1, error occurs ` ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']` ### Steps to reproduce the bug 1. pip install datasets==2.16.1 2. run python script: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` ### Expected behavior the dataset should be loaded successful in the latest version. ### Environment info datasets 2.16.1
39
Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default'] ### Describe the bug python script is: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` the script success when datasets version is 2.14.7. when using 2.16.1, error occurs ` ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']` ### Steps to reproduce the bug 1. pip install datasets==2.16.1 2. run python script: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` ### Expected behavior the dataset should be loaded successful in the latest version. ### Environment info datasets 2.16.1 Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`) You can load it this way instead: ```python from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir) ```
[ -0.5463299751281738, 0.45560142397880554, -0.02869529463350773, 0.3143913149833679, 0.14552779495716095, 0.10748502612113953, 0.31146010756492615, 0.3529205918312073, 0.18226969242095947, 0.20120511949062347, 0.2688750624656677, 0.6102460026741028, -0.1364494264125824, -0.1731400191783905, 0.11724627017974854, -0.0399254709482193, 0.00852346420288086, 0.26021966338157654, -0.105255126953125, 0.06138451397418976, -0.14034518599510193, 0.13015589118003845, -0.14244931936264038, 0.1762811690568924, -0.12548726797103882, 0.2405027151107788, 0.07741060853004456, 0.08724317699670792, -0.0011249817907810211, -0.9123345613479614, 0.7024981379508972, 0.053494010120630264, 0.34641826152801514, 0.133513405919075, -0.00011950386397074908, 0.08711649477481842, 0.5989266037940979, 0.08155187964439392, -0.13671386241912842, -0.4299573600292206, -0.6319840550422668, -0.10744764655828476, 0.1479998677968979, -0.12218619138002396, -0.16579414904117584, -0.3420923352241516, 0.029665717855095863, -0.43976545333862305, 0.05908055603504181, 0.31040066480636597, 0.16669702529907227, 0.04816362261772156, 0.4501621723175049, -0.2563706636428833, 0.055978450924158096, -0.37893593311309814, 0.11294610053300858, 0.11427032947540283, 0.026173114776611328, -0.07555592060089111, 0.07541374117136002, 0.05913388356566429, -0.0504767931997776, -0.0032686851918697357, 0.33579638600349426, -0.18534967303276062, 0.2822677791118622, -0.2917852997779846, 0.4068329930305481, 0.19744816422462463, 0.5064378976821899, -0.37036722898483276, -0.4311293959617615, -0.05505456030368805, 0.04654870182275772, -0.08683101087808609, 0.4102816581726074, 0.1531432569026947, 0.0782502219080925, 0.21156422793865204, -0.0963621437549591, -0.1367008090019226, -0.1546357274055481, 0.31515881419181824, -0.02877223491668701, 0.38643231987953186, -0.08240263909101486, 0.23916077613830566, 0.14602386951446533, -0.17738234996795654, 0.24514974653720856, -0.41811978816986084, -0.14675328135490417, 0.43385908007621765, -0.3310922086238861, 0.08941137045621872, 0.019363898783922195, 0.26276451349258423, 0.16467992961406708, 0.14637541770935059, -0.3008963167667389, -0.10538350045681, 0.1413150578737259, 0.1201886236667633, 0.24539943039417267, 0.30404141545295715, 0.2057608664035797, -0.04725704342126846, 0.2036987543106079, 0.2144034504890442, 0.11018628627061844, -0.02874526008963585, -0.2217397689819336, -0.35698866844177246, 0.22049438953399658, -0.0002851709723472595, 0.13993459939956665, -0.15315380692481995, -0.2671148180961609, -0.026363186538219452, -0.1602000594139099, -0.14099951088428497, 0.17360174655914307, 0.25799113512039185, -0.27370452880859375, 0.21689529716968536, -0.020845428109169006, 0.27403494715690613, -0.05874873325228691, -0.061117835342884064, -0.1184120923280716, -0.1003521978855133, 0.049537450075149536, -0.1836107075214386, 0.22194914519786835, -0.472442626953125, 0.3638575077056885, 0.16496580839157104, -0.11842520534992218, -0.1542530059814453, -0.024152055382728577, 0.13723912835121155, -0.06323486566543579, 0.3206787407398224, 0.05899765342473984, 0.09162766486406326, -0.09136352688074112, -0.4600849747657776, -0.3284451365470886, 0.32552477717399597, -0.137989804148674, -0.35914379358291626, -0.039589449763298035, 0.11175232380628586, -0.10048393905162811, -0.010581139475107193, -0.19972777366638184, -0.11308293044567108, 0.24102336168289185, 0.05361931771039963, -0.206069678068161, -0.24130971729755402, 0.0028931275010108948, -0.21116100251674652, 0.23699533939361572, 0.35804909467697144, -0.3262174725532532, -0.0931287631392479, -0.34979620575904846, -0.06627115607261658, -0.08210653066635132, -0.08196798712015152, -0.2784924805164337, 0.2790924906730652, -0.12494047731161118, -0.21363207697868347, 0.315903902053833, -0.49190303683280945, -0.6164343357086182, 0.2512681782245636, 0.19651292264461517, 0.06529214233160019, 0.05873037502169609, 0.043293558061122894, -0.036069970577955246, 0.03663437068462372, 0.10533973574638367, 0.10111100971698761, -0.031061649322509766, 0.04552420973777771, -0.035851217806339264, -0.5205765962600708, 0.14099285006523132, 0.24434226751327515, 0.026437079533934593, 0.18484196066856384, 0.015304390341043472, -0.26933717727661133, 0.22160251438617706, 0.05752095580101013, 0.013584043830633163, 0.03284676745533943, 0.21708646416664124, -0.17814259231090546, 0.10168315470218658, 0.06299877911806107, -0.4160427153110504, 0.38677293062210083, 0.21173825860023499, -0.2167956829071045, -0.08129771053791046, -0.07284983992576599, -0.07913944125175476, 0.1253761649131775, -0.4947209656238556, 0.0027960725128650665, -0.0131492018699646, 0.07023593783378601, 0.31306788325309753, -0.13946345448493958, -0.2020784318447113, 0.27807509899139404, -0.20842966437339783, 0.05238667502999306, -0.3886967599391937, 0.1991330087184906, -0.07430446147918701, 0.023283258080482483, 0.04306420683860779, 0.15466497838497162, 0.0068297116085886955, -0.12009885907173157, -0.19490915536880493, 0.4596441984176636, -0.004951294511556625, 0.26225894689559937, -0.24930256605148315, 0.379500150680542, 0.03360208123922348, -0.3588641285896301, 0.2655513882637024, 0.3278127908706665, -0.07750425487756729, 0.09790615737438202, 0.13302236795425415, 0.2856747806072235, 0.536408543586731, 0.25958141684532166, 0.20133116841316223, 0.11275957524776459, 0.2918424904346466, -0.11312898993492126, 0.07283956557512283, -0.3825521171092987, 0.012249117717146873, -0.35645946860313416, 0.6501836776733398, -0.08579732477664948, -0.14877215027809143, -0.005808129906654358, 0.31130334734916687, 0.08481694757938385, 0.018531927838921547, 0.03313774988055229, -0.1663755476474762, 0.1099851131439209, 0.13450156152248383, 0.35825279355049133, 0.3666505217552185, 0.216471865773201, -0.4004799425601959, 0.09441238641738892, -0.1425095498561859, -0.00870329886674881, 0.3559110760688782, 0.007839037105441093, 0.09230190515518188, 0.009563308209180832, 0.07084684073925018, 0.002760123461484909, -0.22191406786441803, 0.004011049866676331, -0.30212634801864624, 0.30278563499450684, -0.27717435359954834, 0.01815040409564972, -0.3337356448173523, -0.029688958078622818, -0.3194599747657776, -0.05945062264800072, -0.018307017162442207, -0.06759386509656906, -0.22563745081424713, 0.16272307932376862, 0.004871197044849396, 0.34144216775894165, -0.2645763158798218, 0.1159203052520752, -0.07621884346008301, -0.056513529270887375, -0.16859444975852966, -0.020760202780365944, -0.38694533705711365, -0.06781382858753204, 0.414737731218338, -0.45650389790534973, 0.014379831030964851, -0.30987846851348877, 0.0686647891998291, -0.2732125222682953, -0.3598116636276245, 0.08678699284791946, 0.14583277702331543, 0.5064560174942017, 0.30113425850868225, -0.2526991367340088, 0.4480394124984741, -0.13795256614685059, 0.1883566826581955, -0.20262938737869263, -0.06659717112779617, 0.08212758600711823, -0.18850329518318176, -0.3141675889492035, 0.03495146334171295, -0.5985116362571716, -0.18253788352012634, -0.19698315858840942, 0.0038179391995072365, 0.23642930388450623, 0.18697279691696167, 0.060373175889253616, 0.26109403371810913, -0.05894649401307106, 0.11327850818634033, 0.013130679726600647, -0.057548873126506805, -0.24613194167613983, 0.15521305799484253, -0.3103761374950409, -0.2210741490125656, 0.010855846107006073, -0.10958770662546158, 0.5900669693946838, -0.2313528209924698, -0.3932517468929291, 0.553723931312561, -0.4084431231021881, 0.4184296429157257, -0.10930874198675156, 0.0015005972236394882, 0.20534518361091614, 0.2513319253921509, 0.08870676904916763, -0.19383352994918823, -0.2192765474319458, 0.18175509572029114, -0.12788806855678558, 0.18955419957637787, 0.28221040964126587, 0.6199339628219604, -0.15986362099647522, 0.2654420733451843, 0.27800703048706055, -0.3997049331665039, 0.1635199785232544, -0.296024352312088, 0.21042905747890472, -0.29945510625839233, -0.27341175079345703, 0.009256511926651001, 0.3314577341079712, 0.19611181318759918, 0.06286182999610901, 0.06941327452659607, -0.4879733920097351, -0.1097201406955719, 0.005558095872402191, -0.15713590383529663, -0.03157859295606613, -0.1366044580936432, -0.031060339882969856, 0.23350149393081665, 0.2327941209077835, 0.12789002060890198, -0.09946583211421967, -0.20215746760368347, 0.059748195111751556, 0.24966254830360413, 0.0959550142288208, 0.07525406777858734, -0.25013458728790283, -0.33727744221687317, -0.32460343837738037, 0.21255630254745483, 0.07172854244709015, 0.32309490442276, 0.11404973268508911, -0.03529532626271248, -0.02307264506816864, -0.1088344156742096, 0.4207785725593567, -0.24222715198993683, 0.11021621525287628, 0.2631329596042633, 0.3638056218624115, -0.5122686624526978, -0.15421387553215027, 0.13012008368968964, 0.4722495675086975, 0.022895444184541702, 0.3400028347969055, -0.0966564416885376, -0.3198975920677185, 0.19625209271907806, 0.34116294980049133, -0.11696498095989227, -0.2889742851257324, -0.2243371605873108, -0.026575133204460144, -0.2035215049982071, -0.05082004517316818, -0.3736855685710907, 0.21501599252223969, -0.12259643524885178, -0.19652900099754333, -0.028502071276307106, -0.1685675084590912, -0.12871132791042328, 0.27701976895332336, 0.3493223190307617, -0.1390121728181839, 0.3365222215652466, 0.1496501863002777, -0.3185425400733948, 0.428390771150589, 0.3086414635181427, 0.13881704211235046, 0.044075142592191696, 0.05201643705368042, 0.07569175958633423, 0.1563243269920349, 0.006952524185180664, -0.357501745223999, -0.09771542251110077, 0.03930843994021416, 0.07909870892763138, -0.18426266312599182, -0.3556329607963562, 0.3112322688102722, 0.026728622615337372, -0.2487354576587677, -0.5672733187675476, 0.506644606590271, -0.05143284797668457, -0.054675303399562836, 0.34242376685142517, 0.06421762704849243, -0.36916452646255493, 0.1577913910150528, -0.054676808416843414, 0.6233932971954346, 0.2922585904598236, -0.011355381458997726, 0.14099663496017456, -0.20958146452903748, 0.1380777359008789, -0.055310558527708054, 0.012052178382873535, -0.4965886175632477, 0.3603544533252716, 0.0001211017370223999, -0.1669188141822815, 0.23644793033599854, 0.36333128809928894, -0.18481382727622986, 0.29509198665618896, -0.24368885159492493, 0.2795589864253998, 0.11593719571828842, 0.3571641147136688, -0.3675394356250763, -0.10902448743581772, -0.3535621464252472, 0.07756324112415314, 0.21637758612632751, 0.08242058753967285, -0.12424860894680023, 0.10190554708242416, 0.13711656630039215, -0.28161996603012085, -0.2793905735015869, 0.2603493928909302, -0.34069228172302246, 0.3706616461277008, 0.32565850019454956, 0.05112117528915405, 0.2548433542251587, 0.15136964619159698, 0.26964735984802246, 0.18159767985343933, -0.1457245796918869, 0.2885165810585022, 0.02024923451244831, 0.1669619381427765, 0.27592602372169495, 0.10015566647052765, 0.12411189824342728, -0.13684675097465515, -0.2836025059223175, -0.027159646153450012, -0.2281113564968109, -0.3124064803123474, -0.07251937687397003, -0.1515006572008133, -0.020387930795550346, 0.01836787909269333, -0.28237828612327576, 0.06023603677749634, 0.10073193907737732, -0.22365766763687134, 0.13736563920974731, 0.048158712685108185, 0.0013068169355392456, 0.2778072953224182, -0.19962206482887268, -0.2754775285720825, -0.03379435837268829, 0.41842198371887207, 0.011691272258758545, 0.2674396336078644, 0.36475634574890137, -0.12944228947162628, -0.008923381567001343, -0.14969830214977264, -0.10298319160938263, 0.4134671092033386, -0.33051779866218567, -0.21533706784248352, -0.16607660055160522, 0.23807696998119354, 0.058992184698581696, 0.03308181092143059, -0.024131888523697853, 0.01919614151120186, -0.03666030243039131, -0.3586825430393219, -0.2598668038845062, 0.1669587790966034, 0.11067402362823486, 0.10484825074672699, -0.09859266877174377, 0.011863615363836288, -0.04960248991847038, -0.08717023581266403, -0.21732810139656067, 0.07093878835439682, 0.10522717237472534, -0.014421453699469566, 0.07568550854921341, 0.4327647387981415, 0.2147168666124344, -0.05652425065636635, 0.09983000159263611, -0.30642151832580566, -0.2665519416332245, -0.17695927619934082, -0.1327914595603943, 0.12921787798404694, 0.10655541718006134, -0.16812807321548462, 0.059293441474437714, -0.23756635189056396, -0.19406430423259735, -0.04834693670272827, 0.3385898172855377, -0.07061386853456497, -0.16396556794643402, 0.16422434151172638, -0.05449957773089409, 0.003502827137708664, -0.11195626854896545, 0.0861436128616333, -0.15354594588279724, 0.033389441668987274, 0.16106021404266357, 0.2923247218132019, -0.19053776562213898, -0.09741685539484024, 0.2409788966178894, 0.016056574881076813, -0.4371992349624634, 0.21859198808670044, 0.33480748534202576, -0.40327954292297363, 0.19211915135383606, 0.33574774861335754, 0.022936761379241943, 0.25254231691360474, -0.17859363555908203, 0.11885643005371094, -0.011655021458864212, 0.17843198776245117, -0.2596857249736786, -0.1999569535255432, 0.09469839930534363, 0.19057607650756836, -0.042811959981918335, 0.07024767994880676, 0.3682830333709717, -0.2722034156322479, 0.4254617393016815, 0.11919766664505005, 0.5913458466529846, -0.4476856291294098, 0.33151599764823914, 0.48426854610443115, 0.018401212990283966, 0.17318667471408844, 0.14238658547401428, -0.018615569919347763, 0.11124449968338013, 0.5831784009933472, -0.2099146842956543, 0.3538113236427307, 0.34176841378211975, 0.06630757451057434, 0.10848347097635269, -0.5007622241973877, -0.19096022844314575, 0.0991702452301979, -0.27267393469810486, -0.0716906413435936, 0.1405499279499054, 0.5852586627006531, 0.016382772475481033, 0.00824321061372757, -0.19841250777244568, -0.13248808681964874, -0.11226322501897812, -0.2674236595630646, -0.39643990993499756, -0.2307009994983673, -0.05950541794300079, -0.022204257547855377, -0.0065944259986281395, -0.07913791388273239, 0.1589357554912567, 0.09514661133289337, -0.31298384070396423, -0.5028505921363831, -0.06320102512836456, 0.18607550859451294, 0.0971364676952362, -0.1863015592098236, 0.5465003252029419, 0.13591763377189636, -0.1986514776945114, -0.15701334178447723, 0.37887105345726013, 0.6286959648132324, 0.29505491256713867, 0.16708999872207642, 0.04489302262663841, 0.037774741649627686, -0.1629420518875122, -0.06902559101581573, 0.21429088711738586, -0.005715318024158478, 0.01137540489435196, -0.007083192467689514, 0.14036428928375244, -0.0031360238790512085, 0.038952261209487915, 0.08134785294532776, 0.3594915568828583, -0.2639881670475006, 0.08951546996831894, -0.030568765476346016, -0.09914480149745941, 0.012350356206297874, 0.23958952724933624, -0.27959999442100525, 0.008080963045358658, 0.5690683722496033, 0.11626124382019043, -0.05232292041182518, -0.27575626969337463, 0.05944009870290756, 0.062051258981227875, 0.2529090642929077, 0.07627631723880768, 0.12308283895254135, -0.12654924392700195, -0.43908923864364624, -0.44980382919311523, 0.04387088119983673, -0.0626455768942833, 0.37757405638694763, 0.06144622713327408, 0.05800043046474457, -0.25734519958496094, -0.13680580258369446, 0.2958293557167053, -0.294672429561615, 0.3593588173389435, 0.010507470928132534, -0.1503610461950302, -0.0777180939912796, 0.17004865407943726, 0.08157654106616974, -0.03805870562791824, -0.43525248765945435, 0.0018540285527706146, -0.1684902012348175, -0.02689170464873314, -0.12386399507522583, 0.1648191511631012, 0.2501228153705597, -0.19233135879039764, 0.7216295599937439, -0.051530517637729645, 0.38248372077941895, 0.0190107598900795, -0.004916295409202576, -0.5478551387786865, -0.14153867959976196, -0.28836163878440857, 0.03413405641913414, -0.13805927336215973, 0.4046896696090698, -0.19984707236289978, -0.05946141481399536, -0.4027487337589264, -0.021302344277501106, 0.0634816437959671, 0.008824720978736877, -0.211572527885437, 0.14578457176685333, -0.37047117948532104, 0.2484513819217682, -0.017952468246221542, 0.06802017241716385, 0.06952137500047684, 0.15072402358055115, -0.22540083527565002, -0.24281354248523712, 0.33108994364738464, -0.37912648916244507, -0.17609360814094543, -0.20984168350696564, 0.1250392198562622, 0.03774610161781311, -0.35893964767456055, -0.17842383682727814, 0.16050280630588531, 0.42853623628616333, -0.069597989320755, -0.02340264990925789, 0.1370771825313568, -0.027852416038513184, 0.3997366726398468, -0.008088141679763794, 0.3287685215473175, 0.07584746181964874, -0.2580204904079437, -0.13204042613506317, -0.44489216804504395 ]
https://github.com/huggingface/datasets/issues/6559
> Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`) > > You can load it this way instead: > > ```python > from datasets import load_dataset > cache_dir = 'path/to/your/cache/directory' > dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir) > ``` thanks, the command run successfully in the latest version
Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']
### Describe the bug python script is: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` the script success when datasets version is 2.14.7. when using 2.16.1, error occurs ` ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']` ### Steps to reproduce the bug 1. pip install datasets==2.16.1 2. run python script: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` ### Expected behavior the dataset should be loaded successful in the latest version. ### Environment info datasets 2.16.1
57
Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default'] ### Describe the bug python script is: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` the script success when datasets version is 2.14.7. when using 2.16.1, error occurs ` ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']` ### Steps to reproduce the bug 1. pip install datasets==2.16.1 2. run python script: ``` from datasets import load_dataset cache_dir = 'path/to/your/cache/directory' dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir) ``` ### Expected behavior the dataset should be loaded successful in the latest version. ### Environment info datasets 2.16.1 > Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`) > > You can load it this way instead: > > ```python > from datasets import load_dataset > cache_dir = 'path/to/your/cache/directory' > dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir) > ``` thanks, the command run successfully in the latest version
[ -0.5519501566886902, 0.45018383860588074, -0.026410909369587898, 0.3139788806438446, 0.1435113549232483, 0.11366935074329376, 0.30293846130371094, 0.3482833206653595, 0.18301022052764893, 0.20341356098651886, 0.2682672142982483, 0.6109302043914795, -0.1382366269826889, -0.18821798264980316, 0.11031605303287506, -0.027079511433839798, 0.00929904356598854, 0.2613934278488159, -0.0997604951262474, 0.06627332419157028, -0.14445051550865173, 0.1323283463716507, -0.1418667882680893, 0.17361074686050415, -0.11985510587692261, 0.23782499134540558, 0.08115261048078537, 0.08260470628738403, -0.0005226917564868927, -0.9180573225021362, 0.7041401863098145, 0.05873056501150131, 0.3444885313510895, 0.12599390745162964, -0.00011957572860410437, 0.08957242965698242, 0.6077934503555298, 0.08578485995531082, -0.1502121388912201, -0.42301124334335327, -0.6331298351287842, -0.10478124022483826, 0.14363233745098114, -0.12254130840301514, -0.1642652153968811, -0.3475658595561981, 0.04361271113157272, -0.44414830207824707, 0.04658782482147217, 0.30610477924346924, 0.16472069919109344, 0.04559721797704697, 0.45416343212127686, -0.2587413191795349, 0.05348202586174011, -0.37899163365364075, 0.11415136605501175, 0.1263001263141632, 0.023874621838331223, -0.06893309950828552, 0.06785792112350464, 0.06131506338715553, -0.05104082450270653, 0.006350472569465637, 0.33986711502075195, -0.17827773094177246, 0.2837359309196472, -0.2779805362224579, 0.41550835967063904, 0.1973595917224884, 0.520074725151062, -0.37259402871131897, -0.4310542941093445, -0.05220850557088852, 0.04845253750681877, -0.08953038603067398, 0.41031891107559204, 0.14551126956939697, 0.08509846031665802, 0.20898185670375824, -0.09041363000869751, -0.1366402804851532, -0.14948412775993347, 0.3132553696632385, -0.024108685553073883, 0.37382936477661133, -0.0855988934636116, 0.2364196479320526, 0.14005787670612335, -0.1836244761943817, 0.24355988204479218, -0.4250960648059845, -0.1579289734363556, 0.4292735755443573, -0.3246186375617981, 0.09461373090744019, 0.020792676135897636, 0.2663404941558838, 0.16815194487571716, 0.1443912237882614, -0.2931591868400574, -0.10439254343509674, 0.13908779621124268, 0.11990801244974136, 0.2239690124988556, 0.29774007201194763, 0.20617428421974182, -0.06110752373933792, 0.20617656409740448, 0.21776142716407776, 0.11297150701284409, -0.027994204312562943, -0.2217940390110016, -0.35534995794296265, 0.23053835332393646, -0.0010169558227062225, 0.13954055309295654, -0.15088658034801483, -0.26344364881515503, -0.02005605772137642, -0.15696728229522705, -0.13881373405456543, 0.17414253950119019, 0.2640623152256012, -0.2719590663909912, 0.2087956815958023, -0.022396020591259003, 0.272776335477829, -0.052329182624816895, -0.0627083107829094, -0.11834672093391418, -0.11357675492763519, 0.05406776815652847, -0.180753692984581, 0.2208511233329773, -0.4702296853065491, 0.3662388026714325, 0.16158540546894073, -0.11312706768512726, -0.148365318775177, -0.02427370846271515, 0.13061869144439697, -0.065204918384552, 0.31618112325668335, 0.05138140916824341, 0.09402014315128326, -0.09469407796859741, -0.4602809548377991, -0.32591021060943604, 0.32246720790863037, -0.13331535458564758, -0.3634772002696991, -0.03631006181240082, 0.10967826843261719, -0.09638842195272446, -0.011424927040934563, -0.1938628852367401, -0.1147291511297226, 0.24415914714336395, 0.050469160079956055, -0.20480108261108398, -0.2419590801000595, -0.0038479194045066833, -0.21539711952209473, 0.23418837785720825, 0.3704008460044861, -0.31735339760780334, -0.09599921852350235, -0.351178377866745, -0.057769764214754105, -0.08938141912221909, -0.08914391696453094, -0.2830830514431, 0.27426403760910034, -0.12656430900096893, -0.22069498896598816, 0.31316283345222473, -0.4852875769138336, -0.624545156955719, 0.25195789337158203, 0.20020726323127747, 0.06319915503263474, 0.06391032040119171, 0.045028552412986755, -0.04490245133638382, 0.03377889096736908, 0.10574106127023697, 0.08971112966537476, -0.028051339089870453, 0.04544001817703247, -0.03449888527393341, -0.5167565941810608, 0.1476096361875534, 0.2410755753517151, 0.028294259682297707, 0.18626712262630463, 0.016635235399007797, -0.2670174837112427, 0.20949846506118774, 0.059914980083703995, 0.01482442021369934, 0.038325466215610504, 0.22493278980255127, -0.1813044399023056, 0.10070265829563141, 0.07375207543373108, -0.42731040716171265, 0.38679876923561096, 0.20678412914276123, -0.22475995123386383, -0.08490705490112305, -0.07044502347707748, -0.08141425251960754, 0.13069561123847961, -0.4885164499282837, 0.011196032166481018, -0.012092776596546173, 0.08104074001312256, 0.3168438971042633, -0.1344054937362671, -0.19571958482265472, 0.28748902678489685, -0.216905415058136, 0.05114114657044411, -0.38618004322052, 0.19484487175941467, -0.07327418774366379, 0.021973975002765656, 0.046206146478652954, 0.1455744057893753, 0.006899102125316858, -0.1182677373290062, -0.1939266473054886, 0.4598175585269928, -0.010823788121342659, 0.2591732144355774, -0.24769318103790283, 0.38703298568725586, 0.03210878372192383, -0.3580982983112335, 0.2698904871940613, 0.32791101932525635, -0.07314484566450119, 0.10036446154117584, 0.13446474075317383, 0.2715386152267456, 0.5463036298751831, 0.24911090731620789, 0.19679172337055206, 0.1096336767077446, 0.29168379306793213, -0.11136312037706375, 0.07680756598711014, -0.3768306374549866, 0.009592313319444656, -0.3574172556400299, 0.6624307632446289, -0.08522024005651474, -0.14896135032176971, 0.00022876262664794922, 0.307613343000412, 0.09118638932704926, 0.02325066737830639, 0.04143160581588745, -0.16869591176509857, 0.10335655510425568, 0.12872958183288574, 0.3556913137435913, 0.3701636791229248, 0.21139656007289886, -0.39145076274871826, 0.09240450710058212, -0.1448899358510971, -0.007552195340394974, 0.35573142766952515, -0.0003543645143508911, 0.09462956339120865, 0.013564495369791985, 0.07556074857711792, 0.007916714996099472, -0.21568813920021057, 0.0001748502254486084, -0.2879287004470825, 0.3005731999874115, -0.27312377095222473, 0.010707199573516846, -0.3346101939678192, -0.029822353273630142, -0.31230318546295166, -0.05111245438456535, -0.016749979928135872, -0.06938741356134415, -0.2259323000907898, 0.16731880605220795, 0.003316722810268402, 0.339095801115036, -0.271034300327301, 0.12226036936044693, -0.0727095901966095, -0.05924232304096222, -0.17483259737491608, -0.016995908692479134, -0.38738471269607544, -0.07103201001882553, 0.4107629954814911, -0.4608473777770996, 0.010686557739973068, -0.3167707920074463, 0.0715930312871933, -0.28576183319091797, -0.36084702610969543, 0.08319397270679474, 0.15757626295089722, 0.5054432153701782, 0.3007636070251465, -0.25091755390167236, 0.4483650028705597, -0.1372881680727005, 0.19110934436321259, -0.20940393209457397, -0.07101093232631683, 0.08046010136604309, -0.1939530223608017, -0.30855607986450195, 0.03809988498687744, -0.5920590162277222, -0.1799210011959076, -0.20110149681568146, -0.007878908887505531, 0.2321644276380539, 0.1815931797027588, 0.06654299795627594, 0.2557634711265564, -0.06309836357831955, 0.11381533741950989, 0.021523527801036835, -0.06364823132753372, -0.24944141507148743, 0.15617170929908752, -0.3127189874649048, -0.22537651658058167, 0.007606737315654755, -0.12098280340433121, 0.5890756249427795, -0.22858908772468567, -0.39834484457969666, 0.5561559200286865, -0.41658157110214233, 0.426923930644989, -0.11050191521644592, -0.006840754300355911, 0.20440879464149475, 0.25531262159347534, 0.08833913505077362, -0.1936638355255127, -0.22597649693489075, 0.18252383172512054, -0.12878961861133575, 0.18931515514850616, 0.2966387867927551, 0.6160655617713928, -0.15822139382362366, 0.2563164234161377, 0.27531883120536804, -0.4040396511554718, 0.17007340490818024, -0.286485880613327, 0.22282348573207855, -0.3010812997817993, -0.2691006362438202, 0.00755218043923378, 0.33295178413391113, 0.197435662150383, 0.06182204559445381, 0.06665255129337311, -0.4907764196395874, -0.10106951743364334, 0.004888907074928284, -0.15715692937374115, -0.02625139430165291, -0.12993836402893066, -0.040838975459337234, 0.23406608402729034, 0.2335750311613083, 0.12086261808872223, -0.10422128438949585, -0.20868241786956787, 0.06312704086303711, 0.2555614411830902, 0.10501124709844589, 0.07840746641159058, -0.24989107251167297, -0.32723015546798706, -0.32284674048423767, 0.21940581500530243, 0.07353642582893372, 0.3317045271396637, 0.10579308867454529, -0.029585160315036774, -0.030072100460529327, -0.11245059967041016, 0.42145323753356934, -0.2370496690273285, 0.12122882157564163, 0.2655487358570099, 0.3657114505767822, -0.502342700958252, -0.15073370933532715, 0.13243919610977173, 0.4700886011123657, 0.013894971460103989, 0.3309294581413269, -0.10436971485614777, -0.3120632767677307, 0.1884201169013977, 0.3413676619529724, -0.120886892080307, -0.2868638336658478, -0.2206883430480957, -0.02225598692893982, -0.201719731092453, -0.054831795394420624, -0.37476980686187744, 0.2234741598367691, -0.1222868263721466, -0.1876620650291443, -0.0317951962351799, -0.16699841618537903, -0.13797113299369812, 0.2747822701931, 0.35228878259658813, -0.13257113099098206, 0.343199759721756, 0.1498991996049881, -0.31701433658599854, 0.43085986375808716, 0.3001770079135895, 0.1432678997516632, 0.05312535539269447, 0.053825367242097855, 0.08408704400062561, 0.14762142300605774, -0.005020745098590851, -0.36520788073539734, -0.09386375546455383, 0.042249951511621475, 0.07714329659938812, -0.1852167695760727, -0.3557753562927246, 0.303775817155838, 0.030350767076015472, -0.2495710253715515, -0.5597423315048218, 0.508246123790741, -0.052510570734739304, -0.05587754398584366, 0.3500927984714508, 0.06362807750701904, -0.36393314599990845, 0.15633255243301392, -0.052386388182640076, 0.6140619516372681, 0.29269951581954956, -0.008463406004011631, 0.1371128112077713, -0.21073701977729797, 0.1330251544713974, -0.059373240917921066, 0.012744288891553879, -0.49148431420326233, 0.35203224420547485, 0.0029318779706954956, -0.16965287923812866, 0.2381497174501419, 0.3675810694694519, -0.181204691529274, 0.2887459397315979, -0.23288357257843018, 0.2855542302131653, 0.11637621372938156, 0.35643619298934937, -0.37639540433883667, -0.11234389245510101, -0.35091087222099304, 0.07671957463026047, 0.20973382890224457, 0.08184994012117386, -0.12998971343040466, 0.10519625246524811, 0.14136144518852234, -0.28459975123405457, -0.281358927488327, 0.2524782419204712, -0.3294835090637207, 0.36745813488960266, 0.33290883898735046, 0.04618352651596069, 0.24821454286575317, 0.14934179186820984, 0.27145612239837646, 0.18383647501468658, -0.1440826654434204, 0.2844069004058838, 0.014684214256703854, 0.1703364998102188, 0.2723933160305023, 0.1017703264951706, 0.12214058637619019, -0.13476616144180298, -0.2772565186023712, -0.022066839039325714, -0.2304866909980774, -0.317627489566803, -0.06313686072826385, -0.15617676079273224, -0.033188171684741974, 0.022378843277692795, -0.28011777997016907, 0.061567921191453934, 0.09425060451030731, -0.22132214903831482, 0.13477551937103271, 0.05361698567867279, -0.004804305732250214, 0.2728205919265747, -0.1991061419248581, -0.2773614525794983, -0.03681645542383194, 0.42151394486427307, 0.005151020362973213, 0.2673109173774719, 0.37058353424072266, -0.1361452341079712, -0.013331636786460876, -0.1444683074951172, -0.10213471949100494, 0.4045371115207672, -0.3278695344924927, -0.21196363866329193, -0.1645442545413971, 0.23753178119659424, 0.0568719282746315, 0.022188004106283188, -0.024193109944462776, 0.020976774394512177, -0.032884083688259125, -0.3622192144393921, -0.26997846364974976, 0.16388030350208282, 0.10099370777606964, 0.10692302882671356, -0.09742964804172516, -0.000491805374622345, -0.045547038316726685, -0.08813703060150146, -0.2152642011642456, 0.07469037175178528, 0.09682933241128922, -0.012723768129944801, 0.07184074819087982, 0.43575525283813477, 0.21394360065460205, -0.04901620000600815, 0.09781888872385025, -0.3026576042175293, -0.2701065242290497, -0.17432621121406555, -0.1308998465538025, 0.1311565488576889, 0.10621249675750732, -0.16751909255981445, 0.05698173865675926, -0.24242079257965088, -0.19524268805980682, -0.04799151420593262, 0.33614909648895264, -0.07300208508968353, -0.16852536797523499, 0.1648666113615036, -0.05715504661202431, 0.0071349553763866425, -0.10993218421936035, 0.08961270749568939, -0.15250542759895325, 0.03072177991271019, 0.15446637570858002, 0.29235321283340454, -0.19427646696567535, -0.09435029327869415, 0.24306359887123108, 0.010358130559325218, -0.4452979266643524, 0.2077186405658722, 0.3440236449241638, -0.4046967625617981, 0.18569733202457428, 0.3287750482559204, 0.017044812440872192, 0.23862816393375397, -0.17759697139263153, 0.1125413253903389, -0.004545867443084717, 0.17344799637794495, -0.2654453217983246, -0.20607592165470123, 0.09644801914691925, 0.19479301571846008, -0.03831709548830986, 0.06315162777900696, 0.37275049090385437, -0.2772243320941925, 0.4351237714290619, 0.12035740911960602, 0.5945706367492676, -0.4505368173122406, 0.3204607367515564, 0.4803266227245331, 0.02543461322784424, 0.18124768137931824, 0.15404970943927765, -0.009445123374462128, 0.10974036157131195, 0.5855468511581421, -0.20199689269065857, 0.3524765968322754, 0.34284353256225586, 0.05942105874419212, 0.10989770293235779, -0.504202127456665, -0.1831206977367401, 0.10713997483253479, -0.2642323672771454, -0.0692654699087143, 0.1401585042476654, 0.5747160315513611, 0.021916605532169342, 0.009154107421636581, -0.20053614675998688, -0.14087127149105072, -0.11645159125328064, -0.2723865509033203, -0.39280927181243896, -0.23070530593395233, -0.054690249264240265, -0.019737377762794495, -0.0058489516377449036, -0.08538933098316193, 0.16035957634449005, 0.08941596746444702, -0.3141341805458069, -0.5025696158409119, -0.058583226054906845, 0.18672332167625427, 0.08884085714817047, -0.18988318741321564, 0.5465736389160156, 0.1356949657201767, -0.19687145948410034, -0.14974701404571533, 0.3892151713371277, 0.6285328269004822, 0.292522132396698, 0.17029926180839539, 0.0482177697122097, 0.040995996445417404, -0.16197149455547333, -0.07502628862857819, 0.22189468145370483, -0.0050612762570381165, -0.005299890413880348, -0.010372977703809738, 0.1380651742219925, -0.0030318833887577057, 0.045389872044324875, 0.08585964143276215, 0.3667730987071991, -0.2557389736175537, 0.07872836291790009, -0.029079880565404892, -0.10174167156219482, 0.02369679883122444, 0.25020724534988403, -0.2772998809814453, 0.019909106194972992, 0.5774508118629456, 0.11286303400993347, -0.049204882234334946, -0.2744273245334625, 0.0591484010219574, 0.06652182340621948, 0.2551930546760559, 0.08223698288202286, 0.12039530277252197, -0.12694761157035828, -0.44012022018432617, -0.4563566744327545, 0.052816860377788544, -0.057686351239681244, 0.38233691453933716, 0.06286068260669708, 0.052960075438022614, -0.25400736927986145, -0.14072170853614807, 0.2976740896701813, -0.29144734144210815, 0.3574402630329132, 0.014612967148423195, -0.1489073932170868, -0.08986309170722961, 0.17875167727470398, 0.08000573515892029, -0.043525759130716324, -0.4323691725730896, 0.0027061598375439644, -0.16549457609653473, -0.02483266592025757, -0.13168790936470032, 0.1626361608505249, 0.24756982922554016, -0.18741708993911743, 0.7235348224639893, -0.048544757068157196, 0.3746219277381897, 0.014871329069137573, -0.009296908974647522, -0.5441799163818359, -0.14400775730609894, -0.2750770151615143, 0.02792295441031456, -0.14214098453521729, 0.4060475826263428, -0.20330283045768738, -0.053549159318208694, -0.40033334493637085, -0.02263205498456955, 0.06325025856494904, 0.011761091649532318, -0.21884283423423767, 0.14940975606441498, -0.3777558505535126, 0.23618973791599274, -0.018244553357362747, 0.06974852830171585, 0.0724557489156723, 0.1510053426027298, -0.22476625442504883, -0.23915860056877136, 0.3298953175544739, -0.3869825601577759, -0.17423224449157715, -0.20764267444610596, 0.12291465699672699, 0.03676610812544823, -0.36450594663619995, -0.16935038566589355, 0.17093580961227417, 0.4329378008842468, -0.06994916498661041, -0.022543445229530334, 0.1299544721841812, -0.027793873101472855, 0.40104395151138306, -0.009383298456668854, 0.3355688750743866, 0.07287264615297318, -0.2503129541873932, -0.1392793357372284, -0.4465492069721222 ]
https://github.com/huggingface/datasets/issues/6558
You can add ```python from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True ``` after the imports to be able to read truncated images.
OSError: image file is truncated (1 bytes not processed) #28323
### Describe the bug ``` --------------------------------------------------------------------------- OSError Traceback (most recent call last) Cell In[24], line 28 23 return example 25 # Filter the dataset 26 # filtered_dataset = dataset.filter(contains_number) 27 # Add the 'label' field in the dataset ---> 28 labeled_dataset = dataset.filter(contains_number).map(add_label) 29 # View the structure of the updated dataset 30 print(labeled_dataset) File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:975, in DatasetDict.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc) 972 if cache_file_names is None: 973 cache_file_names = {k: None for k in self} 974 return DatasetDict( --> 975 { 976 k: dataset.filter( 977 function=function, 978 with_indices=with_indices, 979 input_columns=input_columns, 980 batched=batched, 981 batch_size=batch_size, 982 keep_in_memory=keep_in_memory, 983 load_from_cache_file=load_from_cache_file, 984 cache_file_name=cache_file_names[k], 985 writer_batch_size=writer_batch_size, 986 fn_kwargs=fn_kwargs, 987 num_proc=num_proc, 988 desc=desc, 989 ) 990 for k, dataset in self.items() 991 } 992 ) File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:976, in <dictcomp>(.0) 972 if cache_file_names is None: 973 cache_file_names = {k: None for k in self} 974 return DatasetDict( 975 { --> 976 k: dataset.filter( 977 function=function, 978 with_indices=with_indices, 979 input_columns=input_columns, 980 batched=batched, 981 batch_size=batch_size, 982 keep_in_memory=keep_in_memory, 983 load_from_cache_file=load_from_cache_file, 984 cache_file_name=cache_file_names[k], 985 writer_batch_size=writer_batch_size, 986 fn_kwargs=fn_kwargs, 987 num_proc=num_proc, 988 desc=desc, 989 ) 990 for k, dataset in self.items() 991 } 992 ) File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output File /usr/local/lib/python3.10/dist-packages/datasets/fingerprint.py:481, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 477 validate_fingerprint(kwargs[fingerprint_name]) 479 # Call actual function --> 481 out = func(dataset, *args, **kwargs) 483 # Update fingerprint of in-place transforms + update in-place history of transforms 485 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3623, in Dataset.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 3620 if len(self) == 0: 3621 return self -> 3623 indices = self.map( 3624 function=partial( 3625 get_indices_from_mask_function, function, batched, with_indices, input_columns, self._indices 3626 ), 3627 with_indices=True, 3628 features=Features({"indices": Value("uint64")}), 3629 batched=True, 3630 batch_size=batch_size, 3631 remove_columns=self.column_names, 3632 keep_in_memory=keep_in_memory, 3633 load_from_cache_file=load_from_cache_file, 3634 cache_file_name=cache_file_name, 3635 writer_batch_size=writer_batch_size, 3636 fn_kwargs=fn_kwargs, 3637 num_proc=num_proc, 3638 suffix_template=suffix_template, 3639 new_fingerprint=new_fingerprint, 3640 input_columns=input_columns, 3641 desc=desc or "Filter", 3642 ) 3643 new_dataset = copy.deepcopy(self) 3644 new_dataset._indices = indices.data File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3093, in Dataset.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 3087 if transformed_dataset is None: 3088 with hf_tqdm( 3089 unit=" examples", 3090 total=pbar_total, 3091 desc=desc or "Map", 3092 ) as pbar: -> 3093 for rank, done, content in Dataset._map_single(**dataset_kwargs): 3094 if done: 3095 shards_done += 1 File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3470, in Dataset._map_single(shard, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset) 3466 indices = list( 3467 range(*(slice(i, i + batch_size).indices(shard.num_rows))) 3468 ) # Something simpler? 3469 try: -> 3470 batch = apply_function_on_filtered_inputs( 3471 batch, 3472 indices, 3473 check_same_num_examples=len(shard.list_indexes()) > 0, 3474 offset=offset, 3475 ) 3476 except NumExamplesMismatchError: 3477 raise DatasetTransformationNotAllowedError( 3478 "Using `.map` in batched mode on a dataset with attached indexes is allowed only if it doesn't create or remove existing examples. You can first run `.drop_index() to remove your index and then re-add it." 3479 ) from None File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3349, in Dataset._map_single.<locals>.apply_function_on_filtered_inputs(pa_inputs, indices, check_same_num_examples, offset) 3347 if with_rank: 3348 additional_args += (rank,) -> 3349 processed_inputs = function(*fn_args, *additional_args, **fn_kwargs) 3350 if isinstance(processed_inputs, LazyDict): 3351 processed_inputs = { 3352 k: v for k, v in processed_inputs.data.items() if k not in processed_inputs.keys_to_format 3353 } File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:6212, in get_indices_from_mask_function(function, batched, with_indices, input_columns, indices_mapping, *args, **fn_kwargs) 6209 if input_columns is None: 6210 # inputs only contains a batch of examples 6211 batch: dict = inputs[0] -> 6212 num_examples = len(batch[next(iter(batch.keys()))]) 6213 for i in range(num_examples): 6214 example = {key: batch[key][i] for key in batch} File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:272, in LazyDict.__getitem__(self, key) 270 value = self.data[key] 271 if key in self.keys_to_format: --> 272 value = self.format(key) 273 self.data[key] = value 274 self.keys_to_format.remove(key) File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:375, in LazyBatch.format(self, key) 374 def format(self, key): --> 375 return self.formatter.format_column(self.pa_table.select([key])) File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:442, in PythonFormatter.format_column(self, pa_table) 440 def format_column(self, pa_table: pa.Table) -> list: 441 column = self.python_arrow_extractor().extract_column(pa_table) --> 442 column = self.python_features_decoder.decode_column(column, pa_table.column_names[0]) 443 return column File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:218, in PythonFeaturesDecoder.decode_column(self, column, column_name) 217 def decode_column(self, column: list, column_name: str) -> list: --> 218 return self.features.decode_column(column, column_name) if self.features else column File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in Features.decode_column(self, column, column_name) 1938 def decode_column(self, column: list, column_name: str): 1939 """Decode column with custom feature decoding. 1940 1941 Args: (...) 1948 `list[Any]` 1949 """ 1950 return ( -> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column] 1952 if self._column_requires_decoding[column_name] 1953 else column 1954 ) File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in <listcomp>(.0) 1938 def decode_column(self, column: list, column_name: str): 1939 """Decode column with custom feature decoding. 1940 1941 Args: (...) 1948 `list[Any]` 1949 """ 1950 return ( -> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column] 1952 if self._column_requires_decoding[column_name] 1953 else column 1954 ) File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /usr/local/lib/python3.10/dist-packages/datasets/features/image.py:185, in Image.decode_example(self, value, token_per_repo_id) 183 else: 184 image = PIL.Image.open(BytesIO(bytes_)) --> 185 image.load() # to avoid "Too many open files" errors 186 return image File /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:254, in ImageFile.load(self) 252 break 253 else: --> 254 raise OSError( 255 "image file is truncated " 256 f"({len(b)} bytes not processed)" 257 ) 259 b = b + s 260 n, err_code = decoder.decode(b) OSError: image file is truncated (1 bytes not processed) ``` ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("mehul7/captioned_military_aircraft") from transformers import AutoImageProcessor checkpoint = "microsoft/resnet-50" image_processor = AutoImageProcessor.from_pretrained(checkpoint) import re from PIL import Image import io def contains_number(example): try: image = Image.open(io.BytesIO(example["image"]['bytes'])) t = image_processor(images=image, return_tensors="pt")['pixel_values'] except Exception as e: print(f"Error processing image:{example['text']}") return False return bool(re.search(r'\d', example['text'])) # Define a function to add the 'label' field def add_label(example): lab = example['text'].split() temp = 'NOT' for item in lab: if str(item[-1]).isdigit(): temp = item break example['label'] = temp return example # Filter the dataset # filtered_dataset = dataset.filter(contains_number) # Add the 'label' field in the dataset labeled_dataset = dataset.filter(contains_number).map(add_label) # View the structure of the updated dataset print(labeled_dataset) ``` ### Expected behavior needs to form labels same as : https://www.kaggle.com/code/jiabaowangts/dataset-air/notebook ### Environment info Kaggle notebook P100
22
OSError: image file is truncated (1 bytes not processed) #28323 ### Describe the bug ``` --------------------------------------------------------------------------- OSError Traceback (most recent call last) Cell In[24], line 28 23 return example 25 # Filter the dataset 26 # filtered_dataset = dataset.filter(contains_number) 27 # Add the 'label' field in the dataset ---> 28 labeled_dataset = dataset.filter(contains_number).map(add_label) 29 # View the structure of the updated dataset 30 print(labeled_dataset) File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:975, in DatasetDict.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc) 972 if cache_file_names is None: 973 cache_file_names = {k: None for k in self} 974 return DatasetDict( --> 975 { 976 k: dataset.filter( 977 function=function, 978 with_indices=with_indices, 979 input_columns=input_columns, 980 batched=batched, 981 batch_size=batch_size, 982 keep_in_memory=keep_in_memory, 983 load_from_cache_file=load_from_cache_file, 984 cache_file_name=cache_file_names[k], 985 writer_batch_size=writer_batch_size, 986 fn_kwargs=fn_kwargs, 987 num_proc=num_proc, 988 desc=desc, 989 ) 990 for k, dataset in self.items() 991 } 992 ) File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:976, in <dictcomp>(.0) 972 if cache_file_names is None: 973 cache_file_names = {k: None for k in self} 974 return DatasetDict( 975 { --> 976 k: dataset.filter( 977 function=function, 978 with_indices=with_indices, 979 input_columns=input_columns, 980 batched=batched, 981 batch_size=batch_size, 982 keep_in_memory=keep_in_memory, 983 load_from_cache_file=load_from_cache_file, 984 cache_file_name=cache_file_names[k], 985 writer_batch_size=writer_batch_size, 986 fn_kwargs=fn_kwargs, 987 num_proc=num_proc, 988 desc=desc, 989 ) 990 for k, dataset in self.items() 991 } 992 ) File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output File /usr/local/lib/python3.10/dist-packages/datasets/fingerprint.py:481, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 477 validate_fingerprint(kwargs[fingerprint_name]) 479 # Call actual function --> 481 out = func(dataset, *args, **kwargs) 483 # Update fingerprint of in-place transforms + update in-place history of transforms 485 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3623, in Dataset.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 3620 if len(self) == 0: 3621 return self -> 3623 indices = self.map( 3624 function=partial( 3625 get_indices_from_mask_function, function, batched, with_indices, input_columns, self._indices 3626 ), 3627 with_indices=True, 3628 features=Features({"indices": Value("uint64")}), 3629 batched=True, 3630 batch_size=batch_size, 3631 remove_columns=self.column_names, 3632 keep_in_memory=keep_in_memory, 3633 load_from_cache_file=load_from_cache_file, 3634 cache_file_name=cache_file_name, 3635 writer_batch_size=writer_batch_size, 3636 fn_kwargs=fn_kwargs, 3637 num_proc=num_proc, 3638 suffix_template=suffix_template, 3639 new_fingerprint=new_fingerprint, 3640 input_columns=input_columns, 3641 desc=desc or "Filter", 3642 ) 3643 new_dataset = copy.deepcopy(self) 3644 new_dataset._indices = indices.data File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3093, in Dataset.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 3087 if transformed_dataset is None: 3088 with hf_tqdm( 3089 unit=" examples", 3090 total=pbar_total, 3091 desc=desc or "Map", 3092 ) as pbar: -> 3093 for rank, done, content in Dataset._map_single(**dataset_kwargs): 3094 if done: 3095 shards_done += 1 File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3470, in Dataset._map_single(shard, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset) 3466 indices = list( 3467 range(*(slice(i, i + batch_size).indices(shard.num_rows))) 3468 ) # Something simpler? 3469 try: -> 3470 batch = apply_function_on_filtered_inputs( 3471 batch, 3472 indices, 3473 check_same_num_examples=len(shard.list_indexes()) > 0, 3474 offset=offset, 3475 ) 3476 except NumExamplesMismatchError: 3477 raise DatasetTransformationNotAllowedError( 3478 "Using `.map` in batched mode on a dataset with attached indexes is allowed only if it doesn't create or remove existing examples. You can first run `.drop_index() to remove your index and then re-add it." 3479 ) from None File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3349, in Dataset._map_single.<locals>.apply_function_on_filtered_inputs(pa_inputs, indices, check_same_num_examples, offset) 3347 if with_rank: 3348 additional_args += (rank,) -> 3349 processed_inputs = function(*fn_args, *additional_args, **fn_kwargs) 3350 if isinstance(processed_inputs, LazyDict): 3351 processed_inputs = { 3352 k: v for k, v in processed_inputs.data.items() if k not in processed_inputs.keys_to_format 3353 } File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:6212, in get_indices_from_mask_function(function, batched, with_indices, input_columns, indices_mapping, *args, **fn_kwargs) 6209 if input_columns is None: 6210 # inputs only contains a batch of examples 6211 batch: dict = inputs[0] -> 6212 num_examples = len(batch[next(iter(batch.keys()))]) 6213 for i in range(num_examples): 6214 example = {key: batch[key][i] for key in batch} File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:272, in LazyDict.__getitem__(self, key) 270 value = self.data[key] 271 if key in self.keys_to_format: --> 272 value = self.format(key) 273 self.data[key] = value 274 self.keys_to_format.remove(key) File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:375, in LazyBatch.format(self, key) 374 def format(self, key): --> 375 return self.formatter.format_column(self.pa_table.select([key])) File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:442, in PythonFormatter.format_column(self, pa_table) 440 def format_column(self, pa_table: pa.Table) -> list: 441 column = self.python_arrow_extractor().extract_column(pa_table) --> 442 column = self.python_features_decoder.decode_column(column, pa_table.column_names[0]) 443 return column File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:218, in PythonFeaturesDecoder.decode_column(self, column, column_name) 217 def decode_column(self, column: list, column_name: str) -> list: --> 218 return self.features.decode_column(column, column_name) if self.features else column File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in Features.decode_column(self, column, column_name) 1938 def decode_column(self, column: list, column_name: str): 1939 """Decode column with custom feature decoding. 1940 1941 Args: (...) 1948 `list[Any]` 1949 """ 1950 return ( -> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column] 1952 if self._column_requires_decoding[column_name] 1953 else column 1954 ) File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in <listcomp>(.0) 1938 def decode_column(self, column: list, column_name: str): 1939 """Decode column with custom feature decoding. 1940 1941 Args: (...) 1948 `list[Any]` 1949 """ 1950 return ( -> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column] 1952 if self._column_requires_decoding[column_name] 1953 else column 1954 ) File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /usr/local/lib/python3.10/dist-packages/datasets/features/image.py:185, in Image.decode_example(self, value, token_per_repo_id) 183 else: 184 image = PIL.Image.open(BytesIO(bytes_)) --> 185 image.load() # to avoid "Too many open files" errors 186 return image File /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:254, in ImageFile.load(self) 252 break 253 else: --> 254 raise OSError( 255 "image file is truncated " 256 f"({len(b)} bytes not processed)" 257 ) 259 b = b + s 260 n, err_code = decoder.decode(b) OSError: image file is truncated (1 bytes not processed) ``` ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("mehul7/captioned_military_aircraft") from transformers import AutoImageProcessor checkpoint = "microsoft/resnet-50" image_processor = AutoImageProcessor.from_pretrained(checkpoint) import re from PIL import Image import io def contains_number(example): try: image = Image.open(io.BytesIO(example["image"]['bytes'])) t = image_processor(images=image, return_tensors="pt")['pixel_values'] except Exception as e: print(f"Error processing image:{example['text']}") return False return bool(re.search(r'\d', example['text'])) # Define a function to add the 'label' field def add_label(example): lab = example['text'].split() temp = 'NOT' for item in lab: if str(item[-1]).isdigit(): temp = item break example['label'] = temp return example # Filter the dataset # filtered_dataset = dataset.filter(contains_number) # Add the 'label' field in the dataset labeled_dataset = dataset.filter(contains_number).map(add_label) # View the structure of the updated dataset print(labeled_dataset) ``` ### Expected behavior needs to form labels same as : https://www.kaggle.com/code/jiabaowangts/dataset-air/notebook ### Environment info Kaggle notebook P100 You can add ```python from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True ``` after the imports to be able to read truncated images.
[ -0.3276703357696533, -0.31357821822166443, -0.26014402508735657, 0.10543324053287506, 0.24383752048015594, 0.03358208388090134, 0.23733654618263245, 0.46688112616539, 0.08176564425230026, 0.19741684198379517, 0.054364994168281555, 0.06374165415763855, -0.06677894294261932, 0.07968498766422272, -0.14242108166217804, -0.07559946179389954, -0.03056107461452484, 0.10723263025283813, 0.09563364088535309, 0.08584258705377579, -0.34226322174072266, 0.2144775241613388, -0.021758489310741425, -0.06537450850009918, -0.2969648838043213, -0.2398546189069748, -0.04726807028055191, 0.3207606077194214, -0.4079400300979614, -0.3186423182487488, -0.05723927170038223, -0.20786285400390625, -0.06486533582210541, 0.5109490156173706, -0.00010565900447545573, 0.002501659095287323, 0.25207218527793884, -0.007336270064115524, -0.31062716245651245, 0.0006803348660469055, -0.03478269279003143, -0.2029450237751007, -0.11587126553058624, -0.38340967893600464, 0.16385972499847412, 0.03224861994385719, 0.03081461228430271, -0.2656174600124359, 0.48730504512786865, 0.2803198993206024, 0.32729262113571167, -0.019339412450790405, 0.16403168439865112, -0.11828169226646423, 0.23741920292377472, 0.125061497092247, 0.048233240842819214, 0.1537427306175232, 0.13988415896892548, -0.04279523342847824, 0.01896047778427601, 0.51655513048172, -0.15341655910015106, 0.11548151075839996, 0.04142226278781891, -0.09921137243509293, 0.15164244174957275, -0.4191802740097046, 0.2804467976093292, -0.03583412989974022, 0.2558521330356598, -0.20535434782505035, -0.4226703345775604, -0.17248840630054474, 0.01579492911696434, -0.47811904549598694, 0.044236958026885986, 0.23026806116104126, -0.17224155366420746, -0.09228020906448364, -0.3265790045261383, -0.09229903668165207, -0.22644124925136566, -0.04146933555603027, -0.22983971238136292, 0.16447249054908752, -0.2013072669506073, 0.0023425593972206116, -0.030426017940044403, -0.08465656638145447, 0.18916082382202148, -0.15024614334106445, 0.06387308239936829, 0.12176588177680969, -0.11293523758649826, -0.004482246935367584, -0.09949719905853271, 0.015438748523592949, 0.1944054812192917, -0.025906924158334732, -0.19336199760437012, -0.21354293823242188, 0.14665310084819794, 0.04983273893594742, 0.09647563099861145, 0.10599692165851593, -0.1641516089439392, 0.37004226446151733, 0.08392736315727234, 0.22323277592658997, -0.23591530323028564, -0.12511838972568512, -0.05849156156182289, -0.23883908987045288, 0.3357524871826172, 0.008507180958986282, 0.2025056779384613, -0.04517664387822151, -0.2961553931236267, 0.047678545117378235, 0.1928473711013794, 0.1326744556427002, -0.047236621379852295, 0.31067538261413574, -0.0725555568933487, 0.020257867872714996, 0.289431095123291, -0.02588077262043953, -0.1119239330291748, -0.0121920146048069, -0.27530917525291443, 0.10287594050168991, -0.02373606711626053, -0.13690592348575592, -0.1231791079044342, -0.15463390946388245, 0.3228908181190491, -0.1663750410079956, 0.09093637764453888, -0.03447161614894867, 0.08446233719587326, -0.3867914378643036, 0.13913771510124207, 0.4160088300704956, 0.053599417209625244, -0.012290515005588531, 0.3296717703342438, -0.04516798257827759, 0.0529162734746933, 0.27298226952552795, -0.47614991664886475, -0.20989400148391724, -0.14779040217399597, 0.3251734972000122, 0.2368510216474533, 0.23546861112117767, 0.004333999007940292, -0.14243541657924652, 0.5040591955184937, -0.1723388433456421, 0.0684678852558136, -0.26135364174842834, -0.4595225155353546, -0.24162596464157104, 0.20387503504753113, 0.28419584035873413, -0.47134900093078613, 0.07801151275634766, -0.24495333433151245, -0.046041082590818405, 0.2229682058095932, 0.22905322909355164, 0.18182779848575592, 0.23627622425556183, -0.3390667736530304, -0.00278569757938385, 0.2602699398994446, -0.3616566061973572, -0.4403815269470215, 0.08856973052024841, -0.2484312653541565, 0.058965958654880524, -0.037167347967624664, 0.09609167277812958, 0.3326353132724762, 0.08931311964988708, 0.2911629378795624, 0.1772480309009552, -0.2600676715373993, 0.014466546475887299, -0.2729194164276123, -0.03350619599223137, -0.08269104361534119, 0.1074322909116745, 0.12327781319618225, -0.020559050142765045, 0.05583803728222847, -0.02487909607589245, 0.1331569254398346, 0.10144469141960144, 0.14208872616291046, 0.3177472949028015, 0.18040823936462402, 0.050205644220113754, 0.007881492376327515, -0.32961463928222656, -0.023280039429664612, 0.03950101137161255, -0.016089685261249542, -0.1431315690279007, -0.29960814118385315, -0.12920379638671875, -0.27950724959373474, 0.03272169828414917, -0.10105586051940918, -0.3830394744873047, 0.2442319095134735, 0.06987222284078598, 0.1373884677886963, -0.021392259746789932, -0.04570923000574112, 0.2802632451057434, -0.24662679433822632, 0.05916295573115349, -0.1381392478942871, 0.020412161946296692, -0.17950469255447388, -0.12791433930397034, -0.06516939401626587, -0.050415605306625366, 0.13609996438026428, -0.01593380980193615, -0.28267329931259155, 0.455636590719223, 0.4287968575954437, -0.11175677180290222, -0.1346975564956665, -0.18520382046699524, 0.038617976009845734, 0.006416119635105133, 0.013233166188001633, -0.050793953239917755, 0.15097033977508545, 0.07730920612812042, -0.26009050011634827, 0.15554744005203247, -0.05328923091292381, 0.0422164611518383, 0.10012463480234146, 0.025912679731845856, 0.17554907500743866, 0.029703214764595032, 0.12740439176559448, -0.34977906942367554, 0.06606702506542206, -0.059913184493780136, 0.06825728714466095, -0.13511306047439575, 0.06699992716312408, 0.024222929030656815, 0.5864347815513611, 0.18449340760707855, -0.051499709486961365, 0.3128914535045624, -0.15512722730636597, 0.03616371750831604, -0.03149298205971718, 0.3852136731147766, 0.30429819226264954, 0.3565150797367096, -0.1930363029241562, -0.033303409814834595, 0.19106820225715637, -0.024455981329083443, 0.27686449885368347, 0.12287843227386475, 0.4084964394569397, 0.21391770243644714, 0.14423036575317383, 0.12144650518894196, -0.0852331668138504, -0.36741939187049866, -0.21818199753761292, 0.1203119233250618, -0.009262733161449432, 0.06526616215705872, -0.17728322744369507, -0.3492875099182129, 0.040634073317050934, 0.2545294761657715, -0.05909091606736183, -0.21501806378364563, 0.016038309782743454, 0.16581395268440247, -0.10617556422948837, 0.1124371886253357, -0.07831910252571106, 0.16908423602581024, 0.4742165207862854, -0.03660253435373306, -0.055078305304050446, -0.028192076832056046, -0.06172380968928337, 0.17423459887504578, 0.06563495099544525, -0.2427642047405243, 0.4786151647567749, -0.19832995533943176, -0.07191623747348785, -0.31080716848373413, -0.39430689811706543, 0.10324183851480484, 0.03177742660045624, 0.13084012269973755, 0.2183178961277008, 0.3448675274848938, -0.2138926386833191, -0.013522833585739136, 0.13530972599983215, -0.13223865628242493, -0.34692156314849854, -0.08115983009338379, 0.10497739911079407, 0.04073017090559006, -0.2542855143547058, -0.026520926505327225, -0.36316239833831787, -0.3849858045578003, -0.05579329654574394, 0.22928713262081146, 0.3030208647251129, 0.45403701066970825, 0.21647265553474426, -0.06511224806308746, 0.13914810121059418, 0.2646561563014984, -0.1825219690799713, -0.41665080189704895, 0.15359386801719666, -0.22236701846122742, -0.2965049743652344, -0.10278897732496262, -0.17026691138744354, 0.19968397915363312, 0.25603407621383667, -0.5583783984184265, -0.4199428856372833, -0.10683984309434891, 0.058652400970458984, -0.2021169662475586, -0.025955412536859512, 0.24084192514419556, 0.010041959583759308, -0.24577932059764862, -0.21430720388889313, -0.0998072624206543, -0.12962809205055237, -0.1580115109682083, 0.16164356470108032, -0.007841984741389751, 0.6010993719100952, 0.05922605097293854, 0.4228699803352356, 0.1752806007862091, 0.15533511340618134, 0.2811257839202881, -0.1644040197134018, 0.2684868574142456, -0.28178870677948, -0.28227436542510986, 0.2034071534872055, 0.027477607131004333, -0.18952041864395142, -0.059405624866485596, 0.03682064265012741, 0.12762415409088135, 0.12526607513427734, 0.050479769706726074, -0.4813010096549988, 0.10785036534070969, -0.0700700432062149, 0.08662096410989761, 0.3050422668457031, -0.09109050035476685, -0.09628035873174667, -0.25813618302345276, 0.044873032718896866, -0.1765039712190628, 0.13624687492847443, 0.1626242995262146, -0.11057214438915253, -0.05551580712199211, -0.02653413452208042, -0.3547787368297577, 0.15771161019802094, 0.17728453874588013, 0.16132499277591705, -0.16726580262184143, 0.008791036903858185, -0.018931884318590164, -0.16125786304473877, 1.0105059146881104, -0.007302907295525074, 0.0392746776342392, 0.20941273868083954, -0.1571943461894989, -0.41696202754974365, 0.04651074856519699, -0.1349925547838211, 0.2621415853500366, 0.25665396451950073, 0.5057945251464844, 0.032477766275405884, 0.0834118127822876, 0.12571118772029877, 0.19087007641792297, -0.11800727248191833, 0.020109739154577255, -0.18732263147830963, -0.3266046643257141, -0.4235762357711792, 0.09555558860301971, 0.03952702134847641, 0.24190260469913483, 0.12578865885734558, -0.10107644647359848, -0.02109024114906788, -0.20891425013542175, -0.28574052453041077, 0.061439163982868195, 0.34138724207878113, -0.1425170600414276, 0.2212895154953003, -0.06702087074518204, 0.06392014771699905, 0.4414661228656769, 0.4955291152000427, -0.26898595690727234, -0.21246124804019928, 0.19010905921459198, -0.03351682424545288, -0.12162600457668304, 0.19078396260738373, -0.13515132665634155, -0.13885939121246338, -0.15580444037914276, 0.585155189037323, -0.05257229134440422, 0.046520430594682693, 0.27245786786079407, 0.0349808894097805, -0.34002190828323364, -0.2234049141407013, 0.045836880803108215, 0.2853701412677765, 0.13160279393196106, 0.35204052925109863, -0.14956843852996826, -0.2293916493654251, 0.26033294200897217, 0.15740007162094116, 0.7034475803375244, -0.06152339652180672, 0.10961663722991943, 0.13872532546520233, -0.14858843386173248, 0.3931008577346802, -0.14873358607292175, 0.17467468976974487, -0.20435664057731628, -0.48695480823516846, 0.08456785976886749, -0.1053231805562973, 0.07913510501384735, 0.041651077568531036, -0.23079827427864075, 0.07380515336990356, -0.14691424369812012, -0.11442580074071884, -0.0658370703458786, 0.14514821767807007, -0.10905291140079498, -0.17175710201263428, -0.24633654952049255, 0.3090263605117798, -0.021442778408527374, 0.07014468312263489, -0.07023836672306061, 0.14369677007198334, -0.07670566439628601, -0.25823020935058594, -0.1515226662158966, 0.07020897418260574, -0.28532159328460693, 0.13887274265289307, -0.16264982521533966, -0.13356302678585052, -0.1745087206363678, 0.012382252141833305, 0.040976136922836304, 0.32310861349105835, 0.1411856859922409, 0.3384310305118561, 0.2495952993631363, 0.16966533660888672, -0.004726417362689972, -0.09345358610153198, 0.32144173979759216, -0.19460880756378174, 0.10152383148670197, -0.0893157571554184, -0.022603757679462433, -0.15531879663467407, 0.20197314023971558, 0.06201627850532532, 0.31854158639907837, -0.27659833431243896, -0.2182849645614624, -0.39731428027153015, -0.09279263019561768, -0.30765122175216675, 0.23942556977272034, -0.03955404460430145, -0.10249088704586029, 0.2371062934398651, 0.06638392806053162, -0.31575000286102295, -0.1336694210767746, 0.3750714659690857, 0.10702769458293915, 0.1500009298324585, 0.3867917060852051, -0.05482562631368637, -0.16041623055934906, -0.33490997552871704, 0.11427134275436401, -0.13343364000320435, -0.20943108201026917, 0.4427976608276367, -0.012084480375051498, 0.1415005326271057, -0.03440653160214424, -0.16938695311546326, 0.2051607370376587, 0.18304048478603363, -0.09064820408821106, -0.5508065223693848, -0.35954201221466064, 0.013778990134596825, -0.14346566796302795, 0.30896782875061035, 0.06991755962371826, 0.1390678882598877, -0.07599234580993652, 0.17427441477775574, -0.43004727363586426, 0.09566270560026169, -0.19612571597099304, 0.10035474598407745, 0.002298012375831604, 0.12106665968894958, -0.026377001777291298, 0.014527533203363419, 0.2891744375228882, 0.3529617190361023, -0.14358046650886536, -0.3878024220466614, -0.032616183161735535, 0.06976145505905151, -0.04824475198984146, -0.40144842863082886, 0.16762518882751465, -0.17739711701869965, -0.22718682885169983, -0.04963237792253494, 0.0931997150182724, 0.05048051476478577, -0.06221063807606697, -0.14232365787029266, 0.04980631172657013, 0.024750346317887306, 0.3216158151626587, 0.08983153849840164, -0.29339107871055603, 0.3339981734752655, 0.09657922387123108, 0.32382461428642273, 0.016966067254543304, -0.08372409641742706, -0.1746334433555603, -0.09653373062610626, -0.1115359291434288, -0.2728411555290222, 0.4005500078201294, -0.23585033416748047, -0.005745165050029755, 0.19949020445346832, 0.3929539620876312, 0.1582820564508438, -0.3061498701572418, 0.03783975541591644, 0.12332973629236221, 0.38225311040878296, -0.3107975125312805, -0.04125962406396866, 0.2481062412261963, -0.09265024960041046, 0.045862406492233276, 0.12779268622398376, -0.13554365932941437, 0.11627434194087982, 0.10514535009860992, 0.1703791618347168, 0.5708441734313965, -0.19375324249267578, 0.13318870961666107, 0.3061331808567047, 0.0681600496172905, 0.12726068496704102, 0.13401959836483002, 0.1702936291694641, 0.06165582686662674, 0.6090564727783203, 0.13383124768733978, 0.3524233400821686, -0.06362175941467285, 0.026864157989621162, 0.014339227229356766, -0.3913177251815796, 0.2219550609588623, 0.19127818942070007, -0.3075982332229614, 0.0720556378364563, -0.10275518894195557, -0.22820015251636505, -0.10161420702934265, -0.2564033567905426, 0.07449125498533249, 0.2825348377227783, -0.11220438778400421, 0.19516116380691528, -0.23018333315849304, -0.08678733557462692, -0.06974129378795624, -0.05457146465778351, 0.1156056746840477, -0.076260507106781, 0.11062245070934296, 0.03649431839585304, -0.25618115067481995, -0.13133975863456726, -0.39129820466041565, 0.162239670753479, 0.1898937225341797, -0.3981918692588806, 0.19910374283790588, 0.48946627974510193, 0.20374691486358643, 0.07230163365602493, 0.3819617033004761, 0.7158538699150085, 0.3570859134197235, 0.06919702887535095, -0.11831807345151901, 0.04233001545071602, -0.2594018280506134, -0.1889129877090454, 0.13902129232883453, 0.02428588457405567, 0.06567654758691788, 0.29960256814956665, 0.33410489559173584, -0.2617384195327759, 0.10051007568836212, 0.24410109221935272, -0.01562475971877575, -0.19905048608779907, -0.09693469107151031, -0.014049181714653969, -0.11602070927619934, -0.22925803065299988, 0.005891706794500351, -0.5158436298370361, -0.018457163125276566, 0.30405840277671814, -0.16129270195960999, 0.21076682209968567, 0.09116712212562561, 0.1414210945367813, -0.16394445300102234, 0.22049960494041443, 0.38501983880996704, 0.09283726662397385, -0.23583152890205383, -0.2540152072906494, -0.26768508553504944, 0.13051828742027283, -0.26451027393341064, -0.46877652406692505, 0.04059576615691185, 0.08181848376989365, -0.08711101114749908, 0.0009458679705858231, 0.3161553740501404, -0.057925835251808167, 0.0018516592681407928, 0.17903020977973938, -0.36803799867630005, -0.19437825679779053, 0.0934540182352066, -0.040011778473854065, 0.1091042011976242, -0.4631350636482239, 0.15314114093780518, -0.2287810742855072, 0.2202451378107071, -0.12304043024778366, 0.009575717151165009, 0.11841633170843124, 0.0016780826263129711, 0.25672343373298645, 0.25511428713798523, 0.20591379702091217, -0.3667629063129425, -0.20397540926933289, 0.032463036477565765, 0.018313277512788773, -0.3783436417579651, 0.15648314356803894, 0.4287199378013611, 0.616671085357666, -0.07640505582094193, -0.5743570923805237, -0.17048966884613037, 0.6006554961204529, -0.04036751762032509, -0.08346445113420486, 0.02699591964483261, 0.22681888937950134, 0.11506308615207672, -0.03544534742832184, 0.13591830432415009, 0.16138434410095215, -0.0004798267036676407, 0.16751521825790405, -0.3378472924232483, -0.45174288749694824, 0.4365695118904114, -0.2697305679321289, -0.23657238483428955, 0.02509346976876259, 0.12060953676700592, -0.11804511398077011, 0.016805948689579964, -0.07973416149616241, 0.06566210091114044, 0.37691956758499146, -0.05985561013221741, -0.22208967804908752, 0.3417172431945801, -0.10099528729915619, 0.16614702343940735, 0.038288116455078125, 0.2686009109020233, -0.06305187940597534, -0.2792286276817322, 0.07109329849481583, -0.24615535140037537 ]
https://github.com/huggingface/datasets/issues/6554
I don't think this bug is a thing ? Do you have some code that leads to this issue ?
Parquet exports are used even if revision is passed
We should not used Parquet exports if `revision` is passed. I think this is a regression.
20
Parquet exports are used even if revision is passed We should not used Parquet exports if `revision` is passed. I think this is a regression. I don't think this bug is a thing ? Do you have some code that leads to this issue ?
[ 0.00247994065284729, -0.33710503578186035, -0.11629632860422134, 0.24757957458496094, 0.059504974633455276, -0.4397578537464142, 0.18885020911693573, 0.13291427493095398, -0.1428072452545166, 0.35665690898895264, 0.3908851742744446, 0.49041202664375305, 0.31143370270729065, 0.03026939183473587, -0.12497840821743011, 0.06394223868846893, 0.2687302529811859, 0.12707456946372986, -0.061901744455099106, -0.1845642626285553, -0.2402423471212387, 0.3131314218044281, -0.14849182963371277, 0.11305858194828033, 0.1615367829799652, -0.10388866811990738, 0.15126468241214752, 0.0012196004390716553, -0.07179483026266098, -0.15855565667152405, -0.04706481844186783, -0.21993574500083923, -0.12477099150419235, 0.14083372056484222, -0.00010431378905195743, 0.1885875165462494, 0.32538264989852905, -0.23821225762367249, -0.24143736064434052, 0.1719466745853424, 0.10112355649471283, 0.013780735433101654, 0.03623545169830322, -0.2777082920074463, -0.29319077730178833, -0.25650641322135925, -0.23955583572387695, -0.28660035133361816, 0.25925585627555847, 0.3458215296268463, 0.35498902201652527, 0.08605477213859558, -0.07789546251296997, -0.017966900020837784, 0.18332594633102417, -0.07343803346157074, -0.07568186521530151, -0.2013688087463379, 0.19456222653388977, 0.3146827518939972, -0.10770289599895477, 0.2603708803653717, 0.3268934488296509, 0.1084655299782753, 0.03908461704850197, 0.0321369543671608, 0.5134730339050293, 0.11146454513072968, 0.10175353288650513, -0.3079696595668793, 0.3317776322364807, -0.0724368691444397, -0.00529320165514946, 0.007985390722751617, 0.03549117594957352, -0.20193737745285034, -0.08075490593910217, 0.2424275279045105, 0.20385876297950745, 0.30539670586586, 0.13284340500831604, -0.4071917235851288, -0.2414136528968811, -0.22726987302303314, 0.10150527954101562, 0.06376771628856659, -0.11166783422231674, 0.1687994748353958, -0.2642660140991211, -0.24779456853866577, 0.0692894458770752, 0.029821600764989853, -0.20537248253822327, -0.3309779763221741, 0.2780853807926178, -0.09068228304386139, 0.13103993237018585, 0.1359853446483612, -0.1681678295135498, -0.13997401297092438, 0.028018124401569366, 0.20126670598983765, 0.4450632929801941, 0.21623125672340393, 0.3482359051704407, -0.08121135085821152, 0.18414120376110077, 0.18739134073257446, 0.08683459460735321, -0.14919093251228333, -0.144431933760643, -0.05791095271706581, 0.4471454620361328, 0.05498046427965164, -0.09754132479429245, -0.17434567213058472, 0.3437556028366089, -0.4006444215774536, 0.14845645427703857, 0.0369991697371006, 0.059518009424209595, 0.06954140961170197, -0.11948555707931519, 0.2011263072490692, -0.12703056633472443, 0.028415784239768982, 0.04252263158559799, 0.20522047579288483, -0.1316225826740265, -0.37323278188705444, -0.36246243119239807, -0.007388525642454624, -0.3597954511642456, -0.31539186835289, -0.1538102775812149, -0.2279757559299469, 0.029186084866523743, 0.41445592045783997, 0.06802777200937271, -0.14645589888095856, 0.15938670933246613, 0.061505261808633804, 0.1875591278076172, 0.11551414430141449, -0.03479987382888794, -0.1598006784915924, 0.290331095457077, -0.241240993142128, -0.10836128890514374, 0.07114599645137787, -0.531019389629364, -0.02660239487886429, -0.16246400773525238, 0.33988672494888306, 0.11562858521938324, -0.034783124923706055, -0.22075918316841125, 0.05356625095009804, -0.022968456149101257, 0.06169985234737396, -0.13616476953029633, -0.03609819337725639, -0.031489647924900055, -0.17427510023117065, -0.2630418539047241, -0.07843703031539917, -0.21271255612373352, -0.08066579699516296, 0.213139608502388, -0.24376052618026733, 0.4462297856807709, 0.1864670217037201, -0.4033726453781128, -0.18637420237064362, -0.05024610459804535, -0.3640907406806946, 0.47434139251708984, 0.13682588934898376, 0.07358749210834503, -0.015506327152252197, -0.3420582413673401, -0.28809449076652527, 0.19259099662303925, -0.5207995772361755, 0.18590039014816284, -0.1758560985326767, 0.1164749264717102, 0.08310012519359589, 0.06312020123004913, 0.1933586150407791, -0.45342960953712463, 0.03800160437822342, 0.18251878023147583, -0.1492709070444107, -0.032652247697114944, 0.17988449335098267, 0.3318059742450714, -0.08590365946292877, 0.014352509751915932, -0.2466759979724884, 0.0467030331492424, 0.16292235255241394, 0.39592650532722473, 0.3753141760826111, 0.29996931552886963, 0.10326831042766571, -0.16680419445037842, 0.10714923590421677, -0.2841087579727173, -0.20212605595588684, 0.3099696636199951, -0.13471092283725739, -0.09590384364128113, 0.1231229156255722, 0.09577105194330215, -0.02776053361594677, 0.33088362216949463, 0.3816866874694824, -0.10500943660736084, 0.03361446410417557, -0.09056811779737473, -0.2089436799287796, -0.2947334051132202, -0.11455508321523666, 0.12339366972446442, 0.21407905220985413, -0.20384180545806885, -0.14259949326515198, 0.04798810929059982, 0.11141340434551239, 0.4643177390098572, -0.14696626365184784, 0.1317480504512787, 0.17563718557357788, 0.13918519020080566, 0.28317907452583313, 0.1467544287443161, -0.11294959485530853, 0.028546014800667763, 0.08825014531612396, 0.0038397610187530518, -0.01710175722837448, 0.0007706843316555023, -0.08572591841220856, -0.13865722715854645, 0.40609222650527954, 0.39649972319602966, 0.1274341195821762, 0.036751508712768555, -0.17496538162231445, 0.17765802145004272, 0.10540309548377991, -0.07523679733276367, -0.3395951986312866, -0.24077075719833374, 0.07047099620103836, -0.20539037883281708, 0.1528155654668808, -0.35723283886909485, 0.15694770216941833, 0.5608733296394348, 0.19882832467556, 0.04032167047262192, 0.10056751221418381, 0.23905348777770996, -0.21309129893779755, 0.1324034184217453, 0.13468940556049347, 0.02965814620256424, 0.25058865547180176, 0.1854363977909088, -0.13068941235542297, 0.05257696285843849, -0.12175748497247696, 0.249101459980011, 0.06092226505279541, 0.12894240021705627, -0.026471223682165146, 0.07395351678133011, -0.3952435851097107, -0.41760993003845215, 0.39511701464653015, 0.06922245770692825, 0.07259824126958847, -0.23431891202926636, 0.15349343419075012, -0.5233275294303894, 0.13768288493156433, -0.5066304206848145, 0.29016241431236267, -0.02625628001987934, -0.12815050780773163, 0.2060234248638153, -0.0001258698757737875, -0.29556703567504883, 0.1567372828722, 0.22542500495910645, 0.1939893513917923, -0.2072199285030365, 0.05723543465137482, -0.025922313332557678, -0.29880690574645996, -0.38476482033729553, 0.19920331239700317, -0.17031753063201904, -0.05367070436477661, 0.18978121876716614, 0.09502658993005753, -0.037275418639183044, -0.6440227627754211, -0.362714946269989, 0.2028091847896576, -0.01465553604066372, 0.06884772330522537, 0.023978883400559425, 0.06993011385202408, -0.03408784791827202, -0.09222462773323059, 0.16173645853996277, -0.1894381046295166, -0.15150007605552673, -0.04783595725893974, -0.21529805660247803, 0.07218633592128754, -0.3262544870376587, -0.47518986463546753, 0.04049881547689438, -0.188108891248703, 0.2808273136615753, 0.18304133415222168, 0.06873007118701935, -0.00965900905430317, -0.07449771463871002, -0.2157599776983261, 0.0508788600564003, 0.27236878871917725, -0.25689470767974854, -0.1623169183731079, -0.08328224718570709, -0.14162933826446533, -0.3706414997577667, 0.08852794766426086, 0.10802878439426422, -0.09266788512468338, 0.1630789041519165, -0.1883167028427124, -0.10147266834974289, 0.23264145851135254, 0.02234271913766861, -0.03985803201794624, 0.1987408995628357, 0.3802628815174103, 0.04050946608185768, -0.2393149435520172, -0.23596951365470886, -0.1725635826587677, 0.27628955245018005, 0.2229982316493988, 0.05867727845907211, -0.0597802996635437, 0.4436545968055725, -0.034047991037368774, 0.6153326630592346, -0.17896392941474915, 0.05290021747350693, 0.4528711438179016, -0.08154156059026718, 0.5144830942153931, -0.065497487783432, 0.11098919063806534, 0.001426737755537033, -0.01998654007911682, -0.1654019057750702, 0.4626501202583313, -0.22445416450500488, -0.7357209920883179, -0.10091372579336166, -0.19114449620246887, -0.19353333115577698, -0.1896589696407318, -0.26963362097740173, 0.26800820231437683, 0.22740218043327332, 0.18572816252708435, -0.11497750133275986, -0.060334865003824234, 0.2360328733921051, 0.1747196912765503, -0.24787555634975433, 0.13693827390670776, -0.010026175528764725, -0.3892796039581299, 0.15297576785087585, 0.05035588890314102, 0.07386742532253265, -0.21695713698863983, 0.12793384492397308, -0.17895284295082092, -0.26811856031417847, 0.27206575870513916, -0.2161320447921753, 0.4263189733028412, 0.17530718445777893, 0.29261183738708496, -0.03670531511306763, -0.23928695917129517, -0.15421278774738312, -0.0841786190867424, -0.2244233936071396, 0.06762215495109558, 0.30449485778808594, 0.3286117613315582, -0.34698742628097534, -0.006438318639993668, -0.014050379395484924, -0.12694096565246582, -0.2496531456708908, 0.313040554523468, -0.5036711692810059, 0.04526732861995697, -0.275134414434433, 0.40166404843330383, 0.04690026491880417, 0.2110787332057953, 0.13937819004058838, 0.20292764902114868, -0.18272802233695984, -0.3580946922302246, -0.3542509078979492, 0.14541679620742798, 0.4518543481826782, -0.17123840749263763, -0.15421807765960693, 0.03751976415514946, 0.4456365406513214, 0.3221459984779358, 0.21795986592769623, -0.08780372142791748, -0.10626207292079926, 0.13725262880325317, -0.19438913464546204, 0.3685108423233032, 0.17129945755004883, -0.10683274269104004, 0.15309205651283264, -0.27554750442504883, 0.042922839522361755, 0.048855435103178024, -0.3652724623680115, 0.00815349817276001, -0.37717437744140625, 0.10102716088294983, 0.031733714044094086, 0.12144065648317337, -0.15376216173171997, -0.20927327871322632, 0.017179973423480988, 0.5107691287994385, -0.2139190435409546, 0.4275699853897095, 0.33803293108940125, 0.7842774391174316, 0.1886029988527298, -0.11286475509405136, 0.14362481236457825, -0.6760938763618469, -0.021314587444067, -0.2345469743013382, -0.043844498693943024, -0.22699061036109924, -0.16740702092647552, 0.15935809910297394, -0.11238924413919449, 0.2506183683872223, 0.15003176033496857, -0.1796574741601944, 0.21165676414966583, 0.10530774295330048, -0.0220766793936491, -0.0909900814294815, 0.12204301357269287, 0.15186430513858795, 0.17836016416549683, -0.1867251992225647, 0.20093590021133423, 0.03778059780597687, -0.2653524577617645, -0.1766519397497177, -0.06081392616033554, 0.11569292843341827, -0.319397896528244, 0.06005004048347473, 0.12918683886528015, 0.137695774435997, 0.27046751976013184, 0.1623353213071823, -0.3616711497306824, -0.14546653628349304, 0.1700419932603836, 0.2264767587184906, 0.02779579721391201, -0.060527361929416656, 0.2798158824443817, 0.1465807855129242, 0.09934483468532562, -0.32585960626602173, 0.2388353943824768, 0.07205807417631149, -0.2287805825471878, -0.20984013378620148, -0.08736169338226318, -0.17522811889648438, -0.4083133935928345, -0.30730900168418884, 0.30574339628219604, 0.32864612340927124, 0.06400401890277863, 0.02568913623690605, 0.03976649418473244, 0.04006018489599228, -0.2035333812236786, 0.23304741084575653, -0.007720645517110825, -0.16177302598953247, -0.0035414770245552063, 0.09552005678415298, -0.3476031720638275, -0.24412032961845398, 0.39326170086860657, 0.18300506472587585, 0.1000165194272995, 0.1507371962070465, -0.06019652262330055, -0.35059458017349243, -0.2655230760574341, -0.19552740454673767, -0.0018579326570034027, -0.09553444385528564, 0.26922306418418884, 0.10275105386972427, -0.23457375168800354, 0.25244301557540894, 0.3573811948299408, -0.131569966673851, 0.1887468695640564, -0.32225969433784485, -0.08357838541269302, 0.029808908700942993, -0.09519075602293015, -0.2520776093006134, 0.0019387532956898212, 0.30689966678619385, -0.14619408547878265, 0.1030382364988327, -0.2892483174800873, -0.4249292016029358, 0.2349071502685547, -0.06171043962240219, 0.44627416133880615, 0.0033957529813051224, -0.2960124909877777, -0.17171147465705872, 0.027398452162742615, 0.21567296981811523, -0.03332036733627319, -0.07400093227624893, -0.31811022758483887, 0.006876163184642792, 0.08977976441383362, -0.049769327044487, 0.42887914180755615, -0.2839888036251068, -0.1104707419872284, -0.14525645971298218, 0.16835711896419525, 0.2843424677848816, -0.0385848730802536, 0.019833911210298538, 0.08268539607524872, 1.062978982925415, 0.08760601282119751, -0.009874530136585236, -0.19851899147033691, 0.08565166592597961, 0.0724281370639801, -0.2319212406873703, -0.13219310343265533, -0.34837645292282104, -0.032490409910678864, -0.23415160179138184, 0.08192381262779236, 0.1216314360499382, 0.38147425651550293, 0.21596983075141907, -0.11550480127334595, -0.20369602739810944, 0.3352622389793396, 0.15269781649112701, 0.07976977527141571, -0.04835238307714462, -0.3469947874546051, 0.287963330745697, 0.37601813673973083, -0.21712836623191833, -0.23545339703559875, 0.27372705936431885, 0.12087713927030563, -0.009107761085033417, 0.13746269047260284, 0.16403016448020935, -0.17274215817451477, 0.4156548082828522, 0.35796964168548584, 0.13236911594867706, -0.5104749798774719, 0.23746775090694427, 0.028688937425613403, -0.1886051595211029, -0.04955391213297844, -0.008366762660443783, 0.1579636186361313, 0.04883519187569618, 0.2717724144458771, 0.3078080117702484, 0.21934723854064941, 0.4253372550010681, -0.1250508427619934, 0.09371867030858994, -0.005113288760185242, 0.3245601952075958, 0.17723610997200012, 0.19592922925949097, 0.14810919761657715, 0.36755824089050293, -0.10959050059318542, 0.47144147753715515, -0.2193637639284134, -0.22539034485816956, 0.20406311750411987, -0.4144987165927887, -0.15857990086078644, 0.038139455020427704, -0.053509607911109924, 0.043122947216033936, 0.3057286739349365, -0.0764903873205185, 0.3893223702907562, -0.355739951133728, 0.07244417071342468, 0.06936393678188324, 0.035008303821086884, -0.09266087412834167, -0.20191219449043274, 0.37610942125320435, -0.10916779190301895, 0.26373615860939026, -0.20209284126758575, -0.14664360880851746, 0.03338161110877991, 0.04301172494888306, -0.05494607239961624, 0.025362424552440643, 0.0789417177438736, -0.28355973958969116, 0.31773626804351807, -0.05778227746486664, -0.16144585609436035, 0.0022137127816677094, 0.03513453155755997, 0.2733692526817322, 0.2544732391834259, 0.22265592217445374, -0.2782799005508423, 0.1700623482465744, 0.1421632021665573, 0.002985134720802307, -0.2562238574028015, 0.11488166451454163, 0.19599266350269318, -0.2400149405002594, -0.17107371985912323, 0.013555902987718582, -0.15981826186180115, -0.2139231115579605, -0.2937580347061157, 0.07416915148496628, -0.039152856916189194, -0.18130508065223694, 0.1689630150794983, 0.15697409212589264, 0.5245457291603088, -0.10359713435173035, -0.39034080505371094, -0.15903428196907043, -0.37678858637809753, -0.21828868985176086, 0.5397281646728516, -0.233607217669487, 0.41983479261398315, 0.19019216299057007, 0.3194679319858551, 0.1365189552307129, 0.1723022758960724, -0.01020791381597519, 0.26790371537208557, -0.35619282722473145, -0.012510936707258224, -0.3257850408554077, 0.013735331594944, 0.3418159782886505, -0.40552663803100586, 0.11922934651374817, -0.04591560363769531, 0.274530291557312, -0.029571903869509697, 0.28001824021339417, -0.1427263766527176, -0.3242396116256714, -0.18005895614624023, 0.18824003636837006, 0.16508397459983826, 0.09164212644100189, -0.10401317477226257, -0.06490101665258408, 0.0726395845413208, 0.07975473999977112, -0.319170206785202, -0.1337246596813202, 0.17870527505874634, -0.05195913463830948, 0.10320647060871124, -0.13492166996002197, -0.2764391303062439, -0.09956446290016174, 0.1253771185874939, 0.21703171730041504, 0.13953103125095367, -0.04220961779356003, 0.29685091972351074, 0.16065356135368347, -0.19001346826553345, -0.28032970428466797, 0.051736652851104736, 0.15328145027160645, -0.08545757830142975, -0.02980029582977295, -0.3573179841041565, 0.3734433650970459, -0.27946776151657104, -0.5567255616188049, 0.004627399146556854, 0.31021231412887573, 0.08030542731285095, -0.5342545509338379, -0.21909835934638977, -0.016147159039974213, 0.265755295753479, -0.0870399996638298, -0.11813035607337952, -0.055327415466308594, 0.006036117672920227, -0.02729254961013794, -0.013981133699417114, 0.4172568917274475, 0.10193270444869995, -0.022306352853775024, 0.0015317648649215698, -0.11779111623764038 ]
https://github.com/huggingface/datasets/issues/6552
This bug comes from the `huggingface_hub` library, see: https://github.com/huggingface/huggingface_hub/issues/1952 A fix is provided at https://github.com/huggingface/huggingface_hub/pull/1953. Feel free to install `huggingface_hub` from this PR, or wait for it to be merged and the new version of `huggingface_hub` to be released
Loading a dataset from Google Colab hangs at "Resolving data files".
### Describe the bug Hello, I'm trying to load a dataset from Google Colab but the process hangs at `Resolving data files`: ![image](https://github.com/huggingface/datasets/assets/99779/7175ad85-e571-46ed-9f87-92653985777d) It is happening when the `_get_origin_metadata` definition is invoked: ```python def _get_origin_metadata( data_files: List[str], max_workers=64, download_config: Optional[DownloadConfig] = None, ) -> Tuple[str]: return thread_map( partial(_get_single_origin_metadata, download_config=download_config), data_files, max_workers=max_workers, tqdm_class=hf_tqdm, desc="Resolving data files", disable=len(data_files) <= 16, ``` The thread is then stuck at `waiter.acquire()` in the builtin `threading.py` file. I can load the dataset just fine on my machine. Cheers, Thomas ### Steps to reproduce the bug In Google Colab: ```python !pip install datasets from datasets import load_dataset dataset = load_dataset("colour-science/color-checker-detection-dataset") ``` ### Expected behavior The dataset should be loaded. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
39
Loading a dataset from Google Colab hangs at "Resolving data files". ### Describe the bug Hello, I'm trying to load a dataset from Google Colab but the process hangs at `Resolving data files`: ![image](https://github.com/huggingface/datasets/assets/99779/7175ad85-e571-46ed-9f87-92653985777d) It is happening when the `_get_origin_metadata` definition is invoked: ```python def _get_origin_metadata( data_files: List[str], max_workers=64, download_config: Optional[DownloadConfig] = None, ) -> Tuple[str]: return thread_map( partial(_get_single_origin_metadata, download_config=download_config), data_files, max_workers=max_workers, tqdm_class=hf_tqdm, desc="Resolving data files", disable=len(data_files) <= 16, ``` The thread is then stuck at `waiter.acquire()` in the builtin `threading.py` file. I can load the dataset just fine on my machine. Cheers, Thomas ### Steps to reproduce the bug In Google Colab: ```python !pip install datasets from datasets import load_dataset dataset = load_dataset("colour-science/color-checker-detection-dataset") ``` ### Expected behavior The dataset should be loaded. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 This bug comes from the `huggingface_hub` library, see: https://github.com/huggingface/huggingface_hub/issues/1952 A fix is provided at https://github.com/huggingface/huggingface_hub/pull/1953. Feel free to install `huggingface_hub` from this PR, or wait for it to be merged and the new version of `huggingface_hub` to be released
[ -0.19339069724082947, -0.11780481040477753, 0.030356813222169876, 0.40891021490097046, 0.09424534440040588, -0.0761006623506546, 0.26371243596076965, 0.04111425578594208, 0.033734604716300964, 0.24775028228759766, -0.11173553764820099, 0.4329826235771179, 0.03821532055735588, -0.042721688747406006, -0.2304295301437378, 0.012850548140704632, -0.043758902698755264, 0.01593346893787384, 0.2468658685684204, 0.10732521116733551, -0.38393068313598633, 0.4550448954105377, -0.22813153266906738, -0.1521381139755249, -0.7041703462600708, -0.04670524597167969, 0.15998312830924988, 0.19870100915431976, -0.04649381712079048, -0.13025261461734772, 0.34376853704452515, 0.23903346061706543, -0.1411370187997818, 0.4385457932949066, -0.0001269387430511415, -0.05680036544799805, 0.5695585012435913, 0.2000839114189148, -0.2923889756202698, -0.35008659958839417, -0.3076998293399811, -0.007228698581457138, 0.2429504692554474, 0.11146606504917145, -0.13000288605690002, 0.45575565099716187, -0.038086794316768646, -0.11919459700584412, 0.1036716178059578, 0.033509448170661926, 0.0361592099070549, -0.0027647241950035095, -0.06089818850159645, -0.11561581492424011, -0.08882689476013184, -0.17126204073429108, -0.08507980406284332, 0.8751480579376221, 0.3692364990711212, -0.10913129150867462, -0.02553173527121544, 0.2658747136592865, -0.06310674548149109, 0.19969500601291656, 0.025223685428500175, 0.0465439073741436, -0.07157593965530396, -0.4535883665084839, 0.5070464015007019, 0.1770906299352646, 0.4470572769641876, 0.06093117967247963, -0.28069204092025757, -0.36819058656692505, 0.3246406614780426, -0.10741941630840302, 0.4512319266796112, 0.31158602237701416, -0.2526381015777588, 0.20236854255199432, -0.027145324274897575, -0.21344533562660217, -0.019353225827217102, -0.09370320290327072, -0.29401230812072754, 0.19613170623779297, -0.23776593804359436, 0.22371211647987366, 0.14673292636871338, 0.05509425699710846, 0.2878633737564087, -0.13471925258636475, 0.17308470606803894, 0.07525916397571564, -0.36308977007865906, 0.3386915326118469, 0.25507983565330505, 0.5801429152488708, 0.025435887277126312, 0.1246471181511879, -0.2192072868347168, 0.12454836070537567, -0.320833295583725, 0.20859193801879883, 0.19269755482673645, -0.20919258892536163, -0.0642065703868866, -0.19800451397895813, 0.4629349112510681, 0.20081165432929993, -0.20733493566513062, 0.08419844508171082, -0.1995636522769928, -0.27541065216064453, -0.2589922547340393, -0.019554657861590385, 0.32830846309661865, -0.24390524625778198, -0.05803203582763672, 0.05837935209274292, -0.33606162667274475, 0.25695979595184326, 0.2651255428791046, 0.41272401809692383, -0.41287684440612793, 0.18924160301685333, -0.02977607026696205, -0.11052305996417999, -0.2737932801246643, 0.1234440952539444, -0.07782028615474701, -0.05856001377105713, -0.060544975101947784, 0.1415451467037201, 0.23896192014217377, -0.47080036997795105, 0.26260024309158325, 0.18944205343723297, 0.2754988968372345, -0.22128966450691223, -0.028566744178533554, -0.4022781252861023, -0.09772142767906189, 0.42685186862945557, 0.07454020529985428, 0.2664381265640259, -0.12903116643428802, -0.12336793541908264, -0.1881662905216217, 0.02246040105819702, -0.3739396929740906, -0.07777699083089828, -0.05595420300960541, 0.014185144565999508, -0.33138322830200195, 0.24067404866218567, -0.5232260227203369, -0.06705594807863235, 0.01643291860818863, -0.0524819940328598, -0.015447694808244705, -0.2781343162059784, -0.3081851303577423, -0.2225123792886734, 0.08788494765758514, 0.5161378979682922, -0.098935566842556, 0.09655116498470306, -0.13863733410835266, -0.07929539680480957, 0.08537831902503967, 0.3047272562980652, -0.05613379552960396, -0.012518603354692459, -0.4314713478088379, 0.05760771036148071, -0.4367676079273224, -0.1614905595779419, -0.6511999368667603, 0.3178328275680542, -0.3619280457496643, 0.5175087451934814, 0.02963319420814514, -0.05488628149032593, -0.13040924072265625, -0.24162060022354126, 0.6349373459815979, 0.31913235783576965, -0.0946420207619667, 0.059031471610069275, -0.27488136291503906, 0.09077919274568558, -0.31433260440826416, 0.19247698783874512, -0.0515277199447155, 0.05620846524834633, -0.09096023440361023, -0.2670823931694031, 0.09102632105350494, 0.04561622068285942, -0.11242419481277466, 0.28899645805358887, 0.36377817392349243, 0.012791980989277363, 0.01875130832195282, 0.029684722423553467, -0.61436527967453, 0.4146064817905426, 0.3622590899467468, 0.1620754450559616, -0.49896860122680664, -0.16532427072525024, -0.1827024519443512, 0.21495532989501953, -0.17389844357967377, 0.20737719535827637, -0.16961264610290527, 0.06274320185184479, 0.015106365084648132, 0.32598644495010376, 0.062217652797698975, 0.7911404371261597, -0.09245318919420242, 0.09184704720973969, -0.34149685502052307, 0.4204937815666199, 0.1439446359872818, -0.10839155316352844, 0.07560256123542786, -0.010962922126054764, -0.044575560837984085, -0.22565695643424988, -0.017492767423391342, 0.11435182392597198, 0.18705317378044128, 0.2754371166229248, 0.13262292742729187, 0.29035311937332153, 0.2892889082431793, -0.11180543154478073, -0.10046414285898209, -0.16792306303977966, 0.1890181452035904, -0.11679846793413162, 0.12497668713331223, 0.38645580410957336, -0.30304792523384094, 0.2928522527217865, -0.06629671156406403, -0.040567390620708466, 0.46511632204055786, 0.1410476714372635, -0.19733381271362305, 0.04204414784908295, 0.4811251759529114, 0.25885239243507385, 0.4468638598918915, 0.21374104917049408, -0.4356875419616699, 0.24155710637569427, 0.42090392112731934, 0.019854046404361725, -0.1788800060749054, 0.12887850403785706, -0.04089174419641495, -0.08948491513729095, 0.24536627531051636, 0.08596451580524445, 0.3526385724544525, -0.01940322294831276, 0.13499592244625092, 0.20707587897777557, -0.08447928726673126, -0.3266070783138275, -0.15952305495738983, 0.21510502696037292, 0.3137548565864563, 0.18753226101398468, -0.04192016273736954, -0.005655327811837196, -0.06196443736553192, -0.32240015268325806, 0.060179293155670166, 0.2545469403266907, -0.19919662177562714, 0.23822492361068726, -0.4177466332912445, -0.03618903085589409, -0.18817082047462463, -0.2353762686252594, -0.3942389488220215, -0.34660112857818604, -0.35696130990982056, 0.5668365359306335, 0.1099240854382515, -0.07195810973644257, 0.21813538670539856, 0.24176517128944397, 0.02845129370689392, -0.20243629813194275, -0.29759782552719116, -0.36658456921577454, 0.1138562560081482, -0.14157161116600037, 0.4109190106391907, 0.02349531650543213, 0.2731533944606781, -0.17957201600074768, -0.09838436543941498, -0.09297623485326767, -0.15978538990020752, 0.28274667263031006, -0.14539065957069397, 0.5864458084106445, 0.14400945603847504, 0.11179406940937042, -0.3376292586326599, 0.13663342595100403, 0.005807109177112579, -0.03763182461261749, 0.019360356032848358, -0.266410768032074, -0.0651102066040039, 0.12813574075698853, -0.04433664679527283, 0.14821885526180267, -0.35744261741638184, -0.19929754734039307, 0.3744983673095703, -0.407474547624588, -0.022028282284736633, 0.343936949968338, -0.028433963656425476, 0.20670729875564575, 0.058357421308755875, -0.09733954071998596, -0.29494112730026245, -0.439816951751709, 0.15690097212791443, -0.18107780814170837, -0.23921000957489014, 0.06877094507217407, -0.2385074496269226, 0.22100980579853058, 0.11893065273761749, -0.36975646018981934, -0.3532240092754364, -0.2785857617855072, 0.1763005256652832, 0.011565640568733215, -0.11075030267238617, -0.059886861592531204, -0.08383296430110931, 0.15392130613327026, -0.004396349191665649, -0.21524706482887268, -0.1528269499540329, 0.1505643129348755, 0.0398760586977005, 0.2775181233882904, 0.24687133729457855, -0.16365483403205872, 0.3918459713459015, 0.12697122991085052, 0.26339972019195557, 0.06834717094898224, 0.11040360480546951, 0.2160191386938095, -0.172716423869133, -0.30028650164604187, 0.019095975905656815, -0.08211283385753632, -0.344927042722702, 0.22984124720096588, 0.08555248379707336, 0.05658816546201706, -0.15672947466373444, -0.21674279868602753, -0.3735675513744354, -0.4306051731109619, -0.0004975106567144394, 0.108537457883358, 0.1903100311756134, 0.09964302182197571, -0.004473835229873657, 0.032840415835380554, -0.06356525421142578, -0.07803180068731308, 0.46099239587783813, 0.24160370230674744, -0.16460254788398743, 0.23608370125293732, -0.4558071494102478, -0.5488191843032837, 0.144300639629364, 0.3657253682613373, 0.19440209865570068, -0.09125270694494247, 0.2668606638908386, 0.2925781309604645, -0.2601874768733978, 0.6352667808532715, 0.07728058099746704, 0.07146795094013214, 0.08828525990247726, -0.4169398248195648, -0.20943352580070496, 0.10869872570037842, 0.09469935297966003, 0.18457692861557007, 0.18968188762664795, 0.23225636780261993, -0.3019547462463379, -0.08700920641422272, 0.10191508382558823, 0.1371701955795288, -0.11993444710969925, -0.09301392734050751, -0.4032593369483948, -0.4593259394168854, -0.20824608206748962, 0.13137175142765045, 0.012313298881053925, 0.24383322894573212, -0.14883452653884888, -0.08261492848396301, 0.07922559231519699, -0.11859337240457535, 0.08127275109291077, 0.3208712041378021, -0.06482411175966263, 0.19135472178459167, 0.23345214128494263, 0.174928218126297, 0.03785473108291626, 0.4679396152496338, 0.7293875813484192, 0.1794099658727646, -0.2751320004463196, 0.11641182005405426, -0.03332165628671646, 0.175645112991333, 0.40128493309020996, -0.20771002769470215, -0.021623853594064713, -0.2145477831363678, 0.08163172006607056, -0.20944775640964508, 0.44483768939971924, -0.06952076405286789, 0.23087963461875916, -0.6138709783554077, -0.1602599322795868, 0.6225003004074097, 0.26182714104652405, -0.16142432391643524, 0.45093226432800293, 0.18889561295509338, -0.037963733077049255, -0.11005645990371704, -0.02317274734377861, 0.755856990814209, -0.17841961979866028, -0.20006604492664337, 0.32386162877082825, -0.2181050181388855, 0.41948413848876953, -0.006435170769691467, 0.1720123440027237, -0.2861831784248352, -0.4394417405128479, -0.004526406526565552, -0.2047424167394638, 0.07647599279880524, -0.03679123520851135, 0.010423541069030762, 0.08058863133192062, 0.06335559487342834, 0.07246527820825577, 0.11220159381628036, 0.2340640425682068, -0.22986842691898346, -0.34375178813934326, -0.5078316330909729, 0.0260532908141613, -0.31733620166778564, 0.37608200311660767, -0.27050676941871643, 0.14239327609539032, -0.252634197473526, 0.052632808685302734, -0.217529758810997, 0.19092407822608948, -0.07517096400260925, 0.009701352566480637, 0.06946802884340286, -0.21830204129219055, 0.1079682856798172, -0.3905891180038452, -0.035193510353565216, 0.114578977227211, -0.22681981325149536, 0.3165936768054962, -0.1352219432592392, -0.21610456705093384, 0.2034042477607727, -0.1123804822564125, 0.22545744478702545, 0.06543916463851929, 0.05043928325176239, -0.13654592633247375, -0.05261608213186264, -0.23689258098602295, 0.12555409967899323, 0.1980123072862625, -0.20415282249450684, 0.2930924892425537, -0.3103741705417633, 0.0714026540517807, 0.18472619354724884, -0.153564915060997, 0.015814486891031265, 0.20249208807945251, -0.08326084911823273, 0.2546249330043793, -0.06097085028886795, -0.3116760849952698, -0.11461974680423737, 0.6102808713912964, -0.1035604178905487, -0.245884507894516, 0.34657347202301025, 0.35207629203796387, -0.20913366973400116, -0.07320691645145416, -0.11660328507423401, -0.13996845483779907, -0.4940503239631653, 0.4364132285118103, 0.1476283073425293, 0.12242782115936279, 0.013908956199884415, 0.10217718780040741, 0.2585360109806061, -0.3236789405345917, 0.030100017786026, -0.6159478425979614, -0.25105994939804077, 0.07061527669429779, -0.2967684864997864, 0.02930578961968422, 0.1228676438331604, 0.13382424414157867, -0.02255069464445114, -0.09148439764976501, -0.12248868495225906, 0.03366252779960632, -0.5499287843704224, -0.09774389863014221, 0.4231990575790405, -0.031126853078603745, 0.23840761184692383, -0.028671378269791603, -0.05517023801803589, 0.2906668186187744, 0.06960976123809814, -0.089566670358181, -0.11298425495624542, 0.17739194631576538, -0.009380053728818893, -0.04158279299736023, 0.03459223359823227, -0.23566530644893646, 0.03172603249549866, -0.0630752295255661, 0.5166410803794861, 0.1959581822156906, 0.13958074152469635, -0.280792772769928, 0.15977585315704346, 0.3067065179347992, 0.03637615591287613, 0.3845294713973999, 0.12601616978645325, 0.2706332802772522, 0.19540494680404663, 0.038309451192617416, -0.06998072564601898, 0.12162245810031891, 0.16183102130889893, 0.027792010456323624, 0.03684328496456146, -0.17067119479179382, 0.4266638159751892, -0.2733386754989624, 0.20745378732681274, 0.09200435876846313, 0.21808362007141113, 0.3145008981227875, 0.05525151640176773, -0.2966686189174652, 0.28190645575523376, 0.011759152635931969, -0.06484115123748779, -0.029442276805639267, 0.36315369606018066, 0.1851731389760971, -0.13487958908081055, 0.21116721630096436, 0.1586519032716751, 0.2862701714038849, -0.0588390976190567, 0.25614073872566223, 0.43633201718330383, 0.294546902179718, -0.08351235836744308, 0.1174595057964325, 0.11163246631622314, 0.3661653399467468, 0.33091336488723755, 0.2357410043478012, 0.19662538170814514, 0.2311645746231079, -0.018378138542175293, 0.14075057208538055, -0.24366500973701477, 0.36592695116996765, 0.2381429523229599, -0.6353718638420105, -0.316069632768631, 0.1443914771080017, -0.2535167634487152, 0.010496138595044613, -0.09790312498807907, 0.2141505777835846, -0.4794400930404663, -0.09796737134456635, -0.20441320538520813, 0.5043331384658813, -0.1734079271554947, -0.0928163155913353, 0.26771658658981323, 0.003291413187980652, -0.10535967350006104, 0.2098260074853897, -0.010852995328605175, -0.04516807571053505, 0.12745489180088043, 0.19051705300807953, -0.036880962550640106, -0.2007717788219452, -0.25459983944892883, 0.09346778690814972, 0.06524495780467987, -0.09868555516004562, 0.11149755865335464, -0.1665172427892685, 0.06729711592197418, -0.13346250355243683, 0.005827600136399269, 0.24199679493904114, 0.16664136946201324, -0.2412295788526535, -0.296644389629364, -0.03286007419228554, 0.24105264246463776, -0.05943286046385765, 0.3287959396839142, 0.11584551632404327, 0.04713347554206848, 0.2730993628501892, -0.041666094213724136, -0.10984571278095245, 0.02503766119480133, -0.0005467105656862259, 0.3110560476779938, -0.19638025760650635, 0.16126933693885803, -0.2976031005382538, 0.15282119810581207, -0.17907601594924927, 0.22892330586910248, -0.3403470814228058, 0.12981872260570526, 0.26083576679229736, -0.21404045820236206, -0.1765131950378418, 0.05520869046449661, -0.025143248960375786, -0.20956003665924072, 0.5693018436431885, 0.53130704164505, 0.5328185558319092, -0.29522547125816345, -0.3458600640296936, -0.5491938591003418, 0.10142812132835388, 0.07995832711458206, -0.005547560751438141, -0.027462277561426163, 0.08528943359851837, -0.15531319379806519, 0.21541018784046173, -0.37764883041381836, -0.003043033182621002, 0.3447684049606323, 0.06029647961258888, -0.010061636567115784, -0.1508512794971466, -0.1666150838136673, -0.5757185220718384, -0.20464053750038147, -0.30337679386138916, 0.06169793754816055, -0.29224246740341187, -0.11904394626617432, -0.16542133688926697, -0.2768603563308716, -0.10279024392366409, -0.1276375949382782, 0.4159373939037323, 0.22579683363437653, 0.2207615226507187, 0.07325441390275955, -0.04094831645488739, -0.19595886766910553, -0.23986774682998657, 0.12163740396499634, 0.0804448202252388, -0.12480435520410538, 0.3816547989845276, 0.04070720076560974, 0.31046581268310547, -0.29529163241386414, 0.12104153633117676, -0.04927407205104828, 0.16167953610420227, -0.10580842941999435, -0.05076979473233223, -0.3514516353607178, 0.23054499924182892, -0.12603068351745605, 0.4078757166862488, 0.10796216130256653, 0.3029501140117645, -0.20140139758586884, -0.1902635544538498, 0.5233443975448608, -0.24768657982349396, -0.3668655455112457, 0.0697583481669426, 0.2336341291666031, -0.11664895713329315, -0.4827856123447418, -0.19678029417991638, 0.03073228895664215, 0.07652804255485535, -0.08612152934074402, -0.29760634899139404, 0.20744441449642181, 0.07260257005691528, 0.06607681512832642, -0.1800796389579773, -0.04958553984761238, 0.05074702575802803, -0.09016107767820358, 0.0054726749658584595, -0.06759849190711975 ]
https://github.com/huggingface/datasets/issues/6549
Maybe we can add a helper message like `Maybe try again using "hf://path/without/resolve"` if the path contains `/resolve/` ? e.g. ``` FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json' It looks like you used parts of the URL of the file from the Hugging Face website, but you should remove the "/resolve/<revision>" part to have a valid `hf://` path. Please try again using this path instead: hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json ``` and suggest `f"hf://datasets/HuggingFaceTB/eval_data@{revision}/eval_data_context_and_answers.json"` if revision != "main" EDIT: I think this message should also be raised from the `huggingface_hub`'s `HfFileSystem` implementation
Loading from hf hub with clearer error message
### Feature request Shouldn't this kinda work ? ``` Dataset.from_json("hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json") ``` I got an error ``` File ~/miniconda3/envs/datatrove/lib/python3.10/site-packages/datasets/data_files.py:380, in resolve_pattern(pattern, base_path, allowed_extensions, download_config) 378 if allowed_extensions is not None: 379 error_msg += f" with any supported extension {list(allowed_extensions)}" --> 380 raise FileNotFoundError(error_msg) 381 return out FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json' (I'm logged in) ``` Fix: the correct path is ``` hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json ``` Proposal: raise a clearer error ### Motivation Clearer error message ### Your contribution Can open a PR
86
Loading from hf hub with clearer error message ### Feature request Shouldn't this kinda work ? ``` Dataset.from_json("hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json") ``` I got an error ``` File ~/miniconda3/envs/datatrove/lib/python3.10/site-packages/datasets/data_files.py:380, in resolve_pattern(pattern, base_path, allowed_extensions, download_config) 378 if allowed_extensions is not None: 379 error_msg += f" with any supported extension {list(allowed_extensions)}" --> 380 raise FileNotFoundError(error_msg) 381 return out FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json' (I'm logged in) ``` Fix: the correct path is ``` hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json ``` Proposal: raise a clearer error ### Motivation Clearer error message ### Your contribution Can open a PR Maybe we can add a helper message like `Maybe try again using "hf://path/without/resolve"` if the path contains `/resolve/` ? e.g. ``` FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json' It looks like you used parts of the URL of the file from the Hugging Face website, but you should remove the "/resolve/<revision>" part to have a valid `hf://` path. Please try again using this path instead: hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json ``` and suggest `f"hf://datasets/HuggingFaceTB/eval_data@{revision}/eval_data_context_and_answers.json"` if revision != "main" EDIT: I think this message should also be raised from the `huggingface_hub`'s `HfFileSystem` implementation
[ 0.2066141963005066, -0.25089403986930847, 0.036134351044893265, 0.32898765802383423, 0.2908268868923187, -0.08821091055870056, 0.07552556693553925, 0.5636864900588989, 0.05773176997900009, 0.033721961081027985, -0.17770984768867493, 0.16017961502075195, 0.1350436508655548, 0.17397338151931763, -0.09642903506755829, -0.12948133051395416, -0.13553878664970398, 0.16222324967384338, 0.17621992528438568, -0.1518477201461792, -0.20246322453022003, 0.19416673481464386, -0.011352278292179108, 0.24014639854431152, -0.37350958585739136, 0.021543631330132484, -0.022986963391304016, 0.6334507465362549, -0.0630318745970726, -0.517019510269165, 0.18978486955165863, -0.013353485614061356, 0.32982802391052246, 0.2631840407848358, -0.00011403964890632778, 0.04455725848674774, 0.459983229637146, 0.009953714907169342, -0.3632204532623291, -0.26605483889579773, -0.22306597232818604, -0.2671535015106201, 0.16376963257789612, -0.1137295737862587, -0.12874649465084076, -0.1476796567440033, -0.0301969051361084, 0.1252811849117279, 0.5932833552360535, 0.2104497253894806, 0.15682728588581085, 0.442264199256897, -0.022849224507808685, -0.24203082919120789, 0.22624173760414124, 0.4215611219406128, 0.05190734565258026, 0.2504330277442932, -0.03618302568793297, -0.20886151492595673, -0.06717287003993988, 0.16453410685062408, -0.09254904091358185, 0.04108535498380661, 0.5331271886825562, -0.10700301826000214, 0.037280719727277756, -0.20592160522937775, 0.009019944816827774, 0.302013099193573, 0.3755563795566559, 0.01847037672996521, -0.20179659128189087, -0.3970929980278015, -0.18323859572410583, 0.23885376751422882, 0.26630187034606934, -0.013336455449461937, -0.1577957570552826, 0.10538338124752045, 0.26722609996795654, -0.42450660467147827, -0.11689602583646774, 0.20956715941429138, -0.17073841392993927, 0.2111472338438034, -0.08622206747531891, 0.024348553270101547, 0.12893015146255493, -0.17671671509742737, -0.0482323132455349, -0.03618809953331947, -0.07627394050359726, 0.23460374772548676, -0.3003852367401123, -0.11627379804849625, 0.26177871227264404, -0.11505906283855438, 0.25135934352874756, 0.1334916353225708, -0.059863947331905365, 0.049490440636873245, -0.31800758838653564, -0.043884001672267914, 0.20211967825889587, 0.24623669683933258, 0.21482059359550476, -0.04748708754777908, 0.23072397708892822, 0.3871362507343292, 0.1808134913444519, 0.00463505182415247, -0.1904579997062683, -0.19329825043678284, -0.6110118627548218, -0.002024739980697632, 0.11260974407196045, -0.2815755307674408, -0.3192577362060547, 0.10294413566589355, -0.10731219500303268, -0.2037772834300995, 0.17938551306724548, 0.6842281222343445, 0.0014536939561367035, 0.282239705324173, 0.012568451464176178, 0.025711946189403534, -0.19236549735069275, -0.05198189616203308, -0.19238202273845673, 0.10480640828609467, -0.24438664317131042, 0.14795438945293427, 0.16788366436958313, -0.19018030166625977, 0.1798090934753418, -0.1721704751253128, 0.1917814314365387, -0.07762478291988373, -0.17801403999328613, -0.0887879952788353, 0.15558072924613953, 0.09339703619480133, -0.12277141213417053, 0.19513148069381714, 0.4587559103965759, -0.12949252128601074, -0.16335174441337585, -0.03564867749810219, -0.37892067432403564, -0.42030879855155945, -0.23619835078716278, 0.138254314661026, -0.19553163647651672, 0.09736032783985138, -0.14679040014743805, -0.1779344379901886, -0.3598129451274872, 0.07357807457447052, 0.016191840171813965, 0.19575154781341553, 0.1283450722694397, -0.265047550201416, 0.33446621894836426, 0.5727850794792175, -0.10760656744241714, -0.2285817563533783, -0.13073453307151794, -0.1754510998725891, -0.1743897646665573, 0.318279504776001, -0.2588188350200653, 0.3275199830532074, -0.5621041059494019, 0.33024710416793823, 0.017058048397302628, -0.6066382527351379, -0.2349262535572052, 0.6144328713417053, -0.4163050055503845, 0.17195770144462585, 0.13689377903938293, -0.13406333327293396, -0.11299510300159454, -0.1579338014125824, 0.18486016988754272, 0.07265119254589081, 0.41431957483291626, -0.031305212527513504, -0.33004847168922424, -0.18280604481697083, -0.133100688457489, 0.295198917388916, -0.029214588925242424, 0.12107519805431366, 0.20721028745174408, -0.039162635803222656, 0.4826478362083435, -0.07413531839847565, -0.09988230466842651, 0.3372790515422821, 0.3783990144729614, 0.244778573513031, -0.014615006744861603, 0.10865519940853119, -0.3382781744003296, 0.15850937366485596, -0.2081359624862671, 0.10828752815723419, -0.2679327428340912, -0.19713462889194489, -0.44106525182724, -0.13522207736968994, -0.24932333827018738, -0.19345971941947937, 0.08984872698783875, 0.09944033622741699, -0.10140302777290344, -0.11331354081630707, -0.2486794888973236, 0.707537829875946, -0.13571880757808685, 0.1645197868347168, -0.35224178433418274, 0.606278121471405, -0.06186981499195099, 0.14151765406131744, 0.0204327329993248, 0.163821280002594, 0.36464381217956543, -0.05559350550174713, -0.019801953807473183, 0.2930327355861664, -0.03306252136826515, 0.16046921908855438, 0.15380457043647766, -0.10961593687534332, 0.152887761592865, -0.3028021454811096, 0.09705185145139694, -0.0007383972406387329, -0.027775507420301437, 0.2595195770263672, 0.009867865592241287, 0.26089999079704285, -0.07916126400232315, 0.25150519609451294, 0.248921737074852, -0.17266055941581726, 0.14039377868175507, -0.07969274371862411, -0.07272495329380035, -0.4263419210910797, 0.31983324885368347, 0.51454097032547, -0.006882756948471069, -0.017344817519187927, 0.07724784314632416, 0.06638814508914948, 0.5439707636833191, -0.07628057897090912, 0.01297443825751543, 0.3445917069911957, -0.13031375408172607, 0.11949774622917175, 0.22980797290802002, 0.1844991147518158, 0.2055988311767578, 0.2575280964374542, -0.2565537095069885, 0.23447977006435394, -0.030084149911999702, -0.07659518718719482, 0.15086433291435242, -0.029457174241542816, 0.20644305646419525, 0.25486668944358826, -0.15448340773582458, 0.0066485218703746796, -0.2955394387245178, -0.4814037084579468, -0.193430095911026, 0.09775190055370331, -0.4482054114341736, -0.3507227301597595, -0.35715538263320923, -0.14724476635456085, 0.12511330842971802, -0.10959100723266602, -0.5096405744552612, -0.27322977781295776, 0.015343807637691498, 0.08704336732625961, -0.1431116908788681, -0.009708913043141365, -0.02285923808813095, 0.28443068265914917, -0.24618056416511536, -0.19488221406936646, -0.3163052201271057, -0.10446189343929291, -0.15167632699012756, -0.005024947226047516, 0.08978605270385742, 0.12782903015613556, 0.010798379778862, -0.530318021774292, 0.04063796252012253, -0.4123404920101166, -0.2918678820133209, 0.28555434942245483, -0.1266050636768341, 0.3037024736404419, 0.30761414766311646, 0.3299410939216614, -0.15289625525474548, -0.16888222098350525, 0.3408185541629791, 0.037387169897556305, -0.24226458370685577, -0.026245929300785065, 0.07000355422496796, 0.17405441403388977, -0.004754364490509033, -0.18761207163333893, -0.1473904848098755, -0.5593529343605042, 0.31353816390037537, -0.07015538215637207, 0.28087007999420166, 0.22379657626152039, -0.1090126484632492, 0.20244944095611572, -0.34871748089790344, 0.07868354022502899, -0.2896488904953003, -0.2159341275691986, 0.24163039028644562, -0.24878710508346558, -0.16645942628383636, 0.08324538171291351, -0.03094310313463211, 0.15974712371826172, -0.41081464290618896, -0.5225210189819336, -0.43782031536102295, -0.12065733969211578, 0.3757627010345459, -0.31552767753601074, 0.17004422843456268, 0.21818530559539795, -0.06413782387971878, -0.06059823930263519, -0.005516648292541504, -0.2751883566379547, 0.0034866146743297577, 0.23763549327850342, 0.22489744424819946, -0.09168755263090134, 0.22281834483146667, 0.06272026896476746, 0.24972736835479736, 0.17164212465286255, 0.20723287761211395, 0.6130858659744263, 0.14620879292488098, 0.380118727684021, -0.09634946286678314, -0.2267838418483734, -0.11880407482385635, 0.022405259311199188, 0.0355786457657814, 0.14631059765815735, 0.24365952610969543, 0.4467414319515228, -0.24362263083457947, -0.527906596660614, -0.35905200242996216, -0.3234812021255493, -0.06423186510801315, 0.11215269565582275, 0.04589361324906349, -0.06197416037321091, 0.11932787299156189, -0.1946650743484497, 0.05509461462497711, 0.3543142080307007, 0.5524305105209351, 0.3355589509010315, -0.06371300667524338, -0.22537851333618164, -0.41331028938293457, -0.18758724629878998, 0.40964892506599426, 0.10035348683595657, 0.12092185765504837, -0.25862637162208557, -0.10539872199296951, 0.044068343937397, -0.22020284831523895, 0.994071900844574, -0.032416172325611115, 0.18842391669750214, 0.031987980008125305, -0.03342938795685768, -0.3527272045612335, 0.15017753839492798, 0.16564452648162842, -0.04070069640874863, -0.32981252670288086, 0.5646959543228149, -0.4103497266769409, -0.5373265743255615, 0.000145692378282547, -0.08584985136985779, -0.0008361786603927612, -0.18709875643253326, -0.22693714499473572, -0.3641725182533264, -0.546733558177948, -0.20632469654083252, 0.07789402455091476, 0.10046358406543732, -0.02510569989681244, -0.03284763917326927, 0.28533026576042175, -0.07252959907054901, 0.06377939134836197, 0.19127488136291504, 0.41108331084251404, 0.06859806925058365, -0.10910743474960327, 0.3169892430305481, 0.3288344144821167, 0.3479641079902649, 0.6631423234939575, 0.03101789578795433, -0.13617172837257385, 0.10091979056596756, 0.11394612491130829, 0.088530033826828, 0.5355656743049622, 0.08991552144289017, 0.23339158296585083, 0.19145971536636353, 0.4146587550640106, -0.4278704822063446, 0.10786613821983337, 0.2576243579387665, -0.19957305490970612, -0.21360161900520325, -0.05039886757731438, 0.4777824580669403, -0.04340672492980957, -0.04067827761173248, 0.12363871186971664, 0.669151782989502, -0.12919864058494568, 0.24421623349189758, -0.0153401680290699, 1.0900003910064697, 0.06746774166822433, 0.3101046681404114, 0.34869521856307983, -0.14420728385448456, 0.4346948564052582, -0.43330132961273193, 0.15131720900535583, -0.264888197183609, -0.17715434730052948, -0.12329818308353424, -0.18146207928657532, 0.051140494644641876, 0.14716969430446625, -0.025932542979717255, 0.0993121862411499, -0.09457777440547943, 0.377863347530365, 0.006770189851522446, 0.44400352239608765, -0.4133583605289459, -0.15584762394428253, -0.651343822479248, 0.10559810698032379, -0.08985041826963425, 0.3169582784175873, -0.13814310729503632, -0.14218670129776, -0.18547075986862183, -0.3692720830440521, -0.037825413048267365, 0.1821170300245285, 0.06844013929367065, -0.020750422030687332, 0.18895170092582703, 0.11773256957530975, 0.10249093174934387, -0.18955528736114502, 0.20898061990737915, 0.12970861792564392, -0.1873287558555603, 0.1516948789358139, -0.05760796740651131, -0.025673799216747284, -0.05405260622501373, -0.02263600379228592, 0.2044667899608612, -0.11592915654182434, -0.56685471534729, 0.14999541640281677, -0.2052503079175949, -0.3117794394493103, -0.19727560877799988, 0.0813906341791153, -0.2201247662305832, -0.0787690132856369, -0.015981417149305344, 0.20792683959007263, -0.14416015148162842, -0.11824784427881241, 0.10940449684858322, 0.05059824511408806, -0.17889225482940674, -0.23547998070716858, 0.3509202003479004, -0.31265488266944885, -0.04686063528060913, 0.42121726274490356, -0.176515594124794, -0.11071648448705673, 0.4182492196559906, 0.18230071663856506, -0.19679641723632812, -0.33396124839782715, 0.19008809328079224, 0.33535152673721313, -0.33243846893310547, 0.05872581526637077, 0.15037035942077637, -0.2256959080696106, -0.1883566975593567, 0.144553080201149, 0.3583604097366333, -0.06873731315135956, -0.06475585699081421, -0.5050719380378723, -0.3106171786785126, 0.5835089087486267, -0.48149070143699646, 0.02005133591592312, 0.1757650375366211, 0.23126594722270966, -0.17650198936462402, -0.18817688524723053, -0.3364153504371643, 0.16430923342704773, -0.13057343661785126, -0.12701810896396637, -0.21838054060935974, -0.08497592806816101, 0.3681676387786865, -0.1310950219631195, 0.10874510556459427, 0.24181659519672394, -0.32744866609573364, -0.1550309956073761, -0.07313796132802963, 0.20616045594215393, 0.07827896624803543, -0.12048596888780594, -0.07240631431341171, -0.16208311915397644, 0.15772877633571625, -0.025783874094486237, 0.30444037914276123, 0.19988083839416504, 0.09819366037845612, 0.054994624108076096, 0.03163502365350723, -0.2636242210865021, -0.2427596002817154, 0.09856139868497849, 0.20702533423900604, 0.475267231464386, 0.01836216077208519, -0.08600080013275146, -0.5346882939338684, 0.12966793775558472, -0.04356618598103523, 0.31981009244918823, 0.16104954481124878, 0.18750181794166565, 0.16489633917808533, -0.13172373175621033, -0.22337014973163605, -0.3796042203903198, 0.23168152570724487, 0.1467997133731842, -0.24031579494476318, -0.0158001147210598, 0.33460697531700134, 0.15681856870651245, -0.1441623568534851, -0.04843327775597572, 0.17105844616889954, -0.28065726161003113, 0.16837182641029358, 0.1620335876941681, 0.16976086795330048, 0.13682147860527039, 0.22161605954170227, 0.17000862956047058, 0.47805482149124146, 0.09806333482265472, 0.054273806512355804, 0.5369964241981506, -0.22478529810905457, 0.02069341205060482, 0.31515824794769287, 0.023186393082141876, 0.2878071367740631, 0.19984742999076843, -0.12406037747859955, 0.049402207136154175, -0.17918622493743896, 0.4634875953197479, 0.0940602719783783, -0.4963024854660034, -0.018726063892245293, 0.2080591320991516, 0.15462559461593628, -0.08286631107330322, -0.25310635566711426, 0.034537769854068756, -0.11679204553365707, -0.12286531925201416, -0.16081847250461578, 0.11461007595062256, -0.10830223560333252, 0.07965867966413498, -0.21229733526706696, -0.2952439785003662, -0.38201791048049927, -0.17698067426681519, -0.05923838913440704, -0.45178619027137756, -0.15102872252464294, 0.0303427092730999, -0.03886331617832184, -0.1545947790145874, 0.18910473585128784, 0.14952367544174194, 0.3447432816028595, -0.10036180913448334, 0.3246620297431946, 0.08828435838222504, 0.09157176315784454, 0.1947198510169983, 0.12001696974039078, 0.3526243269443512, 0.3079725205898285, -0.13431453704833984, -0.1963474154472351, 0.02705647423863411, -0.04463549703359604, 0.07942000031471252, 0.02067546173930168, -0.05180938169360161, -0.08834706246852875, 0.19354037940502167, 0.22610917687416077, -0.22496512532234192, 0.06804731488227844, -0.17503663897514343, 0.31557732820510864, -0.06211918964982033, 0.5107344388961792, -0.08552797883749008, 0.19244390726089478, 0.08258722722530365, -0.1572793424129486, -0.5494800806045532, 0.022800467908382416, 0.353951096534729, -0.1160048395395279, 0.15660922229290009, -0.05619174987077713, 0.09668529033660889, -0.12373608350753784, 0.2865673303604126, 0.43208611011505127, 0.15731462836265564, -0.2097426801919937, -0.08339184522628784, -0.42609894275665283, 0.027979858219623566, -0.05410093814134598, -0.255169540643692, 0.28977978229522705, -0.10300381481647491, 0.11044836044311523, -0.0727270245552063, 0.37227657437324524, -0.10459518432617188, 0.15780454874038696, -0.143904909491539, -0.12264951318502426, 0.03590227663516998, 0.10278576612472534, 0.2586720883846283, 0.05196534842252731, -0.2401839643716812, 0.1558055579662323, 0.4292565584182739, -0.06312155723571777, -0.01067366823554039, 0.0889509916305542, 0.029477648437023163, -0.42285680770874023, 0.4284883439540863, 0.08442699164152145, -0.006323918700218201, -0.25189584493637085, -0.41307374835014343, -0.15525062382221222, -0.23514527082443237, -0.10075749456882477, 0.12447954714298248, -0.00016645807772874832, 0.562614917755127, 0.02568824589252472, -0.0937042236328125, -0.4162372648715973, 0.0410638302564621, -0.07265526056289673, 0.19562050700187683, -0.3371579051017761, 0.15109091997146606, -0.08553396910429001, -0.10766246914863586, -0.04613887891173363, 0.17805710434913635, 0.03131692484021187, 0.22935518622398376, -0.19764328002929688, -0.1033753901720047, 0.8141106367111206, -0.09824956953525543, -0.24989798665046692, 0.28521156311035156, 0.3185369670391083, -0.1324956715106964, -0.2449130266904831, -0.34330838918685913, 0.04844839870929718, 0.2937372624874115, 0.3664351999759674, -0.17089402675628662, 0.07071150094270706, -0.28482624888420105, -0.239505797624588, 0.01717226952314377, -0.13904976844787598, 0.0709979459643364, -0.2669731080532074, 0.040502019226551056, -0.19217076897621155 ]
https://github.com/huggingface/datasets/issues/6548
It looks like a transient DNS issue. It should work fine now if you try again. There is no parameter in load_dataset to skip failed downloads. In your case it would have skipped every single subsequent download until the DNS issue was resolved anyway.
Skip if a dataset has issues
### Describe the bug Hello everyone, I'm using **load_datasets** from **huggingface** to download the datasets and I'm facing an issue, the download starts but it reaches some state and then fails with the following error: Couldn't reach https://huggingface.co/datasets/wikimedia/wikipedia/resolve/4cb9b0d719291f1a10f96f67d609c5d442980dc9/20231101.ext/train-00000-of-00001.parquet Failed to resolve \'huggingface.co\' ([Errno -3] Temporary failure in name resolution)"))'))) ![image](https://github.com/huggingface/datasets/assets/143214684/8847d9cb-529e-4eda-9c76-282713dfa3af) so I was wondering is there a parameter to be passed to load_dataset() to skip files that can't be downloaded?? ### Steps to reproduce the bug Parameter to be passed to load_dataset() of huggingface to skip files that can't be downloaded?? ### Expected behavior load_dataset() finishes without error ### Environment info None
44
Skip if a dataset has issues ### Describe the bug Hello everyone, I'm using **load_datasets** from **huggingface** to download the datasets and I'm facing an issue, the download starts but it reaches some state and then fails with the following error: Couldn't reach https://huggingface.co/datasets/wikimedia/wikipedia/resolve/4cb9b0d719291f1a10f96f67d609c5d442980dc9/20231101.ext/train-00000-of-00001.parquet Failed to resolve \'huggingface.co\' ([Errno -3] Temporary failure in name resolution)"))'))) ![image](https://github.com/huggingface/datasets/assets/143214684/8847d9cb-529e-4eda-9c76-282713dfa3af) so I was wondering is there a parameter to be passed to load_dataset() to skip files that can't be downloaded?? ### Steps to reproduce the bug Parameter to be passed to load_dataset() of huggingface to skip files that can't be downloaded?? ### Expected behavior load_dataset() finishes without error ### Environment info None It looks like a transient DNS issue. It should work fine now if you try again. There is no parameter in load_dataset to skip failed downloads. In your case it would have skipped every single subsequent download until the DNS issue was resolved anyway.
[ -0.13599760830402374, -0.5338322520256042, 0.022321894764900208, 0.3548619747161865, 0.3999386727809906, 0.1268061101436615, -0.14067818224430084, 0.225484237074852, 0.08940277248620987, 0.32972007989883423, 0.442242830991745, 0.13631854951381683, 0.05722906067967415, -0.06314912438392639, 0.03930748626589775, -0.35949647426605225, -0.05967642366886139, -0.19714488089084625, 0.17616939544677734, 0.03355784714221954, -0.3888697326183319, 0.08049460500478745, -0.23562383651733398, -0.18730926513671875, 0.0008560679852962494, 0.11168979108333588, -0.23938870429992676, 0.23613949120044708, 0.14922228455543518, -0.17057573795318604, 0.36317363381385803, 0.1948644071817398, 0.12913919985294342, 0.2552095353603363, -0.00013071585271973163, 0.18803846836090088, 0.5161857008934021, -0.20932897925376892, -0.1226147785782814, -0.2190382480621338, -0.3479500412940979, 0.09258870780467987, -0.2288116216659546, -0.2540718615055084, 0.06860395520925522, 0.07047605514526367, 0.11428539454936981, -0.308820903301239, 0.407626748085022, 0.08516910672187805, 0.04670583829283714, 0.36667129397392273, -0.23207882046699524, 0.013091795146465302, 0.1679815948009491, 0.16639408469200134, -0.0009215399622917175, 0.4665100872516632, 0.23230165243148804, 0.16957229375839233, 0.05598188564181328, 0.3295704424381256, -0.15340261161327362, 0.004159174859523773, 0.38363614678382874, -0.05659857392311096, 0.18635840713977814, -0.14482097327709198, 0.12522999942302704, 0.3089565932750702, 0.30512532591819763, -0.006822480820119381, -0.48777711391448975, -0.5642255544662476, 0.15530745685100555, -0.3822777569293976, 0.4286803603172302, -0.21324241161346436, -0.216594398021698, 0.24223145842552185, -0.20910987257957458, -0.32276231050491333, -0.3328797221183777, 0.1378929316997528, 0.034058280289173126, -0.15766014158725739, -0.151523157954216, 0.13574744760990143, 0.3485889136791229, 0.16923357546329498, -0.28992778062820435, -0.223719522356987, 0.21337196230888367, 0.20982004702091217, -0.2627715766429901, -0.224584698677063, -0.14719250798225403, 0.4523785710334778, 0.3002511262893677, 0.18119114637374878, 0.03522449731826782, -0.0010751774534583092, 0.2841556668281555, 0.15064479410648346, 0.16810593008995056, -0.2814391553401947, 0.23809503018856049, 0.2336827516555786, 0.32985973358154297, 0.4465157687664032, 0.07367025315761566, -0.016056831926107407, -0.050981562584638596, -0.13576269149780273, -0.11820779740810394, 0.022766005247831345, 0.4430803656578064, -0.3404483199119568, -0.25736743211746216, 0.09192968159914017, -0.07618828862905502, -0.05705008655786514, 0.10436435788869858, 0.462199866771698, -0.19110244512557983, 0.09834431111812592, -0.27070003747940063, 0.17144255340099335, -0.004411522299051285, -0.01063598319888115, -0.02497091144323349, -0.24305695295333862, -0.11217878758907318, 0.3188759684562683, 0.31847429275512695, -0.2868279218673706, 0.26937466859817505, -0.22356797754764557, -0.07565829157829285, 0.04316737502813339, 0.14664585888385773, 0.023503262549638748, -0.17842358350753784, 0.29882535338401794, -0.10329900681972504, 0.1522650271654129, 0.06566160172224045, 0.17680415511131287, -0.021795444190502167, 0.32322192192077637, -0.18056821823120117, -0.3190133571624756, 0.24041102826595306, -0.022402886301279068, -0.1630743443965912, 0.10675914585590363, -0.29496461153030396, 0.21599876880645752, 0.06456486135721207, -0.15229302644729614, 0.01956484466791153, 0.19805899262428284, -0.3644202947616577, -0.10513322055339813, 0.32564371824264526, 0.7947787046432495, -0.22364377975463867, -0.4865487515926361, -0.1998109519481659, -0.35397619009017944, 0.11536917090415955, 0.0821266621351242, 0.07704810798168182, -0.23974309861660004, -0.3225586414337158, 0.12388773262500763, 0.16631245613098145, -0.3255876302719116, -0.2592347264289856, 0.07184674590826035, -0.27715617418289185, 0.1426992416381836, 0.3149312138557434, 0.04715478792786598, 0.08428748697042465, -0.1813109666109085, 0.07418873906135559, 0.30596065521240234, -0.31875553727149963, -0.1605817824602127, -0.23724165558815002, 0.002627074718475342, 0.08772502839565277, 0.308701753616333, -0.10411951690912247, 0.11158190667629242, -0.09087406098842621, 0.09210003912448883, 0.08171993494033813, 0.1920166015625, 0.03826446831226349, 0.32826533913612366, 0.12326093018054962, 0.1183289885520935, 0.042208652943372726, -0.042229972779750824, -0.569062352180481, 0.1648687869310379, 0.06828300654888153, -0.3809735178947449, -0.10858853161334991, -0.2694726586341858, -0.3008396625518799, -0.21373914182186127, -0.04640699923038483, 0.12166765332221985, -0.1050986498594284, 0.25743746757507324, 0.15243065357208252, 0.049111686646938324, -0.36597687005996704, 0.18008998036384583, -0.5320639610290527, 0.3189275860786438, -0.39809420704841614, 0.2833954989910126, 0.10832593590021133, 0.0031769759953022003, -0.012829452753067017, -0.12219797074794769, 0.38316673040390015, -0.21649423241615295, 0.09124139696359634, 0.4023689925670624, 0.08864472806453705, 0.28186801075935364, 0.13490377366542816, -0.007875204086303711, 0.206863135099411, -0.23444244265556335, -0.1287577748298645, -0.05375254154205322, 0.004346519708633423, -0.03192634880542755, -0.2551819086074829, 0.18869340419769287, -0.15839609503746033, 0.521683931350708, 0.1928533911705017, -0.15315887331962585, 0.22592991590499878, -0.2517027258872986, -0.15669524669647217, -0.46954721212387085, 0.4904666841030121, -0.1734975427389145, 0.4586026668548584, 0.04554733633995056, -0.7019231915473938, -0.31676632165908813, 0.17705366015434265, -0.04351046681404114, -0.1669086217880249, 0.284512460231781, 0.24766570329666138, 0.10054352879524231, 0.23179730772972107, 0.2334340512752533, 0.23405545949935913, 0.16211076080799103, 0.030777843669056892, -0.03345285356044769, -0.07840129733085632, -0.1542884260416031, 0.20219998061656952, 0.21832622587680817, -0.11533252894878387, 0.26785415410995483, -0.20845134556293488, 0.0762370377779007, -0.28916171193122864, -0.31357425451278687, 0.21368630230426788, -0.14222002029418945, -0.3833642899990082, -0.0003880336880683899, -0.1673121154308319, -0.462539941072464, -0.2376047670841217, 0.2157483547925949, -0.45751163363456726, -0.35140764713287354, 0.17735181748867035, 0.25579753518104553, -0.3945818543434143, 0.14080563187599182, -0.21743127703666687, 0.22831884026527405, -0.12313443422317505, -0.42224594950675964, -0.42445456981658936, 0.018864471465349197, -0.11991577595472336, -0.0292772576212883, 0.1545930951833725, 0.022518735378980637, 0.4877883195877075, -0.35122254490852356, -0.2350654900074005, -0.1820126324892044, -0.1100020483136177, 0.23104794323444366, -0.10930100083351135, 0.32899367809295654, 0.27926379442214966, 0.5468595027923584, -0.08984535187482834, 0.21479152143001556, 0.3120924234390259, 0.10656866431236267, 0.005962744355201721, 0.055848196148872375, 0.42579326033592224, 0.38430774211883545, -0.05230971425771713, 0.06512772291898727, -0.20270003378391266, -0.3712857663631439, -0.1919204592704773, -0.21815316379070282, -0.06319558620452881, 0.31008481979370117, 0.03517995402216911, 0.311402291059494, -0.34209418296813965, -0.03884369134902954, 0.05748997628688812, -0.5333996415138245, 0.20493261516094208, 0.006050381809473038, 0.12937942147254944, -0.012394659221172333, 0.1766456812620163, 0.23478931188583374, 0.4292151927947998, -0.6461700201034546, -0.26695823669433594, 0.0464455783367157, -0.014322109520435333, -0.21961399912834167, -0.16299645602703094, 0.1792023628950119, -0.06908649951219559, -0.002909999340772629, -0.28575465083122253, -0.03887201100587845, -0.06323039531707764, 0.05541189759969711, 0.42440569400787354, 0.2332252711057663, 0.3306565582752228, -0.10206125676631927, 0.8793209791183472, 0.06607676297426224, 0.21030251681804657, 0.755622148513794, 0.1744430512189865, 0.42903953790664673, 0.24983346462249756, -0.06173352152109146, -0.05022953078150749, 0.10247816890478134, -0.18026584386825562, 0.05386913940310478, 0.09719283878803253, 0.12983620166778564, -0.3572049140930176, -0.39708247780799866, -0.06951776146888733, -0.35661688446998596, -0.1077490970492363, -0.08163632452487946, 0.2781595289707184, -0.021016448736190796, 0.05904334783554077, -0.014689493924379349, -0.052863024175167084, 0.1334751695394516, 0.43245425820350647, 0.4688012897968292, -0.0057495832443237305, -0.10786085575819016, -0.1025104746222496, -0.3196767270565033, 0.21539638936519623, 0.04759005457162857, 0.2049199938774109, -0.2530861496925354, 0.18040719628334045, 0.015499137341976166, 0.08549676090478897, 1.0250426530838013, -0.15663480758666992, 0.29142701625823975, -0.07615489512681961, 0.04831607639789581, -0.3543443977832794, 0.1701333373785019, 0.0011678263545036316, 0.11142723262310028, -0.029651403427124023, 0.5095672607421875, -0.4772759675979614, -0.06006467342376709, -0.016122784465551376, 0.33338651061058044, -0.029116392135620117, -0.2688389718532562, -0.20319263637065887, -0.19191329181194305, -0.5081585645675659, 0.24953675270080566, 0.22194170951843262, 0.058106813579797745, -0.10736154764890671, -0.27188122272491455, 0.028308676555752754, 0.03148159384727478, -0.03277087211608887, 0.1465686559677124, 0.18522757291793823, -0.14563016593456268, 0.177030548453331, 0.2133989930152893, 0.05175787955522537, 0.2991345226764679, 0.7830030918121338, -0.1582178771495819, -0.5208861231803894, -0.004135709255933762, -0.17354390025138855, 0.41673871874809265, 0.4459969401359558, -0.049436379224061966, 0.14604885876178741, 0.24182233214378357, 0.25455620884895325, -0.07355441153049469, 0.18627263605594635, 0.2455972582101822, -0.07332609593868256, -0.5862745046615601, -0.13496987521648407, 0.2912936210632324, 0.23255467414855957, -0.015063025057315826, 0.47344526648521423, 0.3002605736255646, -0.24608737230300903, -0.0113375224173069, -0.18426528573036194, 0.9984018802642822, -0.004243003204464912, -0.0343170166015625, -0.12089642137289047, 0.12452095746994019, 0.736275315284729, 0.21387192606925964, -0.003752760589122772, 0.01917196810245514, -0.32525527477264404, -0.08011186122894287, -0.10666677355766296, 0.2852623164653778, 0.3719387352466583, -0.26236212253570557, 0.47236010432243347, 0.014964759349822998, 0.19042187929153442, -0.002458028495311737, -0.09729128330945969, -0.32680070400238037, -0.14450150728225708, -0.5647062659263611, -0.07232961803674698, -0.12424419075250626, 0.2185213714838028, -0.024059120565652847, 0.0014312118291854858, 0.2780326008796692, -0.4316778779029846, -0.1897445023059845, -0.13967087864875793, -0.25134530663490295, -0.4467102885246277, -0.14070867002010345, -0.057308390736579895, -0.02085988223552704, -0.009041452780365944, -0.06990988552570343, 0.06882812082767487, -0.34921690821647644, 0.15876275300979614, -0.330404669046402, -0.015568617731332779, -0.3042442500591278, -0.021026968955993652, 0.32167428731918335, 0.027680300176143646, -0.14585018157958984, 0.22855247557163239, -0.3426485061645508, -0.06761021912097931, 0.004043400287628174, -0.20673680305480957, 0.15393680334091187, 0.006647933274507523, -0.09472385048866272, -0.4214704632759094, 0.008336290717124939, -0.4034998118877411, -0.013965273275971413, -0.22131672501564026, 0.15384410321712494, -0.04576268792152405, 0.014965806156396866, -0.08079594373703003, -0.02240995317697525, 0.473882794380188, -0.4279872477054596, -0.2172355353832245, 0.20158106088638306, -0.06568575650453568, -0.12482806295156479, -0.024342279881238937, -0.2391549050807953, -0.23367495834827423, -0.6391172409057617, 0.29296597838401794, 0.2824545204639435, 0.26262304186820984, -0.07474597543478012, -0.04589739814400673, 0.06043969467282295, -0.1768031120300293, -0.0427313894033432, -0.48322930932044983, -0.25650379061698914, 0.24951009452342987, 0.1961173415184021, 0.4635145962238312, 0.09757551550865173, 0.07457605004310608, 0.07931851595640182, -0.31601300835609436, -0.11426335573196411, -0.10222293436527252, -0.4322338402271271, 0.1248522698879242, 0.3452491760253906, 0.6230449676513672, 0.004577405750751495, -0.02510768733918667, -0.10204777121543884, 0.36470872163772583, 0.04852135479450226, -0.0019887425005435944, -0.08468581736087799, 0.2720828950405121, 0.098066546022892, -0.005148299038410187, 0.14736589789390564, -0.30658549070358276, 0.10200251638889313, -0.13263267278671265, 0.12312082946300507, 0.1287708878517151, 0.16070494055747986, -0.05081566795706749, 0.3724896013736725, 0.352692186832428, -0.09074018150568008, 0.25693532824516296, 0.13986794650554657, 0.31956684589385986, -0.03999383747577667, 0.10133296251296997, -0.06293205171823502, 0.05888987332582474, -0.0674515962600708, -0.25467586517333984, 0.28801849484443665, -0.1651734560728073, 0.010243361815810204, 0.04946982488036156, -0.19414541125297546, 0.2485978752374649, 0.12825821340084076, 0.5434519648551941, -0.16381140053272247, 0.13917624950408936, 0.19095449149608612, 0.09902297705411911, -0.2505277991294861, 0.07569894939661026, 0.45890775322914124, 0.057493340224027634, -0.08930426836013794, 0.1102987751364708, -0.07081344723701477, -0.11660461127758026, 0.2103414535522461, 0.07075662910938263, 0.5132803916931152, 0.15782268345355988, 0.3262617886066437, 0.49758180975914, -0.07332496345043182, 0.09427893906831741, 0.013146908953785896, 0.11361542344093323, 0.4699503481388092, 0.18781563639640808, -0.14208242297172546, 0.25648319721221924, -0.3810079097747803, 0.35390204191207886, -0.1754218339920044, -0.556179940700531, 0.08213792741298676, 0.47820138931274414, -0.15802396833896637, 0.2712125778198242, 0.01959572359919548, 0.18891745805740356, 0.06704781949520111, -0.0841679573059082, -0.08171529322862625, 0.15682676434516907, 0.11188915371894836, -0.10841303318738937, -0.39756298065185547, -0.09762527048587799, -0.2457050234079361, 0.13530367612838745, 0.12715059518814087, -0.11506423354148865, 0.5346969962120056, -0.013571467250585556, 0.02044239081442356, -0.5181418657302856, -0.10084637254476547, 0.10032503306865692, 0.07768957316875458, -0.2354731261730194, 0.15681470930576324, 0.4380321204662323, -0.1081121414899826, 0.45603981614112854, -0.08089731633663177, 0.1055462509393692, -0.21121230721473694, 0.10443779826164246, -0.13545778393745422, 0.0008948594331741333, 0.06548527628183365, -0.1664372980594635, 0.4467664361000061, -0.14778898656368256, -0.05381980538368225, 0.41642606258392334, -0.04988659918308258, -0.03346399590373039, 0.14235740900039673, 0.08572185039520264, 0.2085704803466797, -0.5653312802314758, 0.23434098064899445, -0.10924757272005081, 0.16531044244766235, -0.21736833453178406, -0.057736098766326904, -0.48840272426605225, 0.07674006372690201, 0.0599825344979763, -0.28627732396125793, -0.18892551958560944, 0.08419255912303925, -0.0357820987701416, -0.27107176184654236, 0.42070165276527405, 0.5567449927330017, -0.022723685950040817, -0.4922252297401428, -0.23864765465259552, -0.5442265272140503, 0.16939130425453186, 0.12062669545412064, 0.19708892703056335, 0.25308921933174133, -0.12604260444641113, -0.07275119423866272, 0.13572683930397034, -0.04458177834749222, 0.08737529814243317, 0.17161890864372253, 0.14917081594467163, -0.1388232409954071, -0.5373269319534302, -0.2241121232509613, 0.02248300053179264, 0.17166760563850403, -0.3708750605583191, 0.2019549012184143, -0.11147566139698029, -0.3114679753780365, -0.2323261797428131, -0.13459664583206177, 0.17932350933551788, 0.053108371794223785, 0.30433398485183716, -0.042551107704639435, 0.38388481736183167, -0.12106991559267044, -0.19070543348789215, -0.13431808352470398, -0.13437864184379578, -0.10160572826862335, -0.16820429265499115, 0.005783267319202423, 0.26340052485466003, -0.276313841342926, 0.013382242992520332, -0.3055776357650757, -0.015065323561429977, 0.06886090338230133, 0.42068976163864136, -0.09238284081220627, -0.08504904806613922, -0.07273280620574951, 0.04131515696644783, -0.09059799462556839, -0.10620000958442688, -0.033648569136857986, 0.14612045884132385, -0.22752788662910461, -0.3555670380592346, 0.769553005695343, -0.19666670262813568, -0.02447708696126938, -0.10506200790405273, 0.12154291570186615, -0.03541012853384018, -0.16623152792453766, -0.6988605260848999, -0.07227442413568497, 0.4063704013824463, 0.11869239807128906, -0.038602277636528015, 0.17694243788719177, -0.13513943552970886, -0.00538354367017746, -0.027689028531312943, 0.2619539499282837, 0.12525194883346558, 0.0512067973613739, 0.365994930267334, -0.1882321536540985 ]
https://github.com/huggingface/datasets/issues/6542
Hi ! We now recommend using the `wikimedia/wikipedia` dataset, can you try loading this one instead ? ```python wiki_dataset = load_dataset("wikimedia/wikipedia", "20231101.en") ```
Datasets : wikipedia 20220301.en error
### Describe the bug When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist. ### Steps to reproduce the bug 1.I tried downloading directly. ```python wiki_dataset = load_dataset("wikipedia", "20220301.en") ``` An exception occurred ``` MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/ If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). Example of usage: `load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')` ``` 2.I modified the code as prompted. ```python wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner') ``` An exception occurred: ``` FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json ``` ### Expected behavior I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory. I really need this data set and hope to provide a download method. ### Environment info python 3.8 datasets 2.16.0 apache-beam 2.52.0 dill 0.3.7
23
Datasets : wikipedia 20220301.en error ### Describe the bug When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist. ### Steps to reproduce the bug 1.I tried downloading directly. ```python wiki_dataset = load_dataset("wikipedia", "20220301.en") ``` An exception occurred ``` MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/ If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). Example of usage: `load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')` ``` 2.I modified the code as prompted. ```python wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner') ``` An exception occurred: ``` FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json ``` ### Expected behavior I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory. I really need this data set and hope to provide a download method. ### Environment info python 3.8 datasets 2.16.0 apache-beam 2.52.0 dill 0.3.7 Hi ! We now recommend using the `wikimedia/wikipedia` dataset, can you try loading this one instead ? ```python wiki_dataset = load_dataset("wikimedia/wikipedia", "20231101.en") ```
[ -0.018569722771644592, 0.21296685934066772, -0.01566591113805771, 0.33132097125053406, 0.11043636500835419, 0.19831033051013947, 0.29937219619750977, 0.35208413004875183, 0.21328392624855042, 0.07991998642683029, 0.12571120262145996, 0.11823579668998718, 0.016085289418697357, -0.0669093132019043, 0.17962804436683655, -0.3809634745121002, 0.1903625726699829, 0.06059825047850609, -0.3449368476867676, -0.14026443660259247, -0.2636334300041199, 0.13525380194187164, -0.2836342453956604, -0.13687297701835632, -0.15099278092384338, 0.11331405490636826, -0.17973701655864716, 0.11413267254829407, 0.04535636305809021, -0.27457255125045776, 0.3563685715198517, -0.10902425646781921, 0.16314810514450073, 0.2051067352294922, -0.00011289287795079872, 0.007938705384731293, 0.5474300384521484, -0.13894760608673096, -0.48444774746894836, -0.2166106253862381, -0.2664106488227844, -0.4025326073169708, 0.0653078705072403, -0.4694620668888092, 0.03518377244472504, -0.2908114194869995, 0.16099661588668823, -0.2501417100429535, 0.3333071768283844, 0.2199501395225525, 0.19560369849205017, 0.22032147645950317, 0.3240942060947418, -0.15135511755943298, 0.614432692527771, 0.0028795935213565826, -0.12466263025999069, -0.0773172378540039, -0.0878976583480835, -0.01482962816953659, 0.01190090924501419, 0.2536671459674835, -0.1244000717997551, 0.04806831479072571, 0.35124731063842773, -0.11317287385463715, -0.23195919394493103, -0.5011332035064697, 0.2623489499092102, 0.2554831802845001, 0.8237800598144531, -0.21913477778434753, -0.2692028880119324, -0.17698125541210175, -0.0060930512845516205, 0.218487948179245, 0.3973808288574219, 0.2873639166355133, -0.256330281496048, -0.006076369900256395, -0.02448517084121704, -0.26058804988861084, -0.16654108464717865, 0.34701675176620483, -0.05174213647842407, 0.31784504652023315, 0.03240696340799332, 0.1476956605911255, -0.20711062848567963, 0.028095468878746033, 0.07205523550510406, -0.38837730884552, 0.24865369498729706, 0.3239334225654602, -0.34042128920555115, -0.007900647819042206, -0.0898478776216507, 0.11984789371490479, 0.16795410215854645, 0.01448291540145874, -0.03065955638885498, 0.01214635744690895, 0.03139848634600639, -0.07254248857498169, 0.22300127148628235, -0.0514310784637928, -0.11503396928310394, -0.09019776433706284, 0.1429091989994049, 0.11954003572463989, 0.006249755620956421, 0.06373628973960876, 0.026430893689393997, -0.14375634491443634, -0.09030371904373169, 0.11346901208162308, 0.2412434071302414, -0.010171055793762207, -0.1449999213218689, 0.23606212437152863, -0.5672488212585449, -0.08964245021343231, -0.2966330051422119, 0.3063594698905945, -0.09879378974437714, 0.3342333734035492, 0.2874964773654938, 0.111814484000206, -0.2013210952281952, -0.429897278547287, -0.12228557467460632, 0.30391576886177063, -0.08989029377698898, 0.18241819739341736, 0.32142162322998047, 0.032296475023031235, 0.37993913888931274, 0.06808999180793762, -0.1377718448638916, -0.05962177366018295, 0.33460545539855957, -0.026606779545545578, -0.08834277093410492, 0.3527240455150604, 0.2508360743522644, 0.45849084854125977, 0.0059651704505085945, 0.05264700949192047, -0.01952965557575226, 0.15995705127716064, -0.23853245377540588, -0.10630019009113312, -0.1088714674115181, 0.1424906998872757, -0.26449835300445557, 0.16507695615291595, -0.27665117383003235, 0.11121760308742523, -0.035837799310684204, -0.10383956134319305, 0.03233993425965309, -0.07342471182346344, -0.2184939682483673, -0.34168797731399536, 0.44452375173568726, 0.6806347966194153, -0.14129936695098877, 0.06868977844715118, -0.1538432538509369, 0.14885351061820984, 0.022300727665424347, -0.29871854186058044, -0.12535294890403748, 0.5239827036857605, -0.2382473647594452, -0.053015224635601044, 0.3165203034877777, -0.30891501903533936, -0.3167470693588257, 0.0992419421672821, -0.012096323072910309, 0.1660783886909485, 0.1397363245487213, -0.0017468929290771484, 0.205414280295372, -0.06993788480758667, -0.03525308892130852, 0.31727877259254456, 0.09772699326276779, 0.12102378159761429, -0.25569018721580505, -0.25305116176605225, -0.07577237486839294, 0.14484082162380219, 0.267188161611557, -0.048146747052669525, 0.20735757052898407, 0.553414523601532, 0.27007630467414856, -0.11486818641424179, 0.2593562602996826, 0.5467313528060913, -0.32270750403404236, 0.08141167461872101, 0.22629766166210175, -0.1512448489665985, -0.4049016833305359, 0.20364725589752197, -0.11642632633447647, 0.12157580256462097, 0.02394878678023815, -0.029348168522119522, -0.5178927183151245, 0.014426350593566895, -0.29039856791496277, -0.26622921228408813, 0.18154862523078918, 0.05376753211021423, 0.2009480595588684, 0.35296571254730225, 0.013525113463401794, 0.22080270946025848, -0.24150040745735168, 0.030430074781179428, -0.4703517258167267, 0.49977147579193115, -0.0697626993060112, -0.002002473920583725, 0.1622542440891266, 0.11453063786029816, 0.29374706745147705, -0.01737435907125473, -0.07251045852899551, 0.22813154757022858, 0.11742343008518219, 0.23197244107723236, 0.03978249803185463, 0.17142346501350403, 0.3116137683391571, -0.48768383264541626, 0.18129615485668182, 0.515896201133728, 0.25014591217041016, -0.05000005662441254, -0.03679649159312248, 0.0388968288898468, -0.09912262856960297, 0.15402154624462128, -0.031900905072689056, 0.12437227368354797, 0.23009535670280457, -0.007128000259399414, -0.060295481234788895, -0.09160897135734558, 0.18110668659210205, 0.23772910237312317, 0.0658475011587143, -0.08423396199941635, 0.031011924147605896, -0.06881116330623627, 0.27832239866256714, -0.023398522287607193, 0.06406627595424652, 0.07167941331863403, -0.5045633316040039, -0.1164470985531807, 0.2502250075340271, 0.24101018905639648, 0.29738861322402954, 0.13609835505485535, 0.08965817093849182, -0.008539124391973019, 0.10884450376033783, -0.13967156410217285, 0.22893047332763672, 0.18231821060180664, 0.4946744441986084, 0.15090176463127136, 0.08386432379484177, 0.17866668105125427, -0.10795211791992188, -0.038888659328222275, -0.019931111484766006, 0.18229158222675323, -0.3191291391849518, -0.10731855034828186, -0.18838422000408173, -0.09146919846534729, -0.3253691792488098, 0.16662201285362244, -0.1418086439371109, -0.45340245962142944, -0.014210419729351997, 0.18896104395389557, -0.22324568033218384, 0.09023430943489075, -0.054465726017951965, -0.09718336164951324, 0.14131540060043335, -0.02460501715540886, -0.3673097491264343, -0.19483408331871033, -0.24400252103805542, -0.024367786943912506, 0.10004986822605133, 0.19580242037773132, 0.27626872062683105, -0.05049753189086914, -0.055241040885448456, -0.6208246946334839, -0.2185600996017456, 0.20061486959457397, 0.12866146862506866, 0.1608772873878479, 0.1150018721818924, 0.4420570731163025, -0.006679460406303406, -0.16230414807796478, 0.14589950442314148, 0.01225762814283371, -0.14291009306907654, 0.011428117752075195, 0.004597991704940796, 0.22045350074768066, 0.06179414689540863, -0.4225062131881714, -0.3032686114311218, -0.3555681109428406, -0.21532727777957916, 0.15920649468898773, -0.0184645913541317, -0.09659196436405182, 0.20655210316181183, 0.052995000034570694, 0.23128578066825867, 0.09633063524961472, -0.14797070622444153, -0.04748496040701866, 0.48003047704696655, -0.2592318058013916, -0.6178398132324219, 0.1918584704399109, -0.3179738521575928, 0.039237845689058304, 0.38388893008232117, -0.5105974078178406, -0.007364336401224136, 0.05818929523229599, -0.027664095163345337, -0.0762614756822586, 0.0966615378856659, 0.3957224190235138, -0.05271284282207489, 0.09240206331014633, -0.22670680284500122, 0.09527373313903809, -0.06658956408500671, -0.3960660994052887, 0.3779778480529785, 0.2974438965320587, 0.18306279182434082, -0.04238726943731308, 0.9808483123779297, 0.24108292162418365, 0.12091521918773651, 0.391028493642807, 0.05674316734075546, 0.16350890696048737, -0.22032606601715088, -0.2648508846759796, -0.005587272346019745, -0.08411703258752823, 0.01682182401418686, 0.3457852602005005, -0.033927761018276215, -0.17266015708446503, -0.39051544666290283, -0.12216471135616302, -0.49500685930252075, -0.3486511707305908, 0.03470636159181595, -0.13713562488555908, 0.39951732754707336, 0.09980148822069168, 0.31824663281440735, -0.029221463948488235, -0.23624661564826965, 0.2627309262752533, 0.0011908821761608124, 0.15486985445022583, 0.046154581010341644, 0.13768060505390167, 0.02320084720849991, -0.4359614849090576, 0.2115616798400879, 0.036765243858098984, 0.31111621856689453, 0.085711769759655, 0.042274199426174164, 0.04010409116744995, 0.017927829176187515, 0.5444362759590149, -0.40480491518974304, 0.16142137348651886, -0.0782971903681755, 0.15524303913116455, -0.49265995621681213, -0.027531679719686508, -0.10655108839273453, 0.03309336304664612, 0.10354504734277725, 0.2202749252319336, -0.4446220397949219, 0.03037818893790245, 0.2487069070339203, 0.40135425329208374, -0.23655274510383606, -0.17316806316375732, -0.1427396535873413, -0.33967703580856323, -0.44106727838516235, -0.2925233542919159, -0.07984106242656708, 0.25116783380508423, 0.00158734992146492, 0.018062233924865723, -0.005058955401182175, 0.09391392767429352, -0.0607844777405262, -0.1145206019282341, 0.22951006889343262, 0.14487811923027039, 0.15349344909191132, 0.16705968976020813, 0.11081678420305252, -0.012559660710394382, 0.2894412875175476, 0.22610053420066833, -0.3291700482368469, 0.030191689729690552, -0.1030578464269638, -0.03288388252258301, 0.24730151891708374, -0.06281895190477371, -0.25772252678871155, -0.010155875235795975, -0.20279835164546967, -0.22132563591003418, -0.006991885602474213, 0.15598922967910767, -0.2100210040807724, -0.22150781750679016, -0.48110729455947876, 0.6695035696029663, 0.04339846223592758, 0.011291638016700745, 0.5136597752571106, 0.14752012491226196, -0.28582122921943665, 0.4375310242176056, 0.30298250913619995, 0.8923989534378052, -0.05718844011425972, 0.08609048277139664, 0.19716903567314148, -0.012192219495773315, 0.6510748267173767, -0.4116291403770447, 0.024787459522485733, -0.3324829041957855, 0.028077151626348495, -0.10410493612289429, -0.0026051849126815796, 0.18044598400592804, 0.14542156457901, 0.005933903157711029, 0.3482414782047272, 0.197660893201828, 0.377275675535202, 0.044019319117069244, 0.2709459066390991, -0.07940522581338882, -0.2284509837627411, -0.2781901955604553, 0.11087914556264877, -0.15332427620887756, 0.4288862943649292, -0.14929667115211487, -0.002193346619606018, -0.17751586437225342, -0.2522006928920746, -0.4586377739906311, 0.08784686028957367, -0.35451173782348633, 0.21909675002098083, -0.3085485100746155, -0.5777170062065125, 0.10309501737356186, 0.4337296187877655, 0.09516596794128418, 0.08186852931976318, -0.3419418931007385, 0.29524314403533936, -0.42860183119773865, -0.22485163807868958, 0.0059621259570121765, 0.03561563044786453, 0.28552016615867615, -0.1389719843864441, -0.12337712198495865, 0.2671686112880707, -0.3019205331802368, -0.18593284487724304, -0.0015753358602523804, -0.0440417043864727, 0.34083086252212524, -0.03607091307640076, -0.2351905107498169, -0.04761528968811035, -0.05151621997356415, -0.18832853436470032, 0.15057937800884247, -0.18076077103614807, -0.022094838321208954, -0.22968797385692596, -0.0272083580493927, -0.09199456870555878, -0.010170058347284794, 0.47541823983192444, 0.01005656085908413, -0.05139153078198433, 0.6058942675590515, 0.29158830642700195, -0.1404298096895218, -0.13402371108531952, 0.2429693341255188, -0.18458311259746552, -0.3388012647628784, -0.10560266673564911, -0.15291810035705566, 0.28047338128089905, -0.26638472080230713, 0.19368430972099304, 0.132856547832489, -0.2552063465118408, 0.11375272274017334, -0.49719738960266113, -0.026069022715091705, 0.29426485300064087, -0.11780530959367752, 0.004770667292177677, 0.10198460519313812, -0.17128156125545502, 0.245701864361763, -0.23336492478847504, -0.25739774107933044, -0.07009516656398773, -0.12769968807697296, 0.03787017613649368, 0.42515069246292114, 0.10222885012626648, -0.13936761021614075, 0.006215039640665054, 0.08497358113527298, -0.07708558440208435, 0.01711825281381607, -0.16800659894943237, -0.06363347917795181, 0.17036449909210205, 0.035029660910367966, -0.010189704596996307, -0.01732531562447548, -0.344684898853302, -0.08283722400665283, -0.21172437071800232, -0.037416744977235794, 0.05086494982242584, -0.07710187137126923, 0.15876257419586182, 0.25679463148117065, 0.23731450736522675, -0.5665854215621948, 0.1506771594285965, -0.049571409821510315, 0.4211878180503845, 0.033924296498298645, 0.2024884670972824, 0.39974135160446167, -0.05426239222288132, -0.5235655903816223, 0.03337087482213974, -0.197454035282135, -0.006356770172715187, 0.43014341592788696, -0.12533509731292725, -0.02684350311756134, 0.38636869192123413, 0.11685498058795929, 0.10387444496154785, -0.36624234914779663, 0.03715124726295471, 0.08667484670877457, 0.1707952916622162, -0.33442553877830505, 0.10533685237169266, 0.4116196036338806, -0.03458213806152344, -0.14685465395450592, 0.1043148934841156, 0.1882183849811554, -0.3454976975917816, -0.0888456404209137, 0.2536002993583679, 0.2072925716638565, -0.20865082740783691, 0.28181225061416626, 0.21709123253822327, 0.21802367269992828, 0.22775138914585114, -0.06247863173484802, -0.04391723871231079, 0.1493563950061798, 0.5230836272239685, -0.04936087131500244, 0.42100903391838074, 0.29123571515083313, 0.06133448705077171, -0.09875611960887909, -0.35691940784454346, 0.1501484513282776, 0.1495550125837326, -0.10301585495471954, 0.11525538563728333, -0.028290782123804092, 0.13191016018390656, 0.17040009796619415, 0.15598146617412567, -0.4203309714794159, 0.17085732519626617, -0.030422333627939224, 0.1606513261795044, -0.3559405505657196, -0.36849328875541687, -0.010458387434482574, 0.14010131359100342, 0.2118874043226242, -0.3806062936782837, 0.3819614052772522, 0.1692344695329666, -0.25253209471702576, -0.35561323165893555, 0.48774734139442444, -0.013498423621058464, 0.11571799218654633, -0.28344276547431946, -0.02355397865176201, 0.1617969423532486, -0.08298442512750626, 0.05772346630692482, 0.1679462194442749, 0.23520176112651825, 0.24944962561130524, -0.3187532424926758, -0.14360558986663818, 0.08959148824214935, -0.08835963159799576, -0.05121283233165741, 0.30124613642692566, 0.07046835124492645, 0.013852296397089958, 0.3778868019580841, 0.12924429774284363, -0.1739896535873413, -0.39780309796333313, 0.4318195581436157, 0.08641427010297775, -0.3341112434864044, 0.018904998898506165, -0.35900887846946716, -0.13545000553131104, -0.09455403685569763, -0.0035706274211406708, -0.3516187369823456, 0.03176693990826607, 0.20678502321243286, 0.20891119539737701, -0.02043098211288452, -0.21686279773712158, 0.055347006767988205, -0.23855620622634888, 0.3275951147079468, 0.3754828870296478, 0.11564663797616959, -0.3960963785648346, -0.37416142225265503, -0.6565244793891907, 0.06389202177524567, -0.14236567914485931, -0.23654574155807495, 0.08274132013320923, 0.2850216031074524, -0.02519349753856659, 0.32583099603652954, -0.035131245851516724, -0.05584282800555229, 0.14218728244304657, 0.3513117730617523, -0.31143102049827576, -0.396225243806839, -0.05046672746539116, 0.10811223834753036, -0.24449469149112701, -0.4461306929588318, 0.15432046353816986, -0.15525653958320618, 0.026454702019691467, -0.16452141106128693, -0.40391847491264343, 0.2776864469051361, -0.03432191163301468, 0.42579835653305054, -0.061310842633247375, 0.41949987411499023, -0.08557019382715225, -0.0969378799200058, -0.20961993932724, 0.007711481302976608, 0.09599898010492325, 0.3093425929546356, -0.2308284342288971, 0.3002045154571533, -0.058957427740097046, -0.0072785671800374985, -0.21652957797050476, 0.3149679899215698, -0.07620446383953094, 0.19871872663497925, -0.4596458673477173, 0.05530562996864319, -0.31901758909225464, 0.2400059998035431, 0.06564491987228394, 0.16460952162742615, -0.19116976857185364, 0.1470513641834259, -0.18997803330421448, -0.38352036476135254, 0.24125592410564423, -0.8094833493232727, -0.27994489669799805, -0.02833513729274273, 0.16247057914733887, -0.18902792036533356, 0.20192234218120575, -0.44219809770584106, 0.11148415505886078, 0.42436838150024414, 0.05701357498764992, -0.003764323890209198, -0.08618085086345673, -0.1790948510169983, 0.03976908326148987, 0.04105546325445175, 0.030369652435183525, -0.054055698215961456, -0.13875946402549744, -0.11627554893493652, -0.3062851130962372 ]
https://github.com/huggingface/datasets/issues/6542
This bug has been fixed in `2.16.1` thanks to https://github.com/huggingface/datasets/pull/6544, feel free to update `datasets` and re-run your code :) ``` pip install -U datasets ```
Datasets : wikipedia 20220301.en error
### Describe the bug When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist. ### Steps to reproduce the bug 1.I tried downloading directly. ```python wiki_dataset = load_dataset("wikipedia", "20220301.en") ``` An exception occurred ``` MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/ If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). Example of usage: `load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')` ``` 2.I modified the code as prompted. ```python wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner') ``` An exception occurred: ``` FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json ``` ### Expected behavior I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory. I really need this data set and hope to provide a download method. ### Environment info python 3.8 datasets 2.16.0 apache-beam 2.52.0 dill 0.3.7
26
Datasets : wikipedia 20220301.en error ### Describe the bug When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist. ### Steps to reproduce the bug 1.I tried downloading directly. ```python wiki_dataset = load_dataset("wikipedia", "20220301.en") ``` An exception occurred ``` MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/ If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory). Example of usage: `load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')` ``` 2.I modified the code as prompted. ```python wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner') ``` An exception occurred: ``` FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json ``` ### Expected behavior I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory. I really need this data set and hope to provide a download method. ### Environment info python 3.8 datasets 2.16.0 apache-beam 2.52.0 dill 0.3.7 This bug has been fixed in `2.16.1` thanks to https://github.com/huggingface/datasets/pull/6544, feel free to update `datasets` and re-run your code :) ``` pip install -U datasets ```
[ -0.08289985358715057, 0.20689281821250916, -0.015040706843137741, 0.33663633465766907, 0.11554808169603348, 0.1788325011730194, 0.28936833143234253, 0.349710077047348, 0.2294771373271942, 0.09866957366466522, 0.10366464406251907, 0.15296542644500732, 0.018877964466810226, -0.0077821314334869385, 0.21722984313964844, -0.35296061635017395, 0.17039456963539124, 0.0926557183265686, -0.4099957346916199, -0.13444110751152039, -0.23266172409057617, 0.15910674631595612, -0.25821274518966675, -0.1614537537097931, -0.15106773376464844, 0.14117766916751862, -0.12969154119491577, 0.065244659781456, 0.018359240144491196, -0.28537750244140625, 0.34540408849716187, -0.117414191365242, 0.16693764925003052, 0.20532384514808655, -0.00011340281344018877, -0.01094566285610199, 0.513029158115387, -0.14020965993404388, -0.48873236775398254, -0.21948355436325073, -0.25768959522247314, -0.45381224155426025, 0.0689295083284378, -0.453350305557251, -0.007031351327896118, -0.2460276037454605, 0.159283846616745, -0.24175259470939636, 0.3287718892097473, 0.21301770210266113, 0.19065020978450775, 0.24499255418777466, 0.36235904693603516, -0.16368673741817474, 0.6252614259719849, -0.015556450933218002, -0.14858099818229675, -0.11793215572834015, -0.0900186076760292, -0.015000928193330765, 0.04635532200336456, 0.30121511220932007, -0.1406712532043457, 0.05268717557191849, 0.3349881172180176, -0.11789022386074066, -0.21729633212089539, -0.5057092308998108, 0.2462024986743927, 0.28825393319129944, 0.8185455203056335, -0.23594731092453003, -0.2737976312637329, -0.18303707242012024, -0.011805538088083267, 0.20474974811077118, 0.38673028349876404, 0.28949394822120667, -0.24581453204154968, -0.0058279880322515965, -0.0012555941939353943, -0.25829824805259705, -0.14299122989177704, 0.31733134388923645, -0.03651602566242218, 0.31674081087112427, -0.016565971076488495, 0.13810867071151733, -0.16338327527046204, 0.00977286510169506, 0.0712847039103508, -0.3745579719543457, 0.27682891488075256, 0.35245028138160706, -0.3477252125740051, 0.009809695184230804, -0.08771025389432907, 0.10358172655105591, 0.17437270283699036, 0.04372352734208107, -0.04442217946052551, -0.0017970362678170204, 0.012736938893795013, -0.031148921698331833, 0.204015851020813, -0.052967749536037445, -0.10782961547374725, -0.09776034951210022, 0.13922150433063507, 0.12437034398317337, 0.07006041705608368, 0.060687243938446045, 0.024249467998743057, -0.13571849465370178, -0.12442751973867416, 0.10339334607124329, 0.2178662270307541, -0.012383095920085907, -0.16239488124847412, 0.2446558028459549, -0.5270615220069885, -0.06719496101140976, -0.28179222345352173, 0.27684104442596436, -0.0967765599489212, 0.34170061349868774, 0.30835115909576416, 0.06969041377305984, -0.22313091158866882, -0.4322260022163391, -0.1272241324186325, 0.29302242398262024, -0.08384554833173752, 0.16471858322620392, 0.33582040667533875, 0.004918742924928665, 0.37054920196533203, 0.06076602265238762, -0.12024976313114166, -0.03568948060274124, 0.31864070892333984, -0.022809848189353943, -0.09242372959852219, 0.4191908538341522, 0.2677876353263855, 0.44134804606437683, 0.006564592011272907, 0.0504782572388649, -0.03508441895246506, 0.14267875254154205, -0.24855546653270721, -0.10459455847740173, -0.12270484119653702, 0.1348714977502823, -0.2928610146045685, 0.16319185495376587, -0.32635101675987244, 0.09286478161811829, -0.04049732908606529, -0.12714549899101257, 0.047590095549821854, -0.0874422937631607, -0.21387803554534912, -0.329872727394104, 0.4857712984085083, 0.6723974943161011, -0.17234182357788086, 0.055185481905937195, -0.16139525175094604, 0.1127023696899414, 0.01645144820213318, -0.31210193037986755, -0.10691314190626144, 0.4882379174232483, -0.242509663105011, -0.0447174534201622, 0.3177259564399719, -0.3201032876968384, -0.34034305810928345, 0.09264924377202988, -0.025409944355487823, 0.11776646226644516, 0.13414664566516876, 0.020444974303245544, 0.2145421952009201, -0.06332548707723618, -0.04164082929491997, 0.31098517775535583, 0.10115738958120346, 0.12399323284626007, -0.24376849830150604, -0.2587814927101135, -0.09398902952671051, 0.14024178683757782, 0.2462139129638672, -0.0674203485250473, 0.1786346137523651, 0.5487947463989258, 0.2580486238002777, -0.07519467920064926, 0.2770947813987732, 0.5514249205589294, -0.26289087533950806, 0.09306112676858902, 0.24631154537200928, -0.18754152953624725, -0.4023221731185913, 0.19969576597213745, -0.07735373824834824, 0.094572514295578, -0.002068381756544113, -0.04920292645692825, -0.5101162195205688, 0.02352074533700943, -0.27518701553344727, -0.26363953948020935, 0.16882219910621643, 0.03482170030474663, 0.20912039279937744, 0.3480636477470398, 0.003992535173892975, 0.24046635627746582, -0.234780952334404, 0.025514990091323853, -0.49039125442504883, 0.49416595697402954, -0.06995343416929245, -0.00511673279106617, 0.14172153174877167, 0.1418410688638687, 0.2543233036994934, -0.04458632692694664, -0.07178066670894623, 0.2564160227775574, 0.12230179458856583, 0.20568257570266724, 0.026097657158970833, 0.2086847722530365, 0.28960251808166504, -0.5254965424537659, 0.1936807781457901, 0.4866684377193451, 0.24398043751716614, -0.026189953088760376, -0.036372166126966476, 0.012769989669322968, -0.1222330704331398, 0.16228991746902466, -0.051619935780763626, 0.1628306806087494, 0.23442992568016052, -0.000015020370483398438, -0.07971633225679398, -0.09767124056816101, 0.18057894706726074, 0.18196254968643188, 0.0857832282781601, -0.07792753726243973, 0.04970578849315643, -0.042254675179719925, 0.2983010709285736, -0.020006638020277023, 0.07214731723070145, 0.06146141141653061, -0.5011178255081177, -0.08783881366252899, 0.2519582509994507, 0.23306988179683685, 0.30668777227401733, 0.1384013146162033, 0.07266289740800858, -0.00614679791033268, 0.13065853714942932, -0.11904112249612808, 0.20924577116966248, 0.17127111554145813, 0.4576647877693176, 0.15036144852638245, 0.08441794663667679, 0.1951064169406891, -0.11037436127662659, 0.009025685489177704, -0.03604830056428909, 0.1921745389699936, -0.3113008737564087, -0.07789990305900574, -0.19886167347431183, -0.09690070152282715, -0.33955320715904236, 0.19571256637573242, -0.1372987926006317, -0.4199637472629547, -0.024002034217119217, 0.1980014592409134, -0.19624413549900055, 0.14008250832557678, -0.03512038290500641, -0.10692852735519409, 0.13293413817882538, -0.06032025068998337, -0.3587314486503601, -0.17998579144477844, -0.2407216876745224, -0.03256944194436073, 0.059529222548007965, 0.1688050925731659, 0.29837557673454285, -0.04741809517145157, -0.03567381948232651, -0.6596204042434692, -0.239475816488266, 0.20549242198467255, 0.09418123960494995, 0.15315420925617218, 0.17207416892051697, 0.41694626212120056, 0.00818680226802826, -0.12490756809711456, 0.1493770182132721, -0.026168420910835266, -0.12970387935638428, 0.011733278632164001, -0.01580769754946232, 0.2282891571521759, 0.03130941838026047, -0.4302954375743866, -0.3241561949253082, -0.35736578702926636, -0.18811620771884918, 0.1463579684495926, -0.0064656659960746765, -0.11961755901575089, 0.21669089794158936, 0.06109859421849251, 0.218049556016922, 0.0833553820848465, -0.15026281774044037, -0.02512253075838089, 0.4600125551223755, -0.2728186547756195, -0.6205325722694397, 0.20156864821910858, -0.3158631920814514, 0.06699518859386444, 0.3700891137123108, -0.5012602806091309, -0.031764328479766846, 0.03499037027359009, -0.02378746122121811, -0.07789614796638489, 0.1443367898464203, 0.43289127945899963, -0.05948645621538162, 0.09794973582029343, -0.2393902987241745, 0.08409130573272705, -0.0772743821144104, -0.426138311624527, 0.37574708461761475, 0.2955003082752228, 0.1853305548429489, -0.005849815905094147, 0.9465256929397583, 0.26578623056411743, 0.12477797269821167, 0.36083847284317017, 0.031009631231427193, 0.18928542733192444, -0.24389947950839996, -0.28102925419807434, -0.00028286129236221313, -0.039061516523361206, 0.02662019431591034, 0.31269484758377075, -0.0220468882471323, -0.14569179713726044, -0.36667999625205994, -0.09888505190610886, -0.48371371626853943, -0.3262767791748047, 0.02587548829615116, -0.12405258417129517, 0.4208996891975403, 0.11797565221786499, 0.3216968774795532, -0.03182544931769371, -0.26399511098861694, 0.24164706468582153, 0.009042400866746902, 0.14237737655639648, 0.07844148576259613, 0.174750417470932, -0.0028795935213565826, -0.43025174736976624, 0.20333923399448395, 0.02078266814351082, 0.27949073910713196, 0.06506878137588501, 0.05230479687452316, 0.07132640480995178, 0.019368767738342285, 0.5198450684547424, -0.43329787254333496, 0.15359406173229218, -0.08051463961601257, 0.1635349541902542, -0.5018743872642517, -0.028864163905382156, -0.10097400099039078, 0.008147042244672775, 0.1230081096291542, 0.22173020243644714, -0.4779353737831116, -0.012305628508329391, 0.3226926922798157, 0.40953657031059265, -0.2143271267414093, -0.1475781500339508, -0.15852169692516327, -0.35270294547080994, -0.44656094908714294, -0.27366799116134644, -0.06845645606517792, 0.24139054119586945, 0.023852378129959106, 0.04168754816055298, -0.00912870280444622, 0.10326233506202698, -0.06307436525821686, -0.11984521150588989, 0.23507770895957947, 0.15058791637420654, 0.15371212363243103, 0.19401559233665466, 0.05324451997876167, -0.019215065985918045, 0.3061155080795288, 0.15930089354515076, -0.3237646222114563, 0.04083457961678505, -0.0991591215133667, -0.0039170607924461365, 0.2277994006872177, -0.11257591843605042, -0.26613694429397583, 0.005787894129753113, -0.18710969388484955, -0.2354476898908615, 0.005797721445560455, 0.17996728420257568, -0.19208326935768127, -0.20422068238258362, -0.5197493433952332, 0.689499020576477, 0.08178286254405975, 0.009242117404937744, 0.49458158016204834, 0.1767173409461975, -0.24529501795768738, 0.41276976466178894, 0.26976335048675537, 0.8645780086517334, -0.05931515991687775, 0.09003791213035583, 0.20005321502685547, 0.023522570729255676, 0.6788662672042847, -0.428003191947937, -0.0011565051972866058, -0.32724350690841675, 0.042904842644929886, -0.12143117189407349, 0.006488330662250519, 0.16691970825195312, 0.12007160484790802, 0.012555688619613647, 0.3641815781593323, 0.18648816645145416, 0.4299897253513336, 0.035345375537872314, 0.2756193280220032, -0.08967564254999161, -0.27063071727752686, -0.26430436968803406, 0.11920001357793808, -0.1618737131357193, 0.46239548921585083, -0.13789857923984528, 0.010794088244438171, -0.15029481053352356, -0.2740464210510254, -0.483691930770874, 0.09280627965927124, -0.37613216042518616, 0.24551182985305786, -0.28231000900268555, -0.5893147587776184, 0.09548478573560715, 0.41412171721458435, 0.0882982462644577, 0.13045227527618408, -0.32532671093940735, 0.2680308222770691, -0.39495110511779785, -0.2294534593820572, 0.019693437963724136, 0.03471864014863968, 0.26475492119789124, -0.1290961652994156, -0.11828811466693878, 0.2434040755033493, -0.27056556940078735, -0.1732780635356903, 0.07750357687473297, -0.024725567549467087, 0.3564826250076294, -0.030567368492484093, -0.19580724835395813, -0.04531443119049072, -0.010347284376621246, -0.17267973721027374, 0.14859353005886078, -0.16173061728477478, -0.04587447643280029, -0.20752373337745667, -0.05068293586373329, -0.10295815765857697, -0.0005390914157032967, 0.46069028973579407, -0.006708668079227209, -0.060444630682468414, 0.5905200242996216, 0.291015625, -0.14054538309574127, -0.15619969367980957, 0.23506900668144226, -0.18638312816619873, -0.36392951011657715, -0.0955030769109726, -0.11704616993665695, 0.2345811277627945, -0.24539606273174286, 0.21294230222702026, 0.11848849058151245, -0.2985597252845764, 0.08266736567020416, -0.48584240674972534, -0.01716398075222969, 0.26600396633148193, -0.10568366944789886, -0.0019213310442864895, 0.11444792151451111, -0.1607837975025177, 0.205468088388443, -0.26108571887016296, -0.2542439103126526, -0.03385838121175766, -0.12645003199577332, 0.04462430626153946, 0.45443612337112427, 0.10751070082187653, -0.09272274374961853, 0.005097940564155579, 0.08181526511907578, -0.057133082300424576, -0.021825283765792847, -0.17384187877178192, -0.09327942132949829, 0.17198003828525543, 0.021776322275400162, -0.006694380193948746, -0.008010312914848328, -0.35414767265319824, -0.12728473544120789, -0.22667960822582245, -0.004634276032447815, 0.026829928159713745, -0.05507519841194153, 0.18323609232902527, 0.22403718531131744, 0.2401917725801468, -0.5050418972969055, 0.1643078476190567, -0.05438116192817688, 0.4190565347671509, 0.025088302791118622, 0.21531632542610168, 0.39520174264907837, -0.061874620616436005, -0.5092476010322571, 0.03799905627965927, -0.17328305542469025, -0.039862602949142456, 0.42987096309661865, -0.1470181941986084, -0.00382918119430542, 0.3773423731327057, 0.13990284502506256, 0.0831916332244873, -0.34155574440956116, 0.01994561403989792, 0.07045181840658188, 0.16447898745536804, -0.3443927466869354, 0.11655272543430328, 0.4127361476421356, 0.03269554674625397, -0.131616473197937, 0.12508824467658997, 0.23634397983551025, -0.32168543338775635, -0.0668511837720871, 0.26705464720726013, 0.24480833113193512, -0.25473901629447937, 0.2715740501880646, 0.22919680178165436, 0.24280418455600739, 0.26442787051200867, -0.07873696833848953, -0.039925988763570786, 0.13757938146591187, 0.5122400522232056, -0.07425770908594131, 0.389813095331192, 0.28792983293533325, 0.04732735827565193, -0.08641423285007477, -0.377344012260437, 0.1560211479663849, 0.12837329506874084, -0.09260186553001404, 0.09354610741138458, -0.05037643387913704, 0.20632155239582062, 0.12661920487880707, 0.1693757027387619, -0.42418813705444336, 0.18939213454723358, -0.03245988488197327, 0.16181954741477966, -0.321454793214798, -0.32889124751091003, -0.004109703004360199, 0.13375209271907806, 0.22711516916751862, -0.3611266314983368, 0.43329882621765137, 0.17500703036785126, -0.22094270586967468, -0.39854246377944946, 0.4563733637332916, 0.024986162781715393, 0.11400001496076584, -0.26601216197013855, -0.0016020648181438446, 0.15110403299331665, -0.07484142482280731, 0.008084692060947418, 0.2161405235528946, 0.27209043502807617, 0.2231326848268509, -0.2945263981819153, -0.12722574174404144, 0.03823305666446686, -0.07420296967029572, -0.07004401832818985, 0.28571170568466187, 0.04565330594778061, 0.02744198963046074, 0.35821762681007385, 0.12818971276283264, -0.1813438981771469, -0.4286745488643646, 0.38398870825767517, 0.09785723686218262, -0.3138349652290344, 0.04621519148349762, -0.38295769691467285, -0.11157234013080597, -0.1452925205230713, 0.0005905777215957642, -0.3480801284313202, 0.04515409469604492, 0.259199857711792, 0.25767582654953003, -0.025033671408891678, -0.23011226952075958, 0.05497176945209503, -0.2527860403060913, 0.33211660385131836, 0.3640846014022827, 0.14522354304790497, -0.38995876908302307, -0.3511403203010559, -0.6921958327293396, 0.054494768381118774, -0.1848009079694748, -0.23179957270622253, 0.08281935751438141, 0.3110507130622864, -0.028099678456783295, 0.3337598741054535, -0.04065442085266113, -0.07736138999462128, 0.16070857644081116, 0.3248260021209717, -0.28731781244277954, -0.40428662300109863, -0.06382826715707779, 0.0864182561635971, -0.21143224835395813, -0.4531659483909607, 0.10476581752300262, -0.16493676602840424, 0.013729721307754517, -0.16079503297805786, -0.38983795046806335, 0.2652856707572937, -0.0673760175704956, 0.4324270486831665, -0.05387566611170769, 0.39243340492248535, -0.05821075290441513, -0.0875108540058136, -0.21979081630706787, 0.014988254755735397, 0.053239937871694565, 0.30488771200180054, -0.240267813205719, 0.28778988122940063, -0.09056515991687775, -0.05319783091545105, -0.25383496284484863, 0.3182835876941681, -0.054711274802684784, 0.18437254428863525, -0.4721200466156006, 0.0743207186460495, -0.3485749661922455, 0.2747611105442047, 0.05097873881459236, 0.15108753740787506, -0.18647851049900055, 0.15775755047798157, -0.18692144751548767, -0.41533854603767395, 0.2618967592716217, -0.8150479793548584, -0.273074209690094, -0.048382241278886795, 0.1757446527481079, -0.1388830840587616, 0.15567085146903992, -0.4628479778766632, 0.12014931440353394, 0.416566401720047, 0.045001477003097534, -0.01812569797039032, -0.06733665615320206, -0.176459401845932, 0.05898655205965042, 0.02759893238544464, 0.07306680828332901, -0.05998404324054718, -0.14582648873329163, -0.07875838875770569, -0.3059701919555664 ]
https://github.com/huggingface/datasets/issues/6541
This is a problem with your environment. You should be able to fix it by upgrading `numpy` based on [this](https://github.com/numpy/numpy/issues/23570) issue.
Dataset not loading successfully.
### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No
21
Dataset not loading successfully. ### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No This is a problem with your environment. You should be able to fix it by upgrading `numpy` based on [this](https://github.com/numpy/numpy/issues/23570) issue.
[ -0.23438847064971924, -0.3350293040275574, 0.06285360455513, 0.4334274232387543, 0.47662264108657837, -0.10106334835290909, 0.43459445238113403, 0.1095186322927475, 0.12539657950401306, 0.29031631350517273, -0.3058722913265228, 0.24882371723651886, -0.28929731249809265, -0.003888435661792755, 0.19231298565864563, -0.00970418006181717, 0.023877408355474472, 0.1954306811094284, -0.008142072707414627, -0.2456541210412979, -0.19157202541828156, 0.2406691461801529, -0.3996373414993286, 0.17748725414276123, -0.4194883704185486, -0.06738832592964172, 0.32403692603111267, 0.19395002722740173, -0.11070574820041656, -0.4173997938632965, 0.26217547059059143, -0.3125990629196167, 0.31800946593284607, 0.38047879934310913, -0.00012031303776893765, 0.24640056490898132, 0.5512852668762207, -0.16475312411785126, -0.27835655212402344, -0.06924595683813095, 0.06830485165119171, 0.09302637726068497, -0.013693444430828094, 0.11106741428375244, -0.24708274006843567, 0.14441943168640137, -0.223147451877594, -0.18724775314331055, 0.4866816997528076, 0.35635513067245483, 0.1301165670156479, 0.6396480798721313, 0.2268131822347641, 0.1363770216703415, 0.0383913479745388, 0.2183842658996582, -0.12043151259422302, 0.07736687362194061, 0.09992638230323792, -0.06356549263000488, 0.13282811641693115, 0.3650335371494293, -0.0467258095741272, 0.024706650525331497, 0.4404199719429016, 0.14971937239170074, 0.4273488223552704, -0.5112829208374023, -0.17965850234031677, 0.30830225348472595, 0.08672980964183807, -0.043184321373701096, -0.27332258224487305, -0.1498146951198578, -0.07396408915519714, -0.40205052495002747, 0.021755918860435486, -0.0023497939109802246, -0.24494512379169464, -0.009265070781111717, -0.22350917756557465, 0.08385099470615387, 0.023974329233169556, 0.16503936052322388, 0.08004113286733627, 0.4140673279762268, -0.059069473296403885, 0.04963722452521324, 0.014258742332458496, -0.18153116106987, 0.04586434364318848, 0.031510476022958755, -0.0617445632815361, 0.3646732270717621, -0.5112243890762329, -0.12562009692192078, -0.013085346668958664, -0.4228315055370331, 0.15278436243534088, 0.0072188060730695724, -0.047394901514053345, -0.05398900434374809, -0.06132505461573601, 0.12581108510494232, 0.23736988008022308, 0.21051964163780212, 0.014636666513979435, 0.07325403392314911, 0.06319271773099899, 0.22507192194461823, 0.42682376503944397, -0.0009608007967472076, -0.18732085824012756, 0.05594851076602936, 0.06060396134853363, 0.03604084998369217, 0.27881669998168945, -0.3956502676010132, -0.3895747661590576, -0.05840259790420532, -0.20384523272514343, -0.1641702950000763, 0.227483332157135, 0.4749464690685272, 0.016802389174699783, 0.14616085588932037, 0.14014677703380585, 0.1375402957201004, -0.3047604560852051, -0.2154458612203598, -0.21104447543621063, -0.008113371208310127, -0.25698214769363403, 0.04984024912118912, 0.08899353444576263, 0.18582533299922943, 0.2721630930900574, -0.13882772624492645, 0.2616540193557739, -0.1627454161643982, 0.0642547607421875, -0.08848525583744049, -0.0733458548784256, 0.39676132798194885, -0.26772406697273254, -0.001783125102519989, -0.049112968146800995, -0.343792587518692, -0.009709909558296204, 0.03477415442466736, -0.15961623191833496, -0.2823835611343384, 0.13646717369556427, 0.11167246103286743, -0.06788109242916107, 0.02287977561354637, -0.2750296890735626, -0.08533795922994614, 0.3868095278739929, -0.2365071326494217, 0.07500800490379333, -0.34221094846725464, -0.3093253970146179, 0.09200392663478851, 0.5923802256584167, 0.6410744786262512, 0.024744302034378052, -0.47498196363449097, 0.11923126876354218, -0.23080772161483765, 0.0884590670466423, 0.4773505926132202, -0.05087815597653389, -0.17750771343708038, -0.30502405762672424, 0.032312363386154175, 0.40190839767456055, -0.37713199853897095, -0.43298548460006714, 0.12376904487609863, -0.21873190999031067, 0.08808090537786484, -0.038376521319150925, 0.03327339515089989, -0.20531544089317322, -0.2246682345867157, 0.2675780653953552, 0.28766801953315735, 0.2032138854265213, 0.01156480610370636, -0.31235745549201965, -0.27188199758529663, 0.24664165079593658, 0.3167061507701874, -0.09085433930158615, 0.1907789409160614, -0.04962250217795372, 0.23350301384925842, 0.29265400767326355, 0.022221092134714127, -0.08754837512969971, 0.10630612075328827, 0.3155529797077179, -0.1481197327375412, 0.012397423386573792, -0.12289904057979584, -0.32122477889060974, 0.21331050992012024, -0.5302758812904358, 0.376913845539093, -0.2067185491323471, 0.15795838832855225, -0.15098129212856293, 0.05238422006368637, -0.41019928455352783, -0.4750290811061859, -0.02169140800833702, 0.12363652884960175, 0.14209885895252228, 0.08310987055301666, -0.3491266369819641, 0.393544465303421, -0.15688279271125793, 0.11253547668457031, -0.8096958994865417, 0.2473006397485733, -0.12919184565544128, -0.20173430442810059, 0.04673115909099579, 0.4648350477218628, 0.2675110995769501, -0.11771568655967712, -0.21095851063728333, 0.4545469880104065, -0.15180370211601257, -0.17924973368644714, -0.605415403842926, -0.022297076880931854, 0.3142143189907074, -0.6065157055854797, 0.08222101628780365, 0.21276307106018066, 0.06554026156663895, 0.00020594894886016846, 0.09006845951080322, 0.1399945318698883, 0.16810807585716248, 0.29616081714630127, 0.01527385413646698, 0.05019184947013855, 0.020707808434963226, 0.06244085729122162, -0.03719508275389671, 0.03684091567993164, 0.31734076142311096, -0.20135915279388428, 0.3078652620315552, 0.0024839267134666443, 0.013944543898105621, -0.45237496495246887, 0.27101826667785645, -0.15823569893836975, 0.10791562497615814, 0.1816784143447876, -0.5091333389282227, -0.09420144557952881, -0.09494785219430923, 0.11264970898628235, 0.47480282187461853, 0.012556210160255432, -0.3459683358669281, 0.015682952478528023, -0.04347474128007889, -0.05923403427004814, 0.1162559986114502, 0.022990141063928604, 0.08372291922569275, 0.2572965919971466, -0.015503177419304848, 0.11156711727380753, -0.3163834810256958, -0.3513840436935425, 0.06960979849100113, 0.2853474020957947, -0.5560730695724487, 0.025600753724575043, 0.10112182796001434, 0.12388370931148529, -0.271146684885025, 0.1344144642353058, -0.33135977387428284, 0.09181001782417297, -0.16644364595413208, -0.07090675830841064, 0.11827223002910614, 0.2603888213634491, -0.015279598534107208, -0.09322190284729004, 0.1403355598449707, 0.05110928416252136, -0.2837863862514496, 0.00029972195625305176, -0.18637193739414215, -0.08641587197780609, 0.008324511349201202, 0.05184938758611679, -0.13148300349712372, -0.027279019355773926, -0.19809803366661072, 0.27917027473449707, -0.15177857875823975, 0.19030910730361938, 0.07031220197677612, 0.43732398748397827, -0.07560048997402191, 0.16602793335914612, 0.18435215950012207, -0.3553646206855774, 0.38580042123794556, -0.08324278146028519, -0.13658660650253296, 0.2658621668815613, 0.06897669285535812, -0.21784016489982605, -0.15502889454364777, -0.4603607654571533, -0.47779715061187744, -0.3952280282974243, -0.06605656445026398, -0.14174827933311462, 0.013023539446294308, 0.5893926620483398, 0.0720871239900589, 0.15606854856014252, -0.2587343156337738, 0.09598670154809952, -0.08461734652519226, -0.005393259227275848, 0.4703007638454437, -0.11862393468618393, -0.31081414222717285, -0.22867807745933533, -0.05252555012702942, -0.11115801334381104, -0.08368206769227982, -0.4437512755393982, -0.045817166566848755, -0.20678146183490753, -0.3540295660495758, -0.00692384596914053, -0.07336892932653427, 0.1547655165195465, 0.030188988894224167, 0.08519512414932251, 0.08802534639835358, -0.32666176557540894, -0.03349164128303528, 0.10230565071105957, 0.32599711418151855, 0.00920194387435913, 0.30960899591445923, -0.12060078233480453, 0.514532208442688, 0.2852513790130615, -0.30804598331451416, 0.1585943102836609, -0.08860373497009277, 0.0181196890771389, -0.03097759559750557, -0.2465682327747345, 0.01237281784415245, 0.1069074496626854, 0.09079393744468689, 0.0010282956063747406, -0.019290437921881676, 0.1211046427488327, -0.21845762431621552, -0.08240153640508652, 0.15962104499340057, -0.1415736824274063, -0.10656966269016266, 0.1059209555387497, 0.23035970330238342, -0.037473615258932114, 0.4143996834754944, 0.46003714203834534, -0.0064618587493896484, 0.2905214726924896, 0.4800134599208832, 0.23437103629112244, 0.05661682412028313, -0.5030889511108398, 0.17936669290065765, -0.20834198594093323, 0.10003672540187836, -0.013848714530467987, 0.6592628955841064, -0.1274966597557068, -0.05621493607759476, 0.062355972826480865, -0.09539917856454849, 0.6158280968666077, 0.07904256880283356, 0.3033108711242676, 0.10466638207435608, 0.09046533703804016, -0.2795730233192444, -0.01665419340133667, 0.029052212834358215, -0.2822458744049072, -0.07655146718025208, 0.30315786600112915, -0.07367771118879318, -0.09732403606176376, 0.173629030585289, 0.21752743422985077, -0.2057144045829773, -0.025413960218429565, -0.3672518730163574, -0.18750041723251343, -0.4026106595993042, 0.09445858746767044, -0.1729569435119629, 0.17452549934387207, 0.10217098146677017, 0.05096086114645004, 0.04170230031013489, -0.0956650823354721, 0.18876540660858154, 0.10543790459632874, 0.42972898483276367, 0.020343221724033356, 0.3289579749107361, 0.3190152049064636, 0.05976932868361473, 0.1852148175239563, 0.4724421501159668, -0.10557128489017487, -0.381122887134552, -0.008652869611978531, 0.1460508406162262, 0.28388893604278564, 0.16257113218307495, 0.08690189570188522, 0.022015094757080078, 0.5249762535095215, 0.056620776653289795, -0.1900882124900818, -0.01875464990735054, 0.2666785418987274, -0.06843945384025574, -0.19796985387802124, -0.3377669155597687, 0.6889947056770325, -0.07912106066942215, 0.018481716513633728, -0.03299522399902344, 0.02867813967168331, -0.04892800375819206, 0.42892786860466003, -0.06670668721199036, 0.8465297222137451, 0.12801241874694824, 0.04809335619211197, 0.292508065700531, -0.01889624446630478, 0.18394702672958374, -0.5831100344657898, 0.023514769971370697, -0.2247413992881775, -0.10064969211816788, 0.03163313865661621, -0.2603111267089844, -0.025947730988264084, 0.05966128036379814, -0.08726150542497635, 0.2274342179298401, 0.019875138998031616, -0.23103545606136322, 0.012518946081399918, 0.28219953179359436, 0.04079967737197876, -0.1655595600605011, 0.05670956149697304, 0.002442196011543274, -0.16477352380752563, 0.5717599987983704, 0.08949702978134155, -0.10123953223228455, 0.07259216159582138, -0.2510277330875397, -0.11653071641921997, 0.42953795194625854, -0.26523274183273315, 0.01611807942390442, 0.372793972492218, -0.4153828024864197, 0.5313196182250977, 0.1662169098854065, 0.10273671895265579, 0.24748657643795013, -0.20787103474140167, 0.22246377170085907, 0.2385983169078827, 0.16500934958457947, -0.15036532282829285, 0.1241111308336258, 0.14620251953601837, 0.023713164031505585, -0.2011260986328125, 0.05538652837276459, -0.14513984322547913, -0.05845634639263153, 0.029195979237556458, 0.01538211852312088, 0.1878442019224167, -0.2644806206226349, 0.03315471485257149, 0.04978085309267044, 0.07010554522275925, -0.13557326793670654, 0.11675053834915161, 0.3559403419494629, -0.5042514801025391, -0.15054044127464294, 0.2411980926990509, -0.21919387578964233, -0.015418671071529388, 0.36208802461624146, -0.13452304899692535, -0.18639400601387024, 0.65464186668396, 0.2729581594467163, 0.000716380774974823, -0.18624746799468994, -0.12670855224132538, 0.2749946117401123, -0.7631402015686035, 0.11795595288276672, 0.17511551082134247, -0.008846327662467957, -0.1904214322566986, 0.408599853515625, 0.08841343224048615, -0.24154682457447052, -0.20024198293685913, -0.4221113622188568, -0.44687947630882263, 0.23943272233009338, -0.12776026129722595, 0.20296995341777802, -0.1667061448097229, 0.11591699719429016, -0.022529244422912598, 0.17383846640586853, -0.2450716644525528, -0.0036325976252555847, -0.14312440156936646, 0.11530323326587677, 0.3670766353607178, -0.20225031673908234, 0.2619225084781647, -0.12938623130321503, 0.03155681490898132, 0.229607954621315, -0.2939411401748657, -0.058213040232658386, -0.17710623145103455, 0.16879545152187347, 0.016726456582546234, -0.24855346977710724, -0.135422483086586, 0.07637326419353485, 0.1470710188150406, -0.1148725301027298, 0.06079468876123428, 0.0313212126493454, -0.07040159404277802, 0.3685798943042755, -0.09430791437625885, -0.022474508732557297, -0.4142129719257355, 0.1483006626367569, -0.2709144949913025, -0.028539098799228668, 0.16189178824424744, -0.06540849804878235, -0.009075634181499481, 0.028744280338287354, -0.3944200277328491, -0.030334431678056717, -0.0575127899646759, 0.007855912670493126, 0.2673736810684204, -0.38128897547721863, -0.002588406205177307, -0.06762928515672684, 0.027869991958141327, 0.15179578959941864, -0.2128884196281433, -0.004329249262809753, 0.15913456678390503, 0.10453785210847855, -0.2384478896856308, -0.031194966286420822, -0.048500292003154755, -0.014932161197066307, 0.05984652042388916, 0.2293986827135086, 0.08185882866382599, 0.0572822242975235, -0.07614749670028687, 0.2177858054637909, 0.2604515254497528, -0.24676792323589325, 0.197440505027771, 0.6288747191429138, -0.019402630627155304, 0.12409251928329468, 0.0371185764670372, -0.16018836200237274, 0.012889914214611053, 0.4978620409965515, -0.2939940392971039, 0.1566222757101059, -0.2650279402732849, 0.16399046778678894, -0.13910403847694397, -0.3206348419189453, -0.10984019190073013, 0.07114854454994202, -0.012643635272979736, 0.2669651210308075, 0.06503018736839294, 0.6184885501861572, -0.10790932178497314, 0.08988609910011292, 0.06561628729104996, 0.08666795492172241, -0.13524353504180908, -0.023759745061397552, -0.021891899406909943, 0.02565060555934906, -0.4565442204475403, 0.05569462478160858, -0.0020932587794959545, -0.11058877408504486, 0.1262666881084442, 0.13307756185531616, -0.29181230068206787, 0.025856241583824158, -0.201679989695549, 0.5281713604927063, 0.06677761673927307, -0.26957565546035767, 0.28798413276672363, 0.5224602818489075, -0.2448056936264038, 0.19125646352767944, 0.23667798936367035, 0.5199190974235535, 0.29884377121925354, -0.16683170199394226, 0.3531171977519989, 0.1617753803730011, -0.12275498360395432, 0.09071768820285797, 0.2359623908996582, 0.21585772931575775, 0.05745707079768181, 0.05667419359087944, 0.027252119034528732, -0.18102847039699554, -0.10651610791683197, -0.07788018137216568, 0.1526496708393097, -0.35207289457321167, 0.9680817127227783, -0.38225677609443665, -0.18960201740264893, -0.39002734422683716, -0.15260431170463562, -0.4545285701751709, 0.21092146635055542, 0.3689022362232208, 0.025646883994340897, 0.002511013299226761, -0.04637742415070534, 0.00834556296467781, -0.1366787701845169, 0.43441110849380493, 0.32892897725105286, 0.29182878136634827, -0.3403297960758209, 0.23670567572116852, -0.7051169872283936, 0.005213860422372818, 0.13191227614879608, 0.011282458901405334, -0.011979013681411743, -0.1158788800239563, 0.0036321431398391724, 0.1650361716747284, -0.15560908615589142, -0.12223204970359802, 0.014230743050575256, 0.18568947911262512, -0.18004140257835388, -0.1035049557685852, -0.22117307782173157, 0.3196866810321808, 0.10709435492753983, -0.37455424666404724, 0.03756717965006828, 0.01821257919073105, -0.09612435102462769, -0.06613046675920486, -0.05517692118883133, -0.16753290593624115, -0.10706232488155365, 0.37737351655960083, 0.13638871908187866, 0.6575392484664917, -0.10647173225879669, -0.2366025447845459, 0.003033870831131935, -0.10943001508712769, -0.034953147172927856, -0.10203030705451965, 0.34084922075271606, 0.7112773060798645, -0.10585632175207138, -0.2927047312259674, -0.5408525466918945, 0.19859746098518372, -0.10063380748033524, -0.2316669225692749, -0.42080366611480713, 0.26502421498298645, -0.174640491604805, -0.005563918501138687, 0.26633453369140625, -0.0146778654307127, 0.08799204230308533, -0.10520458221435547, -0.3692778944969177, -0.32441556453704834, 0.5938013195991516, -0.22752749919891357, -0.09664379060268402, -0.22398437559604645, 0.26378703117370605, 0.005955837666988373, -0.2528497278690338, -0.7120816707611084, 0.1737963855266571, 0.25653520226478577, 0.07226689159870148, -0.3041287660598755, 0.12370435893535614, 0.23579668998718262, -0.1790582239627838, -0.09826084971427917, 0.5251138210296631, 0.15298649668693542, -0.11921736598014832, 0.2508082687854767, -0.1958537995815277 ]
https://github.com/huggingface/datasets/issues/6541
Then, this shouldn't throw an error on your machine: ```python import numpy numpy._no_nep50_warning ``` If it does, run `python -m pip install numpy` to ensure the correct `pip` is used for the package installation.
Dataset not loading successfully.
### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No
34
Dataset not loading successfully. ### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No Then, this shouldn't throw an error on your machine: ```python import numpy numpy._no_nep50_warning ``` If it does, run `python -m pip install numpy` to ensure the correct `pip` is used for the package installation.
[ -0.23438847064971924, -0.3350293040275574, 0.06285360455513, 0.4334274232387543, 0.47662264108657837, -0.10106334835290909, 0.43459445238113403, 0.1095186322927475, 0.12539657950401306, 0.29031631350517273, -0.3058722913265228, 0.24882371723651886, -0.28929731249809265, -0.003888435661792755, 0.19231298565864563, -0.00970418006181717, 0.023877408355474472, 0.1954306811094284, -0.008142072707414627, -0.2456541210412979, -0.19157202541828156, 0.2406691461801529, -0.3996373414993286, 0.17748725414276123, -0.4194883704185486, -0.06738832592964172, 0.32403692603111267, 0.19395002722740173, -0.11070574820041656, -0.4173997938632965, 0.26217547059059143, -0.3125990629196167, 0.31800946593284607, 0.38047879934310913, -0.00012031303776893765, 0.24640056490898132, 0.5512852668762207, -0.16475312411785126, -0.27835655212402344, -0.06924595683813095, 0.06830485165119171, 0.09302637726068497, -0.013693444430828094, 0.11106741428375244, -0.24708274006843567, 0.14441943168640137, -0.223147451877594, -0.18724775314331055, 0.4866816997528076, 0.35635513067245483, 0.1301165670156479, 0.6396480798721313, 0.2268131822347641, 0.1363770216703415, 0.0383913479745388, 0.2183842658996582, -0.12043151259422302, 0.07736687362194061, 0.09992638230323792, -0.06356549263000488, 0.13282811641693115, 0.3650335371494293, -0.0467258095741272, 0.024706650525331497, 0.4404199719429016, 0.14971937239170074, 0.4273488223552704, -0.5112829208374023, -0.17965850234031677, 0.30830225348472595, 0.08672980964183807, -0.043184321373701096, -0.27332258224487305, -0.1498146951198578, -0.07396408915519714, -0.40205052495002747, 0.021755918860435486, -0.0023497939109802246, -0.24494512379169464, -0.009265070781111717, -0.22350917756557465, 0.08385099470615387, 0.023974329233169556, 0.16503936052322388, 0.08004113286733627, 0.4140673279762268, -0.059069473296403885, 0.04963722452521324, 0.014258742332458496, -0.18153116106987, 0.04586434364318848, 0.031510476022958755, -0.0617445632815361, 0.3646732270717621, -0.5112243890762329, -0.12562009692192078, -0.013085346668958664, -0.4228315055370331, 0.15278436243534088, 0.0072188060730695724, -0.047394901514053345, -0.05398900434374809, -0.06132505461573601, 0.12581108510494232, 0.23736988008022308, 0.21051964163780212, 0.014636666513979435, 0.07325403392314911, 0.06319271773099899, 0.22507192194461823, 0.42682376503944397, -0.0009608007967472076, -0.18732085824012756, 0.05594851076602936, 0.06060396134853363, 0.03604084998369217, 0.27881669998168945, -0.3956502676010132, -0.3895747661590576, -0.05840259790420532, -0.20384523272514343, -0.1641702950000763, 0.227483332157135, 0.4749464690685272, 0.016802389174699783, 0.14616085588932037, 0.14014677703380585, 0.1375402957201004, -0.3047604560852051, -0.2154458612203598, -0.21104447543621063, -0.008113371208310127, -0.25698214769363403, 0.04984024912118912, 0.08899353444576263, 0.18582533299922943, 0.2721630930900574, -0.13882772624492645, 0.2616540193557739, -0.1627454161643982, 0.0642547607421875, -0.08848525583744049, -0.0733458548784256, 0.39676132798194885, -0.26772406697273254, -0.001783125102519989, -0.049112968146800995, -0.343792587518692, -0.009709909558296204, 0.03477415442466736, -0.15961623191833496, -0.2823835611343384, 0.13646717369556427, 0.11167246103286743, -0.06788109242916107, 0.02287977561354637, -0.2750296890735626, -0.08533795922994614, 0.3868095278739929, -0.2365071326494217, 0.07500800490379333, -0.34221094846725464, -0.3093253970146179, 0.09200392663478851, 0.5923802256584167, 0.6410744786262512, 0.024744302034378052, -0.47498196363449097, 0.11923126876354218, -0.23080772161483765, 0.0884590670466423, 0.4773505926132202, -0.05087815597653389, -0.17750771343708038, -0.30502405762672424, 0.032312363386154175, 0.40190839767456055, -0.37713199853897095, -0.43298548460006714, 0.12376904487609863, -0.21873190999031067, 0.08808090537786484, -0.038376521319150925, 0.03327339515089989, -0.20531544089317322, -0.2246682345867157, 0.2675780653953552, 0.28766801953315735, 0.2032138854265213, 0.01156480610370636, -0.31235745549201965, -0.27188199758529663, 0.24664165079593658, 0.3167061507701874, -0.09085433930158615, 0.1907789409160614, -0.04962250217795372, 0.23350301384925842, 0.29265400767326355, 0.022221092134714127, -0.08754837512969971, 0.10630612075328827, 0.3155529797077179, -0.1481197327375412, 0.012397423386573792, -0.12289904057979584, -0.32122477889060974, 0.21331050992012024, -0.5302758812904358, 0.376913845539093, -0.2067185491323471, 0.15795838832855225, -0.15098129212856293, 0.05238422006368637, -0.41019928455352783, -0.4750290811061859, -0.02169140800833702, 0.12363652884960175, 0.14209885895252228, 0.08310987055301666, -0.3491266369819641, 0.393544465303421, -0.15688279271125793, 0.11253547668457031, -0.8096958994865417, 0.2473006397485733, -0.12919184565544128, -0.20173430442810059, 0.04673115909099579, 0.4648350477218628, 0.2675110995769501, -0.11771568655967712, -0.21095851063728333, 0.4545469880104065, -0.15180370211601257, -0.17924973368644714, -0.605415403842926, -0.022297076880931854, 0.3142143189907074, -0.6065157055854797, 0.08222101628780365, 0.21276307106018066, 0.06554026156663895, 0.00020594894886016846, 0.09006845951080322, 0.1399945318698883, 0.16810807585716248, 0.29616081714630127, 0.01527385413646698, 0.05019184947013855, 0.020707808434963226, 0.06244085729122162, -0.03719508275389671, 0.03684091567993164, 0.31734076142311096, -0.20135915279388428, 0.3078652620315552, 0.0024839267134666443, 0.013944543898105621, -0.45237496495246887, 0.27101826667785645, -0.15823569893836975, 0.10791562497615814, 0.1816784143447876, -0.5091333389282227, -0.09420144557952881, -0.09494785219430923, 0.11264970898628235, 0.47480282187461853, 0.012556210160255432, -0.3459683358669281, 0.015682952478528023, -0.04347474128007889, -0.05923403427004814, 0.1162559986114502, 0.022990141063928604, 0.08372291922569275, 0.2572965919971466, -0.015503177419304848, 0.11156711727380753, -0.3163834810256958, -0.3513840436935425, 0.06960979849100113, 0.2853474020957947, -0.5560730695724487, 0.025600753724575043, 0.10112182796001434, 0.12388370931148529, -0.271146684885025, 0.1344144642353058, -0.33135977387428284, 0.09181001782417297, -0.16644364595413208, -0.07090675830841064, 0.11827223002910614, 0.2603888213634491, -0.015279598534107208, -0.09322190284729004, 0.1403355598449707, 0.05110928416252136, -0.2837863862514496, 0.00029972195625305176, -0.18637193739414215, -0.08641587197780609, 0.008324511349201202, 0.05184938758611679, -0.13148300349712372, -0.027279019355773926, -0.19809803366661072, 0.27917027473449707, -0.15177857875823975, 0.19030910730361938, 0.07031220197677612, 0.43732398748397827, -0.07560048997402191, 0.16602793335914612, 0.18435215950012207, -0.3553646206855774, 0.38580042123794556, -0.08324278146028519, -0.13658660650253296, 0.2658621668815613, 0.06897669285535812, -0.21784016489982605, -0.15502889454364777, -0.4603607654571533, -0.47779715061187744, -0.3952280282974243, -0.06605656445026398, -0.14174827933311462, 0.013023539446294308, 0.5893926620483398, 0.0720871239900589, 0.15606854856014252, -0.2587343156337738, 0.09598670154809952, -0.08461734652519226, -0.005393259227275848, 0.4703007638454437, -0.11862393468618393, -0.31081414222717285, -0.22867807745933533, -0.05252555012702942, -0.11115801334381104, -0.08368206769227982, -0.4437512755393982, -0.045817166566848755, -0.20678146183490753, -0.3540295660495758, -0.00692384596914053, -0.07336892932653427, 0.1547655165195465, 0.030188988894224167, 0.08519512414932251, 0.08802534639835358, -0.32666176557540894, -0.03349164128303528, 0.10230565071105957, 0.32599711418151855, 0.00920194387435913, 0.30960899591445923, -0.12060078233480453, 0.514532208442688, 0.2852513790130615, -0.30804598331451416, 0.1585943102836609, -0.08860373497009277, 0.0181196890771389, -0.03097759559750557, -0.2465682327747345, 0.01237281784415245, 0.1069074496626854, 0.09079393744468689, 0.0010282956063747406, -0.019290437921881676, 0.1211046427488327, -0.21845762431621552, -0.08240153640508652, 0.15962104499340057, -0.1415736824274063, -0.10656966269016266, 0.1059209555387497, 0.23035970330238342, -0.037473615258932114, 0.4143996834754944, 0.46003714203834534, -0.0064618587493896484, 0.2905214726924896, 0.4800134599208832, 0.23437103629112244, 0.05661682412028313, -0.5030889511108398, 0.17936669290065765, -0.20834198594093323, 0.10003672540187836, -0.013848714530467987, 0.6592628955841064, -0.1274966597557068, -0.05621493607759476, 0.062355972826480865, -0.09539917856454849, 0.6158280968666077, 0.07904256880283356, 0.3033108711242676, 0.10466638207435608, 0.09046533703804016, -0.2795730233192444, -0.01665419340133667, 0.029052212834358215, -0.2822458744049072, -0.07655146718025208, 0.30315786600112915, -0.07367771118879318, -0.09732403606176376, 0.173629030585289, 0.21752743422985077, -0.2057144045829773, -0.025413960218429565, -0.3672518730163574, -0.18750041723251343, -0.4026106595993042, 0.09445858746767044, -0.1729569435119629, 0.17452549934387207, 0.10217098146677017, 0.05096086114645004, 0.04170230031013489, -0.0956650823354721, 0.18876540660858154, 0.10543790459632874, 0.42972898483276367, 0.020343221724033356, 0.3289579749107361, 0.3190152049064636, 0.05976932868361473, 0.1852148175239563, 0.4724421501159668, -0.10557128489017487, -0.381122887134552, -0.008652869611978531, 0.1460508406162262, 0.28388893604278564, 0.16257113218307495, 0.08690189570188522, 0.022015094757080078, 0.5249762535095215, 0.056620776653289795, -0.1900882124900818, -0.01875464990735054, 0.2666785418987274, -0.06843945384025574, -0.19796985387802124, -0.3377669155597687, 0.6889947056770325, -0.07912106066942215, 0.018481716513633728, -0.03299522399902344, 0.02867813967168331, -0.04892800375819206, 0.42892786860466003, -0.06670668721199036, 0.8465297222137451, 0.12801241874694824, 0.04809335619211197, 0.292508065700531, -0.01889624446630478, 0.18394702672958374, -0.5831100344657898, 0.023514769971370697, -0.2247413992881775, -0.10064969211816788, 0.03163313865661621, -0.2603111267089844, -0.025947730988264084, 0.05966128036379814, -0.08726150542497635, 0.2274342179298401, 0.019875138998031616, -0.23103545606136322, 0.012518946081399918, 0.28219953179359436, 0.04079967737197876, -0.1655595600605011, 0.05670956149697304, 0.002442196011543274, -0.16477352380752563, 0.5717599987983704, 0.08949702978134155, -0.10123953223228455, 0.07259216159582138, -0.2510277330875397, -0.11653071641921997, 0.42953795194625854, -0.26523274183273315, 0.01611807942390442, 0.372793972492218, -0.4153828024864197, 0.5313196182250977, 0.1662169098854065, 0.10273671895265579, 0.24748657643795013, -0.20787103474140167, 0.22246377170085907, 0.2385983169078827, 0.16500934958457947, -0.15036532282829285, 0.1241111308336258, 0.14620251953601837, 0.023713164031505585, -0.2011260986328125, 0.05538652837276459, -0.14513984322547913, -0.05845634639263153, 0.029195979237556458, 0.01538211852312088, 0.1878442019224167, -0.2644806206226349, 0.03315471485257149, 0.04978085309267044, 0.07010554522275925, -0.13557326793670654, 0.11675053834915161, 0.3559403419494629, -0.5042514801025391, -0.15054044127464294, 0.2411980926990509, -0.21919387578964233, -0.015418671071529388, 0.36208802461624146, -0.13452304899692535, -0.18639400601387024, 0.65464186668396, 0.2729581594467163, 0.000716380774974823, -0.18624746799468994, -0.12670855224132538, 0.2749946117401123, -0.7631402015686035, 0.11795595288276672, 0.17511551082134247, -0.008846327662467957, -0.1904214322566986, 0.408599853515625, 0.08841343224048615, -0.24154682457447052, -0.20024198293685913, -0.4221113622188568, -0.44687947630882263, 0.23943272233009338, -0.12776026129722595, 0.20296995341777802, -0.1667061448097229, 0.11591699719429016, -0.022529244422912598, 0.17383846640586853, -0.2450716644525528, -0.0036325976252555847, -0.14312440156936646, 0.11530323326587677, 0.3670766353607178, -0.20225031673908234, 0.2619225084781647, -0.12938623130321503, 0.03155681490898132, 0.229607954621315, -0.2939411401748657, -0.058213040232658386, -0.17710623145103455, 0.16879545152187347, 0.016726456582546234, -0.24855346977710724, -0.135422483086586, 0.07637326419353485, 0.1470710188150406, -0.1148725301027298, 0.06079468876123428, 0.0313212126493454, -0.07040159404277802, 0.3685798943042755, -0.09430791437625885, -0.022474508732557297, -0.4142129719257355, 0.1483006626367569, -0.2709144949913025, -0.028539098799228668, 0.16189178824424744, -0.06540849804878235, -0.009075634181499481, 0.028744280338287354, -0.3944200277328491, -0.030334431678056717, -0.0575127899646759, 0.007855912670493126, 0.2673736810684204, -0.38128897547721863, -0.002588406205177307, -0.06762928515672684, 0.027869991958141327, 0.15179578959941864, -0.2128884196281433, -0.004329249262809753, 0.15913456678390503, 0.10453785210847855, -0.2384478896856308, -0.031194966286420822, -0.048500292003154755, -0.014932161197066307, 0.05984652042388916, 0.2293986827135086, 0.08185882866382599, 0.0572822242975235, -0.07614749670028687, 0.2177858054637909, 0.2604515254497528, -0.24676792323589325, 0.197440505027771, 0.6288747191429138, -0.019402630627155304, 0.12409251928329468, 0.0371185764670372, -0.16018836200237274, 0.012889914214611053, 0.4978620409965515, -0.2939940392971039, 0.1566222757101059, -0.2650279402732849, 0.16399046778678894, -0.13910403847694397, -0.3206348419189453, -0.10984019190073013, 0.07114854454994202, -0.012643635272979736, 0.2669651210308075, 0.06503018736839294, 0.6184885501861572, -0.10790932178497314, 0.08988609910011292, 0.06561628729104996, 0.08666795492172241, -0.13524353504180908, -0.023759745061397552, -0.021891899406909943, 0.02565060555934906, -0.4565442204475403, 0.05569462478160858, -0.0020932587794959545, -0.11058877408504486, 0.1262666881084442, 0.13307756185531616, -0.29181230068206787, 0.025856241583824158, -0.201679989695549, 0.5281713604927063, 0.06677761673927307, -0.26957565546035767, 0.28798413276672363, 0.5224602818489075, -0.2448056936264038, 0.19125646352767944, 0.23667798936367035, 0.5199190974235535, 0.29884377121925354, -0.16683170199394226, 0.3531171977519989, 0.1617753803730011, -0.12275498360395432, 0.09071768820285797, 0.2359623908996582, 0.21585772931575775, 0.05745707079768181, 0.05667419359087944, 0.027252119034528732, -0.18102847039699554, -0.10651610791683197, -0.07788018137216568, 0.1526496708393097, -0.35207289457321167, 0.9680817127227783, -0.38225677609443665, -0.18960201740264893, -0.39002734422683716, -0.15260431170463562, -0.4545285701751709, 0.21092146635055542, 0.3689022362232208, 0.025646883994340897, 0.002511013299226761, -0.04637742415070534, 0.00834556296467781, -0.1366787701845169, 0.43441110849380493, 0.32892897725105286, 0.29182878136634827, -0.3403297960758209, 0.23670567572116852, -0.7051169872283936, 0.005213860422372818, 0.13191227614879608, 0.011282458901405334, -0.011979013681411743, -0.1158788800239563, 0.0036321431398391724, 0.1650361716747284, -0.15560908615589142, -0.12223204970359802, 0.014230743050575256, 0.18568947911262512, -0.18004140257835388, -0.1035049557685852, -0.22117307782173157, 0.3196866810321808, 0.10709435492753983, -0.37455424666404724, 0.03756717965006828, 0.01821257919073105, -0.09612435102462769, -0.06613046675920486, -0.05517692118883133, -0.16753290593624115, -0.10706232488155365, 0.37737351655960083, 0.13638871908187866, 0.6575392484664917, -0.10647173225879669, -0.2366025447845459, 0.003033870831131935, -0.10943001508712769, -0.034953147172927856, -0.10203030705451965, 0.34084922075271606, 0.7112773060798645, -0.10585632175207138, -0.2927047312259674, -0.5408525466918945, 0.19859746098518372, -0.10063380748033524, -0.2316669225692749, -0.42080366611480713, 0.26502421498298645, -0.174640491604805, -0.005563918501138687, 0.26633453369140625, -0.0146778654307127, 0.08799204230308533, -0.10520458221435547, -0.3692778944969177, -0.32441556453704834, 0.5938013195991516, -0.22752749919891357, -0.09664379060268402, -0.22398437559604645, 0.26378703117370605, 0.005955837666988373, -0.2528497278690338, -0.7120816707611084, 0.1737963855266571, 0.25653520226478577, 0.07226689159870148, -0.3041287660598755, 0.12370435893535614, 0.23579668998718262, -0.1790582239627838, -0.09826084971427917, 0.5251138210296631, 0.15298649668693542, -0.11921736598014832, 0.2508082687854767, -0.1958537995815277 ]
https://github.com/huggingface/datasets/issues/6541
Your suggestion to run `python -m pip install numpy` proved to be successful, and my issue has been resolved. I am grateful for your assistance, @mariosasko
Dataset not loading successfully.
### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No
26
Dataset not loading successfully. ### Describe the bug When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning' I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099) ### Steps to reproduce the bug ## Reproduction Hi, please check this line of code, when I run Show attribute error. ``` from datasets import load_dataset from transformers import WhisperProcessor, WhisperForConditionalGeneration # Select an audio file and read it: ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") audio_sample = ds[0]["audio"] waveform = audio_sample["array"] sampling_rate = audio_sample["sampling_rate"] # Load the Whisper model in Hugging Face format: processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en") # Use the model and processor to transcribe the audio: input_features = processor( waveform, sampling_rate=sampling_rate, return_tensors="pt" ).input_features # Generate token ids predicted_ids = model.generate(input_features) # Decode token ids to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription[0] ``` **Attribute Error** ``` AttributeError Traceback (most recent call last) Cell In[9], line 6 4 # Select an audio file and read it: 5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ----> 6 audio_sample = ds[0]["audio"] 7 waveform = audio_sample["array"] 8 sampling_rate = audio_sample["sampling_rate"] File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key) 2793 def __getitem__(self, key): # noqa: F811 2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2795 return self._getitem(key) File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs) 2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) 2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2780 formatted_output = format_table( 2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2782 ) 2783 return formatted_output File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns) 627 python_formatter = PythonFormatter(features=formatter.features) 628 if format_columns is None: --> 629 return formatter(pa_table, query_type=query_type) 630 elif query_type == "column": 631 if key in format_columns: File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type) 394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 395 if query_type == "row": --> 396 return self.format_row(pa_table) 397 elif query_type == "column": 398 return self.format_column(pa_table) File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table) 435 return LazyRow(pa_table, self) 436 row = self.python_arrow_extractor().extract_row(pa_table) --> 437 row = self.python_features_decoder.decode_row(row) 438 return row File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row) 214 def decode_row(self, row: dict) -> dict: --> 215 return self.features.decode_example(row) if self.features else row File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ -> 1917 return { 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0) 1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None): 1904 """Decode example with custom feature decoding. 1905 1906 Args: (...) 1914 `dict[str, Any]` 1915 """ 1917 return { -> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) 1919 if self._column_requires_decoding[column_name] 1920 else value 1921 for column_name, (feature, value) in zip_dict( 1922 {key: value for key, value in self.items() if key in example}, example 1923 ) 1924 } File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id) 1336 elif isinstance(schema, (Audio, Image)): 1337 # we pass the token to read and decode files from private repositories in streaming mode 1338 if obj is not None and schema.decode: -> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) 1340 return obj File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id) 189 array = array.T 190 if self.mono: --> 191 array = librosa.to_mono(array) 192 if self.sampling_rate and self.sampling_rate != sampling_rate: 193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate) File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name) 76 submod_path = f"{package_name}.{attr_to_modules[name]}" 77 submod = importlib.import_module(submod_path) ---> 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. 83 if name == attr_to_modules[name]: File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name) 75 elif name in attr_to_modules: 76 submod_path = f"{package_name}.{attr_to_modules[name]}" ---> 77 submod = importlib.import_module(submod_path) 78 attr = getattr(submod, name) 80 # If the attribute lives in a file (module) with the same 81 # name as the attribute, ensure that the attribute and *not* 82 # the module is accessible on the package. File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:671, in _load_unlocked(spec) File <frozen importlib._bootstrap_external>:848, in exec_module(self, module) File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds) File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13 11 import audioread 12 import numpy as np ---> 13 import scipy.signal 14 import soxr 15 import lazy_loader as lazy File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323 314 from ._spline import ( # noqa: F401 315 cspline2d, 316 qspline2d, (...) 319 symiirorder2, 320 ) 322 from ._bsplines import * --> 323 from ._filter_design import * 324 from ._fir_filter_design import * 325 from ._ltisys import * File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16 13 from numpy.polynomial.polynomial import polyval as npp_polyval 14 from numpy.polynomial.polynomial import polyvalfromroots ---> 16 from scipy import special, optimize, fft as sp_fft 17 from scipy.special import comb 18 from scipy._lib._util import float_factorial File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405 1 """ 2 ===================================================== 3 Optimization and root finding (:mod:`scipy.optimize`) (...) 401 402 """ 404 from ._optimize import * --> 405 from ._minimize import * 406 from ._root import * 407 from ._root_scalar import * File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26 24 from ._trustregion_krylov import _minimize_trust_krylov 25 from ._trustregion_exact import _minimize_trustregion_exact ---> 26 from ._trustregion_constr import _minimize_trustregion_constr 28 # constrained minimization 29 from ._lbfgsb_py import _minimize_lbfgsb File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4 1 """This module contains the equality constrained SQP solver.""" ----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr 6 __all__ = ['_minimize_trustregion_constr'] File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5 3 from scipy.sparse.linalg import LinearOperator 4 from .._differentiable_functions import VectorFunction ----> 5 from .._constraints import ( 6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds) 7 from .._hessian_update_strategy import BFGS 8 from .._optimize import OptimizeResult File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8 6 from ._optimize import OptimizeWarning 7 from warnings import warn, catch_warnings, simplefilter ----> 8 from numpy.testing import suppress_warnings 9 from scipy.sparse import issparse 12 def _arr_to_scalar(x): 13 # If x is a numpy array, return x.item(). This will 14 # fail if the array has more than one element. File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11 8 from unittest import TestCase 10 from . import _private ---> 11 from ._private.utils import * 12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data) 13 from ._private import extbuild, decorators as dec File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480 476 pprint.pprint(desired, msg) 477 raise AssertionError(msg.getvalue()) --> 480 @np._no_nep50_warning() 481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True): 482 """ 483 Raises an AssertionError if two items are not equal up to desired 484 precision. (...) 548 549 """ 550 __tracebackhide__ = True # Hide traceback for py.test File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr) 305 raise AttributeError(__former_attrs__[attr]) 307 # Importing Tester requires importing all of UnitTest which is not a 308 # cheap import Since it is mainly used in test suits, we lazy import it 309 # here to save on the order of 10 ms of import time for most users 310 # 311 # The previous way Tester was imported also had a side effect of adding 312 # the full `numpy.testing` namespace --> 313 if attr == 'testing': 314 import numpy.testing as testing 315 return testing AttributeError: module 'numpy' has no attribute '_no_nep50_warning' ``` ### Expected behavior ``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ``` Also, make sure this script is provided for your official website so please update: [script](https://huggingface.co/docs/transformers/model_doc/whisper) ### Environment info **System Info** * transformers -> 4.36.1 * datasets -> 2.15.0 * huggingface_hub -> 0.19.4 * python -> 3.8.10 * accelerate -> 0.25.0 * pytorch -> 2.0.1+cpu * Using GPU in Script -> No Your suggestion to run `python -m pip install numpy` proved to be successful, and my issue has been resolved. I am grateful for your assistance, @mariosasko
[ -0.23438847064971924, -0.3350293040275574, 0.06285360455513, 0.4334274232387543, 0.47662264108657837, -0.10106334835290909, 0.43459445238113403, 0.1095186322927475, 0.12539657950401306, 0.29031631350517273, -0.3058722913265228, 0.24882371723651886, -0.28929731249809265, -0.003888435661792755, 0.19231298565864563, -0.00970418006181717, 0.023877408355474472, 0.1954306811094284, -0.008142072707414627, -0.2456541210412979, -0.19157202541828156, 0.2406691461801529, -0.3996373414993286, 0.17748725414276123, -0.4194883704185486, -0.06738832592964172, 0.32403692603111267, 0.19395002722740173, -0.11070574820041656, -0.4173997938632965, 0.26217547059059143, -0.3125990629196167, 0.31800946593284607, 0.38047879934310913, -0.00012031303776893765, 0.24640056490898132, 0.5512852668762207, -0.16475312411785126, -0.27835655212402344, -0.06924595683813095, 0.06830485165119171, 0.09302637726068497, -0.013693444430828094, 0.11106741428375244, -0.24708274006843567, 0.14441943168640137, -0.223147451877594, -0.18724775314331055, 0.4866816997528076, 0.35635513067245483, 0.1301165670156479, 0.6396480798721313, 0.2268131822347641, 0.1363770216703415, 0.0383913479745388, 0.2183842658996582, -0.12043151259422302, 0.07736687362194061, 0.09992638230323792, -0.06356549263000488, 0.13282811641693115, 0.3650335371494293, -0.0467258095741272, 0.024706650525331497, 0.4404199719429016, 0.14971937239170074, 0.4273488223552704, -0.5112829208374023, -0.17965850234031677, 0.30830225348472595, 0.08672980964183807, -0.043184321373701096, -0.27332258224487305, -0.1498146951198578, -0.07396408915519714, -0.40205052495002747, 0.021755918860435486, -0.0023497939109802246, -0.24494512379169464, -0.009265070781111717, -0.22350917756557465, 0.08385099470615387, 0.023974329233169556, 0.16503936052322388, 0.08004113286733627, 0.4140673279762268, -0.059069473296403885, 0.04963722452521324, 0.014258742332458496, -0.18153116106987, 0.04586434364318848, 0.031510476022958755, -0.0617445632815361, 0.3646732270717621, -0.5112243890762329, -0.12562009692192078, -0.013085346668958664, -0.4228315055370331, 0.15278436243534088, 0.0072188060730695724, -0.047394901514053345, -0.05398900434374809, -0.06132505461573601, 0.12581108510494232, 0.23736988008022308, 0.21051964163780212, 0.014636666513979435, 0.07325403392314911, 0.06319271773099899, 0.22507192194461823, 0.42682376503944397, -0.0009608007967472076, -0.18732085824012756, 0.05594851076602936, 0.06060396134853363, 0.03604084998369217, 0.27881669998168945, -0.3956502676010132, -0.3895747661590576, -0.05840259790420532, -0.20384523272514343, -0.1641702950000763, 0.227483332157135, 0.4749464690685272, 0.016802389174699783, 0.14616085588932037, 0.14014677703380585, 0.1375402957201004, -0.3047604560852051, -0.2154458612203598, -0.21104447543621063, -0.008113371208310127, -0.25698214769363403, 0.04984024912118912, 0.08899353444576263, 0.18582533299922943, 0.2721630930900574, -0.13882772624492645, 0.2616540193557739, -0.1627454161643982, 0.0642547607421875, -0.08848525583744049, -0.0733458548784256, 0.39676132798194885, -0.26772406697273254, -0.001783125102519989, -0.049112968146800995, -0.343792587518692, -0.009709909558296204, 0.03477415442466736, -0.15961623191833496, -0.2823835611343384, 0.13646717369556427, 0.11167246103286743, -0.06788109242916107, 0.02287977561354637, -0.2750296890735626, -0.08533795922994614, 0.3868095278739929, -0.2365071326494217, 0.07500800490379333, -0.34221094846725464, -0.3093253970146179, 0.09200392663478851, 0.5923802256584167, 0.6410744786262512, 0.024744302034378052, -0.47498196363449097, 0.11923126876354218, -0.23080772161483765, 0.0884590670466423, 0.4773505926132202, -0.05087815597653389, -0.17750771343708038, -0.30502405762672424, 0.032312363386154175, 0.40190839767456055, -0.37713199853897095, -0.43298548460006714, 0.12376904487609863, -0.21873190999031067, 0.08808090537786484, -0.038376521319150925, 0.03327339515089989, -0.20531544089317322, -0.2246682345867157, 0.2675780653953552, 0.28766801953315735, 0.2032138854265213, 0.01156480610370636, -0.31235745549201965, -0.27188199758529663, 0.24664165079593658, 0.3167061507701874, -0.09085433930158615, 0.1907789409160614, -0.04962250217795372, 0.23350301384925842, 0.29265400767326355, 0.022221092134714127, -0.08754837512969971, 0.10630612075328827, 0.3155529797077179, -0.1481197327375412, 0.012397423386573792, -0.12289904057979584, -0.32122477889060974, 0.21331050992012024, -0.5302758812904358, 0.376913845539093, -0.2067185491323471, 0.15795838832855225, -0.15098129212856293, 0.05238422006368637, -0.41019928455352783, -0.4750290811061859, -0.02169140800833702, 0.12363652884960175, 0.14209885895252228, 0.08310987055301666, -0.3491266369819641, 0.393544465303421, -0.15688279271125793, 0.11253547668457031, -0.8096958994865417, 0.2473006397485733, -0.12919184565544128, -0.20173430442810059, 0.04673115909099579, 0.4648350477218628, 0.2675110995769501, -0.11771568655967712, -0.21095851063728333, 0.4545469880104065, -0.15180370211601257, -0.17924973368644714, -0.605415403842926, -0.022297076880931854, 0.3142143189907074, -0.6065157055854797, 0.08222101628780365, 0.21276307106018066, 0.06554026156663895, 0.00020594894886016846, 0.09006845951080322, 0.1399945318698883, 0.16810807585716248, 0.29616081714630127, 0.01527385413646698, 0.05019184947013855, 0.020707808434963226, 0.06244085729122162, -0.03719508275389671, 0.03684091567993164, 0.31734076142311096, -0.20135915279388428, 0.3078652620315552, 0.0024839267134666443, 0.013944543898105621, -0.45237496495246887, 0.27101826667785645, -0.15823569893836975, 0.10791562497615814, 0.1816784143447876, -0.5091333389282227, -0.09420144557952881, -0.09494785219430923, 0.11264970898628235, 0.47480282187461853, 0.012556210160255432, -0.3459683358669281, 0.015682952478528023, -0.04347474128007889, -0.05923403427004814, 0.1162559986114502, 0.022990141063928604, 0.08372291922569275, 0.2572965919971466, -0.015503177419304848, 0.11156711727380753, -0.3163834810256958, -0.3513840436935425, 0.06960979849100113, 0.2853474020957947, -0.5560730695724487, 0.025600753724575043, 0.10112182796001434, 0.12388370931148529, -0.271146684885025, 0.1344144642353058, -0.33135977387428284, 0.09181001782417297, -0.16644364595413208, -0.07090675830841064, 0.11827223002910614, 0.2603888213634491, -0.015279598534107208, -0.09322190284729004, 0.1403355598449707, 0.05110928416252136, -0.2837863862514496, 0.00029972195625305176, -0.18637193739414215, -0.08641587197780609, 0.008324511349201202, 0.05184938758611679, -0.13148300349712372, -0.027279019355773926, -0.19809803366661072, 0.27917027473449707, -0.15177857875823975, 0.19030910730361938, 0.07031220197677612, 0.43732398748397827, -0.07560048997402191, 0.16602793335914612, 0.18435215950012207, -0.3553646206855774, 0.38580042123794556, -0.08324278146028519, -0.13658660650253296, 0.2658621668815613, 0.06897669285535812, -0.21784016489982605, -0.15502889454364777, -0.4603607654571533, -0.47779715061187744, -0.3952280282974243, -0.06605656445026398, -0.14174827933311462, 0.013023539446294308, 0.5893926620483398, 0.0720871239900589, 0.15606854856014252, -0.2587343156337738, 0.09598670154809952, -0.08461734652519226, -0.005393259227275848, 0.4703007638454437, -0.11862393468618393, -0.31081414222717285, -0.22867807745933533, -0.05252555012702942, -0.11115801334381104, -0.08368206769227982, -0.4437512755393982, -0.045817166566848755, -0.20678146183490753, -0.3540295660495758, -0.00692384596914053, -0.07336892932653427, 0.1547655165195465, 0.030188988894224167, 0.08519512414932251, 0.08802534639835358, -0.32666176557540894, -0.03349164128303528, 0.10230565071105957, 0.32599711418151855, 0.00920194387435913, 0.30960899591445923, -0.12060078233480453, 0.514532208442688, 0.2852513790130615, -0.30804598331451416, 0.1585943102836609, -0.08860373497009277, 0.0181196890771389, -0.03097759559750557, -0.2465682327747345, 0.01237281784415245, 0.1069074496626854, 0.09079393744468689, 0.0010282956063747406, -0.019290437921881676, 0.1211046427488327, -0.21845762431621552, -0.08240153640508652, 0.15962104499340057, -0.1415736824274063, -0.10656966269016266, 0.1059209555387497, 0.23035970330238342, -0.037473615258932114, 0.4143996834754944, 0.46003714203834534, -0.0064618587493896484, 0.2905214726924896, 0.4800134599208832, 0.23437103629112244, 0.05661682412028313, -0.5030889511108398, 0.17936669290065765, -0.20834198594093323, 0.10003672540187836, -0.013848714530467987, 0.6592628955841064, -0.1274966597557068, -0.05621493607759476, 0.062355972826480865, -0.09539917856454849, 0.6158280968666077, 0.07904256880283356, 0.3033108711242676, 0.10466638207435608, 0.09046533703804016, -0.2795730233192444, -0.01665419340133667, 0.029052212834358215, -0.2822458744049072, -0.07655146718025208, 0.30315786600112915, -0.07367771118879318, -0.09732403606176376, 0.173629030585289, 0.21752743422985077, -0.2057144045829773, -0.025413960218429565, -0.3672518730163574, -0.18750041723251343, -0.4026106595993042, 0.09445858746767044, -0.1729569435119629, 0.17452549934387207, 0.10217098146677017, 0.05096086114645004, 0.04170230031013489, -0.0956650823354721, 0.18876540660858154, 0.10543790459632874, 0.42972898483276367, 0.020343221724033356, 0.3289579749107361, 0.3190152049064636, 0.05976932868361473, 0.1852148175239563, 0.4724421501159668, -0.10557128489017487, -0.381122887134552, -0.008652869611978531, 0.1460508406162262, 0.28388893604278564, 0.16257113218307495, 0.08690189570188522, 0.022015094757080078, 0.5249762535095215, 0.056620776653289795, -0.1900882124900818, -0.01875464990735054, 0.2666785418987274, -0.06843945384025574, -0.19796985387802124, -0.3377669155597687, 0.6889947056770325, -0.07912106066942215, 0.018481716513633728, -0.03299522399902344, 0.02867813967168331, -0.04892800375819206, 0.42892786860466003, -0.06670668721199036, 0.8465297222137451, 0.12801241874694824, 0.04809335619211197, 0.292508065700531, -0.01889624446630478, 0.18394702672958374, -0.5831100344657898, 0.023514769971370697, -0.2247413992881775, -0.10064969211816788, 0.03163313865661621, -0.2603111267089844, -0.025947730988264084, 0.05966128036379814, -0.08726150542497635, 0.2274342179298401, 0.019875138998031616, -0.23103545606136322, 0.012518946081399918, 0.28219953179359436, 0.04079967737197876, -0.1655595600605011, 0.05670956149697304, 0.002442196011543274, -0.16477352380752563, 0.5717599987983704, 0.08949702978134155, -0.10123953223228455, 0.07259216159582138, -0.2510277330875397, -0.11653071641921997, 0.42953795194625854, -0.26523274183273315, 0.01611807942390442, 0.372793972492218, -0.4153828024864197, 0.5313196182250977, 0.1662169098854065, 0.10273671895265579, 0.24748657643795013, -0.20787103474140167, 0.22246377170085907, 0.2385983169078827, 0.16500934958457947, -0.15036532282829285, 0.1241111308336258, 0.14620251953601837, 0.023713164031505585, -0.2011260986328125, 0.05538652837276459, -0.14513984322547913, -0.05845634639263153, 0.029195979237556458, 0.01538211852312088, 0.1878442019224167, -0.2644806206226349, 0.03315471485257149, 0.04978085309267044, 0.07010554522275925, -0.13557326793670654, 0.11675053834915161, 0.3559403419494629, -0.5042514801025391, -0.15054044127464294, 0.2411980926990509, -0.21919387578964233, -0.015418671071529388, 0.36208802461624146, -0.13452304899692535, -0.18639400601387024, 0.65464186668396, 0.2729581594467163, 0.000716380774974823, -0.18624746799468994, -0.12670855224132538, 0.2749946117401123, -0.7631402015686035, 0.11795595288276672, 0.17511551082134247, -0.008846327662467957, -0.1904214322566986, 0.408599853515625, 0.08841343224048615, -0.24154682457447052, -0.20024198293685913, -0.4221113622188568, -0.44687947630882263, 0.23943272233009338, -0.12776026129722595, 0.20296995341777802, -0.1667061448097229, 0.11591699719429016, -0.022529244422912598, 0.17383846640586853, -0.2450716644525528, -0.0036325976252555847, -0.14312440156936646, 0.11530323326587677, 0.3670766353607178, -0.20225031673908234, 0.2619225084781647, -0.12938623130321503, 0.03155681490898132, 0.229607954621315, -0.2939411401748657, -0.058213040232658386, -0.17710623145103455, 0.16879545152187347, 0.016726456582546234, -0.24855346977710724, -0.135422483086586, 0.07637326419353485, 0.1470710188150406, -0.1148725301027298, 0.06079468876123428, 0.0313212126493454, -0.07040159404277802, 0.3685798943042755, -0.09430791437625885, -0.022474508732557297, -0.4142129719257355, 0.1483006626367569, -0.2709144949913025, -0.028539098799228668, 0.16189178824424744, -0.06540849804878235, -0.009075634181499481, 0.028744280338287354, -0.3944200277328491, -0.030334431678056717, -0.0575127899646759, 0.007855912670493126, 0.2673736810684204, -0.38128897547721863, -0.002588406205177307, -0.06762928515672684, 0.027869991958141327, 0.15179578959941864, -0.2128884196281433, -0.004329249262809753, 0.15913456678390503, 0.10453785210847855, -0.2384478896856308, -0.031194966286420822, -0.048500292003154755, -0.014932161197066307, 0.05984652042388916, 0.2293986827135086, 0.08185882866382599, 0.0572822242975235, -0.07614749670028687, 0.2177858054637909, 0.2604515254497528, -0.24676792323589325, 0.197440505027771, 0.6288747191429138, -0.019402630627155304, 0.12409251928329468, 0.0371185764670372, -0.16018836200237274, 0.012889914214611053, 0.4978620409965515, -0.2939940392971039, 0.1566222757101059, -0.2650279402732849, 0.16399046778678894, -0.13910403847694397, -0.3206348419189453, -0.10984019190073013, 0.07114854454994202, -0.012643635272979736, 0.2669651210308075, 0.06503018736839294, 0.6184885501861572, -0.10790932178497314, 0.08988609910011292, 0.06561628729104996, 0.08666795492172241, -0.13524353504180908, -0.023759745061397552, -0.021891899406909943, 0.02565060555934906, -0.4565442204475403, 0.05569462478160858, -0.0020932587794959545, -0.11058877408504486, 0.1262666881084442, 0.13307756185531616, -0.29181230068206787, 0.025856241583824158, -0.201679989695549, 0.5281713604927063, 0.06677761673927307, -0.26957565546035767, 0.28798413276672363, 0.5224602818489075, -0.2448056936264038, 0.19125646352767944, 0.23667798936367035, 0.5199190974235535, 0.29884377121925354, -0.16683170199394226, 0.3531171977519989, 0.1617753803730011, -0.12275498360395432, 0.09071768820285797, 0.2359623908996582, 0.21585772931575775, 0.05745707079768181, 0.05667419359087944, 0.027252119034528732, -0.18102847039699554, -0.10651610791683197, -0.07788018137216568, 0.1526496708393097, -0.35207289457321167, 0.9680817127227783, -0.38225677609443665, -0.18960201740264893, -0.39002734422683716, -0.15260431170463562, -0.4545285701751709, 0.21092146635055542, 0.3689022362232208, 0.025646883994340897, 0.002511013299226761, -0.04637742415070534, 0.00834556296467781, -0.1366787701845169, 0.43441110849380493, 0.32892897725105286, 0.29182878136634827, -0.3403297960758209, 0.23670567572116852, -0.7051169872283936, 0.005213860422372818, 0.13191227614879608, 0.011282458901405334, -0.011979013681411743, -0.1158788800239563, 0.0036321431398391724, 0.1650361716747284, -0.15560908615589142, -0.12223204970359802, 0.014230743050575256, 0.18568947911262512, -0.18004140257835388, -0.1035049557685852, -0.22117307782173157, 0.3196866810321808, 0.10709435492753983, -0.37455424666404724, 0.03756717965006828, 0.01821257919073105, -0.09612435102462769, -0.06613046675920486, -0.05517692118883133, -0.16753290593624115, -0.10706232488155365, 0.37737351655960083, 0.13638871908187866, 0.6575392484664917, -0.10647173225879669, -0.2366025447845459, 0.003033870831131935, -0.10943001508712769, -0.034953147172927856, -0.10203030705451965, 0.34084922075271606, 0.7112773060798645, -0.10585632175207138, -0.2927047312259674, -0.5408525466918945, 0.19859746098518372, -0.10063380748033524, -0.2316669225692749, -0.42080366611480713, 0.26502421498298645, -0.174640491604805, -0.005563918501138687, 0.26633453369140625, -0.0146778654307127, 0.08799204230308533, -0.10520458221435547, -0.3692778944969177, -0.32441556453704834, 0.5938013195991516, -0.22752749919891357, -0.09664379060268402, -0.22398437559604645, 0.26378703117370605, 0.005955837666988373, -0.2528497278690338, -0.7120816707611084, 0.1737963855266571, 0.25653520226478577, 0.07226689159870148, -0.3041287660598755, 0.12370435893535614, 0.23579668998718262, -0.1790582239627838, -0.09826084971427917, 0.5251138210296631, 0.15298649668693542, -0.11921736598014832, 0.2508082687854767, -0.1958537995815277 ]
https://github.com/huggingface/datasets/issues/6540
Concatenating datasets doesn't create any indices mapping - so flattening indices is not needed (unless you shuffle the dataset). Can you share the snippet of code you are using to merge your datasets and save them to disk ?
Extreme inefficiency for `save_to_disk` when merging datasets
### Describe the bug Hi, I tried to merge in total 22M sequences of data, where each sequence is of maximum length 2000. I found that merging these datasets and then `save_to_disk` is extremely slow because of flattening the indices. Wondering if you have any suggestions or guidance on this. Thank you very much! ### Steps to reproduce the bug The source data is too big to demonstrate ### Expected behavior The source data is too big to demonstrate ### Environment info python 3.9.0 datasets 2.7.0 pytorch 2.0.0 tokenizers 0.13.1 transformers 4.31.0
39
Extreme inefficiency for `save_to_disk` when merging datasets ### Describe the bug Hi, I tried to merge in total 22M sequences of data, where each sequence is of maximum length 2000. I found that merging these datasets and then `save_to_disk` is extremely slow because of flattening the indices. Wondering if you have any suggestions or guidance on this. Thank you very much! ### Steps to reproduce the bug The source data is too big to demonstrate ### Expected behavior The source data is too big to demonstrate ### Environment info python 3.9.0 datasets 2.7.0 pytorch 2.0.0 tokenizers 0.13.1 transformers 4.31.0 Concatenating datasets doesn't create any indices mapping - so flattening indices is not needed (unless you shuffle the dataset). Can you share the snippet of code you are using to merge your datasets and save them to disk ?
[ -0.1920756697654724, -0.4081778824329376, 0.06094733253121376, 0.3518158197402954, -0.021621473133563995, 0.42556124925613403, -0.05339167267084122, 0.3826778531074524, -0.1905861794948578, -0.006987802684307098, 0.09002067148685455, 0.11778099834918976, -0.2164076864719391, 0.04947652667760849, -0.31331348419189453, -0.1622568666934967, 0.4296491742134094, 0.11909069865942001, 0.11522878706455231, 0.022264890372753143, -0.3323032557964325, 0.15576115250587463, -0.3964582085609436, -0.40271666646003723, -0.44285058975219727, 0.05982186645269394, -0.2016303837299347, 0.18364347517490387, -0.017043784260749817, 0.030218496918678284, 0.1930147111415863, 0.09120360016822815, -0.1034754142165184, 0.5656591653823853, -0.00011553463991731405, -0.115281842648983, 0.18476103246212006, -0.02005724236369133, -0.24853666126728058, 0.262037992477417, -0.20272701978683472, -0.4714053273200989, -0.3759622275829315, -0.1255057007074356, 0.2354520857334137, -0.03746017813682556, -0.2769928574562073, -0.45763206481933594, 0.19820034503936768, -0.04993050545454025, 0.1406535804271698, 0.2126067578792572, -0.09400732815265656, -0.09229844808578491, -0.08973664045333862, 0.18037720024585724, 0.007359437644481659, 0.0730237364768982, 0.2985275983810425, -0.23428648710250854, 0.2560414969921112, 0.21133242547512054, -0.12334994971752167, -0.46017879247665405, 0.22110697627067566, -0.26085829734802246, 0.11070363223552704, -0.4506990611553192, -0.14369891583919525, 0.12869945168495178, 0.16502085328102112, -0.15904822945594788, -0.4522138237953186, -0.3050287663936615, -0.050687070935964584, -0.3292565643787384, 0.015179532580077648, 0.03157307207584381, -0.01861495152115822, -0.04238150268793106, -0.4454129636287689, -0.17066383361816406, -0.06964732706546783, -0.00046727433800697327, 0.019477590918540955, -0.06556685268878937, 0.10192541778087616, -0.09692547470331192, 0.43643122911453247, -0.2141212522983551, -0.025119598954916, -0.43752896785736084, 0.1743277907371521, -0.0874943882226944, -0.5734639167785645, -0.1996423751115799, -0.13763241469860077, -0.4927363991737366, 0.15513619780540466, 0.02976401150226593, -0.02734432741999626, -0.024705257266759872, 0.33330386877059937, 0.044560857117176056, 0.16033805906772614, 0.4719747006893158, -0.11654669791460037, 0.0035344697535037994, 0.12624605000019073, -0.17707259953022003, 0.11749453842639923, 0.2257770150899887, 0.14273016154766083, -0.13225869834423065, 0.3317014276981354, -0.42894214391708374, 0.024781204760074615, -0.15553978085517883, -0.330575555562973, 0.10399448871612549, -0.19529467821121216, 0.08565391600131989, 0.03708431497216225, -0.06924693286418915, -0.14008964598178864, 0.26958778500556946, -0.0021096915006637573, 0.09701476246118546, -0.049858346581459045, 0.3404237627983093, -0.08649900555610657, -0.1956566721200943, -0.012915164232254028, 0.11982639878988266, 0.19768647849559784, -0.29192298650741577, -0.3213883638381958, 0.3010779619216919, 0.30909937620162964, 0.14571897685527802, 0.0559503436088562, -0.2108222246170044, 0.2465057373046875, 0.07459724694490433, -0.06656545400619507, 0.12959790229797363, -0.01884249784052372, 0.11437053978443146, -0.18275198340415955, 0.10153984278440475, -0.39461255073547363, -0.3167591094970703, -0.31626102328300476, 0.176346555352211, -0.0852973461151123, 0.12886476516723633, -0.21679341793060303, 0.13977375626564026, 0.26887452602386475, 0.027748465538024902, -0.2265700399875641, -0.1490248143672943, 0.01036302000284195, -0.2857733964920044, 0.24844032526016235, 0.0912269726395607, -0.1285037398338318, 0.2672329246997833, -0.0014748983085155487, 0.3395611047744751, 0.3152671158313751, 0.7406291365623474, 0.058924950659275055, -0.01611221581697464, -0.12926046550273895, -0.04663367569446564, 0.24108737707138062, 0.02781631052494049, -0.37222880125045776, 0.31078046560287476, -0.19318172335624695, 0.17047694325447083, 0.11821161210536957, 0.23205837607383728, 0.39858439564704895, -0.19505658745765686, 0.5943066477775574, 0.4986433982849121, 0.04074972867965698, -0.06044904142618179, -0.525513768196106, -0.18988698720932007, 0.1151256263256073, 0.11472338438034058, -0.2528046667575836, 0.054059017449617386, -0.22828133404254913, -0.104825958609581, 0.183376744389534, -0.2659839987754822, 0.045543454587459564, 0.6996655464172363, 0.07594416290521622, -0.43405529856681824, 0.08612310886383057, 0.03224056959152222, -0.38049551844596863, 0.23094439506530762, 0.14877986907958984, -0.19473743438720703, 0.17924192547798157, -0.2173481583595276, -0.05431143194437027, -0.023137997835874557, -0.10354006290435791, 0.46893492341041565, 0.08212366700172424, -0.15946389734745026, 0.2308778464794159, 0.06034199893474579, 0.0040961578488349915, 0.17775790393352509, 0.067534439265728, -0.08659842610359192, -0.27817749977111816, 0.3129965662956238, -0.060980916023254395, -0.10186547040939331, 0.06719885766506195, 0.22107245028018951, 0.1396179348230362, -0.1695285588502884, 0.025489557534456253, 0.08728617429733276, -0.24662679433822632, 0.01873534545302391, 0.1083286851644516, 0.31615525484085083, 0.28189191222190857, -0.21290723979473114, 0.07385589927434921, 0.41730087995529175, 0.007079996168613434, -0.23293067514896393, -0.32724422216415405, -0.0016294270753860474, -0.0748262107372284, 0.3510741889476776, 0.10598576068878174, -0.019362762570381165, -0.04709237068891525, -0.048099566251039505, 0.020916424691677094, -0.06572678685188293, 0.36237508058547974, -0.17426307499408722, 0.006384067237377167, 0.06791382282972336, -0.23141369223594666, 0.27398189902305603, 0.2810528874397278, -0.14458659291267395, -0.06382154673337936, 0.34090739488601685, -0.21883618831634521, -0.11469084024429321, -0.1328870803117752, 0.06312455236911774, 0.25420451164245605, 0.2410101294517517, 0.18097983300685883, -0.1576366424560547, 0.0414649061858654, -0.2021203190088272, 0.22056670486927032, 0.29305189847946167, 0.10424508154392242, 0.2521151006221771, 0.20538733899593353, 0.25347426533699036, -0.0032190456986427307, -0.11191056668758392, 0.10927808284759521, 0.1283532977104187, -0.02515566349029541, 0.14226046204566956, -0.020626213401556015, -0.3043614625930786, -0.17018771171569824, -0.29186803102493286, -0.2724173665046692, -0.5113238096237183, -0.15473321080207825, 0.378106027841568, -0.10244940221309662, 0.021745488047599792, 0.1747618168592453, 0.2667984664440155, 0.29148438572883606, -0.3290540874004364, -0.15267038345336914, 0.20173776149749756, -0.04323132708668709, -0.0038604550063610077, 0.2868076264858246, -0.09034092724323273, 0.3133257031440735, 0.012332402169704437, 0.3657362461090088, -0.28018414974212646, -0.1757318377494812, -0.09222358465194702, -0.10381099581718445, -0.1087908148765564, -0.2441251277923584, 0.050784509629011154, -0.14224430918693542, -0.19485805928707123, -0.07621552050113678, 0.1320248544216156, 0.10549899190664291, 0.2885780930519104, -0.004222016781568527, -0.253438264131546, -0.09464572370052338, -0.025656774640083313, -0.2859611511230469, -0.3565896153450012, 0.14842280745506287, -0.408788800239563, 0.11505025625228882, -0.004741627722978592, 0.0828315019607544, -0.12388653308153152, 0.06388634443283081, -0.10262322425842285, -0.006815258413553238, -0.25126737356185913, 0.5066184401512146, 0.021149855107069016, -0.2578393518924713, -0.27491694688796997, -0.01637347787618637, -0.3693337142467499, 0.12766745686531067, -0.19560228288173676, 0.02553042396903038, -0.49096670746803284, -0.07277363538742065, -0.26313650608062744, 0.20640969276428223, 0.09802493453025818, 0.05971163138747215, -0.029453080147504807, 0.1547534465789795, -0.1324761062860489, -0.05442272126674652, 0.42073768377304077, 0.3911021947860718, -0.20232857763767242, 0.04662591964006424, 0.2726181745529175, 0.3625607490539551, 0.5381177067756653, 0.22521467506885529, 0.1503431499004364, 0.4082920253276825, 0.2554786205291748, -0.05778300762176514, -0.44185397028923035, -0.2662181556224823, -0.2025684118270874, -0.11582022160291672, -0.11812340468168259, 0.05167067423462868, -0.025302503257989883, 0.1841977834701538, -0.14517803490161896, 0.39422452449798584, -0.23530754446983337, 0.2584209144115448, -0.08023916929960251, 0.11366705596446991, 0.026763111352920532, -0.09562504291534424, -0.14855772256851196, -0.06034670025110245, 0.1173967570066452, 0.0758521556854248, 0.29961806535720825, -0.14155428111553192, 0.16374032199382782, -0.2662825882434845, -0.5657339096069336, 0.18755760788917542, 0.12586610019207, 0.38585543632507324, 0.05854274332523346, -0.1969081461429596, -0.08881185948848724, 0.11368530988693237, 0.5741657018661499, 0.20310825109481812, -0.3099671006202698, 0.602442741394043, -0.0847211554646492, -0.5069740414619446, -0.03908819332718849, 0.07564766705036163, 0.06191668659448624, 0.4696235954761505, 0.7388142347335815, -0.16104383766651154, -0.15472102165222168, 0.1249309703707695, 0.6891990303993225, -0.12478303909301758, -0.2612003684043884, -0.10914509743452072, -0.07711949199438095, -0.3846132457256317, -0.0006026849150657654, 0.06011045724153519, 0.35500678420066833, -0.19970262050628662, -0.037155866622924805, -0.09218794107437134, -0.08365380018949509, 0.32691097259521484, -0.16647562384605408, 0.42485231161117554, -0.1288042962551117, 0.39037996530532837, -0.12069853395223618, 0.16528445482254028, 0.24212542176246643, 0.20358172059059143, 0.010781174525618553, -0.1549338698387146, 0.02461763098835945, 0.16221842169761658, 0.2826595902442932, 0.17958104610443115, 0.1076357364654541, 0.017077786847949028, -0.2718266248703003, 0.34232595562934875, -0.26490503549575806, -0.14534540474414825, 0.053440697491168976, 0.03873097524046898, -0.7461585402488708, 0.1795743703842163, 0.3003953993320465, 0.2739969491958618, 0.06734004616737366, 0.29207801818847656, 0.06629720330238342, 0.0884709358215332, 0.336751788854599, -0.03379738703370094, 0.9147109985351562, -0.05946126952767372, 0.37494000792503357, 0.058999620378017426, 0.015480749309062958, 0.0013956911861896515, 0.11097638309001923, 0.3248731791973114, -0.20525652170181274, -0.42276883125305176, 0.13372333347797394, -0.20779335498809814, -0.18368758261203766, -0.17838704586029053, -0.37787386775016785, 0.3094419836997986, -0.4006720185279846, -0.0711369663476944, -0.2399766743183136, 0.2623211145401001, -0.129916250705719, -0.4228089451789856, -0.21668052673339844, 0.08241905272006989, 0.3649846315383911, -0.012083880603313446, -0.06258691102266312, -0.39908289909362793, -0.10817737877368927, 0.19506019353866577, 0.013961628079414368, 0.0771370381116867, 0.08741146326065063, 0.5024871230125427, -0.4850977659225464, -0.5278401970863342, 0.16722607612609863, -0.08011522889137268, 0.20438681542873383, 0.09053409099578857, -0.14725305140018463, -0.2745181620121002, -0.06959356367588043, 0.0024008341133594513, -0.030463140457868576, -0.41885876655578613, 0.3342212438583374, 0.0059733763337135315, 0.12941932678222656, -0.19384801387786865, 0.1124119833111763, -0.26167261600494385, -0.10811907798051834, 0.049226175993680954, 0.007359635084867477, -0.00958918035030365, -0.3482533395290375, 0.2017822265625, -0.22606639564037323, -0.23884613811969757, 0.09461507201194763, 0.3659411370754242, -0.049139317125082016, 0.6307942271232605, -0.32043585181236267, -0.02706640213727951, -0.11659453809261322, 0.46641817688941956, 0.22422780096530914, -0.18359839916229248, 0.33410757780075073, -0.024978674948215485, -0.15629148483276367, -0.14299431443214417, 0.33597323298454285, 0.04444821551442146, -0.1294645369052887, 0.5073040127754211, -0.40717974305152893, 0.11123073101043701, 0.0165863037109375, 0.1414761245250702, 0.11996297538280487, -0.08127912133932114, -0.284351646900177, -0.13350364565849304, -0.4786713123321533, 0.05450979620218277, 0.3682101368904114, 0.1685577929019928, -0.18844664096832275, -0.2799460291862488, -0.12660835683345795, 0.019430505111813545, -0.252996563911438, 0.017518237233161926, -0.10230082273483276, -0.1649935096502304, 0.1169702485203743, -0.17395862936973572, 0.24100416898727417, -0.3271961212158203, -0.045486126095056534, -0.003005705773830414, 0.1942857801914215, -0.20802626013755798, 0.09193752706050873, 0.07694737613201141, 0.1034931093454361, -0.2517048120498657, 0.10701103508472443, -0.1905508041381836, -0.1244368627667427, -0.1957801729440689, -0.05696965754032135, 0.04565682262182236, -0.040941957384347916, -0.17919869720935822, -0.03417733311653137, -0.32977530360221863, 0.02413153648376465, 0.17538489401340485, 0.27200761437416077, 0.21173587441444397, -0.1536535769701004, 0.16737912595272064, -0.005129996687173843, -0.24456970393657684, -0.42992550134658813, -0.0021825917065143585, 0.005027756094932556, -0.032692551612854004, 0.3652297258377075, -0.38648882508277893, -0.17445248365402222, 0.3887237012386322, 0.2683844566345215, 0.2666948437690735, -0.21922536194324493, -0.014077767729759216, 0.011586770415306091, 0.1792658269405365, -0.01547781378030777, -0.5164063572883606, 0.2487175166606903, -0.04443949833512306, -0.16287140548229218, -0.00843001902103424, 0.09872408956289291, 0.01562821865081787, -0.3411543369293213, 0.14379557967185974, 0.08814243227243423, 0.07092062383890152, 0.0673142671585083, 0.3922005295753479, 0.32242444157600403, 0.06306137144565582, 0.024317117407917976, 0.11869516223669052, 0.3045267164707184, 0.05930845066905022, 0.027599001303315163, 0.4286482036113739, 0.3677626848220825, -0.11356295645236969, 0.049221742898225784, -0.017183393239974976, 0.11135372519493103, -0.008282102644443512, 0.010983575135469437, 0.3887810707092285, 0.14396998286247253, 0.05029413104057312, -0.4714117646217346, -0.3990812599658966, -0.17641258239746094, 0.35480964183807373, -0.23979254066944122, 0.23243510723114014, 0.5409412384033203, 0.015056535601615906, 0.4788416028022766, -0.016844160854816437, -0.11555910110473633, 0.012418903410434723, 0.09482485055923462, 0.048185236752033234, 0.19628463685512543, 0.22855965793132782, 0.0394926518201828, 0.44896626472473145, 0.42519432306289673, -0.1094624474644661, -0.29227906465530396, 0.3648231029510498, -0.11559590697288513, -0.2280430644750595, 0.43473321199417114, 0.5624822974205017, 0.07303335517644882, -0.011510433629155159, 0.15293246507644653, 0.13599050045013428, -0.0790746808052063, 0.23558953404426575, 0.2296103686094284, -0.04670626297593117, -0.3115822374820709, 0.2685093879699707, 0.006585404276847839, -0.19705131649971008, -0.1578333079814911, -0.10024920105934143, 0.13013513386249542, -0.22617127001285553, 0.10813108086585999, -0.03820919990539551, -0.5094066262245178, -0.053667087107896805, 0.07049404084682465, -0.05778155475854874, -0.1789260357618332, 0.669717013835907, 0.07424561679363251, -0.08037284016609192, -0.0015504062175750732, 0.10678666830062866, -0.05994563549757004, 0.5222408771514893, 0.3142641484737396, -0.12943360209465027, -0.3050030767917633, 0.018711894750595093, -0.46518638730049133, -0.07060978561639786, 0.04317236691713333, 0.4461848735809326, 0.351015567779541, 0.30349934101104736, -0.04353957623243332, 0.13295559585094452, 0.010314270853996277, -0.06133301928639412, -0.19108846783638, 0.10472636669874191, -0.309224009513855, -0.023831453174352646, 0.09735500812530518, -0.22876746952533722, 0.05191909521818161, -0.44488245248794556, 0.560973584651947, 0.02479466050863266, 0.03321794420480728, -0.10905309021472931, 0.39465802907943726, -0.11510632932186127, 0.22202789783477783, 0.0034513939172029495, 0.27714547514915466, 0.06764118373394012, 0.0033165961503982544, -0.30936896800994873, 0.28384676575660706, 0.1660628467798233, -0.019436176866292953, -0.020072724670171738, 0.11045901477336884, 0.3423426151275635, -0.288457453250885, -0.1393527090549469, 0.005306713283061981, 0.10831257700920105, 0.019911035895347595, -0.3135712444782257, -0.2864515781402588, 0.10124947130680084, -0.006635710597038269, 0.39711523056030273, 0.3710636794567108, 0.4914657175540924, -0.018007051199674606, 0.16376489400863647, -0.26885005831718445, -0.28664302825927734, 0.2588770389556885, 0.0019259490072727203, -0.31476402282714844, -0.2528131902217865, 0.1958070695400238, 0.33865609765052795, 0.12825137376785278, -0.11692806333303452, -0.14642590284347534, 0.16266003251075745, -0.17302122712135315, -0.03271299600601196, 0.5350594520568848, -0.1982840597629547, 0.03073771297931671, 0.02932155132293701, 0.3915885090827942, 0.06096603721380234, -0.2894328534603119, 0.17219382524490356, -0.06300406903028488 ]
https://github.com/huggingface/datasets/issues/6538
Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
25
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle?
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
33
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle?
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error Yes, I am sure ``` !pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /opt/conda/lib/python3.10/site-packages Requires: aiohttp, dill, filelock, fsspec, huggingface-hub, multiprocess, numpy, packaging, pandas, pyarrow, pyarrow-hotfix, pyyaml, requests, tqdm, xxhash Required-by: trl ```
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
76
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error Yes, I am sure ``` !pip show datasets Name: datasets Version: 2.16.1 Summary: HuggingFace community-driven open-source library of datasets Home-page: https://github.com/huggingface/datasets Author: HuggingFace Inc. Author-email: thomas@huggingface.co License: Apache 2.0 Location: /opt/conda/lib/python3.10/site-packages Requires: aiohttp, dill, filelock, fsspec, huggingface-hub, multiprocess, numpy, packaging, pandas, pyarrow, pyarrow-hotfix, pyyaml, requests, tqdm, xxhash Required-by: trl ```
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle? Don't know about other people. But I am having this issue whose solution I can't find anywhere. And this issue still persists.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
56
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle? Don't know about other people. But I am having this issue whose solution I can't find anywhere. And this issue still persists.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> I have the same issue now and didn't have this problem around 2 weeks ago. Same here
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
18
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > I have the same issue now and didn't have this problem around 2 weeks ago. Same here
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
23
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing. I also have datasets version 2.16, but the error is still there.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
36
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing. I also have datasets version 2.16, but the error is still there.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> > Can you try re-installing `datasets` ? > > I tried re-installing. Still getting the same error. In kaggle I used: - `%pip install -U datasets` and then restarted runtime and then everything works fine.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
36
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > > Can you try re-installing `datasets` ? > > I tried re-installing. Still getting the same error. In kaggle I used: - `%pip install -U datasets` and then restarted runtime and then everything works fine.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> > > Can you try re-installing `datasets` ? > > > > > > I tried re-installing. Still getting the same error. > > In kaggle I used: > > * `%pip install -U datasets` > and then restarted runtime and then everything works fine. Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
78
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > > > Can you try re-installing `datasets` ? > > > > > > I tried re-installing. Still getting the same error. > > In kaggle I used: > > * `%pip install -U datasets` > and then restarted runtime and then everything works fine. Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> > > > Can you try re-installing `datasets` ? > > > > > > > > > I tried re-installing. Still getting the same error. > > > > > > In kaggle I used: > > > > * `%pip install -U datasets` > > and then restarted runtime and then everything works fine. > > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? For some packages it is required. https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
98
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > > > > Can you try re-installing `datasets` ? > > > > > > > > > I tried re-installing. Still getting the same error. > > > > > > In kaggle I used: > > > > * `%pip install -U datasets` > > and then restarted runtime and then everything works fine. > > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? For some packages it is required. https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
> > > > > Can you try re-installing `datasets` ? > > > > > > > > > > > > I tried re-installing. Still getting the same error. > > > > > > > > > In kaggle I used: > > > > > > * `%pip install -U datasets` > > > and then restarted runtime and then everything works fine. > > > > > > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? > > For some packages it is required. > > https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab Thank you for your assistance. I dedicated the past 2-3 weeks to resolving this issue. Interestingly, it runs flawlessly in Colab without requiring a runtime restart. However, the problem persisted exclusively in Kaggle. I appreciate your help once again. Thank you.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
157
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 > > > > > Can you try re-installing `datasets` ? > > > > > > > > > > > > I tried re-installing. Still getting the same error. > > > > > > > > > In kaggle I used: > > > > > > * `%pip install -U datasets` > > > and then restarted runtime and then everything works fine. > > > > > > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? > > For some packages it is required. > > https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab Thank you for your assistance. I dedicated the past 2-3 weeks to resolving this issue. Interestingly, it runs flawlessly in Colab without requiring a runtime restart. However, the problem persisted exclusively in Kaggle. I appreciate your help once again. Thank you.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6538
Closing this issue as it is not related to the datasets library; rather, it's linked to platform-related issues.
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
18
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) ### Describe the bug While importing from packages getting the error Code: ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` Error: ```` --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[5], line 14 4 from transformers import ( 5 AutoModelForCausalLM, 6 AutoTokenizer, (...) 11 logging 12 ) 13 from peft import LoraConfig, PeftModel ---> 14 from trl import SFTTrainer 15 from huggingface_hub import login 16 import pandas as pd File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21 8 from .import_utils import ( 9 is_diffusers_available, 10 is_npu_available, (...) 13 is_xpu_available, 14 ) 15 from .models import ( 16 AutoModelForCausalLMWithValueHead, 17 AutoModelForSeq2SeqLMWithValueHead, 18 PreTrainedModelWrapper, 19 create_reference_model, 20 ) ---> 21 from .trainer import ( 22 DataCollatorForCompletionOnlyLM, 23 DPOTrainer, 24 IterativeSFTTrainer, 25 PPOConfig, 26 PPOTrainer, 27 RewardConfig, 28 RewardTrainer, 29 SFTTrainer, 30 ) 33 if is_diffusers_available(): 34 from .models import ( 35 DDPOPipelineOutput, 36 DDPOSchedulerOutput, 37 DDPOStableDiffusionPipeline, 38 DefaultDDPOStableDiffusionPipeline, 39 ) File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44 42 from .ppo_trainer import PPOTrainer 43 from .reward_trainer import RewardTrainer, compute_accuracy ---> 44 from .sft_trainer import SFTTrainer 45 from .training_configs import RewardConfig File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23 21 import torch.nn as nn 22 from datasets import Dataset ---> 23 from datasets.arrow_writer import SchemaInferenceError 24 from datasets.builder import DatasetGenerationError 25 from transformers import ( 26 AutoModelForCausalLM, 27 AutoTokenizer, (...) 33 TrainingArguments, 34 ) ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py ```` transformers version: 4.36.2 python version: 3.10.12 datasets version: 2.16.1 ### Steps to reproduce the bug 1. Install packages ``` !pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub ``` 2. import packages ``` import os import torch from datasets import load_dataset, Dataset from transformers import ( AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging ) from peft import LoraConfig, PeftModel from trl import SFTTrainer from huggingface_hub import login import pandas as pd ``` ### Expected behavior No error while importing ### Environment info - `datasets` version: 2.16.0 - Platform: Linux-5.15.133+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.1 - PyArrow version: 11.0.0 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 Closing this issue as it is not related to the datasets library; rather, it's linked to platform-related issues.
[ -0.256902813911438, -0.06662493944168091, -0.05580161139369011, 0.6121095418930054, 0.2748967707157135, 0.06340034306049347, 0.24404215812683105, 0.24720130860805511, -0.019955575466156006, 0.11987867951393127, -0.13812042772769928, 0.38939008116722107, -0.1408829241991043, 0.1007615476846695, -0.32404372096061707, -0.32616546750068665, 0.039162781089544296, 0.21027472615242004, -0.25826671719551086, -0.02511308342218399, -0.13907425105571747, 0.1340944766998291, -0.172745019197464, 0.24685204029083252, -0.4250190258026123, -0.26558586955070496, 0.2469814419746399, 0.030495258048176765, -0.44358178973197937, -0.39700847864151, 0.24750655889511108, -0.2310401201248169, 0.37677842378616333, 0.6055502891540527, -0.00011488998279673979, 0.1920846551656723, 0.3230991065502167, -0.10012710094451904, -0.18276391923427582, -0.26851069927215576, -0.1036250963807106, 0.03106759488582611, 0.21665579080581665, -0.10153007507324219, 0.21615839004516602, 0.0005410797894001007, -0.27494823932647705, -0.2035241276025772, 0.25661763548851013, 0.526404619216919, 0.2563377916812897, 0.2645606994628906, 0.43410056829452515, -0.1192169189453125, -0.061466049402952194, -0.0923306941986084, -0.2444404661655426, 0.15163978934288025, -0.12952443957328796, 0.04484943300485611, 0.005928002297878265, 0.3358690142631531, -0.028897468000650406, 0.15836332738399506, 0.32255351543426514, -0.16028258204460144, 0.11113902181386948, -0.4410451352596283, 0.0145353302359581, 0.052129387855529785, 0.7370848655700684, -0.3695690631866455, -0.4370410442352295, 0.15414728224277496, 0.14453935623168945, 0.04207813739776611, 0.180410698056221, 0.10252576321363449, -0.23504295945167542, 0.13352859020233154, 0.2321055829524994, -0.11182139813899994, -0.37119418382644653, -0.15580841898918152, -0.20775461196899414, 0.28189292550086975, -0.07928560674190521, 0.05331495404243469, 0.08881202340126038, -0.17495179176330566, 0.8017526268959045, 0.001824287697672844, -0.24544386565685272, 0.19523701071739197, -0.4660859704017639, -0.11735111474990845, -0.020867645740509033, 0.0144905811175704, -0.321607768535614, 0.08730154484510422, 0.1457754224538803, -0.08641445636749268, 0.09756240248680115, 0.2448480725288391, 0.08345026522874832, 0.09961158782243729, 0.10073757916688919, 0.5698217749595642, 0.07114965468645096, -0.03231749311089516, 0.05505339801311493, -0.09617455303668976, -0.24876058101654053, -0.40744882822036743, -0.024745170027017593, -0.18364641070365906, 0.246136873960495, -0.1124357208609581, -0.3068576753139496, 0.14300671219825745, -0.1927705705165863, -0.04361412301659584, -0.021950362250208855, 0.40578997135162354, -0.0212737824767828, 0.28545406460762024, 0.31094586849212646, 0.15615573525428772, 0.12214254587888718, 0.12312217801809311, -0.20654675364494324, 0.33852919936180115, -0.14966563880443573, -0.12863649427890778, -0.12041734158992767, -0.06161477416753769, 0.2588486075401306, -0.11313822865486145, -0.08800972998142242, -0.1768268346786499, -0.014624115079641342, -0.33047088980674744, 0.020192649215459824, 0.19396111369132996, -0.0659535825252533, 0.04192115366458893, 0.24863044917583466, -0.2537769675254822, -0.1377231925725937, -0.059625353664159775, -0.3462243378162384, -0.16181938350200653, -0.4648602306842804, 0.196210116147995, 0.05868682265281677, -0.1515142023563385, -0.08748701214790344, -0.45019403100013733, 0.18756400048732758, 0.05569201707839966, -0.005037479102611542, -0.19469645619392395, 0.10776174813508987, -0.014502028003334999, -0.03426451236009598, 0.3410903215408325, -0.3945315480232239, -0.0010110437870025635, 0.3809555768966675, -0.1595524251461029, -0.02658456563949585, 0.12249168008565903, -0.09577785432338715, 0.39026060700416565, -0.09571227431297302, -0.15573160350322723, 0.567808210849762, -0.5921734571456909, -0.26608705520629883, 0.05019427090883255, -0.04213886708021164, -0.1447429656982422, 0.3695034384727478, -0.06576819717884064, -0.039474405348300934, 0.07813966274261475, 0.08266063779592514, 0.144344300031662, 0.025286955758929253, 0.036696262657642365, -0.06944005191326141, -0.1120612770318985, 0.07201431691646576, 0.14142988622188568, 0.14674213528633118, 0.03374359384179115, 0.0999671220779419, 0.06819626688957214, 0.32104992866516113, -0.055073726922273636, -0.04141709953546524, 0.6366989016532898, 0.1728818714618683, 0.2089121788740158, 0.046118222177028656, -0.25871551036834717, -0.09337187558412552, 0.09669534862041473, -0.09548264741897583, 0.20620690286159515, -0.5495560765266418, 0.039022721350193024, -0.28502604365348816, 0.35468095541000366, -0.3013054132461548, -0.17267537117004395, 0.14956888556480408, 0.11204648017883301, 0.15216058492660522, 0.08011548221111298, -0.052536491304636, 0.4499247670173645, -0.268441379070282, 0.3102836608886719, -0.393457293510437, 0.3476170003414154, -0.3230850398540497, -0.3127036988735199, 0.04742034524679184, 0.17949096858501434, 0.024485832080245018, -0.04163544625043869, -0.30319371819496155, 0.16406658291816711, 0.0453663095831871, 0.20532071590423584, -0.31083378195762634, -0.03053329885005951, -0.0025202278047800064, -0.27089670300483704, 0.02911042608320713, -0.11259222775697708, 0.31119304895401, 0.10925492644309998, 0.05677122250199318, -0.041405417025089264, -0.08253021538257599, 0.3201824128627777, 0.1547757238149643, 0.22164899110794067, 0.2683151960372925, 0.04771827161312103, 0.1253909170627594, -0.23968012630939484, 0.017539357766509056, 0.18916183710098267, 0.21758733689785004, 0.12453307956457138, -0.02025003731250763, -0.3259884715080261, 0.3841291666030884, 0.1633160412311554, -0.023884344846010208, -0.06235859915614128, -0.2212226390838623, 0.2503383159637451, 0.3229474723339081, 0.3707652986049652, 0.35874050855636597, 0.09806711226701736, -0.2662656605243683, 0.11245916038751602, 0.07017193734645844, -0.0723481997847557, 0.2630462050437927, 0.1803167313337326, 0.37655019760131836, 0.25856801867485046, 0.01693122833967209, 0.12798240780830383, -0.13936102390289307, -0.4716644883155823, -0.10985515266656876, 0.37011659145355225, -0.29064542055130005, -0.001737736165523529, -0.12793463468551636, -0.05703889578580856, -0.3960559070110321, -0.026670046150684357, -0.15691319108009338, -0.264887273311615, -0.4273056983947754, 0.3287535309791565, -0.05488137900829315, 0.29113078117370605, -0.19480302929878235, -0.24224235117435455, 0.19393393397331238, -0.12218492478132248, -0.1903228759765625, -0.36165642738342285, 0.08080045878887177, 0.03458442538976669, 0.18995380401611328, 0.1496807038784027, 0.3307649493217468, -0.107923224568367, 0.29579442739486694, -0.3171854615211487, -0.23514088988304138, 0.14393962919712067, -0.0386446937918663, -0.034761302173137665, 0.3126859962940216, 0.1878063678741455, 0.25660091638565063, -0.5176385641098022, 0.09446390718221664, -0.14445345103740692, -0.189145028591156, 0.08693961799144745, -0.052748166024684906, -0.18511644005775452, 0.12090454995632172, -0.2517589330673218, -0.48113560676574707, -0.5694224238395691, 0.13440638780593872, 0.24150867760181427, 0.08420412242412567, 0.26392337679862976, 0.1586868315935135, 0.31294816732406616, 0.08068373054265976, 0.4144498109817505, 0.23354190587997437, -0.07358457148075104, 0.30034497380256653, -0.15435391664505005, -0.2662021815776825, 0.05075201392173767, -0.09570382535457611, 0.4410252571105957, -0.027559194713830948, -0.35064196586608887, -0.13104456663131714, -0.24551378190517426, 0.16854546964168549, -0.1461605727672577, 0.2192200869321823, 0.37877804040908813, 0.414222776889801, 0.004855979233980179, -0.10502402484416962, 0.09298646450042725, -0.03882167488336563, -0.27470752596855164, -0.06299746781587601, -0.016450056806206703, 0.4377359449863434, -0.19663459062576294, 0.2570459842681885, 0.23741205036640167, -0.16500329971313477, 0.23736384510993958, 0.08955816179513931, 0.28659358620643616, -0.16709105670452118, -0.27347826957702637, -0.17229416966438293, -0.180995911359787, 0.10606499016284943, -0.047507673501968384, -0.24346637725830078, -0.01947050914168358, -0.12351600080728531, -0.06241896376013756, -0.04349275678396225, -0.027372416108846664, -0.07372915744781494, -0.42088621854782104, 0.23319081962108612, -0.08653128147125244, -0.06325040012598038, -0.17037665843963623, 0.036015868186950684, 0.18266384303569794, 0.04490106925368309, -0.1402004361152649, -0.07022362947463989, -0.2805652320384979, -0.027860542759299278, -0.29643091559410095, 0.09792312979698181, 0.13958683609962463, 0.3668658137321472, 0.11172240972518921, -0.05322970822453499, 0.06627233326435089, 0.006396360695362091, 0.2152082473039627, -0.18715506792068481, -0.23747441172599792, 0.14924632012844086, -0.068037249147892, -0.44537559151649475, -0.03558829426765442, -0.1686117947101593, 0.0898018404841423, 0.15014395117759705, 0.1917921006679535, -0.06652428209781647, -0.17009872198104858, 0.4521212577819824, 0.06473669409751892, -0.11619039624929428, -0.030791480094194412, -0.15608495473861694, -0.3060137629508972, -0.3745065927505493, -0.07876864075660706, 0.2592592239379883, 0.46490445733070374, 0.2863294184207916, 0.19665184617042542, -0.2955895662307739, -0.12551334500312805, -0.048651427030563354, 0.02841978147625923, 0.1900259554386139, -0.046729035675525665, 0.09548941254615784, 0.08056318014860153, 0.3972302973270416, 0.5442346930503845, 0.6393277645111084, -0.3564460575580597, -0.5447501540184021, -0.05768277868628502, -0.1703615039587021, 0.3061317503452301, 0.04232814535498619, -0.09967024624347687, 0.19207651913166046, -0.4968562126159668, 0.014718657359480858, -0.08922390639781952, -0.04809786006808281, 0.06301027536392212, 0.1677154004573822, -0.18332231044769287, -0.24146577715873718, 0.36401161551475525, 0.25125014781951904, 0.05983549356460571, 0.4667035639286041, 0.23924025893211365, -0.38408684730529785, 0.4785679280757904, 0.1116812527179718, 0.7710726857185364, 0.2474597692489624, 0.10733545571565628, 0.2562350630760193, -0.4400929808616638, 0.27828890085220337, -0.009791374206542969, -0.013260417617857456, -0.4400268495082855, -0.233763188123703, -0.01054733619093895, -0.23394107818603516, 0.3223817050457001, -0.13457442820072174, -0.1893027424812317, 0.057696398347616196, -0.23671028017997742, -0.11946331709623337, 0.12738797068595886, 0.15037280321121216, -0.09924160689115524, -0.18415561318397522, -0.15610376000404358, 0.0969632938504219, 0.16927587985992432, 0.1097305566072464, -0.11566148698329926, -0.039514943957328796, -0.1755986213684082, -0.32159623503685, -0.21222439408302307, 0.19046536087989807, -0.3982684314250946, 0.4196784496307373, 0.15749415755271912, -0.20017899572849274, 0.23643603920936584, 0.45393550395965576, 0.18932729959487915, -0.10550291836261749, -0.11277548223733902, 0.14423617720603943, 0.11200116574764252, -0.16209116578102112, 0.07247572392225266, 0.2463332712650299, 0.3890644907951355, -0.07430321723222733, 0.03419813513755798, 0.38855165243148804, -0.18327166140079498, -0.4002794027328491, 0.1420225203037262, 0.06763996928930283, 0.043245892971754074, -0.23007208108901978, -0.20149093866348267, -0.17483940720558167, -0.05476310849189758, -0.17514777183532715, 0.147023543715477, 0.03132973611354828, -0.3554784655570984, 0.1370883584022522, -0.17109976708889008, -0.3439685106277466, 0.01698918268084526, 0.38314497470855713, 0.1898702085018158, 0.04016689211130142, 0.6141799688339233, 0.07355962693691254, -0.25458812713623047, -0.21388505399227142, 0.1335947960615158, 0.19124937057495117, -0.62235027551651, 0.1904217004776001, -0.021416522562503815, -0.2732062041759491, -0.029417753219604492, 0.3728379011154175, 0.24950259923934937, 0.07783541083335876, -0.17882214486598969, -0.24607907235622406, -0.428485631942749, 0.11749082803726196, 0.04444221034646034, 0.2214086949825287, -0.37719854712486267, 0.2194172739982605, -0.17110860347747803, 0.103178009390831, -0.2955057919025421, -0.026355629786849022, -0.5316578149795532, 0.14548428356647491, 0.2224799394607544, -0.015324385836720467, -0.1502855271100998, -0.02151089906692505, 0.14002758264541626, 0.2930784523487091, -0.09902186691761017, -0.1772584617137909, -0.1596524566411972, 0.09779373556375504, 0.19002340734004974, -0.1416580080986023, 0.00005961954593658447, -0.01402941346168518, -0.07470054924488068, -0.019229821860790253, -0.08337271213531494, 0.26569053530693054, -0.0025573670864105225, 0.16257129609584808, 0.1595553457736969, -0.033375516533851624, -0.26804155111312866, 0.24136541783809662, -0.1609545648097992, 0.2795288860797882, -0.20764602720737457, 0.2113102674484253, -0.09595108777284622, 0.09591668844223022, -0.05292639881372452, 0.09137202799320221, -0.17035174369812012, -0.05258016288280487, 0.29036810994148254, -0.34288138151168823, -0.015550516545772552, 0.18389125168323517, 0.22407057881355286, 0.22856120765209198, -0.3436901271343231, 0.012690983712673187, 0.14790883660316467, 0.23818010091781616, -0.28956544399261475, -0.16199693083763123, -0.11132695525884628, -0.2829515039920807, 0.039406076073646545, 0.15308913588523865, -0.06062738597393036, -0.12041755020618439, 0.2808241844177246, 0.26463666558265686, 0.20148871839046478, -0.11933860182762146, 0.401050865650177, 0.3233991861343384, -0.13719576597213745, -0.04563349485397339, 0.5149922370910645, 0.24320140480995178, 0.2674027383327484, 0.3243061304092407, -0.1201210469007492, 0.19134610891342163, -0.3938050866127014, -0.0865255668759346, 0.13271696865558624, -0.15006910264492035, 0.07412679493427277, -0.3074265122413635, -0.01670687273144722, -0.19194567203521729, -0.12525498867034912, -0.05134852975606918, -0.052303194999694824, -0.06941889971494675, 0.00046334415674209595, 0.07868194580078125, -0.2117467075586319, -0.026525575667619705, 0.027291610836982727, -0.14084982872009277, -0.10010220855474472, -0.0014868825674057007, 0.15193066000938416, -0.03160551190376282, 0.14198365807533264, 0.07675089687108994, -0.25749874114990234, -0.26734089851379395, 0.03476652875542641, 0.165971577167511, 0.03169573098421097, -0.40021413564682007, 0.1568090170621872, -0.03142855688929558, -0.04700645059347153, -0.2851216495037079, 0.43323761224746704, 0.5774037837982178, 0.4171214997768402, 0.10439202189445496, -0.04928453639149666, -0.07951289415359497, -0.1513766497373581, 0.1302853524684906, 0.3273222744464874, -0.07780224084854126, 0.22529923915863037, 0.3888447880744934, 0.15440931916236877, -0.24088755249977112, -0.07401212304830551, 0.07731480896472931, 0.22244518995285034, -0.26429280638694763, 0.5152069330215454, -0.02425434999167919, -0.33644479513168335, 0.01254897192120552, 0.1521034836769104, -0.4033680260181427, 0.19476701319217682, 0.4406997561454773, -0.18382270634174347, 0.018053457140922546, -0.33213943243026733, 0.06533817946910858, 0.03727605193853378, 0.6124904751777649, 0.48521313071250916, 0.33517056703567505, -0.15982908010482788, -0.16731733083724976, -0.3128805160522461, 0.18699117004871368, -0.11246559023857117, 0.03628339618444443, 0.013686876744031906, 0.06751812994480133, 0.04187149927020073, 0.15657424926757812, 0.18706804513931274, 0.2210918366909027, -0.2763952314853668, 0.02608480118215084, -0.38806039094924927, -0.2455812245607376, 0.10810841619968414, -0.03884698078036308, 0.08636362105607986, -0.5342223644256592, 0.09064959734678268, -0.0824476107954979, 0.16404196619987488, -0.28465989232063293, -0.0542563758790493, 0.20082250237464905, -0.1979013979434967, 0.45428916811943054, -0.05478053539991379, 0.4595044255256653, 0.020230047404766083, -0.1561621129512787, -0.13956424593925476, -0.5568035840988159, -0.28128939867019653, 0.1751372516155243, 0.32846924662590027, 0.4226182997226715, -0.18614041805267334, -0.38109081983566284, -0.3425794243812561, 0.13387203216552734, -0.20194575190544128, 0.10682004690170288, -0.16240717470645905, 0.17728838324546814, -0.04089207947254181, 0.11511212587356567, 0.19150277972221375, -0.09540397673845291, -0.02851509302854538, 0.19460955262184143, -0.2638320326805115, -0.3892172873020172, 0.41564828157424927, -0.18457314372062683, -0.3162107765674591, 0.15280799567699432, 0.1361370086669922, -0.0953700989484787, -0.08400661498308182, -0.5766762495040894, 0.23468558490276337, 0.32386383414268494, -0.09576019644737244, -0.12282361835241318, 0.23794598877429962, 0.33038240671157837, 0.11651982367038727, -0.04669814556837082, 0.3443213403224945, -0.12160798907279968, -0.01021159440279007, 0.05064907670021057, -0.11506733298301697 ]
https://github.com/huggingface/datasets/issues/6537
Conceptually, we can use xarray to load the netCDF file, then xarray -> pandas -> pyarrow.
Adding support for netCDF (*.nc) files
### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format. ### Your contribution I can submit a PR, provided I have the time.
16
Adding support for netCDF (*.nc) files ### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format. ### Your contribution I can submit a PR, provided I have the time. Conceptually, we can use xarray to load the netCDF file, then xarray -> pandas -> pyarrow.
[ -0.38227832317352295, -0.14507780969142914, -0.011451058089733124, 0.0008691772818565369, -0.07568608224391937, 0.011976070702075958, -0.2338274121284485, 0.40313783288002014, -0.12558530271053314, 0.2797532379627228, -0.4577072858810425, 0.04672252759337425, -0.45220503211021423, 0.5326216220855713, 0.2755897343158722, -0.003233242779970169, 0.27366405725479126, 0.39307600259780884, 0.029494931921362877, 0.292113721370697, -0.2114965319633484, 0.057187072932720184, -0.3259257674217224, 0.04001375287771225, -0.41868361830711365, -0.07334333658218384, -0.2697604298591614, 0.1164521723985672, -0.3124965727329254, -0.5245506763458252, 0.3869742155075073, 0.601868212223053, 0.42347490787506104, 0.4160570502281189, -0.0001273650850635022, -0.08668389916419983, 0.20638923346996307, -0.003786906599998474, -0.2020246386528015, -0.001156821846961975, 0.18574967980384827, -0.19651851058006287, 0.2378147691488266, -0.15236739814281464, -0.30033767223358154, -0.39744558930397034, 0.12841400504112244, 0.08319637924432755, 0.15361280739307404, 0.022421270608901978, 0.03430705890059471, 0.4950100779533386, -0.05478724092245102, -0.051135823130607605, -0.30070215463638306, 0.547809362411499, -0.38871002197265625, 0.5127074718475342, 0.43898913264274597, -0.01470232754945755, -0.07540634274482727, 0.09133520722389221, -0.12100579589605331, -0.23094472289085388, 0.527809202671051, 0.07864528894424438, -0.015418268740177155, -0.22246918082237244, -0.19811995327472687, 0.29658007621765137, 0.4732947051525116, -0.33544066548347473, -0.4552273154258728, -0.3139253854751587, -0.002849999815225601, -0.19338104128837585, -0.11160683631896973, 0.20980706810951233, -0.14039328694343567, 0.41716188192367554, -0.2859150171279907, -0.2624325752258301, -0.4137352406978607, 0.28333142399787903, -0.10568363964557648, 0.3065950870513916, -0.12256321310997009, -0.07108448445796967, 0.32730185985565186, -0.06378927081823349, 0.22771432995796204, -0.3597298860549927, 0.13584637641906738, 0.08905954658985138, -0.3067235052585602, -0.3186976909637451, -0.0659189224243164, 0.2370159775018692, 0.22151528298854828, -0.04482953995466232, 0.13066983222961426, 0.20510950684547424, -0.6024091243743896, 0.08569405972957611, 0.08943650126457214, -0.11058585345745087, 0.20541544258594513, 0.353291779756546, 0.3890238404273987, 0.07381763309240341, 0.4344847798347473, -0.011641034856438637, -0.22462236881256104, 0.26375672221183777, -0.38565483689308167, -0.18421974778175354, 0.11610683798789978, -0.2161988466978073, 0.11743051558732986, -0.1361539363861084, 0.5848822593688965, 0.23802992701530457, 0.22841092944145203, 0.30863428115844727, 0.0606040395796299, 0.14596505463123322, -0.1474880427122116, 0.4648444950580597, 0.12369465082883835, -0.30701619386672974, -0.0075958408415317535, -0.13021895289421082, -0.15082773566246033, 0.06442152708768845, 0.27967777848243713, -0.030102524906396866, -0.1700417399406433, -0.20393158495426178, 0.44769027829170227, 0.26456335186958313, -0.2293245494365692, 0.03948032110929489, 0.15995600819587708, 0.12519973516464233, -0.389764666557312, 0.1730998456478119, 0.010900674387812614, 0.11403842270374298, -0.28797435760498047, 0.13485585153102875, -0.12682190537452698, -0.04984559118747711, -0.4765504002571106, -0.10184077173471451, -0.10692863166332245, 0.04049159958958626, -0.3245880603790283, 0.15466216206550598, -0.4413628578186035, -0.4729834198951721, -0.034927837550640106, -0.1630769968032837, -0.4697898030281067, -0.3831550180912018, 0.08955400437116623, 0.13813434541225433, -0.07713387161493301, -0.025487594306468964, 0.0003892630338668823, -0.13334499299526215, 0.0756302997469902, 0.23344378173351288, -0.17559263110160828, 0.028937572613358498, -0.38741832971572876, 0.34767699241638184, 0.36627262830734253, -0.5261173844337463, -0.14335602521896362, 0.18518762290477753, 0.06442378461360931, 0.13362939655780792, -0.06529748439788818, 0.37935975193977356, 0.18850144743919373, -0.2541430592536926, -0.07049055397510529, 0.27382752299308777, 0.08588328212499619, -0.01886175200343132, -0.0398474745452404, -0.40949955582618713, 0.026345759630203247, 0.34511232376098633, -0.01107677724212408, 0.16184981167316437, 0.2653658390045166, -0.4876956045627594, 0.3819650113582611, -0.41757771372795105, 0.11683102697134018, 0.04461739957332611, -0.12179968506097794, -0.007217850536108017, -0.09616191685199738, -0.3817785978317261, -0.7617040276527405, 0.39789241552352905, -0.029171690344810486, -0.04255767539143562, -0.2771168053150177, -0.44178301095962524, -0.06290299445390701, -0.03454035893082619, -0.08247756212949753, -0.05765218287706375, -0.048555638641119, 0.011755922809243202, 0.2814815640449524, 0.33854299783706665, -0.24517202377319336, 0.3960847854614258, 0.04057217389345169, 0.21874794363975525, -0.10814876854419708, 0.4403987526893616, 0.13699734210968018, 0.005269154906272888, 0.25705599784851074, 0.28883591294288635, -0.06273768842220306, -0.10063868761062622, 0.044771309942007065, 0.3194524049758911, -0.5240402221679688, 0.08271230012178421, 0.09661364555358887, 0.549335241317749, 0.2536076307296753, -0.3437272310256958, 0.3368060290813446, -0.002491539344191551, -0.05453060567378998, -0.18579335510730743, -0.12013477832078934, 0.39835235476493835, -0.1655621975660324, -0.15464326739311218, -0.16803288459777832, -0.020696505904197693, 0.011175066232681274, 0.1744290292263031, -0.02098022773861885, 0.014467179775238037, 0.13628384470939636, 0.10797842592000961, 0.2088918536901474, -0.23328763246536255, -0.35493379831314087, 0.006377797573804855, 0.190494105219841, -0.19664481282234192, 0.13667148351669312, 0.21212026476860046, -0.2853003740310669, 0.24454984068870544, 0.2515673041343689, -0.043467581272125244, 0.28644245862960815, 0.1237640231847763, 0.15738993883132935, 0.17393368482589722, -0.20892462134361267, 0.015589527785778046, 0.03262251242995262, -0.070370614528656, 0.07196642458438873, 0.042669396847486496, -0.050753675401210785, -0.013494228944182396, -0.2796580195426941, -0.23665228486061096, -0.13521817326545715, -0.11413443088531494, -0.11190813779830933, 0.11468462646007538, -0.29173606634140015, -0.5802806615829468, -0.016151607036590576, 0.03253009170293808, -0.1309473067522049, -0.03940821811556816, -0.013239980675280094, 0.33000418543815613, -0.03216664493083954, 0.010184507817029953, -0.27629631757736206, 0.4414972960948944, 0.006800785660743713, -0.23265379667282104, -0.2314380258321762, 0.08271706104278564, -0.10102885961532593, -0.04034824296832085, 0.37185853719711304, 0.030754853039979935, 0.4362048804759979, 0.09520386904478073, 0.45605042576789856, -0.2979300022125244, -0.13703790307044983, 0.04189281165599823, 0.05224969983100891, 0.13986678421497345, 0.010608281940221786, -0.014036111533641815, -0.2880593538284302, 0.0260285846889019, -0.04694254696369171, -0.3861045837402344, 0.005502812564373016, -0.030703630298376083, 0.015230432152748108, -0.1066163033246994, -0.3408431112766266, 0.24928241968154907, -0.4922514855861664, -0.41850078105926514, 0.2641351521015167, -0.28671059012413025, 0.08080295473337173, 0.22620567679405212, -0.17447242140769958, 0.04988731071352959, -0.3042740523815155, -0.26745694875717163, 0.07006684690713882, -0.2425781637430191, 0.49878033995628357, -0.2536594867706299, -0.45243531465530396, -0.051209788769483566, -0.2537972331047058, 0.04171588271856308, 0.0539562962949276, -0.0011581778526306152, -0.04957642778754234, -0.15641699731349945, 0.33859774470329285, 0.13680048286914825, 0.03623388707637787, 0.283267617225647, -0.22131192684173584, 0.08586017042398453, -0.06089824438095093, 0.0013955533504486084, -0.22896645963191986, 0.14272010326385498, -0.09574644267559052, 0.262057363986969, -0.41250094771385193, 0.029061198234558105, -0.03285011276602745, 0.1350170224905014, -0.057021256536245346, 0.261482834815979, -0.02966020628809929, 0.5106897354125977, 0.07323294878005981, -0.07710933685302734, -0.04826498031616211, 0.002514474093914032, 0.07046787440776825, 0.4443601667881012, 0.2363290786743164, -0.08413635194301605, -0.14522245526313782, -0.2648331820964813, -0.25584328174591064, -0.09319403022527695, 0.11112657189369202, 0.15046140551567078, 0.33965355157852173, 0.030241280794143677, -0.03674915432929993, 0.019953131675720215, -0.4636106491088867, -0.05094180256128311, 0.48787641525268555, 0.03209339454770088, 0.0036061927676200867, -0.36486688256263733, -0.0795544683933258, -0.5242965221405029, 0.24556373059749603, 0.3184219300746918, 0.16345104575157166, 0.08093835413455963, 0.4108021855354309, 0.05545077472925186, 0.25411760807037354, 0.7427007555961609, -0.3180773854255676, -0.26068001985549927, 0.20103606581687927, 0.11480748653411865, -0.3110896050930023, 0.09436030685901642, -0.2073383629322052, 0.10414065420627594, -0.1191134825348854, 0.16193807125091553, 0.05834127962589264, -0.2828848361968994, -0.03137793764472008, 0.337777316570282, -0.04666654020547867, -0.1453561931848526, -0.01561892032623291, 0.087387815117836, -0.3132098913192749, -0.1409597545862198, 0.08004214614629745, -0.14057762920856476, -0.2086208462715149, -0.169260174036026, -0.010393425822257996, 0.07354311645030975, 0.24047718942165375, 0.15983812510967255, 0.3369799852371216, 0.19357579946517944, -0.013180822134017944, 0.4147031307220459, 0.0907852053642273, 0.05244194716215134, 0.35124120116233826, 0.2946326732635498, -0.140794575214386, -0.05271533504128456, 0.042690929025411606, 0.2727016806602478, 0.4158894717693329, 0.05966271087527275, 0.03199749439954758, -0.018141813576221466, 0.08554363250732422, -0.4714910686016083, 0.287221759557724, 0.19699299335479736, -0.07516972720623016, -0.6755346059799194, -0.05470309033989906, 0.7160319089889526, 0.13597744703292847, -0.12605206668376923, 0.33444225788116455, 0.521881103515625, -0.06984644383192062, -0.0829639658331871, -0.08387390524148941, 1.0673645734786987, -0.3907724618911743, 0.33145904541015625, 0.37980324029922485, -0.37552332878112793, 0.7052420377731323, -0.1607135832309723, 0.005405113101005554, -0.3218681216239929, -0.04845593124628067, -0.20686694979667664, -0.08305830508470535, 0.30020850896835327, 0.09416447579860687, -0.264278382062912, 0.2863345146179199, 0.41279906034469604, 0.24261125922203064, 0.04618712514638901, 0.18808740377426147, 0.10159031301736832, -0.40351951122283936, -0.056543342769145966, 0.004280313849449158, -0.12818993628025055, -0.0695679634809494, -0.1930055022239685, -0.2709812819957733, -0.1982416808605194, 0.07098426669836044, -0.10136383771896362, -0.04032435640692711, 0.18986624479293823, 0.13876274228096008, 0.17078347504138947, -0.1023498922586441, 0.24416352808475494, 0.34488046169281006, 0.32797905802726746, -0.029491731896996498, -0.5312148332595825, -0.10680229961872101, -0.42352747917175293, 0.020618028938770294, -0.14118541777133942, -0.16700534522533417, 0.3463533818721771, 0.06407241523265839, -0.143644779920578, 0.08723566681146622, 0.17386801540851593, -0.2615678310394287, -0.09695902466773987, 0.14357709884643555, 0.21221064031124115, -0.20254746079444885, -0.13716115057468414, -0.11607345193624496, -0.07987706363201141, 0.07737146317958832, -0.011582908220589161, 0.3229316174983978, 0.18547289073467255, 0.10004675388336182, 0.2079380750656128, 0.08376842737197876, -0.07192922383546829, 0.09995684027671814, 0.07063136249780655, -0.5591412782669067, -0.002496795728802681, -0.021969705820083618, -0.30210718512535095, -0.044825632125139236, 0.03902888298034668, 0.014670435339212418, -0.263094425201416, 0.022581923753023148, 0.10385964810848236, 0.09767250716686249, -0.03432489559054375, 0.3049634099006653, 0.13384519517421722, -0.37735697627067566, -0.04165850579738617, -0.14291103184223175, -0.1798183023929596, 0.28475576639175415, -0.3696363866329193, 0.3974875807762146, 0.1814011186361313, 0.22005194425582886, -0.058375388383865356, -0.16260196268558502, -0.14984382688999176, 0.06595230847597122, 0.17955565452575684, 0.04114736244082451, 0.4207991659641266, 0.2577224671840668, 0.15178623795509338, -0.31589630246162415, -0.11760637164115906, 0.2075568437576294, -0.35684481263160706, -0.0152493417263031, -0.1171891838312149, 0.25519225001335144, 0.09261485189199448, -0.12378230690956116, 0.06520187109708786, -0.17854022979736328, -0.029188552871346474, -0.2336515635251999, 0.054559946060180664, -0.05344133824110031, -0.03728398680686951, 0.27771323919296265, 0.006130141206085682, 0.15068835020065308, -0.0885244831442833, 0.36292707920074463, 0.14867661893367767, 0.5398856401443481, -0.09939056634902954, 0.08885129541158676, -0.3611093759536743, -0.1868903934955597, -0.07670395821332932, 0.19676265120506287, 0.1282527893781662, -0.19393745064735413, 0.41433852910995483, -0.0385449081659317, 0.07432922720909119, 0.05288062244653702, 0.5771950483322144, 0.014015767723321915, -0.27342116832733154, -0.10671654343605042, 0.46893125772476196, -0.042994752526283264, -0.097289077937603, -0.2545398771762848, 0.3870380222797394, 0.004122722893953323, 0.0729455053806305, 0.29767221212387085, 0.40770360827445984, -0.0870504081249237, 0.014176813885569572, -0.11730904877185822, -0.040032804012298584, 0.20019327104091644, 0.10289818793535233, 0.5648682117462158, 0.2992905378341675, -0.01705995947122574, 0.18766087293624878, 0.18203487992286682, 0.17202405631542206, 0.8800264596939087, -0.1204063892364502, 0.22729918360710144, 0.06117107719182968, 0.2949402630329132, 0.11798866093158722, -0.28458118438720703, 0.18711449205875397, 0.0225253626704216, 0.05491449683904648, 0.19218705594539642, -0.04972778633236885, 0.05295431613922119, -0.25166055560112, -0.17955923080444336, -0.18326672911643982, 0.20255953073501587, -0.07197828590869904, 0.22696933150291443, 0.19946488738059998, -0.0709996372461319, 0.05947031080722809, -0.0035858452320098877, -0.3177821636199951, -0.06291872262954712, 0.058407653123140335, 0.12968403100967407, 0.19169612228870392, -0.05634364113211632, 0.37672653794288635, 0.37591055035591125, 0.32219305634498596, -0.16588334739208221, -0.05896206945180893, 0.25835317373275757, 0.030196022242307663, 0.13709652423858643, 0.2717864513397217, 0.3533667325973511, 0.042158521711826324, 0.12303309142589569, 0.15127548575401306, -0.3505844175815582, -0.044207990169525146, 0.22205498814582825, -0.14934107661247253, 0.15393497049808502, 0.2893006503582001, 0.27554428577423096, -0.03483371436595917, 0.028162378817796707, -0.12779340147972107, -0.011499527841806412, 0.22124163806438446, -0.33632737398147583, -0.010660376399755478, -0.06619036197662354, -0.1995442658662796, 0.001872495748102665, -0.2291446030139923, -0.2826399803161621, -0.08811618387699127, 0.07945559918880463, -0.05456581339240074, 0.03884623572230339, -0.03318401798605919, -0.043622441589832306, 0.10611222684383392, 0.4048263430595398, 0.37880897521972656, 0.37874215841293335, -0.030582895502448082, -0.5744822025299072, -0.6202839612960815, -0.025803308933973312, -0.05337100848555565, -0.46931612491607666, 0.16732503473758698, -0.15931472182273865, 0.02107056975364685, 0.23061399161815643, -0.10627920925617218, -0.14315927028656006, 0.2964802384376526, 0.03254880756139755, -0.18489384651184082, -0.0822557806968689, 0.05506996437907219, 0.02417737804353237, -0.06998597830533981, -0.3976593017578125, 0.26958972215652466, -0.1764747053384781, -0.2585141658782959, -0.0020480453968048096, 0.550544261932373, -0.3453001379966736, 0.00468659121543169, 0.4293422996997833, 0.128809854388237, 0.4887149930000305, -0.08739025145769119, -0.11472125351428986, -0.0755586177110672, 0.2011319398880005, 0.006234351545572281, 0.1364903748035431, 0.02356869727373123, 0.7903156280517578, -0.5040958523750305, -0.19568447768688202, -0.0645895004272461, -0.09373034536838531, 0.07006660103797913, 0.08871743083000183, -0.2361987680196762, 0.15525701642036438, -0.38059473037719727, 0.11456865817308426, 0.27009814977645874, 0.422492116689682, -0.004481146112084389, -0.01972080022096634, 0.05994445085525513, -0.3683074414730072, 0.36092910170555115, -0.0054200999438762665, -0.24560284614562988, 0.017395786941051483, -0.09887237846851349, 0.08322380483150482, -0.047411542385816574, -0.5633252263069153, 0.07255226373672485, 0.17514270544052124, 0.20456455647945404, 0.20337453484535217, 0.3862307369709015, -0.10196878015995026, -0.34382545948028564, -0.1261177510023117, 0.3504897952079773, 0.1090792864561081, -0.22123506665229797, 0.02231433242559433, -0.4573744237422943 ]
https://github.com/huggingface/datasets/issues/6537
I'd still need to verify that such a conversion would be lossless, especially for multi-dimensional data.
Adding support for netCDF (*.nc) files
### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format. ### Your contribution I can submit a PR, provided I have the time.
16
Adding support for netCDF (*.nc) files ### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format. ### Your contribution I can submit a PR, provided I have the time. I'd still need to verify that such a conversion would be lossless, especially for multi-dimensional data.
[ -0.42485103011131287, -0.14924445748329163, -0.01656416431069374, -0.053587038069963455, -0.08428335934877396, 0.03142045438289642, -0.2771828770637512, 0.3843265771865845, -0.10386538505554199, 0.3364311754703522, -0.42337337136268616, 0.005743648856878281, -0.5121448636054993, 0.5744471549987793, 0.14821812510490417, 0.0499265119433403, 0.2813507616519928, 0.3571123480796814, -0.01885155215859413, 0.3076561689376831, -0.2359468638896942, 0.07878246903419495, -0.2811770439147949, -0.041303880512714386, -0.34364378452301025, -0.009351888671517372, -0.20587071776390076, 0.10002081096172333, -0.3840886056423187, -0.41994500160217285, 0.28440430760383606, 0.5439450740814209, 0.4076131284236908, 0.39217162132263184, -0.0001278799318242818, -0.0600462406873703, 0.15663595497608185, -0.02741209790110588, -0.2585575580596924, -0.009328410029411316, 0.14551836252212524, -0.19716331362724304, 0.17874351143836975, -0.10965092480182648, -0.31430986523628235, -0.310985803604126, 0.0813208818435669, -0.10096028447151184, 0.16550837457180023, 0.0660298615694046, 0.03424067795276642, 0.46305418014526367, -0.10078732669353485, -0.04489520564675331, -0.32667550444602966, 0.6654295325279236, -0.4296945333480835, 0.3722633719444275, 0.36830729246139526, 0.0979362204670906, 0.0015143640339374542, 0.1703747808933258, -0.11758776009082794, -0.29355111718177795, 0.5001623630523682, -0.018103208392858505, -0.030435781925916672, -0.19705399870872498, -0.13078820705413818, 0.2927396297454834, 0.4646398723125458, -0.22659896314144135, -0.47479310631752014, -0.26689204573631287, -0.01766851171851158, -0.178370863199234, -0.14463937282562256, 0.19964435696601868, -0.11728940904140472, 0.4139459431171417, -0.37299975752830505, -0.28045812249183655, -0.39341413974761963, 0.2120412290096283, -0.10995114594697952, 0.24152952432632446, -0.19224269688129425, -0.0970962792634964, 0.3462867736816406, -0.08684507012367249, 0.16311560571193695, -0.34676802158355713, 0.12779900431632996, 0.02330230548977852, -0.21604076027870178, -0.3818393051624298, -0.11850662529468536, 0.24187451601028442, 0.18497592210769653, -0.048574481159448624, 0.1493345946073532, 0.23524321615695953, -0.6851212382316589, 0.0535372793674469, 0.05527522787451744, -0.16731078922748566, 0.25852862000465393, 0.39163661003112793, 0.37018075585365295, 0.11482768505811691, 0.4965980052947998, 0.008547157049179077, -0.15896722674369812, 0.3127400279045105, -0.4711463451385498, -0.13842132687568665, 0.15466146171092987, -0.2743200659751892, 0.09444423764944077, -0.13155917823314667, 0.5818797945976257, 0.3108184039592743, 0.22713406383991241, 0.2643219828605652, 0.10241135954856873, 0.14752966165542603, -0.061681754887104034, 0.4734329581260681, 0.1387256383895874, -0.4190402030944824, 0.011334188282489777, -0.1286371350288391, -0.17866086959838867, 0.08172141015529633, 0.2766685485839844, 0.05771356448531151, -0.198420450091362, -0.2044668346643448, 0.36584943532943726, 0.27128034830093384, -0.20746147632598877, 0.07557947933673859, 0.25591638684272766, 0.07968440651893616, -0.41310617327690125, 0.20788022875785828, 0.09349241107702255, 0.05626737326383591, -0.2793603539466858, 0.1338406503200531, -0.10693210363388062, 0.02235925942659378, -0.46237754821777344, -0.10815173387527466, -0.0969754308462143, 0.05000104382634163, -0.3250252306461334, 0.19975197315216064, -0.43408292531967163, -0.48558497428894043, -0.015609323978424072, -0.16259008646011353, -0.5609179139137268, -0.3474086821079254, 0.0873238742351532, 0.23199230432510376, -0.1058908998966217, -0.021265394985675812, -0.048880867660045624, -0.15716899931430817, 0.1261185258626938, 0.22482933104038239, -0.1271572709083557, -0.06881851702928543, -0.4194261133670807, 0.2734336853027344, 0.35899919271469116, -0.525756299495697, -0.054491009563207626, 0.2138383984565735, 0.036686643958091736, 0.1207430511713028, -0.15652626752853394, 0.34671324491500854, 0.19034473598003387, -0.3161524832248688, -0.07329577952623367, 0.1633058786392212, 0.09407547861337662, 0.008536353707313538, -0.03980451822280884, -0.44615837931632996, 0.07567636668682098, 0.28346872329711914, -0.04593433439731598, 0.23258280754089355, 0.24902796745300293, -0.4319912791252136, 0.29770708084106445, -0.4198724329471588, 0.1855718493461609, 0.03770679235458374, -0.16138742864131927, -0.08436723798513412, -0.16083626449108124, -0.39972785115242004, -0.7091004848480225, 0.3197046220302582, 0.04085559397935867, -0.07173256576061249, -0.20265598595142365, -0.452253520488739, -0.04084388539195061, -0.09253298491239548, -0.024316318333148956, -0.0491558201611042, -0.027408529072999954, 0.01727314665913582, 0.21508799493312836, 0.2654232978820801, -0.19573581218719482, 0.33606213331222534, -0.009333327412605286, 0.1770603209733963, -0.09990952908992767, 0.32738226652145386, 0.19428718090057373, 0.07369519770145416, 0.25544118881225586, 0.28120094537734985, -0.01382676512002945, -0.08937714993953705, 0.006996218115091324, 0.25399428606033325, -0.49810484051704407, 0.11067776381969452, 0.13428598642349243, 0.5915389060974121, 0.22789068520069122, -0.2963769733905792, 0.3915844261646271, -0.013721772469580173, -0.06040645390748978, -0.1952691376209259, -0.2127513289451599, 0.36714014410972595, -0.16562876105308533, -0.10414362698793411, -0.17059293389320374, 0.03919924050569534, -0.01627977564930916, 0.1620410680770874, -0.07626672834157944, -0.04571455717086792, 0.1016797423362732, 0.10344094038009644, 0.12381134927272797, -0.24298305809497833, -0.30838704109191895, 0.05981966480612755, 0.16700318455696106, -0.21794122457504272, 0.1086844876408577, 0.23445142805576324, -0.3161119520664215, 0.22345426678657532, 0.24248841404914856, 0.04515288770198822, 0.35850054025650024, 0.11721812188625336, 0.2604351341724396, 0.20233148336410522, -0.10630983114242554, 0.012772850692272186, 0.0667264387011528, -0.10307228565216064, 0.048916131258010864, 0.049537137150764465, -0.09909879416227341, -0.015265229158103466, -0.2411528080701828, -0.19172470271587372, -0.17256948351860046, -0.14506612718105316, -0.10848540812730789, 0.06709457188844681, -0.393722802400589, -0.5434687733650208, -0.06391946971416473, 0.12141543626785278, -0.09839475154876709, -0.0922895073890686, 0.013244697824120522, 0.3591485023498535, -0.0854681059718132, -0.0637255385518074, -0.3088620603084564, 0.5402219295501709, -0.05628234148025513, -0.19463245570659637, -0.2007988542318344, 0.13916805386543274, -0.08353757858276367, -0.03757977485656738, 0.40122726559638977, 0.06285816431045532, 0.45022258162498474, 0.07027571648359299, 0.4513745605945587, -0.34790483117103577, -0.07473970949649811, 0.017794854938983917, 0.0918986052274704, 0.08763767033815384, 0.013412438333034515, -0.015081971883773804, -0.27163365483283997, 0.07988601922988892, -0.11486184597015381, -0.3440764248371124, -0.005605868995189667, -0.043090008199214935, -0.0006827898323535919, -0.11101973056793213, -0.36365705728530884, 0.2796823978424072, -0.45667386054992676, -0.41642701625823975, 0.2554829716682434, -0.3172496557235718, 0.038477614521980286, 0.22048959136009216, -0.20025032758712769, 0.05933099985122681, -0.25582224130630493, -0.26592960953712463, 0.03031652793288231, -0.2385898232460022, 0.45044130086898804, -0.2818264365196228, -0.4530049264431, -0.004352264106273651, -0.15762314200401306, 0.03071819618344307, 0.1020062118768692, 0.013619400560855865, -0.006952058523893356, -0.12812352180480957, 0.1965918093919754, 0.08038172125816345, -0.025054331868886948, 0.34463340044021606, -0.21938954293727875, 0.0896616131067276, -0.06235305219888687, 0.010725125670433044, -0.2268776148557663, 0.07695800065994263, -0.05450578033924103, 0.21103565394878387, -0.40708985924720764, 0.06332097947597504, -0.036580462008714676, 0.2899054288864136, -0.05738525092601776, 0.19613605737686157, -0.0008775964379310608, 0.5420299768447876, 0.022087641060352325, -0.0631696805357933, 0.006881587207317352, -0.0016020610928535461, 0.018263258039951324, 0.3987933397293091, 0.24379679560661316, -0.07833607494831085, -0.10251746326684952, -0.20635366439819336, -0.2612484395503998, -0.13157324492931366, 0.11880146712064743, 0.10997948795557022, 0.3398832082748413, 0.03651838004589081, -0.023509129881858826, 0.02060166746377945, -0.46115416288375854, -0.020307909697294235, 0.601026713848114, 0.046217117458581924, 0.018196988850831985, -0.4226073622703552, -0.06588731706142426, -0.4824017882347107, 0.260398268699646, 0.27684351801872253, 0.19042515754699707, 0.0010368600487709045, 0.3368169963359833, -0.035572901368141174, 0.3106241226196289, 0.6787523627281189, -0.3900866210460663, -0.2703239917755127, 0.23690608143806458, 0.17349469661712646, -0.2921854853630066, 0.10284356772899628, -0.2253958284854889, 0.15483298897743225, -0.1200898140668869, 0.24143613874912262, 0.10390333831310272, -0.3048771917819977, -0.012464972212910652, 0.35732385516166687, 0.005257144570350647, -0.060299795120954514, 0.04819729924201965, 0.13822954893112183, -0.2942294180393219, -0.1600276231765747, 0.11186981946229935, -0.21026387810707092, -0.26819902658462524, -0.20827224850654602, -0.023907218128442764, 0.12368753552436829, 0.27699965238571167, 0.11433142423629761, 0.30918604135513306, 0.2531222701072693, -0.04044175520539284, 0.4029960334300995, 0.13509373366832733, 0.00002505071461200714, 0.3241168260574341, 0.33902010321617126, -0.0814824104309082, 0.03538241609930992, 0.0801088884472847, 0.28381288051605225, 0.47557011246681213, 0.0619366355240345, -0.0359475277364254, -0.034624673426151276, 0.12617792189121246, -0.5604618191719055, 0.334989458322525, 0.11949694156646729, -0.08215872198343277, -0.7018893361091614, -0.027997460216283798, 0.6932517886161804, 0.15363164246082306, -0.1081029400229454, 0.3280479311943054, 0.5627962946891785, -0.08596792817115784, -0.06548923999071121, -0.06705926358699799, 1.0609478950500488, -0.3299599289894104, 0.29882729053497314, 0.27940160036087036, -0.3594512641429901, 0.6771502494812012, -0.14433526992797852, -0.02416372299194336, -0.22895482182502747, -0.05093066394329071, -0.20918802917003632, -0.0627257376909256, 0.325955331325531, 0.09165310859680176, -0.25674623250961304, 0.2600797712802887, 0.40102988481521606, 0.20406311750411987, 0.0013136044144630432, 0.13923171162605286, 0.07139372080564499, -0.4274037778377533, 0.04654282331466675, 0.0337597131729126, -0.13498474657535553, -0.038131408393383026, -0.11214928328990936, -0.24252109229564667, -0.19611728191375732, 0.10430923104286194, -0.13312511146068573, -0.040568821132183075, 0.18227291107177734, 0.11310862004756927, 0.12045653909444809, -0.027463003993034363, 0.3731576204299927, 0.30066993832588196, 0.39909589290618896, 0.07678715884685516, -0.5406417846679688, -0.18699617683887482, -0.42905116081237793, 0.031713370233774185, -0.13119639456272125, -0.2032773196697235, 0.272219717502594, 0.08304518461227417, -0.04965672641992569, 0.02328428067266941, 0.17919614911079407, -0.17267544567584991, -0.06760276854038239, 0.045356765389442444, 0.23087461292743683, -0.26494231820106506, -0.15119533240795135, -0.004050862044095993, -0.07940150797367096, 0.11994956433773041, -0.01921256259083748, 0.3105281889438629, 0.18513314425945282, 0.10343334823846817, 0.24637159705162048, 0.08006948232650757, -0.025858469307422638, 0.12983830273151398, 0.025114666670560837, -0.633167028427124, -0.027651948854327202, -0.11639455705881119, -0.29283609986305237, -0.07638588547706604, 0.1691652238368988, 0.009342312812805176, -0.20959165692329407, 0.04910756275057793, 0.04559384658932686, 0.11610966920852661, -0.00534520298242569, 0.31159791350364685, 0.09787057340145111, -0.34085962176322937, -0.05577734112739563, -0.10236017405986786, -0.17584069073200226, 0.24439691007137299, -0.4354489743709564, 0.44714105129241943, 0.07678267359733582, 0.20531237125396729, -0.14275097846984863, -0.1982097625732422, -0.14250943064689636, 0.09286915510892868, 0.2378610074520111, 0.008389579132199287, 0.46695685386657715, 0.2183641940355301, 0.09708517789840698, -0.36309361457824707, -0.14572900533676147, 0.26287737488746643, -0.3898599147796631, 0.0008461140096187592, -0.11452119052410126, 0.2721877694129944, 0.0911298543214798, -0.11230089515447617, 0.1033640056848526, -0.1483927220106125, -0.045064978301525116, -0.21685239672660828, 0.024681836366653442, -0.031235717236995697, -0.04535298049449921, 0.2538365423679352, -0.10248911380767822, 0.18696340918540955, -0.02860468253493309, 0.3332904577255249, 0.23968933522701263, 0.5707106590270996, -0.15723413228988647, 0.12153980135917664, -0.2884973883628845, -0.1857835054397583, -0.11381737887859344, 0.24106504023075104, 0.1173921674489975, -0.13096237182617188, 0.3923185467720032, 0.026364024728536606, 0.12202563881874084, 0.10306209325790405, 0.4809408187866211, -0.015777401626110077, -0.275393009185791, -0.12276884913444519, 0.4555722177028656, -0.04853223264217377, -0.02660530060529709, -0.21976713836193085, 0.40183645486831665, -0.007060587406158447, 0.08379347622394562, 0.2544843256473541, 0.34708231687545776, -0.05390878766775131, 0.062008798122406006, -0.17623314261436462, -0.12755495309829712, 0.10809223353862762, 0.18703219294548035, 0.5087069869041443, 0.25658124685287476, -0.02084100991487503, 0.10930663347244263, 0.11857862770557404, 0.17640605568885803, 0.8755055069923401, -0.04359498247504234, 0.2794738709926605, 0.11656755208969116, 0.3511914908885956, 0.08971238136291504, -0.30329465866088867, 0.20504289865493774, 0.024542830884456635, 0.004918485879898071, 0.29394692182540894, -0.040213752537965775, -0.042374685406684875, -0.3990401327610016, -0.22012506425380707, -0.16284415125846863, 0.18460258841514587, -0.09222980588674545, 0.1906224936246872, 0.2004510462284088, -0.0561760738492012, -0.012120090425014496, 0.004615277051925659, -0.352306604385376, 0.004314333200454712, 0.03052513115108013, 0.1273982673883438, 0.2253219187259674, 0.061799876391887665, 0.291058212518692, 0.37491369247436523, 0.4069015085697174, -0.18895947933197021, -0.1430056095123291, 0.27850547432899475, 0.10775163769721985, 0.14556726813316345, 0.2567078471183777, 0.29768040776252747, 0.029716916382312775, 0.19821614027023315, 0.20595236122608185, -0.2977675497531891, -0.07395057380199432, 0.25935259461402893, -0.10424458980560303, 0.2050209939479828, 0.23109352588653564, 0.26051634550094604, -0.04060131311416626, 0.06936527788639069, -0.08464647829532623, -0.08486999571323395, 0.2135259062051773, -0.34438180923461914, 0.03630144149065018, -0.067599818110466, -0.11153259873390198, -0.07558495551347733, -0.26890793442726135, -0.2096182107925415, -0.1604093611240387, 0.05163269117474556, -0.07747405022382736, 0.06494836509227753, -0.011653352528810501, -0.03409460186958313, 0.1467922180891037, 0.3085142970085144, 0.31397661566734314, 0.20378847420215607, -0.026080671697854996, -0.5878452062606812, -0.5225650072097778, -0.10689672827720642, 0.030001714825630188, -0.3688540458679199, 0.10330916941165924, -0.14170697331428528, 0.06708528101444244, 0.3019886314868927, -0.10701967775821686, -0.16588304936885834, 0.3375166058540344, 0.044124238193035126, -0.07098308205604553, -0.10844692587852478, 0.16262748837471008, 0.01841612346470356, -0.049259625375270844, -0.418745756149292, 0.2692844271659851, -0.018612004816532135, -0.26596295833587646, 0.0049054790288209915, 0.555426836013794, -0.3805592656135559, -0.04369853064417839, 0.3369377553462982, 0.19339831173419952, 0.40603646636009216, -0.09871946275234222, -0.19748550653457642, -0.06369506567716599, 0.2805178165435791, -0.004516385495662689, 0.10210561752319336, 0.022909868508577347, 0.8177698254585266, -0.4686494469642639, -0.10856197774410248, -0.059425532817840576, -0.19456574320793152, 0.08147399127483368, 0.10725076496601105, -0.33163273334503174, 0.18789106607437134, -0.39250025153160095, 0.12298138439655304, 0.2971165180206299, 0.4118063151836395, 0.021621547639369965, 0.0037878751754760742, 0.03425852954387665, -0.3195870518684387, 0.3615332245826721, 0.08831670880317688, -0.2114233523607254, 0.06610934436321259, -0.0821685642004013, 0.060938213020563126, -0.07824411243200302, -0.5897845029830933, -0.012507006525993347, 0.15902173519134521, 0.1412440985441208, 0.3222862780094147, 0.4254262447357178, -0.14022649824619293, -0.38791322708129883, -0.15325182676315308, 0.4777987599372864, 0.1425771713256836, -0.24467897415161133, 0.07185578346252441, -0.4522177577018738 ]
https://github.com/huggingface/datasets/issues/6536
Hi ! Thanks for reporting This is a bug in 2.16.0 for some datasets when `cache_dir` is a relative path. I opened https://github.com/huggingface/datasets/pull/6543 to fix this
datasets.load_dataset raises FileNotFoundError for datasets==2.16.0
### Describe the bug Seems `datasets.load_dataset` raises FileNotFoundError for some hub datasets with the latest `datasets==2.16.0` ### Steps to reproduce the bug For example `pip install datasets==2.16.0` then ```python import datasets datasets.load_dataset("wentingzhao/anthropic-hh-first-prompt", cache_dir='cache1')["train"] ``` This will raise: ```bash Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/load.py", line 2545, in load_dataset builder_instance.download_and_prepare( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/builder.py", line 1003, in download_and_prepare self._download_and_prepare( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/builder.py", line 1076, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/packaged_modules/parquet/parquet.py", line 43, in _split_generators data_files = dl_manager.download_and_extract(self.config.data_files) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 566, in download_and_extract return self.extract(self.download(url_or_urls)) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 539, in extract extracted_paths = map_nested( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 466, in map_nested mapped = [ File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 467, in <listcomp> _single_map_nested((function, obj, types, None, True, None)) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 387, in _single_map_nested mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 387, in <listcomp> mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 370, in _single_map_nested return function(data_struct) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 451, in _download out = cached_path(url_or_filename, download_config=download_config) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 188, in cached_path output_path = get_from_cache( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 570, in get_from_cache raise FileNotFoundError(f"Couldn't find file at {url}") FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/wentingzhao/anthropic-hh-first-prompt/resolve/11b393a5545f706a357ebcd4a5285d93db176715/cache1/downloads/87d66c365626feca116cba323c4856c9aae056e4503f09f23e34aa085eb9de15 ``` However, seems it works fine for some datasets, for example, if works fine for `datasets.load_dataset("ag_news", cache_dir='cache2')["test"]` But the dataset works fine for datasets==2.15.0, for example `pip install datasets==2.15.0`, then ```python import datasets datasets.load_dataset("wentingzhao/anthropic-hh-first-prompt", cache_dir='cache3')["train"] Dataset({ features: ['user', 'system', 'source'], num_rows: 8552 }) ``` ### Expected behavior 2.16.0 should work as same as 2.15.0 for all datasets ### Environment info python3.9 conda env tested on MacOS and Linux
26
datasets.load_dataset raises FileNotFoundError for datasets==2.16.0 ### Describe the bug Seems `datasets.load_dataset` raises FileNotFoundError for some hub datasets with the latest `datasets==2.16.0` ### Steps to reproduce the bug For example `pip install datasets==2.16.0` then ```python import datasets datasets.load_dataset("wentingzhao/anthropic-hh-first-prompt", cache_dir='cache1')["train"] ``` This will raise: ```bash Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/load.py", line 2545, in load_dataset builder_instance.download_and_prepare( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/builder.py", line 1003, in download_and_prepare self._download_and_prepare( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/builder.py", line 1076, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/packaged_modules/parquet/parquet.py", line 43, in _split_generators data_files = dl_manager.download_and_extract(self.config.data_files) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 566, in download_and_extract return self.extract(self.download(url_or_urls)) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 539, in extract extracted_paths = map_nested( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 466, in map_nested mapped = [ File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 467, in <listcomp> _single_map_nested((function, obj, types, None, True, None)) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 387, in _single_map_nested mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 387, in <listcomp> mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 370, in _single_map_nested return function(data_struct) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/download/download_manager.py", line 451, in _download out = cached_path(url_or_filename, download_config=download_config) File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 188, in cached_path output_path = get_from_cache( File "/Users/xxx/miniconda3/envs/env/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 570, in get_from_cache raise FileNotFoundError(f"Couldn't find file at {url}") FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/wentingzhao/anthropic-hh-first-prompt/resolve/11b393a5545f706a357ebcd4a5285d93db176715/cache1/downloads/87d66c365626feca116cba323c4856c9aae056e4503f09f23e34aa085eb9de15 ``` However, seems it works fine for some datasets, for example, if works fine for `datasets.load_dataset("ag_news", cache_dir='cache2')["test"]` But the dataset works fine for datasets==2.15.0, for example `pip install datasets==2.15.0`, then ```python import datasets datasets.load_dataset("wentingzhao/anthropic-hh-first-prompt", cache_dir='cache3')["train"] Dataset({ features: ['user', 'system', 'source'], num_rows: 8552 }) ``` ### Expected behavior 2.16.0 should work as same as 2.15.0 for all datasets ### Environment info python3.9 conda env tested on MacOS and Linux Hi ! Thanks for reporting This is a bug in 2.16.0 for some datasets when `cache_dir` is a relative path. I opened https://github.com/huggingface/datasets/pull/6543 to fix this
[ -0.7334121465682983, -0.07373972982168198, 0.06582644581794739, 0.4895383417606354, 0.32654696702957153, 0.035552725195884705, 0.39158129692077637, 0.41822516918182373, 0.18511217832565308, 0.0822291374206543, -0.021300405263900757, 0.38214045763015747, -0.23672914505004883, -0.12617044150829315, -0.06406199932098389, 0.18891829252243042, 0.09459088742733002, 0.18586832284927368, -0.20660093426704407, -0.0966586321592331, -0.3277188539505005, 0.05461982637643814, -0.27917009592056274, 0.06473308801651001, -0.39326211810112, 0.058381371200084686, -0.03423565998673439, 0.5014029741287231, -0.17622490227222443, -0.4643516540527344, 0.3748036026954651, -0.07743032276630402, 0.20716984570026398, 0.5676155090332031, -0.00011187502241227776, 0.18247343599796295, 0.46467167139053345, -0.024692829698324203, -0.35072800517082214, -0.4181358218193054, -0.3908253312110901, -0.35041239857673645, -0.019467396661639214, -0.15348997712135315, -0.10203682631254196, -0.05538448691368103, 0.10753870010375977, -0.13671229779720306, 0.23907454311847687, 0.27580130100250244, 0.22099535167217255, 0.28878548741340637, 0.09563079476356506, -0.1795530915260315, 0.14779318869113922, -0.018791910260915756, -0.1877443790435791, 0.036138009279966354, 0.08326663821935654, -0.07345382124185562, -0.18283873796463013, 0.39964568614959717, -0.23437684774398804, -0.041697029024362564, 0.22398388385772705, -0.05924181640148163, -0.06652051210403442, -0.2290310114622116, 0.12611757218837738, 0.3393899202346802, 0.47899869084358215, -0.29738810658454895, -0.5253117680549622, -0.30590036511421204, -0.013313943520188332, -0.20568665862083435, 0.3700253665447235, 0.09846965968608856, 0.17398938536643982, 0.14292147755622864, 0.052996691316366196, -0.1637035608291626, -0.15361042320728302, 0.021813567727804184, -0.08888129144906998, 0.3979458212852478, -0.12955282628536224, 0.03844693303108215, -0.11275604367256165, -0.27871835231781006, 0.12831944227218628, -0.38446909189224243, -0.21604067087173462, 0.19346484541893005, -0.2767636775970459, 0.023532353341579437, 0.07561390846967697, 0.22525519132614136, 0.2244136780500412, 0.18717367947101593, -0.15243792533874512, -0.05757314711809158, -0.1960756480693817, 0.06835560500621796, 0.14275875687599182, 0.09259327501058578, 0.19316735863685608, 0.3582213521003723, 0.2809008061885834, 0.2856242060661316, 0.07429827749729156, -0.06750138849020004, -0.007580641657114029, -0.13236510753631592, -0.07595685124397278, 0.06683871150016785, 0.6451982259750366, -0.1010114923119545, -0.41922855377197266, 0.06579787284135818, 0.02701464295387268, 0.06763367354869843, 0.21861004829406738, 0.3316718339920044, -0.1318790465593338, 0.13512495160102844, -0.07479636371135712, 0.2857881188392639, -0.2965824604034424, -0.10824141651391983, -0.2708401679992676, -0.007527781650424004, 0.13243785500526428, -0.0019259769469499588, 0.12966717779636383, -0.24560824036598206, 0.3396408259868622, 0.1305796205997467, -0.1829238086938858, 0.05326898396015167, -0.04080512002110481, -0.18569239974021912, 0.021585453301668167, 0.34590744972229004, -0.056745514273643494, 0.19805684685707092, 0.16934427618980408, -0.20127764344215393, -0.028109729290008545, 0.15078531205654144, -0.33803340792655945, -0.3078569769859314, -0.20334941148757935, 0.2180100381374359, -0.349658727645874, -0.07098127901554108, -0.08573178946971893, -0.034637201577425, 0.028822019696235657, -0.2224501073360443, 0.03987133502960205, -0.2037447690963745, -0.259851336479187, -0.2514452636241913, 0.3066759407520294, 0.8850860595703125, -0.10414400696754456, 0.024640947580337524, -0.1501203328371048, -0.30093836784362793, 0.14146143198013306, -0.140884667634964, -0.05688013881444931, 0.1718766689300537, -0.3672943711280823, 0.225612610578537, 0.25779983401298523, -0.7211616039276123, -0.39659371972084045, 0.1446092426776886, -0.05228922516107559, 0.2655492126941681, 0.12303508818149567, 0.0764632597565651, -0.1309143602848053, -0.14631180465221405, 0.10882696509361267, 0.012647595256567001, -0.10538830608129501, 0.11154038459062576, -0.29383790493011475, -0.26748594641685486, -0.029229579493403435, 0.27861812710762024, 0.1513863503932953, 0.02256450615823269, 0.13840362429618835, 0.32862430810928345, 0.23020875453948975, -0.06104744225740433, -0.012477420270442963, 0.10089915990829468, 0.2634746730327606, -0.077163465321064, -0.014840558171272278, -0.20733866095542908, -0.5714868307113647, 0.3691751956939697, 0.25713393092155457, -0.15350466966629028, -0.19347986578941345, -0.15672433376312256, -0.16943499445915222, 0.024352215230464935, -0.457452654838562, -0.23761723935604095, 0.18188048899173737, 0.10621073842048645, -0.08780674636363983, 0.04007348418235779, -0.19701364636421204, 0.5632832050323486, -0.15877938270568848, 0.17328456044197083, -0.39036762714385986, 0.4175678491592407, -0.008901761844754219, -0.10916554927825928, 0.04185017943382263, 0.22112855315208435, 0.17694827914237976, -0.11648152023553848, -0.05826747417449951, 0.5462144017219543, 0.20707277953624725, 0.3025912344455719, 0.1590583771467209, -0.21541303396224976, 0.23012249171733856, 0.0004474818706512451, 0.1520867794752121, 0.13960936665534973, 0.13257889449596405, 0.04221916198730469, -0.005042513832449913, 0.3225365877151489, 0.04639975726604462, 0.013631351292133331, 0.07528769969940186, -0.07198793441057205, 0.08146993070840836, -0.037061091512441635, 0.060796938836574554, -0.2712556719779968, 0.25628194212913513, 0.22950884699821472, 0.3831844925880432, 0.013220971450209618, -0.16020725667476654, 0.08090722560882568, 0.3777088522911072, 0.15878984332084656, 0.1894475370645523, -0.12900184094905853, -0.2113458812236786, 0.07227285951375961, 0.07825760543346405, 0.3073711395263672, 0.38360774517059326, 0.13877004384994507, -0.16623330116271973, 0.18823203444480896, -0.20597508549690247, -0.07292837649583817, 0.2615812420845032, 0.057095278054475784, 0.23973576724529266, 0.38340502977371216, -0.050174497067928314, 0.0571344830095768, -0.40391790866851807, -0.15578021109104156, -0.08038307726383209, 0.3156573176383972, -0.3966200649738312, -0.11576037853956223, -0.30253517627716064, -0.17416851222515106, -0.10290676355361938, 0.06910626590251923, -0.2830660045146942, -0.18346118927001953, -0.02770925499498844, 0.27069202065467834, -0.12634199857711792, 0.17767812311649323, -0.30102238059043884, 0.02277660369873047, 0.06881821900606155, -0.22023335099220276, -0.1581239253282547, -0.06737987697124481, -0.30998095870018005, 0.03877762332558632, 0.3634094297885895, -0.1707667112350464, 0.26197654008865356, -0.19121971726417542, 0.0790405124425888, -0.43297871947288513, -0.20075595378875732, -0.04085395112633705, -0.04519501328468323, 0.4355439841747284, 0.22634759545326233, -0.04734320193529129, 0.1738307774066925, -0.150037944316864, 0.25186964869499207, -0.13113221526145935, -0.2013663947582245, 0.04561886936426163, -0.10771284997463226, 0.048306699842214584, -0.02904551848769188, -0.45733267068862915, -0.15373265743255615, -0.4844360947608948, -0.21388977766036987, 0.006742618978023529, 0.09805704653263092, 0.4872547388076782, 0.10236778110265732, 0.20753896236419678, 0.009653449058532715, -0.24927273392677307, -0.10760530829429626, -0.2580935060977936, 0.2647087872028351, -0.16742020845413208, -0.24716851115226746, 0.08840210735797882, -0.0945967435836792, 0.03515717387199402, 0.053880058228969574, -0.38993799686431885, -0.3662492632865906, -0.027412066236138344, 0.15343628823757172, -0.09030395746231079, 0.0012291725724935532, 0.25809746980667114, 0.007283002138137817, 0.06656178832054138, -0.2531750798225403, -0.022015098482370377, -0.004857126623392105, -0.1062115877866745, 0.15640395879745483, -0.1671690195798874, 0.25454181432724, -0.037781305611133575, 0.3965809643268585, 0.2530761957168579, 0.1481732726097107, 0.3712053596973419, -0.13047973811626434, 0.5768003463745117, -0.28437337279319763, -0.3068406581878662, -0.04355735704302788, 0.29682955145835876, -0.016964085400104523, 0.2827632427215576, 0.06265069544315338, 0.04861670732498169, -0.16026616096496582, -0.2397386133670807, -0.22165557742118835, -0.1931265890598297, -0.16154028475284576, -0.1401972621679306, -0.0354604497551918, 0.18872547149658203, 0.22740840911865234, -0.13333214819431305, -0.176725372672081, -0.07595935463905334, 0.3244737982749939, 0.14330852031707764, -0.003357015550136566, -0.26289284229278564, -0.1210237443447113, -0.2727820873260498, 0.2961615324020386, 0.26627117395401, 0.32044902443885803, 0.0036428123712539673, -0.17619061470031738, -0.1102064996957779, -0.13335232436656952, 0.5206615328788757, -0.396524578332901, 0.27768099308013916, 0.20742064714431763, 0.11582399904727936, -0.45474743843078613, -0.21826054155826569, -0.08969755470752716, 0.34525439143180847, 0.14269554615020752, 0.4805823564529419, -0.17659229040145874, -0.3999503552913666, 0.33326947689056396, 0.09875787794589996, 0.05367526412010193, 0.04852136969566345, -0.22849823534488678, -0.09838374704122543, -0.1501484364271164, -0.039970509707927704, -0.2048439085483551, 0.21394824981689453, -0.28127363324165344, -0.046766676008701324, -0.16384632885456085, -0.03472454473376274, -0.017392076551914215, 0.1537085473537445, 0.40104782581329346, -0.11679841578006744, 0.3520474433898926, 0.10122524946928024, -0.004612933844327927, 0.48786306381225586, 0.5801114439964294, 0.014472419396042824, -0.43574270606040955, -0.08005045354366302, -0.06963617354631424, -0.19166727364063263, 0.24132616817951202, -0.20303161442279816, -0.05147142708301544, -0.2217921018600464, 0.017453458160161972, -0.2985476851463318, -0.07364241033792496, 0.3658718466758728, -0.02953319437801838, -0.43781083822250366, -0.21050772070884705, 0.6365194320678711, 0.15715962648391724, 0.051299646496772766, 0.4368656575679779, 0.030518177896738052, -0.3163014054298401, 0.1697375774383545, -0.12654808163642883, 0.34441566467285156, 0.2804071605205536, 0.0740717351436615, 0.37509289383888245, 0.041675835847854614, 0.621238112449646, -0.18013185262680054, 0.013668268918991089, -0.5044163465499878, -0.2631809711456299, -0.017076920717954636, 0.012242391705513, 0.4584360420703888, 0.08049128949642181, -0.183732807636261, 0.34126603603363037, -0.013336032629013062, 0.5770297050476074, -0.013142921030521393, 0.15765534341335297, -0.5432255268096924, -0.0365581139922142, -0.34225109219551086, 0.12560583651065826, 0.14904892444610596, 0.18107788264751434, -0.2415010929107666, -0.06256736814975739, -0.20359006524085999, -0.3183874785900116, -0.2594587802886963, 0.22764365375041962, -0.24502664804458618, 0.17164799571037292, 0.03206312283873558, -0.17390306293964386, -0.009218059480190277, 0.28105491399765015, 0.17335590720176697, -0.0029652114026248455, -0.34480854868888855, 0.2505579888820648, -0.19815674424171448, 0.11470729112625122, -0.09590940177440643, 0.0344301201403141, 0.29429593682289124, -0.02565520629286766, -0.18853187561035156, -0.19664910435676575, -0.24914292991161346, -0.1869896948337555, 0.21531841158866882, 0.020509719848632812, 0.06142842769622803, -0.09336823225021362, -0.09852483868598938, 0.03423449397087097, 0.028257861733436584, -0.19455251097679138, 0.1454838514328003, 0.01127766165882349, -0.032604675740003586, 0.15364886820316315, -0.06989745795726776, -0.41155463457107544, -0.009854556992650032, 0.4409027099609375, -0.030231032520532608, 0.11913025379180908, 0.47509944438934326, -0.06432376801967621, -0.030136507004499435, -0.3066014051437378, 0.267643004655838, 0.07303013652563095, -0.22864128649234772, 0.10684692859649658, 0.031723856925964355, 0.18877927958965302, 0.26671963930130005, 0.01739298738539219, 0.08121432363986969, -0.23954445123672485, -0.08028292655944824, -0.4382617473602295, -0.0497770719230175, 0.0937868282198906, -0.18224407732486725, 0.08771196007728577, 0.16572576761245728, 0.008266203105449677, 0.1505436897277832, -0.20613417029380798, -0.3027341365814209, 0.1518040895462036, -0.12702399492263794, 0.15235596895217896, 0.03163827955722809, 0.2566168010234833, 0.28429773449897766, -0.126788929104805, 0.10043184459209442, -0.1875775009393692, -0.4994712173938751, -0.2375473976135254, -0.150185689330101, 0.13175126910209656, 0.07463038712739944, -0.11226789653301239, -0.16834479570388794, -0.21617037057876587, -0.017648130655288696, -0.1231071949005127, 0.1832423061132431, 0.27327024936676025, -0.08054380118846893, 0.1384824514389038, 0.3275403380393982, 0.26609277725219727, -0.07920793443918228, 0.21078458428382874, -0.11603789776563644, 0.15811055898666382, -0.12008009850978851, 0.32582736015319824, -0.09495708346366882, 0.015378996729850769, 0.008436508476734161, -0.05198343098163605, -0.16145238280296326, 0.11404530704021454, 0.27431029081344604, -0.25589826703071594, 0.13455215096473694, 0.23559316992759705, 0.16405203938484192, 0.45542898774147034, -0.17058828473091125, -0.14589735865592957, 0.0003470517694950104, 0.22417674958705902, -0.25451263785362244, -0.1709977388381958, 0.3349395990371704, 0.06346037983894348, 0.11048845946788788, 0.09857945144176483, 0.28189125657081604, -0.08705589175224304, 0.12792637944221497, 0.25162431597709656, 0.5481123328208923, -0.17336241900920868, 0.4670393466949463, 0.6007338762283325, -0.06564181298017502, 0.2081708312034607, 0.1308152973651886, -0.05816298723220825, 0.09437680244445801, 0.7497060298919678, -0.06296170502901077, 0.4057560861110687, 0.12410419434309006, 0.062177687883377075, -0.04166965186595917, -0.6213680505752563, -0.009646284393966198, 0.18619082868099213, -0.15575183928012848, -0.10805875062942505, -0.08283202350139618, 0.13988341391086578, -0.2894340753555298, -0.03928889334201813, -0.21849235892295837, -0.13209402561187744, -0.20027348399162292, -0.03325233235955238, -0.04391732066869736, -0.20517373085021973, -0.059944115579128265, -0.033430326730012894, -0.02351812645792961, -0.021101314574480057, -0.04604971408843994, 0.09728944301605225, -0.252472847700119, -0.21946388483047485, 0.32979798316955566, 0.32240030169487, 0.013989951461553574, -0.3087926506996155, 0.24498237669467926, 0.03318549692630768, 0.06604235619306564, 0.12018315494060516, 0.5941969752311707, 0.539721667766571, 0.4723544120788574, 0.056777067482471466, -0.056240372359752655, 0.10272279381752014, -0.034337326884269714, -0.06976081430912018, 0.12710505723953247, -0.3009565472602844, -0.00038473308086395264, 0.275649756193161, 0.2277078628540039, -0.10948647558689117, 0.08068007230758667, 0.09428021311759949, -0.048617035150527954, -0.28890663385391235, 0.3491560220718384, -0.256355881690979, -0.00531209260225296, -0.1183447614312172, 0.10163742303848267, -0.22394202649593353, 0.1678253710269928, 0.48516058921813965, 0.12133848667144775, 0.23822076618671417, -0.10440754890441895, 0.08960190415382385, 0.02431325614452362, 0.17375588417053223, 0.47448307275772095, -0.1710726022720337, -0.22454316914081573, -0.1839151531457901, -0.7916769981384277, 0.16514411568641663, -0.022806020453572273, 0.11668035387992859, -0.056904204189777374, 0.10139332711696625, -0.2275954782962799, -0.010335761122405529, 0.09809523820877075, -0.18920192122459412, 0.3222658336162567, 0.07625021785497665, -0.3485744595527649, -0.15740877389907837, -0.09492191672325134, -0.14566385746002197, -0.11879312992095947, -0.5791375637054443, 0.18458446860313416, -0.16147281229496002, 0.016113445162773132, 0.10650306940078735, 0.03358461707830429, 0.1879900097846985, -0.3522263467311859, 0.4674168825149536, -0.036026958376169205, 0.3167248070240021, -0.15822987258434296, 0.05418141931295395, -0.5838821530342102, -0.3217277526855469, -0.2370002269744873, 0.10506559163331985, -0.01700989343225956, 0.4119409918785095, -0.21257522702217102, -0.11574617028236389, -0.1512279212474823, 0.31815454363822937, 0.026970669627189636, 0.36013057827949524, -0.16941989958286285, 0.15411978960037231, -0.1410982310771942, 0.019205637276172638, -0.11818165332078934, 0.03539155051112175, -0.04996424540877342, 0.1888781040906906, -0.25524210929870605, -0.4496096968650818, 0.3430028259754181, -0.20363879203796387, -0.1496548056602478, -0.22901107370853424, 0.347124844789505, 0.14688780903816223, -0.22521299123764038, -0.4784630835056305, 0.19436323642730713, 0.4906587600708008, -0.04220031201839447, -0.16187861561775208, 0.16149337589740753, 0.04702994227409363, 0.007100321352481842, -0.01999787986278534, 0.13123905658721924, -0.03792022913694382, -0.20551037788391113, 0.45196837186813354, -0.20682770013809204 ]
https://github.com/huggingface/datasets/issues/6535
This is surely the same issue as https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/25 that comes from the `transformers` `Trainer`. You should add `remove_unused_columns=False` to `TrainingArguments` Also check your logs: the `Trainer` should log the length of your dataset before training starts and it surely showed length=0.
IndexError: Invalid key: 47682 is out of bounds for size 0 while using PEFT
### Describe the bug I am trying to fine-tune the t5 model on the paraphrasing task. While running the same code without- model = get_peft_model(model, config) the model trains without any issues. However, using the model returned from get_peft_model raises the following error due to datasets- IndexError: Invalid key: 47682 is out of bounds for size 0. I had raised this in https://github.com/huggingface/peft/issues/1299#issue-2056173386 and they suggested that I raise it here. Here is the complete error- IndexError Traceback (most recent call last) in <cell line: 1>() ----> 1 trainer.train() 11 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1553 hf_hub_utils.enable_progress_bars() 1554 else: -> 1555 return inner_training_loop( 1556 args=args, 1557 resume_from_checkpoint=resume_from_checkpoint, [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1836 1837 step = -1 -> 1838 for step, inputs in enumerate(epoch_iterator): 1839 total_batched_samples += 1 1840 if rng_to_sync: [/usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py](https://localhost:8080/#) in iter(self) 446 # We iterate one batch ahead to check when we are at the end 447 try: --> 448 current_batch = next(dataloader_iter) 449 except StopIteration: 450 yield [/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in next(self) 628 # TODO(https://github.com/pytorch/pytorch/issues/76750) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ [/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in _next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) [/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py](https://localhost:8080/#) in 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] [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in getitems(self, keys) 2802 def getitems(self, keys: List) -> List: 2803 """Can be used to get a batch using a list of integers indices.""" -> 2804 batch = self.getitem(keys) 2805 n_examples = len(batch[next(iter(batch))]) 2806 return [{col: array[i] for col, array in batch.items()} for i in range(n_examples)] [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in getitem(self, key) 2798 def getitem(self, key): # noqa: F811 2799 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2800 return self._getitem(key) 2801 2802 def getitems(self, keys: List) -> List: [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in _getitem(self, key, **kwargs) 2782 format_kwargs = format_kwargs if format_kwargs is not None else {} 2783 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) -> 2784 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) 2785 formatted_output = format_table( 2786 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in query_table(table, key, indices) 581 else: 582 size = indices.num_rows if indices is not None else table.num_rows --> 583 _check_valid_index_key(key, size) 584 # Query the main table 585 if indices is None: [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in _check_valid_index_key(key, size) 534 elif isinstance(key, Iterable): 535 if len(key) > 0: --> 536 _check_valid_index_key(int(max(key)), size=size) 537 _check_valid_index_key(int(min(key)), size=size) 538 else: [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in _check_valid_index_key(key, size) 524 if isinstance(key, int): 525 if (key < 0 and key + size < 0) or (key >= size): --> 526 raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") 527 return 528 elif isinstance(key, slice): IndexError: Invalid key: 47682 is out of bounds for size 0 ### Steps to reproduce the bug device = "cuda:0" if torch.cuda.is_available() else "cpu" #defining model name for tokenizer and model loading model_name= "t5-small" #loading the tokenizer tokenizer = AutoTokenizer.from_pretrained(model_name) def preprocess_function(data, tokenizer): inputs = [f"Paraphrase this sentence: {doc}" for doc in data["text"]] model_inputs = tokenizer(inputs, max_length=150, truncation=True) labels = [ast.literal_eval(i)[0] for i in data['paraphrases']] labels = tokenizer(labels, max_length=150, truncation=True) model_inputs["labels"] = labels["input_ids"] return model_inputs train_dataset = load_dataset("humarin/chatgpt-paraphrases", split="train").shuffle(seed=42).select(range(50000)) val_dataset = load_dataset("humarin/chatgpt-paraphrases", split="train").shuffle(seed=42).select(range(50000,55000)) tokenized_train = train_dataset.map(lambda batch: preprocess_function(batch, tokenizer), batched=True) tokenized_val = val_dataset.map(lambda batch: preprocess_function(batch, tokenizer), batched=True) 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}" ) config = LoraConfig( r=16, #attention heads lora_alpha=32, #alpha scaling lora_dropout=0.05, bias="none", task_type="Seq2Seq" ) #loading the model model = AutoModelForSeq2SeqLM.from_pretrained(model_name).to(device) model = get_peft_model(model, config) print_trainable_parameters(model) #loading the data collator data_collator = DataCollatorForSeq2Seq( tokenizer=tokenizer, model=model, label_pad_token_id=-100, padding="longest" ) #defining the training arguments training_args = Seq2SeqTrainingArguments( output_dir=os.getcwd(), evaluation_strategy="epoch", save_strategy="epoch", learning_rate=2e-5, per_device_train_batch_size=16, per_device_eval_batch_size=16, weight_decay=1e-3, save_total_limit=3, load_best_model_at_end=True, num_train_epochs=1, predict_with_generate=True ) def compute_metric_with_extra(tokenizer): def compute_metrics(eval_preds): metric = evaluate.load('rouge') preds, labels = eval_preds # decode preds and labels labels = np.where(labels != -100, labels, tokenizer.pad_token_id) decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=True) decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True) # rougeLSum expects newline after each sentence decoded_preds = ["\n".join(nltk.sent_tokenize(pred.strip())) for pred in decoded_preds] decoded_labels = ["\n".join(nltk.sent_tokenize(label.strip())) for label in decoded_labels] result = metric.compute(predictions=decoded_preds, references=decoded_labels, use_stemmer=True) return result return compute_metrics trainer = Seq2SeqTrainer( model=model, args=training_args, train_dataset=tokenized_train, eval_dataset=tokenized_val, tokenizer=tokenizer, data_collator=data_collator, compute_metrics= compute_metric_with_extra(tokenizer) ) trainer.train() ### Expected behavior I would want the trainer to train normally as it was before I used- model = get_peft_model(model, config) ### Environment info datasets version- 2.16.0 peft version- 0.7.1 transformers version- 4.35.2 accelerate version- 0.25.0 python- 3.10.12 enviroment- google colab
41
IndexError: Invalid key: 47682 is out of bounds for size 0 while using PEFT ### Describe the bug I am trying to fine-tune the t5 model on the paraphrasing task. While running the same code without- model = get_peft_model(model, config) the model trains without any issues. However, using the model returned from get_peft_model raises the following error due to datasets- IndexError: Invalid key: 47682 is out of bounds for size 0. I had raised this in https://github.com/huggingface/peft/issues/1299#issue-2056173386 and they suggested that I raise it here. Here is the complete error- IndexError Traceback (most recent call last) in <cell line: 1>() ----> 1 trainer.train() 11 frames [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1553 hf_hub_utils.enable_progress_bars() 1554 else: -> 1555 return inner_training_loop( 1556 args=args, 1557 resume_from_checkpoint=resume_from_checkpoint, [/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1836 1837 step = -1 -> 1838 for step, inputs in enumerate(epoch_iterator): 1839 total_batched_samples += 1 1840 if rng_to_sync: [/usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py](https://localhost:8080/#) in iter(self) 446 # We iterate one batch ahead to check when we are at the end 447 try: --> 448 current_batch = next(dataloader_iter) 449 except StopIteration: 450 yield [/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in next(self) 628 # TODO(https://github.com/pytorch/pytorch/issues/76750) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ [/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in _next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) [/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py](https://localhost:8080/#) in 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] [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in getitems(self, keys) 2802 def getitems(self, keys: List) -> List: 2803 """Can be used to get a batch using a list of integers indices.""" -> 2804 batch = self.getitem(keys) 2805 n_examples = len(batch[next(iter(batch))]) 2806 return [{col: array[i] for col, array in batch.items()} for i in range(n_examples)] [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in getitem(self, key) 2798 def getitem(self, key): # noqa: F811 2799 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2800 return self._getitem(key) 2801 2802 def getitems(self, keys: List) -> List: [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in _getitem(self, key, **kwargs) 2782 format_kwargs = format_kwargs if format_kwargs is not None else {} 2783 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs) -> 2784 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) 2785 formatted_output = format_table( 2786 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in query_table(table, key, indices) 581 else: 582 size = indices.num_rows if indices is not None else table.num_rows --> 583 _check_valid_index_key(key, size) 584 # Query the main table 585 if indices is None: [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in _check_valid_index_key(key, size) 534 elif isinstance(key, Iterable): 535 if len(key) > 0: --> 536 _check_valid_index_key(int(max(key)), size=size) 537 _check_valid_index_key(int(min(key)), size=size) 538 else: [/usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py](https://localhost:8080/#) in _check_valid_index_key(key, size) 524 if isinstance(key, int): 525 if (key < 0 and key + size < 0) or (key >= size): --> 526 raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") 527 return 528 elif isinstance(key, slice): IndexError: Invalid key: 47682 is out of bounds for size 0 ### Steps to reproduce the bug device = "cuda:0" if torch.cuda.is_available() else "cpu" #defining model name for tokenizer and model loading model_name= "t5-small" #loading the tokenizer tokenizer = AutoTokenizer.from_pretrained(model_name) def preprocess_function(data, tokenizer): inputs = [f"Paraphrase this sentence: {doc}" for doc in data["text"]] model_inputs = tokenizer(inputs, max_length=150, truncation=True) labels = [ast.literal_eval(i)[0] for i in data['paraphrases']] labels = tokenizer(labels, max_length=150, truncation=True) model_inputs["labels"] = labels["input_ids"] return model_inputs train_dataset = load_dataset("humarin/chatgpt-paraphrases", split="train").shuffle(seed=42).select(range(50000)) val_dataset = load_dataset("humarin/chatgpt-paraphrases", split="train").shuffle(seed=42).select(range(50000,55000)) tokenized_train = train_dataset.map(lambda batch: preprocess_function(batch, tokenizer), batched=True) tokenized_val = val_dataset.map(lambda batch: preprocess_function(batch, tokenizer), batched=True) 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}" ) config = LoraConfig( r=16, #attention heads lora_alpha=32, #alpha scaling lora_dropout=0.05, bias="none", task_type="Seq2Seq" ) #loading the model model = AutoModelForSeq2SeqLM.from_pretrained(model_name).to(device) model = get_peft_model(model, config) print_trainable_parameters(model) #loading the data collator data_collator = DataCollatorForSeq2Seq( tokenizer=tokenizer, model=model, label_pad_token_id=-100, padding="longest" ) #defining the training arguments training_args = Seq2SeqTrainingArguments( output_dir=os.getcwd(), evaluation_strategy="epoch", save_strategy="epoch", learning_rate=2e-5, per_device_train_batch_size=16, per_device_eval_batch_size=16, weight_decay=1e-3, save_total_limit=3, load_best_model_at_end=True, num_train_epochs=1, predict_with_generate=True ) def compute_metric_with_extra(tokenizer): def compute_metrics(eval_preds): metric = evaluate.load('rouge') preds, labels = eval_preds # decode preds and labels labels = np.where(labels != -100, labels, tokenizer.pad_token_id) decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=True) decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True) # rougeLSum expects newline after each sentence decoded_preds = ["\n".join(nltk.sent_tokenize(pred.strip())) for pred in decoded_preds] decoded_labels = ["\n".join(nltk.sent_tokenize(label.strip())) for label in decoded_labels] result = metric.compute(predictions=decoded_preds, references=decoded_labels, use_stemmer=True) return result return compute_metrics trainer = Seq2SeqTrainer( model=model, args=training_args, train_dataset=tokenized_train, eval_dataset=tokenized_val, tokenizer=tokenizer, data_collator=data_collator, compute_metrics= compute_metric_with_extra(tokenizer) ) trainer.train() ### Expected behavior I would want the trainer to train normally as it was before I used- model = get_peft_model(model, config) ### Environment info datasets version- 2.16.0 peft version- 0.7.1 transformers version- 4.35.2 accelerate version- 0.25.0 python- 3.10.12 enviroment- google colab This is surely the same issue as https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/25 that comes from the `transformers` `Trainer`. You should add `remove_unused_columns=False` to `TrainingArguments` Also check your logs: the `Trainer` should log the length of your dataset before training starts and it surely showed length=0.
[ -0.21287056803703308, -0.5975072383880615, -0.021511007100343704, 0.5354565382003784, 0.28637468814849854, -0.0014908388257026672, 0.16571849584579468, 0.513259768486023, 0.18716344237327576, 0.06414628028869629, -0.05213195085525513, -0.19202271103858948, 0.00895208865404129, 0.44905373454093933, -0.25339046120643616, -0.3928741216659546, -0.030059076845645905, -0.0009357370436191559, 0.18383581936359406, 0.08560194075107574, -0.2931676506996155, 0.04037307947874069, 0.013849332928657532, 0.26556095480918884, -0.22883985936641693, -0.006906693801283836, 0.17141225934028625, 0.23831386864185333, -0.183248370885849, 0.06133834272623062, 0.19600948691368103, -0.5431763529777527, 0.3122749924659729, 0.4083581566810608, -0.00012402186985127628, 0.24495267868041992, -0.051279760897159576, -0.07198524475097656, 0.1905275583267212, 0.16063594818115234, 0.2696673274040222, 0.18954235315322876, -0.11262316256761551, -0.21375855803489685, -0.11645112931728363, -0.09986557066440582, -0.1631997525691986, 0.5159100294113159, 0.4833790063858032, 0.4190365672111511, 0.12952321767807007, 0.3328535556793213, 0.15467379987239838, 0.0962054580450058, 0.15507832169532776, -0.21187639236450195, -0.1544051170349121, -0.20532067120075226, -0.09040722250938416, -0.0824638232588768, -0.0547238253057003, 0.03261413425207138, 0.1097492128610611, -0.06009627506136894, 0.06444591283798218, -0.046854592859745026, 0.5929169654846191, -0.5907228589057922, -0.00936833769083023, 0.09712573885917664, 0.0936281830072403, 0.005056456197053194, -0.3654502332210541, -0.39107534289360046, -0.07346106320619583, -0.509213924407959, 0.05515148490667343, -0.04354048892855644, -0.15717896819114685, 0.2712464928627014, 0.41896331310272217, 0.0012306161224842072, 0.005158253014087677, -0.05884566158056259, -0.15844839811325073, 0.21743568778038025, 0.2336292564868927, 0.13021789491176605, 0.18770653009414673, -0.2688661217689514, -0.1055900976061821, 0.2562188506126404, -0.1401001214981079, 0.12271520495414734, -0.22308394312858582, -0.21275189518928528, 0.40249282121658325, -0.12340967357158661, 0.14111150801181793, 0.23534522950649261, -0.23655645549297333, -0.045399799942970276, 0.3385356664657593, -0.34961050748825073, 0.18522295355796814, 0.23027247190475464, -0.22377902269363403, 0.48958227038383484, -0.023181665688753128, 0.1114170029759407, -0.20493361353874207, -0.09189766645431519, 0.06223466619849205, -0.16069552302360535, 0.18751999735832214, -0.008618734776973724, 0.08776304125785828, -0.25325456261634827, -0.13718077540397644, 0.21573299169540405, -0.23557347059249878, 0.009644586592912674, 0.3535113036632538, 0.4279254376888275, 0.36565983295440674, 0.35875996947288513, 0.04280707985162735, 0.09230473637580872, -0.515678882598877, -0.08351115882396698, -0.21797317266464233, 0.21541552245616913, -0.0052965134382247925, -0.13049672544002533, -0.04172955080866814, -0.12184708565473557, 0.13800466060638428, -0.07340637594461441, 0.33325037360191345, -0.2574250102043152, -0.024800650775432587, -0.34519898891448975, 0.021787017583847046, 0.4321759045124054, -0.28228288888931274, 0.1041690930724144, 0.09135787934064865, -0.12237827479839325, -0.01981142908334732, 0.26172903180122375, -0.6699250340461731, -0.7280271053314209, 0.06274605542421341, 0.0875091701745987, -0.5003776550292969, 0.010474387556314468, 0.387971431016922, 0.0335078090429306, 0.17157700657844543, -0.2077937126159668, 0.09859791398048401, -0.3676542043685913, -0.3791220784187317, -0.1256931573152542, 0.17644797265529633, 0.27244889736175537, -0.20780152082443237, -0.027015715837478638, 0.1018332988023758, 0.054361771792173386, -0.06368312239646912, 0.3339027464389801, -0.050209611654281616, 0.3576216697692871, -0.24562236666679382, 0.6113248467445374, 0.6455836892127991, -0.33220604062080383, -0.5473974943161011, 0.12039203196763992, -0.15913434326648712, -0.05880250036716461, -0.060866765677928925, -0.1598667949438095, -0.04173635318875313, 0.025118671357631683, 0.02197466790676117, 0.06649243086576462, -0.13638804852962494, 0.06826039403676987, -0.2651432156562805, -0.05206066742539406, 0.4267922639846802, 0.10316538065671921, 0.3352838456630707, -0.15310481190681458, -0.036110274493694305, 0.5415652394294739, -0.06584189087152481, 0.015406790189445019, -0.07597661018371582, 0.1864234060049057, 0.33384883403778076, -0.2189990133047104, 0.22260233759880066, -0.1396239697933197, 0.010582790710031986, 0.41057637333869934, -0.18441814184188843, 0.013455666601657867, -0.0597078762948513, 0.26350292563438416, -0.26694318652153015, 0.10480282455682755, -0.050847917795181274, -0.2502920627593994, 0.009931907057762146, -0.24408429861068726, 0.24212214350700378, -0.29054978489875793, 0.06290622055530548, -0.3270450532436371, -0.34419092535972595, 0.03122919797897339, -0.15371668338775635, 0.31655237078666687, -0.03008931875228882, -0.31617820262908936, -0.43842625617980957, 0.22590500116348267, 0.1750156730413437, 0.03195324167609215, -0.14090904593467712, 0.2704556882381439, 0.07085754722356796, -0.5356630682945251, -0.09801915287971497, 0.9400798082351685, 0.04318910837173462, 0.0678364485502243, -0.06117548048496246, -0.0839194506406784, 0.08314181864261627, -0.03245517611503601, 0.3049209713935852, 0.4991040825843811, 0.29489898681640625, 0.3668381869792938, -0.08251772075891495, -0.21566084027290344, -0.055280379951000214, 0.04022850841283798, 0.16764020919799805, 0.10869571566581726, 0.1490682065486908, -0.21057531237602234, 0.043012939393520355, -0.09325352311134338, -0.05456420034170151, 0.12874269485473633, 0.2604268193244934, 0.03538490831851959, 0.22344103455543518, 0.16660982370376587, 0.10299220681190491, -0.00987929105758667, -0.011287033557891846, 0.0029460713267326355, 0.3017735183238983, 0.18969598412513733, -0.119516521692276, 0.0873819962143898, 0.027638576924800873, 0.05808214843273163, 0.14876168966293335, 0.2047758847475052, -0.08866981416940689, 0.45231521129608154, 0.05145100876688957, 0.10285841673612595, 0.009478151798248291, -0.2041594684123993, 0.055717483162879944, 0.5352019667625427, -0.5994264483451843, 0.02606797218322754, 0.008507296442985535, -0.3113026022911072, -0.008946195244789124, 0.35863572359085083, -0.39237338304519653, -0.3526366949081421, 0.2424902319908142, 0.04843790456652641, -0.05855923146009445, -0.12404943257570267, -0.20189066231250763, -0.029061749577522278, 0.25770866870880127, 0.031214402988553047, -0.015345185995101929, 0.19122770428657532, -0.05982835218310356, -0.028300970792770386, 0.151467964053154, -0.14626753330230713, 0.04686065763235092, 0.07394693791866302, -0.09732326865196228, -0.012599464505910873, -0.38834303617477417, 0.30257946252822876, -0.30402666330337524, 0.3967277705669403, 0.11644919216632843, 0.3667193055152893, -0.1655515432357788, 0.025320861488580704, 0.29816579818725586, -0.10796906054019928, -0.239560067653656, 0.09087560325860977, -0.09296774864196777, 0.4494940936565399, -0.21610328555107117, 0.02684713713824749, 0.1472017914056778, -0.27189069986343384, 0.10324922204017639, 0.1499277502298355, 0.16049186885356903, 0.33362218737602234, 0.14434802532196045, 0.09790998697280884, -0.030779065564274788, 0.0818556621670723, -0.09005791693925858, -0.010414890944957733, 0.30309683084487915, 0.20730318129062653, -0.2544766068458557, -0.06105037406086922, 0.10610313713550568, -0.20910987257957458, -0.0170133076608181, -0.2561362385749817, -0.5755206346511841, -0.0450853630900383, 0.33632248640060425, -0.38072341680526733, 0.26888608932495117, 0.19439634680747986, -0.15799924731254578, 0.09424741566181183, 0.06754003465175629, 0.000365331768989563, 0.07160154730081558, 0.28871625661849976, 0.19528105854988098, -0.20608015358448029, 0.3969072699546814, 0.03764410316944122, 0.8766027092933655, 0.030354447662830353, 0.020274264737963676, -0.008277146145701408, -0.29467251896858215, -0.17668543756008148, -0.3622342050075531, 0.17963901162147522, 0.1780804991722107, 0.1523107886314392, -0.300051748752594, 0.13460439443588257, 0.022131960839033127, 0.17285361886024475, -0.02101942151784897, -0.16661694645881653, -0.3717796206474304, -0.18262478709220886, 0.2905011773109436, 0.06185147538781166, 0.02753693237900734, -0.3617086410522461, 0.3486837148666382, -0.2032080590724945, -0.13928845524787903, -0.00793427973985672, -0.07354225218296051, 0.13889360427856445, 0.012315083295106888, 0.37747424840927124, -0.4937559962272644, -0.5113925337791443, 0.32444363832473755, 0.17764507234096527, 0.2278364598751068, -0.10385218262672424, -0.5623242855072021, 0.139068603515625, -0.16487963497638702, 0.6442714333534241, -0.1334574967622757, 0.1319136619567871, 0.005559422075748444, -0.2845057249069214, -0.3022259473800659, -0.3760750889778137, -0.30394649505615234, 0.15915925800800323, -0.2234826534986496, 0.30330711603164673, -0.31953755021095276, -0.20297104120254517, 0.01222602091729641, -0.02326209843158722, -0.23639914393424988, -0.015805937349796295, -0.1261342465877533, -0.22088240087032318, -0.14256130158901215, 0.12718552350997925, 0.3498421311378479, 0.34510958194732666, -0.016528096050024033, 0.5062039494514465, 0.1164008378982544, -0.030532240867614746, -0.0015692450106143951, 0.1202811598777771, 0.28683289885520935, -0.04585150629281998, 0.11100038141012192, -0.05144238844513893, 0.20666857063770294, -0.15388907492160797, 0.30272045731544495, 0.25053250789642334, 0.0731038898229599, 0.1898762583732605, 0.2752351462841034, -0.1246768981218338, 0.212489515542984, 0.022654302418231964, 0.17552779614925385, -0.1718708872795105, 0.33629974722862244, -0.10953076183795929, -0.1886025369167328, 0.39550358057022095, 0.030348610132932663, -0.2500414252281189, -0.01955847442150116, 0.24269340932369232, 0.10626599937677383, 0.13605421781539917, 0.09915082901716232, 0.09246723353862762, -0.13161435723304749, 0.47557252645492554, -0.04503778740763664, 0.8062417507171631, -0.006495634093880653, 0.0030660550110042095, 0.44391122460365295, 0.2336251139640808, 0.31944429874420166, -0.31240278482437134, -0.0458160862326622, -0.17098674178123474, -0.4832504093647003, -0.027281254529953003, 0.0916297510266304, -0.3868558704853058, -0.10322694480419159, 0.18874946236610413, 0.12488114833831787, -0.07606314867734909, -0.2641282379627228, -0.20907878875732422, 0.11043880134820938, 0.1909458339214325, 0.10818599164485931, -0.2525103688240051, 0.019678648561239243, -0.2713845372200012, 0.29842016100883484, -0.20596985518932343, -0.02653791755437851, -0.01844725012779236, -0.42160460352897644, -0.21087422966957092, -0.12635011970996857, -0.11582927405834198, 0.05309327691793442, 0.17309702932834625, -0.1663869321346283, 0.06874392926692963, -0.11153686046600342, -0.17636947333812714, -0.09326222538948059, -0.2938268482685089, 0.1607406884431839, 0.21687518060207367, 0.1212499588727951, 0.2043706476688385, 0.04871055856347084, 0.3241294026374817, -0.028947819024324417, -0.2173091024160385, -0.09990759193897247, -0.18131691217422485, -0.13042929768562317, -0.283366322517395, -0.09892719984054565, -0.1083497405052185, -0.38294097781181335, 0.054092198610305786, -0.08328475058078766, -0.16962245106697083, -0.03780156746506691, 0.04327422380447388, 0.023483239114284515, -0.196616530418396, -0.1570235639810562, -0.0189603790640831, -0.5118922591209412, -0.08980739861726761, 0.5029299855232239, -0.007832257077097893, 0.12889425456523895, 0.5800572037696838, 0.19908316433429718, -0.011793337762355804, -0.11156093329191208, 0.029214292764663696, 0.43436360359191895, -0.5924548506736755, 0.08664093911647797, 0.05417489632964134, 0.05399414896965027, 0.0458502396941185, 0.11086984723806381, 0.3236931562423706, -0.07241193950176239, -0.20668986439704895, -0.2269151210784912, -0.36508071422576904, 0.3188011944293976, 0.02322934754192829, -0.08177465945482254, -0.5254511833190918, 0.18854457139968872, 0.08677642792463303, -0.36145657300949097, -0.21113041043281555, 0.0003186725080013275, -0.27346551418304443, 0.018479857593774796, 0.2315916270017624, -0.09089864790439606, 0.13775858283042908, 0.09950902312994003, -0.021014181897044182, 0.1293940246105194, -0.29240602254867554, -0.12394429743289948, -0.05987517535686493, 0.18145470321178436, 0.09353940188884735, -0.06264317035675049, -0.04906155541539192, -0.11980709433555603, -0.07748112082481384, -0.038629937916994095, 0.10066774487495422, 0.09972269833087921, 0.03783899545669556, 0.3808943033218384, 0.41985201835632324, 0.22558683156967163, -0.23955778777599335, 0.10802175104618073, 0.20246537029743195, 0.5082210302352905, 0.127084881067276, 0.3352164030075073, 0.10870843380689621, 0.14420326054096222, -0.588699221611023, -0.007406983524560928, -0.1743614375591278, 0.06433489173650742, 0.0402676947414875, -0.110038161277771, 0.022432006895542145, 0.16181766986846924, 0.31505101919174194, 0.43197202682495117, -0.2941873073577881, 0.2041144222021103, 0.15271924436092377, 0.11652737855911255, -0.03821038454771042, 0.100808285176754, 0.24648039042949677, -0.07806941866874695, -0.09411231428384781, 0.4005237817764282, 0.0491982102394104, 0.08130617439746857, 0.03451651707291603, 0.11871761828660965, -0.16668406128883362, 0.03825486823916435, 0.01860935240983963, 0.8789008855819702, -0.112655408680439, -0.17446117103099823, 0.3471281826496124, -0.20842567086219788, 0.10817021131515503, 0.36693570017814636, -0.1202402114868164, 0.16732971370220184, -0.2866959571838379, 0.11079643666744232, -0.2031327337026596, -0.5328014492988586, -0.10622870922088623, -0.21398763358592987, 0.2523996829986572, 0.023463647812604904, -0.2776206433773041, 0.37106338143348694, 0.08815201371908188, -0.24053815007209778, -0.23965737223625183, 0.16151681542396545, -0.3605414628982544, -0.07412032037973404, -0.026752807199954987, -0.18655943870544434, -0.31814002990722656, 0.026920780539512634, -0.09643566608428955, -0.08855542540550232, -0.05707642436027527, 0.184312105178833, -0.3284326195716858, 0.43151941895484924, -0.26911163330078125, 0.2839333415031433, 0.2733258903026581, -0.3667735159397125, 0.22450554370880127, 0.15095984935760498, -0.46292129158973694, 0.3372058868408203, 0.027009563520550728, 0.3490665853023529, -0.0206922460347414, -0.4352946877479553, 0.01775241643190384, 0.27944639325141907, -0.006619591265916824, -0.038473740220069885, 0.08440326154232025, -0.00568026676774025, 0.4493536949157715, 0.33388379216194153, 0.000534985214471817, -0.23781821131706238, -0.12392991781234741, -0.2012915462255478, 0.6778600215911865, -0.2654392123222351, 0.2669995427131653, 0.08210226893424988, -0.09357360750436783, -0.04807358980178833, 0.05320864915847778, -0.1859264075756073, 0.22888804972171783, 0.09521619975566864, 0.1534055471420288, 0.06613952666521072, 0.1037021204829216, 0.003993235528469086, -0.21850533783435822, 0.49984103441238403, 0.4369277060031891, -0.3334619998931885, -0.17358353734016418, 0.5076465606689453, -0.27391740679740906, 0.1494801640510559, -0.18929801881313324, 0.03403978794813156, 0.4126572012901306, 0.27567946910858154, -0.13583216071128845, -0.03423707187175751, 0.46880635619163513, -0.3584448993206024, 0.09809421747922897, 0.5012237429618835, -0.25855138897895813, -0.21049067378044128, -0.42259681224823, 0.08587922155857086, 0.07390190660953522, -0.05317939817905426, 0.008417375385761261, 0.0802573710680008, 0.02188008278608322, 0.008419476449489594, -0.40865135192871094, -0.11958041787147522, -0.20927098393440247, 0.6342657804489136, 0.18209078907966614, 0.09886832535266876, 0.029400914907455444, 0.17434173822402954, -0.4353889226913452, -0.33070284128189087, -0.13292719423770905, 0.12173160910606384, -0.27158504724502563, 0.24862435460090637, 0.033768460154533386, -0.11257362365722656, -0.35857126116752625, -0.4584839344024658, -0.20321877300739288, -0.2864375412464142, -0.1689702570438385, 0.08640677481889725, -0.02904026210308075, -0.0004792138934135437, -0.06520360708236694, 0.3362959027290344, 0.11753516644239426, -0.17326177656650543, -0.20965492725372314, -0.31696373224258423, 0.4150777757167816, -0.10761156678199768, -0.15981769561767578, 0.17661570012569427, 0.2334800511598587, -0.07369033992290497, 0.04489799588918686, -0.6845487356185913, 0.03485935926437378, 0.1909540295600891, 0.07308781147003174, -0.42572468519210815, -0.015228545293211937, -0.2465125024318695, 0.0014263838529586792, 0.1532345414161682, 0.03203543275594711, -0.10352005809545517, -0.06636438518762589, 0.22338464856147766, 0.011813007295131683 ]
https://github.com/huggingface/datasets/issues/6532
You can simply use a python dict as index: ```python >>> from datasets import load_dataset >>> ds = load_dataset("BeIR/dbpedia-entity", "corpus", split="corpus") >>> index = {key: idx for idx, key in enumerate(ds["_id"])} >>> ds[index["<dbpedia:Pikachu>"]] {'_id': '<dbpedia:Pikachu>', 'title': 'Pikachu', 'text': 'Pikachu (Japanese: ピカチγƒ₯ウ) are a fictional species of PokΓ©mon. PokΓ©mon are fictional creatures that appear in an assortment of comic books, animated movies and television shows, video games, and trading card games licensed by The PokΓ©mon Company, a Japanese corporation. The Pikachu design was conceived by Ken Sugimori.'} ```
[Feature request] Indexing datasets by a customly-defined id field to enable random access dataset items via the id
### Feature request Some datasets may contain an id-like field, for example the `id` field in [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) and the `_id` field in [BeIR/dbpedia-entity](https://huggingface.co/datasets/BeIR/dbpedia-entity). HF datasets support efficient random access via row, but not via this kinds of id fields. I wonder if it is possible to add support for indexing by a custom "id-like" field to enable random access via such ids. The ids may be numbers or strings. ### Motivation In some cases, especially during inference/evaluation, I may want to find out the item that has a specified id, defined by the dataset itself. For example, in a typical re-ranking setting in information retrieval, the user may want to re-rank the set of candidate documents of each query. The input is usually presented in a TREC-style run file, with the following format: ``` <qid> Q0 <docno> <rank> <score> <tag> ``` The re-ranking program should be able to fetch the queries and documents according to the `<qid>` and `<docno>`, which are the original id defined in the query/document datasets. To accomplish this, I have to iterate over the whole HF dataset to get the mapping from real ids to row ids every time I start the program, which is time-consuming. Thus I want HF dataset to provide options for users to index by a custom id column, not by row. ### Your contribution I'm not an expert in this project and I'm afraid that I'm not able to make contributions on the code.
87
[Feature request] Indexing datasets by a customly-defined id field to enable random access dataset items via the id ### Feature request Some datasets may contain an id-like field, for example the `id` field in [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) and the `_id` field in [BeIR/dbpedia-entity](https://huggingface.co/datasets/BeIR/dbpedia-entity). HF datasets support efficient random access via row, but not via this kinds of id fields. I wonder if it is possible to add support for indexing by a custom "id-like" field to enable random access via such ids. The ids may be numbers or strings. ### Motivation In some cases, especially during inference/evaluation, I may want to find out the item that has a specified id, defined by the dataset itself. For example, in a typical re-ranking setting in information retrieval, the user may want to re-rank the set of candidate documents of each query. The input is usually presented in a TREC-style run file, with the following format: ``` <qid> Q0 <docno> <rank> <score> <tag> ``` The re-ranking program should be able to fetch the queries and documents according to the `<qid>` and `<docno>`, which are the original id defined in the query/document datasets. To accomplish this, I have to iterate over the whole HF dataset to get the mapping from real ids to row ids every time I start the program, which is time-consuming. Thus I want HF dataset to provide options for users to index by a custom id column, not by row. ### Your contribution I'm not an expert in this project and I'm afraid that I'm not able to make contributions on the code. You can simply use a python dict as index: ```python >>> from datasets import load_dataset >>> ds = load_dataset("BeIR/dbpedia-entity", "corpus", split="corpus") >>> index = {key: idx for idx, key in enumerate(ds["_id"])} >>> ds[index["<dbpedia:Pikachu>"]] {'_id': '<dbpedia:Pikachu>', 'title': 'Pikachu', 'text': 'Pikachu (Japanese: ピカチγƒ₯ウ) are a fictional species of PokΓ©mon. PokΓ©mon are fictional creatures that appear in an assortment of comic books, animated movies and television shows, video games, and trading card games licensed by The PokΓ©mon Company, a Japanese corporation. The Pikachu design was conceived by Ken Sugimori.'} ```
[ -0.18381522595882416, 0.18622073531150818, -0.08400578796863556, 0.07549107074737549, -0.17324230074882507, 0.13344812393188477, 0.4271538257598877, 0.2126123309135437, 0.41409701108932495, 0.08223025500774384, -0.1450173705816269, 0.4513753652572632, -0.13390713930130005, 0.13514842092990875, 0.07874730229377747, -0.08257214725017548, -0.12613311409950256, 0.17514583468437195, 0.38346150517463684, 0.1736050844192505, -0.5029157996177673, -0.15699012577533722, -0.10193845629692078, 0.09797589480876923, 0.07946617901325226, 0.011238805949687958, -0.05542035400867462, 0.09904365241527557, -0.054075635969638824, -0.6075031757354736, 0.23130205273628235, 0.5707527995109558, 0.24796141684055328, 0.16295796632766724, -0.0001180469334940426, 0.0030316784977912903, -0.08330006152391434, 0.08524052798748016, -0.11510664224624634, -0.1674865484237671, -0.23688429594039917, 0.18200820684432983, -0.1002904623746872, -0.2303691804409027, -0.05083485320210457, -0.22327159345149994, -0.033108629286289215, -0.3715984523296356, -0.4616396725177765, 0.0007865391671657562, 0.10242411494255066, 0.03598613291978836, -0.025728926062583923, 0.0888960063457489, 0.6263262033462524, 0.23183277249336243, -0.15786433219909668, 0.013385158032178879, 0.16482901573181152, -0.19340533018112183, -0.03149927034974098, 0.16251921653747559, 0.1410331279039383, -0.029586931690573692, 0.5190528035163879, 0.08752034604549408, -0.4611125886440277, 0.02138800546526909, -0.07693389058113098, 0.2896266579627991, 0.23597949743270874, -0.36226382851600647, -0.54751056432724, -0.17976707220077515, 0.14050444960594177, -0.2589469254016876, -0.008493855595588684, -0.05016368255019188, 0.008990392088890076, 0.2633171081542969, 0.12453979253768921, 0.06891678273677826, -0.15305417776107788, 0.23129966855049133, -0.027414456009864807, 0.13075172901153564, 0.2024793028831482, 0.09981580078601837, 0.0388466939330101, -0.34873488545417786, 0.26252830028533936, -0.047203004360198975, -0.10233078896999359, 0.2461262196302414, -0.2657011151313782, -0.40934908390045166, 0.03358560800552368, -0.21096080541610718, 0.21435226500034332, 0.14865300059318542, -0.17416393756866455, 0.19068878889083862, -0.17534591257572174, -0.12678296864032745, -0.045555345714092255, 0.07283661514520645, -0.13411208987236023, 0.3626159131526947, 0.1900237649679184, -0.0743417739868164, -0.2750065326690674, -0.0845898985862732, -0.14508938789367676, 0.23881283402442932, 0.07869689166545868, -0.09929892420768738, -0.36125433444976807, 0.05818004906177521, -0.2614229917526245, 0.043605219572782516, -0.3328450620174408, -0.20047028362751007, -0.024839825928211212, 0.2802758514881134, 0.25145599246025085, -0.27331647276878357, -0.007077045738697052, 0.028700701892375946, -0.16358014941215515, -0.04746163636445999, 0.06131962686777115, 0.1500469595193863, 0.08485390990972519, 0.1286391019821167, 0.19599653780460358, -0.15684382617473602, -0.11127551645040512, -0.003157529979944229, -0.13623112440109253, 0.11041034758090973, 0.27674680948257446, -0.15365323424339294, 0.07551546394824982, 0.028108565136790276, -0.3522474765777588, -0.25180181860923767, 0.11442221701145172, -0.13138316571712494, -0.28202736377716064, 0.05274035409092903, -0.10833001136779785, -0.4052262306213379, 0.016952553763985634, 0.0440857969224453, 0.10747988522052765, -0.2687891125679016, 0.19620200991630554, 0.4633043110370636, -0.14709866046905518, -0.04190848395228386, 0.14658738672733307, -0.020820656791329384, -0.34276148676872253, 0.002788260579109192, -0.08010424673557281, 0.27877506613731384, -0.14905580878257751, -0.13592416048049927, 0.06947708129882812, 0.18201002478599548, -0.16188323497772217, -0.0010154666379094124, -0.22413736581802368, 0.31947052478790283, -0.3503195345401764, 0.3333468437194824, 0.14517326653003693, -0.3215511441230774, -0.3804020881652832, 0.2508658766746521, 0.05012480169534683, 0.21145963668823242, 0.2519153952598572, 0.3836404085159302, 0.3630220592021942, -0.05094465613365173, 0.5299718976020813, 0.086620032787323, -0.00842294842004776, -0.2752406895160675, 0.003690384328365326, -0.5447372794151306, -0.11771020293235779, 0.20865009725093842, 0.22521449625492096, 0.2693191468715668, 0.4957038462162018, -0.2452177256345749, 0.1141977459192276, -0.14560028910636902, -0.18196360766887665, -0.19743043184280396, 0.14898943901062012, 0.3725806772708893, 0.10081661492586136, -0.4847092032432556, -0.06344915926456451, 0.2642568349838257, 0.15762412548065186, 0.03328048810362816, -0.08789709210395813, -0.43238386511802673, -0.06182871013879776, 0.18907210230827332, -0.13392776250839233, 0.09735018759965897, 0.018429361283779144, -0.17217254638671875, -0.13541561365127563, -0.17640288174152374, -0.440520703792572, 0.1610492318868637, -0.1501358598470688, 0.02447810396552086, -0.12032703310251236, 0.13768452405929565, 0.1726628988981247, 0.24818050861358643, -0.17735400795936584, 0.290859192609787, 0.07489794492721558, 0.04963759705424309, 0.048598404973745346, 0.13028669357299805, 0.23579508066177368, -0.3135190010070801, 0.6215792894363403, 0.47759196162223816, 0.23730579018592834, -0.08307548612356186, 0.21958646178245544, 0.03210999444127083, 0.12510621547698975, 0.028775863349437714, 0.026041828095912933, 0.6936215162277222, -0.27492964267730713, 0.22604259848594666, -0.04716820269823074, -0.2023017406463623, 0.2632926106452942, -0.005536027252674103, 0.06994667649269104, -0.22088372707366943, 0.04687648266553879, 0.04401000589132309, -0.02575027570128441, -0.07887289673089981, -0.6568857431411743, 0.2187015563249588, -0.16281887888908386, -0.05549757927656174, 0.04907180741429329, 0.18949078023433685, 0.02322797290980816, 0.1947416514158249, -0.024793235585093498, 0.18742996454238892, 0.2192218005657196, 0.22125712037086487, -0.14566123485565186, 0.025116311386227608, 0.08875641971826553, 0.08463501930236816, 0.18090787529945374, -0.1974048614501953, -0.39331772923469543, 0.2960713803768158, 0.1551092565059662, 0.07391664385795593, 0.07294963300228119, -0.4784950315952301, 0.04817661643028259, 0.13474659621715546, -0.4795564115047455, 0.09567920118570328, -0.16661633551120758, -0.11867992579936981, 0.16691935062408447, -0.3636656403541565, 0.005014967173337936, -0.026832424104213715, 0.12497156858444214, 0.2022000551223755, 0.07957401871681213, -0.02944389171898365, -0.4632033407688141, 0.4130788743495941, -0.07372070848941803, -0.5105578303337097, 0.11475604772567749, -0.028086397796869278, 0.07546141743659973, 0.028566308319568634, 0.020375438034534454, 0.14036017656326294, 0.4131544530391693, 0.08787863701581955, 0.1691174954175949, -0.4626201391220093, -0.15263885259628296, 0.08465941250324249, -0.029318280518054962, 0.3602167069911957, 0.3694564700126648, -0.2511667013168335, -0.20080877840518951, 0.014671262353658676, 0.10888038575649261, 0.23301813006401062, -0.03930702060461044, -0.05191399157047272, -0.06834103167057037, 0.3339587450027466, 0.02239614725112915, 0.052632927894592285, -0.20739640295505524, -0.0709707960486412, 0.14858657121658325, 0.13176190853118896, 0.3257821500301361, 0.06727319955825806, 0.06477370113134384, 0.0029125772416591644, 0.37828391790390015, -0.39413219690322876, -0.24162760376930237, -0.46742552518844604, 0.4228399395942688, -0.2932721972465515, 0.056728295981884, -0.16025075316429138, -0.30914920568466187, -0.42949438095092773, 0.41883614659309387, -0.2744157910346985, 0.08692009001970291, -0.0495816171169281, 0.6124125719070435, -0.10950964689254761, 0.01159762404859066, 0.09520629048347473, 0.11365631222724915, 0.025535181164741516, -0.08422030508518219, -0.08743677288293839, 0.13288940489292145, -0.027375124394893646, -0.10982923209667206, 0.6706766486167908, 0.17483562231063843, -0.06522533297538757, 0.9710155129432678, -0.1269872486591339, 0.006462350487709045, 0.5416057705879211, -0.12552385032176971, 0.10184702277183533, -0.12692373991012573, -0.31927311420440674, -0.32377082109451294, 0.11021066457033157, -0.11004592478275299, 0.2128056287765503, -0.014457067474722862, -0.016264842823147774, 0.0111699178814888, -0.2512474060058594, 0.22815744578838348, -0.20401795208454132, 0.09473851323127747, -0.08312749862670898, 0.24583661556243896, -0.07941911369562149, 0.2175752967596054, -0.6325722932815552, -0.2086460143327713, 0.1478876769542694, 0.08489902317523956, 0.2731224000453949, -0.14536738395690918, 0.07938165962696075, -0.30271443724632263, -0.28080615401268005, 0.10593695193529129, 0.2863873839378357, 0.334682434797287, 0.0844586044549942, 0.10184000432491302, 0.14406991004943848, -0.006833195686340332, 0.6538882255554199, -0.47266095876693726, 0.03493034094572067, 0.09749175608158112, -0.02114202082157135, 0.1610780954360962, 0.13645216822624207, 0.12762632966041565, -0.12746059894561768, -0.39594200253486633, 0.5287180542945862, -0.21420961618423462, -0.00336485356092453, 0.2353128343820572, -0.3418161869049072, -0.11474306881427765, -0.605179488658905, 0.020206622779369354, 0.06563268601894379, -0.12381063401699066, -0.11838404089212418, 0.018897995352745056, -0.05796874314546585, 0.26934516429901123, 0.21635669469833374, -0.5535822510719299, 0.30943092703819275, 0.3067922592163086, 0.024418700486421585, -0.07133880257606506, 0.18160027265548706, 0.325794517993927, 0.35365742444992065, -0.3032933473587036, 0.38097918033599854, 0.4104324281215668, -0.22644029557704926, -0.16127222776412964, -0.41032686829566956, -0.2498370110988617, -0.011350143700838089, 0.23413439095020294, 0.05704231560230255, 0.4658527970314026, -0.19753606617450714, 0.041956376284360886, -0.45727115869522095, -0.26801082491874695, -0.05267980694770813, -0.1054086834192276, -0.1733410507440567, -0.663136899471283, 0.37156397104263306, -0.26776155829429626, -0.2354206144809723, 0.2815960645675659, 0.6877220869064331, -0.32351475954055786, 0.45766329765319824, 0.11189943552017212, 0.8206658363342285, -0.07785610109567642, -0.023289736360311508, -0.023794403299689293, -0.3979584872722626, 0.018060941249132156, -0.16980671882629395, 0.036347560584545135, -0.31246793270111084, -0.35336804389953613, -0.26327505707740784, 0.05419343709945679, 0.18439164757728577, 0.11704348027706146, 0.04384028911590576, 0.15123248100280762, -0.07422897219657898, -0.2928236424922943, -0.15854394435882568, 0.3106882572174072, -0.02535383403301239, -0.4016534686088562, 0.07298360764980316, 0.04060693830251694, 0.05203021690249443, 0.019214173778891563, -0.020050611346960068, -0.08312685787677765, -0.058444730937480927, 0.23650357127189636, -0.18310566246509552, -0.3773989677429199, -0.06587912887334824, 0.027009453624486923, -0.03266201168298721, 0.00436672568321228, 0.38293296098709106, -0.33872678875923157, 0.22840991616249084, -0.15731701254844666, -0.09453209489583969, 0.05358680710196495, 0.3190821707248688, 0.2119693011045456, 0.17045018076896667, -0.018344447016716003, 0.25272780656814575, 0.3288290798664093, -0.401528000831604, 0.033942028880119324, 0.052233047783374786, -0.5063410401344299, -0.1159159392118454, -0.09933525323867798, 0.12116983532905579, -0.33212870359420776, -0.009926185011863708, -0.22688814997673035, 0.030829355120658875, -0.03310190513730049, 0.021758748218417168, -0.18604987859725952, 0.18721261620521545, 0.1344631463289261, -0.1569267213344574, -0.1302950531244278, -0.12663878500461578, 0.21175217628479004, -0.22861817479133606, 0.4610767960548401, 0.2979625463485718, -0.12644371390342712, -0.4359622001647949, -0.09803619980812073, 0.24963676929473877, 0.39676401019096375, 0.05456283688545227, -0.14561593532562256, -0.19121943414211273, 0.0038500726222991943, 0.15892978012561798, 0.19140726327896118, 0.15452513098716736, 0.05500083044171333, 0.031209886074066162, -0.35554826259613037, -0.06449971348047256, 0.10155096650123596, -0.01611146703362465, 0.23568657040596008, -0.12907561659812927, -0.16965258121490479, -0.4145098626613617, -0.12301946431398392, -0.21929055452346802, 0.15591351687908173, -0.015383794903755188, -0.03373529762029648, -0.26285892724990845, 0.30743587017059326, -0.019029732793569565, 0.05738372355699539, 0.07528688758611679, -0.07585511356592178, -0.018934089690446854, -0.08942971378564835, -0.3420555889606476, 0.14505551755428314, -0.02957441657781601, 0.0002479478716850281, -0.16582612693309784, -0.28926849365234375, -0.2494165003299713, -0.22562554478645325, -0.0017348825931549072, 0.3819468021392822, -0.11411943286657333, 0.09160064160823822, 0.24652199447155, -0.2315460443496704, -0.17499852180480957, 0.3699522018432617, 0.556182861328125, 0.34837576746940613, 0.0047887153923511505, -0.0015104219783097506, -0.503532886505127, 0.18125787377357483, -0.055188436061143875, 0.3987385034561157, 0.28019559383392334, -0.12323351204395294, 0.38871634006500244, -0.051344867795705795, 0.26852816343307495, 0.43625208735466003, 0.10829564929008484, 0.14992251992225647, -0.0947665423154831, -0.2000519037246704, 0.3386235535144806, 0.05581419914960861, -0.1846024990081787, -0.0634603425860405, 0.12983569502830505, -0.06153450161218643, 0.25944703817367554, 0.6017091274261475, 0.3237156271934509, 0.09723521769046783, -0.45665234327316284, -0.28061288595199585, 0.3497621715068817, 0.05687449872493744, -0.42935800552368164, 0.16441890597343445, 0.31779491901397705, -0.13634619116783142, 0.3676479160785675, 0.3087003231048584, 0.20495542883872986, 0.6192409992218018, -0.07782245427370071, 0.0734463557600975, 0.5035558342933655, 0.275357723236084, 0.037584323436021805, -0.23652143776416779, 0.5299602150917053, 0.22891074419021606, 0.24456308782100677, 0.015070779249072075, 0.39885199069976807, -0.1015872210264206, 0.15429621934890747, 0.12910175323486328, 0.07313062250614166, -0.018680989742279053, 0.3319348096847534, -0.2747546136379242, 0.15876784920692444, -0.2615808844566345, -0.06508754938840866, -0.261150598526001, -0.06485606729984283, -0.19099575281143188, -0.06671445071697235, 0.0760093480348587, 0.39979833364486694, -0.4640539884567261, 0.36656224727630615, 0.06055578961968422, 0.5365704894065857, -0.35350897908210754, -0.2685595750808716, -0.04218059033155441, 0.040765970945358276, 0.7217860817909241, 0.08154872804880142, -0.10048378258943558, -0.03091343864798546, -0.23989614844322205, -0.049083150923252106, -0.46542686223983765, 0.05026932805776596, 0.1293105036020279, -0.1328573226928711, -0.27890124917030334, -0.09860041737556458, 0.2807271480560303, -0.01684707961976528, 0.019616320729255676, -0.2599999010562897, 0.37798747420310974, 0.3564507067203522, -0.40541791915893555, 0.16474023461341858, 0.09434181451797485, -0.08384917676448822, 0.456903874874115, 0.02933526039123535, -0.09740051627159119, 0.1852521300315857, 0.10075318813323975, -0.1554173231124878, 0.2602994441986084, 0.33497264981269836, 0.02333490177989006, -0.2586632966995239, 0.052819717675447464, 0.08602776378393173, -0.07113917917013168, -0.0808878093957901, 0.10009883344173431, -0.2772403657436371, -0.2433522343635559, -0.04176494479179382, -0.44607335329055786, 0.403362512588501, 0.12823867797851562, 0.06037695333361626, -0.10210120677947998, 0.019521739333868027, -0.29020026326179504, 0.28386378288269043, 0.825107216835022, -0.01994270086288452, -0.24251817166805267, -0.28813445568084717, 0.2440444380044937, -0.22640010714530945, -0.2381916046142578, -0.1194583922624588, 0.04375467449426651, -0.10388950258493423, 0.0874803215265274, 0.027882352471351624, 0.29310673475265503, -0.06367833912372589, 0.2761230170726776, -0.2271209955215454, 0.2646588385105133, -0.0571504570543766, 0.28380852937698364, -0.06117883697152138, -0.03338519111275673, -0.2743884027004242, 0.19145607948303223, -0.111699678003788, 0.07942325621843338, -0.004828479140996933, -0.26229485869407654, -0.03155399486422539, 0.09753638505935669, -0.10236190259456635, 0.0921236202120781, -0.3848504424095154, 0.42234575748443604, -0.31033316254615784, -0.09863072633743286, -0.34071215987205505, 0.3426664173603058, 0.1898900419473648, 0.396260142326355, 0.26845625042915344, -0.0723838359117508, 0.19091932475566864, -0.4921334981918335, -0.19021804630756378, 0.11430975794792175, 0.125418558716774, 0.20040489733219147, -0.08370629698038101, -0.38940340280532837, -0.0707641988992691, 0.3745724856853485, -0.03686671331524849, 0.3239167332649231, -0.05119439959526062, -0.09315083175897598, 0.17673499882221222, -0.26120108366012573, -0.1805998682975769, -0.03665845841169357, 0.39274606108665466, -0.2309565246105194, -0.02589843049645424 ]
https://github.com/huggingface/datasets/issues/6532
Thanks for your reply. Yes, I can do that, but it is time-consuming to do that every time I launch the program (some datasets are extremely big). HF Datasets has a nice feature to support instant data loading and efficient random access via row ids. I'm curious if this beneficial feature could be further extended to custom data columns.
[Feature request] Indexing datasets by a customly-defined id field to enable random access dataset items via the id
### Feature request Some datasets may contain an id-like field, for example the `id` field in [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) and the `_id` field in [BeIR/dbpedia-entity](https://huggingface.co/datasets/BeIR/dbpedia-entity). HF datasets support efficient random access via row, but not via this kinds of id fields. I wonder if it is possible to add support for indexing by a custom "id-like" field to enable random access via such ids. The ids may be numbers or strings. ### Motivation In some cases, especially during inference/evaluation, I may want to find out the item that has a specified id, defined by the dataset itself. For example, in a typical re-ranking setting in information retrieval, the user may want to re-rank the set of candidate documents of each query. The input is usually presented in a TREC-style run file, with the following format: ``` <qid> Q0 <docno> <rank> <score> <tag> ``` The re-ranking program should be able to fetch the queries and documents according to the `<qid>` and `<docno>`, which are the original id defined in the query/document datasets. To accomplish this, I have to iterate over the whole HF dataset to get the mapping from real ids to row ids every time I start the program, which is time-consuming. Thus I want HF dataset to provide options for users to index by a custom id column, not by row. ### Your contribution I'm not an expert in this project and I'm afraid that I'm not able to make contributions on the code.
59
[Feature request] Indexing datasets by a customly-defined id field to enable random access dataset items via the id ### Feature request Some datasets may contain an id-like field, for example the `id` field in [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) and the `_id` field in [BeIR/dbpedia-entity](https://huggingface.co/datasets/BeIR/dbpedia-entity). HF datasets support efficient random access via row, but not via this kinds of id fields. I wonder if it is possible to add support for indexing by a custom "id-like" field to enable random access via such ids. The ids may be numbers or strings. ### Motivation In some cases, especially during inference/evaluation, I may want to find out the item that has a specified id, defined by the dataset itself. For example, in a typical re-ranking setting in information retrieval, the user may want to re-rank the set of candidate documents of each query. The input is usually presented in a TREC-style run file, with the following format: ``` <qid> Q0 <docno> <rank> <score> <tag> ``` The re-ranking program should be able to fetch the queries and documents according to the `<qid>` and `<docno>`, which are the original id defined in the query/document datasets. To accomplish this, I have to iterate over the whole HF dataset to get the mapping from real ids to row ids every time I start the program, which is time-consuming. Thus I want HF dataset to provide options for users to index by a custom id column, not by row. ### Your contribution I'm not an expert in this project and I'm afraid that I'm not able to make contributions on the code. Thanks for your reply. Yes, I can do that, but it is time-consuming to do that every time I launch the program (some datasets are extremely big). HF Datasets has a nice feature to support instant data loading and efficient random access via row ids. I'm curious if this beneficial feature could be further extended to custom data columns.
[ -0.22591283917427063, 0.24693582952022552, -0.0808679610490799, 0.09924040734767914, -0.2066027671098709, 0.0893334224820137, 0.42412909865379333, 0.1967884749174118, 0.39071765542030334, 0.07601094245910645, -0.1207163855433464, 0.4350595772266388, -0.10443057864904404, 0.14166034758090973, 0.09195245057344437, -0.07049961388111115, -0.07606910169124603, 0.20588120818138123, 0.3743540048599243, 0.19761517643928528, -0.4705786108970642, -0.1804894208908081, -0.09796762466430664, 0.13038744032382965, 0.050636954605579376, 0.021243134513497353, -0.027857452630996704, 0.0758519172668457, -0.026410607621073723, -0.5903247594833374, 0.1808842122554779, 0.595689058303833, 0.27619147300720215, 0.09541039168834686, -0.00011836772318929434, -0.04116281121969223, -0.06417510658502579, 0.11493130028247833, -0.1293807327747345, -0.0739625096321106, -0.24749168753623962, 0.19913601875305176, -0.12752270698547363, -0.2192935049533844, -0.0008610635995864868, -0.1713094711303711, 0.01533721573650837, -0.3811037540435791, -0.514272928237915, -0.11681386828422546, 0.08256814628839493, 0.036545321345329285, -0.10681505501270294, 0.07284009456634521, 0.6560938954353333, 0.2251209318637848, -0.2177397906780243, 0.06242148205637932, 0.2094925194978714, -0.16917216777801514, -0.092556893825531, 0.18434405326843262, 0.1735173612833023, -0.016876734793186188, 0.56133633852005, 0.03607461228966713, -0.4425993859767914, 0.10608360171318054, -0.09955130517482758, 0.3327532112598419, 0.27064600586891174, -0.2976498305797577, -0.5672351121902466, -0.18987663090229034, 0.19282591342926025, -0.23828133940696716, 0.008044900372624397, -0.06557383388280869, 0.0030550509691238403, 0.2964385151863098, 0.0841766744852066, 0.0014079287648200989, -0.14466600120067596, 0.21120718121528625, 0.02064746618270874, 0.07709530740976334, 0.15509168803691864, 0.08925884962081909, 0.06297877430915833, -0.34322261810302734, 0.3183176517486572, -0.06447549164295197, -0.08102196455001831, 0.22180098295211792, -0.24543634057044983, -0.3600793480873108, 0.015041117556393147, -0.14098778367042542, 0.2657979428768158, 0.18573825061321259, -0.10280664265155792, 0.24381202459335327, -0.18157050013542175, -0.12445516884326935, -0.056918833404779434, 0.07227213680744171, -0.09851089119911194, 0.31722894310951233, 0.1493571698665619, -0.06832697242498398, -0.30963134765625, -0.06265589594841003, -0.2056559920310974, 0.2989601492881775, 0.029888637363910675, -0.1268860399723053, -0.45998090505599976, 0.08157072216272354, -0.26046717166900635, 0.04524790495634079, -0.3229996860027313, -0.21206600964069366, -0.008275724947452545, 0.24073979258537292, 0.23534268140792847, -0.2862566113471985, -0.06297069787979126, 0.0065147653222084045, -0.18675626814365387, -0.11145540326833725, 0.07020729035139084, 0.10270935297012329, 0.03863315284252167, 0.22534403204917908, 0.19918853044509888, -0.17930994927883148, -0.1611168384552002, -0.012564048171043396, -0.1911596804857254, 0.18406346440315247, 0.24565419554710388, -0.1605137288570404, 0.04542164504528046, -0.029184240847826004, -0.3467910885810852, -0.29456692934036255, 0.041106242686510086, -0.020054586231708527, -0.2544873356819153, 0.0752342939376831, -0.13661986589431763, -0.3819888234138489, 0.02935931645333767, 0.015516332350671291, 0.10618895292282104, -0.23236015439033508, 0.23227763175964355, 0.49401208758354187, -0.19344931840896606, -0.10912760347127914, 0.11329512298107147, 0.00006991345435380936, -0.29023802280426025, 0.03250179439783096, -0.09355558454990387, 0.2627628445625305, -0.1864325851202011, -0.1713417023420334, 0.05472565442323685, 0.12276633083820343, -0.15885110199451447, -0.022239282727241516, -0.2549313008785248, 0.316346138715744, -0.37880849838256836, 0.31136977672576904, 0.119203582406044, -0.1790631115436554, -0.37862640619277954, 0.27390554547309875, -0.00019203871488571167, 0.18680955469608307, 0.28900331258773804, 0.4232533872127533, 0.29578062891960144, -0.02859446592628956, 0.5159186124801636, 0.07497762143611908, 0.0138301532715559, -0.30744802951812744, 0.020632363855838776, -0.6022546291351318, -0.18034252524375916, 0.2562152147293091, 0.22049978375434875, 0.33517658710479736, 0.5463447570800781, -0.23758235573768616, 0.0908099114894867, -0.1217513233423233, -0.1721622347831726, -0.24063104391098022, 0.09368376433849335, 0.3662608861923218, 0.06797041743993759, -0.44672179222106934, -0.08778339624404907, 0.2501433491706848, 0.13918055593967438, -0.06311684846878052, 0.009302154183387756, -0.43099403381347656, 0.01779717206954956, 0.20881542563438416, -0.08086659014225006, 0.1994859278202057, -0.012008421123027802, -0.0904771164059639, -0.16770192980766296, -0.19224011898040771, -0.4083227813243866, 0.16227008402347565, -0.19602161645889282, -0.0013353601098060608, -0.11008664220571518, 0.12823444604873657, 0.1959097534418106, 0.2771828770637512, -0.20038238167762756, 0.27247193455696106, 0.008586696349084377, 0.029114525765180588, 0.08944793045520782, 0.12428247928619385, 0.14416468143463135, -0.25275740027427673, 0.6515648365020752, 0.5232973098754883, 0.1998075246810913, -0.025564931333065033, 0.21588779985904694, -0.06453926861286163, 0.09191916882991791, 0.030035749077796936, -0.02704758197069168, 0.7112701535224915, -0.34334462881088257, 0.21512241661548615, -0.0021317824721336365, -0.30445122718811035, 0.25931212306022644, -0.021418258547782898, 0.045314379036426544, -0.21068987250328064, 0.08168637007474899, 0.07945244014263153, 0.03254649043083191, -0.08318869769573212, -0.6953190565109253, 0.2514296770095825, -0.17927107214927673, -0.049039192497730255, 0.04641006886959076, 0.17398220300674438, 0.02516358345746994, 0.1545529067516327, 0.016065532341599464, 0.18335962295532227, 0.24930381774902344, 0.24493122100830078, -0.10903690755367279, -0.036478303372859955, 0.1001606285572052, 0.05539972707629204, 0.16602928936481476, -0.2218017280101776, -0.3305983245372772, 0.35122328996658325, 0.12980490922927856, 0.10444021224975586, 0.05791984498500824, -0.4613548517227173, 0.10652938485145569, 0.09631786495447159, -0.4839667081832886, 0.040398970246315, -0.18884608149528503, -0.13562116026878357, 0.1966710090637207, -0.2868310809135437, 0.04467430338263512, -0.022682633250951767, 0.14094048738479614, 0.1979255974292755, 0.041577473282814026, -0.029361216351389885, -0.5225542783737183, 0.5515962839126587, -0.09325262904167175, -0.4470441937446594, 0.09474457800388336, 0.005421843379735947, 0.10617557168006897, 0.01847272366285324, 0.0627390518784523, 0.08087614178657532, 0.42801564931869507, 0.09798821061849594, 0.22431060671806335, -0.509812593460083, -0.15590937435626984, 0.15977737307548523, 0.08853087574243546, 0.3403870761394501, 0.28762710094451904, -0.24770694971084595, -0.2147938758134842, -0.016642998903989792, 0.07357609272003174, 0.21589946746826172, -0.02082902565598488, -0.1150331050157547, -0.0735686868429184, 0.2888571619987488, 0.03601377457380295, 0.08655746281147003, -0.14576390385627747, -0.06671754270792007, 0.16270732879638672, 0.05801266431808472, 0.29874107241630554, -0.015715494751930237, 0.056727759540081024, 0.06098443642258644, 0.2898372709751129, -0.40505391359329224, -0.285478800535202, -0.5155571103096008, 0.40494778752326965, -0.29773205518722534, 0.03952210023999214, -0.22955086827278137, -0.30383187532424927, -0.46156859397888184, 0.4857124388217926, -0.2943575382232666, 0.12960968911647797, 0.009099757298827171, 0.6278027296066284, -0.1480545848608017, -0.020423250272870064, 0.10378653556108475, 0.07358461618423462, 0.024555321782827377, -0.08428433537483215, -0.10212274640798569, 0.13076750934123993, -0.10662409663200378, -0.07824912667274475, 0.6849716901779175, 0.1705925166606903, -0.05775309354066849, 1.0087528228759766, -0.19269594550132751, 0.016692813485860825, 0.5336804986000061, -0.1064055860042572, 0.15680353343486786, -0.09548667073249817, -0.2598716616630554, -0.288625031709671, 0.06957908719778061, -0.08745342493057251, 0.28283819556236267, -0.04417221248149872, -0.07164919376373291, 0.02655581384897232, -0.24188560247421265, 0.22683578729629517, -0.1619293987751007, 0.08050815016031265, -0.0701112374663353, 0.29231584072113037, -0.07050763815641403, 0.19379283487796783, -0.6496568322181702, -0.20671136677265167, 0.15578274428844452, 0.09551969170570374, 0.3692682087421417, -0.1378835290670395, -0.006381817162036896, -0.3269594609737396, -0.1669616848230362, 0.10324767231941223, 0.3101347088813782, 0.3125287592411041, 0.041400305926799774, 0.05294538289308548, 0.1599891632795334, -0.037820152938365936, 0.6436517834663391, -0.41947051882743835, 0.03164299950003624, 0.03564247488975525, 0.02659742534160614, 0.2305147498846054, 0.09136377274990082, 0.18761329352855682, -0.16514372825622559, -0.37078163027763367, 0.5571922659873962, -0.2042342722415924, 0.006443865597248077, 0.25655806064605713, -0.3936634361743927, -0.07680698484182358, -0.6506323218345642, 0.0960819348692894, 0.2052423357963562, -0.09324512630701065, -0.07923184335231781, -0.07222113013267517, -0.07786679267883301, 0.265281617641449, 0.1740105152130127, -0.5333214998245239, 0.34012049436569214, 0.24867336452007294, -0.01462562009692192, -0.10944455116987228, 0.21797016263008118, 0.34889620542526245, 0.3334023654460907, -0.3057902455329895, 0.39102694392204285, 0.4249047040939331, -0.25019145011901855, -0.11898215115070343, -0.30280184745788574, -0.28103774785995483, -0.03050057962536812, 0.30220896005630493, 0.07184334099292755, 0.44741034507751465, -0.18736466765403748, 0.06302718818187714, -0.4605831801891327, -0.2660549283027649, -0.10227765887975693, -0.18393993377685547, -0.13063229620456696, -0.6027939915657043, 0.38752615451812744, -0.28910404443740845, -0.26768118143081665, 0.25650444626808167, 0.6854822635650635, -0.26328524947166443, 0.36190271377563477, 0.11681881546974182, 0.8351324200630188, -0.037989601492881775, -0.018144618719816208, -0.02912212163209915, -0.364371657371521, 0.004547104239463806, -0.1703924536705017, 0.03988414630293846, -0.334682434797287, -0.3909839689731598, -0.23881149291992188, 0.04011590778827667, 0.1922672539949417, 0.1975192129611969, 0.07153297960758209, 0.060924723744392395, -0.013959430158138275, -0.25540605187416077, -0.15473121404647827, 0.3095353841781616, -0.016846580430865288, -0.40502890944480896, 0.14388900995254517, 0.030488386750221252, 0.06625385582447052, -0.023893356323242188, -0.03897520899772644, -0.06729394942522049, -0.028931543231010437, 0.26486682891845703, -0.15233264863491058, -0.3295818269252777, -0.08470259606838226, -0.016627419739961624, -0.041485659778118134, 0.04186613857746124, 0.37135016918182373, -0.42506060004234314, 0.20496238768100739, -0.18236523866653442, -0.11197621375322342, 0.05652108043432236, 0.30617237091064453, 0.20459231734275818, 0.14982002973556519, -0.054169997572898865, 0.26007190346717834, 0.3122199475765228, -0.2954652011394501, -0.03217601403594017, 0.04668562486767769, -0.5075583457946777, -0.15944121778011322, -0.09362735599279404, 0.1396145522594452, -0.3189535439014435, -0.04798286780714989, -0.18316425383090973, 0.10162225365638733, -0.03365062549710274, 0.008135662414133549, -0.1854720264673233, 0.2529198229312897, 0.06523089110851288, -0.11024060845375061, -0.06483720988035202, -0.15076114237308502, 0.24829062819480896, -0.2275349497795105, 0.42646458745002747, 0.2785549759864807, -0.15561805665493011, -0.4284496307373047, -0.08425843715667725, 0.2831488847732544, 0.4557119607925415, 0.01637636125087738, -0.18526801466941833, -0.17911437153816223, -0.048719897866249084, 0.1943007856607437, 0.1137462854385376, 0.14830857515335083, 0.01677994802594185, 0.06089061498641968, -0.35729143023490906, 0.002060025930404663, 0.14333784580230713, -0.09859558939933777, 0.232133686542511, -0.06235028803348541, -0.2508246600627899, -0.44741013646125793, -0.06337493658065796, -0.20209051668643951, 0.1220739558339119, 0.03455979377031326, -0.04141434654593468, -0.24474331736564636, 0.3481469452381134, -0.07381647080183029, 0.08551739156246185, 0.05113941431045532, -0.0927630215883255, -0.023518674075603485, -0.06629956513643265, -0.3226071000099182, 0.16885115206241608, -0.0006062313914299011, 0.05978618562221527, -0.12992259860038757, -0.2863457202911377, -0.25474750995635986, -0.1964465230703354, 0.030635133385658264, 0.27676188945770264, -0.14610067009925842, 0.024368789047002792, 0.26443979144096375, -0.20604635775089264, -0.1919296830892563, 0.3951586186885834, 0.5939583778381348, 0.3741830289363861, -0.024747971445322037, 0.016169218346476555, -0.5281627774238586, 0.19098950922489166, -0.07991975545883179, 0.39412280917167664, 0.3424307703971863, -0.10669754445552826, 0.42465028166770935, -0.018893051892518997, 0.2849847674369812, 0.4146871566772461, 0.06171505153179169, 0.11774186789989471, -0.0712290108203888, -0.23731833696365356, 0.31682348251342773, 0.0342138409614563, -0.18380653858184814, -0.12436370551586151, 0.07148139178752899, -0.10369392484426498, 0.20998384058475494, 0.5504426956176758, 0.36040931940078735, 0.12669602036476135, -0.3653568625450134, -0.28253671526908875, 0.3159216046333313, 0.08104194700717926, -0.440368115901947, 0.20601524412631989, 0.3221799433231354, -0.11157175898551941, 0.39352667331695557, 0.31270089745521545, 0.18675686419010162, 0.5491569638252258, -0.06849353015422821, 0.016909344121813774, 0.523440420627594, 0.34168556332588196, 0.04660092666745186, -0.3029578924179077, 0.47573795914649963, 0.2856670320034027, 0.21597851812839508, 0.06872314214706421, 0.35370469093322754, -0.09823091328144073, 0.13662323355674744, 0.1393829882144928, 0.04045015573501587, -0.024442365393042564, 0.33127549290657043, -0.24224212765693665, 0.09240852296352386, -0.3132900595664978, -0.06482334434986115, -0.2005990743637085, -0.11047901213169098, -0.12448357045650482, -0.06433369219303131, 0.04663993418216705, 0.40871578454971313, -0.4334842562675476, 0.36509010195732117, 0.09357164800167084, 0.4731184244155884, -0.384044885635376, -0.24645863473415375, -0.10530269145965576, 0.04728749766945839, 0.7379854917526245, 0.12824353575706482, -0.14676977694034576, -0.0277462936937809, -0.13007386028766632, -0.14938268065452576, -0.4487890303134918, 0.06624173372983932, 0.13037946820259094, -0.13266178965568542, -0.18651224672794342, -0.2108592689037323, 0.3078303635120392, -0.03905327245593071, 0.027352508157491684, -0.16889408230781555, 0.35337013006210327, 0.33296242356300354, -0.4108577072620392, 0.1252719908952713, 0.10695908963680267, -0.08703447133302689, 0.4729321300983429, 0.022202439606189728, -0.047044627368450165, 0.23330089449882507, 0.04361363872885704, -0.20542246103286743, 0.2074889838695526, 0.32374611496925354, 0.01615157350897789, -0.27234533429145813, 0.08407987654209137, 0.10196578502655029, -0.14753903448581696, -0.07677203416824341, 0.0694459080696106, -0.26208603382110596, -0.18845273554325104, 0.009798699989914894, -0.3551270663738251, 0.4644676148891449, 0.12262222170829773, 0.07254406064748764, -0.10796980559825897, -0.02849234640598297, -0.34657901525497437, 0.3206332325935364, 0.8217913508415222, -0.03801773861050606, -0.23256099224090576, -0.19920796155929565, 0.22198687493801117, -0.264968603849411, -0.2735704779624939, -0.05715472251176834, 0.05058812350034714, -0.14666792750358582, 0.14886975288391113, 0.043203577399253845, 0.24704912304878235, -0.0717591792345047, 0.33047378063201904, -0.2563299834728241, 0.23319359123706818, -0.035761669278144836, 0.2801845073699951, -0.09768357872962952, -0.06411776691675186, -0.28273019194602966, 0.17814765870571136, -0.10803627967834473, 0.08943314850330353, 0.016976594924926758, -0.25460875034332275, 0.0005713663995265961, 0.060084614902734756, -0.16233336925506592, 0.15120606124401093, -0.37287989258766174, 0.40299367904663086, -0.31716451048851013, -0.07558643072843552, -0.28051990270614624, 0.3098336458206177, 0.2213919460773468, 0.3714906871318817, 0.21889349818229675, 0.0022009238600730896, 0.12185560911893845, -0.44773051142692566, -0.12668997049331665, 0.12848207354545593, 0.13468869030475616, 0.25934943556785583, -0.09983927011489868, -0.37448936700820923, -0.10839866101741791, 0.3998377323150635, -0.04947156459093094, 0.3598231077194214, -0.00848836824297905, -0.08994163572788239, 0.17361319065093994, -0.2881104350090027, -0.22056496143341064, -0.006062294356524944, 0.33023709058761597, -0.26215100288391113, -0.03880065307021141 ]
https://github.com/huggingface/datasets/issues/6530
I solved it with `train_dataset.with_format(None)` But then faced some more issues (which i later solved too). Huggingface does not seem to care, so I do. Here is an updated training script which saves a pre-processed (mapped) dataset to your local directory if you specify `--save_precomputed_data_dir=DIR_NAME`. Then use `--train_precomputed_data_dir` with the same dir to load it instead of `--dataset_name`. [Proper SDXL trainer code](https://github.com/kopyl/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py) [Notebook for pre-computing a dataset and saving locally](https://colab.research.google.com/drive/17Yo08hePx-NlHs99RecdeiNc8CQg4O7l?usp=sharing) Example: 1st run (nothing is pre-computed yet): ``` accelerate launch train_text_to_image_sdxl.py \ --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \ --pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix \ --dataset_name=lambdalabs/pokemon-blip-captions \ --save_precomputed_data_dir="test-5" ``` 2nd run (the pre-computed dataset is saved to `test-5` directory): ``` accelerate launch train_text_to_image_sdxl.py \ --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \ --pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix \ --train_precomputed_data_dir test-5 ``` This way when you're gonna be using your pre-computed dataset you don't need to worry about re-mapping your dataset when you change an argument for your trainer script
Impossible to save a mapped dataset to disk
### Describe the bug I want to play around with different hyperparameters when training but don't want to re-map my dataset with 3 million samples each time for tens of hours when I [fully fine-tune SDXL](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py). After I do the mapping like this: ``` train_dataset = train_dataset.map(compute_embeddings_fn, batched=True) train_dataset = train_dataset.map( compute_vae_encodings_fn, batched=True, batch_size=16, ) ``` and try to save it like this: `train_dataset.save_to_disk("test")` i get this error ([full traceback](https://pastebin.com/kq3vt739)): ``` TypeError: Object of type function is not JSON serializable The format kwargs must be JSON serializable, but key 'transform' isn't. ``` But what is interesting is that pushing to hub works like that: `train_dataset.push_to_hub("kopyl/mapped-833-icons-sdxl-1024-dataset", token=True)` Here is the link of the pushed dataset: https://huggingface.co/datasets/kopyl/mapped-833-icons-sdxl-1024-dataset ### Steps to reproduce the bug Here is the self-contained notebook: https://colab.research.google.com/drive/1RtCsEMVcwWcMwlWURk_cj_9xUBHz065M?usp=sharing ### Expected behavior It should be easily saved to disk ### Environment info NVIDIA A100, Linux (NC24ads A100 v4 from Azure), CUDA 12.2. [pip freeze](https://pastebin.com/QTNb6iru)
140
Impossible to save a mapped dataset to disk ### Describe the bug I want to play around with different hyperparameters when training but don't want to re-map my dataset with 3 million samples each time for tens of hours when I [fully fine-tune SDXL](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py). After I do the mapping like this: ``` train_dataset = train_dataset.map(compute_embeddings_fn, batched=True) train_dataset = train_dataset.map( compute_vae_encodings_fn, batched=True, batch_size=16, ) ``` and try to save it like this: `train_dataset.save_to_disk("test")` i get this error ([full traceback](https://pastebin.com/kq3vt739)): ``` TypeError: Object of type function is not JSON serializable The format kwargs must be JSON serializable, but key 'transform' isn't. ``` But what is interesting is that pushing to hub works like that: `train_dataset.push_to_hub("kopyl/mapped-833-icons-sdxl-1024-dataset", token=True)` Here is the link of the pushed dataset: https://huggingface.co/datasets/kopyl/mapped-833-icons-sdxl-1024-dataset ### Steps to reproduce the bug Here is the self-contained notebook: https://colab.research.google.com/drive/1RtCsEMVcwWcMwlWURk_cj_9xUBHz065M?usp=sharing ### Expected behavior It should be easily saved to disk ### Environment info NVIDIA A100, Linux (NC24ads A100 v4 from Azure), CUDA 12.2. [pip freeze](https://pastebin.com/QTNb6iru) I solved it with `train_dataset.with_format(None)` But then faced some more issues (which i later solved too). Huggingface does not seem to care, so I do. Here is an updated training script which saves a pre-processed (mapped) dataset to your local directory if you specify `--save_precomputed_data_dir=DIR_NAME`. Then use `--train_precomputed_data_dir` with the same dir to load it instead of `--dataset_name`. [Proper SDXL trainer code](https://github.com/kopyl/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py) [Notebook for pre-computing a dataset and saving locally](https://colab.research.google.com/drive/17Yo08hePx-NlHs99RecdeiNc8CQg4O7l?usp=sharing) Example: 1st run (nothing is pre-computed yet): ``` accelerate launch train_text_to_image_sdxl.py \ --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \ --pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix \ --dataset_name=lambdalabs/pokemon-blip-captions \ --save_precomputed_data_dir="test-5" ``` 2nd run (the pre-computed dataset is saved to `test-5` directory): ``` accelerate launch train_text_to_image_sdxl.py \ --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \ --pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix \ --train_precomputed_data_dir test-5 ``` This way when you're gonna be using your pre-computed dataset you don't need to worry about re-mapping your dataset when you change an argument for your trainer script
[ -0.25928619503974915, -0.19739599525928497, 0.07933446764945984, 0.14602430164813995, 0.6141032576560974, 0.16964267194271088, 0.29752078652381897, 0.24852529168128967, 0.1337583214044571, 0.26897141337394714, -0.04194672778248787, 0.41905495524406433, -0.3757166862487793, 0.10039237886667252, 0.11267554759979248, 0.13538984954357147, 0.29498493671417236, -0.05475278198719025, -0.033626988530159, -0.11771078407764435, -0.36431920528411865, -0.06978529691696167, 0.09431560337543488, -0.3228883743286133, -0.38131624460220337, -0.20905935764312744, 0.08079610764980316, -0.12544193863868713, -0.04505320265889168, 0.04235523194074631, 0.20588348805904388, -0.01432628184556961, 0.13835975527763367, 0.3753868341445923, -0.0001242861180799082, 0.03832142800092697, 0.06405224651098251, -0.2533462345600128, -0.25954028964042664, -0.18022620677947998, 0.07702068239450455, -0.2329578846693039, -0.07904763519763947, -0.45910513401031494, 0.041107989847660065, -0.04366111382842064, 0.0025832541286945343, -0.2900610566139221, 0.3790496289730072, 0.0881195217370987, 0.17686748504638672, -0.04345475137233734, 0.0018372684717178345, 0.11413097381591797, -0.05446558818221092, 0.6468514800071716, -0.4882708787918091, 0.19149962067604065, 0.09649977087974548, 0.192033052444458, 0.19850189983844757, 0.29661068320274353, 0.09441623091697693, -0.4331418573856354, 0.21435898542404175, -0.07649692893028259, -0.030452631413936615, -0.158874973654747, 0.21288412809371948, -0.06861498951911926, 0.03867890685796738, -0.4176768660545349, -0.28316888213157654, -0.19918453693389893, -0.2021794468164444, -0.30176976323127747, 0.2007310688495636, 0.14459824562072754, -0.24736930429935455, -0.09306242316961288, -0.4314693212509155, -0.23372158408164978, -0.09676342457532883, -0.00884651392698288, 0.2981822192668915, 0.11371628195047379, -0.12185034155845642, 0.1787920445203781, 0.19907355308532715, -0.1427423059940338, 0.017881333827972412, -0.19042101502418518, 0.19537882506847382, -0.0192731861025095, -0.364967405796051, -0.10672452300786972, -0.3019401431083679, -0.39858582615852356, 0.1468804031610489, 0.16255608201026917, 0.0548064149916172, -0.13253553211688995, 0.1876908838748932, 0.02586381509900093, 0.13924670219421387, 0.4633045196533203, 0.10912809520959854, 0.3176729679107666, 0.22916582226753235, 0.10812607407569885, -0.20512712001800537, 0.0756324976682663, -0.05753309652209282, 0.15619073808193207, 0.4275086522102356, 0.023146189749240875, 0.28287646174430847, -0.16915607452392578, -0.1660437434911728, 0.19953566789627075, -0.0893498882651329, 0.15680108964443207, -0.040057167410850525, 0.2838364541530609, 0.24322667717933655, 0.06304922699928284, -0.06496589630842209, 0.33188095688819885, 0.025157995522022247, 0.3230930268764496, -0.12381400167942047, 0.01004355400800705, 0.0001710951328277588, 0.123899906873703, 0.1282806098461151, -0.36220836639404297, 0.20849472284317017, -0.05886802822351456, -0.17044571042060852, -0.26270222663879395, -0.2391861230134964, -0.10854175686836243, 0.33208557963371277, 0.22597874701023102, -0.08082111179828644, 0.4279349446296692, 0.04379180446267128, -0.20249414443969727, -0.2478187531232834, 0.2407781034708023, -0.07630905508995056, -0.07352844625711441, 0.006539294496178627, 0.07214881479740143, -0.06637986749410629, 0.03947363793849945, -0.544464111328125, 0.08140267431735992, 0.15635699033737183, 0.041664138436317444, 0.17982590198516846, -0.15699973702430725, -0.0957832932472229, -0.3434467315673828, 0.2176985740661621, -0.01875682920217514, -0.3072660565376282, 0.035080939531326294, 0.20722153782844543, 0.1135958731174469, 0.16770389676094055, 0.22468745708465576, -0.023238306865096092, 0.09819666296243668, -0.011809319257736206, 0.23449671268463135, 0.09591270983219147, -0.5612468123435974, -0.6583877801895142, -0.003956042230129242, -0.09783198684453964, -0.00099143385887146, -0.17251935601234436, 0.21569353342056274, 0.6283007264137268, -0.13613200187683105, 0.002390911802649498, 0.10151731967926025, -0.007241412997245789, 0.08299599587917328, -0.33335867524147034, -0.30728083848953247, 0.35489794611930847, -0.01872207224369049, -0.03950439766049385, 0.04973838850855827, 0.12821456789970398, 0.532105028629303, 0.25736862421035767, 0.0005094641819596291, 0.3527003824710846, 0.33458954095840454, 0.39682114124298096, -0.37867432832717896, -0.09237022697925568, -0.19231614470481873, -0.5376289486885071, 0.08079253137111664, 0.41236352920532227, -0.20546770095825195, -0.16058462858200073, -0.10014066100120544, -0.14985980093479156, 0.08482541888952255, -0.2847241759300232, -0.19649410247802734, 0.04176615923643112, -0.10135021805763245, -0.04085247218608856, 0.16997738182544708, -0.20191726088523865, -0.120351642370224, -0.115883007645607, -0.013907521963119507, -0.297651082277298, 0.08157443255186081, -0.055052123963832855, -0.3979886770248413, -0.0679822638630867, 0.2224847376346588, 0.1283438503742218, -0.34349724650382996, -0.203370600938797, 0.1306205540895462, 0.1680709272623062, 0.1173303946852684, -0.20909303426742554, 0.20395492017269135, 0.15192459523677826, -0.10467516630887985, -0.2001916766166687, 0.3690767288208008, 0.18333986401557922, -0.12495771795511246, -0.485016405582428, 0.1906668245792389, 0.19013215601444244, 0.2253936529159546, -0.16271905601024628, 0.17616894841194153, 0.18851980566978455, -0.053897008299827576, -0.09604115784168243, -0.08355365693569183, 0.03156057745218277, 0.08595119416713715, 0.3906652331352234, -0.2537200450897217, -0.13004983961582184, 0.21976938843727112, 0.4517086148262024, 0.10615158826112747, 0.3593882918357849, 0.08924823254346848, -0.23435157537460327, -0.017061326652765274, 0.15819460153579712, 0.20698410272598267, 0.1509622484445572, -0.1757887750864029, -0.13707754015922546, 0.07901016622781754, -0.2352508008480072, -0.06370117515325546, 0.02590372785925865, -0.018629033118486404, 0.41796523332595825, 0.1943494975566864, 0.2303255796432495, 0.04974445700645447, -0.3479830324649811, 0.20195221900939941, 0.051926515996456146, 0.1531778872013092, -0.050331372767686844, -0.02735460177063942, -0.2457297444343567, 0.3223458230495453, -0.10882969200611115, -0.13590192794799805, -0.2721893787384033, -0.3237086534500122, -0.14643022418022156, 0.5523237586021423, -0.13701212406158447, 0.26631298661231995, -0.043116580694913864, 0.28000694513320923, -0.005635954439640045, -0.23425719141960144, -0.2653537392616272, -0.13409611582756042, -0.17637263238430023, -0.060738492757081985, 0.22914917767047882, -0.20044727623462677, 0.4786140024662018, 0.2007858157157898, 0.19174060225486755, -0.5003026127815247, -0.029677599668502808, -0.02280787006020546, -0.25083667039871216, 0.3059167265892029, -0.13265353441238403, 0.2984403967857361, -0.14192627370357513, -0.21030163764953613, 0.3575541377067566, -0.2246195375919342, -0.37004098296165466, 0.01118602603673935, 0.047859080135822296, -0.1609211564064026, -0.13606403768062592, -0.1258438676595688, -0.20614813268184662, -0.22927622497081757, 0.3073391616344452, -0.2807949185371399, 0.05992618948221207, 0.047623805701732635, 0.10635015368461609, 0.0696045309305191, 0.057316455990076065, -0.46967437863349915, -0.20870989561080933, -0.26295703649520874, 0.42552995681762695, -0.12344817817211151, -0.5533237457275391, 0.14157922565937042, 0.13685362040996552, 0.011502565816044807, 0.1192832887172699, -0.49292388558387756, -0.15428611636161804, -0.03274030238389969, 0.12217831611633301, 0.0470677874982357, -0.16082938015460968, 0.4593164026737213, -0.03851298987865448, 0.17582321166992188, -0.14741899073123932, -0.513026237487793, 0.33872079849243164, 0.38852328062057495, 0.43154892325401306, -0.1448764204978943, 0.4239651560783386, 0.09246256947517395, 0.40533074736595154, 0.31615084409713745, -0.1694655418395996, 0.2769308090209961, 0.032503314316272736, 0.11287757009267807, -0.30239424109458923, -0.43282032012939453, 0.3779633641242981, -0.27114158868789673, -0.21195147931575775, -0.09926928579807281, -0.01796041801571846, 0.026893356814980507, 0.11121048033237457, -0.028735879808664322, -0.06007760763168335, -0.3782750964164734, 0.05735497176647186, -0.1391051560640335, 0.016360796988010406, 0.09859012812376022, 0.26747673749923706, -0.021114584058523178, -0.05061249062418938, 0.30674055218696594, 0.1398731768131256, 0.1921808123588562, 0.03328509256243706, -0.5182565450668335, -0.3872675597667694, -0.713297426700592, 0.1358529031276703, 0.07693807780742645, 0.5294754505157471, -0.17123740911483765, 0.12514746189117432, 0.09644609689712524, 0.0027247928082942963, 0.7561729550361633, -0.2974604666233063, 0.11170436441898346, 0.21216526627540588, -0.17779964208602905, -0.5474609136581421, 0.0006278008222579956, 0.0592205673456192, -0.08587691187858582, -0.2379259169101715, 0.9509984254837036, -0.2646971642971039, -0.05901198834180832, -0.14307613670825958, 0.14723660051822662, -0.44123417139053345, -0.10351966321468353, -0.031057022511959076, -0.560518205165863, -0.3467825949192047, 0.024925291538238525, 0.16071215271949768, 0.23720680177211761, 0.0906437560915947, -0.06926348060369492, -0.2501913905143738, -0.060824014246463776, -0.056631144136190414, -0.17753958702087402, 0.33892157673835754, 0.17570710182189941, 0.25528764724731445, 0.1983533352613449, 0.5048589706420898, 0.07110024988651276, 0.2885133624076843, 0.019544195383787155, -0.08385486900806427, 0.32149410247802734, -0.18712064623832703, 0.06164693832397461, 0.27072393894195557, -0.041903603821992874, 0.08065159618854523, -0.043922822922468185, 0.019204016774892807, -0.5492879152297974, 0.07882991433143616, 0.23404616117477417, 0.04550223425030708, -0.40529754757881165, -0.08727841079235077, 0.4519323706626892, -0.013450182974338531, 0.07321222126483917, 0.12908372282981873, -0.1495896875858307, -0.24073180556297302, 0.3572092652320862, 0.4549521207809448, 1.009206771850586, -0.17565229535102844, 0.30990302562713623, 0.2322136014699936, -0.14790482819080353, 0.21555392444133759, 0.06985029578208923, 0.1642780303955078, -0.3875417709350586, -0.10227002203464508, -0.039429113268852234, 0.04517049342393875, -0.14881911873817444, -0.07825833559036255, -0.19563233852386475, 0.08665838837623596, -0.31018590927124023, 0.2918095290660858, -0.22256208956241608, -0.0393873006105423, 0.006028560921549797, -0.29803961515426636, -0.1397438943386078, 0.13035473227500916, -0.0816243588924408, 0.22245573997497559, 0.046322546899318695, -0.1875772327184677, -0.322426438331604, -0.27758529782295227, -0.22682276368141174, 0.13124871253967285, -0.3377942740917206, 0.37699049711227417, -0.1598753184080124, -0.26673272252082825, -0.2121773362159729, 0.2720698416233063, 0.3341693580150604, -0.015389373525977135, -0.2995053231716156, -0.1839059591293335, -0.23021098971366882, 0.13962392508983612, -0.04941503703594208, -0.2502739131450653, 0.2522326409816742, -0.14056000113487244, 0.20746368169784546, -0.09462559968233109, -0.04328206181526184, -0.25838926434516907, -0.2704927623271942, -0.04537440091371536, -0.16894644498825073, -0.22565825283527374, -0.22387155890464783, -0.04900533705949783, -0.031069166958332062, -0.37633007764816284, 0.02741224691271782, -0.03948815166950226, 0.14653849601745605, 0.5637868642807007, 0.019647685810923576, -0.00862448662519455, 0.15033762156963348, 0.3984316289424896, 0.09921421855688095, -0.035877667367458344, 0.5596492886543274, -0.20689909160137177, -0.12078916281461716, -0.20620152354240417, 0.4499658942222595, 0.2563242018222809, -0.42609062790870667, 0.38134196400642395, -0.5713995695114136, -0.1335471123456955, -0.17674939334392548, 0.3476024270057678, 0.3289393186569214, -0.36274227499961853, -0.16287514567375183, -0.14604401588439941, -0.4152173101902008, 0.17866265773773193, 0.07345277070999146, 0.14903543889522552, -0.21179568767547607, 0.17014180123806, -0.09763618558645248, 0.1831405609846115, -0.21599090099334717, 0.04995604604482651, -0.3055235743522644, 0.17613674700260162, -0.2815571129322052, 0.010217707604169846, 0.28318673372268677, -0.20489037036895752, -0.03219714015722275, 0.2722385823726654, -0.17371448874473572, -0.09274893999099731, -0.4300963282585144, 0.11979340016841888, 0.20098721981048584, 0.21836276352405548, -0.11648031324148178, -0.17274528741836548, -0.1302790641784668, -0.13053996860980988, -0.13897517323493958, 0.31824734807014465, -0.01145072653889656, -0.25648921728134155, 0.28420883417129517, 0.30318716168403625, 0.1438421607017517, 0.0836489200592041, 0.09338703751564026, 0.26923683285713196, 0.0479673407971859, 0.010241548530757427, 0.2838752269744873, -0.027417220175266266, -0.47296419739723206, -0.0984857976436615, 0.16754120588302612, 0.16313959658145905, 0.21751153469085693, -0.22024279832839966, -0.0003262236714363098, 0.09250136464834213, 0.3373776972293854, 0.12941068410873413, -0.4541727900505066, -0.011032924056053162, 0.24479012191295624, 0.0863211452960968, 0.06916358321905136, -0.1026550829410553, 0.32704317569732666, -0.06774759292602539, -0.12961480021476746, 0.21477967500686646, 0.15076419711112976, 0.08352124691009521, -0.26669371128082275, -0.11121948063373566, 0.42278268933296204, -0.22283779084682465, 0.07618221640586853, 0.31034284830093384, 0.00032876431941986084, 0.2835165560245514, 0.36084020137786865, 0.20950520038604736, 0.21585965156555176, 0.2833951711654663, 0.10424847900867462, 0.46143582463264465, 0.5349858999252319, 0.10077787190675735, 0.16453178226947784, -0.035117655992507935, -0.017542243003845215, -0.06801855564117432, -0.32569772005081177, 0.3683684468269348, -0.07485790550708771, 0.13369958102703094, -0.43838998675346375, -0.24847163259983063, -0.1303635686635971, 0.3690319061279297, -0.31433504819869995, 0.011398330330848694, -0.10806404799222946, -0.1009998694062233, 0.024012818932533264, 0.09740644693374634, -0.164719358086586, -0.26901543140411377, 0.40457355976104736, -0.05427052825689316, -0.06085099279880524, 0.2046777307987213, -0.18638047575950623, 0.23183412849903107, 0.27963942289352417, -0.19829583168029785, 0.21466200053691864, -0.0950341671705246, -0.05219221115112305, -0.3018956780433655, 0.49427422881126404, 0.20643845200538635, 0.5217578411102295, -0.12870921194553375, 0.22095119953155518, 0.3445800840854645, 0.07433664053678513, 0.09917883574962616, 0.2849877178668976, 0.03455481678247452, -0.06850451231002808, 0.5279608964920044, 0.07590208947658539, -0.012846974655985832, 0.07551936060190201, 0.1183772087097168, 0.23749661445617676, 0.3348146080970764, 0.29303818941116333, -0.24915768206119537, -0.15602931380271912, 0.06744571775197983, 0.010826140642166138, -0.14197809994220734, -0.06616441160440445, 0.27335697412490845, -0.24286949634552002, 0.3853690028190613, -0.1676928699016571, 0.06854453682899475, -0.16677841544151306, 0.5524362325668335, 0.2866528630256653, -0.47959214448928833, -0.23450684547424316, -0.11297954618930817, -0.3903070092201233, 0.16395418345928192, 0.00372238177806139, 0.03881249576807022, -0.07669325917959213, 0.19058653712272644, 0.08486169576644897, 0.04306350648403168, -0.026873908936977386, -0.12619411945343018, 0.0287947915494442, 0.47207969427108765, -0.27709606289863586, -0.036332108080387115, 0.2655852735042572, 0.23930814862251282, 0.14932416379451752, -0.40271323919296265, 0.5896511673927307, 0.3321174681186676, -0.006841741502285004, -0.05170426517724991, 0.4405498802661896, -0.2569308876991272, -0.10663196444511414, 0.3719325065612793, 0.13437508046627045, 0.1101716160774231, -0.040723767131567, -0.2700865864753723, 0.02087446302175522, 0.1762791872024536, -0.024556539952754974, -0.26154884696006775, 0.11489294469356537, 0.48566171526908875, -0.08892125636339188, -0.02020145021378994, -0.28908059000968933, -0.025008011609315872, -0.0506107322871685, 0.11083585023880005, -0.22998380661010742, 0.2438778132200241, -0.056737035512924194, -0.018167858943343163, 0.3577313721179962, 0.27693286538124084, -0.19790983200073242, 0.25386637449264526, -0.2974061965942383, -0.29695427417755127, 0.4999925494194031, -0.05749620497226715, -0.44018611311912537, 0.20442907512187958, 0.15688690543174744, 0.1189960464835167, 0.04417341202497482, -0.43581074476242065, -0.12303198128938675, 0.13930296897888184, -0.20102305710315704, -0.15307028591632843, 0.30902016162872314, -0.22862550616264343, -0.13280242681503296, 0.09232333302497864, 0.3257089853286743, 0.08456318080425262, 0.007316701114177704, 0.277072936296463, -0.2687281668186188 ]
https://github.com/huggingface/datasets/issues/6529
This feature has been proposed for a long time. I'm looking forward to the implementation. On clusters `streaming=True` is not an option since we do not have Internet on compute nodes. See: https://github.com/huggingface/datasets/discussions/1896#discussioncomment-2359593
Impossible to only download a test split
I've spent a significant amount of time trying to locate the split object inside my _split_generators() custom function. Then after diving [in the code](https://github.com/huggingface/datasets/blob/5ff3670c18ed34fa8ddfa70a9aa403ae6cc9ad54/src/datasets/load.py#L2558) I realized that `download_and_prepare` is executed before! split is passed to the dataset builder in `as_dataset`. If I'm not missing something, this seems like bad design, for the following use case: > Imagine there is a huge dataset that has an evaluation test set and you want to just download and run just to compare your method. Is there a current workaround that can help me achieve the same result? Thank you,
33
Impossible to only download a test split I've spent a significant amount of time trying to locate the split object inside my _split_generators() custom function. Then after diving [in the code](https://github.com/huggingface/datasets/blob/5ff3670c18ed34fa8ddfa70a9aa403ae6cc9ad54/src/datasets/load.py#L2558) I realized that `download_and_prepare` is executed before! split is passed to the dataset builder in `as_dataset`. If I'm not missing something, this seems like bad design, for the following use case: > Imagine there is a huge dataset that has an evaluation test set and you want to just download and run just to compare your method. Is there a current workaround that can help me achieve the same result? Thank you, This feature has been proposed for a long time. I'm looking forward to the implementation. On clusters `streaming=True` is not an option since we do not have Internet on compute nodes. See: https://github.com/huggingface/datasets/discussions/1896#discussioncomment-2359593
[ -0.6835596561431885, -0.05650244653224945, -0.03289652615785599, 0.080228790640831, -0.04810931161046028, -0.08031348884105682, 0.21359404921531677, 0.40247952938079834, 0.051799848675727844, 0.33564817905426025, -0.35279375314712524, 0.023413434624671936, 0.07212822139263153, 0.5051767826080322, 0.1688673049211502, -0.07111158221960068, -0.18140223622322083, 0.53073650598526, 0.004626629874110222, 0.1768060326576233, -0.14612610638141632, 0.015793802216649055, -0.13885492086410522, -0.16328829526901245, 0.062076035887002945, -0.14466248452663422, 0.025000549852848053, 0.01454934198409319, -0.31473028659820557, -0.23258811235427856, 0.23281048238277435, 0.3916999101638794, -0.3218214511871338, 0.10229571163654327, -0.00012662204972002655, 0.09168747067451477, 0.32362091541290283, -0.0525747612118721, -0.5068740248680115, -0.1439148187637329, -0.24283969402313232, 0.2124578058719635, 0.08862650394439697, -0.08425527811050415, 0.014213912189006805, 0.1669767051935196, 0.0755818635225296, -0.2540131211280823, 0.43416261672973633, 0.18890772759914398, 0.0676884725689888, 0.25160348415374756, -0.10561254620552063, -0.16833250224590302, 0.09175410866737366, 0.27842244505882263, -0.16007474064826965, -0.2253909558057785, 0.0716242641210556, 0.19849899411201477, -0.12514206767082214, -0.05156823247671127, 0.0503607839345932, 0.29737141728401184, 0.16478319466114044, 0.10861721634864807, -0.2195810228586197, -0.4536789655685425, -0.15570147335529327, 0.2766224443912506, 0.3414166569709778, -0.10047927498817444, -0.3400254249572754, -0.37591466307640076, -0.13907304406166077, -0.32587379217147827, 0.11658527702093124, 0.32287800312042236, -0.4405827224254608, 0.3727070689201355, -0.4605167508125305, -0.29811397194862366, -0.06966008245944977, 0.1265174150466919, 0.028557345271110535, 0.06772056221961975, -0.11778122931718826, 0.17295071482658386, 0.29396599531173706, 0.535600483417511, 0.12436150759458542, -0.09388329088687897, -0.0933016985654831, 0.1655222475528717, -0.14702489972114563, -0.0325591117143631, 0.0003603007644414902, -0.10778620839118958, 0.3572590947151184, 0.5140969157218933, -0.05886797979474068, 0.042139776051044464, 0.09455174207687378, 0.030094126239418983, 0.2819965183734894, 0.07621124386787415, 0.2504273056983948, 0.12528713047504425, 0.08655758202075958, 0.4625638723373413, -0.11741503328084946, -0.10855713486671448, 0.42963066697120667, -0.09668276458978653, -0.3463347554206848, 0.026674620807170868, 0.14869016408920288, -0.04472694545984268, -0.2138681709766388, -0.4724309742450714, -0.022497795522212982, -0.14670686423778534, 0.12441693246364594, 0.18712645769119263, 0.03409143537282944, 0.0409054160118103, -0.07572147995233536, 0.2988387644290924, -0.27702072262763977, -0.5942829251289368, -0.151870459318161, 0.04137914255261421, -0.08332568407058716, 0.3052689731121063, 0.2661074101924896, -0.3248450458049774, 0.19551081955432892, 0.13891857862472534, 0.2726849317550659, -0.26089972257614136, 0.013889379799365997, -0.02736787684261799, 0.1462283432483673, 0.514356791973114, 0.39290034770965576, 0.11821753531694412, -0.1814437359571457, -0.10000377893447876, -0.200483500957489, -0.08517058193683624, 0.02386653609573841, -0.47101667523384094, 0.38320720195770264, 0.030301924794912338, -0.31335628032684326, 0.3708677589893341, -0.01908700540661812, 0.1517644226551056, -0.0859684944152832, -0.22526535391807556, -0.12427570670843124, 0.2364959865808487, -0.6469408273696899, -0.06318358331918716, 0.3704860210418701, 0.5566918253898621, -0.2755141854286194, -0.047750502824783325, -0.5406444072723389, -0.29293322563171387, 0.1784054934978485, -0.07112273573875427, -0.10680621862411499, 0.5516358613967896, -0.36421552300453186, 0.205290749669075, 0.7288013100624084, 0.09732194244861603, -0.56223064661026, 0.4912705719470978, -0.3527756333351135, 0.0967036783695221, 0.06560520082712173, 0.08883698284626007, 0.4752016067504883, -0.04014180600643158, -0.2495817244052887, 0.471427321434021, -0.17842385172843933, -0.02588704228401184, -0.03971192240715027, -0.4780727028846741, -0.07863020896911621, -0.03330428525805473, 0.24119208753108978, 0.39424756169319153, 0.1823791265487671, 0.10707436501979828, 0.33744120597839355, 0.05865996330976486, 0.2283395379781723, -0.1497477889060974, 0.030288144946098328, 0.03278098627924919, -0.30455660820007324, -0.2905152440071106, -0.5538535118103027, 0.3479897081851959, -0.08584067225456238, -0.26294130086898804, 0.0268989410251379, -0.3102974593639374, -0.3102755546569824, -0.11726551502943039, -0.10671217739582062, -0.1907026618719101, -0.10010231286287308, -0.00954563170671463, 0.36409077048301697, 0.002638682723045349, -0.19143438339233398, 0.2454204261302948, 0.03723114728927612, 0.20986898243427277, -0.05083993077278137, -0.06482070684432983, 0.20214885473251343, -0.008644143119454384, 0.07129670679569244, -0.2812293469905853, 0.0939103215932846, -0.1395038515329361, -0.02885308302938938, 0.6204345226287842, 0.18832503259181976, 0.26753202080726624, -0.18285305798053741, -0.3185971975326538, 0.0519665852189064, 0.05518887937068939, -0.16267675161361694, 0.009011544287204742, 0.02408551052212715, -0.16204440593719482, -0.3339020311832428, 0.3597119450569153, -0.1604594886302948, 0.2905614674091339, 0.09724152088165283, 0.1180192306637764, 0.026311025023460388, -0.1551406979560852, -0.014785833656787872, -0.1871498078107834, 0.0514211468398571, -0.2810845375061035, 0.3696218729019165, -0.07558423280715942, -0.09959560632705688, 0.17479506134986877, 0.486895352602005, 0.001409977674484253, -0.0037373416125774384, 0.02706679329276085, 0.1409774124622345, -0.04630472511053085, 0.020388295873999596, 0.24929751455783844, 0.6582434773445129, 0.021723557263612747, 0.4224565625190735, 0.267782062292099, 0.1424209326505661, -0.2123120278120041, 0.21659725904464722, 0.1177201196551323, 0.04994390904903412, 0.20483383536338806, -0.05908050388097763, -0.39654654264450073, -0.301895409822464, 0.32279205322265625, 0.11314202100038528, -0.015348564833402634, -0.3103874921798706, -0.0028561949729919434, -0.30468904972076416, 0.1456487774848938, -0.12757688760757446, 0.17202140390872955, 0.03812665864825249, -0.32939857244491577, 0.12124629318714142, 0.25474342703819275, -0.10956643521785736, -0.09736178815364838, -0.06501998007297516, 0.44026100635528564, -0.2139987200498581, -0.18788056075572968, -0.09748595952987671, 0.16606533527374268, 0.03989386931061745, -0.058481499552726746, 0.12899848818778992, 0.3142322897911072, 0.4045185148715973, -0.08308778703212738, -0.268557071685791, -0.0860179215669632, 0.01999296247959137, 0.1624581515789032, 0.0935610979795456, 0.25401827692985535, 0.3534676432609558, 0.13808397948741913, 0.3842112421989441, -0.20630836486816406, 0.027376923710107803, -0.3832269608974457, -0.22604577243328094, -0.18125268816947937, 0.28072255849838257, 0.395183801651001, -0.38209259510040283, -0.5105983018875122, -0.02138248272240162, -0.2983144521713257, 0.487354040145874, -0.08897450566291809, 0.0326785147190094, -0.5672608613967896, -0.03621484339237213, -0.1987246572971344, -0.054157864302396774, -0.08883190155029297, -0.23534531891345978, -0.264451265335083, 0.1123766154050827, -0.25034835934638977, -0.11197559535503387, 0.028087466955184937, 0.007932990789413452, 0.1729043871164322, 0.3469565212726593, -0.29905104637145996, 0.19869108498096466, -0.1662185788154602, 0.03567489981651306, -0.09383818507194519, -0.025198515504598618, 0.24242690205574036, -0.2023693174123764, 0.11847991496324539, -0.07680366188287735, 0.17116214334964752, 0.23966558277606964, -0.2959187924861908, -0.018478691577911377, 0.09381207078695297, 0.3997931480407715, 0.23256218433380127, 0.9830508828163147, 0.21140354871749878, 0.2313833087682724, -0.15450114011764526, -0.23442111909389496, 0.11287219822406769, -0.33006393909454346, -0.1969476342201233, 0.02366272732615471, -0.1853017956018448, -0.2599300146102905, 0.21873915195465088, -0.10303229838609695, -0.10504511743783951, -0.28921443223953247, 0.25737497210502625, -0.27261388301849365, -0.4609561562538147, 0.0018025506287813187, 0.13336706161499023, 0.17417097091674805, 0.12296025454998016, 0.36053067445755005, 0.1853424608707428, 0.044975657016038895, 0.054441697895526886, 0.05937096104025841, 0.37040236592292786, -0.01197035238146782, -0.127367302775383, 0.20937402546405792, -0.3166733384132385, 0.1325700730085373, 0.14024636149406433, -0.027991322800517082, -0.09701775759458542, -0.03611748665571213, 0.28579118847846985, 0.09208360314369202, 0.717957079410553, -0.17163316905498505, 0.2550036907196045, 0.0661485344171524, -0.314240425825119, 0.059082746505737305, -0.012177541851997375, 0.0019388273358345032, 0.15556974709033966, 0.1049603596329689, -0.014149907976388931, -0.420143723487854, -0.15305137634277344, 0.2923181653022766, 0.20287048816680908, -0.16972942650318146, -0.18742308020591736, -0.16591909527778625, -0.22611159086227417, -0.23236575722694397, 0.20816965401172638, 0.08840306848287582, 0.11701777577400208, -0.24256807565689087, -0.01543918251991272, -0.20787017047405243, -0.015265464782714844, -0.006533611565828323, -0.04057680070400238, 0.028262417763471603, -0.09898565709590912, 0.29022109508514404, 0.48300793766975403, -0.28149929642677307, -0.35320374369621277, 0.5289472341537476, -0.039546847343444824, -0.18614044785499573, -0.017373912036418915, -0.210292249917984, 0.19001922011375427, 0.6230216026306152, -0.16467632353305817, 0.08314023911952972, -0.04579874128103256, 0.03651648387312889, -0.4575749933719635, 0.25271281599998474, 0.05434492230415344, -0.4055560231208801, -0.029584471136331558, -0.48091214895248413, 0.4738204777240753, 0.09855805337429047, -0.16137443482875824, 0.4295576810836792, 0.10845072567462921, -0.10069139301776886, -0.1075345128774643, -0.02661757543683052, 0.8483572006225586, -0.04902300983667374, -0.08128218352794647, 0.18386715650558472, -0.21065998077392578, 0.35655564069747925, -0.5507087707519531, 0.3005322813987732, -0.3149951100349426, -0.41505753993988037, -0.1281103491783142, -0.23783813416957855, 0.07524216175079346, 0.24425601959228516, -0.08087348937988281, 0.2892917990684509, -0.17020481824874878, 0.30659401416778564, 0.08387055993080139, 0.27983328700065613, -0.3056866228580475, -0.2015664428472519, 0.14650873839855194, 0.004408292472362518, 0.014022890478372574, 0.4732469916343689, 0.004478566348552704, -0.06460454314947128, 0.2262723743915558, -0.11212046444416046, -0.23463493585586548, 0.19848978519439697, -0.22006899118423462, 0.04404855892062187, -0.4160768985748291, -0.050432316958904266, 0.3495274782180786, 0.14434930682182312, -0.03359728306531906, 0.21663299202919006, 0.01196339912712574, 0.25237488746643066, -0.2294766753911972, 0.21091488003730774, 0.046585813164711, -0.02288714423775673, -0.05764949321746826, 0.05735158175230026, -0.06237068772315979, -0.007308529689908028, -0.15035925805568695, -0.22525647282600403, 0.01783841848373413, 0.021420110017061234, 0.13027676939964294, -0.45787546038627625, -0.026292424649000168, 0.06170790642499924, 0.30896061658859253, -0.23431655764579773, -0.07812903076410294, -0.13745036721229553, -0.3496251404285431, 0.08384083211421967, -0.21147188544273376, -0.35055553913116455, -0.035740435123443604, 0.4095253348350525, -0.08063384145498276, 0.15203005075454712, 0.12384334206581116, -0.015026658773422241, -0.18228811025619507, -0.26135092973709106, -0.051322706043720245, -0.2343890368938446, -0.5241354703903198, 0.35863763093948364, -0.45744261145591736, 0.11960312724113464, -0.2165260761976242, 0.2858659327030182, -0.13106247782707214, -0.01630149781703949, -0.2379433661699295, -0.24430398643016815, 0.05613957345485687, -0.0923328846693039, 0.011934377253055573, 0.32840394973754883, 0.18706867098808289, 0.17416520416736603, 0.006838873028755188, 0.45798972249031067, -0.13971832394599915, -0.021947288885712624, 0.16103723645210266, 0.049767520278692245, -0.0266610998660326, 0.16800181567668915, 0.2791208028793335, -0.10069367289543152, -0.11240360140800476, 0.17159238457679749, -0.2450302243232727, -0.0008916035294532776, -0.1429816633462906, 0.23442938923835754, -0.22214984893798828, 0.25410211086273193, 0.14753997325897217, -0.0389191210269928, -0.1900635063648224, -0.13737377524375916, 0.3859921991825104, -0.13859276473522186, 0.0788576751947403, -0.09015634655952454, 0.34846633672714233, 0.14361998438835144, -0.6281142234802246, 0.30788654088974, -0.10547065734863281, 0.30660149455070496, -0.21247175335884094, 0.26641929149627686, -0.022019220516085625, -0.06155383214354515, 0.14898155629634857, -0.06392727792263031, 0.3839380741119385, 0.19236566126346588, 0.3155519962310791, 0.11324048042297363, 0.07986314594745636, -0.3223510682582855, 0.5024343729019165, 0.5932378172874451, 0.15203973650932312, 0.13669611513614655, -0.09338776767253876, -0.005689391866326332, -0.012351687997579575, -0.12450581789016724, 0.22476747632026672, 0.08231624960899353, 0.1128486692905426, 0.4063973128795624, 0.048743247985839844, 0.16145265102386475, 0.009354377165436745, 0.10712966322898865, 0.29470178484916687, 0.02724575251340866, 0.20416079461574554, 0.7687294483184814, -0.10398179292678833, 0.2774532735347748, 0.13763269782066345, -0.04806400462985039, 0.10478362441062927, 0.2679829001426697, -0.22156739234924316, 0.3987969756126404, -0.26444903016090393, 0.19344283640384674, 0.15648043155670166, -0.28714698553085327, -0.14323711395263672, 0.1459556370973587, -0.16586428880691528, 0.12517423927783966, -0.11410355567932129, 0.35685646533966064, -0.32948562502861023, -0.20522348582744598, -0.3246616721153259, 0.273410439491272, 0.15639673173427582, -0.049363359808921814, -0.1216902881860733, -0.23355776071548462, -0.324626088142395, 0.4198441803455353, 0.1918388307094574, -0.2093343734741211, 0.43922191858291626, 0.041726820170879364, 0.19050922989845276, 0.14815711975097656, -0.08434098958969116, -0.09694527089595795, 0.19104309380054474, -0.39883649349212646, -0.1669527143239975, -0.08613646030426025, 0.22950395941734314, 0.18279150128364563, 0.06782249361276627, -0.060179099440574646, -0.08235439658164978, -0.2008804827928543, -0.2690820097923279, 0.13202181458473206, 0.05281830579042435, -0.2591713070869446, 0.09706057608127594, -0.11541780829429626, 0.12569381296634674, 0.4013766646385193, 0.03033924102783203, -0.03953244537115097, 0.02172316610813141, 0.22650472819805145, 0.13860225677490234, -0.47821998596191406, 0.5978735685348511, 0.08206768333911896, 0.06604306399822235, -0.09126848727464676, 0.002313777804374695, -0.04051606357097626, -0.04732932150363922, -0.12586313486099243, -0.36656540632247925, 0.14184057712554932, 0.06422504782676697, -0.007136210799217224, 0.17997322976589203, 0.4093819856643677, -0.031548548489809036, 0.036551930010318756, -0.3024044930934906, -0.3571844696998596, -0.41821977496147156, -0.1335732787847519, -0.05892808362841606, -0.03574755787849426, 0.1153225228190422, 0.3940303325653076, -0.09933400899171829, 0.4434000849723816, -0.02359427511692047, -0.028006235137581825, 0.019565008580684662, 0.42479950189590454, 0.12061108648777008, -0.1394660770893097, -0.2914632558822632, -0.207596555352211, -0.09191872179508209, -0.44298070669174194, 0.23657864332199097, -0.11727771162986755, -0.11291390657424927, 0.3643013536930084, 0.017162591218948364, 0.3913879990577698, -0.3887242078781128, 0.22824954986572266, 0.09976225346326828, 0.2724936604499817, -0.157199427485466, 0.08985425531864166, -0.19464397430419922, 0.1985829919576645, -0.2870613634586334, 0.010489686392247677, -0.14539936184883118, 0.1178288459777832, -0.17316724359989166, 0.3271232545375824, -0.5083286762237549, 0.1925569772720337, 0.28181323409080505, 0.41401103138923645, -0.3466061055660248, -0.02719617262482643, -0.4259800612926483, 0.46519774198532104, 0.5619802474975586, 0.3547736406326294, -0.4275852143764496, -0.18529610335826874, -0.18135704100131989, -0.14483848214149475, 0.4813306927680969, -0.041840165853500366, -0.2352740466594696, -0.16189396381378174, 0.2937203049659729, 0.47290223836898804, -0.18975858390331268, -0.2586419880390167, -0.28529059886932373, 0.20876897871494293, -0.39297065138816833, 0.20102280378341675, 0.39730483293533325, 0.11305144429206848, -0.1775561273097992, -0.0791466161608696, 0.23305995762348175, 0.22234943509101868, -0.21790114045143127, 0.01343660056591034, -0.36459559202194214 ]
https://github.com/huggingface/datasets/issues/6524
Hello @FelixLabelle, As you can see in the Community tab of the corresponding dataset, it is a known issue: https://huggingface.co/datasets/EleutherAI/pile/discussions/15 The data has been taken down due to reported copyright infringement. Feel free to continue the discussion there.
Streaming the Pile: Missing Files
### Describe the bug The pile does not stream, a "File not Found error" is returned. It looks like the Pile's files have been moved. ### Steps to reproduce the bug To reproduce run the following code: ``` from datasets import load_dataset dataset = load_dataset('EleutherAI/pile', 'en', split='train', streaming=True) next(iter(dataset)) ``` I get the following error: `FileNotFoundError: https://the-eye.eu/public/AI/pile/train/00.jsonl.zst` ### Expected behavior Return the data in a stream. ### Environment info - `datasets` version: 2.12.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.11.5 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.3
38
Streaming the Pile: Missing Files ### Describe the bug The pile does not stream, a "File not Found error" is returned. It looks like the Pile's files have been moved. ### Steps to reproduce the bug To reproduce run the following code: ``` from datasets import load_dataset dataset = load_dataset('EleutherAI/pile', 'en', split='train', streaming=True) next(iter(dataset)) ``` I get the following error: `FileNotFoundError: https://the-eye.eu/public/AI/pile/train/00.jsonl.zst` ### Expected behavior Return the data in a stream. ### Environment info - `datasets` version: 2.12.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.11.5 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.3 Hello @FelixLabelle, As you can see in the Community tab of the corresponding dataset, it is a known issue: https://huggingface.co/datasets/EleutherAI/pile/discussions/15 The data has been taken down due to reported copyright infringement. Feel free to continue the discussion there.
[ -0.010011270642280579, -0.0032875090837478638, 0.022553563117980957, 0.16257640719413757, 0.1053948923945427, 0.04117190092802048, 0.24604432284832, 0.34792575240135193, 0.0357474759221077, 0.07959195971488953, 0.07477795332670212, 0.17447461187839508, -0.15698198974132538, 0.047470130026340485, 0.13717269897460938, -0.040336742997169495, 0.13708895444869995, 0.1185426414012909, -0.05314774066209793, -0.26345521211624146, 0.07103833556175232, -0.04448658227920532, -0.2317570447921753, -0.21143478155136108, -0.05936139076948166, 0.12272898852825165, -0.43857377767562866, 0.18385259807109833, -0.1142115518450737, 0.10816682130098343, 0.14071059226989746, -0.13157638907432556, 0.2408018559217453, 0.6721791625022888, -0.00011332632857374847, 0.03656086325645447, 0.1343902349472046, -0.18899518251419067, -0.3146527111530304, -0.512575626373291, 0.02230772376060486, -0.35215485095977783, -0.1270582377910614, -0.014378398656845093, -0.11459697782993317, -0.34768810868263245, 0.25554317235946655, -0.09489042311906815, 0.3086976110935211, 0.44746971130371094, 0.12258210778236389, 0.4265832304954529, 0.1350102573633194, 0.03374236449599266, 0.17085766792297363, -0.10793215036392212, -0.05749228224158287, 0.37623926997184753, 0.06217464059591293, 0.0518774539232254, -0.16253197193145752, 0.3671293258666992, 0.07919809222221375, -0.21741698682308197, 0.16291064023971558, 0.13225308060646057, -0.17845074832439423, -0.20707787573337555, -0.2693817615509033, 0.11182481050491333, 0.24450331926345825, -0.21067896485328674, -0.5167708396911621, -0.25625771284103394, 0.06262415647506714, -0.22756880521774292, 0.062357451766729355, 0.4124952256679535, -0.09918561577796936, 0.16573181748390198, 0.2779535949230194, -0.04114048182964325, -0.24536684155464172, 0.1725141853094101, 0.07527720183134079, -0.06999999284744263, -0.03126613423228264, -0.18554675579071045, -0.14632165431976318, 0.21437419950962067, 0.2123645693063736, -0.08111763745546341, 0.01871109940111637, 0.2881142199039459, -0.38007789850234985, -0.08532768487930298, 0.29155653715133667, 0.0405706949532032, -0.21175406873226166, 0.12095656991004944, 0.4192555844783783, -0.13330663740634918, -0.11118120700120926, 0.1516382098197937, 0.5258635878562927, 0.09918493032455444, -0.26835888624191284, -0.2687913179397583, 0.2921943664550781, 0.48439186811447144, -0.03363434970378876, -0.5080315470695496, -0.02693118155002594, -0.005636189132928848, 0.03208567202091217, -0.11978667229413986, 0.372994601726532, -0.022209197282791138, -0.10298629850149155, -0.10051356256008148, -0.3370932936668396, -0.11000308394432068, 0.12200573831796646, 0.0775727778673172, -0.1978168934583664, 0.4317688047885895, -0.036867689341306686, 0.33167049288749695, 0.016589634120464325, -0.12881894409656525, -0.33569514751434326, 0.15540039539337158, -0.16654440760612488, -0.0890994444489479, 0.14775609970092773, -0.4577883183956146, 0.29854631423950195, 0.03312324360013008, 0.21394425630569458, 0.11981262266635895, 0.0084882453083992, -0.11484691500663757, 0.18334811925888062, 0.38671329617500305, 0.16125576198101044, -0.01955587789416313, 0.1036038026213646, 0.11502739787101746, -0.146781325340271, 0.21139509975910187, -0.15551051497459412, -0.3841544985771179, -0.07283157855272293, 0.13815999031066895, -0.36062854528427124, -0.008950105868279934, -0.36439111828804016, -0.06577356159687042, -0.3280486762523651, -0.2876134216785431, 0.12275929749011993, -0.13748249411582947, 0.3392102122306824, -0.21829000115394592, 0.3506719470024109, 0.31484198570251465, -0.17364390194416046, -0.235096275806427, -0.34502550959587097, 0.13723495602607727, 0.3320850729942322, 0.2071799784898758, 0.001387316733598709, 0.04422754421830177, -0.37316492199897766, 0.23787376284599304, 0.4824581742286682, -0.21409273147583008, -0.47490185499191284, 0.12755915522575378, -0.17809760570526123, 0.3810640275478363, 0.27079471945762634, 0.18648718297481537, 0.043766509741544724, -0.24685737490653992, 0.015736298635601997, 0.17040123045444489, -0.07217436283826828, -0.05898944288492203, -0.1900390088558197, -0.08571969717741013, -0.0481821671128273, 0.26134416460990906, 0.1200852245092392, 0.09505322575569153, 0.18553270399570465, -0.006329979747533798, 0.272996187210083, 0.1322590559720993, 0.10740926116704941, 0.06010948494076729, 0.6114181876182556, 0.17929714918136597, 0.01156800240278244, -0.06174482777714729, -0.37636202573776245, 0.08688932657241821, 0.0038769468665122986, -0.03991176560521126, -0.04958825558423996, 0.05753905326128006, 0.029651004821062088, -0.054422054439783096, -0.11561186611652374, -0.3008108139038086, 0.11618220061063766, 0.10998133569955826, -0.03735531494021416, 0.16478726267814636, -0.5341475009918213, 0.2667209208011627, -0.27124956250190735, 0.10088606178760529, -0.5077944397926331, 0.7092068791389465, -0.11423057317733765, -0.27753689885139465, 0.053939566016197205, 0.04914451763033867, -0.07471069693565369, 0.0061780959367752075, -0.002489851787686348, 0.26337456703186035, -0.4283948838710785, 0.19044052064418793, 0.26971665024757385, 0.3306979537010193, 0.5082700848579407, -0.2924730181694031, 0.1695614904165268, 0.3551826775074005, 0.12791506946086884, 0.00035278499126434326, -0.21244435012340546, 0.031007960438728333, -0.0943184420466423, 0.14932985603809357, 0.2862001657485962, -0.11720660328865051, 0.19094625115394592, 0.020538173615932465, -0.16575688123703003, 0.19536647200584412, 0.27629023790359497, -0.1929945945739746, 0.06762199103832245, 0.08762774616479874, -0.3353162109851837, 0.18053923547267914, 0.6572651863098145, 0.03701654076576233, -0.09363029897212982, 0.42860570549964905, -0.3730385899543762, -0.11550988256931305, 0.16685961186885834, -0.13755780458450317, 0.4717029333114624, 0.19324757158756256, 0.17525950074195862, -0.027493268251419067, 0.17853635549545288, -0.2459106594324112, 0.0010423436760902405, 0.09084750711917877, -0.09943325817584991, 0.31837332248687744, 0.18523140251636505, 0.14079904556274414, -0.3246679902076721, -0.29368212819099426, -0.24378517270088196, 0.05543673038482666, -0.10792306065559387, -0.0882672369480133, -0.11295413225889206, -0.3285592198371887, -0.1602344512939453, -0.2720452845096588, -0.2155076265335083, -0.3103678822517395, 0.018431104719638824, 0.5851943492889404, -0.1636059582233429, -0.13008297979831696, -0.0976395383477211, 0.07924430072307587, 0.07241120934486389, 0.10090183466672897, -0.6300554871559143, 0.01870075613260269, -0.14730212092399597, 0.0912901759147644, 0.002274744212627411, 0.11177761852741241, 0.07951054722070694, -0.1337275207042694, 0.06937877833843231, -0.40342849493026733, -0.23549647629261017, -0.043661437928676605, -0.046270083636045456, 0.32808664441108704, -0.027845975011587143, 0.5890783071517944, 0.025116026401519775, -0.2024173140525818, 0.1651623696088791, -0.502531111240387, -0.1606171876192093, 0.30836719274520874, 0.0737791359424591, 0.16533750295639038, -0.11562621593475342, -0.3257451057434082, -0.2897331714630127, -0.4788295328617096, 0.3311779499053955, -0.024144679307937622, -0.07641188055276871, 0.04790522903203964, 0.2597760856151581, 0.12053821980953217, 0.06948378682136536, -0.11772666126489639, 0.14090675115585327, -0.6602532863616943, 0.528745174407959, -0.04066850617527962, -0.3833228349685669, 0.17801600694656372, 0.127864271402359, -0.17542558908462524, -0.033317506313323975, -0.43604379892349243, -0.26201528310775757, -0.16473959386348724, 0.014861799776554108, 0.009715414606034756, 0.10906954109668732, 0.3879300355911255, -0.18005675077438354, -0.09889189898967743, -0.13173505663871765, -0.023495465517044067, 0.01914682425558567, 0.6284859776496887, 0.3985041379928589, -0.08746179938316345, 0.4288097620010376, 0.33451932668685913, 0.5393120050430298, 0.14771367609500885, 0.031875431537628174, 0.5506271719932556, 0.09152142703533173, 0.5690036416053772, -0.153474360704422, -0.3350476622581482, 0.27288326621055603, -0.24415560066699982, -0.20813781023025513, 0.3513345420360565, 0.2077815681695938, 0.11322043091058731, -0.2673583924770355, -0.1896967887878418, -0.27131956815719604, -0.1081390455365181, 0.1689651608467102, 0.15468944609165192, -0.11829055100679398, 0.10331405699253082, -0.09762519598007202, 0.057428255677223206, -0.34234583377838135, 0.1556057631969452, 0.47606411576271057, 0.4346597194671631, 0.2556013762950897, -0.0413525365293026, -0.205130934715271, -0.4795304536819458, -0.04115128517150879, -0.048317693173885345, 0.031773339956998825, -0.0059983134269714355, -0.2797009348869324, 0.061550822108983994, 0.13536401093006134, 0.5478136539459229, 0.04070840775966644, -0.06127411872148514, -0.04111665114760399, 0.18986134231090546, 0.0019571110606193542, -0.20299141108989716, -0.2597566246986389, -0.057844989001750946, 0.5163770318031311, 0.3777317404747009, -0.15480215847492218, 0.1130758747458458, 0.03127738833427429, 0.09330114722251892, 0.0900793969631195, -0.22970794141292572, -0.4242498576641083, -0.24249014258384705, -0.14515811204910278, 0.06331522762775421, 0.20961666107177734, -0.03985227271914482, -0.3398853540420532, -0.1193888932466507, 0.18309639394283295, -0.09477685391902924, 0.09664466977119446, -0.1131192147731781, 0.2442946434020996, 0.03133850544691086, 0.09368458390235901, 0.24567875266075134, 0.39035874605178833, 0.40574827790260315, 0.4950815737247467, 0.35203948616981506, -0.5315309762954712, 0.09171876311302185, -0.33167219161987305, 0.273861825466156, 0.30601629614830017, 0.01630008965730667, -0.12276986241340637, 0.25409644842147827, 0.30470162630081177, -0.0512080080807209, 0.15141147375106812, 0.2927929759025574, -0.08902835845947266, -0.19879980385303497, -0.27169880270957947, 0.19123058021068573, -0.1439744532108307, 0.2351692020893097, 0.5243913531303406, -0.007701028138399124, -0.06570697575807571, 0.19176582992076874, -0.17914007604122162, 0.9852910041809082, 0.20217561721801758, 0.23860275745391846, 0.2870942950248718, -0.21944037079811096, 0.25254547595977783, -0.3718206584453583, 0.23606142401695251, -0.09053230285644531, -0.6551408171653748, -0.08521296083927155, -0.12377049773931503, 0.0864827036857605, 0.1808156669139862, -0.14778777956962585, 0.5042139291763306, -0.001657918095588684, 0.42729607224464417, 0.10258035361766815, -0.08174486458301544, -0.16560600697994232, -0.06914027035236359, -0.5009551644325256, 0.08196456730365753, 0.030520832166075706, 0.48839709162712097, -0.03714882209897041, -0.3576556444168091, -0.09623630344867706, 0.010546840727329254, -0.09162120521068573, 0.3564550280570984, 0.1068848967552185, -0.14695706963539124, -0.17002879083156586, -0.30515363812446594, -0.32240384817123413, 0.2819576859474182, 0.028109177947044373, -0.2586889863014221, -0.08396662771701813, 0.25115683674812317, 0.15931828320026398, 0.032287657260894775, 0.2797562777996063, 0.12687009572982788, 0.42075780034065247, -0.12443463504314423, -0.15657071769237518, 0.262302428483963, -0.23784375190734863, -0.35997456312179565, -0.054457902908325195, 0.03722015768289566, 0.03219674155116081, 0.06446853280067444, -0.09405595809221268, 0.02127668634057045, -0.05870755761861801, -0.2418302744626999, 0.13162384927272797, 0.12920154631137848, -0.04281362518668175, -0.14287884533405304, -0.2611258625984192, -0.0717671662569046, -0.32677769660949707, 0.4370342493057251, -0.1245569959282875, -0.05109959840774536, 0.3680558502674103, 0.2261444628238678, -0.17721135914325714, -0.04452390968799591, -0.13041344285011292, 0.1442352831363678, -0.3880934417247772, 0.20209787786006927, -0.07909898459911346, 0.23508025705814362, -0.14222773909568787, 0.03676214814186096, 0.13804541528224945, -0.2150791585445404, -0.2629387378692627, -0.47398537397384644, -0.1421571969985962, 0.18404212594032288, 0.20250330865383148, -0.04580412805080414, -0.15502217411994934, -0.04243346303701401, 0.42477351427078247, -0.3166733980178833, -0.3004860281944275, 0.0013075731694698334, -0.22571414709091187, 0.017186444252729416, -0.06440876424312592, 0.1258704960346222, 0.44171464443206787, -0.17706052958965302, 0.14328110218048096, -0.0912303477525711, 0.057852402329444885, -0.1626475304365158, -0.09321777522563934, 0.07845055311918259, 0.2287762314081192, 0.19947583973407745, -0.1396423727273941, -0.15015295147895813, -0.1280919313430786, -0.13175785541534424, -0.10352350771427155, 0.016201496124267578, 0.12142540514469147, 0.028384804725646973, 0.4018857479095459, 0.06000587344169617, -0.11435125768184662, -0.012818634510040283, 0.01598256826400757, 0.15167555212974548, 0.004005886614322662, -0.11059438437223434, 0.09666070342063904, 0.08610423654317856, -0.09407408535480499, -0.25302886962890625, -0.03618011251091957, 0.3205645680427551, 0.4333653450012207, -0.12285193800926208, 0.008797071874141693, -0.1155865341424942, 0.34134575724601746, 0.3259177803993225, -0.06306548416614532, 0.05955272912979126, 0.21037399768829346, 0.21868307888507843, -0.466320276260376, 0.14699812233448029, 0.2578119933605194, 0.1689993292093277, -0.12291888892650604, -0.1900126039981842, -0.10589463263750076, -0.04921216517686844, 0.054322682321071625, 0.2690245509147644, 0.1591603010892868, -0.16086716949939728, 0.13547737896442413, 0.2929646968841553, 0.11003832519054413, 0.24733878672122955, -0.058840394020080566, -0.008897542953491211, 0.0073544904589653015, 0.2599446475505829, -0.017782457172870636, 0.09346979856491089, -0.016558118164539337, -0.03826216235756874, -0.2584380507469177, -0.4033327102661133, -0.630102813243866, 0.313167542219162, -0.023820672184228897, 0.2886819541454315, -0.0799054354429245, 0.30940231680870056, 0.054074693471193314, 0.013622429221868515, -0.16669926047325134, -0.0922314003109932, 0.018660178408026695, 0.3461199104785919, 0.1032906025648117, -0.0842624306678772, 0.026664048433303833, 0.10321559011936188, 0.4120670557022095, 0.07437564432621002, -0.06867013871669769, 0.22273162007331848, -0.06247396022081375, -0.238663449883461, -0.34020453691482544, 0.1164265125989914, 0.21288198232650757, -0.14290878176689148, 0.06778324395418167, 0.38272106647491455, -0.24776068329811096, 0.16041184961795807, 0.11334308236837387, 0.25398263335227966, 0.14665427803993225, 0.2641838490962982, 0.35870105028152466, 0.20672109723091125, -0.24385172128677368, -0.12312017381191254, 0.2590942084789276, 0.13816887140274048, 0.07007662951946259, -0.03039846383035183, 0.21863141655921936, -0.23612140119075775, 0.3318161964416504, -0.25879013538360596, 0.28192463517189026, -0.38990429043769836, 0.5134842991828918, -0.2307741492986679, -0.16373565793037415, -0.1934453248977661, -0.3037903904914856, -0.5236949324607849, 0.0216488279402256, 0.013297520577907562, -0.114531509578228, -0.18432262539863586, -0.060401804745197296, 0.07918817549943924, -0.09018214046955109, 0.06027986854314804, 0.7335795164108276, -0.13271301984786987, -0.09577658772468567, -0.26433461904525757, -0.6546863913536072, 0.13818193972110748, 0.10578911751508713, 0.26828092336654663, -0.07218313962221146, 0.309149831533432, -0.09462084621191025, -0.15794546902179718, 0.11247119307518005, -0.21210576593875885, -0.015957996249198914, 0.2867911458015442, -0.399910569190979, -0.2663273215293884, -0.31164970993995667, 0.4753901958465576, -0.046251263469457626, 0.03211360424757004, 0.08452586829662323, -0.2372245490550995, 0.06965930759906769, 0.14208602905273438, -0.12098860740661621, -0.1351076364517212, -0.09400412440299988, 0.40381577610969543, -0.13372759521007538, -0.15778525173664093, -0.07519172132015228, -0.30783843994140625, -0.24284270405769348, -0.12933999300003052, -0.20612353086471558, 0.030815940350294113, -0.22963503003120422, 0.4681127071380615, -0.18161287903785706, 0.04857407510280609, -0.2733112871646881, 0.12547451257705688, 0.12578588724136353, -0.39496350288391113, -0.38493812084198, 0.08794685453176498, -0.075182244181633, 0.2848375737667084, 0.1597757637500763, 0.1140730082988739, -0.19881343841552734, -0.32922840118408203, -0.2836697995662689, -0.2425064742565155, 0.5499694347381592, -0.6593598127365112, -0.10038941353559494, -0.06856226921081543, 0.04289748892188072, -0.026632074266672134, 0.015603093430399895, -0.33464521169662476, 0.1348731964826584, 0.22894030809402466, 0.11301641166210175, -0.073699951171875, 0.009373009204864502, -0.10492624342441559, 0.24709080159664154, 0.023276351392269135, -0.11922339349985123, 0.17841045558452606, -0.23299013078212738, 0.4050993323326111, -0.136883944272995 ]
https://github.com/huggingface/datasets/issues/6521
After investigation, I think the issue was introduced by the use of the Parquet export: - #6448 I am proposing a fix. CC: @lhoestq
The order of the splits is not preserved
We had a regression and the order of the splits is not preserved. They are alphabetically sorted, instead of preserving original "train", "validation", "test" order. Check: In branch "main" ```python In [9]: dataset = load_dataset("adversarial_qa", '"adversarialQA") In [10]: dataset Out[10]: DatasetDict({ test: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) train: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 30000 }) validation: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) }) ``` Before (2.15.0) it was: ```python DatasetDict({ train: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 30000 }) validation: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) test: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) }) ``` See issues: - https://huggingface.co/datasets/adversarial_qa/discussions/3 - https://huggingface.co/datasets/beans/discussions/4 This is a regression because it was previously fixed. See: - #6196 - #5728
24
The order of the splits is not preserved We had a regression and the order of the splits is not preserved. They are alphabetically sorted, instead of preserving original "train", "validation", "test" order. Check: In branch "main" ```python In [9]: dataset = load_dataset("adversarial_qa", '"adversarialQA") In [10]: dataset Out[10]: DatasetDict({ test: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) train: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 30000 }) validation: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) }) ``` Before (2.15.0) it was: ```python DatasetDict({ train: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 30000 }) validation: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) test: Dataset({ features: ['id', 'title', 'context', 'question', 'answers', 'metadata'], num_rows: 3000 }) }) ``` See issues: - https://huggingface.co/datasets/adversarial_qa/discussions/3 - https://huggingface.co/datasets/beans/discussions/4 This is a regression because it was previously fixed. See: - #6196 - #5728 After investigation, I think the issue was introduced by the use of the Parquet export: - #6448 I am proposing a fix. CC: @lhoestq
[ 0.06278710812330246, -0.09385667741298676, -0.06140150874853134, 0.17789337038993835, 0.11431249976158142, -0.1434212028980255, 0.1864895522594452, 0.014443803578615189, 0.056878626346588135, 0.07198087126016617, 0.036952368915081024, 0.29690518975257874, 0.035352230072021484, 0.1410665214061737, 0.17228184640407562, -0.2979609966278076, 0.06859852373600006, 0.05785004049539566, -0.32958149909973145, -0.06079069525003433, -0.16247883439064026, 0.2617514431476593, -0.24527360498905182, -0.06881599128246307, -0.21492309868335724, -0.11927082389593124, -0.2607487440109253, 0.10256943851709366, -0.09427657723426819, -0.04822864010930061, -0.11570897698402405, 0.010368327610194683, -0.19448751211166382, 0.11650225520133972, -0.00011469960736576468, -0.227150559425354, -0.03550165146589279, -0.10264946520328522, -0.15805037319660187, -0.26769450306892395, -0.14383745193481445, -0.19049546122550964, -0.05139803886413574, -0.1491512805223465, -0.06873099505901337, 0.03144650533795357, -0.2054986208677292, -0.09135520458221436, 0.6052523255348206, 0.10516391694545746, 0.2034532129764557, 0.02196963131427765, 0.028735458850860596, -0.07941901683807373, 0.3828509449958801, 0.2900387942790985, -0.2045677900314331, 0.037824928760528564, -0.22425168752670288, 0.142990380525589, 0.11882327497005463, 0.13017615675926208, 0.18461671471595764, -0.2848874032497406, -0.10604289174079895, -0.0002801269292831421, 0.06811089813709259, -0.09186586737632751, -0.3293362557888031, 0.09892585128545761, 0.09315000474452972, -0.13987140357494354, -0.4364955425262451, -0.08911560475826263, -0.007833022624254227, -0.5642658472061157, -0.05317136272788048, 0.287300705909729, 0.4201507270336151, 0.10235361754894257, 0.21518215537071228, -0.1517588496208191, -0.12684179842472076, -0.0035578887909650803, -0.3515782952308655, 0.5386679768562317, -0.05519050359725952, -0.21854284405708313, 0.04737202450633049, -0.18471816182136536, -0.04971516132354736, -0.0003101751208305359, 0.005543656647205353, 0.04019797965884209, -0.19548773765563965, -0.14059631526470184, -0.16527590155601501, 0.13755062222480774, 0.08539588749408722, 0.30687981843948364, -0.21685892343521118, -0.007812920026481152, 0.21823017299175262, -0.2783290147781372, 0.21770957112312317, 0.3883908987045288, -0.042024604976177216, 0.4087393581867218, 0.11531949788331985, 0.575161874294281, -0.13032492995262146, -0.014493306167423725, 0.11612419784069061, -0.11105374991893768, -0.10618963092565536, 0.21318835020065308, 0.18174344301223755, -0.1557592749595642, -0.06579135358333588, 0.02896575629711151, -0.21164634823799133, -0.16175107657909393, -0.0846744030714035, 0.27336129546165466, -0.002992011606693268, -0.03491131216287613, -0.1894412636756897, 0.173460453748703, -0.12215694040060043, -0.035611070692539215, -0.34414738416671753, -0.2506294250488281, -0.12091680616140366, 0.11768262833356857, -0.11191681772470474, -0.07673553377389908, 0.20041918754577637, 0.2792524993419647, 0.08820407837629318, -0.08015897125005722, -0.19160348176956177, -0.20340198278427124, 0.32338184118270874, 0.3244282901287079, -0.10915851593017578, 0.23032626509666443, 0.05280220881104469, -0.13152769207954407, -0.20322471857070923, -0.0045847781002521515, -0.34421372413635254, -0.2376624345779419, 0.24658933281898499, 0.22265133261680603, -0.10981932282447815, 0.011334925889968872, -0.24818503856658936, 0.06557510793209076, 0.19733627140522003, 0.11961949616670609, -0.04020692780613899, -0.1964120864868164, -0.14581871032714844, -0.0678306370973587, 0.05815065652132034, 0.1016184464097023, -0.34681016206741333, 0.029473111033439636, 0.08783847093582153, 0.07425568997859955, 0.25934991240501404, 0.3996523320674896, 0.1164809912443161, -0.08699660748243332, -0.0911954790353775, 0.26269257068634033, 0.16799622774124146, 0.025015927851200104, -0.36813315749168396, 0.03705351799726486, -0.1256844401359558, 0.1348746418952942, 0.07368767261505127, -0.3070162832736969, 0.571234941482544, -0.31407326459884644, -0.3298811912536621, 0.4047457277774811, 0.12565797567367554, 0.09064793586730957, -0.2765944302082062, -0.06412860006093979, 0.4291270077228546, -0.10345849394798279, -0.006000818684697151, -0.2286389023065567, -0.13227003812789917, 0.2547638416290283, 0.4295075237751007, 0.06755957007408142, -0.14225438237190247, 0.11975384503602982, 0.38666200637817383, 0.07392329722642899, 0.4045720398426056, -0.3454669117927551, -0.06983537971973419, -0.0462309755384922, -0.06516602635383606, -0.29730042815208435, -0.039190370589494705, -0.23147037625312805, -0.3300244212150574, -0.0736563503742218, -0.22675131261348724, -0.10663235187530518, 0.1724327802658081, -0.00439814105629921, -0.14782044291496277, 0.1595471054315567, -0.08140762150287628, 0.2791401743888855, -0.23190093040466309, 0.21535439789295197, -0.35342246294021606, 0.5349841713905334, -0.23056544363498688, -0.16799980401992798, -0.02957892417907715, 0.42158663272857666, 0.1233740821480751, -0.2553841173648834, -0.043532080948352814, 0.4768247604370117, 0.4797757863998413, -0.171119824051857, -0.22316354513168335, -0.15086373686790466, 0.22996851801872253, -0.09934333711862564, -0.14626048505306244, 0.355817049741745, -0.2797812521457672, 0.12202122807502747, -0.2640254497528076, 0.4424675703048706, -0.31414663791656494, 0.3865908980369568, 0.2641943097114563, 0.061828404664993286, -0.13987639546394348, -0.0010258778929710388, -0.21308165788650513, -0.477262020111084, 0.10772459954023361, -0.12086441367864609, -0.19297127425670624, -0.0017443345859646797, -0.1335638165473938, 0.33558446168899536, 0.8212557435035706, 0.01919616013765335, 0.030144408345222473, -0.19471868872642517, 0.06478340923786163, -0.03665811941027641, -0.010670233517885208, 0.2596213221549988, 0.3057297468185425, 0.14424587786197662, 0.0023671314120292664, -0.07325801998376846, 0.08012153208255768, -0.20123445987701416, 0.2344234138727188, -0.001306481659412384, 0.0552140437066555, 0.3853858411312103, 0.1825428307056427, -0.00030714087188243866, -0.3433797359466553, 0.4038912057876587, -0.05537238344550133, -0.000860854983329773, -0.37491273880004883, 0.15044313669204712, -0.5492833852767944, 0.024705544114112854, -0.38551151752471924, -0.2757266163825989, -0.4516104459762573, -0.28728973865509033, 0.1704539805650711, -0.15947052836418152, -0.14540058374404907, 0.4019351899623871, 0.19937270879745483, 0.06911401450634003, -0.19306708872318268, 0.23678310215473175, -0.0632806047797203, -0.16509012877941132, 0.08030731976032257, 0.10613319277763367, -0.23951974511146545, 0.544197142124176, 0.15343348681926727, -0.11509561538696289, -0.3788308799266815, -0.05456851050257683, -0.44805389642715454, -0.017762213945388794, -0.013725066557526588, 0.21151171624660492, 0.18666602671146393, -0.18548521399497986, -0.08133988082408905, -0.29294565320014954, 0.10126306116580963, -0.1467573642730713, -0.43440788984298706, 0.1176007017493248, 0.016475770622491837, 0.06920067965984344, -0.0827290266752243, -0.5346202850341797, -0.1734243482351303, -0.2870720624923706, 0.12163537740707397, 0.0896010547876358, 0.052753616124391556, -0.0843656063079834, -0.33271151781082153, -0.46731114387512207, -0.2296353131532669, 0.0296124666929245, -0.3282264769077301, 0.23868605494499207, 0.20468753576278687, -0.31450456380844116, -0.2263934314250946, -0.11128303408622742, -0.059394896030426025, -0.4521973729133606, 0.05020863935351372, -0.04357501119375229, -0.03468794375658035, -0.17772774398326874, 0.007705017924308777, 0.0952640250325203, 0.13545826077461243, 0.5069116950035095, -0.15671560168266296, 0.03196464106440544, -0.05617738515138626, -0.04885800927877426, 0.2965572774410248, 0.39400914311408997, 0.19483020901679993, -0.3336035907268524, 0.4375561475753784, 0.13541510701179504, 0.7831202149391174, 0.26483505964279175, 0.11475524306297302, -0.125880166888237, -0.01352447085082531, 0.10825596749782562, -0.3143497407436371, -0.22242236137390137, 0.1557753086090088, 0.04856934770941734, 0.22044828534126282, 0.2698591649532318, 0.014229264110326767, -0.0006076078861951828, 0.3698955178260803, -0.02411399781703949, -0.048579007387161255, -0.23838812112808228, -0.13424129784107208, -0.047169968485832214, 0.2883826196193695, 0.20192870497703552, 0.05271042883396149, 0.17653042078018188, 0.012237261980772018, 0.19979868829250336, 0.14760494232177734, 0.11943995952606201, 0.04506734013557434, -0.1297970563173294, 0.03897504508495331, -0.10549803078174591, -0.14969593286514282, 0.03275652602314949, -0.0015369616448879242, 0.12961119413375854, -0.34414783120155334, 0.019693151116371155, -0.09743408113718033, 0.4948437213897705, 0.11279305815696716, 0.020391404628753662, 0.04049436002969742, -0.06326048076152802, -0.1825111210346222, -0.2185434252023697, -0.26075127720832825, -0.046332571655511856, 0.2669585943222046, 0.668056309223175, -0.46479958295822144, -0.11760467290878296, 0.4835324287414551, 0.17838580906391144, -0.2284885048866272, -0.016532208770513535, -0.4416120648384094, 0.11162389814853668, 0.13281506299972534, 0.3375864028930664, 0.1663564145565033, 0.05284591391682625, -0.41043463349342346, -0.023697741329669952, -0.09484253078699112, -0.39352133870124817, -0.20771197974681854, -0.03604353219270706, 0.6807256937026978, -0.16358081996440887, 0.03251883387565613, 0.2257360965013504, 0.44869351387023926, -0.12436341494321823, 0.30799996852874756, -0.17460721731185913, -0.4035542607307434, 0.03781341388821602, -0.15607839822769165, 0.32407814264297485, 0.35541290044784546, -0.2279808670282364, 0.0964212715625763, -0.2675372064113617, 0.1640760451555252, 0.09441691637039185, -0.2588041424751282, 0.5009998083114624, -0.3687668442726135, 0.1837678998708725, -0.13129375874996185, 0.10269392281770706, -0.058898311108350754, -0.07036074995994568, -0.1732528954744339, 0.4471169710159302, -0.19594576954841614, 0.39826706051826477, 0.3590935468673706, 0.9550321102142334, 0.22316457331180573, 0.16210485994815826, 0.2828299105167389, -0.31663304567337036, 0.32467472553253174, -0.06589503586292267, 0.24195045232772827, -0.5295189023017883, -0.5630079507827759, 0.1268852949142456, -0.11888837069272995, -0.04731997475028038, -0.07983008027076721, -0.31174319982528687, 0.29987475275993347, -0.27371782064437866, 0.3252301812171936, -0.2590058445930481, -0.08647768199443817, 0.09446964412927628, 0.005815047770738602, -0.3637439012527466, 0.026169590651988983, 0.21111302077770233, -0.16753272712230682, -0.14575102925300598, 0.08206598460674286, 0.08341754972934723, -0.07574115693569183, -0.07818789780139923, 0.21959346532821655, -0.32597672939300537, 0.16302095353603363, 0.10136856883764267, -0.3467419445514679, 0.06922908872365952, 0.22930587828159332, 0.2705114483833313, 0.17228148877620697, 0.2803625166416168, 0.12567901611328125, 0.1800108253955841, 0.08344689011573792, 0.19740073382854462, 0.05390362814068794, 0.23402972519397736, -0.19814494252204895, -0.08809075504541397, -0.4284776747226715, 0.1081114411354065, -0.09179673343896866, -0.3915679454803467, 0.14349648356437683, -0.19441314041614532, -0.3220760226249695, 0.024406082928180695, 0.47356730699539185, 0.33475053310394287, -0.4014012813568115, 0.17486751079559326, -0.14356298744678497, -0.20425136387348175, 0.35096436738967896, -0.3999491333961487, -0.0922391265630722, -0.15384230017662048, 0.3383510112762451, 0.09896082431077957, 0.42931896448135376, 0.3316916823387146, 0.005737461149692535, -0.3520098328590393, -0.3328055739402771, 0.06406281143426895, 0.10371282696723938, -0.5751312971115112, 0.43465691804885864, -0.32802996039390564, -0.20570090413093567, 0.09261143207550049, 0.13415122032165527, 0.04781360551714897, -0.08769240975379944, -0.44718027114868164, -0.09015114605426788, 0.2550954520702362, 0.11981510370969772, 0.12534673511981964, -0.09536845982074738, -0.13747672736644745, 0.07305003702640533, -0.32574933767318726, 0.269550621509552, -0.32316920161247253, 0.2017272263765335, 0.13906702399253845, 0.11930340528488159, -0.3496733009815216, -0.3382520079612732, -0.03013410046696663, -0.005860961973667145, 0.15217211842536926, 0.1133231520652771, 0.022756192833185196, -0.2555578947067261, -0.2811465263366699, 0.09417898207902908, -0.13662981986999512, 0.36268335580825806, -0.05395180732011795, 0.01866878569126129, -0.18272008001804352, -0.08278024196624756, 0.26039111614227295, -0.06519801169633865, 0.3214722275733948, 0.25864821672439575, 0.5407550930976868, 0.2696581184864044, -0.00161733478307724, 0.08472780883312225, -0.09264321625232697, -0.11669962108135223, 0.04504487290978432, 0.24846816062927246, -0.17613554000854492, -0.06636287271976471, -0.2683701515197754, -0.017554156482219696, 0.14221209287643433, 0.18098853528499603, 0.4399692714214325, -0.29146671295166016, -0.30566418170928955, -0.054973453283309937, 0.6608115434646606, 0.4182230532169342, 0.25742587447166443, -0.3567838966846466, -0.007616328075528145, 0.2955780327320099, -0.3845826983451843, -0.1149228885769844, 0.2638155519962311, 0.26490411162376404, -0.008459791541099548, 0.14731326699256897, 0.1894066482782364, 0.2012401521205902, 0.13086631894111633, 0.34869152307510376, 0.25399503111839294, 0.036723535507917404, 0.4757240414619446, 0.3917744755744934, 0.01789175719022751, 0.27750110626220703, 0.12255488336086273, -0.21275997161865234, 0.21950632333755493, 0.03427194803953171, 0.32086408138275146, 0.28678542375564575, 0.1289806365966797, 0.09387390315532684, 0.3496328890323639, 0.05068696290254593, -0.29629403352737427, 0.06268572062253952, 0.1004062220454216, 0.1331283152103424, 0.3161742389202118, 0.38994455337524414, -0.1473006159067154, -0.47147488594055176, -0.4354187846183777, 0.21821275353431702, -0.18827950954437256, -0.19078579545021057, -0.030977778136730194, -0.020262934267520905, -0.2634994387626648, -0.07886461913585663, -0.0369316004216671, 0.10603256523609161, 0.16029071807861328, 0.028976060450077057, 0.1964230239391327, -0.46732640266418457, -0.01393585279583931, -0.14543180167675018, 0.7303429245948792, -0.09184104949235916, 0.26595962047576904, 0.11090612411499023, -0.03973042964935303, -0.23494312167167664, 0.20865271985530853, 0.04623761773109436, -0.09417302906513214, -0.13280029594898224, 0.04539079591631889, 0.03844889625906944, -0.16123560070991516, 0.27528056502342224, 0.21113908290863037, -0.0691545307636261, 0.10909178853034973, 0.316066175699234, 0.12083765119314194, -0.19265109300613403, 0.19262635707855225, 0.3498861789703369, 0.20863300561904907, -0.04595067724585533, 0.418654203414917, -0.05992596596479416, -0.12948033213615417, 0.005807077512145042, -0.23029394447803497, -0.10269701480865479, 0.13531279563903809, -0.08830861747264862, -0.045593321323394775, -0.007916770875453949, -0.19755083322525024, 0.0928695797920227, 0.11722946166992188, 0.1753222644329071, 0.2767150104045868, -0.023296229541301727, -0.21590545773506165, -0.23322218656539917, -0.24300634860992432, 0.16011086106300354, -0.03598615527153015, -0.0639573410153389, 0.1329922378063202, 0.38273581862449646, -0.0707966536283493, 0.02734541893005371, -0.0036692768335342407, -0.0219644196331501, -0.05277591198682785, 0.22071221470832825, -0.59554523229599, 0.06890498101711273, -0.04247509315609932, -0.13346661627292633, -0.1328042447566986, -0.15362325310707092, -0.29293593764305115, 0.26268258690834045, -0.027911685407161713, 0.1489819437265396, -0.02138085663318634, 0.12211886048316956, 0.22506660223007202, -0.30461955070495605, 0.23904868960380554, -0.1655743420124054, 0.13731837272644043, 0.10610588639974594, -0.07269060611724854, -0.29226693511009216, -0.3940052092075348, 0.2732599973678589, -0.01120690442621708, 0.4409250319004059, 0.07168848812580109, -0.31184953451156616, -0.14080607891082764, 0.2390519678592682, 0.2006511092185974, -0.1295071393251419, -0.4364602863788605, 0.10774233192205429, 0.23978784680366516, -0.046532198786735535, 0.15650662779808044, 0.5506023168563843, -0.20663049817085266, 0.03346773236989975, 0.07372328639030457, -0.3868904709815979, 0.23507393896579742, 0.06582143902778625, -0.06679599732160568, -0.2000879943370819, 0.46911025047302246, 0.5657886266708374, -0.14234459400177002, -0.1921595335006714, -0.12574371695518494, 0.23029065132141113, -0.09364557266235352, 0.1339324414730072, 0.45463740825653076, 0.24743033945560455, 0.03876248002052307, -0.12026691436767578, 0.18317794799804688, 0.3472713232040405, -0.35138288140296936, 0.11521773040294647, -0.06415631622076035 ]
https://github.com/huggingface/datasets/issues/6506
As this is a specific issue of the "glue" dataset, I have transferred it to the dataset Discussion page: https://huggingface.co/datasets/glue/discussions/15 Let's continue the discussion there!
Incorrect test set labels for RTE and CoLA datasets via load_dataset
### Describe the bug The test set labels for the RTE and CoLA datasets when loading via datasets load_dataset are all -1. Edit: It appears this is also the case for every other dataset except for MRPC (stsb, sst2, qqp, mnli (both matched and mismatched), qnli, wnli, ax). Is this intended behavior to safeguard the test set for evaluation purposes? ### Steps to reproduce the bug !pip install datasets from datasets import load_dataset rte_data = load_dataset('glue', 'rte') cola_data = load_dataset('glue', 'cola') print(rte_data['test'][0:30]['label']) print(cola_data['test'][0:30]['label']) Output: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] The non-label test data seems to be fine: e.g. rte_data['test'][1] is: {'sentence1': "Authorities in Brazil say that more than 200 people are being held hostage in a prison in the country's remote, Amazonian-jungle state of Rondonia.", 'sentence2': 'Authorities in Brazil hold 200 people as hostage.', 'label': -1, 'idx': 1} Training and validation data are also fine: e.g. rte_data['train][0] is: {'sentence1': 'No Weapons of Mass Destruction Found in Iraq Yet.', 'sentence2': 'Weapons of Mass Destruction Found in Iraq.', 'label': 1, 'idx': 0} ### Expected behavior Expected the labels to be binary 0/1 values; Got all -1s instead ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
25
Incorrect test set labels for RTE and CoLA datasets via load_dataset ### Describe the bug The test set labels for the RTE and CoLA datasets when loading via datasets load_dataset are all -1. Edit: It appears this is also the case for every other dataset except for MRPC (stsb, sst2, qqp, mnli (both matched and mismatched), qnli, wnli, ax). Is this intended behavior to safeguard the test set for evaluation purposes? ### Steps to reproduce the bug !pip install datasets from datasets import load_dataset rte_data = load_dataset('glue', 'rte') cola_data = load_dataset('glue', 'cola') print(rte_data['test'][0:30]['label']) print(cola_data['test'][0:30]['label']) Output: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] The non-label test data seems to be fine: e.g. rte_data['test'][1] is: {'sentence1': "Authorities in Brazil say that more than 200 people are being held hostage in a prison in the country's remote, Amazonian-jungle state of Rondonia.", 'sentence2': 'Authorities in Brazil hold 200 people as hostage.', 'label': -1, 'idx': 1} Training and validation data are also fine: e.g. rte_data['train][0] is: {'sentence1': 'No Weapons of Mass Destruction Found in Iraq Yet.', 'sentence2': 'Weapons of Mass Destruction Found in Iraq.', 'label': 1, 'idx': 0} ### Expected behavior Expected the labels to be binary 0/1 values; Got all -1s instead ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 As this is a specific issue of the "glue" dataset, I have transferred it to the dataset Discussion page: https://huggingface.co/datasets/glue/discussions/15 Let's continue the discussion there!
[ -0.11327069252729416, -0.12450703233480453, -0.012101970613002777, 0.332303524017334, 0.026471160352230072, 0.14775629341602325, 0.48433735966682434, 0.11779926717281342, 0.2665036916732788, 0.07214049249887466, -0.2263564169406891, 0.3953258991241455, -0.02414749562740326, 0.45505860447883606, 0.050629813224077225, 0.07477614283561707, 0.111211396753788, 0.03609770908951759, -0.13173998892307281, -0.1647774577140808, -0.34861260652542114, 0.23913085460662842, -0.3872215151786804, -0.05128997191786766, -0.047379590570926666, 0.07408098131418228, -0.15958449244499207, -0.1733272671699524, 0.07474721968173981, -0.5440548658370972, 0.48952770233154297, 0.2104402780532837, -0.20265942811965942, 0.42062726616859436, -0.00012112744298065081, -0.04656435549259186, 0.23420314490795135, -0.04615415632724762, -0.4276478886604309, -0.21655404567718506, -0.25629255175590515, -0.1810758262872696, 0.28955745697021484, -0.06686332821846008, -0.10881702601909637, 0.02638963609933853, -0.1569599211215973, -0.2787613868713379, 0.04395109415054321, 0.4816127121448517, 0.15819990634918213, 0.13909944891929626, -0.13510344922542572, 0.07827936857938766, 0.5109840035438538, 0.09934361279010773, -0.17291420698165894, 0.2709469199180603, 0.3492405116558075, -0.2240808606147766, 0.2849140763282776, 0.43823811411857605, -0.1017148569226265, 0.13540615141391754, -0.13100531697273254, 0.06042306870222092, -0.04085032641887665, -0.5250658988952637, -0.0039015612564980984, 0.32358676195144653, 0.6307015419006348, -0.3287918269634247, -0.5339772701263428, -0.25871896743774414, 0.0879165306687355, -0.06127854436635971, 0.253329336643219, 0.08551931381225586, 0.04578983783721924, 0.05550231412053108, -0.3342050015926361, 0.18066361546516418, 0.025481179356575012, 0.14346915483474731, -0.15357281267642975, 0.19208626449108124, 0.1345956027507782, 0.15599432587623596, 0.0292805265635252, 0.04631584510207176, 0.4553460478782654, -0.06285801529884338, -0.21166785061359406, 0.25242048501968384, -0.503944993019104, 0.001918889582157135, -0.20123106241226196, 0.15321049094200134, 0.03254523128271103, -0.025116153061389923, 0.10752581059932709, -0.07738424837589264, -0.04130413010716438, 0.10760030895471573, 0.04060434550046921, 0.39306163787841797, 0.29309821128845215, 0.2505413591861725, 0.09566588699817657, -0.07304063439369202, -0.015988826751708984, 0.20457831025123596, -0.041189976036548615, -0.11871205270290375, 0.06736814975738525, 0.1308455616235733, 0.024479635059833527, -0.3579008877277374, -0.49461716413497925, 0.12697649002075195, -0.30376169085502625, 0.09218460321426392, 0.10593774914741516, 0.1094321459531784, 0.09906302392482758, 0.2523965835571289, -0.013696521520614624, 0.2787061035633087, -0.381318062543869, -0.2724549174308777, -0.057836562395095825, -0.014703388325870037, -0.11718709766864777, 0.11402101069688797, 0.46364742517471313, 0.02312994748353958, 0.12232474237680435, 0.19479452073574066, -0.11226408183574677, -0.2171545922756195, 0.22822368144989014, -0.2218475043773651, 0.24654102325439453, 0.29575425386428833, -0.06306403130292892, 0.3042811155319214, 0.18806487321853638, -0.34100955724716187, 0.10642653703689575, 0.2751171588897705, -0.36372703313827515, -0.060873113572597504, 0.1570216864347458, 0.12306956946849823, -0.5125620365142822, -0.16195456683635712, -0.4501156806945801, 0.11573110520839691, 0.17832134664058685, -0.000874646008014679, -0.04178808629512787, -0.6291661262512207, -0.12643185257911682, -0.01862296462059021, 0.02701546996831894, 0.301962673664093, -0.4534454047679901, 0.0008177608251571655, 0.07220348715782166, 0.008957954123616219, 0.05166734755039215, 0.07340171188116074, -0.021182816475629807, 0.12054949998855591, -0.13422039151191711, -0.443500280380249, 0.2888125777244568, -0.6994169354438782, -0.2875559628009796, -0.06260302662849426, -0.0009274482727050781, -0.009907208383083344, -0.1479324847459793, -0.04390271380543709, 0.08764844387769699, 0.14210060238838196, 0.05993077903985977, 0.005564440041780472, 0.14134055376052856, 0.2302682101726532, -0.5062205195426941, 0.12097787111997604, 0.2669163644313812, 0.2112852931022644, 0.14546605944633484, 0.13352519273757935, -0.03979909047484398, -0.31605273485183716, 0.3676857352256775, 0.19707272946834564, -0.029048170894384384, 0.14005422592163086, 0.14391562342643738, -0.06402716040611267, 0.2676811218261719, 0.21824467182159424, -0.4697776138782501, 0.234426811337471, 0.09192342311143875, 0.3843969702720642, 0.16207006573677063, 0.03694260120391846, -0.46762049198150635, 0.05805520713329315, -0.2783973813056946, -0.1597803384065628, 0.005089987069368362, 0.3088934123516083, -0.10249099880456924, 0.10729587078094482, 0.09108143299818039, 0.31705719232559204, 0.031814828515052795, 0.22244080901145935, -0.10217806696891785, 0.013215772807598114, 0.1567162424325943, -0.10282157361507416, -0.06769945472478867, 0.08458518981933594, 0.28515613079071045, -0.02809872105717659, -0.2003113329410553, 0.26697802543640137, 0.44658249616622925, -0.16377869248390198, 0.004185513127595186, -0.08212792873382568, 0.18532107770442963, -0.41708800196647644, -0.19332310557365417, 0.08674895763397217, 0.039475005120038986, 0.01341255009174347, -0.25849807262420654, 0.47655823826789856, -0.37607383728027344, 0.09199784696102142, -0.2703583836555481, 0.22456829249858856, 0.07595754414796829, -0.020714685320854187, -0.12239359319210052, -0.2558424472808838, 0.39659440517425537, -0.06491213291883469, 0.4517379403114319, 0.14381679892539978, -0.025330424308776855, 0.2110300064086914, -0.006437451578676701, -0.000831015408039093, -0.22189056873321533, -0.1760377287864685, -0.021848920732736588, -0.07578432559967041, 0.30255258083343506, 0.6436905860900879, 0.37694215774536133, 0.1293170303106308, 0.018087835982441902, 0.05835620313882828, -0.11508464813232422, -0.07945170253515244, 0.13590075075626373, 0.10477305948734283, -0.038002680987119675, 0.06281775236129761, 0.4743848145008087, -0.22981595993041992, -0.03701912239193916, 0.022780001163482666, 0.1427881419658661, 0.22236838936805725, -0.7048842906951904, 0.11198804527521133, -0.15548846125602722, -0.13966047763824463, -0.5244503021240234, -0.4336390197277069, -0.1881168782711029, -0.6215134859085083, 0.07631466537714005, 0.027480604127049446, 0.057634830474853516, 0.12259116023778915, -0.1988583654165268, 0.02239331603050232, -0.4566492438316345, -0.2206200510263443, -0.13781078159809113, -0.1738085299730301, -0.1667611300945282, -0.02818153239786625, -0.0692034512758255, 0.16339194774627686, 0.11949758231639862, -0.47082948684692383, -0.35346752405166626, 0.2556969225406647, -0.3029378056526184, 0.18323954939842224, -0.29547208547592163, 0.4163282513618469, -0.02456086128950119, -0.20880278944969177, -0.22163283824920654, 0.07661794126033783, 0.10406450927257538, -0.024900905787944794, -0.008287403732538223, -0.06349337846040726, 0.05748385936021805, 0.01977796107530594, -0.2443719208240509, -0.5808748602867126, -0.3703863322734833, 0.0828835517168045, -0.01535160094499588, -0.10010407119989395, 0.05297686904668808, 0.36525434255599976, -0.2983936071395874, -0.1829659640789032, 0.1538892388343811, 0.08788502961397171, -0.180008202791214, -0.36364996433258057, 0.11565585434436798, -0.19818392395973206, -0.168960839509964, -0.13914546370506287, 0.002030991017818451, 0.06371612846851349, 0.11641736328601837, -0.3384828567504883, -0.16740630567073822, -0.03529970347881317, 0.05810684710741043, -0.06904462724924088, -0.3289155662059784, -0.12156159430742264, 0.2673759162425995, 0.1681409329175949, -0.4417843520641327, -0.2051846981048584, 0.19679975509643555, -0.08063507080078125, 0.11665279418230057, -0.1680479645729065, -0.034157201647758484, -0.28913912177085876, 0.2947375178337097, 0.1525498330593109, 0.07758153975009918, 0.23912081122398376, -0.22738489508628845, 0.2620009481906891, -0.09091342240571976, -0.25373101234436035, 0.1487160176038742, 0.2001250982284546, 0.047413021326065063, 0.13540080189704895, -0.013434620574116707, 0.05023333430290222, -0.26549410820007324, 0.46227532625198364, -0.26733121275901794, -0.1459757536649704, -0.1467766910791397, -0.1566612273454666, -0.05310632288455963, 0.1612568497657776, 0.3354646861553192, -0.10201399028301239, -0.35170137882232666, -0.1588308960199356, -0.07310295850038528, -0.18043330311775208, 0.14237776398658752, -0.28182345628738403, -0.007187172770500183, -0.1320517361164093, 0.02370942011475563, 0.15768519043922424, 0.4213409125804901, -0.11950760334730148, -0.051173996180295944, 0.16742141544818878, 0.2600645422935486, 0.5143492221832275, -0.19035838544368744, 0.25457051396369934, 0.4209069609642029, 0.10650801658630371, -0.3434826135635376, -0.36697646975517273, -0.2901330590248108, -0.16964313387870789, 0.31600847840309143, 0.18798761069774628, 0.13557448983192444, -0.1824404001235962, 0.08736461400985718, 0.23731070756912231, -0.21671068668365479, -0.1305646449327469, -0.19861873984336853, -0.18366172909736633, 0.17326003313064575, -0.008283331990242004, 0.10494300723075867, 0.17734338343143463, -0.5305019617080688, 0.02721649408340454, -0.010388171300292015, 0.19498863816261292, 0.10270175337791443, 0.3462657928466797, 0.24777638912200928, 0.09424112737178802, 0.4372177720069885, 0.32854941487312317, 0.016675405204296112, 0.3627523183822632, 0.8132734298706055, -0.33494842052459717, -0.23186974227428436, -0.06303489208221436, -0.3587256371974945, 0.22304224967956543, 0.05000080168247223, 0.01956138014793396, -0.3103087246417999, -0.6303344368934631, -0.0841311514377594, -0.06468990445137024, 0.41991838812828064, 0.07224415987730026, 0.05637713894248009, -0.3885870575904846, -0.408700555562973, 0.302510529756546, 0.1334189921617508, -0.3264395296573639, 0.3111766278743744, -0.029071446508169174, -0.5089823007583618, 0.657489538192749, 0.014283740893006325, 0.6144208908081055, -0.14229032397270203, 0.1099427118897438, 0.05543132126331329, -0.14000096917152405, 0.39464765787124634, 0.1073828786611557, -0.024307744577527046, -0.4947684407234192, -0.4286918640136719, 0.0006726011633872986, -0.08418622612953186, -0.4618337154388428, 0.2474619746208191, -0.1838950663805008, 0.4623100161552429, -0.0030601173639297485, -0.033304184675216675, -0.05636490136384964, -0.18178072571754456, 0.3222440779209137, -0.024516522884368896, -0.1519141048192978, 0.08889828622341156, -0.13256551325321198, 0.2669214606285095, -0.10002163052558899, 0.1929534673690796, -0.19957417249679565, -0.05938427895307541, -0.3681488633155823, 0.14185796678066254, -0.46021977066993713, -0.16442367434501648, 0.09906703978776932, -0.2844942808151245, -0.12342871725559235, 0.5371989011764526, 0.32911139726638794, 0.1766670048236847, -0.11105899512767792, 0.06373652070760727, 0.33669450879096985, 0.4498225152492523, 0.35308223962783813, 0.05367843806743622, 0.3755913972854614, 0.17114564776420593, -0.20583657920360565, -0.2616543173789978, -0.004764925688505173, 0.31480318307876587, 0.023670613765716553, -0.01105925440788269, -0.0538843534886837, -0.24460484087467194, 0.29763662815093994, -0.17004238069057465, 0.4100528955459595, -0.2840624451637268, 0.10726015269756317, -0.04617919400334358, 0.09679638594388962, 0.28632378578186035, -0.090532585978508, -0.6079936027526855, -0.03343125432729721, 0.24753542244434357, -0.11829584836959839, 0.06559456139802933, 0.2734171748161316, 0.03176049888134003, -0.11347555369138718, -0.16005322337150574, 0.3383442759513855, -0.0020854100584983826, -0.577181875705719, 0.0979621410369873, -0.11165722459554672, -0.0895431712269783, 0.04026513919234276, 0.4445999264717102, 0.20104047656059265, -0.1316789835691452, 0.20440128445625305, -0.4124045968055725, -0.22827748954296112, -0.04351131618022919, 0.03201443329453468, 0.20834653079509735, 0.18251192569732666, -0.1666393280029297, 0.15051543712615967, -0.05262792855501175, -0.21770904958248138, -0.07984084635972977, -0.11227016150951385, 0.09565577656030655, -0.02520914562046528, 0.2817463278770447, 0.16481664776802063, -0.06223427504301071, 0.080106720328331, -0.18828098475933075, 0.11863148212432861, -0.10802709311246872, -0.09827303886413574, 0.16524958610534668, 0.07031481713056564, -0.125273197889328, -0.3329354226589203, -0.14641082286834717, 0.16117757558822632, -0.23835304379463196, 0.1239631250500679, 0.3687756061553955, 0.07980960607528687, 0.4290095567703247, -0.14208672940731049, 0.2535227835178375, 0.09346674382686615, 0.2834562361240387, 0.093890480697155, -0.18099670112133026, 0.1595836579799652, 0.21497584879398346, 0.09950646013021469, 0.06420578807592392, -0.02369203418493271, -0.05390680208802223, -0.2403983622789383, 0.07128321379423141, -0.08494052290916443, -0.4367467761039734, 0.28351712226867676, 0.07159040868282318, 0.24081744253635406, 0.34321531653404236, -0.23837211728096008, -0.06199371814727783, 0.09671324491500854, 0.15749728679656982, 0.004575997591018677, -0.17112721502780914, 0.33488133549690247, 0.56512850522995, -0.1453619748353958, 0.30121976137161255, 0.17065782845020294, -0.2562820315361023, -0.18622173368930817, 0.0904429703950882, 0.42326173186302185, -0.006560652516782284, 0.21776017546653748, 0.18580973148345947, -0.3039626479148865, 0.20763465762138367, 0.1940491497516632, -0.16660308837890625, -0.057331815361976624, 0.15671314299106598, 0.10457821190357208, 0.46293509006500244, 0.08137693256139755, -0.12830039858818054, -0.07626809924840927, 0.07872209697961807, 0.11535277217626572, 0.10452296584844589, -0.2788313031196594, 0.2645941972732544, 0.18946364521980286, 0.37579524517059326, -0.11232971400022507, -0.34651392698287964, -0.3191889524459839, 0.03753954917192459, -0.10978715121746063, -0.27931585907936096, -0.12862473726272583, -0.004880882799625397, -0.28413793444633484, 0.2977510392665863, -0.15954750776290894, -0.10817337036132812, 0.5430535674095154, 0.08101719617843628, -0.1508449763059616, -0.38520532846450806, -0.5095499753952026, 0.3647612929344177, 0.22091281414031982, -0.21417595446109772, 0.2447698563337326, 0.05235498026013374, -0.03908243775367737, 0.25607722997665405, 0.0926925465464592, 0.37660446763038635, 0.16214032471179962, 0.061813946813344955, -0.4233095645904541, -0.07570211589336395, 0.08970355242490768, -0.021541155874729156, 0.29827365279197693, -0.14733000099658966, -0.03237851709127426, 0.521614134311676, 0.07598292082548141, 0.0019483938813209534, 0.1553017795085907, 0.11313675343990326, 0.11548501253128052, -0.13564397394657135, 0.14807870984077454, 0.010959688574075699, -0.12187641859054565, -0.16074609756469727, -0.017528872936964035, 0.025520816445350647, 0.2848716378211975, 0.29448482394218445, 0.14235270023345947, 0.19342084228992462, 0.09580358862876892, 0.06340070068836212, 0.17373740673065186, 0.45011106133461, 0.19374193251132965, 0.1809350848197937, -0.2711951732635498, 0.01322619616985321, -0.44404852390289307, 0.19926686584949493, -0.06853261590003967, -0.0677747130393982, 0.125937819480896, -0.444596529006958, 0.14568524062633514, 0.03283599764108658, 0.0666523352265358, 0.16323482990264893, 0.23476317524909973, 0.3187389075756073, -0.47812217473983765, -0.2209562063217163, -0.003860585391521454, -0.22937211394309998, -0.023951176553964615, -0.2058350145816803, 0.00007982179522514343, -0.14922288060188293, -0.09276121854782104, -0.009923528879880905, -0.08805148303508759, 0.15273581445217133, -0.015846608206629753, 0.3102017939090729, 0.0794326439499855, 0.868884265422821, 0.07290661334991455, 0.233492910861969, -0.11629004031419754, -0.5003041625022888, -0.31768569350242615, 0.1747393012046814, -0.17640382051467896, -0.018348168581724167, 0.09694579243659973, 0.13840945065021515, 0.02532484009861946, -0.05158066749572754, 0.10703468322753906, 0.338534951210022, -0.36084607243537903, 0.02572622150182724, 0.0044514089822769165, -0.05200466513633728, 0.12555018067359924, 0.11804947257041931, 0.10530950129032135, 0.37784522771835327, -0.06115278601646423, -0.4110534191131592, 0.43708616495132446, -0.2792697846889496, 0.06421447545289993, -0.026543937623500824, 0.20761631429195404, 0.21205802261829376, -0.12703533470630646, -0.750725507736206, 0.06508055329322815, 0.4402366578578949, -0.14900536835193634, -0.454866886138916, 0.15570960938930511, -0.030083494260907173, 0.2420794814825058, -0.09013247489929199, 0.33775028586387634, 0.2655526101589203, -0.08964870870113373, -0.04079263657331467, 0.08848659694194794 ]
https://github.com/huggingface/datasets/issues/6505
I ran into the same problem when I used a server cluster (Slurm system managed) that couldn't load any of the huggingface datasets or models, but it worked on my laptop. I suspected some system configuration-related problem, but I had no idea. My problems are consistent with [issue #2618](https://github.com/huggingface/datasets/issues/2618). All the huggingface-related libraries I use are the latest versions.
Got stuck when I trying to load a dataset
### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0
59
Got stuck when I trying to load a dataset ### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0 I ran into the same problem when I used a server cluster (Slurm system managed) that couldn't load any of the huggingface datasets or models, but it worked on my laptop. I suspected some system configuration-related problem, but I had no idea. My problems are consistent with [issue #2618](https://github.com/huggingface/datasets/issues/2618). All the huggingface-related libraries I use are the latest versions.
[ -0.14756226539611816, -0.29957014322280884, -0.06535666435956955, 0.3141990900039673, 0.3323673605918884, 0.08560338616371155, 0.42914897203445435, 0.07434725016355515, 0.19302590191364288, 0.11410264670848846, -0.14673006534576416, 0.46443262696266174, 0.2579033672809601, -0.086441271007061, -0.2140907645225525, 0.07133340835571289, -0.15374554693698883, 0.10617344081401825, 0.03897762671113014, -0.04555955156683922, 0.0758349746465683, 0.15758010745048523, -0.2834818959236145, 0.02088220976293087, 0.037086013704538345, -0.0018902719020843506, 0.1390603929758072, -0.0268925279378891, -0.043990589678287506, -0.37605351209640503, 0.47842609882354736, 0.03980879485607147, 0.10186618566513062, 0.8280528783798218, -0.00012375824735499918, 0.08041700720787048, 0.5884150862693787, 0.04863279312849045, -0.47880810499191284, -0.2700863480567932, -0.15578703582286835, -0.4294823110103607, 0.21695540845394135, -0.08768746256828308, 0.023126371204853058, 0.039558105170726776, 0.007984410971403122, -0.43502700328826904, 0.3552878499031067, 0.29016414284706116, 0.09129959344863892, 0.03166927397251129, 0.07319439202547073, 0.08587726205587387, -0.013502277433872223, 0.21722210943698883, 0.01225520670413971, 0.36707159876823425, 0.4771386981010437, 0.183477982878685, 0.3030868172645569, -0.20346462726593018, -0.2555583715438843, 0.09509274363517761, 0.03530735522508621, -0.08309300243854523, 0.17042453587055206, -0.2451886385679245, 0.4002735912799835, 0.27393287420272827, 0.7686866521835327, 0.007529876660555601, -0.15956148505210876, -0.19751465320587158, 0.13276812434196472, -0.12937748432159424, 0.16558516025543213, 0.14028239250183105, -0.2675146162509918, 0.19136543571949005, -0.0805872455239296, -0.0010658800601959229, -0.27770286798477173, 0.06846308708190918, -0.21840065717697144, -0.28080329298973083, -0.05370219424366951, 0.17727266252040863, -0.024859078228473663, -0.02612702175974846, 0.08065017312765121, -0.3260534107685089, 0.08579536527395248, 0.406739205121994, -0.783255398273468, 0.1361137330532074, 0.030283259227871895, 0.00008581206202507019, 0.26104971766471863, 0.157681405544281, 0.15574151277542114, 0.03331047296524048, 0.0638585090637207, -0.005135940387845039, 0.3388916552066803, 0.1782284379005432, 0.00796007551252842, -0.11140848696231842, 0.4228982627391815, 0.029213886708021164, -0.10680265724658966, -0.04791492223739624, -0.1800173670053482, -0.18590843677520752, 0.49483513832092285, -0.14530062675476074, 0.23777669668197632, -0.3150399625301361, -0.21850478649139404, 0.07930079102516174, -0.1574154496192932, -0.015112284570932388, 0.05584719777107239, 0.5164165496826172, -0.34567052125930786, 0.33665144443511963, 0.16197067499160767, -0.13369016349315643, -0.29132962226867676, -0.08446331322193146, 0.023933053016662598, -0.32318219542503357, -0.08020541816949844, -0.1518421769142151, 0.3034485876560211, -0.40496891736984253, -0.07215955853462219, 0.007687252014875412, 0.05000840499997139, -0.06870526820421219, 0.12046287953853607, -0.29651737213134766, -0.13809698820114136, 0.24395966529846191, -0.04193411394953728, 0.260410875082016, -0.02144608646631241, -0.24441562592983246, -0.018968753516674042, 0.42398738861083984, -0.32624247670173645, -0.05408467352390289, -0.08144370466470718, 0.10603595525026321, -0.01518276333808899, 0.1275562196969986, -0.41141751408576965, -0.03723617643117905, -0.001420978456735611, -0.1294906735420227, -0.05371412634849548, -0.07776553928852081, 0.14094990491867065, -0.10010474920272827, 0.3481045663356781, 0.31372079253196716, -0.5250808596611023, 0.13998371362686157, -0.4374983310699463, -0.07922357320785522, 0.2295236438512802, 0.18684446811676025, -0.17968058586120605, 0.31223064661026, -0.36760929226875305, -0.06658954918384552, 0.2792794108390808, -0.16989675164222717, -0.6536533832550049, 0.4754558503627777, -0.3203016221523285, 0.04723048210144043, -0.03780737146735191, 0.2081104815006256, 0.05185234174132347, -0.004259832203388214, 0.3294565677642822, 0.2083038091659546, 0.06910838931798935, -0.12840214371681213, -0.23838329315185547, -0.2594095766544342, 0.04954241216182709, 0.42342448234558105, -0.09152667224407196, 0.045278411358594894, 0.16986383497714996, 0.06094242259860039, 0.3191356062889099, 0.1814804971218109, -0.13296684622764587, 0.4863662123680115, 0.19693127274513245, 0.17065447568893433, 0.027730345726013184, 0.03488752245903015, -0.4840685725212097, 0.2070595920085907, -0.026043947786092758, -0.07545829564332962, -0.007137525826692581, -0.06580249965190887, -0.35157155990600586, 0.16082316637039185, -0.18293318152427673, 0.13161040842533112, -0.058573104441165924, 0.033227935433387756, 0.07216526567935944, 0.33924955129623413, -0.01543813943862915, 0.5650485754013062, -0.2543603479862213, 0.02095929905772209, -0.35762447118759155, 0.17810511589050293, 0.013830423355102539, 0.015150181949138641, -0.018109872937202454, -0.28185829520225525, 0.05680353567004204, -0.1897476315498352, -0.2681730389595032, 0.07827714830636978, 0.0264517180621624, -0.04128254950046539, -0.36079248785972595, -0.28894808888435364, 0.02705569379031658, -0.03906876593828201, -0.007291254587471485, 0.35410019755363464, 0.4311225712299347, -0.21587952971458435, 0.08679258823394775, 0.026701025664806366, -0.36242422461509705, 0.4272859990596771, 0.07481639087200165, -0.33149874210357666, 0.2627224922180176, -0.11857445538043976, -0.079763263463974, 0.24132584035396576, 0.6704695820808411, 0.06764787435531616, 0.37708693742752075, 0.14791239798069, -0.14288641512393951, -0.19432660937309265, 0.5178009271621704, -0.1841992288827896, -0.0806206464767456, 0.3954075276851654, 0.04731320962309837, 0.11418405175209045, 0.02846301533281803, 0.016698285937309265, 0.4645179808139801, 0.18101003766059875, -0.21948355436325073, -0.024110816419124603, 0.2816736102104187, -0.24956659972667694, 0.022940747439861298, 0.054192304611206055, -0.04056651517748833, 0.46552354097366333, 0.23526503145694733, -0.03125627711415291, 0.0006105154752731323, -0.3826005160808563, 0.1428270936012268, 0.29854679107666016, -0.06341226398944855, 0.20036190748214722, -0.4018188714981079, -0.04347240552306175, 0.2307191789150238, 0.12913964688777924, -0.13810193538665771, -0.14454291760921478, -0.33830079436302185, 0.20466028153896332, 0.42485809326171875, 0.2629430294036865, -0.08904450386762619, 0.09143481403589249, 0.09263486415147781, -0.33727818727493286, -0.24601121246814728, -0.04846565052866936, -0.47099941968917847, -0.13478854298591614, 0.3784029483795166, -0.0016848929226398468, 0.29870396852493286, -0.1160372644662857, -0.2341952919960022, 0.08828818798065186, -0.11083364486694336, 0.029360268265008926, 0.15322041511535645, 0.34474706649780273, 0.07942535728216171, 0.5676671862602234, -0.04440593346953392, 0.2735508382320404, 0.2426721602678299, -0.16614815592765808, -0.1394895613193512, 0.23835983872413635, -0.03265105560421944, 0.13928396999835968, 0.01740274578332901, -0.3209625482559204, -0.25672784447669983, -0.37672966718673706, 0.2944644093513489, -0.26889923214912415, 0.02011392079293728, 0.29028570652008057, 0.0989375039935112, 0.3616393506526947, 0.21879209578037262, 0.10703720152378082, -0.12758849561214447, -0.467333048582077, 0.32085683941841125, 0.06556269526481628, -0.3119955062866211, -0.009377121925354004, 0.29435238242149353, 0.10033952444791794, -0.04088577255606651, -0.537416398525238, 0.0834231823682785, -0.4925663471221924, 0.10881437361240387, -0.3642779588699341, -0.07865628600120544, 0.23322221636772156, -0.31138527393341064, 0.05039549618959427, 0.09137758612632751, -0.24596768617630005, -0.018698066473007202, 0.04036612808704376, 0.10222253203392029, 0.28081458806991577, 0.5861592292785645, -0.11759024858474731, 0.34345391392707825, 0.2890496850013733, -0.11136661469936371, 0.23438704013824463, 0.08819316327571869, 0.2808302342891693, -0.42505213618278503, -0.40689781308174133, -0.2516189515590668, 0.19838771224021912, -0.13278360664844513, 0.0013650692999362946, -0.039240218698978424, -0.06804421544075012, -0.19680586457252502, -0.30485033988952637, -0.01814068853855133, -0.1369103491306305, 0.0463469997048378, -0.26728355884552, -0.17720596492290497, 0.011736884713172913, -0.05058283358812332, -0.12934650480747223, -0.19541426002979279, -0.201359361410141, 0.3096253573894501, 0.1866951584815979, -0.14182552695274353, -0.22736753523349762, -0.09904180467128754, -0.39430612325668335, 0.3365449011325836, -0.18966272473335266, 0.43215039372444153, -0.20643958449363708, 0.20712752640247345, 0.34758877754211426, -0.28210026025772095, 0.6598774194717407, -0.08056042343378067, 0.33480820059776306, 0.20435509085655212, 0.01507066935300827, -0.48171481490135193, 0.026628397405147552, 0.14627087116241455, 0.21990129351615906, 0.13532453775405884, 0.26050102710723877, -0.4915229082107544, -0.14013263583183289, -0.04511469230055809, 0.3597457706928253, -0.06620720028877258, -0.4381331205368042, -0.3246278166770935, -0.36435428261756897, -0.3803083300590515, -0.07079006731510162, -0.0779561996459961, 0.09101417660713196, 0.03523524850606918, -0.32881033420562744, -0.1981429159641266, 0.01273057609796524, -0.05093786492943764, -0.07166453450918198, -0.17157262563705444, -0.2440703809261322, 0.5125732421875, -0.12562096118927002, 0.1881452202796936, 0.2970770299434662, 0.47556763887405396, -0.024444226175546646, -0.3974202871322632, 0.08360189199447632, -0.07163004577159882, 0.060626495629549026, 0.19636325538158417, -0.07904860377311707, 0.2934178411960602, 0.03997732698917389, 0.3786970376968384, -0.03214072436094284, 0.00013490021228790283, 0.11415193974971771, 0.11657106876373291, -0.558554470539093, -0.432044118642807, 0.14773815870285034, -0.04544905945658684, -0.010962605476379395, 0.5393624305725098, -0.17628809809684753, -0.015161111950874329, 0.23311708867549896, -0.3448251783847809, 0.9554373025894165, -0.22189593315124512, 0.05559729039669037, -0.10647284239530563, 0.029417306184768677, 0.2389662265777588, -0.1890162229537964, 0.04596589505672455, -0.21380457282066345, -0.16405192017555237, 0.053573109209537506, -0.20898404717445374, 0.18096984922885895, 0.27236008644104004, 0.0872393399477005, 0.22162467241287231, -0.3284204304218292, 0.230719655752182, 0.02534162998199463, 0.4471808969974518, -0.16989539563655853, -0.03585067763924599, -0.5194596648216248, 0.026546962559223175, -0.11913833022117615, 0.06875984370708466, -0.0007071159780025482, 0.1327544003725052, -0.2202562838792801, 0.012326940894126892, -0.1737133413553238, 0.08791785687208176, -0.2234751135110855, 0.05343736335635185, -0.3556823134422302, -0.6333140134811401, 0.3397536873817444, 0.3491762578487396, -0.168064147233963, 0.34793537855148315, -0.017139457166194916, 0.32236286997795105, -0.25171104073524475, -0.0765128806233406, -0.021840984001755714, -0.12786485254764557, -0.019676417112350464, -0.10734739899635315, -0.43838098645210266, 0.049491144716739655, -0.17352944612503052, -0.25038450956344604, 0.13329291343688965, 0.18047866225242615, 0.31606537103652954, 0.012458253651857376, -0.21124131977558136, -0.2856992185115814, 0.1075967401266098, -0.010817013680934906, 0.04183245450258255, 0.29788753390312195, 0.03975864499807358, 0.2669134736061096, 0.11098305881023407, -0.22194698452949524, -0.017123188823461533, 0.5728831887245178, -0.07916118949651718, -0.0279122032225132, 0.6649038791656494, 0.2679227590560913, -0.1384141594171524, -0.2283843755722046, 0.23382258415222168, -0.07310106605291367, -0.5962605476379395, 0.19566617906093597, -0.022420452907681465, 0.46563875675201416, 0.10623937845230103, -0.027257855981588364, -0.0959724634885788, -0.43287843465805054, -0.08363072574138641, -0.6366729140281677, -0.34940823912620544, -0.05741356685757637, 0.02547084353864193, 0.1253136843442917, 0.17513889074325562, -0.23246756196022034, -0.11015408486127853, -0.09707686305046082, -0.13767817616462708, 0.15019863843917847, -0.27092093229293823, -0.09309381246566772, 0.15591925382614136, -0.05704544112086296, 0.19726990163326263, -0.28615739941596985, 0.0486677810549736, 0.16435852646827698, 0.161976158618927, -0.15901455283164978, 0.042304933071136475, 0.228115975856781, -0.0007025469094514847, 0.0183386392891407, 0.011892877519130707, -0.7463323473930359, -0.2657853364944458, -0.0789928138256073, 0.18060344457626343, 0.13291317224502563, 0.06434290111064911, -0.1907210499048233, -0.14010389149188995, 0.10891116410493851, -0.36517295241355896, 0.41155335307121277, -0.1569637805223465, 0.10463708639144897, 0.28651726245880127, 0.09398601949214935, 0.3051859140396118, 0.19260652363300323, -0.5772452354431152, 0.04465232044458389, 0.25498929619789124, -0.06436647474765778, 0.3961757719516754, -0.5211470127105713, 0.17091496288776398, -0.02063092589378357, 0.1604808270931244, 0.3715544044971466, -0.21397218108177185, -0.012139230966567993, 0.36510297656059265, 0.03995124250650406, -0.16314101219177246, -0.11998271197080612, 0.24171380698680878, -0.052261628210544586, -0.09099017083644867, 0.008701644837856293, -0.3413943946361542, -0.023440219461917877, -0.10255756974220276, 0.11860361695289612, 0.5501223802566528, 0.03753407299518585, -0.07732140272855759, 0.5141032338142395, 0.24634453654289246, 0.08411313593387604, 0.12136948108673096, 0.22227327525615692, 0.11915265023708344, 0.49250179529190063, -0.0547567643225193, 0.15696612000465393, -0.26011839509010315, 0.6130092144012451, -0.29367631673812866, -0.644980251789093, -0.006450123153626919, 0.4330597519874573, -0.3199165165424347, 0.01929871179163456, 0.13427762687206268, 0.1959327608346939, -0.018950320780277252, -0.050962988287210464, -0.19327312707901, 0.07943591475486755, -0.03826611861586571, 0.0836743712425232, -0.07968633621931076, -0.015339970588684082, 0.11334724724292755, -0.0603860542178154, -0.024330416694283485, 0.21943706274032593, -0.17397795617580414, 0.2462836503982544, 0.018566004931926727, -0.4862482249736786, 0.04395131766796112, 0.27250269055366516, 0.08061230182647705, -0.0020289793610572815, 0.020942913368344307, 0.025240030139684677, 0.07943238317966461, 0.09207899868488312, -0.00848517194390297, 0.17573678493499756, 0.28300631046295166, 0.010402072221040726, 0.133821502327919, 0.09291696548461914, -0.11335079371929169, -0.022985175251960754, 0.5495017766952515, 0.12064947932958603, 0.12073563039302826, 0.15382987260818481, 0.007887598127126694, -0.09923077374696732, -0.0954827144742012, 0.20256361365318298, -0.0021278876811265945, -0.4378032386302948, 0.20901714265346527, -0.06682801246643066, -0.23699752986431122, -0.417127788066864, 0.0372413769364357, -0.19707895815372467, -0.014887195080518723, 0.3963935375213623, 0.06117812544107437, 0.003917615860700607, -0.23815953731536865, 0.01982036605477333, -0.5056637525558472, 0.20215700566768646, 0.255349725484848, 0.4155454933643341, -0.09738852083683014, -0.0015721023082733154, -0.7462618947029114, 0.01747545227408409, -0.06759633123874664, 0.03142686188220978, 0.19182023406028748, -0.06976475566625595, 0.036826860159635544, 0.011216724291443825, 0.4993738532066345, -0.027098005637526512, 0.09059886634349823, 0.44971978664398193, -0.20391389727592468, -0.3902565538883209, -0.136851504445076, 0.08267638832330704, -0.2150254249572754, -0.48969271779060364, 0.048831671476364136, -0.010604828596115112, -0.07951761037111282, -0.2879244387149811, 0.09391862154006958, 0.17607006430625916, 0.0822710394859314, 0.39898377656936646, 0.06623383611440659, 0.5405977368354797, 0.21569786965847015, -0.12622076272964478, 0.11104901880025864, 0.15623097121715546, 0.1294635385274887, 0.22703713178634644, 0.21757730841636658, -0.055619046092033386, -0.2633455991744995, -0.112116739153862, -0.1894741952419281, 0.015730775892734528, -0.3136594295501709, 0.02948993444442749, -0.2310892939567566, -0.1121806800365448, 0.04490727186203003, 0.2746727466583252, -0.07003103941679001, 0.11878273636102676, 0.028894543647766113, 0.09179264307022095, -0.36491286754608154, 0.0866609588265419, 0.27735432982444763, -0.16228458285331726, -0.3062387704849243, 0.23320600390434265, 0.235580176115036, -0.373759001493454, 0.06525000184774399, -0.05757538974285126, 0.09475792944431305, 0.4765922427177429, -0.12492737174034119, -0.2435297966003418, 0.3183233439922333, -0.09417067468166351, 0.19253115355968475, -0.09821106493473053, 0.43771234154701233, 0.01033145934343338, 0.08201000094413757, 0.08377259969711304, -0.013787977397441864 ]
https://github.com/huggingface/datasets/issues/6505
> I ran into the same problem when I used a server cluster (Slurm system managed) that couldn't load any of the huggingface datasets or models, but it worked on my laptop. I suspected some system configuration-related problem, but I had no idea. My problems are consistent with [issue #2618](https://github.com/huggingface/datasets/issues/2618). All the huggingface-related libraries I use are the latest versions. have you solved this issue yet? i met the same problem on server but everything works on laptop. I think maybe the filelock repo is contradictory with file system.
Got stuck when I trying to load a dataset
### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0
89
Got stuck when I trying to load a dataset ### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0 > I ran into the same problem when I used a server cluster (Slurm system managed) that couldn't load any of the huggingface datasets or models, but it worked on my laptop. I suspected some system configuration-related problem, but I had no idea. My problems are consistent with [issue #2618](https://github.com/huggingface/datasets/issues/2618). All the huggingface-related libraries I use are the latest versions. have you solved this issue yet? i met the same problem on server but everything works on laptop. I think maybe the filelock repo is contradictory with file system.
[ -0.14756226539611816, -0.29957014322280884, -0.06535666435956955, 0.3141990900039673, 0.3323673605918884, 0.08560338616371155, 0.42914897203445435, 0.07434725016355515, 0.19302590191364288, 0.11410264670848846, -0.14673006534576416, 0.46443262696266174, 0.2579033672809601, -0.086441271007061, -0.2140907645225525, 0.07133340835571289, -0.15374554693698883, 0.10617344081401825, 0.03897762671113014, -0.04555955156683922, 0.0758349746465683, 0.15758010745048523, -0.2834818959236145, 0.02088220976293087, 0.037086013704538345, -0.0018902719020843506, 0.1390603929758072, -0.0268925279378891, -0.043990589678287506, -0.37605351209640503, 0.47842609882354736, 0.03980879485607147, 0.10186618566513062, 0.8280528783798218, -0.00012375824735499918, 0.08041700720787048, 0.5884150862693787, 0.04863279312849045, -0.47880810499191284, -0.2700863480567932, -0.15578703582286835, -0.4294823110103607, 0.21695540845394135, -0.08768746256828308, 0.023126371204853058, 0.039558105170726776, 0.007984410971403122, -0.43502700328826904, 0.3552878499031067, 0.29016414284706116, 0.09129959344863892, 0.03166927397251129, 0.07319439202547073, 0.08587726205587387, -0.013502277433872223, 0.21722210943698883, 0.01225520670413971, 0.36707159876823425, 0.4771386981010437, 0.183477982878685, 0.3030868172645569, -0.20346462726593018, -0.2555583715438843, 0.09509274363517761, 0.03530735522508621, -0.08309300243854523, 0.17042453587055206, -0.2451886385679245, 0.4002735912799835, 0.27393287420272827, 0.7686866521835327, 0.007529876660555601, -0.15956148505210876, -0.19751465320587158, 0.13276812434196472, -0.12937748432159424, 0.16558516025543213, 0.14028239250183105, -0.2675146162509918, 0.19136543571949005, -0.0805872455239296, -0.0010658800601959229, -0.27770286798477173, 0.06846308708190918, -0.21840065717697144, -0.28080329298973083, -0.05370219424366951, 0.17727266252040863, -0.024859078228473663, -0.02612702175974846, 0.08065017312765121, -0.3260534107685089, 0.08579536527395248, 0.406739205121994, -0.783255398273468, 0.1361137330532074, 0.030283259227871895, 0.00008581206202507019, 0.26104971766471863, 0.157681405544281, 0.15574151277542114, 0.03331047296524048, 0.0638585090637207, -0.005135940387845039, 0.3388916552066803, 0.1782284379005432, 0.00796007551252842, -0.11140848696231842, 0.4228982627391815, 0.029213886708021164, -0.10680265724658966, -0.04791492223739624, -0.1800173670053482, -0.18590843677520752, 0.49483513832092285, -0.14530062675476074, 0.23777669668197632, -0.3150399625301361, -0.21850478649139404, 0.07930079102516174, -0.1574154496192932, -0.015112284570932388, 0.05584719777107239, 0.5164165496826172, -0.34567052125930786, 0.33665144443511963, 0.16197067499160767, -0.13369016349315643, -0.29132962226867676, -0.08446331322193146, 0.023933053016662598, -0.32318219542503357, -0.08020541816949844, -0.1518421769142151, 0.3034485876560211, -0.40496891736984253, -0.07215955853462219, 0.007687252014875412, 0.05000840499997139, -0.06870526820421219, 0.12046287953853607, -0.29651737213134766, -0.13809698820114136, 0.24395966529846191, -0.04193411394953728, 0.260410875082016, -0.02144608646631241, -0.24441562592983246, -0.018968753516674042, 0.42398738861083984, -0.32624247670173645, -0.05408467352390289, -0.08144370466470718, 0.10603595525026321, -0.01518276333808899, 0.1275562196969986, -0.41141751408576965, -0.03723617643117905, -0.001420978456735611, -0.1294906735420227, -0.05371412634849548, -0.07776553928852081, 0.14094990491867065, -0.10010474920272827, 0.3481045663356781, 0.31372079253196716, -0.5250808596611023, 0.13998371362686157, -0.4374983310699463, -0.07922357320785522, 0.2295236438512802, 0.18684446811676025, -0.17968058586120605, 0.31223064661026, -0.36760929226875305, -0.06658954918384552, 0.2792794108390808, -0.16989675164222717, -0.6536533832550049, 0.4754558503627777, -0.3203016221523285, 0.04723048210144043, -0.03780737146735191, 0.2081104815006256, 0.05185234174132347, -0.004259832203388214, 0.3294565677642822, 0.2083038091659546, 0.06910838931798935, -0.12840214371681213, -0.23838329315185547, -0.2594095766544342, 0.04954241216182709, 0.42342448234558105, -0.09152667224407196, 0.045278411358594894, 0.16986383497714996, 0.06094242259860039, 0.3191356062889099, 0.1814804971218109, -0.13296684622764587, 0.4863662123680115, 0.19693127274513245, 0.17065447568893433, 0.027730345726013184, 0.03488752245903015, -0.4840685725212097, 0.2070595920085907, -0.026043947786092758, -0.07545829564332962, -0.007137525826692581, -0.06580249965190887, -0.35157155990600586, 0.16082316637039185, -0.18293318152427673, 0.13161040842533112, -0.058573104441165924, 0.033227935433387756, 0.07216526567935944, 0.33924955129623413, -0.01543813943862915, 0.5650485754013062, -0.2543603479862213, 0.02095929905772209, -0.35762447118759155, 0.17810511589050293, 0.013830423355102539, 0.015150181949138641, -0.018109872937202454, -0.28185829520225525, 0.05680353567004204, -0.1897476315498352, -0.2681730389595032, 0.07827714830636978, 0.0264517180621624, -0.04128254950046539, -0.36079248785972595, -0.28894808888435364, 0.02705569379031658, -0.03906876593828201, -0.007291254587471485, 0.35410019755363464, 0.4311225712299347, -0.21587952971458435, 0.08679258823394775, 0.026701025664806366, -0.36242422461509705, 0.4272859990596771, 0.07481639087200165, -0.33149874210357666, 0.2627224922180176, -0.11857445538043976, -0.079763263463974, 0.24132584035396576, 0.6704695820808411, 0.06764787435531616, 0.37708693742752075, 0.14791239798069, -0.14288641512393951, -0.19432660937309265, 0.5178009271621704, -0.1841992288827896, -0.0806206464767456, 0.3954075276851654, 0.04731320962309837, 0.11418405175209045, 0.02846301533281803, 0.016698285937309265, 0.4645179808139801, 0.18101003766059875, -0.21948355436325073, -0.024110816419124603, 0.2816736102104187, -0.24956659972667694, 0.022940747439861298, 0.054192304611206055, -0.04056651517748833, 0.46552354097366333, 0.23526503145694733, -0.03125627711415291, 0.0006105154752731323, -0.3826005160808563, 0.1428270936012268, 0.29854679107666016, -0.06341226398944855, 0.20036190748214722, -0.4018188714981079, -0.04347240552306175, 0.2307191789150238, 0.12913964688777924, -0.13810193538665771, -0.14454291760921478, -0.33830079436302185, 0.20466028153896332, 0.42485809326171875, 0.2629430294036865, -0.08904450386762619, 0.09143481403589249, 0.09263486415147781, -0.33727818727493286, -0.24601121246814728, -0.04846565052866936, -0.47099941968917847, -0.13478854298591614, 0.3784029483795166, -0.0016848929226398468, 0.29870396852493286, -0.1160372644662857, -0.2341952919960022, 0.08828818798065186, -0.11083364486694336, 0.029360268265008926, 0.15322041511535645, 0.34474706649780273, 0.07942535728216171, 0.5676671862602234, -0.04440593346953392, 0.2735508382320404, 0.2426721602678299, -0.16614815592765808, -0.1394895613193512, 0.23835983872413635, -0.03265105560421944, 0.13928396999835968, 0.01740274578332901, -0.3209625482559204, -0.25672784447669983, -0.37672966718673706, 0.2944644093513489, -0.26889923214912415, 0.02011392079293728, 0.29028570652008057, 0.0989375039935112, 0.3616393506526947, 0.21879209578037262, 0.10703720152378082, -0.12758849561214447, -0.467333048582077, 0.32085683941841125, 0.06556269526481628, -0.3119955062866211, -0.009377121925354004, 0.29435238242149353, 0.10033952444791794, -0.04088577255606651, -0.537416398525238, 0.0834231823682785, -0.4925663471221924, 0.10881437361240387, -0.3642779588699341, -0.07865628600120544, 0.23322221636772156, -0.31138527393341064, 0.05039549618959427, 0.09137758612632751, -0.24596768617630005, -0.018698066473007202, 0.04036612808704376, 0.10222253203392029, 0.28081458806991577, 0.5861592292785645, -0.11759024858474731, 0.34345391392707825, 0.2890496850013733, -0.11136661469936371, 0.23438704013824463, 0.08819316327571869, 0.2808302342891693, -0.42505213618278503, -0.40689781308174133, -0.2516189515590668, 0.19838771224021912, -0.13278360664844513, 0.0013650692999362946, -0.039240218698978424, -0.06804421544075012, -0.19680586457252502, -0.30485033988952637, -0.01814068853855133, -0.1369103491306305, 0.0463469997048378, -0.26728355884552, -0.17720596492290497, 0.011736884713172913, -0.05058283358812332, -0.12934650480747223, -0.19541426002979279, -0.201359361410141, 0.3096253573894501, 0.1866951584815979, -0.14182552695274353, -0.22736753523349762, -0.09904180467128754, -0.39430612325668335, 0.3365449011325836, -0.18966272473335266, 0.43215039372444153, -0.20643958449363708, 0.20712752640247345, 0.34758877754211426, -0.28210026025772095, 0.6598774194717407, -0.08056042343378067, 0.33480820059776306, 0.20435509085655212, 0.01507066935300827, -0.48171481490135193, 0.026628397405147552, 0.14627087116241455, 0.21990129351615906, 0.13532453775405884, 0.26050102710723877, -0.4915229082107544, -0.14013263583183289, -0.04511469230055809, 0.3597457706928253, -0.06620720028877258, -0.4381331205368042, -0.3246278166770935, -0.36435428261756897, -0.3803083300590515, -0.07079006731510162, -0.0779561996459961, 0.09101417660713196, 0.03523524850606918, -0.32881033420562744, -0.1981429159641266, 0.01273057609796524, -0.05093786492943764, -0.07166453450918198, -0.17157262563705444, -0.2440703809261322, 0.5125732421875, -0.12562096118927002, 0.1881452202796936, 0.2970770299434662, 0.47556763887405396, -0.024444226175546646, -0.3974202871322632, 0.08360189199447632, -0.07163004577159882, 0.060626495629549026, 0.19636325538158417, -0.07904860377311707, 0.2934178411960602, 0.03997732698917389, 0.3786970376968384, -0.03214072436094284, 0.00013490021228790283, 0.11415193974971771, 0.11657106876373291, -0.558554470539093, -0.432044118642807, 0.14773815870285034, -0.04544905945658684, -0.010962605476379395, 0.5393624305725098, -0.17628809809684753, -0.015161111950874329, 0.23311708867549896, -0.3448251783847809, 0.9554373025894165, -0.22189593315124512, 0.05559729039669037, -0.10647284239530563, 0.029417306184768677, 0.2389662265777588, -0.1890162229537964, 0.04596589505672455, -0.21380457282066345, -0.16405192017555237, 0.053573109209537506, -0.20898404717445374, 0.18096984922885895, 0.27236008644104004, 0.0872393399477005, 0.22162467241287231, -0.3284204304218292, 0.230719655752182, 0.02534162998199463, 0.4471808969974518, -0.16989539563655853, -0.03585067763924599, -0.5194596648216248, 0.026546962559223175, -0.11913833022117615, 0.06875984370708466, -0.0007071159780025482, 0.1327544003725052, -0.2202562838792801, 0.012326940894126892, -0.1737133413553238, 0.08791785687208176, -0.2234751135110855, 0.05343736335635185, -0.3556823134422302, -0.6333140134811401, 0.3397536873817444, 0.3491762578487396, -0.168064147233963, 0.34793537855148315, -0.017139457166194916, 0.32236286997795105, -0.25171104073524475, -0.0765128806233406, -0.021840984001755714, -0.12786485254764557, -0.019676417112350464, -0.10734739899635315, -0.43838098645210266, 0.049491144716739655, -0.17352944612503052, -0.25038450956344604, 0.13329291343688965, 0.18047866225242615, 0.31606537103652954, 0.012458253651857376, -0.21124131977558136, -0.2856992185115814, 0.1075967401266098, -0.010817013680934906, 0.04183245450258255, 0.29788753390312195, 0.03975864499807358, 0.2669134736061096, 0.11098305881023407, -0.22194698452949524, -0.017123188823461533, 0.5728831887245178, -0.07916118949651718, -0.0279122032225132, 0.6649038791656494, 0.2679227590560913, -0.1384141594171524, -0.2283843755722046, 0.23382258415222168, -0.07310106605291367, -0.5962605476379395, 0.19566617906093597, -0.022420452907681465, 0.46563875675201416, 0.10623937845230103, -0.027257855981588364, -0.0959724634885788, -0.43287843465805054, -0.08363072574138641, -0.6366729140281677, -0.34940823912620544, -0.05741356685757637, 0.02547084353864193, 0.1253136843442917, 0.17513889074325562, -0.23246756196022034, -0.11015408486127853, -0.09707686305046082, -0.13767817616462708, 0.15019863843917847, -0.27092093229293823, -0.09309381246566772, 0.15591925382614136, -0.05704544112086296, 0.19726990163326263, -0.28615739941596985, 0.0486677810549736, 0.16435852646827698, 0.161976158618927, -0.15901455283164978, 0.042304933071136475, 0.228115975856781, -0.0007025469094514847, 0.0183386392891407, 0.011892877519130707, -0.7463323473930359, -0.2657853364944458, -0.0789928138256073, 0.18060344457626343, 0.13291317224502563, 0.06434290111064911, -0.1907210499048233, -0.14010389149188995, 0.10891116410493851, -0.36517295241355896, 0.41155335307121277, -0.1569637805223465, 0.10463708639144897, 0.28651726245880127, 0.09398601949214935, 0.3051859140396118, 0.19260652363300323, -0.5772452354431152, 0.04465232044458389, 0.25498929619789124, -0.06436647474765778, 0.3961757719516754, -0.5211470127105713, 0.17091496288776398, -0.02063092589378357, 0.1604808270931244, 0.3715544044971466, -0.21397218108177185, -0.012139230966567993, 0.36510297656059265, 0.03995124250650406, -0.16314101219177246, -0.11998271197080612, 0.24171380698680878, -0.052261628210544586, -0.09099017083644867, 0.008701644837856293, -0.3413943946361542, -0.023440219461917877, -0.10255756974220276, 0.11860361695289612, 0.5501223802566528, 0.03753407299518585, -0.07732140272855759, 0.5141032338142395, 0.24634453654289246, 0.08411313593387604, 0.12136948108673096, 0.22227327525615692, 0.11915265023708344, 0.49250179529190063, -0.0547567643225193, 0.15696612000465393, -0.26011839509010315, 0.6130092144012451, -0.29367631673812866, -0.644980251789093, -0.006450123153626919, 0.4330597519874573, -0.3199165165424347, 0.01929871179163456, 0.13427762687206268, 0.1959327608346939, -0.018950320780277252, -0.050962988287210464, -0.19327312707901, 0.07943591475486755, -0.03826611861586571, 0.0836743712425232, -0.07968633621931076, -0.015339970588684082, 0.11334724724292755, -0.0603860542178154, -0.024330416694283485, 0.21943706274032593, -0.17397795617580414, 0.2462836503982544, 0.018566004931926727, -0.4862482249736786, 0.04395131766796112, 0.27250269055366516, 0.08061230182647705, -0.0020289793610572815, 0.020942913368344307, 0.025240030139684677, 0.07943238317966461, 0.09207899868488312, -0.00848517194390297, 0.17573678493499756, 0.28300631046295166, 0.010402072221040726, 0.133821502327919, 0.09291696548461914, -0.11335079371929169, -0.022985175251960754, 0.5495017766952515, 0.12064947932958603, 0.12073563039302826, 0.15382987260818481, 0.007887598127126694, -0.09923077374696732, -0.0954827144742012, 0.20256361365318298, -0.0021278876811265945, -0.4378032386302948, 0.20901714265346527, -0.06682801246643066, -0.23699752986431122, -0.417127788066864, 0.0372413769364357, -0.19707895815372467, -0.014887195080518723, 0.3963935375213623, 0.06117812544107437, 0.003917615860700607, -0.23815953731536865, 0.01982036605477333, -0.5056637525558472, 0.20215700566768646, 0.255349725484848, 0.4155454933643341, -0.09738852083683014, -0.0015721023082733154, -0.7462618947029114, 0.01747545227408409, -0.06759633123874664, 0.03142686188220978, 0.19182023406028748, -0.06976475566625595, 0.036826860159635544, 0.011216724291443825, 0.4993738532066345, -0.027098005637526512, 0.09059886634349823, 0.44971978664398193, -0.20391389727592468, -0.3902565538883209, -0.136851504445076, 0.08267638832330704, -0.2150254249572754, -0.48969271779060364, 0.048831671476364136, -0.010604828596115112, -0.07951761037111282, -0.2879244387149811, 0.09391862154006958, 0.17607006430625916, 0.0822710394859314, 0.39898377656936646, 0.06623383611440659, 0.5405977368354797, 0.21569786965847015, -0.12622076272964478, 0.11104901880025864, 0.15623097121715546, 0.1294635385274887, 0.22703713178634644, 0.21757730841636658, -0.055619046092033386, -0.2633455991744995, -0.112116739153862, -0.1894741952419281, 0.015730775892734528, -0.3136594295501709, 0.02948993444442749, -0.2310892939567566, -0.1121806800365448, 0.04490727186203003, 0.2746727466583252, -0.07003103941679001, 0.11878273636102676, 0.028894543647766113, 0.09179264307022095, -0.36491286754608154, 0.0866609588265419, 0.27735432982444763, -0.16228458285331726, -0.3062387704849243, 0.23320600390434265, 0.235580176115036, -0.373759001493454, 0.06525000184774399, -0.05757538974285126, 0.09475792944431305, 0.4765922427177429, -0.12492737174034119, -0.2435297966003418, 0.3183233439922333, -0.09417067468166351, 0.19253115355968475, -0.09821106493473053, 0.43771234154701233, 0.01033145934343338, 0.08201000094413757, 0.08377259969711304, -0.013787977397441864 ]
https://github.com/huggingface/datasets/issues/6505
I am having the same issue on a computing cluster but this works on my laptop as well. I instead have this error: `/home/.conda/envs/py10/lib/python3.10/site-packages/filelock/_unix.py", line 43, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 5] Input/output error` the load_dataset command does not work on server for local or hosted hugging-face datasets, and I have tried for several files
Got stuck when I trying to load a dataset
### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0
58
Got stuck when I trying to load a dataset ### Describe the bug Hello, everyone. I met a problem when I am trying to load a data file using load_dataset method on a Debian 10 system. The data file is not very large, only 1.63MB with 600 records. Here is my code: from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') I waited it for 20 minutes. It still no response. I cannot using Ctrl+C to cancel the command. I have to use Ctrl+Z to kill it. I also try it with a txt file, it still no response in a long time. I can load the same file successfully using my laptop (windows 10, python 3.8.5, datasets==2.14.5). I can also make it on another computer (Ubuntu 20.04.5 LTS, python 3.10.13, datasets 2.14.7). It only takes me 1-2 miniutes. Could you give me some suggestions? Thank you. ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset('json', data_files='mypath/oaast_rm_zh.json') ### Expected behavior I hope it can load the file successfully. ### Environment info OS: Debian GNU/Linux 10 Python: Python 3.10.13 Pip list: Package Version ------------------------- ------------ accelerate 0.25.0 addict 2.4.0 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.1.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 crcmod 1.7 cryptography 41.0.7 cycler 0.12.1 datasets 2.14.7 dill 0.3.7 docstring-parser 0.15 einops 0.7.0 exceptiongroup 1.2.0 fastapi 0.105.0 ffmpy 0.3.1 filelock 3.13.1 fonttools 4.46.0 frozenlist 1.4.1 fsspec 2023.10.0 gast 0.5.4 gradio 3.50.2 gradio_client 0.6.1 h11 0.14.0 httpcore 1.0.2 httpx 0.25.2 huggingface-hub 0.19.4 idna 3.6 importlib-metadata 7.0.0 importlib-resources 6.1.1 jieba 0.42.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 mdurl 0.1.2 modelscope 1.10.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.15 networkx 3.2.1 nltk 3.8.1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 orjson 3.9.10 oss2 2.18.3 packaging 23.2 pandas 2.1.4 peft 0.7.1 Pillow 10.1.0 pip 23.3.1 platformdirs 4.1.0 protobuf 4.25.1 psutil 5.9.6 pyarrow 14.0.1 pyarrow-hotfix 0.6 pycparser 2.21 pycryptodome 3.19.0 pydantic 2.5.2 pydantic_core 2.14.5 pydub 0.25.1 Pygments 2.17.2 pyparsing 3.1.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 rich 13.7.0 rouge-chinese 1.0.3 rpds-py 0.13.2 safetensors 0.4.1 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 simplejson 3.19.2 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 sse-starlette 1.8.2 starlette 0.27.0 sympy 1.12 tiktoken 0.5.2 tokenizers 0.15.0 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 tqdm 4.66.1 transformers 4.36.1 triton 2.1.0 trl 0.7.4 typing_extensions 4.9.0 tyro 0.6.0 tzdata 2023.3 urllib3 2.1.0 uvicorn 0.24.0.post1 websockets 11.0.3 wheel 0.41.2 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0 I am having the same issue on a computing cluster but this works on my laptop as well. I instead have this error: `/home/.conda/envs/py10/lib/python3.10/site-packages/filelock/_unix.py", line 43, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 5] Input/output error` the load_dataset command does not work on server for local or hosted hugging-face datasets, and I have tried for several files
[ -0.14756226539611816, -0.29957014322280884, -0.06535666435956955, 0.3141990900039673, 0.3323673605918884, 0.08560338616371155, 0.42914897203445435, 0.07434725016355515, 0.19302590191364288, 0.11410264670848846, -0.14673006534576416, 0.46443262696266174, 0.2579033672809601, -0.086441271007061, -0.2140907645225525, 0.07133340835571289, -0.15374554693698883, 0.10617344081401825, 0.03897762671113014, -0.04555955156683922, 0.0758349746465683, 0.15758010745048523, -0.2834818959236145, 0.02088220976293087, 0.037086013704538345, -0.0018902719020843506, 0.1390603929758072, -0.0268925279378891, -0.043990589678287506, -0.37605351209640503, 0.47842609882354736, 0.03980879485607147, 0.10186618566513062, 0.8280528783798218, -0.00012375824735499918, 0.08041700720787048, 0.5884150862693787, 0.04863279312849045, -0.47880810499191284, -0.2700863480567932, -0.15578703582286835, -0.4294823110103607, 0.21695540845394135, -0.08768746256828308, 0.023126371204853058, 0.039558105170726776, 0.007984410971403122, -0.43502700328826904, 0.3552878499031067, 0.29016414284706116, 0.09129959344863892, 0.03166927397251129, 0.07319439202547073, 0.08587726205587387, -0.013502277433872223, 0.21722210943698883, 0.01225520670413971, 0.36707159876823425, 0.4771386981010437, 0.183477982878685, 0.3030868172645569, -0.20346462726593018, -0.2555583715438843, 0.09509274363517761, 0.03530735522508621, -0.08309300243854523, 0.17042453587055206, -0.2451886385679245, 0.4002735912799835, 0.27393287420272827, 0.7686866521835327, 0.007529876660555601, -0.15956148505210876, -0.19751465320587158, 0.13276812434196472, -0.12937748432159424, 0.16558516025543213, 0.14028239250183105, -0.2675146162509918, 0.19136543571949005, -0.0805872455239296, -0.0010658800601959229, -0.27770286798477173, 0.06846308708190918, -0.21840065717697144, -0.28080329298973083, -0.05370219424366951, 0.17727266252040863, -0.024859078228473663, -0.02612702175974846, 0.08065017312765121, -0.3260534107685089, 0.08579536527395248, 0.406739205121994, -0.783255398273468, 0.1361137330532074, 0.030283259227871895, 0.00008581206202507019, 0.26104971766471863, 0.157681405544281, 0.15574151277542114, 0.03331047296524048, 0.0638585090637207, -0.005135940387845039, 0.3388916552066803, 0.1782284379005432, 0.00796007551252842, -0.11140848696231842, 0.4228982627391815, 0.029213886708021164, -0.10680265724658966, -0.04791492223739624, -0.1800173670053482, -0.18590843677520752, 0.49483513832092285, -0.14530062675476074, 0.23777669668197632, -0.3150399625301361, -0.21850478649139404, 0.07930079102516174, -0.1574154496192932, -0.015112284570932388, 0.05584719777107239, 0.5164165496826172, -0.34567052125930786, 0.33665144443511963, 0.16197067499160767, -0.13369016349315643, -0.29132962226867676, -0.08446331322193146, 0.023933053016662598, -0.32318219542503357, -0.08020541816949844, -0.1518421769142151, 0.3034485876560211, -0.40496891736984253, -0.07215955853462219, 0.007687252014875412, 0.05000840499997139, -0.06870526820421219, 0.12046287953853607, -0.29651737213134766, -0.13809698820114136, 0.24395966529846191, -0.04193411394953728, 0.260410875082016, -0.02144608646631241, -0.24441562592983246, -0.018968753516674042, 0.42398738861083984, -0.32624247670173645, -0.05408467352390289, -0.08144370466470718, 0.10603595525026321, -0.01518276333808899, 0.1275562196969986, -0.41141751408576965, -0.03723617643117905, -0.001420978456735611, -0.1294906735420227, -0.05371412634849548, -0.07776553928852081, 0.14094990491867065, -0.10010474920272827, 0.3481045663356781, 0.31372079253196716, -0.5250808596611023, 0.13998371362686157, -0.4374983310699463, -0.07922357320785522, 0.2295236438512802, 0.18684446811676025, -0.17968058586120605, 0.31223064661026, -0.36760929226875305, -0.06658954918384552, 0.2792794108390808, -0.16989675164222717, -0.6536533832550049, 0.4754558503627777, -0.3203016221523285, 0.04723048210144043, -0.03780737146735191, 0.2081104815006256, 0.05185234174132347, -0.004259832203388214, 0.3294565677642822, 0.2083038091659546, 0.06910838931798935, -0.12840214371681213, -0.23838329315185547, -0.2594095766544342, 0.04954241216182709, 0.42342448234558105, -0.09152667224407196, 0.045278411358594894, 0.16986383497714996, 0.06094242259860039, 0.3191356062889099, 0.1814804971218109, -0.13296684622764587, 0.4863662123680115, 0.19693127274513245, 0.17065447568893433, 0.027730345726013184, 0.03488752245903015, -0.4840685725212097, 0.2070595920085907, -0.026043947786092758, -0.07545829564332962, -0.007137525826692581, -0.06580249965190887, -0.35157155990600586, 0.16082316637039185, -0.18293318152427673, 0.13161040842533112, -0.058573104441165924, 0.033227935433387756, 0.07216526567935944, 0.33924955129623413, -0.01543813943862915, 0.5650485754013062, -0.2543603479862213, 0.02095929905772209, -0.35762447118759155, 0.17810511589050293, 0.013830423355102539, 0.015150181949138641, -0.018109872937202454, -0.28185829520225525, 0.05680353567004204, -0.1897476315498352, -0.2681730389595032, 0.07827714830636978, 0.0264517180621624, -0.04128254950046539, -0.36079248785972595, -0.28894808888435364, 0.02705569379031658, -0.03906876593828201, -0.007291254587471485, 0.35410019755363464, 0.4311225712299347, -0.21587952971458435, 0.08679258823394775, 0.026701025664806366, -0.36242422461509705, 0.4272859990596771, 0.07481639087200165, -0.33149874210357666, 0.2627224922180176, -0.11857445538043976, -0.079763263463974, 0.24132584035396576, 0.6704695820808411, 0.06764787435531616, 0.37708693742752075, 0.14791239798069, -0.14288641512393951, -0.19432660937309265, 0.5178009271621704, -0.1841992288827896, -0.0806206464767456, 0.3954075276851654, 0.04731320962309837, 0.11418405175209045, 0.02846301533281803, 0.016698285937309265, 0.4645179808139801, 0.18101003766059875, -0.21948355436325073, -0.024110816419124603, 0.2816736102104187, -0.24956659972667694, 0.022940747439861298, 0.054192304611206055, -0.04056651517748833, 0.46552354097366333, 0.23526503145694733, -0.03125627711415291, 0.0006105154752731323, -0.3826005160808563, 0.1428270936012268, 0.29854679107666016, -0.06341226398944855, 0.20036190748214722, -0.4018188714981079, -0.04347240552306175, 0.2307191789150238, 0.12913964688777924, -0.13810193538665771, -0.14454291760921478, -0.33830079436302185, 0.20466028153896332, 0.42485809326171875, 0.2629430294036865, -0.08904450386762619, 0.09143481403589249, 0.09263486415147781, -0.33727818727493286, -0.24601121246814728, -0.04846565052866936, -0.47099941968917847, -0.13478854298591614, 0.3784029483795166, -0.0016848929226398468, 0.29870396852493286, -0.1160372644662857, -0.2341952919960022, 0.08828818798065186, -0.11083364486694336, 0.029360268265008926, 0.15322041511535645, 0.34474706649780273, 0.07942535728216171, 0.5676671862602234, -0.04440593346953392, 0.2735508382320404, 0.2426721602678299, -0.16614815592765808, -0.1394895613193512, 0.23835983872413635, -0.03265105560421944, 0.13928396999835968, 0.01740274578332901, -0.3209625482559204, -0.25672784447669983, -0.37672966718673706, 0.2944644093513489, -0.26889923214912415, 0.02011392079293728, 0.29028570652008057, 0.0989375039935112, 0.3616393506526947, 0.21879209578037262, 0.10703720152378082, -0.12758849561214447, -0.467333048582077, 0.32085683941841125, 0.06556269526481628, -0.3119955062866211, -0.009377121925354004, 0.29435238242149353, 0.10033952444791794, -0.04088577255606651, -0.537416398525238, 0.0834231823682785, -0.4925663471221924, 0.10881437361240387, -0.3642779588699341, -0.07865628600120544, 0.23322221636772156, -0.31138527393341064, 0.05039549618959427, 0.09137758612632751, -0.24596768617630005, -0.018698066473007202, 0.04036612808704376, 0.10222253203392029, 0.28081458806991577, 0.5861592292785645, -0.11759024858474731, 0.34345391392707825, 0.2890496850013733, -0.11136661469936371, 0.23438704013824463, 0.08819316327571869, 0.2808302342891693, -0.42505213618278503, -0.40689781308174133, -0.2516189515590668, 0.19838771224021912, -0.13278360664844513, 0.0013650692999362946, -0.039240218698978424, -0.06804421544075012, -0.19680586457252502, -0.30485033988952637, -0.01814068853855133, -0.1369103491306305, 0.0463469997048378, -0.26728355884552, -0.17720596492290497, 0.011736884713172913, -0.05058283358812332, -0.12934650480747223, -0.19541426002979279, -0.201359361410141, 0.3096253573894501, 0.1866951584815979, -0.14182552695274353, -0.22736753523349762, -0.09904180467128754, -0.39430612325668335, 0.3365449011325836, -0.18966272473335266, 0.43215039372444153, -0.20643958449363708, 0.20712752640247345, 0.34758877754211426, -0.28210026025772095, 0.6598774194717407, -0.08056042343378067, 0.33480820059776306, 0.20435509085655212, 0.01507066935300827, -0.48171481490135193, 0.026628397405147552, 0.14627087116241455, 0.21990129351615906, 0.13532453775405884, 0.26050102710723877, -0.4915229082107544, -0.14013263583183289, -0.04511469230055809, 0.3597457706928253, -0.06620720028877258, -0.4381331205368042, -0.3246278166770935, -0.36435428261756897, -0.3803083300590515, -0.07079006731510162, -0.0779561996459961, 0.09101417660713196, 0.03523524850606918, -0.32881033420562744, -0.1981429159641266, 0.01273057609796524, -0.05093786492943764, -0.07166453450918198, -0.17157262563705444, -0.2440703809261322, 0.5125732421875, -0.12562096118927002, 0.1881452202796936, 0.2970770299434662, 0.47556763887405396, -0.024444226175546646, -0.3974202871322632, 0.08360189199447632, -0.07163004577159882, 0.060626495629549026, 0.19636325538158417, -0.07904860377311707, 0.2934178411960602, 0.03997732698917389, 0.3786970376968384, -0.03214072436094284, 0.00013490021228790283, 0.11415193974971771, 0.11657106876373291, -0.558554470539093, -0.432044118642807, 0.14773815870285034, -0.04544905945658684, -0.010962605476379395, 0.5393624305725098, -0.17628809809684753, -0.015161111950874329, 0.23311708867549896, -0.3448251783847809, 0.9554373025894165, -0.22189593315124512, 0.05559729039669037, -0.10647284239530563, 0.029417306184768677, 0.2389662265777588, -0.1890162229537964, 0.04596589505672455, -0.21380457282066345, -0.16405192017555237, 0.053573109209537506, -0.20898404717445374, 0.18096984922885895, 0.27236008644104004, 0.0872393399477005, 0.22162467241287231, -0.3284204304218292, 0.230719655752182, 0.02534162998199463, 0.4471808969974518, -0.16989539563655853, -0.03585067763924599, -0.5194596648216248, 0.026546962559223175, -0.11913833022117615, 0.06875984370708466, -0.0007071159780025482, 0.1327544003725052, -0.2202562838792801, 0.012326940894126892, -0.1737133413553238, 0.08791785687208176, -0.2234751135110855, 0.05343736335635185, -0.3556823134422302, -0.6333140134811401, 0.3397536873817444, 0.3491762578487396, -0.168064147233963, 0.34793537855148315, -0.017139457166194916, 0.32236286997795105, -0.25171104073524475, -0.0765128806233406, -0.021840984001755714, -0.12786485254764557, -0.019676417112350464, -0.10734739899635315, -0.43838098645210266, 0.049491144716739655, -0.17352944612503052, -0.25038450956344604, 0.13329291343688965, 0.18047866225242615, 0.31606537103652954, 0.012458253651857376, -0.21124131977558136, -0.2856992185115814, 0.1075967401266098, -0.010817013680934906, 0.04183245450258255, 0.29788753390312195, 0.03975864499807358, 0.2669134736061096, 0.11098305881023407, -0.22194698452949524, -0.017123188823461533, 0.5728831887245178, -0.07916118949651718, -0.0279122032225132, 0.6649038791656494, 0.2679227590560913, -0.1384141594171524, -0.2283843755722046, 0.23382258415222168, -0.07310106605291367, -0.5962605476379395, 0.19566617906093597, -0.022420452907681465, 0.46563875675201416, 0.10623937845230103, -0.027257855981588364, -0.0959724634885788, -0.43287843465805054, -0.08363072574138641, -0.6366729140281677, -0.34940823912620544, -0.05741356685757637, 0.02547084353864193, 0.1253136843442917, 0.17513889074325562, -0.23246756196022034, -0.11015408486127853, -0.09707686305046082, -0.13767817616462708, 0.15019863843917847, -0.27092093229293823, -0.09309381246566772, 0.15591925382614136, -0.05704544112086296, 0.19726990163326263, -0.28615739941596985, 0.0486677810549736, 0.16435852646827698, 0.161976158618927, -0.15901455283164978, 0.042304933071136475, 0.228115975856781, -0.0007025469094514847, 0.0183386392891407, 0.011892877519130707, -0.7463323473930359, -0.2657853364944458, -0.0789928138256073, 0.18060344457626343, 0.13291317224502563, 0.06434290111064911, -0.1907210499048233, -0.14010389149188995, 0.10891116410493851, -0.36517295241355896, 0.41155335307121277, -0.1569637805223465, 0.10463708639144897, 0.28651726245880127, 0.09398601949214935, 0.3051859140396118, 0.19260652363300323, -0.5772452354431152, 0.04465232044458389, 0.25498929619789124, -0.06436647474765778, 0.3961757719516754, -0.5211470127105713, 0.17091496288776398, -0.02063092589378357, 0.1604808270931244, 0.3715544044971466, -0.21397218108177185, -0.012139230966567993, 0.36510297656059265, 0.03995124250650406, -0.16314101219177246, -0.11998271197080612, 0.24171380698680878, -0.052261628210544586, -0.09099017083644867, 0.008701644837856293, -0.3413943946361542, -0.023440219461917877, -0.10255756974220276, 0.11860361695289612, 0.5501223802566528, 0.03753407299518585, -0.07732140272855759, 0.5141032338142395, 0.24634453654289246, 0.08411313593387604, 0.12136948108673096, 0.22227327525615692, 0.11915265023708344, 0.49250179529190063, -0.0547567643225193, 0.15696612000465393, -0.26011839509010315, 0.6130092144012451, -0.29367631673812866, -0.644980251789093, -0.006450123153626919, 0.4330597519874573, -0.3199165165424347, 0.01929871179163456, 0.13427762687206268, 0.1959327608346939, -0.018950320780277252, -0.050962988287210464, -0.19327312707901, 0.07943591475486755, -0.03826611861586571, 0.0836743712425232, -0.07968633621931076, -0.015339970588684082, 0.11334724724292755, -0.0603860542178154, -0.024330416694283485, 0.21943706274032593, -0.17397795617580414, 0.2462836503982544, 0.018566004931926727, -0.4862482249736786, 0.04395131766796112, 0.27250269055366516, 0.08061230182647705, -0.0020289793610572815, 0.020942913368344307, 0.025240030139684677, 0.07943238317966461, 0.09207899868488312, -0.00848517194390297, 0.17573678493499756, 0.28300631046295166, 0.010402072221040726, 0.133821502327919, 0.09291696548461914, -0.11335079371929169, -0.022985175251960754, 0.5495017766952515, 0.12064947932958603, 0.12073563039302826, 0.15382987260818481, 0.007887598127126694, -0.09923077374696732, -0.0954827144742012, 0.20256361365318298, -0.0021278876811265945, -0.4378032386302948, 0.20901714265346527, -0.06682801246643066, -0.23699752986431122, -0.417127788066864, 0.0372413769364357, -0.19707895815372467, -0.014887195080518723, 0.3963935375213623, 0.06117812544107437, 0.003917615860700607, -0.23815953731536865, 0.01982036605477333, -0.5056637525558472, 0.20215700566768646, 0.255349725484848, 0.4155454933643341, -0.09738852083683014, -0.0015721023082733154, -0.7462618947029114, 0.01747545227408409, -0.06759633123874664, 0.03142686188220978, 0.19182023406028748, -0.06976475566625595, 0.036826860159635544, 0.011216724291443825, 0.4993738532066345, -0.027098005637526512, 0.09059886634349823, 0.44971978664398193, -0.20391389727592468, -0.3902565538883209, -0.136851504445076, 0.08267638832330704, -0.2150254249572754, -0.48969271779060364, 0.048831671476364136, -0.010604828596115112, -0.07951761037111282, -0.2879244387149811, 0.09391862154006958, 0.17607006430625916, 0.0822710394859314, 0.39898377656936646, 0.06623383611440659, 0.5405977368354797, 0.21569786965847015, -0.12622076272964478, 0.11104901880025864, 0.15623097121715546, 0.1294635385274887, 0.22703713178634644, 0.21757730841636658, -0.055619046092033386, -0.2633455991744995, -0.112116739153862, -0.1894741952419281, 0.015730775892734528, -0.3136594295501709, 0.02948993444442749, -0.2310892939567566, -0.1121806800365448, 0.04490727186203003, 0.2746727466583252, -0.07003103941679001, 0.11878273636102676, 0.028894543647766113, 0.09179264307022095, -0.36491286754608154, 0.0866609588265419, 0.27735432982444763, -0.16228458285331726, -0.3062387704849243, 0.23320600390434265, 0.235580176115036, -0.373759001493454, 0.06525000184774399, -0.05757538974285126, 0.09475792944431305, 0.4765922427177429, -0.12492737174034119, -0.2435297966003418, 0.3183233439922333, -0.09417067468166351, 0.19253115355968475, -0.09821106493473053, 0.43771234154701233, 0.01033145934343338, 0.08201000094413757, 0.08377259969711304, -0.013787977397441864 ]
https://github.com/huggingface/datasets/issues/6496
I transferred from datasets-server, since the issue is more about `datasets` and the integration with `huggingface_hub`.
Error when writing a dataset to HF Hub: A commit has happened since. Please refresh and try again.
**Describe the bug** Getting a `412 Client Error: Precondition Failed` when trying to write a dataset to the HF hub. ``` huggingface_hub.utils._errors.HfHubHTTPError: 412 Client Error: Precondition Failed for url: https://huggingface.co/api/datasets/GLorr/test-dask/commit/main (Request ID: Root=1-657ae26f-3bd92bf861bb254b2cc0826c;50a09ab7-9347-406a-ba49-69f98abee9cc) A commit has happened since. Please refresh and try again. ``` **Steps to reproduce the bug** This is a minimal reproducer: ``` import dask.dataframe as dd import pandas as pd import random import os import huggingface_hub import datasets huggingface_hub.login(token=os.getenv("HF_TOKEN")) data = {"number": [random.randint(0,10) for _ in range(1000)]} df = pd.DataFrame.from_dict(data) dataframe = dd.from_pandas(df, npartitions=1) dataframe = dataframe.repartition(npartitions=3) schema = datasets.Features({"number": datasets.Value("int64")}).arrow_schema repo_id = "GLorr/test-dask" repo_path = f"hf://datasets/{repo_id}" huggingface_hub.create_repo(repo_id=repo_id, repo_type="dataset", exist_ok=True) dd.to_parquet(dataframe, path=f"{repo_path}/data", schema=schema) ``` **Expected behavior** Would expect to write to the hub without any problem. **Environment info** ``` datasets==2.15.0 huggingface-hub==0.19.4 ```
16
Error when writing a dataset to HF Hub: A commit has happened since. Please refresh and try again. **Describe the bug** Getting a `412 Client Error: Precondition Failed` when trying to write a dataset to the HF hub. ``` huggingface_hub.utils._errors.HfHubHTTPError: 412 Client Error: Precondition Failed for url: https://huggingface.co/api/datasets/GLorr/test-dask/commit/main (Request ID: Root=1-657ae26f-3bd92bf861bb254b2cc0826c;50a09ab7-9347-406a-ba49-69f98abee9cc) A commit has happened since. Please refresh and try again. ``` **Steps to reproduce the bug** This is a minimal reproducer: ``` import dask.dataframe as dd import pandas as pd import random import os import huggingface_hub import datasets huggingface_hub.login(token=os.getenv("HF_TOKEN")) data = {"number": [random.randint(0,10) for _ in range(1000)]} df = pd.DataFrame.from_dict(data) dataframe = dd.from_pandas(df, npartitions=1) dataframe = dataframe.repartition(npartitions=3) schema = datasets.Features({"number": datasets.Value("int64")}).arrow_schema repo_id = "GLorr/test-dask" repo_path = f"hf://datasets/{repo_id}" huggingface_hub.create_repo(repo_id=repo_id, repo_type="dataset", exist_ok=True) dd.to_parquet(dataframe, path=f"{repo_path}/data", schema=schema) ``` **Expected behavior** Would expect to write to the hub without any problem. **Environment info** ``` datasets==2.15.0 huggingface-hub==0.19.4 ``` I transferred from datasets-server, since the issue is more about `datasets` and the integration with `huggingface_hub`.
[ -0.04964565485715866, -0.4572036862373352, 0.11370263248682022, 0.05369827151298523, 0.1025749146938324, -0.17956051230430603, -0.017055967822670937, 0.25558993220329285, -0.07975412160158157, 0.08024415373802185, -0.24189510941505432, -0.2631165385246277, 0.17090658843517303, 0.22325432300567627, 0.17970946431159973, -0.051947206258773804, 0.0653248131275177, 0.05295564606785774, -0.13082534074783325, -0.12712126970291138, -0.10212607681751251, 0.13134236633777618, 0.14696432650089264, 0.2793697714805603, -0.5535671710968018, -0.16914768517017365, -0.24723532795906067, 0.44587963819503784, -0.12104437500238419, -0.29097044467926025, 0.25212180614471436, 0.2763606905937195, 0.2273874431848526, 0.31465184688568115, -0.00012797469389624894, -0.06988731026649475, 0.11604966223239899, -0.0645807534456253, -0.02816634625196457, -0.13671793043613434, -0.2992149591445923, -0.0043350160121917725, 0.040056779980659485, -0.10970404744148254, -0.20841369032859802, 0.030194763094186783, -0.12745213508605957, 0.07740910351276398, 0.5771016478538513, 0.3203027844429016, 0.10853619873523712, 0.3353204131126404, 0.20322000980377197, -0.2991386651992798, -0.10992707312107086, 0.19210605323314667, -0.2147497534751892, 0.21562711894512177, -0.12608270347118378, -0.205007404088974, -0.07216887176036835, -0.23222094774246216, 0.12265519797801971, -0.06209973245859146, 0.2624724507331848, -0.16207051277160645, 0.1429169476032257, -0.3874024748802185, 0.11045205593109131, 0.06195101514458656, 0.2928960919380188, -0.5416526198387146, -0.37216559052467346, 0.06724187731742859, 0.022711526602506638, -0.3729473948478699, 0.35731881856918335, 0.19452381134033203, 0.047680363059043884, 0.2028631567955017, 0.08556629717350006, -0.19160467386245728, -0.05257148668169975, -0.14051267504692078, 0.06091737002134323, -0.03052162006497383, 0.05023577809333801, 0.05380835011601448, -0.05623270571231842, 0.052513886243104935, 0.12375913560390472, -0.27969810366630554, -0.34487172961235046, 0.2604355216026306, -0.27173566818237305, -0.25723737478256226, -0.08487512171268463, 0.20627623796463013, 0.16095349192619324, 0.34703701734542847, -0.09250199794769287, -0.00545262498781085, -0.11298307776451111, -0.08272357285022736, 0.042848050594329834, -0.034050509333610535, 0.08043719828128815, -0.0403621643781662, 0.19417370855808258, 0.2753952145576477, 0.25876885652542114, 0.05023553594946861, 0.20787207782268524, -0.20330150425434113, 0.2111959159374237, -0.21786977350711823, 0.34125494956970215, -0.1819857656955719, -0.2006765604019165, 0.5891807675361633, -0.3625756502151489, 0.12144793570041656, -0.22331129014492035, 0.2981380522251129, -0.09677344560623169, -0.20927420258522034, 0.0341174453496933, 0.39562809467315674, -0.15909363329410553, 0.19236673414707184, -0.2372363954782486, 0.05306212604045868, -0.0640328973531723, 0.10828252881765366, 0.006157979369163513, -0.19435647130012512, 0.03967508673667908, 0.23908016085624695, 0.27306047081947327, -0.45147067308425903, -0.13683666288852692, -0.1000409722328186, -0.06128571182489395, 0.42178037762641907, 0.1273794025182724, 0.3516159653663635, 0.21983693540096283, -0.15266266465187073, -0.06025567650794983, -0.14319752156734467, -0.17570146918296814, -0.1587200164794922, -0.2923940122127533, 0.010846746154129505, -0.16300460696220398, 0.07132895290851593, -0.4118900001049042, -0.1981745809316635, -0.09514931589365005, 0.20203575491905212, 0.05003398656845093, 0.23313279449939728, -0.16543829441070557, -0.1647193878889084, 0.2829556167125702, 0.6479054689407349, 0.1722383052110672, 0.01398826390504837, 0.4531380832195282, 0.010223982855677605, 0.2215481400489807, 0.2706438899040222, 0.2000492811203003, 0.1886359304189682, -0.16163252294063568, 0.1310412883758545, 0.09375199675559998, -0.5439262986183167, -0.45569556951522827, 0.13658735156059265, -0.22468842566013336, 0.21462823450565338, -0.22718648612499237, -0.09614363312721252, -0.033638469874858856, 0.06290706247091293, 0.0009521283209323883, -0.05379566550254822, 0.2680759131908417, 0.16068129241466522, -0.2007884532213211, -0.13861852884292603, -0.28786295652389526, -0.04260459542274475, 0.031018223613500595, 0.24672092497348785, 0.3799745738506317, 0.07500975579023361, 0.41209566593170166, -0.13249754905700684, 0.1964287906885147, 0.4041304588317871, 0.3924061954021454, 0.1530447155237198, -0.047724463045597076, -0.07743638753890991, -0.22955010831356049, 0.15717719495296478, -0.3907215893268585, 0.16433817148208618, 0.16406944394111633, -0.0652560219168663, -0.27923861145973206, 0.11297277361154556, -0.17597293853759766, -0.24455900490283966, -0.03303295373916626, -0.20939607918262482, -0.025811906903982162, 0.3342444598674774, -0.08911041170358658, 0.8304442167282104, -0.08488039672374725, 0.3619508445262909, 0.04913444444537163, 0.5157830119132996, -0.08898584544658661, -0.25089311599731445, 0.3705123960971832, 0.19139321148395538, 0.39745110273361206, -0.02886836603283882, -0.14144808053970337, 0.3194916844367981, 0.08678960800170898, 0.22452493011951447, 0.027649400755763054, -0.10047699511051178, 0.1858888864517212, -0.18546271324157715, -0.18583519756793976, -0.07855449616909027, 0.06909938901662827, 0.00003729015588760376, 0.1020178347826004, 0.20633910596370697, 0.24811366200447083, 0.11070901155471802, -0.18549281358718872, 0.15741518139839172, 0.08498688787221909, 0.037320852279663086, -0.08498220890760422, 0.1413266956806183, 0.32334625720977783, -0.17720454931259155, -0.1459423005580902, -0.08883243054151535, -0.0898577868938446, -0.10328789055347443, 0.1332819014787674, -0.09476681053638458, 0.3051378130912781, 0.05957121029496193, 0.1637790948152542, -0.03511055186390877, 0.21338875591754913, 0.022594012320041656, 0.24794843792915344, -0.23019304871559143, -0.37822413444519043, 0.08067285269498825, -0.4054769277572632, 0.032645247876644135, 0.003526069223880768, -0.15836939215660095, 0.2775132954120636, 0.03974445164203644, 0.19984683394432068, 0.08488944172859192, -0.3387419581413269, 0.02106489986181259, -0.02182023972272873, 0.12166650593280792, -0.42688286304473877, -0.06458303332328796, -0.2206028699874878, 0.340333491563797, 0.13099262118339539, -0.011728083714842796, -0.3914063572883606, -0.3381009101867676, -0.24239709973335266, 0.3785271644592285, 0.06871220469474792, 0.09208882600069046, 0.08653132617473602, 0.19093787670135498, 0.12409408390522003, 0.04157815873622894, -0.23287400603294373, 0.07332101464271545, 0.05844849720597267, -0.07328777760267258, -0.10684681683778763, 0.022715512663125992, 0.29701659083366394, -0.12407301366329193, 0.10276167839765549, -0.45984411239624023, -0.17685247957706451, -0.08180645108222961, -0.08225170522928238, 0.23021742701530457, 0.07967174053192139, 0.28662535548210144, -0.2325504571199417, 0.046668343245983124, 0.16450881958007812, 0.3057161569595337, -0.20466196537017822, 0.05364944785833359, 0.001407325267791748, -0.1459949016571045, 0.12194278091192245, 0.4473002254962921, 0.06313881278038025, -0.40671759843826294, 0.250255823135376, -0.021958917379379272, 0.2287333607673645, 0.0006270445883274078, -0.016689792275428772, 0.10530789196491241, -0.29324042797088623, -0.20652002096176147, -0.06956607103347778, -0.22493550181388855, 0.22596944868564606, -0.3102932274341583, -0.4844372272491455, 0.13921886682510376, 0.15504157543182373, 0.21735435724258423, -0.22992756962776184, -0.3307926654815674, -0.38777291774749756, -0.2646162509918213, 0.07567111402750015, -0.19369405508041382, -0.0221097432076931, 0.2149115651845932, -0.10121560096740723, 0.10580408573150635, -0.1852104663848877, -0.24496635794639587, 0.23521210253238678, 0.4807363748550415, 0.12787257134914398, -0.20040041208267212, 0.24805167317390442, -0.1549357771873474, 0.19634336233139038, 0.4891390800476074, 0.19531995058059692, 0.7712053656578064, 0.10255466401576996, 0.42058491706848145, -0.14528679847717285, -0.1996169239282608, -0.16091831028461456, -0.050216466188430786, 0.3610454499721527, -0.038630615919828415, -0.20033517479896545, 0.14559558033943176, -0.16533470153808594, -0.560316801071167, 0.1326570063829422, -0.260504812002182, -0.3209240734577179, -0.23836484551429749, 0.10514897108078003, 0.18075872957706451, 0.1372721940279007, 0.07103510946035385, 0.07945828139781952, 0.1956964135169983, 0.4709351658821106, 0.3765646815299988, 0.1867610216140747, -0.25199273228645325, 0.08139760047197342, -0.8549625277519226, 0.025095995515584946, -0.007799319922924042, 0.3718738853931427, -0.24521343410015106, 0.28400707244873047, 0.28948259353637695, -0.1867104321718216, 0.5647767782211304, -0.28556331992149353, 0.09631895273923874, -0.14666514098644257, -0.10171186178922653, -0.5609172582626343, 0.03919215500354767, 0.14724576473236084, 0.43453845381736755, -0.20488350093364716, 0.38405945897102356, -0.16287435591220856, -0.1376136690378189, 0.11560072749853134, -0.4745604395866394, -0.10251803696155548, -0.23214149475097656, -0.27897965908050537, -0.4767877459526062, -0.48866069316864014, 0.3294571042060852, 0.3268088400363922, 0.2929251194000244, -0.050212547183036804, -0.08111446350812912, 0.07436347752809525, 0.10697170346975327, 0.13477057218551636, -0.13439218699932098, 0.20842322707176208, 0.07174810767173767, 0.039757050573825836, 0.08514320850372314, 0.10649016499519348, 0.253994882106781, 0.33606046438217163, -0.00030644237995147705, -0.2687240242958069, 0.2628040015697479, 0.1445712447166443, 0.16465014219284058, 0.5682972073554993, 0.24649465084075928, 0.3873700499534607, 0.15087541937828064, 0.18254496157169342, -0.6216146945953369, 0.016619641333818436, 0.3386607766151428, -0.02722882851958275, -0.7182415723800659, 0.0697934627532959, 0.46476563811302185, -0.19788631796836853, 0.09781487286090851, 0.20742008090019226, 0.9158205986022949, -0.16986307501792908, 0.2686500549316406, 0.18696913123130798, 1.0896129608154297, -0.17467206716537476, 0.1982109397649765, 0.21037107706069946, -0.7221876382827759, 0.4344920217990875, -0.3048067092895508, -0.01688997820019722, -0.41997915506362915, -0.2523020803928375, -0.10944478958845139, -0.2815025746822357, 0.06198418140411377, -0.3747081160545349, -0.11406406760215759, 0.1073787659406662, -0.24109429121017456, 0.30246925354003906, 0.03081969916820526, 0.13745267689228058, -0.5249730944633484, -0.19101271033287048, -0.2906416952610016, 0.07169924676418304, 0.007438871078193188, 0.529477596282959, -0.16106705367565155, -0.26177623867988586, -0.43627703189849854, -0.09385433048009872, -0.3085620105266571, 0.1524781584739685, -0.00551876425743103, -0.05348658561706543, -0.1322026550769806, 0.10296198725700378, 0.208182692527771, -0.05289255827665329, 0.661141574382782, 0.4141384959220886, -0.283755362033844, 0.04848520830273628, -0.20053750276565552, -0.09788525104522705, -0.13923916220664978, -0.07730373740196228, -0.06679648160934448, -0.1586824655532837, -0.4070107936859131, -0.007059868425130844, -0.15226344764232635, -0.18137505650520325, -0.12737739086151123, 0.14050188660621643, -0.09222101420164108, -0.3336799442768097, -0.04064885526895523, -0.12953229248523712, 0.03371955454349518, -0.2407442331314087, 0.011410631239414215, 0.012429207563400269, -0.10770612955093384, -0.1570638120174408, 0.004096608143299818, -0.21720030903816223, -0.133793443441391, 0.5456673502922058, -0.04344576597213745, -0.020418189465999603, 0.33033305406570435, 0.11300995945930481, -0.17441099882125854, -0.12273000180721283, -0.08530965447425842, 0.4130397439002991, -0.6441490650177002, 0.25755202770233154, -0.18335048854351044, -0.11896617710590363, -0.3474872410297394, 0.392483651638031, -0.07901445776224136, -0.21544373035430908, 0.2006034255027771, -0.27572160959243774, -0.3512108325958252, 0.1029406487941742, -0.33547449111938477, 0.26013681292533875, 0.2564588189125061, 0.3288763761520386, 0.02779041975736618, 0.26787492632865906, -0.16188007593154907, 0.0841338187456131, -0.3454839587211609, 0.06345170736312866, 0.2940923571586609, -0.21855349838733673, 0.20930451154708862, -0.14409004151821136, -0.062163449823856354, 0.44314223527908325, -0.30883121490478516, -0.0236080139875412, -0.426199346780777, 0.2257060706615448, 0.050144609063863754, -0.2796373665332794, -0.013810142874717712, -0.22093364596366882, 0.008262431249022484, -0.11879575252532959, 0.2306552529335022, 0.3790530264377594, 0.11446094512939453, -0.2872174084186554, 0.8558241724967957, -0.0876423567533493, -0.26176685094833374, 0.00414489209651947, 0.30240917205810547, 0.047870706766843796, -0.4013963043689728, -0.10333418846130371, -0.24633952975273132, -0.06450804322957993, 0.18011260032653809, 0.22564288973808289, 0.3449159264564514, 0.025672055780887604, 0.2355044186115265, -0.2331809401512146, -0.06412988156080246, 0.051704440265893936, 0.45511749386787415, -0.06025462970137596, -0.1989632099866867, -0.29658499360084534, 0.13470050692558289, 0.029610341414809227, 0.021021611988544464, -0.21522754430770874, 0.3997310996055603, -0.1170034110546112, -0.1400848925113678, 0.1580376923084259, 0.2720518410205841, -0.19786414504051208, -0.11890456825494766, 0.1163572371006012, 0.3367103338241577, -0.23784396052360535, -0.048375051468610764, 0.10119153559207916, 0.025478050112724304, 0.14287100732326508, 0.29397082328796387, 0.023457959294319153, 0.2766541838645935, 0.297420859336853, 0.21080392599105835, 0.11573575437068939, -0.03309459239244461, 0.05823786184191704, 0.2736503779888153, -0.32459357380867004, -0.03823898732662201, -0.025670044124126434, 0.14631612598896027, 0.10645735263824463, -0.07574048638343811, 0.34793466329574585, -0.11140525341033936, -0.2998282313346863, -0.4204401969909668, 0.3738820552825928, -0.26024600863456726, -0.022851962596178055, 0.2554602026939392, -0.14533834159374237, -0.07128182798624039, -0.11702366173267365, -0.1390175223350525, -0.12178462743759155, -0.008701812475919724, 0.07656867802143097, 0.14861071109771729, -0.06415120512247086, -0.15717485547065735, 0.1910848617553711, 0.20251233875751495, -0.0822419747710228, 0.3088260293006897, -0.05167759209871292, -0.24726025760173798, -0.30016636848449707, 0.3465854823589325, 0.5801005363464355, 0.2128167450428009, 0.19955776631832123, 0.4120843708515167, 0.36121779680252075, 0.11971165239810944, 0.4132036864757538, 0.13190264999866486, 0.19167324900627136, -0.041190654039382935, 0.23677796125411987, -0.003565063700079918, -0.04796351492404938, -0.3545611500740051, 0.04176260530948639, 0.49659964442253113, -0.3075193762779236, 0.46286362409591675, -0.38475412130355835, -0.03395867347717285, -0.07698297500610352, 0.23107503354549408, -0.05521966144442558, 0.235422283411026, 0.10873497277498245, -0.17595601081848145, 0.047524530440568924, -0.34493279457092285, -0.017972465604543686, -0.11183401942253113, 0.38957831263542175, 0.3655732274055481, -0.06961478292942047, -0.45532017946243286, -0.1468784213066101, -0.2749139070510864, 0.23423334956169128, -0.17321977019309998, 0.3482787013053894, 0.1824997067451477, -0.08392103016376495, -0.22599564492702484, -0.10861223936080933, 0.22139319777488708, 0.19865703582763672, -0.09233216941356659, 0.1628538966178894, 0.00026745349168777466, 0.12199212610721588, -0.12867841124534607, -0.15780603885650635, -0.03249894455075264, -0.1866806149482727, 0.730567455291748, 0.0941038429737091, -0.08685706555843353, -0.10009846091270447, -0.1635679304599762, 0.1381860375404358, -0.2919871509075165, 0.2836611270904541, 0.3410096764564514, 0.10857166349887848, -0.13930027186870575, -0.4410113990306854, -0.274363249540329, -0.33392763137817383, -0.03461068868637085, -0.06725709140300751, -0.18907368183135986, 0.4599016606807709, 0.0667363852262497, -0.34441912174224854, -0.20428721606731415, 0.3298470675945282, 0.06485350430011749, 0.0831608772277832, -0.05044775456190109, -0.03171046823263168, -0.12249007076025009, -0.012858010828495026, 0.4358016848564148, 0.06903071701526642, 0.24352097511291504, 0.4985148310661316, -0.2908846437931061, -0.35114702582359314, 0.5450422763824463, 0.06484764814376831, -0.22654622793197632, 0.13539348542690277, 0.378248393535614, 0.21423876285552979, -0.1848447024822235, -0.35232770442962646, 0.01831638813018799, 0.1013323962688446, 0.025120627135038376, -0.24173972010612488, 0.3829621374607086, -0.2507879436016083, -0.04555065929889679, 0.023941725492477417, 0.17772607505321503, 0.011737203225493431, -0.1464724987745285, 0.30899134278297424, -0.26945000886917114 ]
https://github.com/huggingface/datasets/issues/6490
Also, once the README.md exists in the python environment it is used when loading another dataset in the same format (e.g. json) since it always resolves the path to the same directory. The consequence here is any other dataset won't load because of infos mismatch. To reproduce this aspect: 1. Do a `load_datasets(...,save_infos=True)` with one dataset without a loading script 2. Try to load another dataset without a loading script in the same format (e.g. json) but with a different schema
`load_dataset(...,save_infos=True)` not working without loading script
### Describe the bug It seems that saving a dataset infos back into the card file is not working for datasets without a loading script. After tracking the problem a bit it looks like saving the infos uses `Builder.get_imported_module_dir()` as its destination directory. Internally this is a call to `inspect.getfile()` but since the actual builder class used is dynamically created (cf. `datasets.load.configure_builder_class`) this method actually return te path to the parent builder class (e.g. `datasets.packaged_modules.json.JSON`). ### Steps to reproduce the bug 1. Have a local dataset without any loading script 2. Make sure there are no dataset infos in the README.md 3. Load with `save_infos=True` 4. No change in the dataset README.md 5. A new README.md file is created in the directory of the parent builder class (e.g. for json in `.../site-packages/datasets/packaged_modules/json/README.md`) ### Expected behavior The dataset README.md should be updated and no file should be created in the python environment. ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-6.2.0-37-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.6.0
81
`load_dataset(...,save_infos=True)` not working without loading script ### Describe the bug It seems that saving a dataset infos back into the card file is not working for datasets without a loading script. After tracking the problem a bit it looks like saving the infos uses `Builder.get_imported_module_dir()` as its destination directory. Internally this is a call to `inspect.getfile()` but since the actual builder class used is dynamically created (cf. `datasets.load.configure_builder_class`) this method actually return te path to the parent builder class (e.g. `datasets.packaged_modules.json.JSON`). ### Steps to reproduce the bug 1. Have a local dataset without any loading script 2. Make sure there are no dataset infos in the README.md 3. Load with `save_infos=True` 4. No change in the dataset README.md 5. A new README.md file is created in the directory of the parent builder class (e.g. for json in `.../site-packages/datasets/packaged_modules/json/README.md`) ### Expected behavior The dataset README.md should be updated and no file should be created in the python environment. ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-6.2.0-37-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.6.0 Also, once the README.md exists in the python environment it is used when loading another dataset in the same format (e.g. json) since it always resolves the path to the same directory. The consequence here is any other dataset won't load because of infos mismatch. To reproduce this aspect: 1. Do a `load_datasets(...,save_infos=True)` with one dataset without a loading script 2. Try to load another dataset without a loading script in the same format (e.g. json) but with a different schema
[ -0.4919634759426117, 0.22427958250045776, 0.13527773320674896, 0.4852668046951294, 0.47176915407180786, 0.11189945042133331, 0.3482663333415985, 0.15804512798786163, 0.22043925523757935, 0.08041888475418091, 0.14106851816177368, 0.44441938400268555, -0.011690443381667137, 0.1958819031715393, 0.21268874406814575, 0.3373017907142639, -0.09457246959209442, 0.1423640251159668, -0.12016964703798294, 0.05272861570119858, -0.21206489205360413, 0.03528735786676407, -0.19017788767814636, -0.08489468693733215, -0.47736796736717224, 0.2386411428451538, -0.04664770886301994, 0.4366912245750427, 0.08413182944059372, -0.4018286466598511, 0.39587000012397766, -0.0362199991941452, 0.19270890951156616, 0.37928712368011475, -0.00011824219109257683, 0.05757889151573181, 0.3900054097175598, -0.16650903224945068, -0.48504361510276794, -0.5072751045227051, -0.3807433247566223, -0.3608662784099579, 0.11445657908916473, -0.2017022967338562, -0.1305074244737625, -0.30152323842048645, 0.10254857689142227, -0.3016819953918457, 0.03786198049783707, 0.20030489563941956, 0.1604764759540558, 0.071759894490242, -0.12954381108283997, -0.132666677236557, 0.1188955157995224, 0.41120827198028564, 0.14191241562366486, 0.2688636779785156, -0.03389386460185051, -0.13331665098667145, 0.1287766396999359, 0.3079163134098053, -0.31467729806900024, -0.34997889399528503, 0.5984264612197876, 0.12272527813911438, 0.3323507308959961, -0.0890553742647171, 0.24446390569210052, 0.22815875709056854, 0.5884870290756226, -0.38121989369392395, -0.34571853280067444, -0.5476936101913452, -0.012709114700555801, -0.06834331899881363, 0.3273794949054718, 0.2131209373474121, -0.0658034011721611, 0.07505573332309723, 0.018427107483148575, -0.32629120349884033, 0.1286616325378418, -0.06719882786273956, -0.005155317485332489, -0.009931668639183044, -0.14551152288913727, 0.030249793082475662, -0.26353609561920166, 0.010961446911096573, 0.44189369678497314, -0.4826906621456146, -0.32519736886024475, 0.2760459780693054, -0.08970203995704651, 0.2576385736465454, 0.3304627537727356, 0.24525251984596252, -0.11872938275337219, 0.3165012001991272, 0.013242293149232864, 0.2208387553691864, -0.0742199644446373, 0.19284828007221222, 0.3449093699455261, 0.04438856616616249, 0.20445813238620758, 0.36464932560920715, 0.2399558424949646, 0.3364659249782562, -0.18878582119941711, -0.169616237282753, -0.0771019384264946, 0.003922659903764725, 0.18821647763252258, -0.08159343153238297, 0.1777130514383316, -0.12970596551895142, -0.09509940445423126, 0.24062855541706085, 0.12332147359848022, -0.007645461708307266, 0.13718807697296143, 0.5757015943527222, -0.214419424533844, 0.29043129086494446, 0.2376234233379364, 0.009359186515212059, -0.10880027711391449, 0.1364840418100357, -0.18555325269699097, -0.11974810063838959, -0.14971020817756653, 0.16777510941028595, 0.17931640148162842, -0.18864428997039795, 0.38597097992897034, 0.1872367411851883, -0.2443753033876419, -0.17382806539535522, -0.16744117438793182, 0.02307194098830223, 0.2524004876613617, 0.45562031865119934, 0.17353667318820953, 0.2938591241836548, 0.031230121850967407, -0.20697148144245148, -0.089408278465271, 0.29919078946113586, -0.3490280508995056, -0.2553078234195709, 0.10553275793790817, 0.12039130926132202, -0.26550883054733276, 0.09626439213752747, -0.20197153091430664, -0.13019375503063202, 0.19454927742481232, -0.28713005781173706, 0.05883100628852844, -0.23019801080226898, -0.3017132580280304, -0.18975462019443512, 0.4110386073589325, 0.6502845287322998, -0.17142179608345032, -0.2170458734035492, 0.07404012233018875, -0.13861773908138275, -0.08222779631614685, -0.08674487471580505, -0.30381152033805847, 0.5276999473571777, -0.3373446762561798, -0.2242334932088852, 0.5024401545524597, -0.32758957147598267, -0.36852484941482544, 0.11668267846107483, -0.05451127141714096, 0.3279319107532501, -0.002707548439502716, 0.19049674272537231, -0.22843007743358612, -0.053277865052223206, 0.1367180049419403, 0.32526838779449463, 0.1369631588459015, 0.19856098294258118, -0.06448302417993546, -0.1958920955657959, 0.047490909695625305, -0.020469944924116135, 0.12823347747325897, 0.04521682858467102, 0.11015965789556503, 0.1327216774225235, 0.42314422130584717, -0.05727130547165871, -0.03907739743590355, 0.29077377915382385, 0.199808269739151, 0.022228199988603592, 0.15246647596359253, -0.07986872643232346, -0.6985898017883301, 0.4128360152244568, -0.28121596574783325, -0.33708178997039795, -0.13545173406600952, -0.1186271533370018, -0.00457487627863884, -0.06284625828266144, -0.39064741134643555, -0.17032502591609955, -0.01437695324420929, 0.30193573236465454, -0.13640666007995605, 0.027302086353302002, -0.3671351671218872, 0.41612792015075684, -0.25097179412841797, 0.18816539645195007, -0.41497308015823364, 0.22892607748508453, 0.1939840465784073, -0.2983420491218567, -0.031256988644599915, 0.07806417346000671, 0.18510067462921143, -0.11493431031703949, -0.10919218510389328, 0.5091587901115417, 0.12916284799575806, 0.3359229862689972, -0.3615802526473999, -0.20640262961387634, 0.08860038965940475, -0.0626664012670517, -0.1015658751130104, -0.02284560538828373, 0.3613002896308899, -0.09573837369680405, -0.33591005206108093, 0.3037368655204773, -0.16177642345428467, 0.2930757403373718, 0.1881389319896698, -0.11047753691673279, 0.06137176603078842, -0.08900637924671173, -0.09780222177505493, -0.1912999004125595, 0.046570248901844025, 0.32511916756629944, 0.2212565839290619, 0.16414953768253326, -0.16483613848686218, 0.1226591169834137, 0.38073670864105225, 0.1305042803287506, 0.05115151032805443, -0.10320152342319489, -0.23721066117286682, -0.022492211312055588, 0.08222922682762146, 0.1521044373512268, 0.44436410069465637, 0.08859673887491226, -0.12422770261764526, 0.25151991844177246, -0.0003331899642944336, -0.10135050863027573, 0.3780440092086792, 0.1532924622297287, 0.17153523862361908, 0.3028101325035095, 0.05782139301300049, 0.14315810799598694, -0.24846169352531433, 0.19673173129558563, 0.0008941777050495148, -0.06788060814142227, -0.5355738401412964, 0.20003244280815125, -0.4093708097934723, -0.19182491302490234, -0.19745677709579468, -0.2815001904964447, -0.28518974781036377, -0.2608164846897125, -0.2682398855686188, 0.28449809551239014, -0.05065477266907692, -0.0591818168759346, -0.035731397569179535, 0.15833422541618347, -0.2343425750732422, -0.4375268220901489, -0.29543524980545044, -0.1155799925327301, -0.18545810878276825, -0.11258895695209503, 0.3972390294075012, 0.2629607021808624, 0.10257589817047119, -0.2317553162574768, -0.0019111111760139465, -0.18462438881397247, -0.06016537547111511, 0.18057407438755035, 0.12383799254894257, 0.30549705028533936, 0.1907423734664917, -0.009796246886253357, 0.3362810015678406, 0.06551320850849152, 0.2245086282491684, -0.052040427923202515, 0.014753937721252441, 0.011029429733753204, 0.11451491713523865, -0.12869460880756378, -0.3740030527114868, -0.13446542620658875, 0.05456364154815674, -0.29212525486946106, 0.0824504941701889, 0.19418157637119293, 0.17287743091583252, 0.22139501571655273, 0.1664641946554184, 0.11078926175832748, -0.4709974527359009, 0.023639529943466187, -0.12910577654838562, -0.5550049543380737, 0.3923895061016083, -0.2574651539325714, -0.4080873727798462, 0.26144784688949585, 0.04357010871171951, 0.21856731176376343, -0.12701298296451569, -0.4215737581253052, 0.1716936230659485, -0.08630181103944778, -0.022995099425315857, 0.09046820551156998, 0.3747572600841522, 0.26408323645591736, 0.06586611270904541, 0.09382066875696182, -0.13455724716186523, -0.19632592797279358, 0.08058521151542664, 0.04843781515955925, 0.32960590720176697, -0.15195298194885254, 0.18723024427890778, -0.13226358592510223, 0.15848341584205627, 0.173610121011734, -0.007597216870635748, 0.2692374885082245, -0.21304774284362793, 0.8292004466056824, -0.3959234654903412, -0.2763276994228363, -0.3023556172847748, 0.04467611759901047, -0.17459708452224731, 0.1012321412563324, -0.016034375876188278, 0.2603338360786438, -0.4043293297290802, -0.07511309534311295, 0.09897934645414352, -0.3900532126426697, 0.09909312427043915, -0.17301225662231445, -0.08944012224674225, 0.24181842803955078, 0.39473122358322144, -0.16843847930431366, -0.0712546706199646, 0.10085466504096985, 0.40980014204978943, 0.28667035698890686, -0.07146051526069641, -0.13253365457057953, -0.20255975425243378, -0.1454496681690216, 0.04531539976596832, -0.005096063017845154, 0.16112563014030457, 0.03205585479736328, 0.0028409361839294434, 0.032844532281160355, -0.08539716899394989, 0.21507936716079712, -0.1407068967819214, 0.09033609926700592, 0.32146400213241577, -0.0394594706594944, -0.5202383399009705, -0.13457784056663513, 0.23588043451309204, -0.05711862072348595, -0.1513369381427765, 0.4126027524471283, 0.00220644474029541, -0.26083749532699585, 0.08463665843009949, 0.2002093493938446, -0.29626545310020447, -0.1896040141582489, -0.46431809663772583, 0.00030037760734558105, -0.3867877721786499, -0.25002676248550415, -0.09769407659769058, 0.12839224934577942, -0.006452549248933792, -0.04578763619065285, -0.2083735466003418, -0.051362745463848114, -0.054462555795907974, -0.09075930714607239, 0.3776138722896576, 0.06433355808258057, 0.26112300157546997, 0.3485866189002991, 0.183782696723938, 0.2089117467403412, 0.7893611192703247, -0.05516398698091507, -0.22993725538253784, 0.02065826952457428, -0.07731537520885468, 0.43155062198638916, 0.34382569789886475, -0.24131281673908234, -0.19288070499897003, 0.011452313512563705, -0.10301611572504044, -0.45179060101509094, -0.07351859658956528, 0.0023764409124851227, -0.14147311449050903, -0.19415563344955444, -0.6341949701309204, 0.577796995639801, -0.14858976006507874, -0.007975757122039795, 0.34378480911254883, -0.06882259249687195, -0.36090970039367676, 0.1857757568359375, -0.015761997550725937, 0.7044550180435181, 0.10880967974662781, 0.25415682792663574, 0.21671614050865173, -0.02286514639854431, 0.3463186025619507, 0.011763527989387512, 0.00863642618060112, -0.47205615043640137, -0.09658542275428772, -0.060286059975624084, -0.23212318122386932, 0.26296374201774597, 0.037006575614213943, -0.08246016502380371, 0.403388112783432, -0.15729239583015442, 0.17793682217597961, 0.028293326497077942, 0.22324077785015106, -0.3189087510108948, -0.35225242376327515, -0.390874981880188, 0.04981395974755287, 0.2288540154695511, 0.33497968316078186, -0.07734891027212143, -0.03489876165986061, -0.1535699963569641, -0.06544742733240128, -0.061191707849502563, 0.3636499047279358, -0.2904539704322815, -0.039153747260570526, 0.043556567281484604, 0.017276987433433533, 0.026636682450771332, 0.22298675775527954, -0.07064440101385117, 0.20020419359207153, -0.21022768318653107, 0.23004058003425598, -0.30193808674812317, 0.20570702850818634, -0.0790504515171051, -0.039437517523765564, 0.4670700430870056, 0.16116046905517578, -0.08535642921924591, 0.09229639172554016, -0.448551207780838, 0.10332246124744415, 0.17889747023582458, 0.07260379195213318, 0.2394503951072693, -0.20569799840450287, -0.2724449336528778, 0.07779717445373535, 0.3938804268836975, -0.1374843269586563, 0.09044663608074188, 0.2618567943572998, 0.11766126751899719, 0.253537118434906, -0.2290821373462677, -0.30576881766319275, -0.0518854595720768, 0.5396659970283508, -0.2199781984090805, -0.07221623510122299, 0.43790653347969055, -0.0010791048407554626, -0.056817956268787384, -0.20333024859428406, 0.4327847957611084, 0.3458920121192932, -0.164750874042511, 0.06903766840696335, 0.090889573097229, 0.017399519681930542, -0.009451698511838913, 0.200479656457901, -0.07763825356960297, -0.31702709197998047, -0.1750936359167099, -0.37191641330718994, -0.2661496102809906, 0.03368796035647392, 0.0858142077922821, 0.08968572318553925, 0.0601920485496521, -0.10889959335327148, 0.1583222895860672, -0.04494383558630943, -0.23210883140563965, 0.09154168516397476, 0.031149081885814667, 0.10851028561592102, 0.020997054874897003, 0.34047773480415344, 0.14306867122650146, -0.31571245193481445, 0.01084829494357109, 0.03627173602581024, 0.0014970675110816956, -0.15635070204734802, -0.26640719175338745, 0.16605906188488007, 0.19908826053142548, 0.21000158786773682, -0.08477573096752167, -0.4026586413383484, -0.13249291479587555, -0.3539983034133911, 0.2445250004529953, 0.16403616964817047, -0.047839775681495667, -0.03272051736712456, 0.042232878506183624, 0.17252217233181, -0.312501460313797, 0.14620646834373474, -0.39869269728660583, 0.16656148433685303, -0.04300764575600624, -0.06495287269353867, -0.4760146737098694, 0.06016247719526291, 0.04938653111457825, 0.11113163828849792, -0.0938277542591095, 0.16309845447540283, 0.5311387777328491, -0.2368723452091217, -0.03545636311173439, 0.06393007189035416, 0.11469510197639465, 0.3961446285247803, -0.18965378403663635, -0.10776123404502869, 0.1644403040409088, 0.09621578454971313, -0.20600159466266632, -0.038814276456832886, -0.0039045996963977814, 0.007297739386558533, -0.019811004400253296, 0.14052388072013855, 0.16718566417694092, -0.29812294244766235, -0.2713608145713806, 0.11382946372032166, 0.42529329657554626, -0.10019795596599579, 0.2894401252269745, 0.4366050064563751, 0.12062126398086548, 0.2914056181907654, 0.26167502999305725, 0.1229667216539383, 0.22409936785697937, 0.6904886960983276, -0.12648344039916992, 0.1794162094593048, 0.06833852082490921, 0.11692191660404205, -0.08030840754508972, -0.6053560972213745, 0.20570315420627594, 0.09458241611719131, -0.0455794520676136, 0.05508005991578102, -0.12405459582805634, 0.19542628526687622, -0.3318668603897095, 0.19425801932811737, -0.014488477259874344, 0.2359371930360794, -0.13096964359283447, -0.12391211092472076, -0.13820326328277588, -0.17154139280319214, 0.0697428435087204, 0.02372157573699951, 0.08674879372119904, -0.2140224725008011, -0.17784449458122253, 0.14876854419708252, -0.1770714819431305, -0.06628679484128952, -0.03573521971702576, 0.11806467920541763, 0.02774263545870781, -0.3221657872200012, 0.12129956483840942, -0.1097022071480751, -0.06124241277575493, 0.12549537420272827, 0.18946820497512817, 0.4179535210132599, 0.3371012210845947, 0.15883025527000427, 0.1883554905653, 0.06454980373382568, -0.06270632147789001, -0.12488992512226105, 0.14278481900691986, -0.19290919601917267, -0.014720565639436245, 0.2584262490272522, 0.13099241256713867, -0.13017801940441132, -0.31808778643608093, 0.2350924015045166, 0.4296211302280426, -0.20950987935066223, 0.5585759878158569, -0.02772274985909462, -0.016087256371974945, -0.19482481479644775, 0.12171876430511475, -0.1578589826822281, -0.09775599092245102, 0.6227875351905823, 0.07240374386310577, 0.23459692299365997, -0.06486516445875168, 0.06310991942882538, 0.031491994857788086, 0.4772094488143921, 0.21035757660865784, -0.36732739210128784, -0.14616024494171143, 0.010520637035369873, -0.8327069282531738, -0.13133034110069275, 0.3360580503940582, 0.01595865935087204, 0.1972639411687851, 0.13108855485916138, -0.06890532374382019, -0.11547344923019409, 0.14945901930332184, 0.09934628754854202, 0.4253699779510498, -0.02425503358244896, -0.10473364591598511, -0.3271115720272064, -0.39196616411209106, 0.004568792879581451, -0.1256619244813919, -0.438886821269989, 0.05680716410279274, -0.5012513995170593, -0.01919003203511238, 0.0021347682923078537, -0.05723495036363602, -0.03330441564321518, 0.08151969313621521, 0.5834270715713501, -0.18935516476631165, -0.011328250169754028, -0.003308720886707306, -0.10350804030895233, -0.35389968752861023, -0.03758165240287781, -0.05666761100292206, 0.27516239881515503, -0.07046698033809662, 0.3225683569908142, -0.3189775347709656, -0.00035101547837257385, -0.513964831829071, -0.09675885736942291, 0.21185041964054108, 0.016929514706134796, -0.3437301218509674, 0.1788230538368225, -0.29740938544273376, 0.3533373177051544, 0.0744825005531311, 0.05388912558555603, -0.16121619939804077, 0.21688415110111237, -0.2747081518173218, -0.2413664162158966, 0.5161938667297363, -0.17306524515151978, -0.1829446256160736, -0.22040747106075287, 0.4070799946784973, -0.3445160388946533, -0.05425310134887695, -0.5916762948036194, 0.10966813564300537, 0.3899402618408203, -0.16231241822242737, -0.15815919637680054, -0.04059275984764099, -0.2641795873641968, 0.32213324308395386, -0.22162163257598877, 0.14688259363174438, 0.09969019889831543, -0.10288524627685547, -0.08416838198900223, -0.19211170077323914 ]
https://github.com/huggingface/datasets/issues/6488
I'm getting a similar issue even though I've already downloaded the dataset πŸ˜… ``` huggingface_hub.utils._errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/HuggingFaceM4/WebSight ```
429 Client Error
Hello, I was downloading the following dataset and after 20% of data was downloaded, I started getting error 429. It is not resolved since a few days. How should I resolve it? Thanks Dataset: https://huggingface.co/datasets/cerebras/SlimPajama-627B Error: `requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/datasets/cerebras/SlimPajama-627B/resolve/2d0accdd58c5d5511943ca1f5ff0e3eb5e293543/train/chunk1/example_train_3300.jsonl.zst`
25
429 Client Error Hello, I was downloading the following dataset and after 20% of data was downloaded, I started getting error 429. It is not resolved since a few days. How should I resolve it? Thanks Dataset: https://huggingface.co/datasets/cerebras/SlimPajama-627B Error: `requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/datasets/cerebras/SlimPajama-627B/resolve/2d0accdd58c5d5511943ca1f5ff0e3eb5e293543/train/chunk1/example_train_3300.jsonl.zst` I'm getting a similar issue even though I've already downloaded the dataset πŸ˜… ``` huggingface_hub.utils._errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/HuggingFaceM4/WebSight ```
[ 0.022115163505077362, -0.29604384303092957, -0.005823560059070587, 0.3850882947444916, 0.11384467035531998, -0.001700758934020996, -0.05616357922554016, 0.3764071464538574, -0.20437362790107727, 0.0015221387147903442, -0.19259780645370483, -0.2489210069179535, 0.17384164035320282, -0.048467449843883514, -0.03183650225400925, -0.10465565323829651, -0.16877523064613342, -0.0119980089366436, -0.2413988709449768, 0.019596830010414124, -0.09679238498210907, 0.07778957486152649, -0.024076998233795166, 0.10562276840209961, -0.3127424418926239, -0.19333383440971375, -0.012589409947395325, 0.2690293490886688, -0.38134145736694336, -0.18884028494358063, 0.2128455638885498, -0.0800071656703949, 0.34856075048446655, 0.16972069442272186, -0.00012080527812941, -0.12274480611085892, 0.17395778000354767, 0.010570511221885681, -0.12799683213233948, 0.17027392983436584, -0.27746567130088806, -0.22907543182373047, 0.10237956047058105, -0.16228662431240082, 0.21392574906349182, -0.10857496410608292, -0.170525923371315, 0.16299660503864288, 0.8078559637069702, 0.15897782146930695, 0.09271514415740967, -0.07334757596254349, 0.060571879148483276, 0.25252223014831543, -0.0223861001431942, -0.13846637308597565, 0.08769986033439636, -0.03645043075084686, 0.33533817529678345, 0.03334450721740723, -0.07884915173053741, 0.34398776292800903, 0.1825016736984253, 0.3487173318862915, 0.06923775374889374, -0.3501521050930023, -0.214763343334198, -0.526768684387207, -0.03012103959918022, 0.3858461380004883, 0.6945136785507202, 0.220866858959198, -0.2108898013830185, -0.19810271263122559, 0.09015315771102905, -0.05505060777068138, 0.2105391025543213, 0.2914191782474518, -0.1360643059015274, 0.028716731816530228, -0.2306222766637802, -0.39864057302474976, -0.14993916451931, -0.09339642524719238, -0.20500904321670532, 0.05803373456001282, -0.13449352979660034, 0.15722441673278809, 0.29864415526390076, -0.16704148054122925, -0.006266031414270401, 0.00737467035651207, -0.13419149816036224, 0.14716628193855286, -0.5640115141868591, -0.2864878475666046, 0.18022103607654572, 0.5151664018630981, 0.28289246559143066, 0.19546958804130554, 0.5186331272125244, 0.16659313440322876, -0.1487334668636322, -0.01823282800614834, 0.2982445955276489, 0.09625595808029175, -0.12135623395442963, -0.15716305375099182, 0.43522897362709045, 0.2685540020465851, 0.1977805495262146, 0.1844567507505417, -0.09976442158222198, -0.13527394831180573, -0.24282574653625488, -0.08042354881763458, 0.3356563150882721, -0.13200831413269043, -0.19239217042922974, 0.1055213063955307, -0.5434118509292603, -0.05330633744597435, 0.37251824140548706, 0.10143165290355682, -0.17023228108882904, 0.34390631318092346, 0.04682144522666931, -0.1415763646364212, -0.13852271437644958, -0.3579619526863098, -0.036420390009880066, 0.19150272011756897, -0.030986927449703217, -0.048866238445043564, 0.0729372501373291, -0.0447285994887352, -0.07129289209842682, -0.12990783154964447, 0.03675217181444168, -0.34271401166915894, 0.20771583914756775, -0.03445669263601303, -0.11006814986467361, 0.23786649107933044, -0.021788448095321655, 0.20400741696357727, -0.05973922461271286, 0.19362547993659973, -0.04983624070882797, -0.034647949039936066, -0.5439451336860657, -0.39083796739578247, 0.0632360503077507, 0.11296503245830536, -0.054463766515254974, 0.14783281087875366, -0.16571009159088135, -0.1927298903465271, -0.07151464372873306, -0.02489539235830307, 0.13824084401130676, 0.014315694570541382, 0.022900141775608063, 0.04571126028895378, 0.10466845333576202, 0.6200949549674988, -0.1902274787425995, -0.04994898661971092, -0.13730651140213013, -0.16448447108268738, -0.1414944976568222, 0.39616504311561584, -0.23798152804374695, 0.347307413816452, -0.15702342987060547, 0.01206737756729126, 0.48916515707969666, -0.27054736018180847, -0.7099469304084778, 0.14452147483825684, -0.14127887785434723, -0.0214470773935318, -0.18661724030971527, 0.22878891229629517, 0.10147601366043091, -0.013864383101463318, 0.14355532824993134, 0.11015541106462479, 0.08207888156175613, 0.15461686253547668, -0.05955960229039192, -0.2779209315776825, -0.275016188621521, 0.17173433303833008, -0.2358502745628357, -0.09915046393871307, 0.07573054730892181, -0.06834892928600311, 0.3560086488723755, -0.07451188564300537, 0.25269585847854614, 0.3825382888317108, 0.46327897906303406, 0.2157362550497055, -0.06525488197803497, 0.08715924620628357, -0.430345356464386, 0.04382406175136566, -0.30107396841049194, -0.044784631580114365, -0.19630497694015503, -0.06468024104833603, -0.11080901324748993, 0.04141881316900253, -0.20917896926403046, 0.2387789487838745, -0.04966703802347183, -0.1353287547826767, 0.22673176229000092, -0.05465751886367798, -0.023814700543880463, 0.451093852519989, 0.015454433858394623, 0.2861157953739166, -0.4075610041618347, 0.4421694576740265, -0.045888327062129974, 0.09717179089784622, 0.44565874338150024, 0.005918834358453751, 0.18009518086910248, -0.31053221225738525, 0.08293865621089935, 0.13076789677143097, -0.29816755652427673, 0.2026207596063614, 0.31753864884376526, 0.25737929344177246, 0.2915683686733246, -0.1654154360294342, -0.1832963526248932, -0.020086640492081642, 0.17613805830478668, 0.18552382290363312, 0.19184432923793793, 0.045830029994249344, 0.3057493567466736, 0.10779586434364319, -0.06423426419496536, 0.1911069005727768, 0.2754679024219513, -0.07220196723937988, -0.06929463893175125, 0.1768486648797989, 0.29329895973205566, -0.16481176018714905, -0.010671406984329224, -0.05200701206922531, 0.053394392132759094, -0.027576107531785965, 0.12089259177446365, -0.11453796923160553, 0.11128012090921402, 0.24859720468521118, 0.13788026571273804, -0.12259695678949356, 0.33689048886299133, 0.0165509432554245, 0.1852138340473175, -0.1595166027545929, -0.06919343024492264, -0.03088824637234211, 0.25009047985076904, -0.08397112786769867, -0.10130653530359268, 0.21501383185386658, 0.06775976717472076, 0.007385900244116783, 0.03865285962820053, -0.11901175230741501, -0.2053496241569519, -0.30599379539489746, 0.17045053839683533, 0.2907586097717285, -0.21190762519836426, -0.03856046497821808, -0.28060999512672424, -0.22055454552173615, -0.043165527284145355, -0.3275609314441681, -0.4374304711818695, -0.30062589049339294, -0.06024174764752388, 0.016379304230213165, -0.15448080003261566, 0.1910153329372406, -0.1230878010392189, 0.3418418765068054, 0.35329246520996094, 0.20907030999660492, -0.1584806591272354, 0.09794437885284424, 0.11503641307353973, 0.008910726755857468, -0.010426528751850128, -0.2568129897117615, 0.18704408407211304, -0.2827584147453308, 0.28889548778533936, -0.3843110203742981, -0.24094076454639435, 0.17368663847446442, 0.12889140844345093, 0.049781158566474915, 0.024970004335045815, 0.5536835193634033, -0.0030408576130867004, 0.12242564558982849, 0.18565863370895386, 0.11791525036096573, 0.058809809386730194, -0.019038423895835876, 0.12561938166618347, 0.23946557939052582, 0.3131016790866852, -0.01471610739827156, -0.0245668925344944, -0.4143623411655426, 0.19530624151229858, -0.17560432851314545, 0.2709999084472656, -0.23371919989585876, -0.10051023960113525, 0.147477924823761, -0.4317598044872284, -0.0012482814490795135, 0.05973149091005325, -0.4476793706417084, 0.2630673944950104, -0.08138683438301086, -0.16584785282611847, 0.26871228218078613, 0.13972818851470947, 0.11616484820842743, -0.07289053499698639, -0.5879152417182922, -0.2535579204559326, -0.3015243411064148, 0.055601567029953, -0.35541868209838867, -0.01292780414223671, 0.2155487835407257, -0.15513993799686432, 0.005494363605976105, 0.1502629965543747, -0.005395844578742981, -0.04797922074794769, 0.2206452339887619, 0.5088878273963928, 0.0024926476180553436, 0.2598957419395447, 0.010982692241668701, 0.4334203004837036, 0.6063069105148315, 0.17111946642398834, 0.5159104466438293, 0.3549157381057739, 0.004752712324261665, 0.2638472318649292, -0.003996551036834717, 0.006072495132684708, 0.03333692252635956, 0.3420743942260742, 0.4024465084075928, 0.39088141918182373, 0.27368712425231934, -0.42947596311569214, -0.40323683619499207, -0.37595704197883606, -0.4221636652946472, -0.13396146893501282, 0.11682217568159103, 0.18474829196929932, 0.04886097460985184, -0.2609182894229889, 0.12742309272289276, -0.13496482372283936, -0.04045776277780533, 0.27251356840133667, 0.16916973888874054, 0.057174257934093475, -0.36935752630233765, -0.004143379628658295, -0.4859956204891205, 0.5357809662818909, 0.1011800616979599, 0.17850790917873383, 0.010132469236850739, 0.26600709557533264, 0.22866155207157135, -0.053472429513931274, 0.41266152262687683, 0.10455749183893204, 0.3368293344974518, -0.4781455397605896, 0.04085296392440796, -0.033816173672676086, 0.18355166912078857, 0.10675506293773651, 0.2997496426105499, 0.49868565797805786, -0.0004269406199455261, -0.38495445251464844, -0.013917356729507446, -0.04960475116968155, -0.06923094391822815, -0.258524626493454, -0.278469979763031, -0.13318464159965515, -0.5641450881958008, -0.3142163157463074, 0.021717684343457222, -0.11374233663082123, 0.24254056811332703, 0.2510680854320526, -0.4566754996776581, 0.37863001227378845, -0.3784483075141907, 0.0009843260049819946, -0.19215504825115204, -0.0056184399873018265, 0.1370161920785904, 0.12547986209392548, 0.08365216851234436, 0.4034499228000641, 0.5834081172943115, 0.7088328003883362, -0.08457644283771515, -0.40484264492988586, -0.03964798152446747, 0.33500802516937256, -0.034223683178424835, 0.33352139592170715, 0.08475400507450104, 0.21330198645591736, 0.35794058442115784, 0.46672332286834717, -0.2936851382255554, 0.21753981709480286, 0.3156009912490845, 0.037631403654813766, -0.6744609475135803, -0.010972138494253159, 0.46372705698013306, -0.005622401833534241, -0.08742152899503708, 0.4107285141944885, 0.4129236042499542, -0.029949713498353958, -0.47838324308395386, 0.16347798705101013, 1.0220458507537842, -0.18734407424926758, -0.029370620846748352, -0.07064017653465271, -0.33117246627807617, 0.6450236439704895, -0.252800315618515, 0.3136795163154602, -0.24053414165973663, -0.023540101945400238, -0.0823075920343399, -0.1930437684059143, 0.3040042519569397, -0.03784860298037529, 0.12608884274959564, 0.1434706151485443, -0.04844453185796738, 0.23973998427391052, -0.053446926176548004, 0.3015170693397522, -0.43000197410583496, 0.036174751818180084, -0.3196425437927246, 0.057718969881534576, -0.40350741147994995, 0.3798038363456726, -0.23014475405216217, -0.09313315898180008, -0.19128522276878357, -0.34796205163002014, 0.04230114817619324, -0.02830449491739273, -0.21220970153808594, 0.08146719634532928, -0.03867747634649277, -0.32927456498146057, 0.18471026420593262, 0.1941690891981125, -0.3256981074810028, 0.015252327546477318, -0.40273356437683105, 0.36377421021461487, -0.41576826572418213, -0.2391892820596695, -0.040963541716337204, 0.22628797590732574, -0.04573706537485123, -0.11613713204860687, -0.21634075045585632, 0.2130536139011383, 0.07963241636753082, -0.08371572196483612, -0.23764649033546448, 0.24225075542926788, 0.051296599209308624, -0.2969638407230377, -0.014147110283374786, -0.174333393573761, -0.05035172402858734, 0.044854409992694855, 0.05103401839733124, 0.24545876681804657, -0.3519185483455658, 0.1444893479347229, 0.11851480603218079, -0.009875379502773285, -0.029146036133170128, 0.4806717336177826, -0.16272464394569397, -0.0356072299182415, 0.4249730706214905, 0.32085323333740234, -0.1404705047607422, -0.11020278930664062, 0.23617258667945862, 0.17570839822292328, -0.5655735731124878, -0.019205819815397263, 0.04962300509214401, 0.3477783501148224, -0.33143889904022217, 0.3647029995918274, -0.008053557947278023, -0.03716471046209335, 0.26100653409957886, -0.3488052189350128, -0.304344117641449, 0.19009076058864594, -0.20077946782112122, -0.01956612803041935, -0.08974020183086395, 0.07325030863285065, 0.21311438083648682, 0.25001707673072815, -0.16206003725528717, 0.18287375569343567, -0.38266611099243164, -0.08138319849967957, 0.03184717521071434, -0.20956645905971527, 0.1669325977563858, 0.1367017775774002, -0.048188913613557816, 0.40894097089767456, -0.36142289638519287, -0.053300581872463226, 0.05622953921556473, 0.23348897695541382, 0.002821892499923706, -0.5594562292098999, 0.011685553938150406, -0.3333781063556671, 0.05734134092926979, 0.08777158707380295, -0.0799197405576706, -0.092556893825531, 0.35509252548217773, -0.40070655941963196, 0.22686481475830078, -0.32723909616470337, -0.14979733526706696, 0.3073660731315613, 0.009152337908744812, 0.24778799712657928, 0.05829722806811333, 0.01516627799719572, 0.2577331066131592, -0.08794976770877838, -0.20469066500663757, 0.12415806204080582, 0.265580952167511, -0.40434616804122925, 0.4346216917037964, -0.2435484230518341, 0.07897713780403137, 0.3027176856994629, 0.5052016973495483, 0.2699506878852844, -0.37903499603271484, 0.014876648783683777, 0.10236389189958572, 0.062015801668167114, -0.17260846495628357, -0.19240371882915497, 0.23827505111694336, 0.08923830837011337, -0.29461121559143066, 0.07929323613643646, -0.1671496033668518, -0.17533020675182343, 0.043593019247055054, -0.00987289473414421, 0.4204689860343933, 0.1086934506893158, -0.04806699976325035, 0.14748668670654297, -0.4607120752334595, -0.19781310856342316, 0.3617161512374878, 0.22114297747612, 0.22678005695343018, 0.011833695694804192, -0.3229351043701172, -0.1149066910147667, -0.3570269048213959, 0.14609400928020477, -0.03181559592485428, -0.594574511051178, -0.16754822432994843, 0.19353732466697693, -0.07570327818393707, -0.008194180205464363, -0.2079261690378189, 0.4761497974395752, -0.18462029099464417, 0.15784218907356262, -0.3986680805683136, 0.5301423072814941, -0.09927998483181, 0.20064230263233185, 0.110382080078125, -0.2733633518218994, -0.013618983328342438, 0.17540845274925232, -0.025043735280632973, -0.3445122539997101, -0.12222710251808167, 0.06321700662374496, -0.22970229387283325, -0.4425223171710968, -0.05108731612563133, 0.2570200264453888, 0.13830935955047607, -0.34432944655418396, 0.18832436203956604, 0.42518350481987, -0.12060397863388062, 0.05435098335146904, -0.05914315581321716, 0.22389499843120575, 0.10301584750413895, 0.17416293919086456, 0.22336794435977936, 0.05975096672773361, 0.13187912106513977, 0.0013030022382736206, 0.18884588778018951, 0.4055016040802002, 0.09507163614034653, 0.29711443185806274, -0.002607952803373337, -0.1328355371952057, -0.09280647337436676, -0.35584452748298645, 0.4593307673931122, -0.3420156240463257, 0.542526125907898, -0.6039202809333801, -0.08294232189655304, -0.30075421929359436, -0.13121119141578674, -0.3423413038253784, 0.26633575558662415, -0.1430424004793167, -0.35190045833587646, -0.1450243592262268, -0.45420074462890625, 0.00044612959027290344, -0.6402657628059387, 0.5065369009971619, 0.3112168610095978, 0.06657126545906067, -0.034721627831459045, -0.3784325122833252, -0.378972589969635, 0.06661845743656158, -0.23367641866207123, 0.0982186570763588, -0.019722525030374527, 0.04067806899547577, -0.39798206090927124, 0.09267803281545639, 0.3422988951206207, -0.09140975773334503, 0.14863242208957672, -0.1546258181333542, -0.15908905863761902, 0.03981544449925423, -0.0071631185710430145, 0.16188570857048035, 0.026857271790504456, -0.1617814600467682, 0.5573713183403015, -0.03206683695316315, -0.09425787627696991, -0.13727283477783203, -0.12808634340763092, -0.3152155876159668, -0.5811494588851929, 0.4377779960632324, 0.4283997416496277, 0.2687895894050598, 0.13254289329051971, -0.26098573207855225, 0.04025901108980179, -0.19474022090435028, 0.0991254448890686, -0.06750237941741943, 0.1256958246231079, 0.3124445676803589, -0.09540139138698578, -0.09170222282409668, -0.34496089816093445, 0.042012136429548264, -0.10475128889083862, 0.17380084097385406, -0.09051665663719177, -0.3525161147117615, -0.08506828546524048, 0.07256276160478592, 0.28714150190353394, 0.12673567235469818, 0.1893230676651001, -0.08937373757362366, -0.2377631962299347, -0.2462819516658783, 0.6569252610206604, -0.06607948988676071, -0.005219317972660065, 0.18324856460094452, 0.4405403435230255, 0.10006575286388397, -0.25043168663978577, -0.40286484360694885, 0.11590458452701569, 0.42094460129737854, 0.009902901947498322, -0.19472023844718933, 0.2626708447933197, -0.21320058405399323, -0.26243865489959717, 0.13421230018138885, 0.1928742676973343, 0.22153359651565552, -0.038827311247587204, 0.40439003705978394, 0.06685692816972733 ]
https://github.com/huggingface/datasets/issues/6483
You can get the expected result by fixing typos in the snippet :) ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) # rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset.features) - COLUMNS_TO_KEEP) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ```
Iterable Dataset: rename column clashes with remove column
### Describe the bug Suppose I have a two iterable datasets, one with the features: * `{"audio", "text", "column_a"}` And the other with the features: * `{"audio", "sentence", "column_b"}` I want to combine both datasets using `interleave_datasets`, which requires me to unify the column names. I would typically do this by: 1. Renaming the common columns to the same name (e.g. `"text"` -> `"sentence"`) 2. Removing the unwanted columns (e.g. `"column_a"`, `"column_b"`) However, the process of renaming and removing columns in an iterable dataset doesn't work, since we need to preserve the original text column, meaning we can't combine the datasets. ### Steps to reproduce the bug ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ``` Traceback: ```python --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[5], line 17 14 COLUMNS_TO_KEEP = {"audio", "sentence"} 15 dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) ---> 17 print(next(iter(dataset))) File ~/datasets/src/datasets/iterable_dataset.py:1353, in IterableDataset.__iter__(self) 1350 yield formatter.format_row(pa_table) 1351 return -> 1353 for key, example in ex_iterable: 1354 if self.features: 1355 # `IterableDataset` automatically fills missing columns with None. 1356 # This is done with `_apply_feature_types_on_example`. 1357 example = _apply_feature_types_on_example( 1358 example, self.features, token_per_repo_id=self._token_per_repo_id 1359 ) File ~/datasets/src/datasets/iterable_dataset.py:652, in MappedExamplesIterable.__iter__(self) 650 yield from ArrowExamplesIterable(self._iter_arrow, {}) 651 else: --> 652 yield from self._iter() File ~/datasets/src/datasets/iterable_dataset.py:729, in MappedExamplesIterable._iter(self) 727 if self.remove_columns: 728 for c in self.remove_columns: --> 729 del transformed_example[c] 730 yield key, transformed_example 731 current_idx += 1 KeyError: 'text' ``` => we see that `datasets` is looking for the column "text", even though we've renamed this to "sentence" and then removed the un-wanted "text" column from our dataset. ### Expected behavior Should be able to rename and remove columns from iterable dataset. ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: macOS-13.5.1-arm64-arm-64bit - Python version: 3.11.6 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2
75
Iterable Dataset: rename column clashes with remove column ### Describe the bug Suppose I have a two iterable datasets, one with the features: * `{"audio", "text", "column_a"}` And the other with the features: * `{"audio", "sentence", "column_b"}` I want to combine both datasets using `interleave_datasets`, which requires me to unify the column names. I would typically do this by: 1. Renaming the common columns to the same name (e.g. `"text"` -> `"sentence"`) 2. Removing the unwanted columns (e.g. `"column_a"`, `"column_b"`) However, the process of renaming and removing columns in an iterable dataset doesn't work, since we need to preserve the original text column, meaning we can't combine the datasets. ### Steps to reproduce the bug ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ``` Traceback: ```python --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[5], line 17 14 COLUMNS_TO_KEEP = {"audio", "sentence"} 15 dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) ---> 17 print(next(iter(dataset))) File ~/datasets/src/datasets/iterable_dataset.py:1353, in IterableDataset.__iter__(self) 1350 yield formatter.format_row(pa_table) 1351 return -> 1353 for key, example in ex_iterable: 1354 if self.features: 1355 # `IterableDataset` automatically fills missing columns with None. 1356 # This is done with `_apply_feature_types_on_example`. 1357 example = _apply_feature_types_on_example( 1358 example, self.features, token_per_repo_id=self._token_per_repo_id 1359 ) File ~/datasets/src/datasets/iterable_dataset.py:652, in MappedExamplesIterable.__iter__(self) 650 yield from ArrowExamplesIterable(self._iter_arrow, {}) 651 else: --> 652 yield from self._iter() File ~/datasets/src/datasets/iterable_dataset.py:729, in MappedExamplesIterable._iter(self) 727 if self.remove_columns: 728 for c in self.remove_columns: --> 729 del transformed_example[c] 730 yield key, transformed_example 731 current_idx += 1 KeyError: 'text' ``` => we see that `datasets` is looking for the column "text", even though we've renamed this to "sentence" and then removed the un-wanted "text" column from our dataset. ### Expected behavior Should be able to rename and remove columns from iterable dataset. ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: macOS-13.5.1-arm64-arm-64bit - Python version: 3.11.6 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2 You can get the expected result by fixing typos in the snippet :) ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) # rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset.features) - COLUMNS_TO_KEEP) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ```
[ 0.1475961059331894, 0.20639097690582275, 0.013281568884849548, 0.04070236533880234, 0.21933552622795105, 0.34094297885894775, 0.47970396280288696, 0.06645643711090088, -0.09174070507287979, 0.19398123025894165, -0.1917896866798401, 0.30293503403663635, 0.1443752646446228, -0.030581727623939514, -0.48896610736846924, -0.06055698171257973, 0.24286684393882751, 0.23223876953125, -0.1029394268989563, 0.17563527822494507, -0.26724499464035034, 0.1497838795185089, -0.40453100204467773, -0.04936685413122177, 0.13076536357402802, 0.039459228515625, -0.09246505051851273, -0.06323009729385376, 0.10187377035617828, -0.07379788160324097, 0.0973920151591301, 0.41305822134017944, -0.23551201820373535, 0.4530574083328247, -0.00011287652159808204, -0.14655467867851257, 0.11265728622674942, 0.05558239668607712, -0.3870816230773926, -0.2911534607410431, -0.3095398545265198, -0.1913522332906723, -0.1725931614637375, -0.17084920406341553, 0.1388927698135376, -0.23279330134391785, -0.4342465400695801, -0.6392122507095337, -0.05011634901165962, 0.019875023514032364, 0.18834169209003448, 0.16117824614048004, 0.017523713409900665, 0.12886029481887817, 0.2656674087047577, -0.1514907330274582, -0.1739768087863922, -0.06726992130279541, -0.11337269842624664, -0.3597671687602997, 0.28591397404670715, 0.3651185631752014, -0.331167608499527, -0.09721067547798157, 0.07733077555894852, 0.0612635612487793, -0.27175092697143555, -0.26574212312698364, 0.40354326367378235, 0.24856877326965332, 0.41505587100982666, -0.3925709128379822, -0.2447132021188736, -0.20364272594451904, 0.12431202828884125, -0.3367735743522644, 0.22929207980632782, -0.09844458848237991, 0.2969183921813965, -0.01944604329764843, 0.01678331196308136, -0.18806923925876617, 0.04273562878370285, 0.014573993161320686, -0.10039258003234863, 0.010056532919406891, 0.05405024439096451, 0.2703430950641632, -0.030149374157190323, -0.21009273827075958, 0.294812947511673, -0.19711142778396606, -0.0948578491806984, 0.14589917659759521, -0.6206302046775818, 0.025133445858955383, -0.10808023810386658, -0.24969986081123352, -0.055762387812137604, 0.03464410826563835, -0.02575903758406639, -0.2064441740512848, 0.4248157739639282, 0.12059740722179413, 0.18426772952079773, 0.21850040555000305, -0.05507432669401169, 0.07288046181201935, 0.19920353591442108, 0.17653024196624756, 0.08032160997390747, -0.1252388209104538, 0.4897221624851227, 0.03649851679801941, 0.11290544271469116, -0.2273753583431244, 0.3267689347267151, -0.030783675611019135, -0.49853000044822693, 0.29518237709999084, -0.4123104214668274, -0.07329234480857849, -0.02452169544994831, -0.10739286243915558, 0.2712465524673462, 0.300477534532547, -0.13326585292816162, 0.3382394313812256, 0.010485149919986725, 0.033202722668647766, -0.11905696988105774, 0.07090649008750916, -0.16582010686397552, 0.022166628390550613, 0.13347038626670837, 0.038295067846775055, -0.004591323435306549, 0.18870513141155243, 0.09522585570812225, -0.0020859763026237488, -0.18249130249023438, -0.0924532562494278, 0.16369691491127014, -0.08984458446502686, 0.11429763585329056, 0.13093425333499908, 0.06654755771160126, -0.4063951373100281, -0.0024338215589523315, -0.11873704195022583, 0.08716198801994324, -0.055516116321086884, -0.17365571856498718, 0.2140687257051468, -0.14063411951065063, 0.07936174422502518, 0.18923500180244446, 0.08090217411518097, 0.34534090757369995, -0.14805525541305542, 0.2246285378932953, -0.0737442821264267, 0.14442229270935059, -0.16461221873760223, 0.027312010526657104, 0.09701168537139893, -0.2119779884815216, 0.019529908895492554, 0.09349702298641205, 0.13298718631267548, 0.0980219617486, 0.301021546125412, 0.13829176127910614, -0.3997119665145874, -0.11406337469816208, -0.011471211910247803, 0.04304558411240578, -0.1476678103208542, -0.3103867471218109, 0.3655823767185211, -0.12366475909948349, 0.5040543079376221, 0.20973938703536987, -0.09383277595043182, -0.11686569452285767, -0.14178556203842163, -0.010834798216819763, 0.18525245785713196, -0.16008324921131134, -0.09176221489906311, -0.11776445060968399, -0.08387061953544617, 0.15026414394378662, -0.304365336894989, 0.024703554809093475, 0.24318404495716095, 0.019153710454702377, 0.05474788323044777, 0.31389865279197693, -0.18354827165603638, 0.3115934133529663, 0.10247968882322311, 0.2432313859462738, 0.3287399411201477, 0.16240806877613068, 0.005227893590927124, -0.517549455165863, 0.07987812161445618, 0.4254135489463806, -0.24530909955501556, 0.03595646470785141, -0.3391214907169342, -0.0787310004234314, -0.14152705669403076, -0.25303176045417786, 0.09298890829086304, 0.09348083287477493, 0.26379066705703735, -0.06495954096317291, -0.3013538718223572, -0.275168240070343, 0.32633456587791443, -0.14647632837295532, 0.028103958815336227, -0.6666407585144043, 0.24093759059906006, 0.056487664580345154, -0.06521841883659363, 0.006298638880252838, 0.47713637351989746, 0.11466649174690247, 0.019751545041799545, -0.15869179368019104, 0.5362984538078308, -0.27480608224868774, 0.3036133646965027, -0.2171557992696762, 0.17296971380710602, -0.14879809319972992, -0.0060328468680381775, -0.02080381289124489, -0.08178192377090454, 0.148065447807312, 0.03397311270236969, 0.0007604239508509636, 0.21632345020771027, -0.3449254035949707, 0.6236695647239685, 0.13383622467517853, -0.02778329700231552, 0.15780556201934814, -0.2286018282175064, -0.37816134095191956, -0.39323192834854126, 0.07983510196208954, -0.38537949323654175, 0.14670434594154358, -0.2488241195678711, -0.30085060000419617, -0.008564844727516174, 0.2542053759098053, 0.27312517166137695, -0.2990764379501343, -0.10754804313182831, -0.15349093079566956, -0.06491658091545105, -0.14780955016613007, 0.1312304437160492, 0.44239896535873413, 0.027060609310865402, 0.07524309307336807, 0.04624945670366287, 0.12934666872024536, -0.15258660912513733, 0.16783367097377777, 0.3622918426990509, -0.0001881420612335205, 0.3547302186489105, 0.3921803832054138, 0.09507924318313599, -0.1834927201271057, -0.24908651411533356, 0.08060043305158615, 0.09334159642457962, -0.1020427718758583, 0.2436760514974594, -0.21570879220962524, -0.18425799906253815, -0.04929664731025696, -0.23965895175933838, -0.0706292912364006, -0.6337692141532898, -0.10711024701595306, 0.7739092111587524, -0.20481717586517334, 0.25537967681884766, -0.19783614575862885, 0.04238949716091156, -0.15981623530387878, 0.010712424293160439, -0.13462455570697784, -0.3498004078865051, -0.07044123113155365, 0.11387914419174194, -0.07107197493314743, -0.3144734501838684, 0.2019892781972885, 0.12145096063613892, -0.16158533096313477, -0.47475960850715637, -0.30164283514022827, 0.184529647231102, -0.49315324425697327, 0.08462263643741608, 0.31086575984954834, -0.2260473519563675, 0.03837135434150696, -0.25229334831237793, 0.21280580759048462, 0.13030418753623962, -0.07718729227781296, 0.20035387575626373, 0.08214142173528671, -0.015572406351566315, -0.021255049854516983, -0.2879199683666229, 0.0324324294924736, -0.3072381019592285, 0.14307405054569244, -0.4639965295791626, -0.1402367800474167, 0.002604968845844269, -0.20724144577980042, -0.29502102732658386, 0.2781810462474823, -0.005034744739532471, -0.4324214458465576, -0.02857297658920288, -0.10825124382972717, -0.06533198058605194, -0.0013041426427662373, -0.044134266674518585, -0.018210776150226593, 0.2863258123397827, 0.18498355150222778, -0.2599773705005646, 0.25450870394706726, -0.2194170504808426, 0.1692856252193451, 0.05887829512357712, -0.0092165507376194, -0.07561512291431427, 0.26455894112586975, -0.03258819133043289, -0.23631839454174042, -0.17686599493026733, -0.08359386026859283, 0.3265019655227661, 0.22396260499954224, 0.278937429189682, 0.44149282574653625, 0.00039696693420410156, 0.3304288387298584, 0.31201502680778503, 0.19598843157291412, 0.39880552887916565, 0.112931028008461, 0.2393067479133606, -0.17021679878234863, -0.4129854142665863, 0.10483257472515106, -0.052443817257881165, -0.05828065797686577, 0.12836208939552307, -0.29675573110580444, -0.26670363545417786, -0.14271098375320435, 0.3999199867248535, 0.09093980491161346, -0.3154025673866272, -0.022366268560290337, -0.3823918402194977, 0.24503308534622192, 0.35970643162727356, -0.10120424628257751, -0.0008328929543495178, -0.27893930673599243, 0.004227526485919952, 0.027096709236502647, 0.023760482668876648, -0.10105060040950775, -0.17525193095207214, -0.2629469037055969, -0.3192732036113739, 0.32805806398391724, 0.1215202733874321, 0.6751459836959839, 0.17838871479034424, -0.48421379923820496, -0.0927380919456482, 0.1201753318309784, 0.42920517921447754, -0.27439022064208984, -0.4554179310798645, 0.3179735839366913, 0.30935588479042053, -0.048142313957214355, -0.31942588090896606, -0.29674217104911804, 0.14821584522724152, 0.1638011932373047, 0.3010956645011902, -0.2827662527561188, -0.07232680171728134, 0.2821340560913086, 0.44177472591400146, -0.010005645453929901, -0.06864544749259949, -0.3217141628265381, -0.126142680644989, -0.3747399151325226, 0.05735447257757187, -0.0926278680562973, 0.16342750191688538, -0.3332892060279846, 0.2586897611618042, -0.046284615993499756, -0.32381513714790344, 0.3405647575855255, 0.2839796543121338, 0.025570135563611984, -0.031146574765443802, 0.41643351316452026, 0.011276623234152794, 0.2867974042892456, 0.052709102630615234, 0.37862104177474976, -0.1220095306634903, -0.3644714951515198, 0.023897405713796616, -0.3005370497703552, 0.4673957824707031, 0.13919949531555176, 0.06422008574008942, 0.4552616477012634, -0.24525564908981323, 0.06475645303726196, -0.01292031817138195, -0.16766194999217987, 0.4006562829017639, -0.05484585836529732, -0.4278344511985779, -0.37512558698654175, 0.15636833012104034, 0.2864416837692261, -0.2747088074684143, 0.38001304864883423, 0.49103716015815735, -0.3182104527950287, 0.38487014174461365, -0.3473173677921295, 0.665744960308075, 0.3420006036758423, -0.11341159790754318, 0.23629866540431976, -0.04244682192802429, 0.37486952543258667, 0.02874450385570526, 0.3123714327812195, -0.19997501373291016, -0.4347868263721466, 0.03505973517894745, 0.1275108903646469, 0.24762290716171265, 0.07866719365119934, -0.03345862030982971, 0.6243845224380493, -0.24026308953762054, 0.4686662554740906, -0.07812051475048065, -0.07693502306938171, -0.20139627158641815, -0.3371336758136749, 0.10231126844882965, 0.033140502870082855, 0.03592337667942047, -0.08880038559436798, 0.013912256807088852, 0.3448748290538788, 0.1502400040626526, -0.09769275039434433, -0.11612574011087418, 0.1211099624633789, 0.4070456027984619, 0.19923114776611328, -0.30008846521377563, -0.4898303151130676, -0.00888456404209137, -0.05112005025148392, 0.5022434592247009, -0.025569070130586624, 0.12232816219329834, 0.08037762343883514, 0.4813559651374817, 0.1621546447277069, -0.10808256268501282, 0.0325707271695137, 0.11734966188669205, 0.21164223551750183, -0.17054633796215057, -0.017155569046735764, 0.14566560089588165, -0.04315776005387306, -0.319774866104126, -0.011892501264810562, 0.2796688675880432, -0.27675262093544006, -0.0945778414607048, 0.06272551417350769, 0.09007132053375244, -0.43467581272125244, 0.07364621758460999, -0.21704061329364777, -0.10172654688358307, 0.26277562975883484, -0.3305920958518982, -0.2703883647918701, -0.2794797718524933, 0.14446710050106049, 0.15641947090625763, -0.05079527199268341, 0.4371669888496399, -0.06617984920740128, -0.22995807230472565, -0.06104976683855057, -0.2915322184562683, -0.03413369134068489, -0.13784529268741608, 0.16663429141044617, -0.18626320362091064, 0.002543896436691284, 0.09341835975646973, -0.015927670523524284, -0.16118592023849487, 0.10992845147848129, 0.09578323364257812, -0.17702211439609528, -0.07435999810695648, 0.20709635317325592, 0.2695879340171814, 0.2907002866268158, -0.14419354498386383, 0.101241335272789, -0.4701380133628845, 0.05429022014141083, -0.2414015680551529, -0.10047519952058792, 0.08625811338424683, 0.33896705508232117, 0.43278467655181885, 0.1893298327922821, -0.0792534202337265, -0.19727936387062073, 0.22359362244606018, 0.06033668294548988, 0.37088459730148315, -0.1642829179763794, -0.2686711549758911, 0.11152639240026474, 0.15759921073913574, -0.014756625518202782, -0.22576048970222473, -0.08434701710939407, -0.07624180614948273, -0.24017472565174103, 0.4224231243133545, 0.24148637056350708, 0.05446631461381912, 0.12164490669965744, -0.5015921592712402, 0.10479223728179932, 0.13753587007522583, 0.12962853908538818, -0.02605518326163292, -0.09768973290920258, 0.07804666459560394, 0.22856171429157257, -0.004241641610860825, 0.00019299238920211792, -0.27479374408721924, -0.026806194335222244, 0.022079233080148697, 0.11655472218990326, -0.039648860692977905, -0.12955790758132935, -0.04664883390069008, 0.14402441680431366, 0.16534768044948578, 0.5476690530776978, -0.02835249714553356, -0.4748314917087555, 0.22328656911849976, 0.15768367052078247, -0.2135695517063141, -0.04799961671233177, -0.03328847140073776, -0.1696818768978119, 0.29537928104400635, 0.4130246639251709, 0.20205383002758026, -0.05011029541492462, -0.31973907351493835, 0.05847587063908577, 0.30409181118011475, -0.15737178921699524, 0.13158531486988068, 0.5237292647361755, 0.066893070936203, 0.21183374524116516, 0.1597067266702652, 0.1469808965921402, -0.06626667082309723, 0.4078282415866852, -0.07012807577848434, 0.2795063257217407, 0.4656786322593689, 0.0285649374127388, 0.11325888335704803, -0.19812428951263428, -0.036309145390987396, -0.1261904388666153, -0.0939277857542038, 0.42874282598495483, 0.26617059111595154, -0.2418072372674942, 0.0123068206012249, -0.051835838705301285, -0.08691837638616562, 0.20957723259925842, -0.08255814015865326, -0.3761565089225769, -0.009340047836303711, -0.33819955587387085, -0.011382617056369781, -0.06811073422431946, 0.07817346602678299, 0.16279101371765137, 0.7782618403434753, -0.11676032841205597, 0.1230493038892746, -0.596112847328186, 0.10378062725067139, 0.1412038803100586, 0.3238919675350189, -0.13642361760139465, -0.17601419985294342, 0.28758591413497925, -0.19083818793296814, 0.2253091037273407, 0.028608331456780434, 0.0930095762014389, -0.006471509579569101, 0.0390847846865654, -0.17514733970165253, -0.1590804159641266, -0.2818581759929657, 0.10732927918434143, 0.3809574246406555, -0.2894553244113922, -0.166471466422081, 0.22006486356258392, 0.1172439232468605, -0.10842278599739075, -0.012093756347894669, 0.3945344090461731, 0.3188636302947998, -0.5119901895523071, 0.1944369077682495, -0.04934076964855194, 0.007408984005451202, 0.19146087765693665, 0.0014574527740478516, -0.068900465965271, -0.19655832648277283, 0.44932207465171814, 0.10498760640621185, 0.1500331461429596, 0.01347200945019722, 0.09773766994476318, 0.14668364822864532, 0.06179134547710419, 0.2958756387233734, -0.4910654127597809, -0.23292911052703857, -0.11170323193073273, -0.5160526037216187, 0.04204747825860977, -0.23658634722232819, -0.0653468444943428, -0.038382403552532196, 0.32404035329818726, 0.11761347949504852, 0.04729703068733215, 0.028262559324502945, -0.12837888300418854, -0.030603943392634392, 0.3621755540370941, -0.20984429121017456, -0.31247368454933167, 0.1618310511112213, -0.06648703664541245, 0.09328804910182953, -0.13204430043697357, 0.06656717509031296, 0.41310352087020874, 0.049992457032203674, -0.3115004897117615, 0.0027777403593063354, 0.27384883165359497, -0.2461501955986023, 0.04652552306652069, 0.25102630257606506, 0.1361856907606125, -0.20255891978740692, -0.4122195243835449, -0.21963679790496826, -0.19816724956035614, -0.35429647564888, 0.25828978419303894, -0.11048716306686401, 0.2332862913608551, -0.011263079941272736, 0.2730684280395508, 0.012874849140644073, 0.19803142547607422, 0.043830275535583496, 0.13253790140151978, -0.5397307872772217, 0.31736138463020325, 0.090587317943573, 0.5057496428489685, -0.17408955097198486, 0.471795916557312, 0.16872954368591309, 0.6045783162117004, -0.15589439868927002, -0.6384281516075134, 0.439988374710083, -0.1504543125629425, -0.558271586894989, -0.021508734673261642, 0.05423026531934738, 0.21890351176261902, -0.2389153689146042, -0.4208885431289673, 0.004851892590522766, 0.09083449095487595, -0.3186001777648926, 0.029189057648181915, 0.15054717659950256, -0.07486380636692047, 0.07867296040058136, -0.054531168192625046, 0.032911643385887146, 0.2601968050003052, -0.2548401355743408, 0.34223538637161255, 0.09877828508615494 ]
https://github.com/huggingface/datasets/issues/6483
Fixed code: ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") dataset_features = dataset.features.keys() # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ```
Iterable Dataset: rename column clashes with remove column
### Describe the bug Suppose I have a two iterable datasets, one with the features: * `{"audio", "text", "column_a"}` And the other with the features: * `{"audio", "sentence", "column_b"}` I want to combine both datasets using `interleave_datasets`, which requires me to unify the column names. I would typically do this by: 1. Renaming the common columns to the same name (e.g. `"text"` -> `"sentence"`) 2. Removing the unwanted columns (e.g. `"column_a"`, `"column_b"`) However, the process of renaming and removing columns in an iterable dataset doesn't work, since we need to preserve the original text column, meaning we can't combine the datasets. ### Steps to reproduce the bug ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ``` Traceback: ```python --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[5], line 17 14 COLUMNS_TO_KEEP = {"audio", "sentence"} 15 dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) ---> 17 print(next(iter(dataset))) File ~/datasets/src/datasets/iterable_dataset.py:1353, in IterableDataset.__iter__(self) 1350 yield formatter.format_row(pa_table) 1351 return -> 1353 for key, example in ex_iterable: 1354 if self.features: 1355 # `IterableDataset` automatically fills missing columns with None. 1356 # This is done with `_apply_feature_types_on_example`. 1357 example = _apply_feature_types_on_example( 1358 example, self.features, token_per_repo_id=self._token_per_repo_id 1359 ) File ~/datasets/src/datasets/iterable_dataset.py:652, in MappedExamplesIterable.__iter__(self) 650 yield from ArrowExamplesIterable(self._iter_arrow, {}) 651 else: --> 652 yield from self._iter() File ~/datasets/src/datasets/iterable_dataset.py:729, in MappedExamplesIterable._iter(self) 727 if self.remove_columns: 728 for c in self.remove_columns: --> 729 del transformed_example[c] 730 yield key, transformed_example 731 current_idx += 1 KeyError: 'text' ``` => we see that `datasets` is looking for the column "text", even though we've renamed this to "sentence" and then removed the un-wanted "text" column from our dataset. ### Expected behavior Should be able to rename and remove columns from iterable dataset. ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: macOS-13.5.1-arm64-arm-64bit - Python version: 3.11.6 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2
67
Iterable Dataset: rename column clashes with remove column ### Describe the bug Suppose I have a two iterable datasets, one with the features: * `{"audio", "text", "column_a"}` And the other with the features: * `{"audio", "sentence", "column_b"}` I want to combine both datasets using `interleave_datasets`, which requires me to unify the column names. I would typically do this by: 1. Renaming the common columns to the same name (e.g. `"text"` -> `"sentence"`) 2. Removing the unwanted columns (e.g. `"column_a"`, `"column_b"`) However, the process of renaming and removing columns in an iterable dataset doesn't work, since we need to preserve the original text column, meaning we can't combine the datasets. ### Steps to reproduce the bug ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ``` Traceback: ```python --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[5], line 17 14 COLUMNS_TO_KEEP = {"audio", "sentence"} 15 dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) ---> 17 print(next(iter(dataset))) File ~/datasets/src/datasets/iterable_dataset.py:1353, in IterableDataset.__iter__(self) 1350 yield formatter.format_row(pa_table) 1351 return -> 1353 for key, example in ex_iterable: 1354 if self.features: 1355 # `IterableDataset` automatically fills missing columns with None. 1356 # This is done with `_apply_feature_types_on_example`. 1357 example = _apply_feature_types_on_example( 1358 example, self.features, token_per_repo_id=self._token_per_repo_id 1359 ) File ~/datasets/src/datasets/iterable_dataset.py:652, in MappedExamplesIterable.__iter__(self) 650 yield from ArrowExamplesIterable(self._iter_arrow, {}) 651 else: --> 652 yield from self._iter() File ~/datasets/src/datasets/iterable_dataset.py:729, in MappedExamplesIterable._iter(self) 727 if self.remove_columns: 728 for c in self.remove_columns: --> 729 del transformed_example[c] 730 yield key, transformed_example 731 current_idx += 1 KeyError: 'text' ``` => we see that `datasets` is looking for the column "text", even though we've renamed this to "sentence" and then removed the un-wanted "text" column from our dataset. ### Expected behavior Should be able to rename and remove columns from iterable dataset. ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: macOS-13.5.1-arm64-arm-64bit - Python version: 3.11.6 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2 Fixed code: ```python from datasets import load_dataset # load LS in streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # check original features dataset_features = dataset.features.keys() print("Original features: ", dataset_features) #Β rename "text" -> "sentence" dataset = dataset.rename_column("text", "sentence") dataset_features = dataset.features.keys() # remove unwanted columns COLUMNS_TO_KEEP = {"audio", "sentence"} dataset = dataset.remove_columns(set(dataset_features - COLUMNS_TO_KEEP)) # stream first sample, should return "audio" and "sentence" columns print(next(iter(dataset))) ```
[ 0.1475961059331894, 0.20639097690582275, 0.013281568884849548, 0.04070236533880234, 0.21933552622795105, 0.34094297885894775, 0.47970396280288696, 0.06645643711090088, -0.09174070507287979, 0.19398123025894165, -0.1917896866798401, 0.30293503403663635, 0.1443752646446228, -0.030581727623939514, -0.48896610736846924, -0.06055698171257973, 0.24286684393882751, 0.23223876953125, -0.1029394268989563, 0.17563527822494507, -0.26724499464035034, 0.1497838795185089, -0.40453100204467773, -0.04936685413122177, 0.13076536357402802, 0.039459228515625, -0.09246505051851273, -0.06323009729385376, 0.10187377035617828, -0.07379788160324097, 0.0973920151591301, 0.41305822134017944, -0.23551201820373535, 0.4530574083328247, -0.00011287652159808204, -0.14655467867851257, 0.11265728622674942, 0.05558239668607712, -0.3870816230773926, -0.2911534607410431, -0.3095398545265198, -0.1913522332906723, -0.1725931614637375, -0.17084920406341553, 0.1388927698135376, -0.23279330134391785, -0.4342465400695801, -0.6392122507095337, -0.05011634901165962, 0.019875023514032364, 0.18834169209003448, 0.16117824614048004, 0.017523713409900665, 0.12886029481887817, 0.2656674087047577, -0.1514907330274582, -0.1739768087863922, -0.06726992130279541, -0.11337269842624664, -0.3597671687602997, 0.28591397404670715, 0.3651185631752014, -0.331167608499527, -0.09721067547798157, 0.07733077555894852, 0.0612635612487793, -0.27175092697143555, -0.26574212312698364, 0.40354326367378235, 0.24856877326965332, 0.41505587100982666, -0.3925709128379822, -0.2447132021188736, -0.20364272594451904, 0.12431202828884125, -0.3367735743522644, 0.22929207980632782, -0.09844458848237991, 0.2969183921813965, -0.01944604329764843, 0.01678331196308136, -0.18806923925876617, 0.04273562878370285, 0.014573993161320686, -0.10039258003234863, 0.010056532919406891, 0.05405024439096451, 0.2703430950641632, -0.030149374157190323, -0.21009273827075958, 0.294812947511673, -0.19711142778396606, -0.0948578491806984, 0.14589917659759521, -0.6206302046775818, 0.025133445858955383, -0.10808023810386658, -0.24969986081123352, -0.055762387812137604, 0.03464410826563835, -0.02575903758406639, -0.2064441740512848, 0.4248157739639282, 0.12059740722179413, 0.18426772952079773, 0.21850040555000305, -0.05507432669401169, 0.07288046181201935, 0.19920353591442108, 0.17653024196624756, 0.08032160997390747, -0.1252388209104538, 0.4897221624851227, 0.03649851679801941, 0.11290544271469116, -0.2273753583431244, 0.3267689347267151, -0.030783675611019135, -0.49853000044822693, 0.29518237709999084, -0.4123104214668274, -0.07329234480857849, -0.02452169544994831, -0.10739286243915558, 0.2712465524673462, 0.300477534532547, -0.13326585292816162, 0.3382394313812256, 0.010485149919986725, 0.033202722668647766, -0.11905696988105774, 0.07090649008750916, -0.16582010686397552, 0.022166628390550613, 0.13347038626670837, 0.038295067846775055, -0.004591323435306549, 0.18870513141155243, 0.09522585570812225, -0.0020859763026237488, -0.18249130249023438, -0.0924532562494278, 0.16369691491127014, -0.08984458446502686, 0.11429763585329056, 0.13093425333499908, 0.06654755771160126, -0.4063951373100281, -0.0024338215589523315, -0.11873704195022583, 0.08716198801994324, -0.055516116321086884, -0.17365571856498718, 0.2140687257051468, -0.14063411951065063, 0.07936174422502518, 0.18923500180244446, 0.08090217411518097, 0.34534090757369995, -0.14805525541305542, 0.2246285378932953, -0.0737442821264267, 0.14442229270935059, -0.16461221873760223, 0.027312010526657104, 0.09701168537139893, -0.2119779884815216, 0.019529908895492554, 0.09349702298641205, 0.13298718631267548, 0.0980219617486, 0.301021546125412, 0.13829176127910614, -0.3997119665145874, -0.11406337469816208, -0.011471211910247803, 0.04304558411240578, -0.1476678103208542, -0.3103867471218109, 0.3655823767185211, -0.12366475909948349, 0.5040543079376221, 0.20973938703536987, -0.09383277595043182, -0.11686569452285767, -0.14178556203842163, -0.010834798216819763, 0.18525245785713196, -0.16008324921131134, -0.09176221489906311, -0.11776445060968399, -0.08387061953544617, 0.15026414394378662, -0.304365336894989, 0.024703554809093475, 0.24318404495716095, 0.019153710454702377, 0.05474788323044777, 0.31389865279197693, -0.18354827165603638, 0.3115934133529663, 0.10247968882322311, 0.2432313859462738, 0.3287399411201477, 0.16240806877613068, 0.005227893590927124, -0.517549455165863, 0.07987812161445618, 0.4254135489463806, -0.24530909955501556, 0.03595646470785141, -0.3391214907169342, -0.0787310004234314, -0.14152705669403076, -0.25303176045417786, 0.09298890829086304, 0.09348083287477493, 0.26379066705703735, -0.06495954096317291, -0.3013538718223572, -0.275168240070343, 0.32633456587791443, -0.14647632837295532, 0.028103958815336227, -0.6666407585144043, 0.24093759059906006, 0.056487664580345154, -0.06521841883659363, 0.006298638880252838, 0.47713637351989746, 0.11466649174690247, 0.019751545041799545, -0.15869179368019104, 0.5362984538078308, -0.27480608224868774, 0.3036133646965027, -0.2171557992696762, 0.17296971380710602, -0.14879809319972992, -0.0060328468680381775, -0.02080381289124489, -0.08178192377090454, 0.148065447807312, 0.03397311270236969, 0.0007604239508509636, 0.21632345020771027, -0.3449254035949707, 0.6236695647239685, 0.13383622467517853, -0.02778329700231552, 0.15780556201934814, -0.2286018282175064, -0.37816134095191956, -0.39323192834854126, 0.07983510196208954, -0.38537949323654175, 0.14670434594154358, -0.2488241195678711, -0.30085060000419617, -0.008564844727516174, 0.2542053759098053, 0.27312517166137695, -0.2990764379501343, -0.10754804313182831, -0.15349093079566956, -0.06491658091545105, -0.14780955016613007, 0.1312304437160492, 0.44239896535873413, 0.027060609310865402, 0.07524309307336807, 0.04624945670366287, 0.12934666872024536, -0.15258660912513733, 0.16783367097377777, 0.3622918426990509, -0.0001881420612335205, 0.3547302186489105, 0.3921803832054138, 0.09507924318313599, -0.1834927201271057, -0.24908651411533356, 0.08060043305158615, 0.09334159642457962, -0.1020427718758583, 0.2436760514974594, -0.21570879220962524, -0.18425799906253815, -0.04929664731025696, -0.23965895175933838, -0.0706292912364006, -0.6337692141532898, -0.10711024701595306, 0.7739092111587524, -0.20481717586517334, 0.25537967681884766, -0.19783614575862885, 0.04238949716091156, -0.15981623530387878, 0.010712424293160439, -0.13462455570697784, -0.3498004078865051, -0.07044123113155365, 0.11387914419174194, -0.07107197493314743, -0.3144734501838684, 0.2019892781972885, 0.12145096063613892, -0.16158533096313477, -0.47475960850715637, -0.30164283514022827, 0.184529647231102, -0.49315324425697327, 0.08462263643741608, 0.31086575984954834, -0.2260473519563675, 0.03837135434150696, -0.25229334831237793, 0.21280580759048462, 0.13030418753623962, -0.07718729227781296, 0.20035387575626373, 0.08214142173528671, -0.015572406351566315, -0.021255049854516983, -0.2879199683666229, 0.0324324294924736, -0.3072381019592285, 0.14307405054569244, -0.4639965295791626, -0.1402367800474167, 0.002604968845844269, -0.20724144577980042, -0.29502102732658386, 0.2781810462474823, -0.005034744739532471, -0.4324214458465576, -0.02857297658920288, -0.10825124382972717, -0.06533198058605194, -0.0013041426427662373, -0.044134266674518585, -0.018210776150226593, 0.2863258123397827, 0.18498355150222778, -0.2599773705005646, 0.25450870394706726, -0.2194170504808426, 0.1692856252193451, 0.05887829512357712, -0.0092165507376194, -0.07561512291431427, 0.26455894112586975, -0.03258819133043289, -0.23631839454174042, -0.17686599493026733, -0.08359386026859283, 0.3265019655227661, 0.22396260499954224, 0.278937429189682, 0.44149282574653625, 0.00039696693420410156, 0.3304288387298584, 0.31201502680778503, 0.19598843157291412, 0.39880552887916565, 0.112931028008461, 0.2393067479133606, -0.17021679878234863, -0.4129854142665863, 0.10483257472515106, -0.052443817257881165, -0.05828065797686577, 0.12836208939552307, -0.29675573110580444, -0.26670363545417786, -0.14271098375320435, 0.3999199867248535, 0.09093980491161346, -0.3154025673866272, -0.022366268560290337, -0.3823918402194977, 0.24503308534622192, 0.35970643162727356, -0.10120424628257751, -0.0008328929543495178, -0.27893930673599243, 0.004227526485919952, 0.027096709236502647, 0.023760482668876648, -0.10105060040950775, -0.17525193095207214, -0.2629469037055969, -0.3192732036113739, 0.32805806398391724, 0.1215202733874321, 0.6751459836959839, 0.17838871479034424, -0.48421379923820496, -0.0927380919456482, 0.1201753318309784, 0.42920517921447754, -0.27439022064208984, -0.4554179310798645, 0.3179735839366913, 0.30935588479042053, -0.048142313957214355, -0.31942588090896606, -0.29674217104911804, 0.14821584522724152, 0.1638011932373047, 0.3010956645011902, -0.2827662527561188, -0.07232680171728134, 0.2821340560913086, 0.44177472591400146, -0.010005645453929901, -0.06864544749259949, -0.3217141628265381, -0.126142680644989, -0.3747399151325226, 0.05735447257757187, -0.0926278680562973, 0.16342750191688538, -0.3332892060279846, 0.2586897611618042, -0.046284615993499756, -0.32381513714790344, 0.3405647575855255, 0.2839796543121338, 0.025570135563611984, -0.031146574765443802, 0.41643351316452026, 0.011276623234152794, 0.2867974042892456, 0.052709102630615234, 0.37862104177474976, -0.1220095306634903, -0.3644714951515198, 0.023897405713796616, -0.3005370497703552, 0.4673957824707031, 0.13919949531555176, 0.06422008574008942, 0.4552616477012634, -0.24525564908981323, 0.06475645303726196, -0.01292031817138195, -0.16766194999217987, 0.4006562829017639, -0.05484585836529732, -0.4278344511985779, -0.37512558698654175, 0.15636833012104034, 0.2864416837692261, -0.2747088074684143, 0.38001304864883423, 0.49103716015815735, -0.3182104527950287, 0.38487014174461365, -0.3473173677921295, 0.665744960308075, 0.3420006036758423, -0.11341159790754318, 0.23629866540431976, -0.04244682192802429, 0.37486952543258667, 0.02874450385570526, 0.3123714327812195, -0.19997501373291016, -0.4347868263721466, 0.03505973517894745, 0.1275108903646469, 0.24762290716171265, 0.07866719365119934, -0.03345862030982971, 0.6243845224380493, -0.24026308953762054, 0.4686662554740906, -0.07812051475048065, -0.07693502306938171, -0.20139627158641815, -0.3371336758136749, 0.10231126844882965, 0.033140502870082855, 0.03592337667942047, -0.08880038559436798, 0.013912256807088852, 0.3448748290538788, 0.1502400040626526, -0.09769275039434433, -0.11612574011087418, 0.1211099624633789, 0.4070456027984619, 0.19923114776611328, -0.30008846521377563, -0.4898303151130676, -0.00888456404209137, -0.05112005025148392, 0.5022434592247009, -0.025569070130586624, 0.12232816219329834, 0.08037762343883514, 0.4813559651374817, 0.1621546447277069, -0.10808256268501282, 0.0325707271695137, 0.11734966188669205, 0.21164223551750183, -0.17054633796215057, -0.017155569046735764, 0.14566560089588165, -0.04315776005387306, -0.319774866104126, -0.011892501264810562, 0.2796688675880432, -0.27675262093544006, -0.0945778414607048, 0.06272551417350769, 0.09007132053375244, -0.43467581272125244, 0.07364621758460999, -0.21704061329364777, -0.10172654688358307, 0.26277562975883484, -0.3305920958518982, -0.2703883647918701, -0.2794797718524933, 0.14446710050106049, 0.15641947090625763, -0.05079527199268341, 0.4371669888496399, -0.06617984920740128, -0.22995807230472565, -0.06104976683855057, -0.2915322184562683, -0.03413369134068489, -0.13784529268741608, 0.16663429141044617, -0.18626320362091064, 0.002543896436691284, 0.09341835975646973, -0.015927670523524284, -0.16118592023849487, 0.10992845147848129, 0.09578323364257812, -0.17702211439609528, -0.07435999810695648, 0.20709635317325592, 0.2695879340171814, 0.2907002866268158, -0.14419354498386383, 0.101241335272789, -0.4701380133628845, 0.05429022014141083, -0.2414015680551529, -0.10047519952058792, 0.08625811338424683, 0.33896705508232117, 0.43278467655181885, 0.1893298327922821, -0.0792534202337265, -0.19727936387062073, 0.22359362244606018, 0.06033668294548988, 0.37088459730148315, -0.1642829179763794, -0.2686711549758911, 0.11152639240026474, 0.15759921073913574, -0.014756625518202782, -0.22576048970222473, -0.08434701710939407, -0.07624180614948273, -0.24017472565174103, 0.4224231243133545, 0.24148637056350708, 0.05446631461381912, 0.12164490669965744, -0.5015921592712402, 0.10479223728179932, 0.13753587007522583, 0.12962853908538818, -0.02605518326163292, -0.09768973290920258, 0.07804666459560394, 0.22856171429157257, -0.004241641610860825, 0.00019299238920211792, -0.27479374408721924, -0.026806194335222244, 0.022079233080148697, 0.11655472218990326, -0.039648860692977905, -0.12955790758132935, -0.04664883390069008, 0.14402441680431366, 0.16534768044948578, 0.5476690530776978, -0.02835249714553356, -0.4748314917087555, 0.22328656911849976, 0.15768367052078247, -0.2135695517063141, -0.04799961671233177, -0.03328847140073776, -0.1696818768978119, 0.29537928104400635, 0.4130246639251709, 0.20205383002758026, -0.05011029541492462, -0.31973907351493835, 0.05847587063908577, 0.30409181118011475, -0.15737178921699524, 0.13158531486988068, 0.5237292647361755, 0.066893070936203, 0.21183374524116516, 0.1597067266702652, 0.1469808965921402, -0.06626667082309723, 0.4078282415866852, -0.07012807577848434, 0.2795063257217407, 0.4656786322593689, 0.0285649374127388, 0.11325888335704803, -0.19812428951263428, -0.036309145390987396, -0.1261904388666153, -0.0939277857542038, 0.42874282598495483, 0.26617059111595154, -0.2418072372674942, 0.0123068206012249, -0.051835838705301285, -0.08691837638616562, 0.20957723259925842, -0.08255814015865326, -0.3761565089225769, -0.009340047836303711, -0.33819955587387085, -0.011382617056369781, -0.06811073422431946, 0.07817346602678299, 0.16279101371765137, 0.7782618403434753, -0.11676032841205597, 0.1230493038892746, -0.596112847328186, 0.10378062725067139, 0.1412038803100586, 0.3238919675350189, -0.13642361760139465, -0.17601419985294342, 0.28758591413497925, -0.19083818793296814, 0.2253091037273407, 0.028608331456780434, 0.0930095762014389, -0.006471509579569101, 0.0390847846865654, -0.17514733970165253, -0.1590804159641266, -0.2818581759929657, 0.10732927918434143, 0.3809574246406555, -0.2894553244113922, -0.166471466422081, 0.22006486356258392, 0.1172439232468605, -0.10842278599739075, -0.012093756347894669, 0.3945344090461731, 0.3188636302947998, -0.5119901895523071, 0.1944369077682495, -0.04934076964855194, 0.007408984005451202, 0.19146087765693665, 0.0014574527740478516, -0.068900465965271, -0.19655832648277283, 0.44932207465171814, 0.10498760640621185, 0.1500331461429596, 0.01347200945019722, 0.09773766994476318, 0.14668364822864532, 0.06179134547710419, 0.2958756387233734, -0.4910654127597809, -0.23292911052703857, -0.11170323193073273, -0.5160526037216187, 0.04204747825860977, -0.23658634722232819, -0.0653468444943428, -0.038382403552532196, 0.32404035329818726, 0.11761347949504852, 0.04729703068733215, 0.028262559324502945, -0.12837888300418854, -0.030603943392634392, 0.3621755540370941, -0.20984429121017456, -0.31247368454933167, 0.1618310511112213, -0.06648703664541245, 0.09328804910182953, -0.13204430043697357, 0.06656717509031296, 0.41310352087020874, 0.049992457032203674, -0.3115004897117615, 0.0027777403593063354, 0.27384883165359497, -0.2461501955986023, 0.04652552306652069, 0.25102630257606506, 0.1361856907606125, -0.20255891978740692, -0.4122195243835449, -0.21963679790496826, -0.19816724956035614, -0.35429647564888, 0.25828978419303894, -0.11048716306686401, 0.2332862913608551, -0.011263079941272736, 0.2730684280395508, 0.012874849140644073, 0.19803142547607422, 0.043830275535583496, 0.13253790140151978, -0.5397307872772217, 0.31736138463020325, 0.090587317943573, 0.5057496428489685, -0.17408955097198486, 0.471795916557312, 0.16872954368591309, 0.6045783162117004, -0.15589439868927002, -0.6384281516075134, 0.439988374710083, -0.1504543125629425, -0.558271586894989, -0.021508734673261642, 0.05423026531934738, 0.21890351176261902, -0.2389153689146042, -0.4208885431289673, 0.004851892590522766, 0.09083449095487595, -0.3186001777648926, 0.029189057648181915, 0.15054717659950256, -0.07486380636692047, 0.07867296040058136, -0.054531168192625046, 0.032911643385887146, 0.2601968050003052, -0.2548401355743408, 0.34223538637161255, 0.09877828508615494 ]
https://github.com/huggingface/datasets/issues/6484
Hello @kenfus, this is meant to be possible to do yes. Let me ping @lhoestq or @mariosasko from the `datasets` team (`huggingface_hub` is only the underlying library to download files from the Hub but here it looks more like a `datasets` problem).
[Feature Request] Dataset versioning
**Is your feature request related to a problem? Please describe.** I am working on a project, where I would like to test different preprocessing methods for my ML-data. Thus, I would like to work a lot with revisions and compare them. Currently, I was not able to make it work with the revision keyword because it was not redownloading the data, it was reading in some cached data, until I put `download_mode="force_redownload"`, even though the reversion was different. Of course, I may have done something wrong or missed a setting somewhere! **Describe the solution you'd like** The solution would allow me to easily work with revisions: - create a new dataset (by combining things, different preprocessing, ..) and give it a new revision (v.1.2.3), maybe like this: `dataset_audio.push_to_hub('kenfus/xy', revision='v1.0.2')` - then, get the current revision as follows: ``` dataset = load_dataset( 'kenfus/xy', revision='v1.0.2', ) ``` this downloads the new version and does not load in a different revision and all future map, filter, .. operations are done on this dataset and not loaded from cache produced from a different revision. - if I rerun the run, the caching should be smart enough in every step to not reuse a mapping operation on a different revision. **Describe alternatives you've considered** I created my own caching, putting `download_mode="force_redownload"` and `load_from_cache_file=False,` everywhere. **Additional context** Thanks a lot for your great work! Creating NLP datasets and training a model with them is really easy and straightforward with huggingface. This is the data loading in my script: ``` ## CREATE PATHS prepared_dataset_path = os.path.join( DATA_FOLDER, str(DATA_VERSION), "prepared_dataset" ) os.makedirs(os.path.join(DATA_FOLDER, str(DATA_VERSION)), exist_ok=True) ## LOAD DATASET if os.path.exists(prepared_dataset_path): print("Loading prepared dataset from disk...") dataset_prepared = load_from_disk(prepared_dataset_path) else: print("Loading dataset from HuggingFace Datasets...") dataset = load_dataset( PATH_TO_DATASET, revision=DATA_VERSION, download_mode="force_redownload" ) print("Preparing dataset...") dataset_prepared = dataset.map( prepare_dataset, remove_columns=["audio", "transcription"], num_proc=os.cpu_count(), load_from_cache_file=False, ) dataset_prepared.save_to_disk(prepared_dataset_path) del dataset if CHECK_DATASET: ## CHECK DATASET dataset_prepared = dataset_prepared.map( check_dimensions, num_proc=os.cpu_count(), load_from_cache_file=False ) dataset_filtered = dataset_prepared.filter( lambda example: not example["incorrect_dimension"], load_from_cache_file=False, ) for example in dataset_prepared.filter( lambda example: example["incorrect_dimension"], load_from_cache_file=False ): print(example["path"]) print( f"Number of examples with incorrect dimension: {len(dataset_prepared) - len(dataset_filtered)}" ) print("Number of examples train: ", len(dataset_filtered["train"])) print("Number of examples test: ", len(dataset_filtered["test"])) ```
42
[Feature Request] Dataset versioning **Is your feature request related to a problem? Please describe.** I am working on a project, where I would like to test different preprocessing methods for my ML-data. Thus, I would like to work a lot with revisions and compare them. Currently, I was not able to make it work with the revision keyword because it was not redownloading the data, it was reading in some cached data, until I put `download_mode="force_redownload"`, even though the reversion was different. Of course, I may have done something wrong or missed a setting somewhere! **Describe the solution you'd like** The solution would allow me to easily work with revisions: - create a new dataset (by combining things, different preprocessing, ..) and give it a new revision (v.1.2.3), maybe like this: `dataset_audio.push_to_hub('kenfus/xy', revision='v1.0.2')` - then, get the current revision as follows: ``` dataset = load_dataset( 'kenfus/xy', revision='v1.0.2', ) ``` this downloads the new version and does not load in a different revision and all future map, filter, .. operations are done on this dataset and not loaded from cache produced from a different revision. - if I rerun the run, the caching should be smart enough in every step to not reuse a mapping operation on a different revision. **Describe alternatives you've considered** I created my own caching, putting `download_mode="force_redownload"` and `load_from_cache_file=False,` everywhere. **Additional context** Thanks a lot for your great work! Creating NLP datasets and training a model with them is really easy and straightforward with huggingface. This is the data loading in my script: ``` ## CREATE PATHS prepared_dataset_path = os.path.join( DATA_FOLDER, str(DATA_VERSION), "prepared_dataset" ) os.makedirs(os.path.join(DATA_FOLDER, str(DATA_VERSION)), exist_ok=True) ## LOAD DATASET if os.path.exists(prepared_dataset_path): print("Loading prepared dataset from disk...") dataset_prepared = load_from_disk(prepared_dataset_path) else: print("Loading dataset from HuggingFace Datasets...") dataset = load_dataset( PATH_TO_DATASET, revision=DATA_VERSION, download_mode="force_redownload" ) print("Preparing dataset...") dataset_prepared = dataset.map( prepare_dataset, remove_columns=["audio", "transcription"], num_proc=os.cpu_count(), load_from_cache_file=False, ) dataset_prepared.save_to_disk(prepared_dataset_path) del dataset if CHECK_DATASET: ## CHECK DATASET dataset_prepared = dataset_prepared.map( check_dimensions, num_proc=os.cpu_count(), load_from_cache_file=False ) dataset_filtered = dataset_prepared.filter( lambda example: not example["incorrect_dimension"], load_from_cache_file=False, ) for example in dataset_prepared.filter( lambda example: example["incorrect_dimension"], load_from_cache_file=False ): print(example["path"]) print( f"Number of examples with incorrect dimension: {len(dataset_prepared) - len(dataset_filtered)}" ) print("Number of examples train: ", len(dataset_filtered["train"])) print("Number of examples test: ", len(dataset_filtered["test"])) ``` Hello @kenfus, this is meant to be possible to do yes. Let me ping @lhoestq or @mariosasko from the `datasets` team (`huggingface_hub` is only the underlying library to download files from the Hub but here it looks more like a `datasets` problem).
[ -0.272832989692688, -0.24783575534820557, -0.0026081427931785583, -0.07376807183027267, -0.22250692546367645, -0.015726059675216675, -0.05707693472504616, 0.34137123823165894, -0.17344817519187927, -0.03136356174945831, -0.1561669409275055, 0.23501451313495636, -0.11500318348407745, 0.3179989457130432, 0.017695147544145584, 0.08551698923110962, 0.28366783261299133, 0.2492702603340149, -0.03994271159172058, 0.058347418904304504, -0.3770228624343872, 0.021084299311041832, -0.08654647320508957, 0.032743778079748154, -0.22368547320365906, -0.10516400635242462, -0.1551632136106491, -0.056780725717544556, -0.180447518825531, -0.47487470507621765, 0.34482741355895996, 0.435402512550354, 0.2228982150554657, 0.6818733215332031, -0.00012008284829789773, -0.027761034667491913, 0.3231940269470215, -0.05849771201610565, -0.6495254039764404, -0.4311615228652954, 0.12097452580928802, -0.1889611780643463, 0.10328073799610138, -0.0026060640811920166, -0.24334046244621277, -0.12603634595870972, 0.11668193340301514, -0.244238018989563, 0.6784784197807312, -0.0075818561017513275, 0.10937158763408661, 0.07933209836483002, -0.14446164667606354, 0.038465388119220734, 0.05319615826010704, 0.3755338490009308, -0.2111678421497345, 0.2024446278810501, 0.40181028842926025, -0.06821230053901672, -0.0320531465113163, 0.44820016622543335, -0.09272915124893188, -0.018969865515828133, 0.4356854557991028, -0.11430320888757706, 0.2782193720340729, -0.09964165091514587, -0.01787334308028221, 0.13922472298145294, 0.7784711122512817, -0.46928873658180237, -0.7360714673995972, -0.33023685216903687, 0.09153124690055847, -0.5646279454231262, 0.11174218356609344, -0.029409028589725494, -0.25004392862319946, 0.25423863530158997, -0.6616745591163635, -0.38072800636291504, -0.08341175317764282, 0.017833665013313293, 0.22054873406887054, 0.13591542840003967, -0.037467628717422485, 0.053961556404829025, 0.021849336102604866, -0.05378638207912445, 0.2294234037399292, -0.2286565750837326, -0.15199679136276245, 0.36401572823524475, -0.1217605248093605, -0.41187784075737, -0.05469013750553131, 0.0999099612236023, 0.4538428783416748, 0.1393878012895584, -0.06872089207172394, -0.1019512489438057, -0.4129607677459717, -0.046742524951696396, 0.16814091801643372, 0.3665008842945099, 0.3871520757675171, -0.20451819896697998, 0.2371751070022583, -0.00645030289888382, 0.008284620940685272, -0.005110020749270916, 0.16334250569343567, -0.06103629246354103, 0.10286328196525574, 0.308601975440979, 0.33527445793151855, -0.3532034158706665, 0.11919034272432327, -0.17054492235183716, -0.2194000482559204, -0.335779070854187, -0.14095745980739594, 0.2795146405696869, 0.13149133324623108, 0.05937081575393677, 0.04027990996837616, 0.2732590138912201, -0.44582271575927734, -0.18474698066711426, -0.0463220477104187, -0.2549087405204773, -0.2701583802700043, 0.23285667598247528, 0.2843434810638428, -0.2345704436302185, 0.26031020283699036, -0.008385971188545227, -0.18989747762680054, -0.13835851848125458, -0.1406288594007492, -0.0801173597574234, 0.0012222826480865479, -0.1477890908718109, -0.3870096206665039, 0.12277371436357498, -0.0014523370191454887, -0.08604570478200912, -0.49213457107543945, 0.012346840463578701, -0.06000061333179474, -0.232705220580101, 0.18624745309352875, 0.03036567196249962, -0.15388575196266174, 0.001157473772764206, -0.2756994068622589, 0.5349510908126831, -0.01530955359339714, -0.15562507510185242, 0.084225133061409, 0.1261739879846573, -0.4702012240886688, -0.2231365442276001, 0.07444169372320175, 0.5304378271102905, -0.33519598841667175, -0.3640512228012085, 0.218996062874794, -0.2478260099887848, -0.1896815448999405, 0.19121763110160828, -0.030773745849728584, 0.07091227918863297, 0.08186701685190201, -0.4724409580230713, 0.40366899967193604, -0.3135596513748169, -0.5806632041931152, 0.1731986105442047, -0.12177171558141708, 0.05906844884157181, 0.12335436791181564, 0.24502860009670258, 0.021198682487010956, -0.2116054892539978, 0.0350741483271122, 0.27149513363838196, 0.23076821863651276, -0.10353122651576996, -0.17086008191108704, -0.589281439781189, -0.012278301641345024, -0.11054375767707825, -0.10654157400131226, 0.18205194175243378, -0.031414758414030075, -0.1374274045228958, 0.4293496012687683, -0.10189193487167358, 0.14355820417404175, 0.08928817510604858, 0.14389356970787048, 0.12617799639701843, -0.07271403074264526, -0.23070083558559418, -0.7074224948883057, 0.2619854211807251, -0.13712531328201294, -0.19404339790344238, 0.23184406757354736, -0.15266573429107666, -0.13304495811462402, 0.017183519899845123, -0.157276451587677, -0.399118036031723, 0.002068951725959778, 0.08989901840686798, 0.37962859869003296, 0.1429075300693512, -0.2484973669052124, 0.22752249240875244, 0.26569077372550964, 0.11733795702457428, -0.12712281942367554, 0.1489342302083969, -0.0393642857670784, -0.18182037770748138, -0.10693860054016113, 0.31388553977012634, 0.30760449171066284, -0.0303727425634861, 0.08700412511825562, 0.3314318358898163, -0.09925204515457153, 0.4645800292491913, -0.01160323154181242, 0.2284746766090393, 0.2848860025405884, 0.2583525776863098, 0.15972577035427094, -0.18290404975414276, -0.04143984988331795, 0.05641604959964752, -0.49126309156417847, 0.38057196140289307, 0.0918259471654892, 0.08546392619609833, -0.13659793138504028, -0.20094862580299377, 0.038105085492134094, -0.07665455341339111, -0.21394409239292145, -0.1375153660774231, 0.268839031457901, 0.03565093129873276, 0.1746341586112976, -0.07820658385753632, 0.03354499489068985, -0.08801750093698502, 0.25444406270980835, -0.15625056624412537, 0.01773947663605213, -0.02886117622256279, -0.20289446413516998, -0.025398533791303635, 0.15041683614253998, 0.11047951877117157, 0.1254296898841858, 0.136495441198349, 0.0788707435131073, 0.2654281556606293, -0.11025537550449371, 0.02078503742814064, 0.0170317143201828, 0.06253501027822495, 0.22969967126846313, 0.007763911969959736, 0.1920625865459442, 0.025535430759191513, -0.17904072999954224, 0.2784920334815979, 0.1873813271522522, 0.0083963293582201, -0.06458927690982819, -0.020125191658735275, -0.24923816323280334, -0.1567395031452179, -0.34152138233184814, -0.1612280309200287, -0.28576987981796265, 0.1591198444366455, 0.07408291101455688, 0.5102291703224182, 0.23721252381801605, 0.3757706880569458, 0.09229694306850433, 0.441378653049469, -0.24180170893669128, -0.18372619152069092, 0.053859300911426544, -0.2550230622291565, -0.11434675753116608, -0.0663091242313385, 0.2757120132446289, -0.2564825117588043, 0.48100751638412476, 0.08587456494569778, -0.1505858153104782, -0.5130939483642578, -0.22690436244010925, 0.10152709484100342, -0.043433696031570435, 0.4323878288269043, -0.06777112931013107, -0.1292402595281601, 0.1436065286397934, -0.0043793655931949615, 0.2526695728302002, -0.17653223872184753, -0.3968225121498108, -0.3349325358867645, 0.1995108425617218, 0.2893155813217163, -0.08616411685943604, -0.16332226991653442, -0.03654129058122635, -0.28109002113342285, 0.6208832263946533, 0.054197996854782104, 0.08451371639966965, 0.15407824516296387, 0.005403019487857819, -0.1282200962305069, 0.14481797814369202, 0.30220353603363037, -0.18994222581386566, -0.06083802878856659, -0.12164993584156036, -0.015307649970054626, -0.06091683357954025, -0.1142866238951683, 0.07372014969587326, -0.12925492227077484, 0.44625699520111084, -0.44417959451675415, -0.4599725008010864, 0.07426823675632477, 0.3159770965576172, 0.23500210046768188, -0.06564604490995407, 0.5894107818603516, 0.2593476474285126, 0.07357453554868698, -0.011419035494327545, -0.4773663878440857, -0.050228867679834366, 0.014118747785687447, 0.24088060855865479, 0.4170989990234375, 0.6717800498008728, -0.034166369587183, 1.034552812576294, 0.41986703872680664, -0.11091381311416626, 0.18727004528045654, 0.09120357781648636, 0.16370052099227905, -0.306284099817276, -0.0879044383764267, -0.10489708185195923, -0.3914967179298401, 0.06410790979862213, 0.30076664686203003, 0.18153540790081024, -0.12006524205207825, -0.2863493263721466, -0.3801325261592865, -0.17266303300857544, -0.19540804624557495, 0.03312931954860687, -0.2767418622970581, 0.2662248909473419, 0.05886555463075638, 0.1550886034965515, -0.32329225540161133, 0.015690479427576065, 0.15039706230163574, 0.11651040613651276, 0.37985149025917053, 0.12281276285648346, -0.48102134466171265, 0.1469624638557434, -0.661812424659729, 0.34932851791381836, 0.024762094020843506, 0.22605882585048676, 0.03496946394443512, -0.07348111271858215, 0.029638495296239853, -0.20847059786319733, 0.6595995426177979, -0.10461922734975815, 0.13268575072288513, -0.12042228877544403, -0.41573232412338257, -0.23769986629486084, -0.1356794536113739, 0.0954531878232956, 0.3003537058830261, -0.12172293663024902, 0.7676374316215515, -0.305525004863739, -0.31400349736213684, -0.16018399596214294, 0.10713934898376465, -0.1952768862247467, -0.13644564151763916, -0.12393084168434143, 0.264667272567749, -0.3034888505935669, 0.038459207862615585, -0.4010975956916809, -0.18714086711406708, -0.05185629427433014, 0.39849328994750977, -0.15171606838703156, 0.14853492379188538, 0.134588822722435, 0.10059452056884766, 0.16446976363658905, 0.16355548799037933, 0.22187568247318268, 0.35556769371032715, 0.3482431173324585, 0.05689968168735504, 0.3210081458091736, -0.11931046843528748, -0.15166175365447998, -0.1983674019575119, 0.10857756435871124, 0.291817307472229, 0.3907548487186432, 0.19735568761825562, 0.27038079500198364, 0.16440024971961975, -0.32777920365333557, -0.8451624512672424, -0.1457211971282959, 0.1640174686908722, 0.0461140051484108, -0.3905907869338989, -0.44757628440856934, 0.7491766214370728, 0.2275201976299286, -0.3159622550010681, 0.2845866084098816, 0.2615591287612915, -0.1459180861711502, 0.3112514019012451, 0.20255066454410553, 1.0406558513641357, -0.08749422430992126, 0.2655431032180786, -0.10599882900714874, -0.46176546812057495, 0.5728241801261902, -0.2610045075416565, 0.28674373030662537, -0.22456622123718262, -0.14948616921901703, -0.10504043102264404, -0.09706655889749527, -0.00598563440144062, 0.03412385657429695, -0.17753766477108002, 0.5208492279052734, 0.07495979964733124, -0.05625612661242485, 0.0526699498295784, 0.13295507431030273, -0.08814913779497147, -0.21787945926189423, -0.194939985871315, 0.04556138813495636, 0.07528513669967651, 0.38769692182540894, -0.24836914241313934, 0.005190841853618622, -0.12303324043750763, -0.08207148313522339, -0.20475220680236816, -0.22076740860939026, -0.1904180645942688, 0.09114345908164978, -0.05778751149773598, -0.49805688858032227, 0.20119234919548035, 0.18397299945354462, 0.4801100492477417, 0.0760895162820816, -0.2462443858385086, -0.1984594166278839, -0.0686023160815239, 0.3330727219581604, -0.17197801172733307, -0.18232282996177673, 0.42434993386268616, -0.14656908810138702, -0.17854097485542297, 0.06648891419172287, 0.06742402166128159, -0.3150959610939026, -0.23009179532527924, -0.18999901413917542, 0.1920967698097229, -0.1807636022567749, -0.029379183426499367, 0.24423286318778992, 0.03325783461332321, -0.13412605226039886, -0.011129404418170452, 0.054844290018081665, -0.10522091388702393, -0.022640325129032135, 0.04361843690276146, -0.1263081133365631, -0.10397709906101227, 0.5482271909713745, 0.03373370319604874, -0.23012378811836243, 0.66694176197052, -0.052512943744659424, -0.07883644104003906, -0.08214562386274338, -0.32318007946014404, 0.06599213927984238, -0.40335726737976074, 0.13611562550067902, -0.208876371383667, -0.20611846446990967, 0.05495380610227585, 0.3140960931777954, 0.42441418766975403, -0.006907397881150246, 0.0947292372584343, -0.10140292346477509, -0.24872007966041565, 0.18791010975837708, -0.2585550844669342, 0.31787288188934326, 0.14779877662658691, 0.11673241853713989, 0.10304029285907745, 0.09543566405773163, -0.20009426772594452, -0.0680222436785698, 0.02689281851053238, 0.3223680853843689, 0.04174015298485756, -0.027563154697418213, -0.18884828686714172, -0.07155909389257431, -0.1143629401922226, 0.029761962592601776, -0.454650342464447, -0.061813198029994965, -0.21119648218154907, 0.17405259609222412, -0.1464964598417282, 0.01213226467370987, -0.04565812647342682, -0.026993349194526672, 0.09507501125335693, -0.139316588640213, -0.005671754479408264, 0.21845637261867523, 0.06536467373371124, 0.13838888704776764, 0.3599104583263397, 0.17714707553386688, -0.22274599969387054, 0.1641259789466858, 0.14295625686645508, -0.1522362381219864, 0.05009417235851288, 0.14278645813465118, -0.16795314848423004, 0.0726768970489502, -0.4543793797492981, 0.18805471062660217, 0.2761141061782837, 0.0779440701007843, 0.05312096327543259, -0.008196847513318062, -0.006108857691287994, 0.4421168565750122, 0.4588989019393921, 0.17863187193870544, -0.00044859200716018677, -0.049981843680143356, 0.5852950811386108, 0.062054961919784546, -0.1341972053050995, -0.15885120630264282, 0.3525199294090271, -0.2637137770652771, 0.09688301384449005, 0.1947672963142395, 0.13296173512935638, 0.2695537507534027, 0.16709408164024353, 0.07783710956573486, 0.20798301696777344, -0.36198747158050537, 0.24936893582344055, 0.16799244284629822, 0.26026368141174316, 0.05100265517830849, 0.4123949110507965, 0.30256450176239014, 0.15530291199684143, 0.027689270675182343, 0.11835259199142456, 0.029744664207100868, 0.1705072522163391, 0.19179335236549377, 0.21357043087482452, -0.12284421920776367, 0.0997702032327652, 0.18237629532814026, 0.11187276244163513, 0.31170591711997986, -0.06408333778381348, 0.11793491244316101, -0.02139647677540779, -0.14745822548866272, -0.32127073407173157, 0.2513268291950226, -0.041002318263053894, -0.4303615391254425, -0.200254887342453, -0.2064918726682663, 0.08596554398536682, 0.1600806713104248, -0.3513668477535248, -0.12229911983013153, 0.16674962639808655, -0.023017290979623795, 0.11274835467338562, -0.022991064935922623, -0.06674275547266006, 0.0301203653216362, 0.4832846224308014, -0.26581645011901855, 0.19065862894058228, 0.09814127534627914, 0.15709160268306732, 0.249713733792305, 0.42046746611595154, 0.13021112978458405, 0.08044756948947906, -0.26962655782699585, 0.15235626697540283, -0.13834431767463684, 0.20802706480026245, 0.04336235672235489, 0.2766428291797638, 0.12418517470359802, -0.007248062640428543, 0.39122700691223145, 0.019108176231384277, 0.08320817351341248, 0.1060875952243805, -0.04670118913054466, -0.04968961328268051, -0.6213670969009399, 0.11296424269676208, 0.003756800666451454, -0.25022652745246887, 0.11724070459604263, 0.25420132279396057, 0.019892491400241852, 0.34724318981170654, 0.16904261708259583, 0.08425401151180267, 0.09059944748878479, 0.12471511214971542, 0.06793384253978729, 0.09208108484745026, 0.34354352951049805, 0.5266796946525574, -0.04900868237018585, -0.03198585659265518, -0.01787106692790985, -0.5537119507789612, -0.3044357895851135, 0.07413391768932343, -0.012753091752529144, -0.07353704422712326, 0.008015215396881104, 0.1606329381465912, 0.21342825889587402, -0.09515482932329178, -0.25404873490333557, -0.11114396154880524, 0.12225182354450226, -0.11237389594316483, -0.13529440760612488, 0.13913241028785706, 0.06499939411878586, 0.07728870958089828, -0.357265830039978, 0.03379920870065689, 0.24770721793174744, -0.13990361988544464, 0.004573585465550423, 0.054916366934776306, 0.04107234627008438, 0.17407910525798798, 0.15803900361061096, 0.18610049784183502, 0.19812947511672974, 0.054962389171123505, -0.307395339012146, -0.37595421075820923, 0.031834959983825684, -0.32311952114105225, -0.1588025540113449, -0.17304538190364838, 0.4299744963645935, -0.5295624732971191, 0.032622192054986954, -0.12831071019172668, 0.40376320481300354, 0.0400819405913353, -0.1767546832561493, -0.23780417442321777, -0.20413151383399963, -0.07515236735343933, -0.38421347737312317, 0.3454928398132324, 0.6352306008338928, -0.07232808321714401, 0.3034830391407013, -0.4578646421432495, -0.007068920880556107, 0.3927346467971802, -0.4573073387145996, -0.09361531585454941, 0.050196416676044464, 0.2657508850097656, 0.292980819940567, -0.1730181872844696, -0.4720238745212555, 0.1063426285982132, 0.2981589138507843, -0.02379666082561016, -0.07025895267724991, 0.41666874289512634, -0.07647381722927094, -0.298778772354126, -0.12914995849132538, 0.5410028696060181, -0.060865264385938644, -0.22778882086277008, 0.09873805940151215, -0.3374252915382385 ]
https://github.com/huggingface/datasets/issues/6478
You can create a `pandas` DataFrame following [this](https://lakefs.io/data-version-control/dvc-using-python/) tutorial, and then convert this DataFrame to a `Dataset` with `datasets.Dataset.from_pandas`. For larger datasets (to memory map them), you can use `Dataset.from_generator` with a generator function that reads lakeFS files with `s3fs`.
How to load data from lakefs
My dataset is stored on the company's lakefs server. How can I write code to load the dataset? It would be great if I could provide code examples or provide some references
40
How to load data from lakefs My dataset is stored on the company's lakefs server. How can I write code to load the dataset? It would be great if I could provide code examples or provide some references You can create a `pandas` DataFrame following [this](https://lakefs.io/data-version-control/dvc-using-python/) tutorial, and then convert this DataFrame to a `Dataset` with `datasets.Dataset.from_pandas`. For larger datasets (to memory map them), you can use `Dataset.from_generator` with a generator function that reads lakeFS files with `s3fs`.
[ 0.02660747617483139, -0.14837107062339783, -0.030263463035225868, 0.4822250306606293, -0.07394763827323914, 0.07551722228527069, 0.08751226961612701, 0.09296516329050064, 0.4828351140022278, -0.19326013326644897, -0.27409911155700684, 0.4478367865085602, -0.0011054053902626038, 0.3326752781867981, 0.0552273653447628, 0.08103039860725403, 0.14121581614017487, 0.20448294281959534, -0.20612964034080505, 0.017358481884002686, -0.026165403425693512, 0.03135871887207031, 0.11419874429702759, -0.09734274446964264, -0.013220779597759247, 0.11253613978624344, -0.32209694385528564, 0.534642219543457, 0.02705737203359604, -0.2169903963804245, 0.13381510972976685, 0.3284161686897278, 0.3893446624279022, 0.3474155068397522, -0.00011218521103728563, -0.24435852468013763, 0.12896598875522614, -0.10411728173494339, -0.03689403086900711, -0.050581514835357666, 0.008051730692386627, -0.16512185335159302, 0.5169373154640198, -0.2656369209289551, -0.1269269734621048, 0.19386149942874908, -0.07745631784200668, -0.37404078245162964, 0.7187265157699585, 0.1569431871175766, 0.16561861336231232, -0.15623974800109863, -0.08020933717489243, 0.3392502963542938, -0.25490546226501465, 0.02658664993941784, 0.06409255415201187, 0.4269331991672516, 0.6863622665405273, 0.03918539732694626, 0.021172506734728813, 0.05330610275268555, -0.4098058044910431, 0.17335200309753418, 0.3286696672439575, -0.07013365626335144, -0.32742390036582947, -0.24684461951255798, 0.12425939738750458, 0.2190232276916504, 0.9632967710494995, -0.12925583124160767, -0.23240713775157928, -0.09960305690765381, 0.030105821788311005, 0.1671992391347885, 0.3097040057182312, -0.025462288409471512, 0.013715244829654694, 0.14864511787891388, -0.37065356969833374, -0.5128803253173828, -0.21979719400405884, -0.0045618098229169846, -0.04746653884649277, 0.21596193313598633, -0.27571773529052734, 0.1849387288093567, -0.018304189667105675, -0.25451186299324036, 0.19813746213912964, -0.08284658938646317, -0.07281441986560822, 0.35388243198394775, -0.09619253873825073, -0.12602974474430084, -0.048360422253608704, 0.12909211218357086, 0.021247267723083496, -0.040134645998477936, 0.11606068909168243, 0.03923364356160164, -0.4371269941329956, 0.1503169983625412, 0.2616077661514282, -0.2607649564743042, -0.13688823580741882, -0.03906098008155823, -0.11041662096977234, -0.29745712876319885, -0.2902202606201172, -0.17999008297920227, -0.4377933740615845, -0.07628078758716583, -0.1918591409921646, -0.28690552711486816, 0.05032533407211304, -0.4425215423107147, 0.3548225164413452, 0.004319086670875549, 0.20871838927268982, -0.015648387372493744, 0.1798495650291443, 0.2102113664150238, -0.16124364733695984, 0.21678422391414642, 0.017211101949214935, 0.007257035002112389, -0.13666579127311707, -0.1862747222185135, 0.03598406910896301, -0.04174213111400604, 0.14143340289592743, 0.208011656999588, 0.11921808868646622, -0.535926342010498, 0.23119939863681793, 0.11161519587039948, -0.27798402309417725, -0.08282779902219772, -0.007355421781539917, -0.15465953946113586, -0.15086114406585693, 0.11102873086929321, 0.17998424172401428, -0.084694504737854, 0.130379319190979, -0.18672847747802734, -0.19435882568359375, 0.24319028854370117, -0.5346943736076355, -0.183295339345932, -0.4139176309108734, 0.09752228111028671, -0.23653537034988403, -0.12292472273111343, -0.501375675201416, 0.4314608573913574, -0.3443421721458435, -0.015308625996112823, -0.07527090609073639, -0.011884958483278751, -0.11840789765119553, -0.3182927072048187, 0.2893434762954712, 0.44971150159835815, -0.7215150594711304, 0.17723703384399414, -0.16408443450927734, -0.19454163312911987, 0.022363431751728058, -0.2131694108247757, -0.05238623917102814, 0.017184849828481674, 0.04627945274114609, 0.14270050823688507, 0.5109884142875671, 0.021439284086227417, -0.0003438703715801239, 0.5040292143821716, -0.03184725344181061, -0.180524080991745, -0.18737515807151794, 0.3847271502017975, 0.17200881242752075, 0.18222947418689728, -0.2280435860157013, 0.44172942638397217, -0.05329402536153793, -0.09047580510377884, 0.021071597933769226, -0.18098360300064087, -0.26905152201652527, 0.23871444165706635, -0.20803195238113403, 0.18572278320789337, 0.3578774631023407, -0.0360303595662117, 0.04818084090948105, -0.03378015384078026, -0.07651471346616745, 0.35753950476646423, 0.18054312467575073, 0.7635020017623901, -0.08228528499603271, 0.08042530715465546, -0.1893119215965271, 0.2839621901512146, 0.522922694683075, -0.395114541053772, 0.29355689883232117, 0.26589351892471313, -0.01684671640396118, -0.023013170808553696, -0.029765747487545013, 0.2249610275030136, 0.07343126088380814, -0.0946323573589325, 0.011756673455238342, -0.0605253130197525, -0.2620610296726227, -0.034611430019140244, -0.05420104041695595, -0.0028470978140830994, -0.18979300558567047, 0.37867504358291626, 0.11183012276887894, -0.017833737656474113, 0.08785988390445709, -0.05023399367928505, 0.1058531105518341, 0.07518942654132843, -0.04432123154401779, 0.2685973346233368, 0.11945036053657532, 0.5297743082046509, 0.45056483149528503, 0.2892109751701355, -0.21832826733589172, -0.04637771472334862, 0.4168033003807068, -0.20454904437065125, 0.14378437399864197, 0.03528960049152374, -0.0990542620420456, 0.403682142496109, -0.3299911320209503, 0.05538047477602959, -0.09799959510564804, 0.0858013927936554, 0.24141694605350494, -0.004922948777675629, 0.1592845320701599, 0.0610152930021286, 0.08132420480251312, 0.1228073313832283, 0.4392552375793457, -0.03694094344973564, -0.5593655109405518, -0.08676150441169739, 0.0005114127416163683, -0.33028724789619446, -0.07469502091407776, 0.16112136840820312, -0.135699063539505, -0.13087357580661774, 0.26761820912361145, 0.0008705779910087585, 0.1833566576242447, 0.1811426281929016, -0.06383457779884338, -0.1379850208759308, 0.14707228541374207, -0.02067997306585312, 0.11173489689826965, -0.024095449596643448, -0.06068762391805649, -0.2574945390224457, -0.12030896544456482, 0.08465152978897095, -0.0716729611158371, -0.20273461937904358, -0.06827259063720703, -0.020782876759767532, -0.379069983959198, 0.26567327976226807, 0.0009561032056808472, -0.27809223532676697, -0.19529402256011963, 0.1071062982082367, -0.2704418897628784, -0.08496175706386566, -0.2502366304397583, 0.35545796155929565, 0.274323433637619, -0.35310909152030945, -0.17460386455059052, 0.1902160793542862, 0.09165889769792557, 0.07952550798654556, -0.07720102369785309, -0.10471423715353012, -0.33523738384246826, 0.12091007083654404, 0.2584834098815918, 0.053833212703466415, 0.3113667368888855, -0.15126439929008484, 0.35391610860824585, -0.34242159128189087, -0.14331047236919403, -0.006825360469520092, -0.19578510522842407, 0.3457767963409424, -0.0927220955491066, 0.42511701583862305, -0.23004566133022308, 0.11367006599903107, -0.08977442979812622, -0.005060255527496338, 0.046221353113651276, -0.006655745208263397, 0.017119772732257843, 0.12010429799556732, -0.15832071006298065, -0.0704587921500206, -0.26816391944885254, -0.0928153544664383, 0.1498716175556183, 0.183770090341568, 0.13244614005088806, -0.3351401686668396, 0.1578112244606018, 0.46463441848754883, 0.21166713535785675, 0.17969174683094025, -0.1330552101135254, -0.8403653502464294, 0.23266753554344177, -0.06709007918834686, -0.19003990292549133, 0.44705817103385925, 0.06515596807003021, 0.21494469046592712, -0.2582271993160248, -0.5147879719734192, -0.030446738004684448, 0.2989760935306549, -0.20664985477924347, -0.12152871489524841, 0.19677194952964783, -0.023725945502519608, 0.07658079266548157, 0.15581479668617249, -0.07315555214881897, 0.12195777893066406, -0.0577281191945076, 0.07337519526481628, 0.012256283313035965, 0.37717393040657043, 0.6867491006851196, -0.28979742527008057, 0.5753837823867798, -0.16425547003746033, -0.010340413078665733, 0.4042670428752899, -0.16810078918933868, 0.22246573865413666, 0.0995328277349472, 0.02014266699552536, -0.027438806369900703, 0.02673961967229843, -0.1041790097951889, 0.30854836106300354, 0.3724942207336426, 0.07288503646850586, -0.1975937932729721, 0.07763020694255829, -0.530454158782959, 0.11487910151481628, 0.2515413463115692, -0.5219694375991821, -0.07767502963542938, -0.26131635904312134, -0.1732158660888672, -0.15994422137737274, -0.14266668260097504, -0.4065468907356262, 0.20800209045410156, 0.5160675644874573, 0.056022416800260544, 0.15523914992809296, -0.14278757572174072, -0.5589662194252014, 0.40860068798065186, -0.1978716105222702, -0.24186187982559204, -0.10773435235023499, 0.23789700865745544, 0.09088118374347687, -0.0906982421875, 0.24775265157222748, -0.010436269454658031, -0.028803788125514984, 0.22411267459392548, -0.3713293671607971, -0.3848835229873657, 0.13548800349235535, -0.22778813540935516, 0.19491919875144958, -0.19652675092220306, 0.2774938941001892, -0.01246662437915802, -0.12296223640441895, -0.4462587833404541, 0.16997474431991577, -0.403125137090683, -0.2460767924785614, -0.1146295964717865, -0.14512626826763153, -0.273899644613266, -0.22338438034057617, -0.1924620121717453, 0.0709625706076622, -0.1505136638879776, 0.14511585235595703, 0.0764462798833847, 0.03028392791748047, 0.2752048969268799, 0.39020630717277527, 0.21164536476135254, 0.3323078751564026, 0.019782014191150665, 0.4341292679309845, 0.08216817677021027, -0.14400911331176758, 0.49431711435317993, 0.03399207815527916, 0.29400211572647095, -0.11421523988246918, 0.07484427839517593, 0.34040361642837524, -0.278373658657074, 0.10970401018857956, -0.058175280690193176, 0.079411581158638, 0.0037917010486125946, -0.4689197242259979, 0.22569844126701355, -0.08459030836820602, 0.17469844222068787, -0.1341884732246399, -0.7249998450279236, 0.6259871125221252, 0.05090171843767166, -0.13038648664951324, 0.38664305210113525, 0.14855985343456268, -0.14925019443035126, 0.25315383076667786, 0.357832133769989, 0.46089163422584534, -0.5639258027076721, 0.040771663188934326, 0.3436186611652374, 0.02113683521747589, 0.4806254506111145, -0.12411321699619293, -0.6117469668388367, -0.28826189041137695, 0.09493842720985413, -0.2545470595359802, 0.042453229427337646, -0.03366914391517639, 0.40436485409736633, -0.1406576782464981, 0.28166449069976807, -0.11340498924255371, -0.4529608488082886, 0.12050747126340866, 0.3007346987724304, 0.16779601573944092, -0.18851295113563538, -0.4945383667945862, 0.22140267491340637, -0.19617006182670593, -0.11946530640125275, -0.10142260044813156, -0.09447898715734482, 0.027651265263557434, -0.018273651599884033, -0.02513052523136139, -0.01912270113825798, 0.2186635583639145, -0.023991389200091362, -0.03559981659054756, 0.17415864765644073, 0.2181672304868698, 0.3127203583717346, 0.021110085770487785, 0.01094294898211956, -0.25246092677116394, -0.07627583295106888, 0.11723661422729492, -0.07459640502929688, -0.2057865560054779, 0.08883394300937653, 0.08336514979600906, -0.03235714137554169, -0.04558183252811432, 0.19480784237384796, -0.049319978803396225, -0.2778274118900299, 0.02207016944885254, 0.0486627034842968, 0.25340536236763, -0.16811169683933258, -0.370671808719635, -0.053667642176151276, -0.05879998952150345, 0.21734550595283508, 0.06663935631513596, 0.46000128984451294, 0.04805602505803108, -0.0605400912463665, 0.045186251401901245, 0.11080209910869598, -0.005374009720981121, 0.096066415309906, -0.2517247498035431, 0.17615364491939545, 0.2475845217704773, 0.1179044246673584, 0.12812387943267822, 0.0062092021107673645, 0.03245680034160614, 0.024360395967960358, 0.17518241703510284, -0.26162272691726685, 0.01033894345164299, -0.10996852815151215, 0.06007016822695732, 0.00033274944871664047, 0.1322752833366394, -0.11958076059818268, 0.10170955955982208, -0.46205997467041016, -0.37574079632759094, 0.27133405208587646, -0.2209186851978302, 0.12692025303840637, 0.1666121631860733, -0.08597373217344284, -0.10311461985111237, 0.03963800519704819, -0.23474472761154175, 0.24838218092918396, -0.18476739525794983, 0.06296344101428986, 0.2030702531337738, 0.2129308581352234, -0.23236477375030518, 0.02226189151406288, 0.0991973727941513, -0.18905210494995117, 0.032770633697509766, -0.14185503125190735, -0.092277891933918, 0.1659967452287674, -0.0737781673669815, -0.3769121468067169, -0.3855423033237457, -0.38785529136657715, -0.23771058022975922, -0.16129586100578308, -0.20419515669345856, -0.03692244738340378, 0.010571425780653954, 0.07021821290254593, 0.27615758776664734, 0.006875546649098396, -0.5917271375656128, 0.0953921377658844, 0.24757367372512817, 0.2610245645046234, -0.25210458040237427, 0.10612817108631134, 0.05206742137670517, -0.14361491799354553, -0.4881906509399414, 0.22435550391674042, 0.3037198483943939, -0.18004707992076874, 0.35102689266204834, 0.16219376027584076, 0.3065466284751892, 0.2744132876396179, 0.3451792299747467, 0.24744802713394165, -0.06714368611574173, 0.24757525324821472, 0.3016170859336853, 0.14846867322921753, 0.169740229845047, 0.07853048294782639, -0.058566801249980927, -0.10433080792427063, -0.10715092718601227, 0.21060584485530853, -0.1218985915184021, 0.19969335198402405, -0.3651750385761261, -0.13474437594413757, 0.291936993598938, 0.2989412248134613, -0.1414993852376938, -0.05294931307435036, -0.1668321043252945, 0.07311956584453583, 0.14088472723960876, 0.25654152035713196, -0.12321027368307114, 0.268719345331192, 0.09095247089862823, -0.04306352883577347, -0.23331129550933838, 0.03853718936443329, 0.2571823298931122, -0.5840739607810974, 0.121897853910923, -0.04000644385814667, -0.01731376349925995, 0.21742573380470276, -0.1547887921333313, -0.11274353414773941, -0.23696503043174744, -0.3203206956386566, -0.0932757779955864, 0.3021836280822754, -0.11241766810417175, -0.1787453442811966, 0.1607082188129425, -0.10103601962327957, 0.15424884855747223, 0.1954602748155594, -0.08001654595136642, -0.38165345788002014, 0.038473449647426605, 0.2023017853498459, 0.006735570728778839, -0.21132619678974152, -0.14932841062545776, 0.45591557025909424, -0.18518869578838348, -0.12381313741207123, 0.29320281744003296, -0.061054445803165436, 0.09303653985261917, 0.34664517641067505, -0.3030408024787903, 0.20815959572792053, -0.0062589701265096664, -0.09068208932876587, 0.11066220700740814, -0.00011549144983291626, -0.18732468783855438, 0.12928971648216248, 0.0652722716331482, -0.16781054437160492, 0.12552231550216675, 0.29306864738464355, 0.16431012749671936, 0.030697595328092575, 0.05446742847561836, -0.1057729721069336, 0.5314925909042358, -0.31964629888534546, -0.139262855052948, 0.18171654641628265, -0.023492522537708282, -0.11370208859443665, 0.10049761831760406, -0.5315240621566772, 0.051177456974983215, 0.1926039606332779, 0.1613915115594864, 0.11102055758237839, 0.20205573737621307, 0.030337214469909668, 0.04921526461839676, 0.3669237196445465, 0.38051071763038635, 0.3656076490879059, -0.16672754287719727, -0.24416698515415192, -0.7517313957214355, -0.058713145554065704, 0.17528969049453735, -0.37747710943222046, 0.17560359835624695, -0.029979195445775986, 0.140422523021698, 0.12857870757579803, -0.1307096928358078, 0.14169324934482574, -0.03553539514541626, -0.11398972570896149, 0.09675832092761993, -0.5360909700393677, -0.1499510109424591, 0.26035076379776, -0.22933360934257507, -0.042686935514211655, 0.2636048197746277, -0.03667614609003067, 0.012497290968894958, -0.1635391116142273, -0.03808450698852539, 0.081873819231987, 0.32144683599472046, 0.06186209246516228, -0.14751036465168, 0.3921103775501251, -0.1049576997756958, 0.12451820075511932, -0.06837527453899384, -0.1206274926662445, 0.08923837542533875, -0.07914528995752335, -0.2242356538772583, 0.39394819736480713, -0.32300955057144165, 0.293054461479187, -0.16144488751888275, -0.10637632012367249, -0.32176247239112854, -0.16361351311206818, -0.3110451400279999, -0.2309902310371399, -0.18588677048683167, 0.18739944696426392, 0.050281330943107605, 0.5275187492370605, -0.033168282359838486, 0.21852172911167145, -0.03337954729795456, 0.2569670081138611, 0.3013046383857727, -0.6920919418334961, -0.021948140114545822, 0.12428117543458939, -0.18489661812782288, 0.11565019190311432, 0.23451587557792664, -0.3966878056526184, 0.2857663333415985, 0.40386393666267395, -0.1671651005744934, -0.0759691372513771, 0.22326284646987915, 0.14812733232975006, 0.023936137557029724, -0.1929536610841751, 0.208285391330719, 0.07373269647359848, 0.09997531771659851, -0.06957526504993439, -0.08776184171438217 ]
https://github.com/huggingface/datasets/issues/6478
@mariosasko hello, This can achieve and https://huggingface.co/datasets Does the same effect apply to the dataset? For example, downloading while using
How to load data from lakefs
My dataset is stored on the company's lakefs server. How can I write code to load the dataset? It would be great if I could provide code examples or provide some references
20
How to load data from lakefs My dataset is stored on the company's lakefs server. How can I write code to load the dataset? It would be great if I could provide code examples or provide some references @mariosasko hello, This can achieve and https://huggingface.co/datasets Does the same effect apply to the dataset? For example, downloading while using
[ -0.09849373996257782, -0.08236931264400482, -0.0687437504529953, 0.47989392280578613, -0.06994661688804626, 0.12994585931301117, -0.031182490289211273, 0.050826296210289, 0.6055763959884644, -0.12141266465187073, -0.35074567794799805, 0.2735244929790497, 0.12763109803199768, 0.358489453792572, 0.1702461838722229, 0.018691837787628174, 0.006129704415798187, 0.10909438878297806, -0.3577820658683777, 0.05214203894138336, 0.11716014891862869, 0.0038516968488693237, 0.052072592079639435, -0.048139311373233795, 0.1103019267320633, -0.01713789999485016, -0.1339908242225647, 0.4342464804649353, -0.10651051253080368, -0.09424007683992386, 0.09299560636281967, 0.4076680541038513, 0.2327592372894287, 0.17668528854846954, -0.00011045410064980388, -0.1702813059091568, 0.24150852859020233, -0.09057724475860596, -0.026105456054210663, -0.05562315881252289, -0.08534633368253708, -0.024136260151863098, 0.4716293215751648, -0.3231622576713562, -0.1582181751728058, 0.25842204689979553, -0.06878133863210678, -0.3933138847351074, 0.6600614190101624, 0.008796252310276031, 0.18933114409446716, -0.11971177160739899, 0.0017761215567588806, 0.31963080167770386, -0.2877316474914551, -0.026644796133041382, 0.08477355539798737, 0.3295450806617737, 0.5674683451652527, 0.15890279412269592, -0.09985078126192093, -0.02076517604291439, -0.2006857991218567, 0.24807508289813995, 0.12183182686567307, 0.010717112571001053, -0.2794322073459625, -0.20902535319328308, 0.11618538200855255, 0.21658553183078766, 1.0154362916946411, -0.06824517250061035, -0.10921085625886917, 0.0011363252997398376, 0.007166553288698196, 0.2131946086883545, 0.436718612909317, 0.06333324313163757, -0.11320381611585617, 0.2550378739833832, -0.4340461194515228, -0.5034944415092468, -0.20197279751300812, 0.12258104234933853, 0.08585215359926224, 0.0655301958322525, -0.27529746294021606, 0.19946104288101196, -0.08072077482938766, -0.19849112629890442, 0.017450958490371704, -0.22160911560058594, -0.07086598873138428, 0.31495800614356995, -0.16366425156593323, -0.07663316279649734, -0.09642648696899414, 0.4326043426990509, 0.20251809060573578, -0.010086974129080772, 0.18248498439788818, 0.1408482789993286, -0.5111038684844971, 0.1356348842382431, 0.2547856867313385, -0.23751777410507202, -0.029614970088005066, -0.22618895769119263, -0.08731736987829208, -0.1604911834001541, -0.37117788195610046, -0.2379540205001831, -0.2897506356239319, 0.13733406364917755, -0.2703676223754883, -0.28273701667785645, 0.09427650272846222, -0.451282262802124, 0.25920984148979187, -0.11185288429260254, 0.2858405113220215, -0.10760872066020966, 0.19402959942817688, 0.22118259966373444, -0.13310474157333374, 0.0189945250749588, 0.00966554880142212, -0.0408274307847023, -0.14392748475074768, -0.3029617965221405, -0.006219157949090004, -0.15645211935043335, 0.10244357585906982, 0.16000895202159882, 0.16957886517047882, -0.45225727558135986, 0.23190227150917053, 0.15675167739391327, -0.28970858454704285, -0.13687433302402496, 0.08997724205255508, -0.24240002036094666, -0.2587520182132721, 0.0781712457537651, 0.20628827810287476, -0.09832265228033066, 0.006251376122236252, -0.0795287936925888, -0.08564846962690353, 0.3010368347167969, -0.49276936054229736, -0.04973813518881798, -0.15578784048557281, 0.14628319442272186, -0.29059600830078125, -0.1335541009902954, -0.5406705141067505, 0.5353724956512451, -0.480311781167984, -0.02838471531867981, -0.07124337553977966, 0.12594513595104218, -0.29538729786872864, -0.20102566480636597, 0.24649450182914734, 0.3957589864730835, -0.6126323938369751, 0.036087602376937866, -0.1570517122745514, -0.4854784905910492, 0.01681196689605713, -0.2069278359413147, -0.14748066663742065, 0.2611463665962219, -0.1781768649816513, 0.32818835973739624, 0.607718825340271, 0.13656902313232422, -0.20645859837532043, 0.44601282477378845, -0.14403142035007477, -0.11915556341409683, -0.11082061380147934, 0.3515433073043823, 0.26850762963294983, 0.24619527161121368, -0.1598549336194992, 0.5543560981750488, 0.044315047562122345, -0.0823419839143753, -0.022839777171611786, -0.2732628285884857, -0.2820853888988495, 0.25210216641426086, -0.3555092215538025, 0.23552203178405762, 0.40332868695259094, -0.003289397805929184, 0.20937944948673248, 0.04103897884488106, -0.07302723079919815, 0.26206251978874207, 0.025534164160490036, 0.706958532333374, -0.13938388228416443, 0.08749786019325256, -0.3306407034397125, 0.2315436750650406, 0.46021580696105957, -0.517621636390686, 0.30254995822906494, 0.17442740499973297, 0.012516111135482788, -0.00932181254029274, -0.19512927532196045, 0.24406474828720093, 0.08056235313415527, -0.03310942277312279, 0.03305578976869583, 0.06067280471324921, -0.2563712000846863, 0.08039098232984543, -0.11376230418682098, 0.020663514733314514, -0.19710537791252136, 0.413056343793869, 0.1795535683631897, 0.06498156487941742, -0.0010358616709709167, -0.26644575595855713, 0.11336164176464081, -0.006439514458179474, -0.08771078288555145, 0.22233501076698303, 0.19333918392658234, 0.5177812576293945, 0.5101284384727478, 0.17834198474884033, -0.2135196030139923, -0.04273882508277893, 0.394709974527359, -0.11628202348947525, 0.1942453682422638, -0.06697115302085876, -0.15676839649677277, 0.33307749032974243, -0.2629278302192688, 0.09777694940567017, -0.061988987028598785, -0.06725434958934784, 0.16098378598690033, -0.12248781323432922, 0.1306118369102478, 0.14896927773952484, 0.25561001896858215, 0.1539415717124939, 0.4403027892112732, -0.07614406198263168, -0.5524308085441589, -0.019997797906398773, 0.01742120087146759, -0.24000032246112823, -0.027496296912431717, 0.1746954619884491, -0.17703145742416382, -0.16158729791641235, 0.1200188621878624, -0.07495378702878952, 0.29425859451293945, 0.2152625024318695, 0.09035634994506836, 0.06584922969341278, 0.3390549421310425, -0.11342677474021912, 0.04104486480355263, -0.029924426227808, -0.16765324771404266, -0.06200193241238594, -0.10066600143909454, 0.0009426530450582504, -0.22985979914665222, -0.07036378234624863, 0.00299912691116333, -0.09080243855714798, -0.4115159809589386, 0.12115011364221573, -0.02167772874236107, -0.23954808712005615, -0.3132084906101227, 0.2418959140777588, -0.3422146737575531, -0.08391595631837845, -0.1952028125524521, 0.47307610511779785, 0.19704806804656982, -0.2916128933429718, -0.21040448546409607, 0.201684832572937, 0.0354226753115654, 0.010596001520752907, -0.14711949229240417, 0.012215346097946167, -0.23738354444503784, 0.11792539060115814, 0.3255361318588257, 0.12360380589962006, 0.3527992069721222, -0.11142988502979279, 0.2849338948726654, -0.35869094729423523, -0.2127784788608551, 0.038521602749824524, 0.0600779689848423, 0.28587472438812256, -0.26354464888572693, 0.44213956594467163, -0.15470367670059204, 0.1266859918832779, -0.03932126238942146, -0.2016623169183731, -0.12257992476224899, -0.1595710813999176, 0.11418917775154114, 0.33724430203437805, -0.15322062373161316, -0.1777193248271942, -0.20918259024620056, -0.07506927102804184, 0.1820482611656189, 0.18434393405914307, 0.12120357155799866, -0.3360436260700226, -0.009943511337041855, 0.4291948676109314, -0.012706870213150978, 0.13073459267616272, -0.2550230324268341, -0.8732183575630188, 0.17219269275665283, -0.07277729362249374, -0.256235271692276, 0.4863266050815582, 0.0930403396487236, 0.08229711651802063, -0.10103388875722885, -0.5485875010490417, -0.03554932400584221, 0.2617834210395813, -0.023629501461982727, -0.3027576506137848, 0.1920250952243805, -0.12413674592971802, -0.04710010811686516, 0.11597656458616257, -0.08831743150949478, 0.12172725051641464, 0.06926335394382477, 0.05603618547320366, 0.03819718956947327, 0.39843711256980896, 0.5328983068466187, -0.30634456872940063, 0.546910285949707, -0.25393903255462646, 0.15997669100761414, 0.41126349568367004, -0.10432373732328415, 0.20437797904014587, -0.0279974527657032, 0.15828052163124084, -0.03190290182828903, 0.10934116691350937, -0.047153670340776443, 0.26094016432762146, 0.443927139043808, 0.08394020795822144, -0.27127113938331604, -0.08462493866682053, -0.4553585350513458, 0.0658053606748581, 0.14833930134773254, -0.20364104211330414, -0.09511182457208633, -0.11937908828258514, -0.11468781530857086, 0.022930368781089783, -0.19893911480903625, -0.37155580520629883, 0.3070480525493622, 0.40468069911003113, 0.06824252754449844, -0.0286572203040123, 0.04505464807152748, -0.485403835773468, 0.38181424140930176, -0.16287663578987122, -0.3012668490409851, -0.16518598794937134, 0.21442995965480804, 0.2503986060619354, 0.04688789322972298, 0.34843194484710693, 0.08552765846252441, 0.17091582715511322, 0.029123559594154358, -0.35415470600128174, -0.14877769351005554, 0.21544145047664642, -0.22542275488376617, 0.10077525675296783, -0.15407028794288635, 0.3232649564743042, -0.0349908247590065, -0.07494932413101196, -0.3746510446071625, 0.21562829613685608, -0.33488404750823975, -0.3736211955547333, -0.13380740582942963, -0.20443466305732727, -0.3141040503978729, -0.18572410941123962, -0.23968401551246643, -0.013771798461675644, -0.140357106924057, 0.10522675514221191, -0.001993287354707718, 0.05334837734699249, 0.09840169548988342, 0.20249474048614502, 0.22403579950332642, 0.2658226788043976, 0.03524627536535263, 0.5194971561431885, 0.01192160788923502, -0.14282377064228058, 0.5075386166572571, 0.08292161673307419, 0.29567089676856995, -0.15805061161518097, 0.01876107230782509, 0.14114171266555786, -0.143486887216568, 0.11943720281124115, 0.10315017402172089, 0.05247783660888672, -0.018434155732393265, -0.3661574721336365, 0.33697637915611267, -0.20139113068580627, 0.23809026181697845, -0.12243790924549103, -0.6754069924354553, 0.6718102097511292, -0.03780617192387581, -0.1253206878900528, 0.44481703639030457, 0.12678009271621704, -0.23707999289035797, 0.06498846411705017, 0.08636070787906647, 0.5093779563903809, -0.45241668820381165, -0.04150083661079407, 0.18723495304584503, 0.0509343296289444, 0.4020727872848511, -0.18688622117042542, -0.46354004740715027, -0.1818581372499466, -0.0021741557866334915, -0.2787589132785797, 0.002411365509033203, 0.09325872361660004, 0.4769858419895172, -0.11579306423664093, 0.19828233122825623, -0.1467398703098297, -0.2892146706581116, 0.1167568564414978, 0.3935464918613434, 0.15146619081497192, -0.15445618331432343, -0.4762507975101471, 0.210839182138443, -0.23583097755908966, 0.10434284806251526, -0.12261884659528732, -0.13404695689678192, 0.14876320958137512, -0.03679141774773598, 0.029192209243774414, 0.04745525121688843, 0.07452406734228134, 0.0765380710363388, -0.11601470410823822, 0.17066138982772827, 0.18799740076065063, 0.2134208083152771, -0.11382856965065002, -0.002639483194798231, -0.2585255205631256, -0.03164330869913101, -0.015292808413505554, -0.020770283415913582, -0.24304921925067902, 0.10307173430919647, -0.05051138252019882, -0.04070226848125458, -0.20650434494018555, 0.07143399119377136, -0.015772204846143723, -0.2725864052772522, -0.009110793471336365, 0.05706091970205307, 0.251303106546402, -0.2148846983909607, -0.44277188181877136, 0.005282990634441376, -0.031906142830848694, 0.22551564872264862, 0.06739239394664764, 0.46504300832748413, -0.05633542686700821, -0.06447258591651917, 0.3019932806491852, 0.059906214475631714, 0.01436515524983406, 0.2331579625606537, -0.2305358499288559, 0.11083795130252838, 0.2548414170742035, 0.01557864248752594, 0.06807467341423035, -0.04101499915122986, 0.1236533373594284, 0.05016748979687691, 0.10824669897556305, -0.32230886816978455, 0.08831833302974701, 0.2508467435836792, -0.09333531558513641, 0.01744573563337326, -0.08641506731510162, -0.12293189764022827, -0.022348061203956604, -0.5543196201324463, -0.34222346544265747, 0.26357293128967285, -0.21370789408683777, 0.07092246413230896, 0.2506083846092224, -0.04521346092224121, 0.1024080365896225, 0.00994529016315937, -0.23961882293224335, 0.27662336826324463, -0.019186511635780334, 0.00952104851603508, 0.380885511636734, 0.1894729733467102, -0.16597476601600647, 0.02713540941476822, 0.15132930874824524, -0.10645169019699097, -0.0742570161819458, -0.1795113980770111, -0.049605075269937515, 0.18197374045848846, -0.10007890313863754, -0.303805410861969, -0.4763491153717041, -0.4514855742454529, -0.14357933402061462, 0.016448859125375748, -0.13854476809501648, -0.16152934730052948, 0.00938340276479721, -0.09480263292789459, 0.3053879141807556, 0.13404706120491028, -0.6653405427932739, 0.12703800201416016, 0.17017725110054016, 0.2833597958087921, -0.2646137773990631, -0.04825347289443016, -0.004661213606595993, -0.04595962166786194, -0.39701414108276367, 0.10610777139663696, 0.4934841990470886, -0.10051649063825607, 0.259419322013855, 0.15701253712177277, 0.36220598220825195, 0.1122516468167305, 0.34988540410995483, 0.30899709463119507, -0.08949404954910278, 0.14294058084487915, 0.15281912684440613, 0.19351981580257416, 0.1304354965686798, 0.10967264324426651, 0.16342023015022278, -0.15935349464416504, -0.13712525367736816, 0.18405888974666595, -0.12737241387367249, 0.3666912913322449, -0.33058542013168335, -0.18007518351078033, 0.33380427956581116, 0.30297622084617615, -0.09221731126308441, -0.06524059176445007, -0.24592827260494232, 0.1184837818145752, 0.11722607910633087, 0.3488789498806, -0.18888495862483978, 0.33552876114845276, 0.06485849618911743, 0.003625420853495598, -0.17789305746555328, 0.04473124444484711, 0.1771543025970459, -0.6773388385772705, 0.08037997782230377, 0.15715399384498596, -0.0739743560552597, 0.1942296028137207, -0.1256522685289383, -0.25593382120132446, -0.11344561725854874, -0.3302920460700989, -0.0020900145173072815, 0.23585256934165955, -0.07424598932266235, -0.055954016745090485, 0.1881081759929657, -0.18296265602111816, 0.1718602180480957, 0.2798681855201721, -0.12650936841964722, -0.29806825518608093, 0.06927292048931122, 0.15153340995311737, -0.01925859972834587, -0.3435824513435364, -0.1580045074224472, 0.5043268799781799, -0.2530416250228882, -0.14952561259269714, 0.37934476137161255, -0.03437850996851921, 0.25447216629981995, 0.37355709075927734, -0.1555768847465515, -0.03380749002099037, -0.10351121425628662, 0.011861853301525116, 0.07383088022470474, -0.005195630714297295, -0.15844181180000305, -0.03350120410323143, 0.09628792107105255, 0.1059524267911911, 0.02482042834162712, 0.3491246700286865, 0.16841423511505127, 0.026045318692922592, 0.12804365158081055, 0.004719641525298357, 0.4169256389141083, -0.44231486320495605, -0.16738486289978027, 0.0889476016163826, 0.06629747897386551, -0.16634109616279602, -0.09940794110298157, -0.38713765144348145, -0.048659548163414, 0.14801780879497528, -0.006059102714061737, 0.09282629936933517, 0.17096669971942902, 0.03697694465517998, -0.04551343619823456, 0.3932268023490906, 0.30505234003067017, 0.356984406709671, -0.31369340419769287, -0.30637872219085693, -0.676079273223877, -0.10023204982280731, 0.23589852452278137, -0.3164118528366089, 0.11380673944950104, -0.007019080221652985, 0.045702025294303894, 0.3317871391773224, 0.03281994163990021, 0.07068337500095367, 0.10012252628803253, -0.20669545233249664, 0.10377508401870728, -0.46980422735214233, -0.07867246866226196, 0.2970511317253113, -0.2251589596271515, -0.21620553731918335, 0.3597055673599243, -0.08726851642131805, 0.00012428313493728638, -0.1290552020072937, 0.08691126108169556, -0.09414059668779373, 0.27555498480796814, 0.044275183230638504, -0.12037943303585052, 0.5066603422164917, -0.05990489199757576, 0.15367785096168518, 0.027155902236700058, -0.2343614250421524, 0.008725114166736603, -0.021787095814943314, -0.2611631155014038, 0.2834518551826477, -0.21041172742843628, 0.2275809496641159, -0.03712110221385956, -0.21176961064338684, -0.30841612815856934, -0.10405275225639343, -0.2696898877620697, -0.2908076047897339, -0.17473569512367249, 0.16497260332107544, 0.04703854024410248, 0.45987623929977417, -0.017769578844308853, 0.011779680848121643, -0.04522823542356491, 0.28807058930397034, 0.3278692960739136, -0.3611881136894226, 0.02803751826286316, 0.08001174032688141, -0.10229608416557312, 0.1504196971654892, 0.17942099273204803, -0.5552317500114441, 0.33316943049430847, 0.5635504126548767, -0.26862290501594543, -0.005116768181324005, 0.3740832507610321, 0.09920769929885864, 0.005271054804325104, -0.1117100641131401, 0.17637592554092407, 0.1629779040813446, 0.04407308250665665, -0.11636348068714142, -0.07614666223526001 ]
https://github.com/huggingface/datasets/issues/6475
~~You will see this error if the cache dir filepath contains relative `..` paths. Use `os.path.realpath(_CACHE_DIR)` before passing it to the `load_dataset` function.~~
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed
### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0
23
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed ### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0 ~~You will see this error if the cache dir filepath contains relative `..` paths. Use `os.path.realpath(_CACHE_DIR)` before passing it to the `load_dataset` function.~~
[ -0.10396334528923035, -0.16585659980773926, -0.06416866183280945, 0.3617136478424072, 0.04591068997979164, -0.18339619040489197, -0.012238699942827225, 0.26278233528137207, -0.2864779233932495, -0.08145007491111755, -0.024002086371183395, 0.08407759666442871, -0.14902670681476593, 0.1495061218738556, -0.03063797950744629, -0.03984774276614189, 0.07719110697507858, 0.12992192804813385, 0.29345935583114624, 0.16215340793132782, -0.4650859832763672, 0.35488012433052063, -0.25587624311447144, 0.10274036228656769, -0.06378617137670517, 0.12237735092639923, -0.31961995363235474, 0.509280800819397, -0.2872696816921234, -0.3582841157913208, 0.479002982378006, -0.3087034821510315, 0.36739763617515564, 0.13761241734027863, -0.0001152386685134843, 0.054856084287166595, 0.46044379472732544, -0.05314774811267853, 0.16732196509838104, 0.09588611871004105, 0.09431611746549606, -0.36221766471862793, -0.14888012409210205, -0.3601916432380676, 0.04446469247341156, -0.19450746476650238, -0.11527694761753082, -0.4744316339492798, 0.34332266449928284, 0.3433285355567932, 0.17225058376789093, 0.23018302023410797, 0.3630772829055786, 0.2201823741197586, 0.6044427752494812, -0.45173218846321106, -0.11601148545742035, 0.18802687525749207, 0.09052100777626038, -0.1964600384235382, 0.12938784062862396, 0.09616892784833908, -0.16839498281478882, -0.07067332416772842, -0.1556248515844345, -0.09009994566440582, 0.1444256603717804, -0.37170395255088806, -0.04261759668588638, 0.06775302439928055, -0.035245925188064575, -0.05534273386001587, -0.16399887204170227, 0.26411688327789307, 0.03080553561449051, -0.5285080075263977, 0.20865195989608765, 0.35857415199279785, -0.08476726710796356, -0.05767493322491646, -0.04259493574500084, 0.09457957744598389, -0.0017685070633888245, 0.10504267364740372, -0.1206967830657959, 0.1921912133693695, -0.08201159536838531, 0.1812332272529602, 0.040269285440444946, 0.0039028096944093704, 0.2101050466299057, 0.22022733092308044, -0.32798105478286743, 0.10570281744003296, -0.47656095027923584, 0.04070357233285904, -0.08174433559179306, 0.28546836972236633, -0.04491708427667618, -0.050283282995224, -0.08063004910945892, -0.08655799925327301, -0.14981740713119507, -0.11620886623859406, -0.05401574447751045, 0.420005738735199, 0.004707643762230873, -0.3847629129886627, 0.24009831249713898, 0.18792785704135895, 0.1674758791923523, 0.05413538217544556, -0.39239561557769775, -0.46420836448669434, -0.04803851619362831, -0.040218815207481384, 0.3278602063655853, -0.37214088439941406, -0.5733497142791748, 0.1414315402507782, -0.5692530274391174, 0.20278514921665192, 0.06204221397638321, 0.27933719754219055, -0.3403257727622986, -0.13716687262058258, 0.29225388169288635, 0.1804284304380417, -0.16504696011543274, 0.03734781965613365, -0.008327873423695564, 0.21995870769023895, -0.19099712371826172, -0.10635045170783997, 0.08153973519802094, -0.3683243691921234, 0.5237661004066467, 0.2289031445980072, -0.017118360847234726, 0.0542953759431839, 0.10540556907653809, -0.22765931487083435, -0.30767151713371277, 0.2863863408565521, -0.1566096544265747, -0.00744238868355751, 0.13802757859230042, 0.062121763825416565, 0.012379944324493408, 0.2542601525783539, -0.15054337680339813, -0.207289457321167, -0.20371001958847046, 0.1626507043838501, -0.10137002170085907, 0.17009547352790833, 0.3873385787010193, 0.024755289778113365, 0.2557815611362457, -0.19022253155708313, 0.024442486464977264, -0.17892080545425415, -0.49436861276626587, -0.1688336580991745, 0.3723071217536926, 0.008581370115280151, -0.09290459752082825, 0.04559306055307388, -0.2997229993343353, -0.09407831728458405, 0.3640095591545105, 0.10164622962474823, -0.06267397105693817, -0.010548949241638184, -0.46043023467063904, 0.08122391998767853, -0.19129829108715057, -0.34107160568237305, -0.3286507725715637, 0.4735722541809082, -0.16206349432468414, 0.33762526512145996, 0.014702219516038895, -0.009244311600923538, -0.2239345908164978, -0.3591806888580322, 0.4350608289241791, 0.1735306680202484, -0.005890093743801117, -0.13615462183952332, -0.48548388481140137, -0.42373406887054443, 0.30718955397605896, 0.3330910801887512, 0.16834352910518646, -0.19748377799987793, 0.15436862409114838, 0.5204557776451111, 0.1619524210691452, 0.09422576427459717, 0.08241430670022964, 0.19880886375904083, -0.2457229346036911, -0.2646988332271576, -0.07643353193998337, 0.04763972759246826, -0.159610778093338, 0.27006345987319946, -0.2809077501296997, 0.15925711393356323, -0.06307756900787354, 0.11645014584064484, -0.2511121332645416, 0.18181149661540985, -0.09474299103021622, -0.24722586572170258, 0.1807105541229248, 0.068353071808815, -0.238028421998024, -0.08220198005437851, 0.16630300879478455, 0.41525503993034363, 0.06355118751525879, -0.08599554002285004, -0.10765884816646576, 0.014787733554840088, -0.321842223405838, -0.10912778973579407, 0.10928073525428772, 0.21685802936553955, 0.22975505888462067, 0.01342897117137909, -0.17475169897079468, 0.2825953960418701, 0.15150746703147888, -0.21642985939979553, -0.021720705553889275, -0.12831291556358337, 0.3187291920185089, -0.39264848828315735, 0.288178414106369, 0.44944947957992554, 0.06076616048812866, -0.0235942080616951, 0.28204017877578735, 0.20420987904071808, -0.20786574482917786, -0.05499615892767906, -0.01196182519197464, -0.022288408130407333, 0.151835098862648, -0.1312483549118042, -0.20130060613155365, -0.01967894285917282, 0.5470786690711975, 0.25905540585517883, -0.07472947239875793, 0.16692425310611725, -0.10432550311088562, -0.196726456284523, 0.18989111483097076, 0.01880880445241928, -0.030384350568056107, 0.08124971389770508, -0.22530227899551392, -0.1673487275838852, 0.3019475042819977, -0.45507991313934326, 0.5055996179580688, 0.006160486489534378, -0.18173623085021973, 0.20135435461997986, -0.2803894877433777, -0.1344647854566574, 0.23612678050994873, 0.027283694595098495, 0.178297221660614, 0.29030248522758484, 0.0807177945971489, 0.13685722649097443, -0.4051700234413147, -0.23393799364566803, -0.057251375168561935, 0.0660996288061142, -0.24410855770111084, -0.2356611043214798, -0.09920856356620789, -0.0017762035131454468, 0.12367680668830872, -0.40121573209762573, -0.19181297719478607, 0.03832150250673294, -0.014187402091920376, 0.09390953183174133, 0.1081240251660347, 0.007353074848651886, -0.2872256934642792, 0.05018918216228485, 0.22673755884170532, -0.07015611231327057, -0.01220114529132843, 0.11828866600990295, -0.3647076487541199, 0.04469211399555206, 0.16809426248073578, -0.100003182888031, 0.13867183029651642, 0.038295455276966095, -0.02841029316186905, -0.12430659681558609, -0.3358612358570099, -0.04494134336709976, -0.1844097524881363, 0.6750739216804504, 0.08657550066709518, 0.04472779855132103, -0.2883935570716858, -0.39848941564559937, 0.20048806071281433, 0.2731602191925049, -0.1155705451965332, 0.14095890522003174, 0.0858573466539383, 0.07656129449605942, -0.1789214164018631, -0.04475950077176094, -0.07274315506219864, -0.3597075641155243, 0.019414080306887627, -0.03579618036746979, -0.11587245017290115, 0.1316884458065033, -0.18240633606910706, 0.17288462817668915, 0.5054888129234314, 0.025286361575126648, -0.29015761613845825, -0.3475993275642395, 0.19051845371723175, -0.06264878064393997, -0.2594669461250305, -0.05778348818421364, -0.0026706233620643616, 0.09334960579872131, 0.26976755261421204, -0.4231244921684265, -0.04174542427062988, -0.014795716851949692, 0.14797645807266235, -0.1738225519657135, -0.3538973927497864, 0.2849051356315613, 0.23400776088237762, -0.0313727930188179, -0.09749632328748703, -0.20753681659698486, -0.0776468962430954, -0.008409073576331139, 0.4140308201313019, 0.002065042033791542, 0.20911933481693268, -0.01781616359949112, 0.04531513899564743, 0.15128320455551147, 0.2853340804576874, 0.7059417963027954, 0.1523822695016861, 0.19112496078014374, 0.12037982046604156, -0.2509269714355469, 0.1740172952413559, -0.20073151588439941, -0.014154016971588135, 0.33949869871139526, -0.0642065703868866, -0.007028425112366676, -0.21440958976745605, -0.08470280468463898, -0.2189548909664154, -0.06267168372869492, 0.013782965019345284, -0.19845131039619446, 0.3452240228652954, -0.20986773073673248, -0.08896040916442871, 0.3688356876373291, -0.026597343385219574, 0.21737045049667358, 0.17576979100704193, -0.1267348676919937, -0.15520653128623962, -0.19829711318016052, -0.21983878314495087, -0.4107120931148529, 0.2797970771789551, 0.13473980128765106, 0.6053627133369446, 0.02426201105117798, -0.04728041589260101, -0.009519565850496292, -0.3188267648220062, 0.448923796415329, -0.11870797723531723, 0.11287619173526764, 0.12380699068307877, -0.012165293097496033, -0.5684409737586975, -0.2969525456428528, -0.06092211231589317, 0.27076759934425354, 0.049192193895578384, 0.4614700376987457, -0.14270073175430298, 0.23899874091148376, 0.3159010410308838, 0.13029666244983673, -0.09473735094070435, -0.0824500247836113, -0.4103213846683502, -0.6870729327201843, -0.1309131383895874, 0.03884845972061157, -0.09975164383649826, 0.40277111530303955, -0.15969079732894897, -0.09481701999902725, -0.08056054264307022, 0.196975976228714, -0.06398142874240875, -0.06338807195425034, 0.07399328052997589, 0.08682696521282196, 0.25314515829086304, -0.09419186413288116, 0.20273977518081665, -0.05720118433237076, 0.3164207339286804, 0.13974973559379578, -0.2589554190635681, 0.04596622660756111, 0.08078410476446152, 0.0869215577840805, 0.2498500645160675, -0.2218504250049591, -0.20216238498687744, 0.04290468245744705, 0.07412976026535034, -0.0531863197684288, 0.25452935695648193, 0.8272790312767029, -0.2701970338821411, -0.31771355867385864, -0.05536408722400665, 0.30194783210754395, -0.03579077124595642, -0.03104501962661743, -0.13614779710769653, -0.4344771206378937, -0.1977805644273758, 0.4961393475532532, 0.22306156158447266, 0.9382808804512024, 0.06029827147722244, 0.0774741917848587, 0.3687116205692291, 0.06222066283226013, 0.2613429129123688, -0.4363674521446228, 0.11314022541046143, -0.03354666382074356, -0.45140716433525085, 0.1331954151391983, 0.1160290315747261, 0.11247856914997101, -0.1272440254688263, -0.32011231780052185, -0.004287682473659515, 0.1710307002067566, -0.1982189565896988, 0.2020295262336731, -0.11692731827497482, -0.03284728527069092, -0.1594517081975937, -0.3088780343532562, 0.10638856887817383, 0.018059521913528442, 0.276340514421463, -0.32945716381073, 0.07050203531980515, 0.08831049501895905, -0.27142345905303955, -0.33382636308670044, 0.355763703584671, -0.25562891364097595, 0.29201802611351013, -0.6306741833686829, 0.1571142077445984, -0.11657170206308365, 0.2191525101661682, 0.3410786986351013, 0.3689155578613281, -0.1685710996389389, 0.15864090621471405, 0.2990371286869049, -0.11008051037788391, 0.2379530966281891, -0.1769976019859314, -0.06213133782148361, -0.29552575945854187, -0.18054398894309998, -0.0060715451836586, -0.2974325120449066, 0.08405214548110962, -0.01868249475955963, 0.0911024808883667, -0.010001983493566513, 0.005315843969583511, -0.06519833952188492, -0.004380442202091217, 0.3272295594215393, -0.2107689082622528, 0.13338246941566467, 0.007430734112858772, -0.12894421815872192, 0.29528313875198364, -0.3113310933113098, -0.3914300799369812, -0.05662068724632263, 0.41349512338638306, -0.019437206909060478, 0.23648576438426971, 0.3887905776500702, 0.008746758103370667, 0.12820622324943542, -0.06725107133388519, -0.05177856981754303, -0.3094167411327362, -0.17839154601097107, 0.062260549515485764, 0.40574753284454346, -0.02126385271549225, -0.04132108390331268, 0.6821677684783936, 0.5023373961448669, -0.058049872517585754, 0.28422582149505615, -0.5085424780845642, -0.05366135761141777, 0.4121686816215515, 0.0390261635184288, 0.2352134883403778, 0.11354944109916687, 0.15442973375320435, 0.11105258017778397, -0.019074246287345886, -0.24681395292282104, 0.021809838712215424, -0.15369150042533875, 0.10439183562994003, -0.08066317439079285, 0.07095601409673691, 0.3835841119289398, 0.3150915503501892, 0.18962092697620392, 0.15939106047153473, 0.012682933360338211, -0.13242056965827942, -0.20616912841796875, 0.15075938403606415, 0.12781067192554474, -0.25666356086730957, 0.12671631574630737, -0.2540706396102905, 0.08229237794876099, -0.033576108515262604, -0.026674501597881317, 0.1379125565290451, 0.06972019374370575, -0.1087537556886673, 0.0820675864815712, 0.12426106631755829, -0.04286167398095131, 0.3303706645965576, -0.038571711629629135, 0.3692839443683624, 0.2307862937450409, 0.21942727267742157, 0.019109666347503662, -0.11759502440690994, 0.6458373069763184, -0.23686105012893677, -0.04535812512040138, 0.12787401676177979, 0.032567836344242096, -0.17061135172843933, -0.05049687251448631, -0.0771619901061058, 0.1825573593378067, 0.5723704099655151, -0.20992940664291382, -0.14079716801643372, 0.15141130983829498, 0.19430458545684814, -0.3506431579589844, 0.001389574259519577, 0.025029174983501434, -0.4540189802646637, -0.2719038128852844, 0.06966209411621094, 0.12043819576501846, -0.022400781512260437, 0.07968554645776749, -0.12065988034009933, 0.20218223333358765, 0.07756519317626953, -0.10862574726343155, 0.3175908029079437, -0.13611377775669098, 0.20454442501068115, 0.04626310616731644, -0.31492555141448975, 0.3764507472515106, 0.27159687876701355, 0.14238998293876648, -0.16443441808223724, 0.11133396625518799, 0.5707095265388489, -0.16142696142196655, -0.40532755851745605, -0.05051621049642563, 0.46048247814178467, 0.05210746452212334, -0.004168739542365074, -0.012508679181337357, 0.4650457203388214, -0.15834173560142517, -0.09814224392175674, -0.4000210762023926, 0.4083459973335266, -0.11230164766311646, -0.2506639063358307, 0.2040327489376068, -0.02231936901807785, -0.32103776931762695, 0.19936402142047882, -0.00882052443921566, 0.29694271087646484, -0.14145712554454803, 0.3003465533256531, -0.3492371439933777, -0.21379932761192322, -0.24988849461078644, 0.3892726004123688, -0.24792169034481049, -0.32057785987854004, 0.3538099527359009, 0.27754467725753784, -0.14086148142814636, -0.12944498658180237, 0.2748635709285736, 0.25379252433776855, 0.2880344092845917, -0.41317591071128845, -0.1593962013721466, 0.2540505528450012, 0.20088694989681244, -0.2363053858280182, 0.18968825042247772, 0.5250466465950012, 0.4651617109775543, 0.2597644329071045, 0.11641888320446014, -0.22300225496292114, 0.3714629113674164, -0.11951026320457458, -0.27463284134864807, -0.03436882793903351, 0.11163032054901123, 0.027249280363321304, 0.00695076584815979, -0.056083325296640396, -0.0717354342341423, -0.4134303331375122, 0.15678025782108307, -0.02207016944885254, -0.05299655720591545, 0.04291275516152382, 0.0046897344291210175, 0.07002297043800354, 0.03816068917512894, 0.3015451729297638, 0.41265061497688293, 0.2961583733558655, -0.2778334319591522, -0.6142833828926086, -0.6091967225074768, 0.2115803062915802, -0.03502151370048523, 0.13998740911483765, 0.06432508677244186, -0.13561609387397766, -0.01946709305047989, 0.09293435513973236, -0.1585393100976944, -0.31178024411201477, 0.24147778749465942, 0.07942560315132141, -0.25890934467315674, 0.24800258874893188, 0.49548229575157166, 0.05829465389251709, -0.1315205991268158, -0.44927698373794556, 0.15586960315704346, 0.024809058755636215, 0.07500583678483963, -0.15926538407802582, -0.3705044984817505, 0.009272933006286621, -0.4618379771709442, 0.8872693777084351, 0.09777678549289703, 0.16252031922340393, -0.1749747395515442, -0.2255955934524536, -0.28747281432151794, -0.1163487508893013, 0.013107512146234512, 0.012100364081561565, 0.19317790865898132, 0.27464964985847473, -0.039410561323165894, 0.4162313938140869, -0.3012009263038635, 0.21877926588058472, 0.022692345082759857, -0.10466013848781586, -0.286821186542511, -0.0448182076215744, -0.15804523229599, -0.10041859745979309, -0.30558478832244873, 0.3113054037094116, -0.004228940233588219, 0.2383640557527542, -0.32406750321388245, -0.3864262104034424, 0.3152199387550354, -0.2463461458683014, -0.08036601543426514, 0.21592849493026733, 0.30123549699783325, -0.3446621596813202, -0.11868617683649063, 0.2786519527435303, 0.07851848006248474, 0.2899197041988373, 0.3873496651649475, -0.3197360038757324, 0.225765660405159, -0.04170374572277069, -0.18798667192459106, -0.0010478943586349487, 0.2349923849105835, 0.042468469589948654, -0.2748902440071106, 0.2756919860839844, -0.139544278383255 ]
https://github.com/huggingface/datasets/issues/6475
Based on the StackOverflow answer, this causes the error to go away: ```diff diff --git a/table.py b/table.py --- a/table.py +++ b/table.py (date 1701824849806) @@ -47,7 +47,7 @@ def _memory_mapped_record_batch_reader_from_file(filename: str) -> pa.RecordBatchStreamReader: - memory_mapped_stream = pa.memory_map(filename) + memory_mapped_stream = pa.memory_map(filename, "r+") return pa.ipc.open_stream(memory_mapped_stream) ``` But now loading the dataset goes very, very slowly, which is unexpected.
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed
### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0
56
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed ### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0 Based on the StackOverflow answer, this causes the error to go away: ```diff diff --git a/table.py b/table.py --- a/table.py +++ b/table.py (date 1701824849806) @@ -47,7 +47,7 @@ def _memory_mapped_record_batch_reader_from_file(filename: str) -> pa.RecordBatchStreamReader: - memory_mapped_stream = pa.memory_map(filename) + memory_mapped_stream = pa.memory_map(filename, "r+") return pa.ipc.open_stream(memory_mapped_stream) ``` But now loading the dataset goes very, very slowly, which is unexpected.
[ -0.10396334528923035, -0.16585659980773926, -0.06416866183280945, 0.3617136478424072, 0.04591068997979164, -0.18339619040489197, -0.012238699942827225, 0.26278233528137207, -0.2864779233932495, -0.08145007491111755, -0.024002086371183395, 0.08407759666442871, -0.14902670681476593, 0.1495061218738556, -0.03063797950744629, -0.03984774276614189, 0.07719110697507858, 0.12992192804813385, 0.29345935583114624, 0.16215340793132782, -0.4650859832763672, 0.35488012433052063, -0.25587624311447144, 0.10274036228656769, -0.06378617137670517, 0.12237735092639923, -0.31961995363235474, 0.509280800819397, -0.2872696816921234, -0.3582841157913208, 0.479002982378006, -0.3087034821510315, 0.36739763617515564, 0.13761241734027863, -0.0001152386685134843, 0.054856084287166595, 0.46044379472732544, -0.05314774811267853, 0.16732196509838104, 0.09588611871004105, 0.09431611746549606, -0.36221766471862793, -0.14888012409210205, -0.3601916432380676, 0.04446469247341156, -0.19450746476650238, -0.11527694761753082, -0.4744316339492798, 0.34332266449928284, 0.3433285355567932, 0.17225058376789093, 0.23018302023410797, 0.3630772829055786, 0.2201823741197586, 0.6044427752494812, -0.45173218846321106, -0.11601148545742035, 0.18802687525749207, 0.09052100777626038, -0.1964600384235382, 0.12938784062862396, 0.09616892784833908, -0.16839498281478882, -0.07067332416772842, -0.1556248515844345, -0.09009994566440582, 0.1444256603717804, -0.37170395255088806, -0.04261759668588638, 0.06775302439928055, -0.035245925188064575, -0.05534273386001587, -0.16399887204170227, 0.26411688327789307, 0.03080553561449051, -0.5285080075263977, 0.20865195989608765, 0.35857415199279785, -0.08476726710796356, -0.05767493322491646, -0.04259493574500084, 0.09457957744598389, -0.0017685070633888245, 0.10504267364740372, -0.1206967830657959, 0.1921912133693695, -0.08201159536838531, 0.1812332272529602, 0.040269285440444946, 0.0039028096944093704, 0.2101050466299057, 0.22022733092308044, -0.32798105478286743, 0.10570281744003296, -0.47656095027923584, 0.04070357233285904, -0.08174433559179306, 0.28546836972236633, -0.04491708427667618, -0.050283282995224, -0.08063004910945892, -0.08655799925327301, -0.14981740713119507, -0.11620886623859406, -0.05401574447751045, 0.420005738735199, 0.004707643762230873, -0.3847629129886627, 0.24009831249713898, 0.18792785704135895, 0.1674758791923523, 0.05413538217544556, -0.39239561557769775, -0.46420836448669434, -0.04803851619362831, -0.040218815207481384, 0.3278602063655853, -0.37214088439941406, -0.5733497142791748, 0.1414315402507782, -0.5692530274391174, 0.20278514921665192, 0.06204221397638321, 0.27933719754219055, -0.3403257727622986, -0.13716687262058258, 0.29225388169288635, 0.1804284304380417, -0.16504696011543274, 0.03734781965613365, -0.008327873423695564, 0.21995870769023895, -0.19099712371826172, -0.10635045170783997, 0.08153973519802094, -0.3683243691921234, 0.5237661004066467, 0.2289031445980072, -0.017118360847234726, 0.0542953759431839, 0.10540556907653809, -0.22765931487083435, -0.30767151713371277, 0.2863863408565521, -0.1566096544265747, -0.00744238868355751, 0.13802757859230042, 0.062121763825416565, 0.012379944324493408, 0.2542601525783539, -0.15054337680339813, -0.207289457321167, -0.20371001958847046, 0.1626507043838501, -0.10137002170085907, 0.17009547352790833, 0.3873385787010193, 0.024755289778113365, 0.2557815611362457, -0.19022253155708313, 0.024442486464977264, -0.17892080545425415, -0.49436861276626587, -0.1688336580991745, 0.3723071217536926, 0.008581370115280151, -0.09290459752082825, 0.04559306055307388, -0.2997229993343353, -0.09407831728458405, 0.3640095591545105, 0.10164622962474823, -0.06267397105693817, -0.010548949241638184, -0.46043023467063904, 0.08122391998767853, -0.19129829108715057, -0.34107160568237305, -0.3286507725715637, 0.4735722541809082, -0.16206349432468414, 0.33762526512145996, 0.014702219516038895, -0.009244311600923538, -0.2239345908164978, -0.3591806888580322, 0.4350608289241791, 0.1735306680202484, -0.005890093743801117, -0.13615462183952332, -0.48548388481140137, -0.42373406887054443, 0.30718955397605896, 0.3330910801887512, 0.16834352910518646, -0.19748377799987793, 0.15436862409114838, 0.5204557776451111, 0.1619524210691452, 0.09422576427459717, 0.08241430670022964, 0.19880886375904083, -0.2457229346036911, -0.2646988332271576, -0.07643353193998337, 0.04763972759246826, -0.159610778093338, 0.27006345987319946, -0.2809077501296997, 0.15925711393356323, -0.06307756900787354, 0.11645014584064484, -0.2511121332645416, 0.18181149661540985, -0.09474299103021622, -0.24722586572170258, 0.1807105541229248, 0.068353071808815, -0.238028421998024, -0.08220198005437851, 0.16630300879478455, 0.41525503993034363, 0.06355118751525879, -0.08599554002285004, -0.10765884816646576, 0.014787733554840088, -0.321842223405838, -0.10912778973579407, 0.10928073525428772, 0.21685802936553955, 0.22975505888462067, 0.01342897117137909, -0.17475169897079468, 0.2825953960418701, 0.15150746703147888, -0.21642985939979553, -0.021720705553889275, -0.12831291556358337, 0.3187291920185089, -0.39264848828315735, 0.288178414106369, 0.44944947957992554, 0.06076616048812866, -0.0235942080616951, 0.28204017877578735, 0.20420987904071808, -0.20786574482917786, -0.05499615892767906, -0.01196182519197464, -0.022288408130407333, 0.151835098862648, -0.1312483549118042, -0.20130060613155365, -0.01967894285917282, 0.5470786690711975, 0.25905540585517883, -0.07472947239875793, 0.16692425310611725, -0.10432550311088562, -0.196726456284523, 0.18989111483097076, 0.01880880445241928, -0.030384350568056107, 0.08124971389770508, -0.22530227899551392, -0.1673487275838852, 0.3019475042819977, -0.45507991313934326, 0.5055996179580688, 0.006160486489534378, -0.18173623085021973, 0.20135435461997986, -0.2803894877433777, -0.1344647854566574, 0.23612678050994873, 0.027283694595098495, 0.178297221660614, 0.29030248522758484, 0.0807177945971489, 0.13685722649097443, -0.4051700234413147, -0.23393799364566803, -0.057251375168561935, 0.0660996288061142, -0.24410855770111084, -0.2356611043214798, -0.09920856356620789, -0.0017762035131454468, 0.12367680668830872, -0.40121573209762573, -0.19181297719478607, 0.03832150250673294, -0.014187402091920376, 0.09390953183174133, 0.1081240251660347, 0.007353074848651886, -0.2872256934642792, 0.05018918216228485, 0.22673755884170532, -0.07015611231327057, -0.01220114529132843, 0.11828866600990295, -0.3647076487541199, 0.04469211399555206, 0.16809426248073578, -0.100003182888031, 0.13867183029651642, 0.038295455276966095, -0.02841029316186905, -0.12430659681558609, -0.3358612358570099, -0.04494134336709976, -0.1844097524881363, 0.6750739216804504, 0.08657550066709518, 0.04472779855132103, -0.2883935570716858, -0.39848941564559937, 0.20048806071281433, 0.2731602191925049, -0.1155705451965332, 0.14095890522003174, 0.0858573466539383, 0.07656129449605942, -0.1789214164018631, -0.04475950077176094, -0.07274315506219864, -0.3597075641155243, 0.019414080306887627, -0.03579618036746979, -0.11587245017290115, 0.1316884458065033, -0.18240633606910706, 0.17288462817668915, 0.5054888129234314, 0.025286361575126648, -0.29015761613845825, -0.3475993275642395, 0.19051845371723175, -0.06264878064393997, -0.2594669461250305, -0.05778348818421364, -0.0026706233620643616, 0.09334960579872131, 0.26976755261421204, -0.4231244921684265, -0.04174542427062988, -0.014795716851949692, 0.14797645807266235, -0.1738225519657135, -0.3538973927497864, 0.2849051356315613, 0.23400776088237762, -0.0313727930188179, -0.09749632328748703, -0.20753681659698486, -0.0776468962430954, -0.008409073576331139, 0.4140308201313019, 0.002065042033791542, 0.20911933481693268, -0.01781616359949112, 0.04531513899564743, 0.15128320455551147, 0.2853340804576874, 0.7059417963027954, 0.1523822695016861, 0.19112496078014374, 0.12037982046604156, -0.2509269714355469, 0.1740172952413559, -0.20073151588439941, -0.014154016971588135, 0.33949869871139526, -0.0642065703868866, -0.007028425112366676, -0.21440958976745605, -0.08470280468463898, -0.2189548909664154, -0.06267168372869492, 0.013782965019345284, -0.19845131039619446, 0.3452240228652954, -0.20986773073673248, -0.08896040916442871, 0.3688356876373291, -0.026597343385219574, 0.21737045049667358, 0.17576979100704193, -0.1267348676919937, -0.15520653128623962, -0.19829711318016052, -0.21983878314495087, -0.4107120931148529, 0.2797970771789551, 0.13473980128765106, 0.6053627133369446, 0.02426201105117798, -0.04728041589260101, -0.009519565850496292, -0.3188267648220062, 0.448923796415329, -0.11870797723531723, 0.11287619173526764, 0.12380699068307877, -0.012165293097496033, -0.5684409737586975, -0.2969525456428528, -0.06092211231589317, 0.27076759934425354, 0.049192193895578384, 0.4614700376987457, -0.14270073175430298, 0.23899874091148376, 0.3159010410308838, 0.13029666244983673, -0.09473735094070435, -0.0824500247836113, -0.4103213846683502, -0.6870729327201843, -0.1309131383895874, 0.03884845972061157, -0.09975164383649826, 0.40277111530303955, -0.15969079732894897, -0.09481701999902725, -0.08056054264307022, 0.196975976228714, -0.06398142874240875, -0.06338807195425034, 0.07399328052997589, 0.08682696521282196, 0.25314515829086304, -0.09419186413288116, 0.20273977518081665, -0.05720118433237076, 0.3164207339286804, 0.13974973559379578, -0.2589554190635681, 0.04596622660756111, 0.08078410476446152, 0.0869215577840805, 0.2498500645160675, -0.2218504250049591, -0.20216238498687744, 0.04290468245744705, 0.07412976026535034, -0.0531863197684288, 0.25452935695648193, 0.8272790312767029, -0.2701970338821411, -0.31771355867385864, -0.05536408722400665, 0.30194783210754395, -0.03579077124595642, -0.03104501962661743, -0.13614779710769653, -0.4344771206378937, -0.1977805644273758, 0.4961393475532532, 0.22306156158447266, 0.9382808804512024, 0.06029827147722244, 0.0774741917848587, 0.3687116205692291, 0.06222066283226013, 0.2613429129123688, -0.4363674521446228, 0.11314022541046143, -0.03354666382074356, -0.45140716433525085, 0.1331954151391983, 0.1160290315747261, 0.11247856914997101, -0.1272440254688263, -0.32011231780052185, -0.004287682473659515, 0.1710307002067566, -0.1982189565896988, 0.2020295262336731, -0.11692731827497482, -0.03284728527069092, -0.1594517081975937, -0.3088780343532562, 0.10638856887817383, 0.018059521913528442, 0.276340514421463, -0.32945716381073, 0.07050203531980515, 0.08831049501895905, -0.27142345905303955, -0.33382636308670044, 0.355763703584671, -0.25562891364097595, 0.29201802611351013, -0.6306741833686829, 0.1571142077445984, -0.11657170206308365, 0.2191525101661682, 0.3410786986351013, 0.3689155578613281, -0.1685710996389389, 0.15864090621471405, 0.2990371286869049, -0.11008051037788391, 0.2379530966281891, -0.1769976019859314, -0.06213133782148361, -0.29552575945854187, -0.18054398894309998, -0.0060715451836586, -0.2974325120449066, 0.08405214548110962, -0.01868249475955963, 0.0911024808883667, -0.010001983493566513, 0.005315843969583511, -0.06519833952188492, -0.004380442202091217, 0.3272295594215393, -0.2107689082622528, 0.13338246941566467, 0.007430734112858772, -0.12894421815872192, 0.29528313875198364, -0.3113310933113098, -0.3914300799369812, -0.05662068724632263, 0.41349512338638306, -0.019437206909060478, 0.23648576438426971, 0.3887905776500702, 0.008746758103370667, 0.12820622324943542, -0.06725107133388519, -0.05177856981754303, -0.3094167411327362, -0.17839154601097107, 0.062260549515485764, 0.40574753284454346, -0.02126385271549225, -0.04132108390331268, 0.6821677684783936, 0.5023373961448669, -0.058049872517585754, 0.28422582149505615, -0.5085424780845642, -0.05366135761141777, 0.4121686816215515, 0.0390261635184288, 0.2352134883403778, 0.11354944109916687, 0.15442973375320435, 0.11105258017778397, -0.019074246287345886, -0.24681395292282104, 0.021809838712215424, -0.15369150042533875, 0.10439183562994003, -0.08066317439079285, 0.07095601409673691, 0.3835841119289398, 0.3150915503501892, 0.18962092697620392, 0.15939106047153473, 0.012682933360338211, -0.13242056965827942, -0.20616912841796875, 0.15075938403606415, 0.12781067192554474, -0.25666356086730957, 0.12671631574630737, -0.2540706396102905, 0.08229237794876099, -0.033576108515262604, -0.026674501597881317, 0.1379125565290451, 0.06972019374370575, -0.1087537556886673, 0.0820675864815712, 0.12426106631755829, -0.04286167398095131, 0.3303706645965576, -0.038571711629629135, 0.3692839443683624, 0.2307862937450409, 0.21942727267742157, 0.019109666347503662, -0.11759502440690994, 0.6458373069763184, -0.23686105012893677, -0.04535812512040138, 0.12787401676177979, 0.032567836344242096, -0.17061135172843933, -0.05049687251448631, -0.0771619901061058, 0.1825573593378067, 0.5723704099655151, -0.20992940664291382, -0.14079716801643372, 0.15141130983829498, 0.19430458545684814, -0.3506431579589844, 0.001389574259519577, 0.025029174983501434, -0.4540189802646637, -0.2719038128852844, 0.06966209411621094, 0.12043819576501846, -0.022400781512260437, 0.07968554645776749, -0.12065988034009933, 0.20218223333358765, 0.07756519317626953, -0.10862574726343155, 0.3175908029079437, -0.13611377775669098, 0.20454442501068115, 0.04626310616731644, -0.31492555141448975, 0.3764507472515106, 0.27159687876701355, 0.14238998293876648, -0.16443441808223724, 0.11133396625518799, 0.5707095265388489, -0.16142696142196655, -0.40532755851745605, -0.05051621049642563, 0.46048247814178467, 0.05210746452212334, -0.004168739542365074, -0.012508679181337357, 0.4650457203388214, -0.15834173560142517, -0.09814224392175674, -0.4000210762023926, 0.4083459973335266, -0.11230164766311646, -0.2506639063358307, 0.2040327489376068, -0.02231936901807785, -0.32103776931762695, 0.19936402142047882, -0.00882052443921566, 0.29694271087646484, -0.14145712554454803, 0.3003465533256531, -0.3492371439933777, -0.21379932761192322, -0.24988849461078644, 0.3892726004123688, -0.24792169034481049, -0.32057785987854004, 0.3538099527359009, 0.27754467725753784, -0.14086148142814636, -0.12944498658180237, 0.2748635709285736, 0.25379252433776855, 0.2880344092845917, -0.41317591071128845, -0.1593962013721466, 0.2540505528450012, 0.20088694989681244, -0.2363053858280182, 0.18968825042247772, 0.5250466465950012, 0.4651617109775543, 0.2597644329071045, 0.11641888320446014, -0.22300225496292114, 0.3714629113674164, -0.11951026320457458, -0.27463284134864807, -0.03436882793903351, 0.11163032054901123, 0.027249280363321304, 0.00695076584815979, -0.056083325296640396, -0.0717354342341423, -0.4134303331375122, 0.15678025782108307, -0.02207016944885254, -0.05299655720591545, 0.04291275516152382, 0.0046897344291210175, 0.07002297043800354, 0.03816068917512894, 0.3015451729297638, 0.41265061497688293, 0.2961583733558655, -0.2778334319591522, -0.6142833828926086, -0.6091967225074768, 0.2115803062915802, -0.03502151370048523, 0.13998740911483765, 0.06432508677244186, -0.13561609387397766, -0.01946709305047989, 0.09293435513973236, -0.1585393100976944, -0.31178024411201477, 0.24147778749465942, 0.07942560315132141, -0.25890934467315674, 0.24800258874893188, 0.49548229575157166, 0.05829465389251709, -0.1315205991268158, -0.44927698373794556, 0.15586960315704346, 0.024809058755636215, 0.07500583678483963, -0.15926538407802582, -0.3705044984817505, 0.009272933006286621, -0.4618379771709442, 0.8872693777084351, 0.09777678549289703, 0.16252031922340393, -0.1749747395515442, -0.2255955934524536, -0.28747281432151794, -0.1163487508893013, 0.013107512146234512, 0.012100364081561565, 0.19317790865898132, 0.27464964985847473, -0.039410561323165894, 0.4162313938140869, -0.3012009263038635, 0.21877926588058472, 0.022692345082759857, -0.10466013848781586, -0.286821186542511, -0.0448182076215744, -0.15804523229599, -0.10041859745979309, -0.30558478832244873, 0.3113054037094116, -0.004228940233588219, 0.2383640557527542, -0.32406750321388245, -0.3864262104034424, 0.3152199387550354, -0.2463461458683014, -0.08036601543426514, 0.21592849493026733, 0.30123549699783325, -0.3446621596813202, -0.11868617683649063, 0.2786519527435303, 0.07851848006248474, 0.2899197041988373, 0.3873496651649475, -0.3197360038757324, 0.225765660405159, -0.04170374572277069, -0.18798667192459106, -0.0010478943586349487, 0.2349923849105835, 0.042468469589948654, -0.2748902440071106, 0.2756919860839844, -0.139544278383255 ]
https://github.com/huggingface/datasets/issues/6475
I don't really comprehend what it is that `datasets` gave me when it downloaded the laion2B-en dataset, because nothing can seemingly read these 1024 .arrow files it is retrieving. Not `polars`, not `pyarrow`, it's not an `ipc` file, it's not a `parquet` file...
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed
### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0
43
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed ### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0 I don't really comprehend what it is that `datasets` gave me when it downloaded the laion2B-en dataset, because nothing can seemingly read these 1024 .arrow files it is retrieving. Not `polars`, not `pyarrow`, it's not an `ipc` file, it's not a `parquet` file...
[ -0.10396334528923035, -0.16585659980773926, -0.06416866183280945, 0.3617136478424072, 0.04591068997979164, -0.18339619040489197, -0.012238699942827225, 0.26278233528137207, -0.2864779233932495, -0.08145007491111755, -0.024002086371183395, 0.08407759666442871, -0.14902670681476593, 0.1495061218738556, -0.03063797950744629, -0.03984774276614189, 0.07719110697507858, 0.12992192804813385, 0.29345935583114624, 0.16215340793132782, -0.4650859832763672, 0.35488012433052063, -0.25587624311447144, 0.10274036228656769, -0.06378617137670517, 0.12237735092639923, -0.31961995363235474, 0.509280800819397, -0.2872696816921234, -0.3582841157913208, 0.479002982378006, -0.3087034821510315, 0.36739763617515564, 0.13761241734027863, -0.0001152386685134843, 0.054856084287166595, 0.46044379472732544, -0.05314774811267853, 0.16732196509838104, 0.09588611871004105, 0.09431611746549606, -0.36221766471862793, -0.14888012409210205, -0.3601916432380676, 0.04446469247341156, -0.19450746476650238, -0.11527694761753082, -0.4744316339492798, 0.34332266449928284, 0.3433285355567932, 0.17225058376789093, 0.23018302023410797, 0.3630772829055786, 0.2201823741197586, 0.6044427752494812, -0.45173218846321106, -0.11601148545742035, 0.18802687525749207, 0.09052100777626038, -0.1964600384235382, 0.12938784062862396, 0.09616892784833908, -0.16839498281478882, -0.07067332416772842, -0.1556248515844345, -0.09009994566440582, 0.1444256603717804, -0.37170395255088806, -0.04261759668588638, 0.06775302439928055, -0.035245925188064575, -0.05534273386001587, -0.16399887204170227, 0.26411688327789307, 0.03080553561449051, -0.5285080075263977, 0.20865195989608765, 0.35857415199279785, -0.08476726710796356, -0.05767493322491646, -0.04259493574500084, 0.09457957744598389, -0.0017685070633888245, 0.10504267364740372, -0.1206967830657959, 0.1921912133693695, -0.08201159536838531, 0.1812332272529602, 0.040269285440444946, 0.0039028096944093704, 0.2101050466299057, 0.22022733092308044, -0.32798105478286743, 0.10570281744003296, -0.47656095027923584, 0.04070357233285904, -0.08174433559179306, 0.28546836972236633, -0.04491708427667618, -0.050283282995224, -0.08063004910945892, -0.08655799925327301, -0.14981740713119507, -0.11620886623859406, -0.05401574447751045, 0.420005738735199, 0.004707643762230873, -0.3847629129886627, 0.24009831249713898, 0.18792785704135895, 0.1674758791923523, 0.05413538217544556, -0.39239561557769775, -0.46420836448669434, -0.04803851619362831, -0.040218815207481384, 0.3278602063655853, -0.37214088439941406, -0.5733497142791748, 0.1414315402507782, -0.5692530274391174, 0.20278514921665192, 0.06204221397638321, 0.27933719754219055, -0.3403257727622986, -0.13716687262058258, 0.29225388169288635, 0.1804284304380417, -0.16504696011543274, 0.03734781965613365, -0.008327873423695564, 0.21995870769023895, -0.19099712371826172, -0.10635045170783997, 0.08153973519802094, -0.3683243691921234, 0.5237661004066467, 0.2289031445980072, -0.017118360847234726, 0.0542953759431839, 0.10540556907653809, -0.22765931487083435, -0.30767151713371277, 0.2863863408565521, -0.1566096544265747, -0.00744238868355751, 0.13802757859230042, 0.062121763825416565, 0.012379944324493408, 0.2542601525783539, -0.15054337680339813, -0.207289457321167, -0.20371001958847046, 0.1626507043838501, -0.10137002170085907, 0.17009547352790833, 0.3873385787010193, 0.024755289778113365, 0.2557815611362457, -0.19022253155708313, 0.024442486464977264, -0.17892080545425415, -0.49436861276626587, -0.1688336580991745, 0.3723071217536926, 0.008581370115280151, -0.09290459752082825, 0.04559306055307388, -0.2997229993343353, -0.09407831728458405, 0.3640095591545105, 0.10164622962474823, -0.06267397105693817, -0.010548949241638184, -0.46043023467063904, 0.08122391998767853, -0.19129829108715057, -0.34107160568237305, -0.3286507725715637, 0.4735722541809082, -0.16206349432468414, 0.33762526512145996, 0.014702219516038895, -0.009244311600923538, -0.2239345908164978, -0.3591806888580322, 0.4350608289241791, 0.1735306680202484, -0.005890093743801117, -0.13615462183952332, -0.48548388481140137, -0.42373406887054443, 0.30718955397605896, 0.3330910801887512, 0.16834352910518646, -0.19748377799987793, 0.15436862409114838, 0.5204557776451111, 0.1619524210691452, 0.09422576427459717, 0.08241430670022964, 0.19880886375904083, -0.2457229346036911, -0.2646988332271576, -0.07643353193998337, 0.04763972759246826, -0.159610778093338, 0.27006345987319946, -0.2809077501296997, 0.15925711393356323, -0.06307756900787354, 0.11645014584064484, -0.2511121332645416, 0.18181149661540985, -0.09474299103021622, -0.24722586572170258, 0.1807105541229248, 0.068353071808815, -0.238028421998024, -0.08220198005437851, 0.16630300879478455, 0.41525503993034363, 0.06355118751525879, -0.08599554002285004, -0.10765884816646576, 0.014787733554840088, -0.321842223405838, -0.10912778973579407, 0.10928073525428772, 0.21685802936553955, 0.22975505888462067, 0.01342897117137909, -0.17475169897079468, 0.2825953960418701, 0.15150746703147888, -0.21642985939979553, -0.021720705553889275, -0.12831291556358337, 0.3187291920185089, -0.39264848828315735, 0.288178414106369, 0.44944947957992554, 0.06076616048812866, -0.0235942080616951, 0.28204017877578735, 0.20420987904071808, -0.20786574482917786, -0.05499615892767906, -0.01196182519197464, -0.022288408130407333, 0.151835098862648, -0.1312483549118042, -0.20130060613155365, -0.01967894285917282, 0.5470786690711975, 0.25905540585517883, -0.07472947239875793, 0.16692425310611725, -0.10432550311088562, -0.196726456284523, 0.18989111483097076, 0.01880880445241928, -0.030384350568056107, 0.08124971389770508, -0.22530227899551392, -0.1673487275838852, 0.3019475042819977, -0.45507991313934326, 0.5055996179580688, 0.006160486489534378, -0.18173623085021973, 0.20135435461997986, -0.2803894877433777, -0.1344647854566574, 0.23612678050994873, 0.027283694595098495, 0.178297221660614, 0.29030248522758484, 0.0807177945971489, 0.13685722649097443, -0.4051700234413147, -0.23393799364566803, -0.057251375168561935, 0.0660996288061142, -0.24410855770111084, -0.2356611043214798, -0.09920856356620789, -0.0017762035131454468, 0.12367680668830872, -0.40121573209762573, -0.19181297719478607, 0.03832150250673294, -0.014187402091920376, 0.09390953183174133, 0.1081240251660347, 0.007353074848651886, -0.2872256934642792, 0.05018918216228485, 0.22673755884170532, -0.07015611231327057, -0.01220114529132843, 0.11828866600990295, -0.3647076487541199, 0.04469211399555206, 0.16809426248073578, -0.100003182888031, 0.13867183029651642, 0.038295455276966095, -0.02841029316186905, -0.12430659681558609, -0.3358612358570099, -0.04494134336709976, -0.1844097524881363, 0.6750739216804504, 0.08657550066709518, 0.04472779855132103, -0.2883935570716858, -0.39848941564559937, 0.20048806071281433, 0.2731602191925049, -0.1155705451965332, 0.14095890522003174, 0.0858573466539383, 0.07656129449605942, -0.1789214164018631, -0.04475950077176094, -0.07274315506219864, -0.3597075641155243, 0.019414080306887627, -0.03579618036746979, -0.11587245017290115, 0.1316884458065033, -0.18240633606910706, 0.17288462817668915, 0.5054888129234314, 0.025286361575126648, -0.29015761613845825, -0.3475993275642395, 0.19051845371723175, -0.06264878064393997, -0.2594669461250305, -0.05778348818421364, -0.0026706233620643616, 0.09334960579872131, 0.26976755261421204, -0.4231244921684265, -0.04174542427062988, -0.014795716851949692, 0.14797645807266235, -0.1738225519657135, -0.3538973927497864, 0.2849051356315613, 0.23400776088237762, -0.0313727930188179, -0.09749632328748703, -0.20753681659698486, -0.0776468962430954, -0.008409073576331139, 0.4140308201313019, 0.002065042033791542, 0.20911933481693268, -0.01781616359949112, 0.04531513899564743, 0.15128320455551147, 0.2853340804576874, 0.7059417963027954, 0.1523822695016861, 0.19112496078014374, 0.12037982046604156, -0.2509269714355469, 0.1740172952413559, -0.20073151588439941, -0.014154016971588135, 0.33949869871139526, -0.0642065703868866, -0.007028425112366676, -0.21440958976745605, -0.08470280468463898, -0.2189548909664154, -0.06267168372869492, 0.013782965019345284, -0.19845131039619446, 0.3452240228652954, -0.20986773073673248, -0.08896040916442871, 0.3688356876373291, -0.026597343385219574, 0.21737045049667358, 0.17576979100704193, -0.1267348676919937, -0.15520653128623962, -0.19829711318016052, -0.21983878314495087, -0.4107120931148529, 0.2797970771789551, 0.13473980128765106, 0.6053627133369446, 0.02426201105117798, -0.04728041589260101, -0.009519565850496292, -0.3188267648220062, 0.448923796415329, -0.11870797723531723, 0.11287619173526764, 0.12380699068307877, -0.012165293097496033, -0.5684409737586975, -0.2969525456428528, -0.06092211231589317, 0.27076759934425354, 0.049192193895578384, 0.4614700376987457, -0.14270073175430298, 0.23899874091148376, 0.3159010410308838, 0.13029666244983673, -0.09473735094070435, -0.0824500247836113, -0.4103213846683502, -0.6870729327201843, -0.1309131383895874, 0.03884845972061157, -0.09975164383649826, 0.40277111530303955, -0.15969079732894897, -0.09481701999902725, -0.08056054264307022, 0.196975976228714, -0.06398142874240875, -0.06338807195425034, 0.07399328052997589, 0.08682696521282196, 0.25314515829086304, -0.09419186413288116, 0.20273977518081665, -0.05720118433237076, 0.3164207339286804, 0.13974973559379578, -0.2589554190635681, 0.04596622660756111, 0.08078410476446152, 0.0869215577840805, 0.2498500645160675, -0.2218504250049591, -0.20216238498687744, 0.04290468245744705, 0.07412976026535034, -0.0531863197684288, 0.25452935695648193, 0.8272790312767029, -0.2701970338821411, -0.31771355867385864, -0.05536408722400665, 0.30194783210754395, -0.03579077124595642, -0.03104501962661743, -0.13614779710769653, -0.4344771206378937, -0.1977805644273758, 0.4961393475532532, 0.22306156158447266, 0.9382808804512024, 0.06029827147722244, 0.0774741917848587, 0.3687116205692291, 0.06222066283226013, 0.2613429129123688, -0.4363674521446228, 0.11314022541046143, -0.03354666382074356, -0.45140716433525085, 0.1331954151391983, 0.1160290315747261, 0.11247856914997101, -0.1272440254688263, -0.32011231780052185, -0.004287682473659515, 0.1710307002067566, -0.1982189565896988, 0.2020295262336731, -0.11692731827497482, -0.03284728527069092, -0.1594517081975937, -0.3088780343532562, 0.10638856887817383, 0.018059521913528442, 0.276340514421463, -0.32945716381073, 0.07050203531980515, 0.08831049501895905, -0.27142345905303955, -0.33382636308670044, 0.355763703584671, -0.25562891364097595, 0.29201802611351013, -0.6306741833686829, 0.1571142077445984, -0.11657170206308365, 0.2191525101661682, 0.3410786986351013, 0.3689155578613281, -0.1685710996389389, 0.15864090621471405, 0.2990371286869049, -0.11008051037788391, 0.2379530966281891, -0.1769976019859314, -0.06213133782148361, -0.29552575945854187, -0.18054398894309998, -0.0060715451836586, -0.2974325120449066, 0.08405214548110962, -0.01868249475955963, 0.0911024808883667, -0.010001983493566513, 0.005315843969583511, -0.06519833952188492, -0.004380442202091217, 0.3272295594215393, -0.2107689082622528, 0.13338246941566467, 0.007430734112858772, -0.12894421815872192, 0.29528313875198364, -0.3113310933113098, -0.3914300799369812, -0.05662068724632263, 0.41349512338638306, -0.019437206909060478, 0.23648576438426971, 0.3887905776500702, 0.008746758103370667, 0.12820622324943542, -0.06725107133388519, -0.05177856981754303, -0.3094167411327362, -0.17839154601097107, 0.062260549515485764, 0.40574753284454346, -0.02126385271549225, -0.04132108390331268, 0.6821677684783936, 0.5023373961448669, -0.058049872517585754, 0.28422582149505615, -0.5085424780845642, -0.05366135761141777, 0.4121686816215515, 0.0390261635184288, 0.2352134883403778, 0.11354944109916687, 0.15442973375320435, 0.11105258017778397, -0.019074246287345886, -0.24681395292282104, 0.021809838712215424, -0.15369150042533875, 0.10439183562994003, -0.08066317439079285, 0.07095601409673691, 0.3835841119289398, 0.3150915503501892, 0.18962092697620392, 0.15939106047153473, 0.012682933360338211, -0.13242056965827942, -0.20616912841796875, 0.15075938403606415, 0.12781067192554474, -0.25666356086730957, 0.12671631574630737, -0.2540706396102905, 0.08229237794876099, -0.033576108515262604, -0.026674501597881317, 0.1379125565290451, 0.06972019374370575, -0.1087537556886673, 0.0820675864815712, 0.12426106631755829, -0.04286167398095131, 0.3303706645965576, -0.038571711629629135, 0.3692839443683624, 0.2307862937450409, 0.21942727267742157, 0.019109666347503662, -0.11759502440690994, 0.6458373069763184, -0.23686105012893677, -0.04535812512040138, 0.12787401676177979, 0.032567836344242096, -0.17061135172843933, -0.05049687251448631, -0.0771619901061058, 0.1825573593378067, 0.5723704099655151, -0.20992940664291382, -0.14079716801643372, 0.15141130983829498, 0.19430458545684814, -0.3506431579589844, 0.001389574259519577, 0.025029174983501434, -0.4540189802646637, -0.2719038128852844, 0.06966209411621094, 0.12043819576501846, -0.022400781512260437, 0.07968554645776749, -0.12065988034009933, 0.20218223333358765, 0.07756519317626953, -0.10862574726343155, 0.3175908029079437, -0.13611377775669098, 0.20454442501068115, 0.04626310616731644, -0.31492555141448975, 0.3764507472515106, 0.27159687876701355, 0.14238998293876648, -0.16443441808223724, 0.11133396625518799, 0.5707095265388489, -0.16142696142196655, -0.40532755851745605, -0.05051621049642563, 0.46048247814178467, 0.05210746452212334, -0.004168739542365074, -0.012508679181337357, 0.4650457203388214, -0.15834173560142517, -0.09814224392175674, -0.4000210762023926, 0.4083459973335266, -0.11230164766311646, -0.2506639063358307, 0.2040327489376068, -0.02231936901807785, -0.32103776931762695, 0.19936402142047882, -0.00882052443921566, 0.29694271087646484, -0.14145712554454803, 0.3003465533256531, -0.3492371439933777, -0.21379932761192322, -0.24988849461078644, 0.3892726004123688, -0.24792169034481049, -0.32057785987854004, 0.3538099527359009, 0.27754467725753784, -0.14086148142814636, -0.12944498658180237, 0.2748635709285736, 0.25379252433776855, 0.2880344092845917, -0.41317591071128845, -0.1593962013721466, 0.2540505528450012, 0.20088694989681244, -0.2363053858280182, 0.18968825042247772, 0.5250466465950012, 0.4651617109775543, 0.2597644329071045, 0.11641888320446014, -0.22300225496292114, 0.3714629113674164, -0.11951026320457458, -0.27463284134864807, -0.03436882793903351, 0.11163032054901123, 0.027249280363321304, 0.00695076584815979, -0.056083325296640396, -0.0717354342341423, -0.4134303331375122, 0.15678025782108307, -0.02207016944885254, -0.05299655720591545, 0.04291275516152382, 0.0046897344291210175, 0.07002297043800354, 0.03816068917512894, 0.3015451729297638, 0.41265061497688293, 0.2961583733558655, -0.2778334319591522, -0.6142833828926086, -0.6091967225074768, 0.2115803062915802, -0.03502151370048523, 0.13998740911483765, 0.06432508677244186, -0.13561609387397766, -0.01946709305047989, 0.09293435513973236, -0.1585393100976944, -0.31178024411201477, 0.24147778749465942, 0.07942560315132141, -0.25890934467315674, 0.24800258874893188, 0.49548229575157166, 0.05829465389251709, -0.1315205991268158, -0.44927698373794556, 0.15586960315704346, 0.024809058755636215, 0.07500583678483963, -0.15926538407802582, -0.3705044984817505, 0.009272933006286621, -0.4618379771709442, 0.8872693777084351, 0.09777678549289703, 0.16252031922340393, -0.1749747395515442, -0.2255955934524536, -0.28747281432151794, -0.1163487508893013, 0.013107512146234512, 0.012100364081561565, 0.19317790865898132, 0.27464964985847473, -0.039410561323165894, 0.4162313938140869, -0.3012009263038635, 0.21877926588058472, 0.022692345082759857, -0.10466013848781586, -0.286821186542511, -0.0448182076215744, -0.15804523229599, -0.10041859745979309, -0.30558478832244873, 0.3113054037094116, -0.004228940233588219, 0.2383640557527542, -0.32406750321388245, -0.3864262104034424, 0.3152199387550354, -0.2463461458683014, -0.08036601543426514, 0.21592849493026733, 0.30123549699783325, -0.3446621596813202, -0.11868617683649063, 0.2786519527435303, 0.07851848006248474, 0.2899197041988373, 0.3873496651649475, -0.3197360038757324, 0.225765660405159, -0.04170374572277069, -0.18798667192459106, -0.0010478943586349487, 0.2349923849105835, 0.042468469589948654, -0.2748902440071106, 0.2756919860839844, -0.139544278383255 ]
https://github.com/huggingface/datasets/issues/6475
Hi! Instead of generating one (potentially large) Arrow file, we shard the generated data into 500 MB shards because memory-mapping large Arrow files can be problematic on some systems. Maybe deleting the dataset's cache and increasing the shard size (controlled with the `datasets.config.MAX_SHARD_SIZE` variable; e.g. to "4GB") can fix the issue for you. > I don't really comprehend what it is that `datasets` gave me when it downloaded the laion2B-en dataset, because nothing can seemingly read these 1024 .arrow files it is retrieving. Not `polars`, not `pyarrow`, it's not an `ipc` file, it's not a `parquet` file... Our `.arrow` files are in the [Arrow streaming format](https://arrow.apache.org/docs/python/ipc.html#using-streams). To load them as a `polars` DataFrame, do the following: ```python df = pl.from_arrow(Dataset.from_from(path_to_arrow_file).data.table) ``` We plan to switch to the IPC version eventually.
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed
### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0
130
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed ### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0 Hi! Instead of generating one (potentially large) Arrow file, we shard the generated data into 500 MB shards because memory-mapping large Arrow files can be problematic on some systems. Maybe deleting the dataset's cache and increasing the shard size (controlled with the `datasets.config.MAX_SHARD_SIZE` variable; e.g. to "4GB") can fix the issue for you. > I don't really comprehend what it is that `datasets` gave me when it downloaded the laion2B-en dataset, because nothing can seemingly read these 1024 .arrow files it is retrieving. Not `polars`, not `pyarrow`, it's not an `ipc` file, it's not a `parquet` file... Our `.arrow` files are in the [Arrow streaming format](https://arrow.apache.org/docs/python/ipc.html#using-streams). To load them as a `polars` DataFrame, do the following: ```python df = pl.from_arrow(Dataset.from_from(path_to_arrow_file).data.table) ``` We plan to switch to the IPC version eventually.
[ -0.10396334528923035, -0.16585659980773926, -0.06416866183280945, 0.3617136478424072, 0.04591068997979164, -0.18339619040489197, -0.012238699942827225, 0.26278233528137207, -0.2864779233932495, -0.08145007491111755, -0.024002086371183395, 0.08407759666442871, -0.14902670681476593, 0.1495061218738556, -0.03063797950744629, -0.03984774276614189, 0.07719110697507858, 0.12992192804813385, 0.29345935583114624, 0.16215340793132782, -0.4650859832763672, 0.35488012433052063, -0.25587624311447144, 0.10274036228656769, -0.06378617137670517, 0.12237735092639923, -0.31961995363235474, 0.509280800819397, -0.2872696816921234, -0.3582841157913208, 0.479002982378006, -0.3087034821510315, 0.36739763617515564, 0.13761241734027863, -0.0001152386685134843, 0.054856084287166595, 0.46044379472732544, -0.05314774811267853, 0.16732196509838104, 0.09588611871004105, 0.09431611746549606, -0.36221766471862793, -0.14888012409210205, -0.3601916432380676, 0.04446469247341156, -0.19450746476650238, -0.11527694761753082, -0.4744316339492798, 0.34332266449928284, 0.3433285355567932, 0.17225058376789093, 0.23018302023410797, 0.3630772829055786, 0.2201823741197586, 0.6044427752494812, -0.45173218846321106, -0.11601148545742035, 0.18802687525749207, 0.09052100777626038, -0.1964600384235382, 0.12938784062862396, 0.09616892784833908, -0.16839498281478882, -0.07067332416772842, -0.1556248515844345, -0.09009994566440582, 0.1444256603717804, -0.37170395255088806, -0.04261759668588638, 0.06775302439928055, -0.035245925188064575, -0.05534273386001587, -0.16399887204170227, 0.26411688327789307, 0.03080553561449051, -0.5285080075263977, 0.20865195989608765, 0.35857415199279785, -0.08476726710796356, -0.05767493322491646, -0.04259493574500084, 0.09457957744598389, -0.0017685070633888245, 0.10504267364740372, -0.1206967830657959, 0.1921912133693695, -0.08201159536838531, 0.1812332272529602, 0.040269285440444946, 0.0039028096944093704, 0.2101050466299057, 0.22022733092308044, -0.32798105478286743, 0.10570281744003296, -0.47656095027923584, 0.04070357233285904, -0.08174433559179306, 0.28546836972236633, -0.04491708427667618, -0.050283282995224, -0.08063004910945892, -0.08655799925327301, -0.14981740713119507, -0.11620886623859406, -0.05401574447751045, 0.420005738735199, 0.004707643762230873, -0.3847629129886627, 0.24009831249713898, 0.18792785704135895, 0.1674758791923523, 0.05413538217544556, -0.39239561557769775, -0.46420836448669434, -0.04803851619362831, -0.040218815207481384, 0.3278602063655853, -0.37214088439941406, -0.5733497142791748, 0.1414315402507782, -0.5692530274391174, 0.20278514921665192, 0.06204221397638321, 0.27933719754219055, -0.3403257727622986, -0.13716687262058258, 0.29225388169288635, 0.1804284304380417, -0.16504696011543274, 0.03734781965613365, -0.008327873423695564, 0.21995870769023895, -0.19099712371826172, -0.10635045170783997, 0.08153973519802094, -0.3683243691921234, 0.5237661004066467, 0.2289031445980072, -0.017118360847234726, 0.0542953759431839, 0.10540556907653809, -0.22765931487083435, -0.30767151713371277, 0.2863863408565521, -0.1566096544265747, -0.00744238868355751, 0.13802757859230042, 0.062121763825416565, 0.012379944324493408, 0.2542601525783539, -0.15054337680339813, -0.207289457321167, -0.20371001958847046, 0.1626507043838501, -0.10137002170085907, 0.17009547352790833, 0.3873385787010193, 0.024755289778113365, 0.2557815611362457, -0.19022253155708313, 0.024442486464977264, -0.17892080545425415, -0.49436861276626587, -0.1688336580991745, 0.3723071217536926, 0.008581370115280151, -0.09290459752082825, 0.04559306055307388, -0.2997229993343353, -0.09407831728458405, 0.3640095591545105, 0.10164622962474823, -0.06267397105693817, -0.010548949241638184, -0.46043023467063904, 0.08122391998767853, -0.19129829108715057, -0.34107160568237305, -0.3286507725715637, 0.4735722541809082, -0.16206349432468414, 0.33762526512145996, 0.014702219516038895, -0.009244311600923538, -0.2239345908164978, -0.3591806888580322, 0.4350608289241791, 0.1735306680202484, -0.005890093743801117, -0.13615462183952332, -0.48548388481140137, -0.42373406887054443, 0.30718955397605896, 0.3330910801887512, 0.16834352910518646, -0.19748377799987793, 0.15436862409114838, 0.5204557776451111, 0.1619524210691452, 0.09422576427459717, 0.08241430670022964, 0.19880886375904083, -0.2457229346036911, -0.2646988332271576, -0.07643353193998337, 0.04763972759246826, -0.159610778093338, 0.27006345987319946, -0.2809077501296997, 0.15925711393356323, -0.06307756900787354, 0.11645014584064484, -0.2511121332645416, 0.18181149661540985, -0.09474299103021622, -0.24722586572170258, 0.1807105541229248, 0.068353071808815, -0.238028421998024, -0.08220198005437851, 0.16630300879478455, 0.41525503993034363, 0.06355118751525879, -0.08599554002285004, -0.10765884816646576, 0.014787733554840088, -0.321842223405838, -0.10912778973579407, 0.10928073525428772, 0.21685802936553955, 0.22975505888462067, 0.01342897117137909, -0.17475169897079468, 0.2825953960418701, 0.15150746703147888, -0.21642985939979553, -0.021720705553889275, -0.12831291556358337, 0.3187291920185089, -0.39264848828315735, 0.288178414106369, 0.44944947957992554, 0.06076616048812866, -0.0235942080616951, 0.28204017877578735, 0.20420987904071808, -0.20786574482917786, -0.05499615892767906, -0.01196182519197464, -0.022288408130407333, 0.151835098862648, -0.1312483549118042, -0.20130060613155365, -0.01967894285917282, 0.5470786690711975, 0.25905540585517883, -0.07472947239875793, 0.16692425310611725, -0.10432550311088562, -0.196726456284523, 0.18989111483097076, 0.01880880445241928, -0.030384350568056107, 0.08124971389770508, -0.22530227899551392, -0.1673487275838852, 0.3019475042819977, -0.45507991313934326, 0.5055996179580688, 0.006160486489534378, -0.18173623085021973, 0.20135435461997986, -0.2803894877433777, -0.1344647854566574, 0.23612678050994873, 0.027283694595098495, 0.178297221660614, 0.29030248522758484, 0.0807177945971489, 0.13685722649097443, -0.4051700234413147, -0.23393799364566803, -0.057251375168561935, 0.0660996288061142, -0.24410855770111084, -0.2356611043214798, -0.09920856356620789, -0.0017762035131454468, 0.12367680668830872, -0.40121573209762573, -0.19181297719478607, 0.03832150250673294, -0.014187402091920376, 0.09390953183174133, 0.1081240251660347, 0.007353074848651886, -0.2872256934642792, 0.05018918216228485, 0.22673755884170532, -0.07015611231327057, -0.01220114529132843, 0.11828866600990295, -0.3647076487541199, 0.04469211399555206, 0.16809426248073578, -0.100003182888031, 0.13867183029651642, 0.038295455276966095, -0.02841029316186905, -0.12430659681558609, -0.3358612358570099, -0.04494134336709976, -0.1844097524881363, 0.6750739216804504, 0.08657550066709518, 0.04472779855132103, -0.2883935570716858, -0.39848941564559937, 0.20048806071281433, 0.2731602191925049, -0.1155705451965332, 0.14095890522003174, 0.0858573466539383, 0.07656129449605942, -0.1789214164018631, -0.04475950077176094, -0.07274315506219864, -0.3597075641155243, 0.019414080306887627, -0.03579618036746979, -0.11587245017290115, 0.1316884458065033, -0.18240633606910706, 0.17288462817668915, 0.5054888129234314, 0.025286361575126648, -0.29015761613845825, -0.3475993275642395, 0.19051845371723175, -0.06264878064393997, -0.2594669461250305, -0.05778348818421364, -0.0026706233620643616, 0.09334960579872131, 0.26976755261421204, -0.4231244921684265, -0.04174542427062988, -0.014795716851949692, 0.14797645807266235, -0.1738225519657135, -0.3538973927497864, 0.2849051356315613, 0.23400776088237762, -0.0313727930188179, -0.09749632328748703, -0.20753681659698486, -0.0776468962430954, -0.008409073576331139, 0.4140308201313019, 0.002065042033791542, 0.20911933481693268, -0.01781616359949112, 0.04531513899564743, 0.15128320455551147, 0.2853340804576874, 0.7059417963027954, 0.1523822695016861, 0.19112496078014374, 0.12037982046604156, -0.2509269714355469, 0.1740172952413559, -0.20073151588439941, -0.014154016971588135, 0.33949869871139526, -0.0642065703868866, -0.007028425112366676, -0.21440958976745605, -0.08470280468463898, -0.2189548909664154, -0.06267168372869492, 0.013782965019345284, -0.19845131039619446, 0.3452240228652954, -0.20986773073673248, -0.08896040916442871, 0.3688356876373291, -0.026597343385219574, 0.21737045049667358, 0.17576979100704193, -0.1267348676919937, -0.15520653128623962, -0.19829711318016052, -0.21983878314495087, -0.4107120931148529, 0.2797970771789551, 0.13473980128765106, 0.6053627133369446, 0.02426201105117798, -0.04728041589260101, -0.009519565850496292, -0.3188267648220062, 0.448923796415329, -0.11870797723531723, 0.11287619173526764, 0.12380699068307877, -0.012165293097496033, -0.5684409737586975, -0.2969525456428528, -0.06092211231589317, 0.27076759934425354, 0.049192193895578384, 0.4614700376987457, -0.14270073175430298, 0.23899874091148376, 0.3159010410308838, 0.13029666244983673, -0.09473735094070435, -0.0824500247836113, -0.4103213846683502, -0.6870729327201843, -0.1309131383895874, 0.03884845972061157, -0.09975164383649826, 0.40277111530303955, -0.15969079732894897, -0.09481701999902725, -0.08056054264307022, 0.196975976228714, -0.06398142874240875, -0.06338807195425034, 0.07399328052997589, 0.08682696521282196, 0.25314515829086304, -0.09419186413288116, 0.20273977518081665, -0.05720118433237076, 0.3164207339286804, 0.13974973559379578, -0.2589554190635681, 0.04596622660756111, 0.08078410476446152, 0.0869215577840805, 0.2498500645160675, -0.2218504250049591, -0.20216238498687744, 0.04290468245744705, 0.07412976026535034, -0.0531863197684288, 0.25452935695648193, 0.8272790312767029, -0.2701970338821411, -0.31771355867385864, -0.05536408722400665, 0.30194783210754395, -0.03579077124595642, -0.03104501962661743, -0.13614779710769653, -0.4344771206378937, -0.1977805644273758, 0.4961393475532532, 0.22306156158447266, 0.9382808804512024, 0.06029827147722244, 0.0774741917848587, 0.3687116205692291, 0.06222066283226013, 0.2613429129123688, -0.4363674521446228, 0.11314022541046143, -0.03354666382074356, -0.45140716433525085, 0.1331954151391983, 0.1160290315747261, 0.11247856914997101, -0.1272440254688263, -0.32011231780052185, -0.004287682473659515, 0.1710307002067566, -0.1982189565896988, 0.2020295262336731, -0.11692731827497482, -0.03284728527069092, -0.1594517081975937, -0.3088780343532562, 0.10638856887817383, 0.018059521913528442, 0.276340514421463, -0.32945716381073, 0.07050203531980515, 0.08831049501895905, -0.27142345905303955, -0.33382636308670044, 0.355763703584671, -0.25562891364097595, 0.29201802611351013, -0.6306741833686829, 0.1571142077445984, -0.11657170206308365, 0.2191525101661682, 0.3410786986351013, 0.3689155578613281, -0.1685710996389389, 0.15864090621471405, 0.2990371286869049, -0.11008051037788391, 0.2379530966281891, -0.1769976019859314, -0.06213133782148361, -0.29552575945854187, -0.18054398894309998, -0.0060715451836586, -0.2974325120449066, 0.08405214548110962, -0.01868249475955963, 0.0911024808883667, -0.010001983493566513, 0.005315843969583511, -0.06519833952188492, -0.004380442202091217, 0.3272295594215393, -0.2107689082622528, 0.13338246941566467, 0.007430734112858772, -0.12894421815872192, 0.29528313875198364, -0.3113310933113098, -0.3914300799369812, -0.05662068724632263, 0.41349512338638306, -0.019437206909060478, 0.23648576438426971, 0.3887905776500702, 0.008746758103370667, 0.12820622324943542, -0.06725107133388519, -0.05177856981754303, -0.3094167411327362, -0.17839154601097107, 0.062260549515485764, 0.40574753284454346, -0.02126385271549225, -0.04132108390331268, 0.6821677684783936, 0.5023373961448669, -0.058049872517585754, 0.28422582149505615, -0.5085424780845642, -0.05366135761141777, 0.4121686816215515, 0.0390261635184288, 0.2352134883403778, 0.11354944109916687, 0.15442973375320435, 0.11105258017778397, -0.019074246287345886, -0.24681395292282104, 0.021809838712215424, -0.15369150042533875, 0.10439183562994003, -0.08066317439079285, 0.07095601409673691, 0.3835841119289398, 0.3150915503501892, 0.18962092697620392, 0.15939106047153473, 0.012682933360338211, -0.13242056965827942, -0.20616912841796875, 0.15075938403606415, 0.12781067192554474, -0.25666356086730957, 0.12671631574630737, -0.2540706396102905, 0.08229237794876099, -0.033576108515262604, -0.026674501597881317, 0.1379125565290451, 0.06972019374370575, -0.1087537556886673, 0.0820675864815712, 0.12426106631755829, -0.04286167398095131, 0.3303706645965576, -0.038571711629629135, 0.3692839443683624, 0.2307862937450409, 0.21942727267742157, 0.019109666347503662, -0.11759502440690994, 0.6458373069763184, -0.23686105012893677, -0.04535812512040138, 0.12787401676177979, 0.032567836344242096, -0.17061135172843933, -0.05049687251448631, -0.0771619901061058, 0.1825573593378067, 0.5723704099655151, -0.20992940664291382, -0.14079716801643372, 0.15141130983829498, 0.19430458545684814, -0.3506431579589844, 0.001389574259519577, 0.025029174983501434, -0.4540189802646637, -0.2719038128852844, 0.06966209411621094, 0.12043819576501846, -0.022400781512260437, 0.07968554645776749, -0.12065988034009933, 0.20218223333358765, 0.07756519317626953, -0.10862574726343155, 0.3175908029079437, -0.13611377775669098, 0.20454442501068115, 0.04626310616731644, -0.31492555141448975, 0.3764507472515106, 0.27159687876701355, 0.14238998293876648, -0.16443441808223724, 0.11133396625518799, 0.5707095265388489, -0.16142696142196655, -0.40532755851745605, -0.05051621049642563, 0.46048247814178467, 0.05210746452212334, -0.004168739542365074, -0.012508679181337357, 0.4650457203388214, -0.15834173560142517, -0.09814224392175674, -0.4000210762023926, 0.4083459973335266, -0.11230164766311646, -0.2506639063358307, 0.2040327489376068, -0.02231936901807785, -0.32103776931762695, 0.19936402142047882, -0.00882052443921566, 0.29694271087646484, -0.14145712554454803, 0.3003465533256531, -0.3492371439933777, -0.21379932761192322, -0.24988849461078644, 0.3892726004123688, -0.24792169034481049, -0.32057785987854004, 0.3538099527359009, 0.27754467725753784, -0.14086148142814636, -0.12944498658180237, 0.2748635709285736, 0.25379252433776855, 0.2880344092845917, -0.41317591071128845, -0.1593962013721466, 0.2540505528450012, 0.20088694989681244, -0.2363053858280182, 0.18968825042247772, 0.5250466465950012, 0.4651617109775543, 0.2597644329071045, 0.11641888320446014, -0.22300225496292114, 0.3714629113674164, -0.11951026320457458, -0.27463284134864807, -0.03436882793903351, 0.11163032054901123, 0.027249280363321304, 0.00695076584815979, -0.056083325296640396, -0.0717354342341423, -0.4134303331375122, 0.15678025782108307, -0.02207016944885254, -0.05299655720591545, 0.04291275516152382, 0.0046897344291210175, 0.07002297043800354, 0.03816068917512894, 0.3015451729297638, 0.41265061497688293, 0.2961583733558655, -0.2778334319591522, -0.6142833828926086, -0.6091967225074768, 0.2115803062915802, -0.03502151370048523, 0.13998740911483765, 0.06432508677244186, -0.13561609387397766, -0.01946709305047989, 0.09293435513973236, -0.1585393100976944, -0.31178024411201477, 0.24147778749465942, 0.07942560315132141, -0.25890934467315674, 0.24800258874893188, 0.49548229575157166, 0.05829465389251709, -0.1315205991268158, -0.44927698373794556, 0.15586960315704346, 0.024809058755636215, 0.07500583678483963, -0.15926538407802582, -0.3705044984817505, 0.009272933006286621, -0.4618379771709442, 0.8872693777084351, 0.09777678549289703, 0.16252031922340393, -0.1749747395515442, -0.2255955934524536, -0.28747281432151794, -0.1163487508893013, 0.013107512146234512, 0.012100364081561565, 0.19317790865898132, 0.27464964985847473, -0.039410561323165894, 0.4162313938140869, -0.3012009263038635, 0.21877926588058472, 0.022692345082759857, -0.10466013848781586, -0.286821186542511, -0.0448182076215744, -0.15804523229599, -0.10041859745979309, -0.30558478832244873, 0.3113054037094116, -0.004228940233588219, 0.2383640557527542, -0.32406750321388245, -0.3864262104034424, 0.3152199387550354, -0.2463461458683014, -0.08036601543426514, 0.21592849493026733, 0.30123549699783325, -0.3446621596813202, -0.11868617683649063, 0.2786519527435303, 0.07851848006248474, 0.2899197041988373, 0.3873496651649475, -0.3197360038757324, 0.225765660405159, -0.04170374572277069, -0.18798667192459106, -0.0010478943586349487, 0.2349923849105835, 0.042468469589948654, -0.2748902440071106, 0.2756919860839844, -0.139544278383255 ]
https://github.com/huggingface/datasets/issues/6475
Hmm, I have a feeling this works fine on Linux, and is a real bug for however `datasets` is doing the sharding on Windows. I will follow up, but I think this is a real bug.
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed
### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0
36
laion2B-en failed to load on Windows with PrefetchVirtualMemory failed ### Describe the bug I have downloaded laion2B-en, and I'm receiving the following error trying to load it: ``` Resolving data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 128/128 [00:00<00:00, 1173.79it/s] Traceback (most recent call last): File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 31, in <module> count = compute_frequencies() ^^^^^^^^^^^^^^^^^^^^^ File "D:\Art-Workspace\src\artworkspace\tokeneval\compute_frequencies.py", line 17, in compute_frequencies laion2b_dataset = load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\load.py", line 2165, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1187, in as_dataset datasets = map_nested( ^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\utils\py_utils.py", line 456, in map_nested return function(data_struct) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1217, in _build_single_dataset ds = self._as_dataset( ^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\builder.py", line 1291, in _as_dataset dataset_kwargs = ArrowReader(cache_dir, self.info).read( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 244, in read return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 265, in read_files pa_table = self._read_files(files, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 200, in _read_files pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 336, in _get_table_from_filename table = ArrowReader.read_table(filename, in_memory=in_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\arrow_reader.py", line 357, in read_table return table_cls.from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 1059, in from_file table = _memory_mapped_arrow_table_from_file(filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bberman\Documents\Art-Workspace\venv\Lib\site-packages\datasets\table.py", line 66, in _memory_mapped_arrow_table_from_file pa_table = opened_stream.read_all() ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow\ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status OSError: [WinError 8] PrefetchVirtualMemory failed. Detail: [Windows error 8] Not enough memory resources are available to process this command. ``` This error is probably a red herring: https://stackoverflow.com/questions/50263929/numpy-memmap-returns-not-enough-memory-while-there-are-plenty-available In other words, the issue is related to asking for a memory mapping of length N > M the length of the file on Windows. This gracefully succeeds on Linux. I have 1024 arrow files in my cache instead of 128 like in the repository for it. Probably related. I don't know why `datasets` reorganized/rewrote the dataset in my cache to be 1024 slices instead of the original 128. ### Steps to reproduce the bug ``` # as a huggingface developer, you may already have laion2B-en somewhere _CACHE_DIR = "." from datasets import load_dataset load_dataset("laion/laion2B-en", split="train", cache_dir=_CACHE_DIR, keep_in_memory=False) ``` ### Expected behavior This should correctly load as a memory mapped Arrow dataset. ### Environment info - `datasets` version: 2.15.0 - Platform: Windows-10-10.0.20348-SP0 (this is windows 2022) - Python version: 3.11.4 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.1.2 - `fsspec` version: 2023.10.0 Hmm, I have a feeling this works fine on Linux, and is a real bug for however `datasets` is doing the sharding on Windows. I will follow up, but I think this is a real bug.
[ -0.10396334528923035, -0.16585659980773926, -0.06416866183280945, 0.3617136478424072, 0.04591068997979164, -0.18339619040489197, -0.012238699942827225, 0.26278233528137207, -0.2864779233932495, -0.08145007491111755, -0.024002086371183395, 0.08407759666442871, -0.14902670681476593, 0.1495061218738556, -0.03063797950744629, -0.03984774276614189, 0.07719110697507858, 0.12992192804813385, 0.29345935583114624, 0.16215340793132782, -0.4650859832763672, 0.35488012433052063, -0.25587624311447144, 0.10274036228656769, -0.06378617137670517, 0.12237735092639923, -0.31961995363235474, 0.509280800819397, -0.2872696816921234, -0.3582841157913208, 0.479002982378006, -0.3087034821510315, 0.36739763617515564, 0.13761241734027863, -0.0001152386685134843, 0.054856084287166595, 0.46044379472732544, -0.05314774811267853, 0.16732196509838104, 0.09588611871004105, 0.09431611746549606, -0.36221766471862793, -0.14888012409210205, -0.3601916432380676, 0.04446469247341156, -0.19450746476650238, -0.11527694761753082, -0.4744316339492798, 0.34332266449928284, 0.3433285355567932, 0.17225058376789093, 0.23018302023410797, 0.3630772829055786, 0.2201823741197586, 0.6044427752494812, -0.45173218846321106, -0.11601148545742035, 0.18802687525749207, 0.09052100777626038, -0.1964600384235382, 0.12938784062862396, 0.09616892784833908, -0.16839498281478882, -0.07067332416772842, -0.1556248515844345, -0.09009994566440582, 0.1444256603717804, -0.37170395255088806, -0.04261759668588638, 0.06775302439928055, -0.035245925188064575, -0.05534273386001587, -0.16399887204170227, 0.26411688327789307, 0.03080553561449051, -0.5285080075263977, 0.20865195989608765, 0.35857415199279785, -0.08476726710796356, -0.05767493322491646, -0.04259493574500084, 0.09457957744598389, -0.0017685070633888245, 0.10504267364740372, -0.1206967830657959, 0.1921912133693695, -0.08201159536838531, 0.1812332272529602, 0.040269285440444946, 0.0039028096944093704, 0.2101050466299057, 0.22022733092308044, -0.32798105478286743, 0.10570281744003296, -0.47656095027923584, 0.04070357233285904, -0.08174433559179306, 0.28546836972236633, -0.04491708427667618, -0.050283282995224, -0.08063004910945892, -0.08655799925327301, -0.14981740713119507, -0.11620886623859406, -0.05401574447751045, 0.420005738735199, 0.004707643762230873, -0.3847629129886627, 0.24009831249713898, 0.18792785704135895, 0.1674758791923523, 0.05413538217544556, -0.39239561557769775, -0.46420836448669434, -0.04803851619362831, -0.040218815207481384, 0.3278602063655853, -0.37214088439941406, -0.5733497142791748, 0.1414315402507782, -0.5692530274391174, 0.20278514921665192, 0.06204221397638321, 0.27933719754219055, -0.3403257727622986, -0.13716687262058258, 0.29225388169288635, 0.1804284304380417, -0.16504696011543274, 0.03734781965613365, -0.008327873423695564, 0.21995870769023895, -0.19099712371826172, -0.10635045170783997, 0.08153973519802094, -0.3683243691921234, 0.5237661004066467, 0.2289031445980072, -0.017118360847234726, 0.0542953759431839, 0.10540556907653809, -0.22765931487083435, -0.30767151713371277, 0.2863863408565521, -0.1566096544265747, -0.00744238868355751, 0.13802757859230042, 0.062121763825416565, 0.012379944324493408, 0.2542601525783539, -0.15054337680339813, -0.207289457321167, -0.20371001958847046, 0.1626507043838501, -0.10137002170085907, 0.17009547352790833, 0.3873385787010193, 0.024755289778113365, 0.2557815611362457, -0.19022253155708313, 0.024442486464977264, -0.17892080545425415, -0.49436861276626587, -0.1688336580991745, 0.3723071217536926, 0.008581370115280151, -0.09290459752082825, 0.04559306055307388, -0.2997229993343353, -0.09407831728458405, 0.3640095591545105, 0.10164622962474823, -0.06267397105693817, -0.010548949241638184, -0.46043023467063904, 0.08122391998767853, -0.19129829108715057, -0.34107160568237305, -0.3286507725715637, 0.4735722541809082, -0.16206349432468414, 0.33762526512145996, 0.014702219516038895, -0.009244311600923538, -0.2239345908164978, -0.3591806888580322, 0.4350608289241791, 0.1735306680202484, -0.005890093743801117, -0.13615462183952332, -0.48548388481140137, -0.42373406887054443, 0.30718955397605896, 0.3330910801887512, 0.16834352910518646, -0.19748377799987793, 0.15436862409114838, 0.5204557776451111, 0.1619524210691452, 0.09422576427459717, 0.08241430670022964, 0.19880886375904083, -0.2457229346036911, -0.2646988332271576, -0.07643353193998337, 0.04763972759246826, -0.159610778093338, 0.27006345987319946, -0.2809077501296997, 0.15925711393356323, -0.06307756900787354, 0.11645014584064484, -0.2511121332645416, 0.18181149661540985, -0.09474299103021622, -0.24722586572170258, 0.1807105541229248, 0.068353071808815, -0.238028421998024, -0.08220198005437851, 0.16630300879478455, 0.41525503993034363, 0.06355118751525879, -0.08599554002285004, -0.10765884816646576, 0.014787733554840088, -0.321842223405838, -0.10912778973579407, 0.10928073525428772, 0.21685802936553955, 0.22975505888462067, 0.01342897117137909, -0.17475169897079468, 0.2825953960418701, 0.15150746703147888, -0.21642985939979553, -0.021720705553889275, -0.12831291556358337, 0.3187291920185089, -0.39264848828315735, 0.288178414106369, 0.44944947957992554, 0.06076616048812866, -0.0235942080616951, 0.28204017877578735, 0.20420987904071808, -0.20786574482917786, -0.05499615892767906, -0.01196182519197464, -0.022288408130407333, 0.151835098862648, -0.1312483549118042, -0.20130060613155365, -0.01967894285917282, 0.5470786690711975, 0.25905540585517883, -0.07472947239875793, 0.16692425310611725, -0.10432550311088562, -0.196726456284523, 0.18989111483097076, 0.01880880445241928, -0.030384350568056107, 0.08124971389770508, -0.22530227899551392, -0.1673487275838852, 0.3019475042819977, -0.45507991313934326, 0.5055996179580688, 0.006160486489534378, -0.18173623085021973, 0.20135435461997986, -0.2803894877433777, -0.1344647854566574, 0.23612678050994873, 0.027283694595098495, 0.178297221660614, 0.29030248522758484, 0.0807177945971489, 0.13685722649097443, -0.4051700234413147, -0.23393799364566803, -0.057251375168561935, 0.0660996288061142, -0.24410855770111084, -0.2356611043214798, -0.09920856356620789, -0.0017762035131454468, 0.12367680668830872, -0.40121573209762573, -0.19181297719478607, 0.03832150250673294, -0.014187402091920376, 0.09390953183174133, 0.1081240251660347, 0.007353074848651886, -0.2872256934642792, 0.05018918216228485, 0.22673755884170532, -0.07015611231327057, -0.01220114529132843, 0.11828866600990295, -0.3647076487541199, 0.04469211399555206, 0.16809426248073578, -0.100003182888031, 0.13867183029651642, 0.038295455276966095, -0.02841029316186905, -0.12430659681558609, -0.3358612358570099, -0.04494134336709976, -0.1844097524881363, 0.6750739216804504, 0.08657550066709518, 0.04472779855132103, -0.2883935570716858, -0.39848941564559937, 0.20048806071281433, 0.2731602191925049, -0.1155705451965332, 0.14095890522003174, 0.0858573466539383, 0.07656129449605942, -0.1789214164018631, -0.04475950077176094, -0.07274315506219864, -0.3597075641155243, 0.019414080306887627, -0.03579618036746979, -0.11587245017290115, 0.1316884458065033, -0.18240633606910706, 0.17288462817668915, 0.5054888129234314, 0.025286361575126648, -0.29015761613845825, -0.3475993275642395, 0.19051845371723175, -0.06264878064393997, -0.2594669461250305, -0.05778348818421364, -0.0026706233620643616, 0.09334960579872131, 0.26976755261421204, -0.4231244921684265, -0.04174542427062988, -0.014795716851949692, 0.14797645807266235, -0.1738225519657135, -0.3538973927497864, 0.2849051356315613, 0.23400776088237762, -0.0313727930188179, -0.09749632328748703, -0.20753681659698486, -0.0776468962430954, -0.008409073576331139, 0.4140308201313019, 0.002065042033791542, 0.20911933481693268, -0.01781616359949112, 0.04531513899564743, 0.15128320455551147, 0.2853340804576874, 0.7059417963027954, 0.1523822695016861, 0.19112496078014374, 0.12037982046604156, -0.2509269714355469, 0.1740172952413559, -0.20073151588439941, -0.014154016971588135, 0.33949869871139526, -0.0642065703868866, -0.007028425112366676, -0.21440958976745605, -0.08470280468463898, -0.2189548909664154, -0.06267168372869492, 0.013782965019345284, -0.19845131039619446, 0.3452240228652954, -0.20986773073673248, -0.08896040916442871, 0.3688356876373291, -0.026597343385219574, 0.21737045049667358, 0.17576979100704193, -0.1267348676919937, -0.15520653128623962, -0.19829711318016052, -0.21983878314495087, -0.4107120931148529, 0.2797970771789551, 0.13473980128765106, 0.6053627133369446, 0.02426201105117798, -0.04728041589260101, -0.009519565850496292, -0.3188267648220062, 0.448923796415329, -0.11870797723531723, 0.11287619173526764, 0.12380699068307877, -0.012165293097496033, -0.5684409737586975, -0.2969525456428528, -0.06092211231589317, 0.27076759934425354, 0.049192193895578384, 0.4614700376987457, -0.14270073175430298, 0.23899874091148376, 0.3159010410308838, 0.13029666244983673, -0.09473735094070435, -0.0824500247836113, -0.4103213846683502, -0.6870729327201843, -0.1309131383895874, 0.03884845972061157, -0.09975164383649826, 0.40277111530303955, -0.15969079732894897, -0.09481701999902725, -0.08056054264307022, 0.196975976228714, -0.06398142874240875, -0.06338807195425034, 0.07399328052997589, 0.08682696521282196, 0.25314515829086304, -0.09419186413288116, 0.20273977518081665, -0.05720118433237076, 0.3164207339286804, 0.13974973559379578, -0.2589554190635681, 0.04596622660756111, 0.08078410476446152, 0.0869215577840805, 0.2498500645160675, -0.2218504250049591, -0.20216238498687744, 0.04290468245744705, 0.07412976026535034, -0.0531863197684288, 0.25452935695648193, 0.8272790312767029, -0.2701970338821411, -0.31771355867385864, -0.05536408722400665, 0.30194783210754395, -0.03579077124595642, -0.03104501962661743, -0.13614779710769653, -0.4344771206378937, -0.1977805644273758, 0.4961393475532532, 0.22306156158447266, 0.9382808804512024, 0.06029827147722244, 0.0774741917848587, 0.3687116205692291, 0.06222066283226013, 0.2613429129123688, -0.4363674521446228, 0.11314022541046143, -0.03354666382074356, -0.45140716433525085, 0.1331954151391983, 0.1160290315747261, 0.11247856914997101, -0.1272440254688263, -0.32011231780052185, -0.004287682473659515, 0.1710307002067566, -0.1982189565896988, 0.2020295262336731, -0.11692731827497482, -0.03284728527069092, -0.1594517081975937, -0.3088780343532562, 0.10638856887817383, 0.018059521913528442, 0.276340514421463, -0.32945716381073, 0.07050203531980515, 0.08831049501895905, -0.27142345905303955, -0.33382636308670044, 0.355763703584671, -0.25562891364097595, 0.29201802611351013, -0.6306741833686829, 0.1571142077445984, -0.11657170206308365, 0.2191525101661682, 0.3410786986351013, 0.3689155578613281, -0.1685710996389389, 0.15864090621471405, 0.2990371286869049, -0.11008051037788391, 0.2379530966281891, -0.1769976019859314, -0.06213133782148361, -0.29552575945854187, -0.18054398894309998, -0.0060715451836586, -0.2974325120449066, 0.08405214548110962, -0.01868249475955963, 0.0911024808883667, -0.010001983493566513, 0.005315843969583511, -0.06519833952188492, -0.004380442202091217, 0.3272295594215393, -0.2107689082622528, 0.13338246941566467, 0.007430734112858772, -0.12894421815872192, 0.29528313875198364, -0.3113310933113098, -0.3914300799369812, -0.05662068724632263, 0.41349512338638306, -0.019437206909060478, 0.23648576438426971, 0.3887905776500702, 0.008746758103370667, 0.12820622324943542, -0.06725107133388519, -0.05177856981754303, -0.3094167411327362, -0.17839154601097107, 0.062260549515485764, 0.40574753284454346, -0.02126385271549225, -0.04132108390331268, 0.6821677684783936, 0.5023373961448669, -0.058049872517585754, 0.28422582149505615, -0.5085424780845642, -0.05366135761141777, 0.4121686816215515, 0.0390261635184288, 0.2352134883403778, 0.11354944109916687, 0.15442973375320435, 0.11105258017778397, -0.019074246287345886, -0.24681395292282104, 0.021809838712215424, -0.15369150042533875, 0.10439183562994003, -0.08066317439079285, 0.07095601409673691, 0.3835841119289398, 0.3150915503501892, 0.18962092697620392, 0.15939106047153473, 0.012682933360338211, -0.13242056965827942, -0.20616912841796875, 0.15075938403606415, 0.12781067192554474, -0.25666356086730957, 0.12671631574630737, -0.2540706396102905, 0.08229237794876099, -0.033576108515262604, -0.026674501597881317, 0.1379125565290451, 0.06972019374370575, -0.1087537556886673, 0.0820675864815712, 0.12426106631755829, -0.04286167398095131, 0.3303706645965576, -0.038571711629629135, 0.3692839443683624, 0.2307862937450409, 0.21942727267742157, 0.019109666347503662, -0.11759502440690994, 0.6458373069763184, -0.23686105012893677, -0.04535812512040138, 0.12787401676177979, 0.032567836344242096, -0.17061135172843933, -0.05049687251448631, -0.0771619901061058, 0.1825573593378067, 0.5723704099655151, -0.20992940664291382, -0.14079716801643372, 0.15141130983829498, 0.19430458545684814, -0.3506431579589844, 0.001389574259519577, 0.025029174983501434, -0.4540189802646637, -0.2719038128852844, 0.06966209411621094, 0.12043819576501846, -0.022400781512260437, 0.07968554645776749, -0.12065988034009933, 0.20218223333358765, 0.07756519317626953, -0.10862574726343155, 0.3175908029079437, -0.13611377775669098, 0.20454442501068115, 0.04626310616731644, -0.31492555141448975, 0.3764507472515106, 0.27159687876701355, 0.14238998293876648, -0.16443441808223724, 0.11133396625518799, 0.5707095265388489, -0.16142696142196655, -0.40532755851745605, -0.05051621049642563, 0.46048247814178467, 0.05210746452212334, -0.004168739542365074, -0.012508679181337357, 0.4650457203388214, -0.15834173560142517, -0.09814224392175674, -0.4000210762023926, 0.4083459973335266, -0.11230164766311646, -0.2506639063358307, 0.2040327489376068, -0.02231936901807785, -0.32103776931762695, 0.19936402142047882, -0.00882052443921566, 0.29694271087646484, -0.14145712554454803, 0.3003465533256531, -0.3492371439933777, -0.21379932761192322, -0.24988849461078644, 0.3892726004123688, -0.24792169034481049, -0.32057785987854004, 0.3538099527359009, 0.27754467725753784, -0.14086148142814636, -0.12944498658180237, 0.2748635709285736, 0.25379252433776855, 0.2880344092845917, -0.41317591071128845, -0.1593962013721466, 0.2540505528450012, 0.20088694989681244, -0.2363053858280182, 0.18968825042247772, 0.5250466465950012, 0.4651617109775543, 0.2597644329071045, 0.11641888320446014, -0.22300225496292114, 0.3714629113674164, -0.11951026320457458, -0.27463284134864807, -0.03436882793903351, 0.11163032054901123, 0.027249280363321304, 0.00695076584815979, -0.056083325296640396, -0.0717354342341423, -0.4134303331375122, 0.15678025782108307, -0.02207016944885254, -0.05299655720591545, 0.04291275516152382, 0.0046897344291210175, 0.07002297043800354, 0.03816068917512894, 0.3015451729297638, 0.41265061497688293, 0.2961583733558655, -0.2778334319591522, -0.6142833828926086, -0.6091967225074768, 0.2115803062915802, -0.03502151370048523, 0.13998740911483765, 0.06432508677244186, -0.13561609387397766, -0.01946709305047989, 0.09293435513973236, -0.1585393100976944, -0.31178024411201477, 0.24147778749465942, 0.07942560315132141, -0.25890934467315674, 0.24800258874893188, 0.49548229575157166, 0.05829465389251709, -0.1315205991268158, -0.44927698373794556, 0.15586960315704346, 0.024809058755636215, 0.07500583678483963, -0.15926538407802582, -0.3705044984817505, 0.009272933006286621, -0.4618379771709442, 0.8872693777084351, 0.09777678549289703, 0.16252031922340393, -0.1749747395515442, -0.2255955934524536, -0.28747281432151794, -0.1163487508893013, 0.013107512146234512, 0.012100364081561565, 0.19317790865898132, 0.27464964985847473, -0.039410561323165894, 0.4162313938140869, -0.3012009263038635, 0.21877926588058472, 0.022692345082759857, -0.10466013848781586, -0.286821186542511, -0.0448182076215744, -0.15804523229599, -0.10041859745979309, -0.30558478832244873, 0.3113054037094116, -0.004228940233588219, 0.2383640557527542, -0.32406750321388245, -0.3864262104034424, 0.3152199387550354, -0.2463461458683014, -0.08036601543426514, 0.21592849493026733, 0.30123549699783325, -0.3446621596813202, -0.11868617683649063, 0.2786519527435303, 0.07851848006248474, 0.2899197041988373, 0.3873496651649475, -0.3197360038757324, 0.225765660405159, -0.04170374572277069, -0.18798667192459106, -0.0010478943586349487, 0.2349923849105835, 0.042468469589948654, -0.2748902440071106, 0.2756919860839844, -0.139544278383255 ]
https://github.com/huggingface/datasets/issues/6467
We will publish it soon (we usually do it in intervals of 1-2 months, so probably next week)
New version release request
### Feature request Hi! I am using `datasets` in library `xtuner` and am highly interested in the features introduced since v2.15.0. To avoid installation from source in our pypi wheels, we are eagerly waiting for the new release. So, Does your team have a new release plan for v2.15.1 and could you please share it with us? Thanks very much! ### Motivation . ### Your contribution .
18
New version release request ### Feature request Hi! I am using `datasets` in library `xtuner` and am highly interested in the features introduced since v2.15.0. To avoid installation from source in our pypi wheels, we are eagerly waiting for the new release. So, Does your team have a new release plan for v2.15.1 and could you please share it with us? Thanks very much! ### Motivation . ### Your contribution . We will publish it soon (we usually do it in intervals of 1-2 months, so probably next week)
[ -0.44579827785491943, 0.29189836978912354, -0.0761459693312645, -0.06915633380413055, 0.025643251836299896, -0.18820524215698242, -0.005974992178380489, 0.2926267385482788, -0.3280101716518402, 0.20499148964881897, 0.21357974410057068, 0.24996279180049896, -0.37874549627304077, 0.436384916305542, -0.03912585228681564, -0.25819721817970276, 0.0851011797785759, 0.2111538201570511, -0.22152850031852722, -0.08256667852401733, -0.17844083905220032, -0.09560055285692215, -0.16696521639823914, 0.3061985373497009, -0.3760679066181183, -0.12692804634571075, -0.40083855390548706, -0.08959418535232544, -0.6505070328712463, -0.45635485649108887, 0.2715660631656647, 0.4392763674259186, 0.24544177949428558, 0.5390729904174805, -0.00011963614815613255, -0.35795387625694275, 0.2620924413204193, 0.11512693762779236, -0.24798211455345154, -0.17486867308616638, -0.1945578157901764, -0.39739108085632324, 0.01947130262851715, -0.004457384347915649, 0.16003954410552979, -0.1978565901517868, 0.08167321979999542, 0.3285483717918396, 0.007815074175596237, -0.04102272540330887, 0.1623380184173584, 0.3700423836708069, 0.0335029736161232, -0.17621414363384247, 0.3655869960784912, 0.20428210496902466, -0.3612191677093506, -0.1358206570148468, 0.715313196182251, -0.09215045720338821, -0.1509118676185608, 0.14007288217544556, -0.014419697225093842, -0.2698691189289093, 0.18357688188552856, 0.08932700753211975, -0.15563739836215973, -0.41015905141830444, -0.2040993869304657, 0.3486005663871765, 0.5031323432922363, -0.22141431272029877, -0.3666937053203583, -0.0018051639199256897, -0.14220431447029114, -0.23917660117149353, 0.08147728443145752, -0.11315492540597916, -0.10976029932498932, 0.039260804653167725, 0.13292546570301056, -0.5441613793373108, -0.2564878761768341, 0.1405799686908722, -0.10545901954174042, 0.890639066696167, 0.09388663619756699, -0.09011542052030563, 0.03052261844277382, -0.2211177945137024, 0.4701603055000305, 0.004135722294449806, -0.1698301136493683, 0.3237770199775696, -0.31877899169921875, -0.5342132449150085, 0.17866761982440948, -0.4106135964393616, 0.302133172750473, 0.10664723813533783, 0.10917472094297409, -0.21928337216377258, -0.4034176766872406, -0.1337834745645523, 0.5380094051361084, 0.20048542320728302, 0.21377773582935333, 0.19873422384262085, 0.18818604946136475, 0.17454585433006287, 0.23847343027591705, 0.13863199949264526, 0.013209588825702667, 0.054566994309425354, 0.01715150475502014, 0.049178291112184525, 0.28235602378845215, -0.32077014446258545, 0.3346613645553589, -0.043750785291194916, -0.027841098606586456, -0.5358143448829651, -0.04506845027208328, -0.18237550556659698, 0.05351917818188667, 0.4412137269973755, -0.3125317096710205, -0.024856483563780785, -0.1068180501461029, -0.23943595588207245, -0.2937408685684204, -0.15030798316001892, -0.07259025424718857, 0.12213652580976486, 0.05518998205661774, -0.3714238703250885, -0.08206023275852203, 0.05682854726910591, 0.28152382373809814, 0.08872741460800171, 0.2205616533756256, 0.11555340141057968, -0.1357516348361969, 0.19160807132720947, -0.2542266845703125, 0.15047650039196014, -0.13927587866783142, -0.12098730355501175, -0.16927845776081085, 0.6368445754051208, 0.07439197599887848, -0.5167415142059326, 0.030670465901494026, 0.14888791739940643, -0.42100977897644043, -0.2969110310077667, 0.0073388367891311646, 0.2448323369026184, -0.26664504408836365, 0.24743430316448212, 0.05768732726573944, 0.03893330320715904, -0.04204285144805908, -0.19001024961471558, -0.1999107003211975, 0.1621011197566986, -0.29741907119750977, -0.08674608916044235, 0.13078370690345764, -0.10761652886867523, -0.05314239487051964, 0.0785783976316452, -0.06877630949020386, -0.2705197036266327, 0.09546645730733871, 0.04054062068462372, 0.5097721815109253, -0.26402029395103455, -0.49334776401519775, 0.35712575912475586, -0.3614225387573242, -0.43323060870170593, 0.40348777174949646, 0.23729068040847778, 0.42942723631858826, -0.2278650403022766, -0.35771381855010986, 0.17816069722175598, -0.30430567264556885, -0.21521875262260437, -0.36564767360687256, -0.665205180644989, 0.09497206658124924, 0.17657046020030975, 0.3788166642189026, 0.011883800849318504, 0.039841100573539734, 0.1613951027393341, 0.4121594727039337, 0.051597725600004196, 0.16399036347866058, 0.0016750022768974304, 0.5821458697319031, -0.009913280606269836, 0.11073391139507294, -0.19007477164268494, -0.12651081383228302, 0.14353862404823303, -0.1978156417608261, 0.1186668872833252, 0.29789167642593384, -0.03497946262359619, -0.1440637856721878, 0.10123299807310104, -0.21518953144550323, -0.25542083382606506, -0.00306527316570282, -0.06475364416837692, -0.14784370362758636, 0.12877540290355682, -0.3563411831855774, -0.1639411300420761, -0.2698226571083069, 0.14286677539348602, -0.04095026105642319, 0.48936161398887634, -0.09975796937942505, -0.25171932578086853, -0.03639940917491913, 0.05116995424032211, -0.03939763084053993, -0.1066928505897522, -0.07594716548919678, 0.05445636808872223, -0.05354290455579758, -0.029678959399461746, 0.674903392791748, 0.4413183331489563, 0.3308626413345337, -0.1239718347787857, 0.5724030137062073, 0.0970134511590004, -0.11958085745573044, 0.06553544849157333, -0.053860925137996674, 0.35898709297180176, -0.3751414716243744, 0.029567936435341835, -0.08259066939353943, 0.20156076550483704, 0.2206290066242218, 0.1390637457370758, -0.14756934344768524, -0.1595093309879303, -0.01686820201575756, 0.13893021643161774, 0.02457883208990097, -0.0770353451371193, -0.17759381234645844, 0.24429571628570557, 0.5282201766967773, -0.008090078830718994, -0.05874811112880707, 0.15279775857925415, -0.021573498845100403, -0.020481735467910767, 0.093224436044693, 0.25900301337242126, 0.10754460096359253, 0.08717991411685944, -0.06036074459552765, -0.04545571655035019, 0.18269050121307373, -0.10685255378484726, 0.16624458134174347, 0.14951422810554504, -0.2929495871067047, -0.1043839305639267, -0.08241452276706696, 0.16322773694992065, 0.019813716411590576, -0.07176749408245087, 0.12167767435312271, 0.311489075422287, 0.091990627348423, -0.37339189648628235, -0.050498366355895996, -0.5401604175567627, -0.08333934843540192, -0.09821844100952148, -0.2880294620990753, -0.19645415246486664, 0.050812479108572006, 0.15449701249599457, 0.05181962251663208, 0.2952665090560913, 0.05396462231874466, 0.35172295570373535, -0.17614686489105225, 0.18953420221805573, -0.05974026769399643, -0.14752306044101715, -0.0853329747915268, 0.19839175045490265, -0.11384976655244827, -0.25711590051651, 0.2792021930217743, 0.019829317927360535, 0.38526052236557007, -0.49555206298828125, -0.6562048196792603, 0.15106728672981262, -0.23089055716991425, -0.027510514482855797, 0.20159542560577393, -0.1493580937385559, 0.14999271929264069, 0.0849674642086029, 0.2942785620689392, -0.15979576110839844, -0.24984899163246155, -0.03562544286251068, 0.03461993485689163, 0.19725124537944794, 0.02892431616783142, -0.2966117858886719, -0.21780677139759064, -0.13004633784294128, 0.13824373483657837, 0.20716528594493866, 0.14379027485847473, -0.02364971861243248, 0.1892819106578827, -0.1430964320898056, -0.009292781352996826, -0.4150225520133972, 0.05908047780394554, -0.35236671566963196, 0.16869787871837616, 0.006010472774505615, -0.24043969810009003, 0.10212098062038422, -0.04846450313925743, -0.053958360105752945, 0.0680486261844635, -0.6474261283874512, -0.31647789478302, -0.11661050468683243, 0.40222734212875366, 0.3582148849964142, 0.13870814442634583, 0.3926273584365845, 0.3897232115268707, -0.02539711818099022, 0.07384731620550156, -0.32825109362602234, -0.13392959535121918, 0.41767892241477966, 0.14523373544216156, 0.21814948320388794, 0.2952106297016144, 0.2659047245979309, 0.7640485167503357, 0.1451519876718521, 0.3342234194278717, 0.1512315273284912, 0.04987607151269913, 0.1533377766609192, -0.2672162353992462, -0.32654356956481934, 0.12481344491243362, 0.041297730058431625, 0.0078202486038208, 0.049609843641519547, 0.13816705346107483, 0.14090843498706818, -0.25598764419555664, -0.18453234434127808, 0.33401018381118774, 0.0007819980382919312, 0.16821251809597015, -0.005692646838724613, 0.38761866092681885, -0.1379329413175583, -0.03373955190181732, -0.2447073757648468, -0.08425366878509521, -0.06309877336025238, 0.16824954748153687, 0.24853068590164185, 0.021840844303369522, 0.18898922204971313, 0.30052924156188965, -0.5376744866371155, 0.15415216982364655, 0.1623527705669403, 0.15922845900058746, 0.007219448685646057, 0.080510213971138, -0.06439550220966339, 0.10302147269248962, -0.01119593158364296, -0.1559029519557953, -0.1334899365901947, 0.435777485370636, -0.614820659160614, 0.1564849317073822, -0.003021828830242157, -0.4209577441215515, -0.4589577615261078, -0.42614486813545227, 0.05875977873802185, 0.045276939868927, -0.4985302686691284, 0.3864375352859497, 0.08021920919418335, -0.2589886486530304, 0.03516162186861038, 0.004868023097515106, 0.06588581949472427, -0.24439746141433716, 0.0056650154292583466, -0.20751655101776123, -0.2112976312637329, -0.28687596321105957, -0.1945679932832718, 0.12270420044660568, -0.14007160067558289, -0.03135017678141594, -0.1728941947221756, 0.07152016460895538, -0.16898761689662933, 0.17101849615573883, 0.00375931803137064, -0.26547229290008545, 0.2866537570953369, 0.21880990266799927, -0.03550770506262779, -0.27416762709617615, 0.2838068902492523, -0.4512211084365845, 0.2968428432941437, 0.2693920135498047, -0.0954151600599289, 0.3836907148361206, -0.04248405247926712, 0.18334197998046875, -0.33763331174850464, -0.04658834636211395, 0.657963752746582, 0.05325377359986305, -0.03134196251630783, -0.5295296907424927, 0.22935333847999573, 0.2917135953903198, -0.2757841944694519, 0.386697381734848, 0.20335039496421814, 0.10637813061475754, 0.025111135095357895, 0.16603708267211914, 1.0553617477416992, -0.03212432563304901, 0.29415586590766907, 0.15915155410766602, -0.23855996131896973, 0.4538283944129944, 0.2559947371482849, -0.10487746447324753, -0.3087898790836334, -0.5182957053184509, -0.14162036776542664, -0.1347711682319641, -0.09893893450498581, 0.06989610195159912, -0.3592683970928192, 0.25826025009155273, -0.26390963792800903, 0.08711428195238113, 0.2589309811592102, 0.3859550654888153, 0.11977110803127289, 0.017046574503183365, 0.023670654743909836, 0.07454193383455276, -0.05954388529062271, 0.08415712416172028, -0.18280217051506042, -0.18144434690475464, 0.060292065143585205, -0.009555026888847351, -0.34661924839019775, -0.1601499617099762, 0.29414135217666626, 0.05022828280925751, 0.02350720763206482, -0.5598281621932983, 0.14294834434986115, -0.20927287638187408, 0.1630902737379074, -0.10313799977302551, 0.06978347897529602, -0.15301917493343353, -0.08459165692329407, 0.23175208270549774, 0.3645714819431305, 0.30308109521865845, 0.40632152557373047, -0.2880821228027344, -0.1211816817522049, 0.23825356364250183, -0.0012577436864376068, -0.09574773162603378, -0.7136171460151672, -0.13713105022907257, -0.002290012314915657, -0.45550820231437683, 0.5247047543525696, 0.09346522390842438, -0.22915489971637726, -0.17902310192584991, 0.1071995347738266, 0.4034641683101654, 0.09704796969890594, 0.13032092154026031, 0.08462107926607132, -0.09408905357122421, -0.16023588180541992, -0.13894528150558472, 0.5209049582481384, -0.3491852283477783, 0.14646601676940918, -0.03284405171871185, 0.018973328173160553, -0.2079576551914215, 0.30926579236984253, 0.13725611567497253, -0.5451034307479858, 0.15838727355003357, -0.21314795315265656, -0.11550823599100113, 0.22845733165740967, 0.5974894165992737, 0.2426888346672058, 0.1432850956916809, -0.27935072779655457, 0.13914811611175537, -0.41467228531837463, 0.21804504096508026, -0.27498459815979004, 0.13074800372123718, -0.5175827145576477, 0.1355898082256317, 0.04705662280321121, -0.016988418996334076, -0.26450273394584656, -0.009935762733221054, 0.1863192617893219, -0.1228967010974884, 0.019935306161642075, 0.062059734016656876, -0.27559927105903625, 0.13689272105693817, 0.0015182793140411377, -0.21729864180088043, -0.28186097741127014, -0.07214286923408508, -0.1967218965291977, 0.15797710418701172, 0.063972108066082, -0.020754974335432053, -0.06023162603378296, 0.019007422029972076, -0.18167100846767426, 0.22366943955421448, 0.23876485228538513, 0.08867976069450378, 0.0748855322599411, 0.36996400356292725, 0.18274855613708496, -0.1585802137851715, -0.36105796694755554, 0.4006911516189575, 0.2759974002838135, 0.2997879385948181, 0.19068077206611633, 0.30097025632858276, 0.09378057718276978, -0.13356128334999084, -0.12445899844169617, 0.14406675100326538, 0.24725556373596191, 0.2719111740589142, 0.13494764268398285, -0.1145997866988182, 0.2362220585346222, -0.040530115365982056, 0.3462548851966858, 0.09171482920646667, 0.05313766747713089, -0.21014875173568726, 0.16968786716461182, 0.20488853752613068, -0.23112192749977112, -0.21361972391605377, -0.04686291143298149, 0.285239040851593, -0.10203390568494797, 0.21235820651054382, 0.1048283725976944, 0.21322478353977203, 0.7359588146209717, 0.011736959218978882, 0.05695686489343643, -0.11123859882354736, 0.25431740283966064, 0.4668591320514679, 0.04840424656867981, 0.0443752221763134, 0.4460226595401764, 0.2613585591316223, 0.003159530460834503, 0.15218649804592133, -0.04070103168487549, 0.0642380565404892, 0.36316800117492676, 0.11722669750452042, 0.43131309747695923, -0.07214702665805817, -0.3945666253566742, -0.03748968988656998, 0.1681368350982666, -0.05828156694769859, 0.06742383539676666, 0.4792509973049164, -0.027619950473308563, 0.03081319108605385, -0.07713332772254944, -0.12325339019298553, 0.05619584023952484, 0.19091404974460602, -0.255351185798645, -0.24641531705856323, -0.3057759702205658, -0.16737234592437744, -0.2191150188446045, 0.06445971131324768, 0.23946303129196167, 0.047550298273563385, 0.045854128897190094, -0.34259411692619324, -0.011353000067174435, 0.16464872658252716, -0.01278260350227356, -0.13089506328105927, 0.200860857963562, 0.02159779518842697, 0.06935553252696991, 0.026156943291425705, 0.5229678750038147, 0.18682299554347992, -0.11109067499637604, -0.1334751695394516, 0.14037618041038513, -0.13379913568496704, -0.07216432690620422, 0.1897800862789154, 0.0529630072414875, 0.05411824211478233, -0.04469195008277893, 0.140290305018425, 0.04508121311664581, -0.061661407351493835, 0.19940267503261566, -0.03505484014749527, -0.17047959566116333, -0.3103818893432617, 0.24178406596183777, 0.4366050958633423, -0.27188825607299805, 0.12787900865077972, 0.07656128704547882, -0.2630912661552429, 0.12988333404064178, 0.37030157446861267, 0.0842878520488739, -0.10149163007736206, -0.05208215117454529, 0.04913618415594101, 0.013114441186189651, 0.19402839243412018, 0.3451361060142517, 0.35992759466171265, -0.09165304154157639, -0.354128360748291, -0.39079466462135315, 0.28534701466560364, 0.33013278245925903, -0.20242701470851898, 0.060799505561590195, 0.14289893209934235, 0.10926580429077148, 0.22694268822669983, 0.2868424355983734, -0.32583609223365784, -0.14217537641525269, 0.057430922985076904, -0.5658142566680908, -0.0639018565416336, 0.3583259582519531, 0.33054736256599426, -0.10760977864265442, 0.1458452343940735, 0.03636787086725235, -0.041262634098529816, -0.010440733283758163, -0.1260978877544403, -0.11876487731933594, 0.33642497658729553, 0.14395739138126373, 0.25184881687164307, 0.09584428369998932, 0.08465112745761871, 0.23118199408054352, -0.1415277123451233, -0.2629726827144623, -0.18844132125377655, -0.19839802384376526, -0.06305543333292007, 0.08150328695774078, 0.2096412032842636, -0.13920974731445312, 0.05932530388236046, -0.42826157808303833, 0.2769787013530731, -0.23379385471343994, 0.18582488596439362, -0.26092493534088135, 0.23080012202262878, 0.06304018944501877, -0.16661256551742554, 0.27281853556632996, 0.3005490005016327, 0.03733917325735092, -0.1286817491054535, -0.41530218720436096, -0.1730317622423172, 0.30824220180511475, 0.4072578549385071, -0.10672271251678467, -0.4694434106349945, -0.0583677664399147, -0.07640236616134644, -0.05308905988931656, -0.27272671461105347, -0.004401206970214844, 0.18484196066856384, 0.1325410008430481, -0.16298234462738037, 0.06180872768163681, 0.314724326133728, 0.14191564917564392, -0.03954446315765381, 0.4378680884838104, -0.19056101143360138, -0.017989441752433777, 0.040728211402893066, -0.061265647411346436 ]
https://github.com/huggingface/datasets/issues/6466
Friendly bump, I would be happy to work on this issue once I get the go-ahead from the dev team.
Can't align optional features of struct
### Describe the bug Hello! I'm currently experiencing an issue where I can't concatenate datasets if an inner field of a Feature is Optional. I have a column named `speaker`, and this holds some information about a speaker. ```python @dataclass class Speaker: name: str email: Optional[str] ``` If I have two datasets, one happens to have `email` always None, then I get `The features can't be aligned because the key email of features` ### Steps to reproduce the bug You can run the following script: ```python ds = Dataset.from_dict({'speaker': [{'name': 'Ben', 'email': None}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) concatenate_datasets([ds, ds2]) >>>The features can't be aligned because the key speaker of features {'speaker': {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)}} has unexpected type - {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)} (expected either {'email': Value(dtype='null', id=None), 'name': Value(dtype='string', id=None)} or Value("null"). ``` ### Expected behavior I think this should work; if two top-level columns were in the same situation it would properly cast to `string`. ```python ds = Dataset.from_dict({'email': [None, None]}) ds2 = Dataset.from_dict({'email': ['abc@aol.com', 'one@yahoo.com']}) concatenate_datasets([ds, ds2]) >>> # Works! ``` ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 - `fsspec` version: 2023.6.0 I would be happy to fix this issue.
20
Can't align optional features of struct ### Describe the bug Hello! I'm currently experiencing an issue where I can't concatenate datasets if an inner field of a Feature is Optional. I have a column named `speaker`, and this holds some information about a speaker. ```python @dataclass class Speaker: name: str email: Optional[str] ``` If I have two datasets, one happens to have `email` always None, then I get `The features can't be aligned because the key email of features` ### Steps to reproduce the bug You can run the following script: ```python ds = Dataset.from_dict({'speaker': [{'name': 'Ben', 'email': None}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) concatenate_datasets([ds, ds2]) >>>The features can't be aligned because the key speaker of features {'speaker': {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)}} has unexpected type - {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)} (expected either {'email': Value(dtype='null', id=None), 'name': Value(dtype='string', id=None)} or Value("null"). ``` ### Expected behavior I think this should work; if two top-level columns were in the same situation it would properly cast to `string`. ```python ds = Dataset.from_dict({'email': [None, None]}) ds2 = Dataset.from_dict({'email': ['abc@aol.com', 'one@yahoo.com']}) concatenate_datasets([ds, ds2]) >>> # Works! ``` ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 - `fsspec` version: 2023.6.0 I would be happy to fix this issue. Friendly bump, I would be happy to work on this issue once I get the go-ahead from the dev team.
[ 0.05887938290834427, -0.3263806700706482, 0.1339399814605713, 0.23355942964553833, 0.21374757587909698, 0.14838311076164246, 0.1363564133644104, 0.030548855662345886, -0.12449514865875244, -0.018588125705718994, 0.08468344062566757, 0.022713661193847656, 0.10085195302963257, 0.24634605646133423, -0.7380692958831787, -0.05319631099700928, 0.12088772654533386, 0.11724186688661575, 0.027808640152215958, -0.07556438446044922, -0.03323514387011528, 0.20948144793510437, -0.3774266242980957, -0.20419107377529144, -0.20557905733585358, 0.22163809835910797, -0.12999799847602844, -0.014957470819354057, 0.11125977337360382, 0.1142493337392807, 0.44277673959732056, 0.08451130986213684, -0.24581113457679749, 0.14347237348556519, -0.00012169570982223377, 0.10539349913597107, 0.31472647190093994, -0.04143782705068588, -0.3637579679489136, -0.23841458559036255, -0.39835208654403687, -0.2557166516780853, -0.11032582819461823, -0.15653423964977264, -0.07477405667304993, -0.20277512073516846, -0.1285904049873352, -0.24067267775535583, -0.02344316616654396, -0.01224597543478012, 0.10695507377386093, 0.3462284207344055, 0.19975055754184723, -0.1565050631761551, -0.11568418890237808, 0.4340173006057739, -0.11877641081809998, -0.44769519567489624, -0.42574992775917053, 0.1269865185022354, 0.6135053634643555, -0.030933372676372528, -0.08562029898166656, -0.39649486541748047, 0.09671257436275482, 0.2776503264904022, -0.38695356249809265, -0.18801617622375488, 0.04884035140275955, 0.24747861921787262, 0.7935321927070618, -0.043505311012268066, -0.3883242607116699, -0.1409085988998413, 0.06637339293956757, 0.029881544411182404, 0.28010112047195435, 0.053901053965091705, 0.13674238324165344, 0.20156235992908478, 0.15951532125473022, 0.2700558006763458, -0.028184227645397186, 0.16744942963123322, -0.026980772614479065, 0.06546216458082199, 0.019827138632535934, -0.04542502388358116, -0.47817689180374146, -0.3012453019618988, -0.2795275151729584, -0.35956430435180664, -0.26359885931015015, 0.16236737370491028, -0.15161357820034027, -0.1681247502565384, 0.05330909788608551, -0.30898410081863403, -0.09543097764253616, 0.05237721651792526, -0.13823114335536957, -0.033121127635240555, 0.06597797572612762, 0.17173615097999573, 0.25217556953430176, -0.09045626223087311, 0.27200496196746826, 0.3626479208469391, -0.08883997797966003, -0.18118494749069214, 0.16793014109134674, -0.04959646984934807, 0.1892462819814682, 0.08701424300670624, 0.03004349023103714, -0.02664409764111042, 0.5618738532066345, -0.19941484928131104, -0.2976053059101105, 0.41674503684043884, -0.20165927708148956, 0.21442916989326477, 0.09548886120319366, -0.18273936212062836, -0.04715123772621155, 0.6188603043556213, 0.053567588329315186, 0.3082996904850006, 0.2834073603153229, -0.05140070244669914, -0.10019104182720184, -0.17604288458824158, 0.19538991153240204, -0.2681412100791931, -0.07865063101053238, 0.11591583490371704, -0.10109644383192062, 0.4956243336200714, 0.023676404729485512, 0.1208483874797821, -0.4509139060974121, -0.3495335280895233, -0.10966689884662628, 0.19893309473991394, -0.16386248171329498, 0.024023786187171936, 0.16842414438724518, -0.06133053079247475, 0.0023247599601745605, 0.13313737511634827, -0.21492573618888855, -0.36200273036956787, -0.4326595067977905, 0.1659104824066162, -0.3395569324493408, -0.0960172638297081, 0.14286315441131592, 0.1753351092338562, 0.19076627492904663, -0.01655510812997818, -0.09032222628593445, -0.15323969721794128, -0.13643194735050201, -0.0882112979888916, 0.11892196536064148, 0.18249064683914185, -0.19237317144870758, 0.06255955994129181, 0.11938236653804779, 0.1197504997253418, 0.22742941975593567, 0.14016152918338776, 0.06562444567680359, 0.03295496106147766, -0.21247801184654236, 0.1655874103307724, 0.5105966329574585, -0.3210778534412384, -0.22006602585315704, -0.024272970855236053, -0.0490197092294693, 0.3220282793045044, 0.14116935431957245, 0.11369122564792633, -0.1796972006559372, -0.06916336715221405, 0.07585760951042175, 0.43609336018562317, -0.12762178480625153, -0.1245359480381012, -0.24383455514907837, -0.012034893035888672, 0.5701444745063782, 0.0564739853143692, -0.2142120599746704, 0.18761369585990906, -0.20458659529685974, -0.0886550024151802, 0.11751221120357513, -0.16936062276363373, -0.013499803841114044, 0.19710630178451538, 0.46563124656677246, 0.2342958301305771, 0.030714984983205795, -0.3228694200515747, -0.7312209606170654, 0.2047336995601654, 0.3624816834926605, 0.04601617902517319, -0.11187328398227692, -0.2251850664615631, 0.09277812391519547, -0.2722054123878479, 0.03740144148468971, 0.45138394832611084, 0.12341640144586563, -0.05375641584396362, -0.15482312440872192, -0.33834996819496155, -0.2786766290664673, 0.31469953060150146, -0.2048639953136444, 0.07219183444976807, -0.042625367641448975, 0.2516041696071625, 0.08780451864004135, 0.0567939355969429, -0.2974989414215088, 0.32428476214408875, 0.18610355257987976, 0.11512276530265808, -0.2368347942829132, 0.2345234900712967, 0.2747853994369507, -0.317345529794693, -0.3310239017009735, -0.1724451333284378, -0.2901157736778259, -0.045037224888801575, -0.32776814699172974, 0.3391984701156616, 0.06359913945198059, -0.16607269644737244, -0.05334508419036865, 0.3756222128868103, 0.15453320741653442, 0.3538566529750824, -0.22239258885383606, 0.20757418870925903, 0.2590675950050354, -0.24190527200698853, -0.12351727485656738, -0.5416693687438965, 0.0558309406042099, 0.05078307166695595, -0.019473575055599213, 0.23560695350170135, -0.7419506311416626, 0.14432236552238464, 0.06567659229040146, 0.25671353936195374, -0.026711318641901016, 0.12751628458499908, 0.16682562232017517, 0.19283410906791687, -0.14367935061454773, -0.020909294486045837, 0.3467642664909363, 0.14431996643543243, -0.1547928750514984, 0.20552018284797668, -0.06568549573421478, 0.005562346428632736, 0.10539272427558899, 0.1607520431280136, -0.27177584171295166, 0.369261234998703, 0.4694427251815796, 0.3252761960029602, -0.011696413159370422, -0.1128770112991333, 0.06547673791646957, -0.033670272678136826, -0.44420063495635986, 0.023195229470729828, -0.41217437386512756, -0.0772663950920105, -0.0040047504007816315, -0.5158286690711975, -0.16678063571453094, -0.4289364516735077, -0.023903001099824905, 0.2103106826543808, -0.4653621315956116, 0.11029936373233795, -0.278810977935791, 0.19596438109874725, -0.04313478246331215, -0.5006076693534851, -0.09751320630311966, -0.05286787450313568, -0.05292104557156563, 0.03707671910524368, 0.21382446587085724, -0.13960281014442444, -0.06540292501449585, -0.22551047801971436, -0.16930130124092102, 0.02640427276492119, -0.297976553440094, -0.035847682505846024, -0.2261413335800171, -0.027536727488040924, 0.20583730936050415, 0.018414482474327087, 0.1452125459909439, -0.2372664362192154, 0.4118339419364929, 0.6605143547058105, -0.39131903648376465, 0.6667758226394653, 0.1742100864648819, -0.44768470525741577, -0.3174820840358734, -0.12270143628120422, -0.04935310781002045, -0.19018468260765076, 0.12746071815490723, -0.19155214726924896, 0.19233211874961853, 0.4655999541282654, 0.06189563870429993, -0.3465134799480438, 0.1648673564195633, 0.03285665065050125, -0.18224862217903137, -0.03213013708591461, 0.5443516969680786, 0.081133171916008, -0.2659836411476135, 0.01858179271221161, -0.0021898970007896423, -0.07291775941848755, 0.0818433165550232, 0.01021101325750351, -0.06457561254501343, -0.27529728412628174, 0.44326919317245483, -0.15739575028419495, -0.1670815497636795, 0.1317145973443985, 0.4371335208415985, 0.05857295170426369, 0.02679307758808136, 0.019744865596294403, 0.11124956607818604, 0.4816538989543915, 0.12511670589447021, -0.08397327363491058, -0.054315559566020966, -0.11375827342271805, -0.01873837411403656, 0.40109360218048096, -0.18578767776489258, 0.18860098719596863, 0.0038297176361083984, 0.41264280676841736, -0.17880728840827942, -0.40620672702789307, -0.2005605548620224, 0.045643530786037445, -0.13463282585144043, -0.1557825207710266, -0.1539992094039917, 0.17410553991794586, -0.1659345179796219, 0.2543943226337433, -0.010434061288833618, -0.1768467128276825, 0.07830101996660233, -0.3746112883090973, 0.024006621912121773, 0.04191809892654419, 0.040428370237350464, -0.25252994894981384, -0.1971646547317505, -0.05412520095705986, 0.3307459354400635, -0.021570149809122086, -0.025977687910199165, -0.31439265608787537, -0.2409958690404892, 0.2262212485074997, 0.31088781356811523, 0.21811442077159882, 0.5360287427902222, 0.15770180523395538, -0.2097238302230835, -0.18464632332324982, 0.11399684101343155, 0.25727230310440063, 0.0005623586475849152, -0.09243705123662949, 0.3859768807888031, 0.2173207849264145, -0.1832355260848999, -0.4312107563018799, -0.12374325096607208, 0.0230100154876709, 0.09243717789649963, 0.5203217267990112, -0.240481436252594, 0.011724025011062622, 0.0036027226597070694, 0.4253402054309845, -0.09671627730131149, -0.3384752869606018, -0.07785916328430176, 0.017007306218147278, 0.07323622703552246, -0.07814263552427292, 0.37799540162086487, 0.5215731263160706, 0.019178077578544617, -0.057715024799108505, -0.20095691084861755, -0.314170241355896, 0.2433706670999527, -0.06907010823488235, 0.42014509439468384, -0.31976884603500366, 0.29595062136650085, -0.35013124346733093, 0.04991782456636429, 0.0753893181681633, 0.6669095158576965, 0.4520954191684723, -0.5188503265380859, -0.20414820313453674, -0.19131162762641907, 0.42100879549980164, -0.0768226832151413, -0.11022070050239563, 0.3613288104534149, -0.32811957597732544, 0.05582524463534355, -0.1406811773777008, -0.05569842830300331, 0.31302008032798767, 0.026041284203529358, -0.06328429281711578, -0.16503340005874634, 0.07454077899456024, -0.11095306277275085, 0.009148314595222473, 0.41124653816223145, 0.385979562997818, -0.048223841935396194, 0.22319099307060242, -0.145660862326622, 0.7169166207313538, 0.6535354256629944, -0.26334017515182495, 0.09522145241498947, -0.29473721981048584, 0.43199336528778076, 0.14401087164878845, 0.19219699501991272, -0.14421263337135315, -0.23257677257061005, -0.11785992980003357, -0.0462348535656929, -0.03915568068623543, -0.169516921043396, -0.23247620463371277, 0.20274867117404938, -0.5918861031532288, 0.7352212071418762, 0.06437278538942337, -0.010552234947681427, 0.1778130978345871, -0.09203213453292847, -0.10559819638729095, -0.018467342481017113, 0.18999165296554565, 0.10361494868993759, -0.06262239813804626, -0.09294906258583069, -0.2114141583442688, -0.26550033688545227, -0.46344447135925293, 0.4447912275791168, 0.0733509510755539, 0.12421995401382446, 0.3505754768848419, -0.1086113303899765, 0.22238531708717346, 0.5134227275848389, 0.27812278270721436, 0.22598981857299805, -0.1599809229373932, -0.15153191983699799, 0.0787188857793808, 0.23449909687042236, -0.1275053471326828, -0.13015781342983246, 0.22085453569889069, 0.05462786555290222, -0.272488534450531, -0.022498685866594315, -0.0621422678232193, 0.06621921807527542, -0.17981137335300446, -0.20134542882442474, -0.21326148509979248, -0.44109800457954407, -0.10220755636692047, -0.0944811999797821, 0.2987157702445984, -0.16200077533721924, 0.05722277611494064, 0.002675425261259079, 0.01294560357928276, 0.08033070713281631, 0.006083069369196892, -0.18902358412742615, 0.039957206696271896, 0.27423095703125, 0.19737417995929718, 0.26748570799827576, 0.5607525110244751, -0.09926943480968475, -0.06301580369472504, -0.06329233944416046, -0.07497507333755493, -0.34678536653518677, -0.005549728870391846, 0.06137809529900551, -0.11907428503036499, -0.1394786238670349, -0.041972070932388306, 0.35261380672454834, 0.12183216214179993, 0.1753237545490265, -0.22850961983203888, -0.32842883467674255, -0.13974830508232117, 0.11945758759975433, 0.12214058637619019, -0.05540340393781662, -0.2768089771270752, 0.35925284028053284, -0.04955342411994934, -0.0024533066898584366, -0.20549924671649933, -0.2899845540523529, -0.03086080402135849, 0.029754217714071274, 0.12661847472190857, 0.08032473921775818, 0.24730148911476135, -0.3778614401817322, 0.11686599999666214, -0.12718388438224792, 0.06351637840270996, -0.10185237228870392, -0.26973626017570496, 0.1678224802017212, 0.38195234537124634, 0.11278854310512543, -0.08486826717853546, -0.056144896894693375, 0.08475983142852783, -0.23094822466373444, -0.22534878551959991, 0.31031540036201477, -0.16739606857299805, 0.512970507144928, -0.06360678374767303, 0.3588426411151886, -0.33516815304756165, 0.14923100173473358, 0.08000770211219788, -0.13566918671131134, -0.20030394196510315, -0.10976535826921463, -0.15135088562965393, 0.04039454460144043, -0.23412653803825378, 0.024747347459197044, -0.10859133303165436, -0.00919397920370102, 0.19447295367717743, -0.18704119324684143, 0.06732475757598877, -0.08807196468114853, 0.21159377694129944, 0.4163426160812378, 0.08896999806165695, -0.05027046054601669, 0.09420354664325714, 0.12834686040878296, -0.3473838269710541, -0.14833465218544006, 0.0958230048418045, 0.36323755979537964, 0.025829501450061798, 0.13566139340400696, 0.12496721744537354, -0.27882909774780273, -0.1892002522945404, -0.05316675081849098, 0.3162434995174408, 0.17579035460948944, 0.33165526390075684, 0.5378009676933289, 0.10152823477983475, 0.2359423041343689, 0.06337329745292664, -0.03796279430389404, -0.03452484682202339, 0.3155270218849182, 0.2744256258010864, -0.1367308497428894, 0.3735288381576538, -0.2439085990190506, 0.07932579517364502, -0.1427997350692749, 0.47100722789764404, 0.11626791954040527, 0.482022762298584, 0.0733758732676506, 0.20993928611278534, -0.036367129534482956, -0.2022802233695984, -0.3834957778453827, -0.27953243255615234, -0.10871484875679016, -0.2663743793964386, 0.09167367219924927, -0.1778760552406311, -0.14932860434055328, -0.14474649727344513, -0.34772545099258423, 0.10778503865003586, -0.049225617200136185, 0.3603121042251587, -0.05374092981219292, 0.04163748025894165, -0.19529679417610168, 0.18578168749809265, 0.38718461990356445, 0.45073452591896057, -0.44159257411956787, 0.15748870372772217, 0.2262362241744995, -0.11956871300935745, 0.3631422221660614, 0.26967909932136536, 0.29726165533065796, 0.543513298034668, 0.004411365836858749, 0.03760582581162453, 0.1180906668305397, -0.22996805608272552, 0.09754107147455215, 0.1365111619234085, -0.40219929814338684, -0.3003619611263275, 0.13265368342399597, 0.10363109409809113, -0.14136724174022675, 0.3648281991481781, -0.1525019407272339, 0.29112547636032104, -0.5386611223220825, 0.4201456904411316, 0.07633824646472931, -0.1494975984096527, 0.15206091105937958, -0.0407724492251873, 0.25741565227508545, -0.675912082195282, 0.2652813196182251, 0.4472070336341858, 0.0485733225941658, 0.13688017427921295, 0.07079929113388062, 0.20044530928134918, 0.15002353489398956, 0.5890932679176331, -0.27261295914649963, -0.02482788637280464, 0.08077199757099152, -0.3605749011039734, 0.2826237380504608, -0.14551594853401184, -0.05667923763394356, 0.37613049149513245, 0.11875918507575989, 0.26122358441352844, 0.07844868302345276, 0.02881905436515808, 0.25123754143714905, -0.3393227458000183, -0.060177333652973175, -0.3511750400066376, -0.07767780870199203, -0.20485197007656097, -0.24881167709827423, -0.06902353465557098, -0.2612822949886322, 0.18141812086105347, 0.1598379909992218, 0.1416015625, -0.028865991160273552, -0.11533049494028091, 0.03588877618312836, 0.07935234904289246, -0.11586491763591766, 0.27221331000328064, 0.3624477684497833, -0.035718221217393875, -0.11867761611938477, -0.07178899645805359, -0.05951274186372757, -0.42570632696151733, 0.3827372193336487, -0.19036772847175598, 0.15982787311077118, -0.037908487021923065, 0.28046250343322754, 0.03098948672413826, 0.03170231729745865, 0.10894475877285004, 0.08867067098617554, -0.41397082805633545, 0.524803638458252, -0.37364739179611206, 0.009596556425094604, -0.12216515094041824, 0.11189274489879608, 0.08609653264284134, 0.1526603400707245, -0.14054039120674133, -0.5699783563613892, 0.16644665598869324, 0.004697397351264954, -0.3122807741165161, -0.17423248291015625, 0.09573126584291458, 0.3337227404117584, 0.20564045011997223, -0.39359205961227417, -0.2890397608280182, 0.30505093932151794, -0.1897129863500595, 0.2157478630542755, -0.17477762699127197, 0.17782175540924072, -0.15184570848941803, -0.12623295187950134, 0.37988710403442383, -0.18055550754070282, 0.00033865123987197876, 0.050458356738090515, -0.01331939548254013 ]
https://github.com/huggingface/datasets/issues/6466
Thanks for the PR! I'm struggling with this as well and would love to see this PR merged. My case is slightly different, with keys completely missing rather than being `None`: ``` ds = Dataset.from_dict({'speaker': [{'name': 'Ben'}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) print(concatenate_datasets([ds, ds2]).features) print(concatenate_datasets([ds, ds2]).to_dict()) ``` I would expect this to work as well because other Dataset functions already handle this situation well. For example, this works just as expected: ``` ds = Dataset.from_dict({'n': [1,2]}) ds_mapped = ds.map(lambda x: { 'speaker': {'name': 'Ben'} if x['n'] == 1 else {'name': 'Fred', 'email': 'abc@aol.com'} }) print(ds_mapped) ```
Can't align optional features of struct
### Describe the bug Hello! I'm currently experiencing an issue where I can't concatenate datasets if an inner field of a Feature is Optional. I have a column named `speaker`, and this holds some information about a speaker. ```python @dataclass class Speaker: name: str email: Optional[str] ``` If I have two datasets, one happens to have `email` always None, then I get `The features can't be aligned because the key email of features` ### Steps to reproduce the bug You can run the following script: ```python ds = Dataset.from_dict({'speaker': [{'name': 'Ben', 'email': None}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) concatenate_datasets([ds, ds2]) >>>The features can't be aligned because the key speaker of features {'speaker': {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)}} has unexpected type - {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)} (expected either {'email': Value(dtype='null', id=None), 'name': Value(dtype='string', id=None)} or Value("null"). ``` ### Expected behavior I think this should work; if two top-level columns were in the same situation it would properly cast to `string`. ```python ds = Dataset.from_dict({'email': [None, None]}) ds2 = Dataset.from_dict({'email': ['abc@aol.com', 'one@yahoo.com']}) concatenate_datasets([ds, ds2]) >>> # Works! ``` ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 - `fsspec` version: 2023.6.0 I would be happy to fix this issue.
98
Can't align optional features of struct ### Describe the bug Hello! I'm currently experiencing an issue where I can't concatenate datasets if an inner field of a Feature is Optional. I have a column named `speaker`, and this holds some information about a speaker. ```python @dataclass class Speaker: name: str email: Optional[str] ``` If I have two datasets, one happens to have `email` always None, then I get `The features can't be aligned because the key email of features` ### Steps to reproduce the bug You can run the following script: ```python ds = Dataset.from_dict({'speaker': [{'name': 'Ben', 'email': None}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) concatenate_datasets([ds, ds2]) >>>The features can't be aligned because the key speaker of features {'speaker': {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)}} has unexpected type - {'email': Value(dtype='string', id=None), 'name': Value(dtype='string', id=None)} (expected either {'email': Value(dtype='null', id=None), 'name': Value(dtype='string', id=None)} or Value("null"). ``` ### Expected behavior I think this should work; if two top-level columns were in the same situation it would properly cast to `string`. ```python ds = Dataset.from_dict({'email': [None, None]}) ds2 = Dataset.from_dict({'email': ['abc@aol.com', 'one@yahoo.com']}) concatenate_datasets([ds, ds2]) >>> # Works! ``` ### Environment info - `datasets` version: 2.15.1.dev0 - Platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 - `fsspec` version: 2023.6.0 I would be happy to fix this issue. Thanks for the PR! I'm struggling with this as well and would love to see this PR merged. My case is slightly different, with keys completely missing rather than being `None`: ``` ds = Dataset.from_dict({'speaker': [{'name': 'Ben'}]}) ds2 = Dataset.from_dict({'speaker': [{'name': 'Fred', 'email': 'abc@aol.com'}]}) print(concatenate_datasets([ds, ds2]).features) print(concatenate_datasets([ds, ds2]).to_dict()) ``` I would expect this to work as well because other Dataset functions already handle this situation well. For example, this works just as expected: ``` ds = Dataset.from_dict({'n': [1,2]}) ds_mapped = ds.map(lambda x: { 'speaker': {'name': 'Ben'} if x['n'] == 1 else {'name': 'Fred', 'email': 'abc@aol.com'} }) print(ds_mapped) ```
[ 0.05887938290834427, -0.3263806700706482, 0.1339399814605713, 0.23355942964553833, 0.21374757587909698, 0.14838311076164246, 0.1363564133644104, 0.030548855662345886, -0.12449514865875244, -0.018588125705718994, 0.08468344062566757, 0.022713661193847656, 0.10085195302963257, 0.24634605646133423, -0.7380692958831787, -0.05319631099700928, 0.12088772654533386, 0.11724186688661575, 0.027808640152215958, -0.07556438446044922, -0.03323514387011528, 0.20948144793510437, -0.3774266242980957, -0.20419107377529144, -0.20557905733585358, 0.22163809835910797, -0.12999799847602844, -0.014957470819354057, 0.11125977337360382, 0.1142493337392807, 0.44277673959732056, 0.08451130986213684, -0.24581113457679749, 0.14347237348556519, -0.00012169570982223377, 0.10539349913597107, 0.31472647190093994, -0.04143782705068588, -0.3637579679489136, -0.23841458559036255, -0.39835208654403687, -0.2557166516780853, -0.11032582819461823, -0.15653423964977264, -0.07477405667304993, -0.20277512073516846, -0.1285904049873352, -0.24067267775535583, -0.02344316616654396, -0.01224597543478012, 0.10695507377386093, 0.3462284207344055, 0.19975055754184723, -0.1565050631761551, -0.11568418890237808, 0.4340173006057739, -0.11877641081809998, -0.44769519567489624, -0.42574992775917053, 0.1269865185022354, 0.6135053634643555, -0.030933372676372528, -0.08562029898166656, -0.39649486541748047, 0.09671257436275482, 0.2776503264904022, -0.38695356249809265, -0.18801617622375488, 0.04884035140275955, 0.24747861921787262, 0.7935321927070618, -0.043505311012268066, -0.3883242607116699, -0.1409085988998413, 0.06637339293956757, 0.029881544411182404, 0.28010112047195435, 0.053901053965091705, 0.13674238324165344, 0.20156235992908478, 0.15951532125473022, 0.2700558006763458, -0.028184227645397186, 0.16744942963123322, -0.026980772614479065, 0.06546216458082199, 0.019827138632535934, -0.04542502388358116, -0.47817689180374146, -0.3012453019618988, -0.2795275151729584, -0.35956430435180664, -0.26359885931015015, 0.16236737370491028, -0.15161357820034027, -0.1681247502565384, 0.05330909788608551, -0.30898410081863403, -0.09543097764253616, 0.05237721651792526, -0.13823114335536957, -0.033121127635240555, 0.06597797572612762, 0.17173615097999573, 0.25217556953430176, -0.09045626223087311, 0.27200496196746826, 0.3626479208469391, -0.08883997797966003, -0.18118494749069214, 0.16793014109134674, -0.04959646984934807, 0.1892462819814682, 0.08701424300670624, 0.03004349023103714, -0.02664409764111042, 0.5618738532066345, -0.19941484928131104, -0.2976053059101105, 0.41674503684043884, -0.20165927708148956, 0.21442916989326477, 0.09548886120319366, -0.18273936212062836, -0.04715123772621155, 0.6188603043556213, 0.053567588329315186, 0.3082996904850006, 0.2834073603153229, -0.05140070244669914, -0.10019104182720184, -0.17604288458824158, 0.19538991153240204, -0.2681412100791931, -0.07865063101053238, 0.11591583490371704, -0.10109644383192062, 0.4956243336200714, 0.023676404729485512, 0.1208483874797821, -0.4509139060974121, -0.3495335280895233, -0.10966689884662628, 0.19893309473991394, -0.16386248171329498, 0.024023786187171936, 0.16842414438724518, -0.06133053079247475, 0.0023247599601745605, 0.13313737511634827, -0.21492573618888855, -0.36200273036956787, -0.4326595067977905, 0.1659104824066162, -0.3395569324493408, -0.0960172638297081, 0.14286315441131592, 0.1753351092338562, 0.19076627492904663, -0.01655510812997818, -0.09032222628593445, -0.15323969721794128, -0.13643194735050201, -0.0882112979888916, 0.11892196536064148, 0.18249064683914185, -0.19237317144870758, 0.06255955994129181, 0.11938236653804779, 0.1197504997253418, 0.22742941975593567, 0.14016152918338776, 0.06562444567680359, 0.03295496106147766, -0.21247801184654236, 0.1655874103307724, 0.5105966329574585, -0.3210778534412384, -0.22006602585315704, -0.024272970855236053, -0.0490197092294693, 0.3220282793045044, 0.14116935431957245, 0.11369122564792633, -0.1796972006559372, -0.06916336715221405, 0.07585760951042175, 0.43609336018562317, -0.12762178480625153, -0.1245359480381012, -0.24383455514907837, -0.012034893035888672, 0.5701444745063782, 0.0564739853143692, -0.2142120599746704, 0.18761369585990906, -0.20458659529685974, -0.0886550024151802, 0.11751221120357513, -0.16936062276363373, -0.013499803841114044, 0.19710630178451538, 0.46563124656677246, 0.2342958301305771, 0.030714984983205795, -0.3228694200515747, -0.7312209606170654, 0.2047336995601654, 0.3624816834926605, 0.04601617902517319, -0.11187328398227692, -0.2251850664615631, 0.09277812391519547, -0.2722054123878479, 0.03740144148468971, 0.45138394832611084, 0.12341640144586563, -0.05375641584396362, -0.15482312440872192, -0.33834996819496155, -0.2786766290664673, 0.31469953060150146, -0.2048639953136444, 0.07219183444976807, -0.042625367641448975, 0.2516041696071625, 0.08780451864004135, 0.0567939355969429, -0.2974989414215088, 0.32428476214408875, 0.18610355257987976, 0.11512276530265808, -0.2368347942829132, 0.2345234900712967, 0.2747853994369507, -0.317345529794693, -0.3310239017009735, -0.1724451333284378, -0.2901157736778259, -0.045037224888801575, -0.32776814699172974, 0.3391984701156616, 0.06359913945198059, -0.16607269644737244, -0.05334508419036865, 0.3756222128868103, 0.15453320741653442, 0.3538566529750824, -0.22239258885383606, 0.20757418870925903, 0.2590675950050354, -0.24190527200698853, -0.12351727485656738, -0.5416693687438965, 0.0558309406042099, 0.05078307166695595, -0.019473575055599213, 0.23560695350170135, -0.7419506311416626, 0.14432236552238464, 0.06567659229040146, 0.25671353936195374, -0.026711318641901016, 0.12751628458499908, 0.16682562232017517, 0.19283410906791687, -0.14367935061454773, -0.020909294486045837, 0.3467642664909363, 0.14431996643543243, -0.1547928750514984, 0.20552018284797668, -0.06568549573421478, 0.005562346428632736, 0.10539272427558899, 0.1607520431280136, -0.27177584171295166, 0.369261234998703, 0.4694427251815796, 0.3252761960029602, -0.011696413159370422, -0.1128770112991333, 0.06547673791646957, -0.033670272678136826, -0.44420063495635986, 0.023195229470729828, -0.41217437386512756, -0.0772663950920105, -0.0040047504007816315, -0.5158286690711975, -0.16678063571453094, -0.4289364516735077, -0.023903001099824905, 0.2103106826543808, -0.4653621315956116, 0.11029936373233795, -0.278810977935791, 0.19596438109874725, -0.04313478246331215, -0.5006076693534851, -0.09751320630311966, -0.05286787450313568, -0.05292104557156563, 0.03707671910524368, 0.21382446587085724, -0.13960281014442444, -0.06540292501449585, -0.22551047801971436, -0.16930130124092102, 0.02640427276492119, -0.297976553440094, -0.035847682505846024, -0.2261413335800171, -0.027536727488040924, 0.20583730936050415, 0.018414482474327087, 0.1452125459909439, -0.2372664362192154, 0.4118339419364929, 0.6605143547058105, -0.39131903648376465, 0.6667758226394653, 0.1742100864648819, -0.44768470525741577, -0.3174820840358734, -0.12270143628120422, -0.04935310781002045, -0.19018468260765076, 0.12746071815490723, -0.19155214726924896, 0.19233211874961853, 0.4655999541282654, 0.06189563870429993, -0.3465134799480438, 0.1648673564195633, 0.03285665065050125, -0.18224862217903137, -0.03213013708591461, 0.5443516969680786, 0.081133171916008, -0.2659836411476135, 0.01858179271221161, -0.0021898970007896423, -0.07291775941848755, 0.0818433165550232, 0.01021101325750351, -0.06457561254501343, -0.27529728412628174, 0.44326919317245483, -0.15739575028419495, -0.1670815497636795, 0.1317145973443985, 0.4371335208415985, 0.05857295170426369, 0.02679307758808136, 0.019744865596294403, 0.11124956607818604, 0.4816538989543915, 0.12511670589447021, -0.08397327363491058, -0.054315559566020966, -0.11375827342271805, -0.01873837411403656, 0.40109360218048096, -0.18578767776489258, 0.18860098719596863, 0.0038297176361083984, 0.41264280676841736, -0.17880728840827942, -0.40620672702789307, -0.2005605548620224, 0.045643530786037445, -0.13463282585144043, -0.1557825207710266, -0.1539992094039917, 0.17410553991794586, -0.1659345179796219, 0.2543943226337433, -0.010434061288833618, -0.1768467128276825, 0.07830101996660233, -0.3746112883090973, 0.024006621912121773, 0.04191809892654419, 0.040428370237350464, -0.25252994894981384, -0.1971646547317505, -0.05412520095705986, 0.3307459354400635, -0.021570149809122086, -0.025977687910199165, -0.31439265608787537, -0.2409958690404892, 0.2262212485074997, 0.31088781356811523, 0.21811442077159882, 0.5360287427902222, 0.15770180523395538, -0.2097238302230835, -0.18464632332324982, 0.11399684101343155, 0.25727230310440063, 0.0005623586475849152, -0.09243705123662949, 0.3859768807888031, 0.2173207849264145, -0.1832355260848999, -0.4312107563018799, -0.12374325096607208, 0.0230100154876709, 0.09243717789649963, 0.5203217267990112, -0.240481436252594, 0.011724025011062622, 0.0036027226597070694, 0.4253402054309845, -0.09671627730131149, -0.3384752869606018, -0.07785916328430176, 0.017007306218147278, 0.07323622703552246, -0.07814263552427292, 0.37799540162086487, 0.5215731263160706, 0.019178077578544617, -0.057715024799108505, -0.20095691084861755, -0.314170241355896, 0.2433706670999527, -0.06907010823488235, 0.42014509439468384, -0.31976884603500366, 0.29595062136650085, -0.35013124346733093, 0.04991782456636429, 0.0753893181681633, 0.6669095158576965, 0.4520954191684723, -0.5188503265380859, -0.20414820313453674, -0.19131162762641907, 0.42100879549980164, -0.0768226832151413, -0.11022070050239563, 0.3613288104534149, -0.32811957597732544, 0.05582524463534355, -0.1406811773777008, -0.05569842830300331, 0.31302008032798767, 0.026041284203529358, -0.06328429281711578, -0.16503340005874634, 0.07454077899456024, -0.11095306277275085, 0.009148314595222473, 0.41124653816223145, 0.385979562997818, -0.048223841935396194, 0.22319099307060242, -0.145660862326622, 0.7169166207313538, 0.6535354256629944, -0.26334017515182495, 0.09522145241498947, -0.29473721981048584, 0.43199336528778076, 0.14401087164878845, 0.19219699501991272, -0.14421263337135315, -0.23257677257061005, -0.11785992980003357, -0.0462348535656929, -0.03915568068623543, -0.169516921043396, -0.23247620463371277, 0.20274867117404938, -0.5918861031532288, 0.7352212071418762, 0.06437278538942337, -0.010552234947681427, 0.1778130978345871, -0.09203213453292847, -0.10559819638729095, -0.018467342481017113, 0.18999165296554565, 0.10361494868993759, -0.06262239813804626, -0.09294906258583069, -0.2114141583442688, -0.26550033688545227, -0.46344447135925293, 0.4447912275791168, 0.0733509510755539, 0.12421995401382446, 0.3505754768848419, -0.1086113303899765, 0.22238531708717346, 0.5134227275848389, 0.27812278270721436, 0.22598981857299805, -0.1599809229373932, -0.15153191983699799, 0.0787188857793808, 0.23449909687042236, -0.1275053471326828, -0.13015781342983246, 0.22085453569889069, 0.05462786555290222, -0.272488534450531, -0.022498685866594315, -0.0621422678232193, 0.06621921807527542, -0.17981137335300446, -0.20134542882442474, -0.21326148509979248, -0.44109800457954407, -0.10220755636692047, -0.0944811999797821, 0.2987157702445984, -0.16200077533721924, 0.05722277611494064, 0.002675425261259079, 0.01294560357928276, 0.08033070713281631, 0.006083069369196892, -0.18902358412742615, 0.039957206696271896, 0.27423095703125, 0.19737417995929718, 0.26748570799827576, 0.5607525110244751, -0.09926943480968475, -0.06301580369472504, -0.06329233944416046, -0.07497507333755493, -0.34678536653518677, -0.005549728870391846, 0.06137809529900551, -0.11907428503036499, -0.1394786238670349, -0.041972070932388306, 0.35261380672454834, 0.12183216214179993, 0.1753237545490265, -0.22850961983203888, -0.32842883467674255, -0.13974830508232117, 0.11945758759975433, 0.12214058637619019, -0.05540340393781662, -0.2768089771270752, 0.35925284028053284, -0.04955342411994934, -0.0024533066898584366, -0.20549924671649933, -0.2899845540523529, -0.03086080402135849, 0.029754217714071274, 0.12661847472190857, 0.08032473921775818, 0.24730148911476135, -0.3778614401817322, 0.11686599999666214, -0.12718388438224792, 0.06351637840270996, -0.10185237228870392, -0.26973626017570496, 0.1678224802017212, 0.38195234537124634, 0.11278854310512543, -0.08486826717853546, -0.056144896894693375, 0.08475983142852783, -0.23094822466373444, -0.22534878551959991, 0.31031540036201477, -0.16739606857299805, 0.512970507144928, -0.06360678374767303, 0.3588426411151886, -0.33516815304756165, 0.14923100173473358, 0.08000770211219788, -0.13566918671131134, -0.20030394196510315, -0.10976535826921463, -0.15135088562965393, 0.04039454460144043, -0.23412653803825378, 0.024747347459197044, -0.10859133303165436, -0.00919397920370102, 0.19447295367717743, -0.18704119324684143, 0.06732475757598877, -0.08807196468114853, 0.21159377694129944, 0.4163426160812378, 0.08896999806165695, -0.05027046054601669, 0.09420354664325714, 0.12834686040878296, -0.3473838269710541, -0.14833465218544006, 0.0958230048418045, 0.36323755979537964, 0.025829501450061798, 0.13566139340400696, 0.12496721744537354, -0.27882909774780273, -0.1892002522945404, -0.05316675081849098, 0.3162434995174408, 0.17579035460948944, 0.33165526390075684, 0.5378009676933289, 0.10152823477983475, 0.2359423041343689, 0.06337329745292664, -0.03796279430389404, -0.03452484682202339, 0.3155270218849182, 0.2744256258010864, -0.1367308497428894, 0.3735288381576538, -0.2439085990190506, 0.07932579517364502, -0.1427997350692749, 0.47100722789764404, 0.11626791954040527, 0.482022762298584, 0.0733758732676506, 0.20993928611278534, -0.036367129534482956, -0.2022802233695984, -0.3834957778453827, -0.27953243255615234, -0.10871484875679016, -0.2663743793964386, 0.09167367219924927, -0.1778760552406311, -0.14932860434055328, -0.14474649727344513, -0.34772545099258423, 0.10778503865003586, -0.049225617200136185, 0.3603121042251587, -0.05374092981219292, 0.04163748025894165, -0.19529679417610168, 0.18578168749809265, 0.38718461990356445, 0.45073452591896057, -0.44159257411956787, 0.15748870372772217, 0.2262362241744995, -0.11956871300935745, 0.3631422221660614, 0.26967909932136536, 0.29726165533065796, 0.543513298034668, 0.004411365836858749, 0.03760582581162453, 0.1180906668305397, -0.22996805608272552, 0.09754107147455215, 0.1365111619234085, -0.40219929814338684, -0.3003619611263275, 0.13265368342399597, 0.10363109409809113, -0.14136724174022675, 0.3648281991481781, -0.1525019407272339, 0.29112547636032104, -0.5386611223220825, 0.4201456904411316, 0.07633824646472931, -0.1494975984096527, 0.15206091105937958, -0.0407724492251873, 0.25741565227508545, -0.675912082195282, 0.2652813196182251, 0.4472070336341858, 0.0485733225941658, 0.13688017427921295, 0.07079929113388062, 0.20044530928134918, 0.15002353489398956, 0.5890932679176331, -0.27261295914649963, -0.02482788637280464, 0.08077199757099152, -0.3605749011039734, 0.2826237380504608, -0.14551594853401184, -0.05667923763394356, 0.37613049149513245, 0.11875918507575989, 0.26122358441352844, 0.07844868302345276, 0.02881905436515808, 0.25123754143714905, -0.3393227458000183, -0.060177333652973175, -0.3511750400066376, -0.07767780870199203, -0.20485197007656097, -0.24881167709827423, -0.06902353465557098, -0.2612822949886322, 0.18141812086105347, 0.1598379909992218, 0.1416015625, -0.028865991160273552, -0.11533049494028091, 0.03588877618312836, 0.07935234904289246, -0.11586491763591766, 0.27221331000328064, 0.3624477684497833, -0.035718221217393875, -0.11867761611938477, -0.07178899645805359, -0.05951274186372757, -0.42570632696151733, 0.3827372193336487, -0.19036772847175598, 0.15982787311077118, -0.037908487021923065, 0.28046250343322754, 0.03098948672413826, 0.03170231729745865, 0.10894475877285004, 0.08867067098617554, -0.41397082805633545, 0.524803638458252, -0.37364739179611206, 0.009596556425094604, -0.12216515094041824, 0.11189274489879608, 0.08609653264284134, 0.1526603400707245, -0.14054039120674133, -0.5699783563613892, 0.16644665598869324, 0.004697397351264954, -0.3122807741165161, -0.17423248291015625, 0.09573126584291458, 0.3337227404117584, 0.20564045011997223, -0.39359205961227417, -0.2890397608280182, 0.30505093932151794, -0.1897129863500595, 0.2157478630542755, -0.17477762699127197, 0.17782175540924072, -0.15184570848941803, -0.12623295187950134, 0.37988710403442383, -0.18055550754070282, 0.00033865123987197876, 0.050458356738090515, -0.01331939548254013 ]
https://github.com/huggingface/datasets/issues/6460
Hi @serenalotreck, We use Apache Arrow `pyarrow` to read jsonlines and it throws an error when trying to load your data files: ```python In [1]: import pyarrow as pa In [2]: data = pa.json.read_json("train.jsonl") --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <ipython-input-14-e9b104832528> in <module> ----> 1 data = pa.json.read_json("train.jsonl") .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 ``` I think it has to do with the data structure of the fields "ner" (and also "relations"): ```json "ner": [ [ [0, 4, "Biochemical_process"], [15, 16, "Protein"] ], ``` Arrow interprets this data structure as an array, an arrays contain just a single data type: - when reading sequentially, it finds first the `0` and infers that the data is of type `number`; - when it finds the string `"Biochemical_process"`, it cannot cast it to number and throws the `ArrowInvalid` error One solution could be to change the data structure of your data files. Any other ideas, @huggingface/datasets ?
jsonlines files don't load with `load_dataset`
### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
171
jsonlines files don't load with `load_dataset` ### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 Hi @serenalotreck, We use Apache Arrow `pyarrow` to read jsonlines and it throws an error when trying to load your data files: ```python In [1]: import pyarrow as pa In [2]: data = pa.json.read_json("train.jsonl") --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) <ipython-input-14-e9b104832528> in <module> ----> 1 data = pa.json.read_json("train.jsonl") .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() .../huggingface/datasets/venv/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 ``` I think it has to do with the data structure of the fields "ner" (and also "relations"): ```json "ner": [ [ [0, 4, "Biochemical_process"], [15, 16, "Protein"] ], ``` Arrow interprets this data structure as an array, an arrays contain just a single data type: - when reading sequentially, it finds first the `0` and infers that the data is of type `number`; - when it finds the string `"Biochemical_process"`, it cannot cast it to number and throws the `ArrowInvalid` error One solution could be to change the data structure of your data files. Any other ideas, @huggingface/datasets ?
[ -0.2301376760005951, 0.12285783886909485, -0.048369962722063065, 0.44046539068222046, 0.25598087906837463, 0.032171137630939484, 0.19228532910346985, 0.19167578220367432, 0.2536109685897827, -0.10145919024944305, 0.21212723851203918, 0.3888658881187439, -0.1920369565486908, 0.36853528022766113, -0.011028291657567024, -0.14814990758895874, 0.004168704152107239, 0.08705280721187592, -0.06175582483410835, 0.06585150957107544, -0.2930654287338257, 0.4825320243835449, -0.12577088177204132, -0.2876797616481781, -0.3300366997718811, 0.20288719236850739, 0.1551155000925064, 0.31560349464416504, -0.20790091156959534, -0.3987043797969818, 0.35157546401023865, 0.043369926512241364, 0.15890812873840332, 0.5264837145805359, -0.00011432376777520403, 0.2167341411113739, 0.2766035199165344, -0.10340568423271179, -0.28540903329849243, -0.4744982421398163, -0.4354293644428253, -0.3592347204685211, 0.20565979182720184, -0.12188678979873657, 0.0255974680185318, -0.057124532759189606, -0.06398715823888779, -0.4945876896381378, 0.6206579208374023, 0.2999453842639923, 0.21323838829994202, 0.42401567101478577, 0.20004595816135406, 0.00612996518611908, 0.19547361135482788, 0.3159928321838379, -0.08488231152296066, 0.5176389813423157, -0.019006386399269104, 0.30080699920654297, 0.05285438895225525, 0.09206700325012207, 0.061307258903980255, -0.13582682609558105, 0.33503803610801697, -0.016124103218317032, -0.3395821750164032, -0.04970335215330124, 0.09164940565824509, 0.29327383637428284, 0.2817539572715759, -0.17623473703861237, -0.3398975729942322, -0.5134024024009705, -0.08153936266899109, -0.31680941581726074, 0.5144972205162048, 0.006754618138074875, -0.02902543917298317, 0.10368935763835907, -0.2740059792995453, -0.16540920734405518, -0.07543498277664185, 0.05499492213129997, 0.02594830095767975, -0.20279687643051147, -0.25539547204971313, -0.009640470147132874, 0.16675937175750732, 0.015619395300745964, -0.2073851376771927, 0.10044999420642853, -0.2053884118795395, 0.22936706244945526, -0.12631919980049133, 0.16434311866760254, 0.03683203458786011, -0.3876149356365204, 0.3063932955265045, 0.327863484621048, 0.0689418837428093, -0.05616733059287071, -0.34691277146339417, 0.09098052978515625, 0.31034567952156067, 0.2237655222415924, 0.08497180789709091, -0.16012153029441833, 0.20159496366977692, 0.3660428822040558, 0.0026561692357063293, -0.13085788488388062, -0.16736893355846405, -0.08507005870342255, -0.2353791445493698, -0.10783563554286957, 0.2791041135787964, -0.16004802286624908, -0.16545137763023376, 0.17736563086509705, -0.30597400665283203, -0.28500986099243164, -0.0024182572960853577, 0.2807214856147766, 0.010627686977386475, 0.24693024158477783, 0.2344258725643158, 0.23084980249404907, 0.06152894347906113, -0.12820777297019958, -0.1534648984670639, -0.00601092167198658, -0.09311248362064362, 0.014515344053506851, 0.18436604738235474, -0.24471212923526764, 0.41176435351371765, 0.07668670266866684, -0.14603155851364136, -0.1822872906923294, -0.08000965416431427, 0.10192051529884338, -0.1853664070367813, 0.12262098491191864, 0.15326958894729614, 0.017455540597438812, 0.0710805207490921, -0.10697468370199203, -0.10262157022953033, 0.029737895354628563, -0.3839442729949951, -0.026868104934692383, -0.14751386642456055, 0.1672704815864563, -0.28068554401397705, -0.06506876647472382, -0.6126499176025391, 0.024949004873633385, -0.1666679084300995, -0.037567686289548874, 0.12080386281013489, -0.032942838966846466, 0.10325707495212555, -0.12479791790246964, 0.33856281638145447, 0.38423094153404236, -0.3600499927997589, -0.24723854660987854, 0.14040586352348328, -0.2597775459289551, 0.15089592337608337, 0.20674735307693481, -0.16721145808696747, 0.15960443019866943, -0.3503991663455963, 0.2761915922164917, 0.29760533571243286, -0.08912964910268784, -0.2591822147369385, 0.3078206181526184, -0.08967962116003036, 0.44879430532455444, 0.04069637507200241, -0.19008664786815643, 0.12328885495662689, 0.17875458300113678, 0.1844986379146576, 0.23866963386535645, 0.21687406301498413, 0.14103353023529053, -0.11487770080566406, -0.2637752294540405, 0.11966633796691895, 0.2191600501537323, -0.1874101161956787, -0.008503567427396774, -0.00693560391664505, 0.18316711485385895, 0.33689627051353455, -0.009793931618332863, -0.11830561608076096, 0.27371251583099365, 0.01490017306059599, 0.18169370293617249, 0.017656609416007996, 0.026287615299224854, -0.7521731853485107, 0.0856412798166275, -0.1033271923661232, 0.00399303063750267, -0.2349568009376526, -0.07457538694143295, -0.2460046410560608, 0.1403312385082245, -0.27199503779411316, -0.24725832045078278, 0.08910126984119415, 0.14886102080345154, 0.1921451836824417, 0.23873138427734375, -0.4370029866695404, 0.2790200710296631, -0.08640420436859131, 0.2779591381549835, -0.5995003581047058, 0.35891470313072205, 0.1400269716978073, -0.1287885308265686, 0.14560100436210632, 0.3055154085159302, -0.03188183531165123, -0.406351238489151, -0.2225993573665619, 0.3179190158843994, 0.19522738456726074, 0.04171382263302803, -0.114478200674057, 0.1258365958929062, 0.14184917509555817, -0.04315074533224106, -0.2193605750799179, 0.12255223095417023, 0.06070207804441452, -0.028398238122463226, -0.24976016581058502, 0.2424517124891281, -0.12795555591583252, 0.3297531008720398, 0.12965965270996094, -0.12854522466659546, 0.16678933799266815, 0.01857054978609085, -0.179159015417099, -0.10798578709363937, 0.3472799062728882, 0.275931179523468, 0.2687148451805115, 0.047954559326171875, -0.1379675567150116, -0.12867099046707153, 0.7998285889625549, 0.011514998972415924, 0.02240443229675293, 0.27388137578964233, -0.05506113916635513, -0.028032436966896057, 0.11604124307632446, 0.12667852640151978, 0.24430963397026062, 0.11296053230762482, 0.0004658494144678116, 0.19186751544475555, 0.05596311017870903, -0.29940682649612427, 0.18219736218452454, 0.013921711593866348, -0.013087660074234009, 0.20487049221992493, 0.07336418330669403, 0.0007955804467201233, -0.4659144878387451, -0.24633480608463287, -0.2551076412200928, 0.24762022495269775, -0.35131800174713135, 0.10532551258802414, -0.45538124442100525, -0.10146007686853409, -0.1335967779159546, -0.171315535902977, -0.5278864502906799, -0.36694878339767456, -0.2872798442840576, 0.09322211146354675, -0.08492888510227203, -0.014864884316921234, -0.3036702275276184, 0.04771449416875839, -0.03381459787487984, -0.2658482491970062, -0.2685377299785614, 0.06668165326118469, -0.2752646803855896, 0.050593987107276917, 0.4722765386104584, -0.05752646550536156, 0.10135581344366074, -0.1912039965391159, -0.004189655184745789, -0.08165985345840454, -0.1422785073518753, 0.17324265837669373, -0.1922004222869873, 0.13219036161899567, 0.3880132734775543, 0.36119475960731506, -0.06921985000371933, -0.20282307267189026, 0.2469979226589203, 0.08447101712226868, -0.2827546298503876, -0.013778649270534515, 0.01872747391462326, 0.04420359432697296, -0.28457650542259216, -0.3295977711677551, 0.11776598542928696, -0.4701540470123291, 0.7083843946456909, -0.05820810794830322, -0.02443356066942215, 0.22255761921405792, 0.0512523353099823, 0.4339565932750702, -0.0636214166879654, 0.06466323137283325, -0.10900844633579254, -0.5038892030715942, 0.22995531558990479, -0.17091265320777893, -0.3370620012283325, 0.21572858095169067, 0.0601360946893692, 0.26194459199905396, -0.17139506340026855, -0.5283803343772888, 0.017045579850673676, -0.11507359892129898, 0.2520383894443512, -0.017832785844802856, -0.022387126460671425, 0.14861688017845154, -0.12039235234260559, 0.0643405020236969, -0.13338600099086761, -0.12681864202022552, 0.2369241565465927, -0.24529889225959778, 0.11890257894992828, 0.08820738643407822, 0.7091602087020874, -0.10506672412157059, -0.019288167357444763, 0.4503828287124634, 0.03413846343755722, 0.5685427188873291, -0.12241943925619125, 0.36332353949546814, -0.2849853038787842, -0.20431852340698242, -0.15628565847873688, -0.009565792977809906, 0.07695269584655762, 0.05894208699464798, 0.2706044316291809, 0.2762213945388794, -0.223199263215065, -0.0062358081340789795, -0.27643102407455444, -0.22371748089790344, 0.15834100544452667, 0.05862148106098175, -0.059799980372190475, -0.17064319550991058, 0.08985619246959686, 0.09053172171115875, 0.09379059076309204, -0.01582111045718193, 0.385454386472702, 0.3200930953025818, 0.06214072182774544, -0.6170752048492432, -0.07692569494247437, -0.45512962341308594, 0.2125665247440338, -0.0008015856146812439, 0.32780101895332336, -0.03177199512720108, 0.02285762131214142, 0.14291995763778687, -0.28588980436325073, 0.7596273422241211, 0.14432372152805328, -0.10302475839853287, 0.10584555566310883, 0.13095234334468842, -0.3242335319519043, 0.12137934565544128, 0.1023927628993988, 0.12533904612064362, 0.541663646697998, 0.3477919101715088, -0.37426766753196716, -0.15841984748840332, 0.26748141646385193, 0.09247134625911713, -0.004883177578449249, -0.22843366861343384, -0.2695280611515045, -0.46466708183288574, -0.2518213391304016, -0.1876204013824463, 0.019676722586154938, 0.3797452449798584, 0.024883762001991272, -0.15068793296813965, 0.1376420259475708, -0.5244581699371338, -0.00653480738401413, 0.20296907424926758, 0.28463155031204224, 0.025061462074518204, 0.09616260230541229, 0.2661898136138916, 0.23935677111148834, 0.20382043719291687, 0.8906217217445374, -0.028678612783551216, -0.48152098059654236, 0.11623989045619965, -0.10777835547924042, 0.3585924804210663, 0.043340880423784256, -0.12591157853603363, 0.19073323905467987, 0.09482520818710327, 0.026219265535473824, -0.08432847261428833, 0.06160469353199005, 0.402235746383667, -0.06341138482093811, -0.1231207400560379, -0.49146145582199097, 0.5422189235687256, 0.05723537504673004, 0.25372958183288574, 0.05092601850628853, 0.14018024504184723, -0.2776532769203186, 0.10844022035598755, -0.27532464265823364, 0.6423540115356445, 0.23023772239685059, 0.08481411635875702, 0.5401002168655396, -0.25236034393310547, 0.5430940985679626, -0.35204991698265076, -0.13201949000358582, -0.19707506895065308, 0.2310771644115448, -0.05093429237604141, -0.06585980206727982, 0.20420396327972412, 0.045848965644836426, -0.00022312253713607788, 0.03278044983744621, -0.11402908712625504, -0.15768170356750488, -0.06478329747915268, 0.2883269190788269, -0.2875094711780548, -0.18755081295967102, -0.7293281555175781, 0.1241358071565628, 0.008849795907735825, 0.11464546620845795, 0.02008713409304619, -0.17837296426296234, -0.05251390486955643, -0.49953269958496094, -0.38229233026504517, 0.19612136483192444, -0.11122619360685349, -0.002521280199289322, 0.30984756350517273, 0.026110246777534485, 0.10153678804636002, 0.05926987901329994, 0.06978443264961243, -0.027186810970306396, -0.14053349196910858, 0.13423404097557068, -0.20487776398658752, -0.04980264604091644, 0.03893645480275154, 0.17483735084533691, 0.3111936151981354, -0.1944887340068817, -0.08234883844852448, 0.10696737468242645, -0.17963548004627228, -0.505649209022522, 0.032945215702056885, 0.13498464226722717, -0.20140612125396729, -0.2556959390640259, -0.09878905117511749, 0.09031574428081512, 0.32325780391693115, -0.13904505968093872, 0.09348570555448532, 0.25758153200149536, 0.13649490475654602, -0.19691985845565796, 0.04765103757381439, -0.18601635098457336, -0.18724647164344788, 0.32636961340904236, -0.18657436966896057, -0.1615287810564041, 0.43610477447509766, 0.41048336029052734, -0.10374815762042999, -0.13570895791053772, 0.2905907928943634, 0.5397544503211975, -0.4035651683807373, 0.14552041888237, 0.13160288333892822, 0.17106764018535614, -0.17542490363121033, 0.3037150502204895, 0.07025998830795288, -0.09148348867893219, 0.17558318376541138, -0.5147280097007751, -0.2694881856441498, 0.22009241580963135, 0.0645374208688736, 0.18047642707824707, 0.009424731135368347, -0.03210976719856262, -0.06146704778075218, -0.3532622456550598, -0.22663861513137817, 0.10511846095323563, -0.06065458059310913, -0.22680437564849854, 0.3242165148258209, -0.04880155995488167, 0.5696452260017395, -0.08598461747169495, 0.12475475668907166, 0.20216389000415802, -0.2130528688430786, -0.1266888678073883, -0.262836754322052, 0.07942458987236023, 0.1157945841550827, -0.15912315249443054, -0.14642910659313202, 0.061718329787254333, -0.2524518668651581, -0.08139634877443314, 0.19060274958610535, -0.055018071085214615, -0.1101301908493042, 0.06642366200685501, 0.11531809717416763, 0.21095679700374603, -0.18661150336265564, 0.02849508449435234, 0.07861433923244476, 0.35855627059936523, 0.0899999737739563, -0.0009174493607133627, -0.21650758385658264, 0.1417877972126007, -0.24971261620521545, 0.14168186485767365, 0.13441452383995056, 0.15108293294906616, 0.26997479796409607, -0.4051637649536133, 0.04634693264961243, 0.15076658129692078, 0.13581687211990356, 0.4696505069732666, -0.19482570886611938, 0.15333157777786255, 0.07235749065876007, 0.12997809052467346, -0.05472290888428688, 0.01101173460483551, 0.2720223367214203, 0.18259024620056152, -0.04660503566265106, 0.047138433903455734, 0.009770691394805908, 0.04065713286399841, -0.054783958941698074, 0.08999718725681305, 0.34295526146888733, 0.28865841031074524, 0.35815590620040894, 0.1900419443845749, -0.21717789769172668, 0.1106410101056099, -0.14880719780921936, 0.06883302330970764, 0.26782703399658203, 0.16297374665737152, -0.19628611207008362, 0.22513949871063232, -0.21669268608093262, 0.000303083099424839, -0.1024126410484314, -0.4691861867904663, -0.23913660645484924, 0.24166055023670197, -0.02774326503276825, 0.2785334289073944, -0.017977342009544373, 0.45575812458992004, -0.2643912434577942, -0.0005965977907180786, -0.30293962359428406, 0.18921297788619995, -0.11416751146316528, -0.12977910041809082, -0.12416594475507736, -0.19603443145751953, -0.3532142639160156, -0.0359930545091629, -0.08005058765411377, -0.004690844565629959, -0.08790416270494461, 0.008128244429826736, -0.1468127965927124, -0.3074861764907837, -0.08473892509937286, -0.0853385478258133, 0.007070571184158325, -0.10170116275548935, 0.4327397644519806, 0.3255680203437805, 0.003531740978360176, 0.24888922274112701, 0.08397440612316132, 0.29457661509513855, 0.1917094886302948, 0.2992593050003052, -0.2961867153644562, -0.2858145833015442, 0.07486056536436081, -0.08623244613409042, 0.43068528175354004, -0.1314283311367035, 0.0642784833908081, 0.19269053637981415, 0.1518014669418335, -0.16583634912967682, 0.1596219688653946, -0.06027481332421303, 0.36156514286994934, -0.35863834619522095, 0.3284108638763428, -0.45822280645370483, 0.15570609271526337, -0.27010318636894226, -0.17277340590953827, -0.2756945490837097, -0.3304736614227295, -0.016330374404788017, 0.11501306295394897, 0.005381185561418533, -0.26395341753959656, 0.07579220831394196, -0.04551685228943825, 0.4670085608959198, 0.4941006004810333, 0.10765136778354645, 0.1612970232963562, -0.1890290230512619, -0.49191975593566895, -0.07742513716220856, -0.10267266631126404, 0.026653409004211426, 0.06530031561851501, -0.04792960733175278, -0.09341920912265778, 0.16448146104812622, 0.15160642564296722, 0.3147983253002167, -0.1350640207529068, -0.2298169583082199, -0.2712253928184509, -0.2077159732580185, 0.2582932114601135, -0.13965144753456116, -0.1148378998041153, -0.0200677290558815, 0.22090238332748413, -0.050541818141937256, -0.06218409538269043, -0.13175249099731445, 0.13702136278152466, -0.2405914068222046, -0.1268274486064911, 0.3775869607925415, 0.21603146195411682, 0.3346267342567444, -0.10398723930120468, -0.39992743730545044, -0.44196629524230957, -0.23674723505973816, -0.010187141597270966, 0.4026927947998047, -0.06943926960229874, 0.6453307867050171, -0.21400147676467896, -0.07747994363307953, -0.35793131589889526, 0.30400651693344116, -0.16625796258449554, -0.36099010705947876, -0.32954496145248413, 0.19439369440078735, -0.18368998169898987, 0.14065217971801758, 0.15356458723545074, 0.08572889864444733, -0.09813687950372696, 0.16697734594345093, -0.05500186234712601, -0.10481363534927368, 0.3618800640106201, -0.35405436158180237, -0.07478220760822296, 0.11728960275650024, -0.020389370620250702, 0.14139409363269806, -0.21345633268356323, -0.6122729182243347, 0.04380190372467041, 0.34976926445961, 0.11156199872493744, -0.15115605294704437, 0.23207537829875946, -0.07119317352771759, -0.14250215888023376, -0.0831480473279953, 0.5256014466285706, 0.10403040796518326, -0.2515396177768707, 0.5749446749687195, -0.08532547205686569 ]
https://github.com/huggingface/datasets/issues/6460
Hi @albertvillanova, Thanks for the explanation! To the best of my knowledge, arrays in a json [can contain multiple data types](https://docs.actian.com/ingres/11.2/index.html#page/SQLRef/Data_Types.htm), and I'm able to read these files with the `jsonlines` package. Is the requirement for arrays to only have one data type specific to PyArrow? I'd prefer to keep the data structure as is, since it's a specific input requirement for the models this data was generated for. Any thoughts on how to enable the use of `load_dataset` with this dataset would be great!
jsonlines files don't load with `load_dataset`
### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
85
jsonlines files don't load with `load_dataset` ### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 Hi @albertvillanova, Thanks for the explanation! To the best of my knowledge, arrays in a json [can contain multiple data types](https://docs.actian.com/ingres/11.2/index.html#page/SQLRef/Data_Types.htm), and I'm able to read these files with the `jsonlines` package. Is the requirement for arrays to only have one data type specific to PyArrow? I'd prefer to keep the data structure as is, since it's a specific input requirement for the models this data was generated for. Any thoughts on how to enable the use of `load_dataset` with this dataset would be great!
[ -0.2301376760005951, 0.12285783886909485, -0.048369962722063065, 0.44046539068222046, 0.25598087906837463, 0.032171137630939484, 0.19228532910346985, 0.19167578220367432, 0.2536109685897827, -0.10145919024944305, 0.21212723851203918, 0.3888658881187439, -0.1920369565486908, 0.36853528022766113, -0.011028291657567024, -0.14814990758895874, 0.004168704152107239, 0.08705280721187592, -0.06175582483410835, 0.06585150957107544, -0.2930654287338257, 0.4825320243835449, -0.12577088177204132, -0.2876797616481781, -0.3300366997718811, 0.20288719236850739, 0.1551155000925064, 0.31560349464416504, -0.20790091156959534, -0.3987043797969818, 0.35157546401023865, 0.043369926512241364, 0.15890812873840332, 0.5264837145805359, -0.00011432376777520403, 0.2167341411113739, 0.2766035199165344, -0.10340568423271179, -0.28540903329849243, -0.4744982421398163, -0.4354293644428253, -0.3592347204685211, 0.20565979182720184, -0.12188678979873657, 0.0255974680185318, -0.057124532759189606, -0.06398715823888779, -0.4945876896381378, 0.6206579208374023, 0.2999453842639923, 0.21323838829994202, 0.42401567101478577, 0.20004595816135406, 0.00612996518611908, 0.19547361135482788, 0.3159928321838379, -0.08488231152296066, 0.5176389813423157, -0.019006386399269104, 0.30080699920654297, 0.05285438895225525, 0.09206700325012207, 0.061307258903980255, -0.13582682609558105, 0.33503803610801697, -0.016124103218317032, -0.3395821750164032, -0.04970335215330124, 0.09164940565824509, 0.29327383637428284, 0.2817539572715759, -0.17623473703861237, -0.3398975729942322, -0.5134024024009705, -0.08153936266899109, -0.31680941581726074, 0.5144972205162048, 0.006754618138074875, -0.02902543917298317, 0.10368935763835907, -0.2740059792995453, -0.16540920734405518, -0.07543498277664185, 0.05499492213129997, 0.02594830095767975, -0.20279687643051147, -0.25539547204971313, -0.009640470147132874, 0.16675937175750732, 0.015619395300745964, -0.2073851376771927, 0.10044999420642853, -0.2053884118795395, 0.22936706244945526, -0.12631919980049133, 0.16434311866760254, 0.03683203458786011, -0.3876149356365204, 0.3063932955265045, 0.327863484621048, 0.0689418837428093, -0.05616733059287071, -0.34691277146339417, 0.09098052978515625, 0.31034567952156067, 0.2237655222415924, 0.08497180789709091, -0.16012153029441833, 0.20159496366977692, 0.3660428822040558, 0.0026561692357063293, -0.13085788488388062, -0.16736893355846405, -0.08507005870342255, -0.2353791445493698, -0.10783563554286957, 0.2791041135787964, -0.16004802286624908, -0.16545137763023376, 0.17736563086509705, -0.30597400665283203, -0.28500986099243164, -0.0024182572960853577, 0.2807214856147766, 0.010627686977386475, 0.24693024158477783, 0.2344258725643158, 0.23084980249404907, 0.06152894347906113, -0.12820777297019958, -0.1534648984670639, -0.00601092167198658, -0.09311248362064362, 0.014515344053506851, 0.18436604738235474, -0.24471212923526764, 0.41176435351371765, 0.07668670266866684, -0.14603155851364136, -0.1822872906923294, -0.08000965416431427, 0.10192051529884338, -0.1853664070367813, 0.12262098491191864, 0.15326958894729614, 0.017455540597438812, 0.0710805207490921, -0.10697468370199203, -0.10262157022953033, 0.029737895354628563, -0.3839442729949951, -0.026868104934692383, -0.14751386642456055, 0.1672704815864563, -0.28068554401397705, -0.06506876647472382, -0.6126499176025391, 0.024949004873633385, -0.1666679084300995, -0.037567686289548874, 0.12080386281013489, -0.032942838966846466, 0.10325707495212555, -0.12479791790246964, 0.33856281638145447, 0.38423094153404236, -0.3600499927997589, -0.24723854660987854, 0.14040586352348328, -0.2597775459289551, 0.15089592337608337, 0.20674735307693481, -0.16721145808696747, 0.15960443019866943, -0.3503991663455963, 0.2761915922164917, 0.29760533571243286, -0.08912964910268784, -0.2591822147369385, 0.3078206181526184, -0.08967962116003036, 0.44879430532455444, 0.04069637507200241, -0.19008664786815643, 0.12328885495662689, 0.17875458300113678, 0.1844986379146576, 0.23866963386535645, 0.21687406301498413, 0.14103353023529053, -0.11487770080566406, -0.2637752294540405, 0.11966633796691895, 0.2191600501537323, -0.1874101161956787, -0.008503567427396774, -0.00693560391664505, 0.18316711485385895, 0.33689627051353455, -0.009793931618332863, -0.11830561608076096, 0.27371251583099365, 0.01490017306059599, 0.18169370293617249, 0.017656609416007996, 0.026287615299224854, -0.7521731853485107, 0.0856412798166275, -0.1033271923661232, 0.00399303063750267, -0.2349568009376526, -0.07457538694143295, -0.2460046410560608, 0.1403312385082245, -0.27199503779411316, -0.24725832045078278, 0.08910126984119415, 0.14886102080345154, 0.1921451836824417, 0.23873138427734375, -0.4370029866695404, 0.2790200710296631, -0.08640420436859131, 0.2779591381549835, -0.5995003581047058, 0.35891470313072205, 0.1400269716978073, -0.1287885308265686, 0.14560100436210632, 0.3055154085159302, -0.03188183531165123, -0.406351238489151, -0.2225993573665619, 0.3179190158843994, 0.19522738456726074, 0.04171382263302803, -0.114478200674057, 0.1258365958929062, 0.14184917509555817, -0.04315074533224106, -0.2193605750799179, 0.12255223095417023, 0.06070207804441452, -0.028398238122463226, -0.24976016581058502, 0.2424517124891281, -0.12795555591583252, 0.3297531008720398, 0.12965965270996094, -0.12854522466659546, 0.16678933799266815, 0.01857054978609085, -0.179159015417099, -0.10798578709363937, 0.3472799062728882, 0.275931179523468, 0.2687148451805115, 0.047954559326171875, -0.1379675567150116, -0.12867099046707153, 0.7998285889625549, 0.011514998972415924, 0.02240443229675293, 0.27388137578964233, -0.05506113916635513, -0.028032436966896057, 0.11604124307632446, 0.12667852640151978, 0.24430963397026062, 0.11296053230762482, 0.0004658494144678116, 0.19186751544475555, 0.05596311017870903, -0.29940682649612427, 0.18219736218452454, 0.013921711593866348, -0.013087660074234009, 0.20487049221992493, 0.07336418330669403, 0.0007955804467201233, -0.4659144878387451, -0.24633480608463287, -0.2551076412200928, 0.24762022495269775, -0.35131800174713135, 0.10532551258802414, -0.45538124442100525, -0.10146007686853409, -0.1335967779159546, -0.171315535902977, -0.5278864502906799, -0.36694878339767456, -0.2872798442840576, 0.09322211146354675, -0.08492888510227203, -0.014864884316921234, -0.3036702275276184, 0.04771449416875839, -0.03381459787487984, -0.2658482491970062, -0.2685377299785614, 0.06668165326118469, -0.2752646803855896, 0.050593987107276917, 0.4722765386104584, -0.05752646550536156, 0.10135581344366074, -0.1912039965391159, -0.004189655184745789, -0.08165985345840454, -0.1422785073518753, 0.17324265837669373, -0.1922004222869873, 0.13219036161899567, 0.3880132734775543, 0.36119475960731506, -0.06921985000371933, -0.20282307267189026, 0.2469979226589203, 0.08447101712226868, -0.2827546298503876, -0.013778649270534515, 0.01872747391462326, 0.04420359432697296, -0.28457650542259216, -0.3295977711677551, 0.11776598542928696, -0.4701540470123291, 0.7083843946456909, -0.05820810794830322, -0.02443356066942215, 0.22255761921405792, 0.0512523353099823, 0.4339565932750702, -0.0636214166879654, 0.06466323137283325, -0.10900844633579254, -0.5038892030715942, 0.22995531558990479, -0.17091265320777893, -0.3370620012283325, 0.21572858095169067, 0.0601360946893692, 0.26194459199905396, -0.17139506340026855, -0.5283803343772888, 0.017045579850673676, -0.11507359892129898, 0.2520383894443512, -0.017832785844802856, -0.022387126460671425, 0.14861688017845154, -0.12039235234260559, 0.0643405020236969, -0.13338600099086761, -0.12681864202022552, 0.2369241565465927, -0.24529889225959778, 0.11890257894992828, 0.08820738643407822, 0.7091602087020874, -0.10506672412157059, -0.019288167357444763, 0.4503828287124634, 0.03413846343755722, 0.5685427188873291, -0.12241943925619125, 0.36332353949546814, -0.2849853038787842, -0.20431852340698242, -0.15628565847873688, -0.009565792977809906, 0.07695269584655762, 0.05894208699464798, 0.2706044316291809, 0.2762213945388794, -0.223199263215065, -0.0062358081340789795, -0.27643102407455444, -0.22371748089790344, 0.15834100544452667, 0.05862148106098175, -0.059799980372190475, -0.17064319550991058, 0.08985619246959686, 0.09053172171115875, 0.09379059076309204, -0.01582111045718193, 0.385454386472702, 0.3200930953025818, 0.06214072182774544, -0.6170752048492432, -0.07692569494247437, -0.45512962341308594, 0.2125665247440338, -0.0008015856146812439, 0.32780101895332336, -0.03177199512720108, 0.02285762131214142, 0.14291995763778687, -0.28588980436325073, 0.7596273422241211, 0.14432372152805328, -0.10302475839853287, 0.10584555566310883, 0.13095234334468842, -0.3242335319519043, 0.12137934565544128, 0.1023927628993988, 0.12533904612064362, 0.541663646697998, 0.3477919101715088, -0.37426766753196716, -0.15841984748840332, 0.26748141646385193, 0.09247134625911713, -0.004883177578449249, -0.22843366861343384, -0.2695280611515045, -0.46466708183288574, -0.2518213391304016, -0.1876204013824463, 0.019676722586154938, 0.3797452449798584, 0.024883762001991272, -0.15068793296813965, 0.1376420259475708, -0.5244581699371338, -0.00653480738401413, 0.20296907424926758, 0.28463155031204224, 0.025061462074518204, 0.09616260230541229, 0.2661898136138916, 0.23935677111148834, 0.20382043719291687, 0.8906217217445374, -0.028678612783551216, -0.48152098059654236, 0.11623989045619965, -0.10777835547924042, 0.3585924804210663, 0.043340880423784256, -0.12591157853603363, 0.19073323905467987, 0.09482520818710327, 0.026219265535473824, -0.08432847261428833, 0.06160469353199005, 0.402235746383667, -0.06341138482093811, -0.1231207400560379, -0.49146145582199097, 0.5422189235687256, 0.05723537504673004, 0.25372958183288574, 0.05092601850628853, 0.14018024504184723, -0.2776532769203186, 0.10844022035598755, -0.27532464265823364, 0.6423540115356445, 0.23023772239685059, 0.08481411635875702, 0.5401002168655396, -0.25236034393310547, 0.5430940985679626, -0.35204991698265076, -0.13201949000358582, -0.19707506895065308, 0.2310771644115448, -0.05093429237604141, -0.06585980206727982, 0.20420396327972412, 0.045848965644836426, -0.00022312253713607788, 0.03278044983744621, -0.11402908712625504, -0.15768170356750488, -0.06478329747915268, 0.2883269190788269, -0.2875094711780548, -0.18755081295967102, -0.7293281555175781, 0.1241358071565628, 0.008849795907735825, 0.11464546620845795, 0.02008713409304619, -0.17837296426296234, -0.05251390486955643, -0.49953269958496094, -0.38229233026504517, 0.19612136483192444, -0.11122619360685349, -0.002521280199289322, 0.30984756350517273, 0.026110246777534485, 0.10153678804636002, 0.05926987901329994, 0.06978443264961243, -0.027186810970306396, -0.14053349196910858, 0.13423404097557068, -0.20487776398658752, -0.04980264604091644, 0.03893645480275154, 0.17483735084533691, 0.3111936151981354, -0.1944887340068817, -0.08234883844852448, 0.10696737468242645, -0.17963548004627228, -0.505649209022522, 0.032945215702056885, 0.13498464226722717, -0.20140612125396729, -0.2556959390640259, -0.09878905117511749, 0.09031574428081512, 0.32325780391693115, -0.13904505968093872, 0.09348570555448532, 0.25758153200149536, 0.13649490475654602, -0.19691985845565796, 0.04765103757381439, -0.18601635098457336, -0.18724647164344788, 0.32636961340904236, -0.18657436966896057, -0.1615287810564041, 0.43610477447509766, 0.41048336029052734, -0.10374815762042999, -0.13570895791053772, 0.2905907928943634, 0.5397544503211975, -0.4035651683807373, 0.14552041888237, 0.13160288333892822, 0.17106764018535614, -0.17542490363121033, 0.3037150502204895, 0.07025998830795288, -0.09148348867893219, 0.17558318376541138, -0.5147280097007751, -0.2694881856441498, 0.22009241580963135, 0.0645374208688736, 0.18047642707824707, 0.009424731135368347, -0.03210976719856262, -0.06146704778075218, -0.3532622456550598, -0.22663861513137817, 0.10511846095323563, -0.06065458059310913, -0.22680437564849854, 0.3242165148258209, -0.04880155995488167, 0.5696452260017395, -0.08598461747169495, 0.12475475668907166, 0.20216389000415802, -0.2130528688430786, -0.1266888678073883, -0.262836754322052, 0.07942458987236023, 0.1157945841550827, -0.15912315249443054, -0.14642910659313202, 0.061718329787254333, -0.2524518668651581, -0.08139634877443314, 0.19060274958610535, -0.055018071085214615, -0.1101301908493042, 0.06642366200685501, 0.11531809717416763, 0.21095679700374603, -0.18661150336265564, 0.02849508449435234, 0.07861433923244476, 0.35855627059936523, 0.0899999737739563, -0.0009174493607133627, -0.21650758385658264, 0.1417877972126007, -0.24971261620521545, 0.14168186485767365, 0.13441452383995056, 0.15108293294906616, 0.26997479796409607, -0.4051637649536133, 0.04634693264961243, 0.15076658129692078, 0.13581687211990356, 0.4696505069732666, -0.19482570886611938, 0.15333157777786255, 0.07235749065876007, 0.12997809052467346, -0.05472290888428688, 0.01101173460483551, 0.2720223367214203, 0.18259024620056152, -0.04660503566265106, 0.047138433903455734, 0.009770691394805908, 0.04065713286399841, -0.054783958941698074, 0.08999718725681305, 0.34295526146888733, 0.28865841031074524, 0.35815590620040894, 0.1900419443845749, -0.21717789769172668, 0.1106410101056099, -0.14880719780921936, 0.06883302330970764, 0.26782703399658203, 0.16297374665737152, -0.19628611207008362, 0.22513949871063232, -0.21669268608093262, 0.000303083099424839, -0.1024126410484314, -0.4691861867904663, -0.23913660645484924, 0.24166055023670197, -0.02774326503276825, 0.2785334289073944, -0.017977342009544373, 0.45575812458992004, -0.2643912434577942, -0.0005965977907180786, -0.30293962359428406, 0.18921297788619995, -0.11416751146316528, -0.12977910041809082, -0.12416594475507736, -0.19603443145751953, -0.3532142639160156, -0.0359930545091629, -0.08005058765411377, -0.004690844565629959, -0.08790416270494461, 0.008128244429826736, -0.1468127965927124, -0.3074861764907837, -0.08473892509937286, -0.0853385478258133, 0.007070571184158325, -0.10170116275548935, 0.4327397644519806, 0.3255680203437805, 0.003531740978360176, 0.24888922274112701, 0.08397440612316132, 0.29457661509513855, 0.1917094886302948, 0.2992593050003052, -0.2961867153644562, -0.2858145833015442, 0.07486056536436081, -0.08623244613409042, 0.43068528175354004, -0.1314283311367035, 0.0642784833908081, 0.19269053637981415, 0.1518014669418335, -0.16583634912967682, 0.1596219688653946, -0.06027481332421303, 0.36156514286994934, -0.35863834619522095, 0.3284108638763428, -0.45822280645370483, 0.15570609271526337, -0.27010318636894226, -0.17277340590953827, -0.2756945490837097, -0.3304736614227295, -0.016330374404788017, 0.11501306295394897, 0.005381185561418533, -0.26395341753959656, 0.07579220831394196, -0.04551685228943825, 0.4670085608959198, 0.4941006004810333, 0.10765136778354645, 0.1612970232963562, -0.1890290230512619, -0.49191975593566895, -0.07742513716220856, -0.10267266631126404, 0.026653409004211426, 0.06530031561851501, -0.04792960733175278, -0.09341920912265778, 0.16448146104812622, 0.15160642564296722, 0.3147983253002167, -0.1350640207529068, -0.2298169583082199, -0.2712253928184509, -0.2077159732580185, 0.2582932114601135, -0.13965144753456116, -0.1148378998041153, -0.0200677290558815, 0.22090238332748413, -0.050541818141937256, -0.06218409538269043, -0.13175249099731445, 0.13702136278152466, -0.2405914068222046, -0.1268274486064911, 0.3775869607925415, 0.21603146195411682, 0.3346267342567444, -0.10398723930120468, -0.39992743730545044, -0.44196629524230957, -0.23674723505973816, -0.010187141597270966, 0.4026927947998047, -0.06943926960229874, 0.6453307867050171, -0.21400147676467896, -0.07747994363307953, -0.35793131589889526, 0.30400651693344116, -0.16625796258449554, -0.36099010705947876, -0.32954496145248413, 0.19439369440078735, -0.18368998169898987, 0.14065217971801758, 0.15356458723545074, 0.08572889864444733, -0.09813687950372696, 0.16697734594345093, -0.05500186234712601, -0.10481363534927368, 0.3618800640106201, -0.35405436158180237, -0.07478220760822296, 0.11728960275650024, -0.020389370620250702, 0.14139409363269806, -0.21345633268356323, -0.6122729182243347, 0.04380190372467041, 0.34976926445961, 0.11156199872493744, -0.15115605294704437, 0.23207537829875946, -0.07119317352771759, -0.14250215888023376, -0.0831480473279953, 0.5256014466285706, 0.10403040796518326, -0.2515396177768707, 0.5749446749687195, -0.08532547205686569 ]
https://github.com/huggingface/datasets/issues/6460
Hi again @serenalotreck, Yes, it is specific to PyArrow: as far as I know, Arrow does not support arrays with multiple data types. As this is related specifically to your dataset structure (and not the `datasets` library), I have created a dedicated issue in your dataset page: https://huggingface.co/datasets/slotreck/pickle/discussions/1 Let's continue the discussion there! :hugs:
jsonlines files don't load with `load_dataset`
### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
54
jsonlines files don't load with `load_dataset` ### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 Hi again @serenalotreck, Yes, it is specific to PyArrow: as far as I know, Arrow does not support arrays with multiple data types. As this is related specifically to your dataset structure (and not the `datasets` library), I have created a dedicated issue in your dataset page: https://huggingface.co/datasets/slotreck/pickle/discussions/1 Let's continue the discussion there! :hugs:
[ -0.2301376760005951, 0.12285783886909485, -0.048369962722063065, 0.44046539068222046, 0.25598087906837463, 0.032171137630939484, 0.19228532910346985, 0.19167578220367432, 0.2536109685897827, -0.10145919024944305, 0.21212723851203918, 0.3888658881187439, -0.1920369565486908, 0.36853528022766113, -0.011028291657567024, -0.14814990758895874, 0.004168704152107239, 0.08705280721187592, -0.06175582483410835, 0.06585150957107544, -0.2930654287338257, 0.4825320243835449, -0.12577088177204132, -0.2876797616481781, -0.3300366997718811, 0.20288719236850739, 0.1551155000925064, 0.31560349464416504, -0.20790091156959534, -0.3987043797969818, 0.35157546401023865, 0.043369926512241364, 0.15890812873840332, 0.5264837145805359, -0.00011432376777520403, 0.2167341411113739, 0.2766035199165344, -0.10340568423271179, -0.28540903329849243, -0.4744982421398163, -0.4354293644428253, -0.3592347204685211, 0.20565979182720184, -0.12188678979873657, 0.0255974680185318, -0.057124532759189606, -0.06398715823888779, -0.4945876896381378, 0.6206579208374023, 0.2999453842639923, 0.21323838829994202, 0.42401567101478577, 0.20004595816135406, 0.00612996518611908, 0.19547361135482788, 0.3159928321838379, -0.08488231152296066, 0.5176389813423157, -0.019006386399269104, 0.30080699920654297, 0.05285438895225525, 0.09206700325012207, 0.061307258903980255, -0.13582682609558105, 0.33503803610801697, -0.016124103218317032, -0.3395821750164032, -0.04970335215330124, 0.09164940565824509, 0.29327383637428284, 0.2817539572715759, -0.17623473703861237, -0.3398975729942322, -0.5134024024009705, -0.08153936266899109, -0.31680941581726074, 0.5144972205162048, 0.006754618138074875, -0.02902543917298317, 0.10368935763835907, -0.2740059792995453, -0.16540920734405518, -0.07543498277664185, 0.05499492213129997, 0.02594830095767975, -0.20279687643051147, -0.25539547204971313, -0.009640470147132874, 0.16675937175750732, 0.015619395300745964, -0.2073851376771927, 0.10044999420642853, -0.2053884118795395, 0.22936706244945526, -0.12631919980049133, 0.16434311866760254, 0.03683203458786011, -0.3876149356365204, 0.3063932955265045, 0.327863484621048, 0.0689418837428093, -0.05616733059287071, -0.34691277146339417, 0.09098052978515625, 0.31034567952156067, 0.2237655222415924, 0.08497180789709091, -0.16012153029441833, 0.20159496366977692, 0.3660428822040558, 0.0026561692357063293, -0.13085788488388062, -0.16736893355846405, -0.08507005870342255, -0.2353791445493698, -0.10783563554286957, 0.2791041135787964, -0.16004802286624908, -0.16545137763023376, 0.17736563086509705, -0.30597400665283203, -0.28500986099243164, -0.0024182572960853577, 0.2807214856147766, 0.010627686977386475, 0.24693024158477783, 0.2344258725643158, 0.23084980249404907, 0.06152894347906113, -0.12820777297019958, -0.1534648984670639, -0.00601092167198658, -0.09311248362064362, 0.014515344053506851, 0.18436604738235474, -0.24471212923526764, 0.41176435351371765, 0.07668670266866684, -0.14603155851364136, -0.1822872906923294, -0.08000965416431427, 0.10192051529884338, -0.1853664070367813, 0.12262098491191864, 0.15326958894729614, 0.017455540597438812, 0.0710805207490921, -0.10697468370199203, -0.10262157022953033, 0.029737895354628563, -0.3839442729949951, -0.026868104934692383, -0.14751386642456055, 0.1672704815864563, -0.28068554401397705, -0.06506876647472382, -0.6126499176025391, 0.024949004873633385, -0.1666679084300995, -0.037567686289548874, 0.12080386281013489, -0.032942838966846466, 0.10325707495212555, -0.12479791790246964, 0.33856281638145447, 0.38423094153404236, -0.3600499927997589, -0.24723854660987854, 0.14040586352348328, -0.2597775459289551, 0.15089592337608337, 0.20674735307693481, -0.16721145808696747, 0.15960443019866943, -0.3503991663455963, 0.2761915922164917, 0.29760533571243286, -0.08912964910268784, -0.2591822147369385, 0.3078206181526184, -0.08967962116003036, 0.44879430532455444, 0.04069637507200241, -0.19008664786815643, 0.12328885495662689, 0.17875458300113678, 0.1844986379146576, 0.23866963386535645, 0.21687406301498413, 0.14103353023529053, -0.11487770080566406, -0.2637752294540405, 0.11966633796691895, 0.2191600501537323, -0.1874101161956787, -0.008503567427396774, -0.00693560391664505, 0.18316711485385895, 0.33689627051353455, -0.009793931618332863, -0.11830561608076096, 0.27371251583099365, 0.01490017306059599, 0.18169370293617249, 0.017656609416007996, 0.026287615299224854, -0.7521731853485107, 0.0856412798166275, -0.1033271923661232, 0.00399303063750267, -0.2349568009376526, -0.07457538694143295, -0.2460046410560608, 0.1403312385082245, -0.27199503779411316, -0.24725832045078278, 0.08910126984119415, 0.14886102080345154, 0.1921451836824417, 0.23873138427734375, -0.4370029866695404, 0.2790200710296631, -0.08640420436859131, 0.2779591381549835, -0.5995003581047058, 0.35891470313072205, 0.1400269716978073, -0.1287885308265686, 0.14560100436210632, 0.3055154085159302, -0.03188183531165123, -0.406351238489151, -0.2225993573665619, 0.3179190158843994, 0.19522738456726074, 0.04171382263302803, -0.114478200674057, 0.1258365958929062, 0.14184917509555817, -0.04315074533224106, -0.2193605750799179, 0.12255223095417023, 0.06070207804441452, -0.028398238122463226, -0.24976016581058502, 0.2424517124891281, -0.12795555591583252, 0.3297531008720398, 0.12965965270996094, -0.12854522466659546, 0.16678933799266815, 0.01857054978609085, -0.179159015417099, -0.10798578709363937, 0.3472799062728882, 0.275931179523468, 0.2687148451805115, 0.047954559326171875, -0.1379675567150116, -0.12867099046707153, 0.7998285889625549, 0.011514998972415924, 0.02240443229675293, 0.27388137578964233, -0.05506113916635513, -0.028032436966896057, 0.11604124307632446, 0.12667852640151978, 0.24430963397026062, 0.11296053230762482, 0.0004658494144678116, 0.19186751544475555, 0.05596311017870903, -0.29940682649612427, 0.18219736218452454, 0.013921711593866348, -0.013087660074234009, 0.20487049221992493, 0.07336418330669403, 0.0007955804467201233, -0.4659144878387451, -0.24633480608463287, -0.2551076412200928, 0.24762022495269775, -0.35131800174713135, 0.10532551258802414, -0.45538124442100525, -0.10146007686853409, -0.1335967779159546, -0.171315535902977, -0.5278864502906799, -0.36694878339767456, -0.2872798442840576, 0.09322211146354675, -0.08492888510227203, -0.014864884316921234, -0.3036702275276184, 0.04771449416875839, -0.03381459787487984, -0.2658482491970062, -0.2685377299785614, 0.06668165326118469, -0.2752646803855896, 0.050593987107276917, 0.4722765386104584, -0.05752646550536156, 0.10135581344366074, -0.1912039965391159, -0.004189655184745789, -0.08165985345840454, -0.1422785073518753, 0.17324265837669373, -0.1922004222869873, 0.13219036161899567, 0.3880132734775543, 0.36119475960731506, -0.06921985000371933, -0.20282307267189026, 0.2469979226589203, 0.08447101712226868, -0.2827546298503876, -0.013778649270534515, 0.01872747391462326, 0.04420359432697296, -0.28457650542259216, -0.3295977711677551, 0.11776598542928696, -0.4701540470123291, 0.7083843946456909, -0.05820810794830322, -0.02443356066942215, 0.22255761921405792, 0.0512523353099823, 0.4339565932750702, -0.0636214166879654, 0.06466323137283325, -0.10900844633579254, -0.5038892030715942, 0.22995531558990479, -0.17091265320777893, -0.3370620012283325, 0.21572858095169067, 0.0601360946893692, 0.26194459199905396, -0.17139506340026855, -0.5283803343772888, 0.017045579850673676, -0.11507359892129898, 0.2520383894443512, -0.017832785844802856, -0.022387126460671425, 0.14861688017845154, -0.12039235234260559, 0.0643405020236969, -0.13338600099086761, -0.12681864202022552, 0.2369241565465927, -0.24529889225959778, 0.11890257894992828, 0.08820738643407822, 0.7091602087020874, -0.10506672412157059, -0.019288167357444763, 0.4503828287124634, 0.03413846343755722, 0.5685427188873291, -0.12241943925619125, 0.36332353949546814, -0.2849853038787842, -0.20431852340698242, -0.15628565847873688, -0.009565792977809906, 0.07695269584655762, 0.05894208699464798, 0.2706044316291809, 0.2762213945388794, -0.223199263215065, -0.0062358081340789795, -0.27643102407455444, -0.22371748089790344, 0.15834100544452667, 0.05862148106098175, -0.059799980372190475, -0.17064319550991058, 0.08985619246959686, 0.09053172171115875, 0.09379059076309204, -0.01582111045718193, 0.385454386472702, 0.3200930953025818, 0.06214072182774544, -0.6170752048492432, -0.07692569494247437, -0.45512962341308594, 0.2125665247440338, -0.0008015856146812439, 0.32780101895332336, -0.03177199512720108, 0.02285762131214142, 0.14291995763778687, -0.28588980436325073, 0.7596273422241211, 0.14432372152805328, -0.10302475839853287, 0.10584555566310883, 0.13095234334468842, -0.3242335319519043, 0.12137934565544128, 0.1023927628993988, 0.12533904612064362, 0.541663646697998, 0.3477919101715088, -0.37426766753196716, -0.15841984748840332, 0.26748141646385193, 0.09247134625911713, -0.004883177578449249, -0.22843366861343384, -0.2695280611515045, -0.46466708183288574, -0.2518213391304016, -0.1876204013824463, 0.019676722586154938, 0.3797452449798584, 0.024883762001991272, -0.15068793296813965, 0.1376420259475708, -0.5244581699371338, -0.00653480738401413, 0.20296907424926758, 0.28463155031204224, 0.025061462074518204, 0.09616260230541229, 0.2661898136138916, 0.23935677111148834, 0.20382043719291687, 0.8906217217445374, -0.028678612783551216, -0.48152098059654236, 0.11623989045619965, -0.10777835547924042, 0.3585924804210663, 0.043340880423784256, -0.12591157853603363, 0.19073323905467987, 0.09482520818710327, 0.026219265535473824, -0.08432847261428833, 0.06160469353199005, 0.402235746383667, -0.06341138482093811, -0.1231207400560379, -0.49146145582199097, 0.5422189235687256, 0.05723537504673004, 0.25372958183288574, 0.05092601850628853, 0.14018024504184723, -0.2776532769203186, 0.10844022035598755, -0.27532464265823364, 0.6423540115356445, 0.23023772239685059, 0.08481411635875702, 0.5401002168655396, -0.25236034393310547, 0.5430940985679626, -0.35204991698265076, -0.13201949000358582, -0.19707506895065308, 0.2310771644115448, -0.05093429237604141, -0.06585980206727982, 0.20420396327972412, 0.045848965644836426, -0.00022312253713607788, 0.03278044983744621, -0.11402908712625504, -0.15768170356750488, -0.06478329747915268, 0.2883269190788269, -0.2875094711780548, -0.18755081295967102, -0.7293281555175781, 0.1241358071565628, 0.008849795907735825, 0.11464546620845795, 0.02008713409304619, -0.17837296426296234, -0.05251390486955643, -0.49953269958496094, -0.38229233026504517, 0.19612136483192444, -0.11122619360685349, -0.002521280199289322, 0.30984756350517273, 0.026110246777534485, 0.10153678804636002, 0.05926987901329994, 0.06978443264961243, -0.027186810970306396, -0.14053349196910858, 0.13423404097557068, -0.20487776398658752, -0.04980264604091644, 0.03893645480275154, 0.17483735084533691, 0.3111936151981354, -0.1944887340068817, -0.08234883844852448, 0.10696737468242645, -0.17963548004627228, -0.505649209022522, 0.032945215702056885, 0.13498464226722717, -0.20140612125396729, -0.2556959390640259, -0.09878905117511749, 0.09031574428081512, 0.32325780391693115, -0.13904505968093872, 0.09348570555448532, 0.25758153200149536, 0.13649490475654602, -0.19691985845565796, 0.04765103757381439, -0.18601635098457336, -0.18724647164344788, 0.32636961340904236, -0.18657436966896057, -0.1615287810564041, 0.43610477447509766, 0.41048336029052734, -0.10374815762042999, -0.13570895791053772, 0.2905907928943634, 0.5397544503211975, -0.4035651683807373, 0.14552041888237, 0.13160288333892822, 0.17106764018535614, -0.17542490363121033, 0.3037150502204895, 0.07025998830795288, -0.09148348867893219, 0.17558318376541138, -0.5147280097007751, -0.2694881856441498, 0.22009241580963135, 0.0645374208688736, 0.18047642707824707, 0.009424731135368347, -0.03210976719856262, -0.06146704778075218, -0.3532622456550598, -0.22663861513137817, 0.10511846095323563, -0.06065458059310913, -0.22680437564849854, 0.3242165148258209, -0.04880155995488167, 0.5696452260017395, -0.08598461747169495, 0.12475475668907166, 0.20216389000415802, -0.2130528688430786, -0.1266888678073883, -0.262836754322052, 0.07942458987236023, 0.1157945841550827, -0.15912315249443054, -0.14642910659313202, 0.061718329787254333, -0.2524518668651581, -0.08139634877443314, 0.19060274958610535, -0.055018071085214615, -0.1101301908493042, 0.06642366200685501, 0.11531809717416763, 0.21095679700374603, -0.18661150336265564, 0.02849508449435234, 0.07861433923244476, 0.35855627059936523, 0.0899999737739563, -0.0009174493607133627, -0.21650758385658264, 0.1417877972126007, -0.24971261620521545, 0.14168186485767365, 0.13441452383995056, 0.15108293294906616, 0.26997479796409607, -0.4051637649536133, 0.04634693264961243, 0.15076658129692078, 0.13581687211990356, 0.4696505069732666, -0.19482570886611938, 0.15333157777786255, 0.07235749065876007, 0.12997809052467346, -0.05472290888428688, 0.01101173460483551, 0.2720223367214203, 0.18259024620056152, -0.04660503566265106, 0.047138433903455734, 0.009770691394805908, 0.04065713286399841, -0.054783958941698074, 0.08999718725681305, 0.34295526146888733, 0.28865841031074524, 0.35815590620040894, 0.1900419443845749, -0.21717789769172668, 0.1106410101056099, -0.14880719780921936, 0.06883302330970764, 0.26782703399658203, 0.16297374665737152, -0.19628611207008362, 0.22513949871063232, -0.21669268608093262, 0.000303083099424839, -0.1024126410484314, -0.4691861867904663, -0.23913660645484924, 0.24166055023670197, -0.02774326503276825, 0.2785334289073944, -0.017977342009544373, 0.45575812458992004, -0.2643912434577942, -0.0005965977907180786, -0.30293962359428406, 0.18921297788619995, -0.11416751146316528, -0.12977910041809082, -0.12416594475507736, -0.19603443145751953, -0.3532142639160156, -0.0359930545091629, -0.08005058765411377, -0.004690844565629959, -0.08790416270494461, 0.008128244429826736, -0.1468127965927124, -0.3074861764907837, -0.08473892509937286, -0.0853385478258133, 0.007070571184158325, -0.10170116275548935, 0.4327397644519806, 0.3255680203437805, 0.003531740978360176, 0.24888922274112701, 0.08397440612316132, 0.29457661509513855, 0.1917094886302948, 0.2992593050003052, -0.2961867153644562, -0.2858145833015442, 0.07486056536436081, -0.08623244613409042, 0.43068528175354004, -0.1314283311367035, 0.0642784833908081, 0.19269053637981415, 0.1518014669418335, -0.16583634912967682, 0.1596219688653946, -0.06027481332421303, 0.36156514286994934, -0.35863834619522095, 0.3284108638763428, -0.45822280645370483, 0.15570609271526337, -0.27010318636894226, -0.17277340590953827, -0.2756945490837097, -0.3304736614227295, -0.016330374404788017, 0.11501306295394897, 0.005381185561418533, -0.26395341753959656, 0.07579220831394196, -0.04551685228943825, 0.4670085608959198, 0.4941006004810333, 0.10765136778354645, 0.1612970232963562, -0.1890290230512619, -0.49191975593566895, -0.07742513716220856, -0.10267266631126404, 0.026653409004211426, 0.06530031561851501, -0.04792960733175278, -0.09341920912265778, 0.16448146104812622, 0.15160642564296722, 0.3147983253002167, -0.1350640207529068, -0.2298169583082199, -0.2712253928184509, -0.2077159732580185, 0.2582932114601135, -0.13965144753456116, -0.1148378998041153, -0.0200677290558815, 0.22090238332748413, -0.050541818141937256, -0.06218409538269043, -0.13175249099731445, 0.13702136278152466, -0.2405914068222046, -0.1268274486064911, 0.3775869607925415, 0.21603146195411682, 0.3346267342567444, -0.10398723930120468, -0.39992743730545044, -0.44196629524230957, -0.23674723505973816, -0.010187141597270966, 0.4026927947998047, -0.06943926960229874, 0.6453307867050171, -0.21400147676467896, -0.07747994363307953, -0.35793131589889526, 0.30400651693344116, -0.16625796258449554, -0.36099010705947876, -0.32954496145248413, 0.19439369440078735, -0.18368998169898987, 0.14065217971801758, 0.15356458723545074, 0.08572889864444733, -0.09813687950372696, 0.16697734594345093, -0.05500186234712601, -0.10481363534927368, 0.3618800640106201, -0.35405436158180237, -0.07478220760822296, 0.11728960275650024, -0.020389370620250702, 0.14139409363269806, -0.21345633268356323, -0.6122729182243347, 0.04380190372467041, 0.34976926445961, 0.11156199872493744, -0.15115605294704437, 0.23207537829875946, -0.07119317352771759, -0.14250215888023376, -0.0831480473279953, 0.5256014466285706, 0.10403040796518326, -0.2515396177768707, 0.5749446749687195, -0.08532547205686569 ]
https://github.com/huggingface/datasets/issues/6460
> Hi again @serenalotreck, > > Yes, it is specific to PyArrow: as far as I know, Arrow does not support arrays with multiple data types. > > As this is related specifically to your dataset structure (and not the `datasets` library), I have created a dedicated issue in your dataset page: https://huggingface.co/datasets/slotreck/pickle/discussions/1 > > Let's continue the discussion there! πŸ€— This is really terrible. My JSONL format data is very simple, but I still report this error ![image](https://github.com/huggingface/datasets/assets/58240629/e3fed922-ced4-406c-b5bc-90a4b891c4ee) The error message is as follows: File "pyarrow/_json.pyx", line 290, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/inputs) changed from string to number in row 208
jsonlines files don't load with `load_dataset`
### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
116
jsonlines files don't load with `load_dataset` ### Describe the bug While [the docs](https://huggingface.co/docs/datasets/upload_dataset#upload-dataset) seem to state that `.jsonl` is a supported extension for `datasets`, loading the dataset results in a `JSONDecodeError`. ### Steps to reproduce the bug Code: ``` from datasets import load_dataset dset = load_dataset('slotreck/pickle') ``` Traceback: ``` Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 925/925 [00:00<00:00, 3.11MB/s] Downloading and preparing dataset json/slotreck--pickle to /mnt/home/lotrecks/.cache/huggingface/datasets/slotreck___json/slotreck--pickle-0c311f36ed032b04/0.0.0/8bb11242116d547c741b2e8a1f18598ffdd40a1d4f2a2872c7a28b697434bc96... Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 589k/589k [00:00<00:00, 18.9MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104k/104k [00:00<00:00, 4.61MB/s] Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 170k/170k [00:00<00:00, 7.71MB/s] Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 3.77it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:00<00:00, 523.92it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/mnt/home/lotrecks/.cache/huggingface/datasets/downloads/6ec07bb2f279c9377036af6948532513fa8f48244c672d2644a2d7018ee5c9cb' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 144, in _generate_tables dataset = json.load(f) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 3086) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1879, in _prepare_split_single for _, table in generator: File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 147, in _generate_tables raise e File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) File "pyarrow/_json.pyx", line 259, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/ner/[]/[]/[]) changed from number to string in row 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/load.py", line 1815, in load_dataset storage_options=storage_options, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 913, in download_and_prepare **download_and_prepare_kwargs, File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1768, in _prepare_split gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args File "/mnt/home/lotrecks/anaconda3/envs/pickle/lib/python3.7/site-packages/datasets/builder.py", line 1912, 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 ``` ### Expected behavior For the dataset to be loaded without error. ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python version: 3.7.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 > Hi again @serenalotreck, > > Yes, it is specific to PyArrow: as far as I know, Arrow does not support arrays with multiple data types. > > As this is related specifically to your dataset structure (and not the `datasets` library), I have created a dedicated issue in your dataset page: https://huggingface.co/datasets/slotreck/pickle/discussions/1 > > Let's continue the discussion there! πŸ€— This is really terrible. My JSONL format data is very simple, but I still report this error ![image](https://github.com/huggingface/datasets/assets/58240629/e3fed922-ced4-406c-b5bc-90a4b891c4ee) The error message is as follows: File "pyarrow/_json.pyx", line 290, in pyarrow._json.read_json File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/inputs) changed from string to number in row 208
[ -0.2301376760005951, 0.12285783886909485, -0.048369962722063065, 0.44046539068222046, 0.25598087906837463, 0.032171137630939484, 0.19228532910346985, 0.19167578220367432, 0.2536109685897827, -0.10145919024944305, 0.21212723851203918, 0.3888658881187439, -0.1920369565486908, 0.36853528022766113, -0.011028291657567024, -0.14814990758895874, 0.004168704152107239, 0.08705280721187592, -0.06175582483410835, 0.06585150957107544, -0.2930654287338257, 0.4825320243835449, -0.12577088177204132, -0.2876797616481781, -0.3300366997718811, 0.20288719236850739, 0.1551155000925064, 0.31560349464416504, -0.20790091156959534, -0.3987043797969818, 0.35157546401023865, 0.043369926512241364, 0.15890812873840332, 0.5264837145805359, -0.00011432376777520403, 0.2167341411113739, 0.2766035199165344, -0.10340568423271179, -0.28540903329849243, -0.4744982421398163, -0.4354293644428253, -0.3592347204685211, 0.20565979182720184, -0.12188678979873657, 0.0255974680185318, -0.057124532759189606, -0.06398715823888779, -0.4945876896381378, 0.6206579208374023, 0.2999453842639923, 0.21323838829994202, 0.42401567101478577, 0.20004595816135406, 0.00612996518611908, 0.19547361135482788, 0.3159928321838379, -0.08488231152296066, 0.5176389813423157, -0.019006386399269104, 0.30080699920654297, 0.05285438895225525, 0.09206700325012207, 0.061307258903980255, -0.13582682609558105, 0.33503803610801697, -0.016124103218317032, -0.3395821750164032, -0.04970335215330124, 0.09164940565824509, 0.29327383637428284, 0.2817539572715759, -0.17623473703861237, -0.3398975729942322, -0.5134024024009705, -0.08153936266899109, -0.31680941581726074, 0.5144972205162048, 0.006754618138074875, -0.02902543917298317, 0.10368935763835907, -0.2740059792995453, -0.16540920734405518, -0.07543498277664185, 0.05499492213129997, 0.02594830095767975, -0.20279687643051147, -0.25539547204971313, -0.009640470147132874, 0.16675937175750732, 0.015619395300745964, -0.2073851376771927, 0.10044999420642853, -0.2053884118795395, 0.22936706244945526, -0.12631919980049133, 0.16434311866760254, 0.03683203458786011, -0.3876149356365204, 0.3063932955265045, 0.327863484621048, 0.0689418837428093, -0.05616733059287071, -0.34691277146339417, 0.09098052978515625, 0.31034567952156067, 0.2237655222415924, 0.08497180789709091, -0.16012153029441833, 0.20159496366977692, 0.3660428822040558, 0.0026561692357063293, -0.13085788488388062, -0.16736893355846405, -0.08507005870342255, -0.2353791445493698, -0.10783563554286957, 0.2791041135787964, -0.16004802286624908, -0.16545137763023376, 0.17736563086509705, -0.30597400665283203, -0.28500986099243164, -0.0024182572960853577, 0.2807214856147766, 0.010627686977386475, 0.24693024158477783, 0.2344258725643158, 0.23084980249404907, 0.06152894347906113, -0.12820777297019958, -0.1534648984670639, -0.00601092167198658, -0.09311248362064362, 0.014515344053506851, 0.18436604738235474, -0.24471212923526764, 0.41176435351371765, 0.07668670266866684, -0.14603155851364136, -0.1822872906923294, -0.08000965416431427, 0.10192051529884338, -0.1853664070367813, 0.12262098491191864, 0.15326958894729614, 0.017455540597438812, 0.0710805207490921, -0.10697468370199203, -0.10262157022953033, 0.029737895354628563, -0.3839442729949951, -0.026868104934692383, -0.14751386642456055, 0.1672704815864563, -0.28068554401397705, -0.06506876647472382, -0.6126499176025391, 0.024949004873633385, -0.1666679084300995, -0.037567686289548874, 0.12080386281013489, -0.032942838966846466, 0.10325707495212555, -0.12479791790246964, 0.33856281638145447, 0.38423094153404236, -0.3600499927997589, -0.24723854660987854, 0.14040586352348328, -0.2597775459289551, 0.15089592337608337, 0.20674735307693481, -0.16721145808696747, 0.15960443019866943, -0.3503991663455963, 0.2761915922164917, 0.29760533571243286, -0.08912964910268784, -0.2591822147369385, 0.3078206181526184, -0.08967962116003036, 0.44879430532455444, 0.04069637507200241, -0.19008664786815643, 0.12328885495662689, 0.17875458300113678, 0.1844986379146576, 0.23866963386535645, 0.21687406301498413, 0.14103353023529053, -0.11487770080566406, -0.2637752294540405, 0.11966633796691895, 0.2191600501537323, -0.1874101161956787, -0.008503567427396774, -0.00693560391664505, 0.18316711485385895, 0.33689627051353455, -0.009793931618332863, -0.11830561608076096, 0.27371251583099365, 0.01490017306059599, 0.18169370293617249, 0.017656609416007996, 0.026287615299224854, -0.7521731853485107, 0.0856412798166275, -0.1033271923661232, 0.00399303063750267, -0.2349568009376526, -0.07457538694143295, -0.2460046410560608, 0.1403312385082245, -0.27199503779411316, -0.24725832045078278, 0.08910126984119415, 0.14886102080345154, 0.1921451836824417, 0.23873138427734375, -0.4370029866695404, 0.2790200710296631, -0.08640420436859131, 0.2779591381549835, -0.5995003581047058, 0.35891470313072205, 0.1400269716978073, -0.1287885308265686, 0.14560100436210632, 0.3055154085159302, -0.03188183531165123, -0.406351238489151, -0.2225993573665619, 0.3179190158843994, 0.19522738456726074, 0.04171382263302803, -0.114478200674057, 0.1258365958929062, 0.14184917509555817, -0.04315074533224106, -0.2193605750799179, 0.12255223095417023, 0.06070207804441452, -0.028398238122463226, -0.24976016581058502, 0.2424517124891281, -0.12795555591583252, 0.3297531008720398, 0.12965965270996094, -0.12854522466659546, 0.16678933799266815, 0.01857054978609085, -0.179159015417099, -0.10798578709363937, 0.3472799062728882, 0.275931179523468, 0.2687148451805115, 0.047954559326171875, -0.1379675567150116, -0.12867099046707153, 0.7998285889625549, 0.011514998972415924, 0.02240443229675293, 0.27388137578964233, -0.05506113916635513, -0.028032436966896057, 0.11604124307632446, 0.12667852640151978, 0.24430963397026062, 0.11296053230762482, 0.0004658494144678116, 0.19186751544475555, 0.05596311017870903, -0.29940682649612427, 0.18219736218452454, 0.013921711593866348, -0.013087660074234009, 0.20487049221992493, 0.07336418330669403, 0.0007955804467201233, -0.4659144878387451, -0.24633480608463287, -0.2551076412200928, 0.24762022495269775, -0.35131800174713135, 0.10532551258802414, -0.45538124442100525, -0.10146007686853409, -0.1335967779159546, -0.171315535902977, -0.5278864502906799, -0.36694878339767456, -0.2872798442840576, 0.09322211146354675, -0.08492888510227203, -0.014864884316921234, -0.3036702275276184, 0.04771449416875839, -0.03381459787487984, -0.2658482491970062, -0.2685377299785614, 0.06668165326118469, -0.2752646803855896, 0.050593987107276917, 0.4722765386104584, -0.05752646550536156, 0.10135581344366074, -0.1912039965391159, -0.004189655184745789, -0.08165985345840454, -0.1422785073518753, 0.17324265837669373, -0.1922004222869873, 0.13219036161899567, 0.3880132734775543, 0.36119475960731506, -0.06921985000371933, -0.20282307267189026, 0.2469979226589203, 0.08447101712226868, -0.2827546298503876, -0.013778649270534515, 0.01872747391462326, 0.04420359432697296, -0.28457650542259216, -0.3295977711677551, 0.11776598542928696, -0.4701540470123291, 0.7083843946456909, -0.05820810794830322, -0.02443356066942215, 0.22255761921405792, 0.0512523353099823, 0.4339565932750702, -0.0636214166879654, 0.06466323137283325, -0.10900844633579254, -0.5038892030715942, 0.22995531558990479, -0.17091265320777893, -0.3370620012283325, 0.21572858095169067, 0.0601360946893692, 0.26194459199905396, -0.17139506340026855, -0.5283803343772888, 0.017045579850673676, -0.11507359892129898, 0.2520383894443512, -0.017832785844802856, -0.022387126460671425, 0.14861688017845154, -0.12039235234260559, 0.0643405020236969, -0.13338600099086761, -0.12681864202022552, 0.2369241565465927, -0.24529889225959778, 0.11890257894992828, 0.08820738643407822, 0.7091602087020874, -0.10506672412157059, -0.019288167357444763, 0.4503828287124634, 0.03413846343755722, 0.5685427188873291, -0.12241943925619125, 0.36332353949546814, -0.2849853038787842, -0.20431852340698242, -0.15628565847873688, -0.009565792977809906, 0.07695269584655762, 0.05894208699464798, 0.2706044316291809, 0.2762213945388794, -0.223199263215065, -0.0062358081340789795, -0.27643102407455444, -0.22371748089790344, 0.15834100544452667, 0.05862148106098175, -0.059799980372190475, -0.17064319550991058, 0.08985619246959686, 0.09053172171115875, 0.09379059076309204, -0.01582111045718193, 0.385454386472702, 0.3200930953025818, 0.06214072182774544, -0.6170752048492432, -0.07692569494247437, -0.45512962341308594, 0.2125665247440338, -0.0008015856146812439, 0.32780101895332336, -0.03177199512720108, 0.02285762131214142, 0.14291995763778687, -0.28588980436325073, 0.7596273422241211, 0.14432372152805328, -0.10302475839853287, 0.10584555566310883, 0.13095234334468842, -0.3242335319519043, 0.12137934565544128, 0.1023927628993988, 0.12533904612064362, 0.541663646697998, 0.3477919101715088, -0.37426766753196716, -0.15841984748840332, 0.26748141646385193, 0.09247134625911713, -0.004883177578449249, -0.22843366861343384, -0.2695280611515045, -0.46466708183288574, -0.2518213391304016, -0.1876204013824463, 0.019676722586154938, 0.3797452449798584, 0.024883762001991272, -0.15068793296813965, 0.1376420259475708, -0.5244581699371338, -0.00653480738401413, 0.20296907424926758, 0.28463155031204224, 0.025061462074518204, 0.09616260230541229, 0.2661898136138916, 0.23935677111148834, 0.20382043719291687, 0.8906217217445374, -0.028678612783551216, -0.48152098059654236, 0.11623989045619965, -0.10777835547924042, 0.3585924804210663, 0.043340880423784256, -0.12591157853603363, 0.19073323905467987, 0.09482520818710327, 0.026219265535473824, -0.08432847261428833, 0.06160469353199005, 0.402235746383667, -0.06341138482093811, -0.1231207400560379, -0.49146145582199097, 0.5422189235687256, 0.05723537504673004, 0.25372958183288574, 0.05092601850628853, 0.14018024504184723, -0.2776532769203186, 0.10844022035598755, -0.27532464265823364, 0.6423540115356445, 0.23023772239685059, 0.08481411635875702, 0.5401002168655396, -0.25236034393310547, 0.5430940985679626, -0.35204991698265076, -0.13201949000358582, -0.19707506895065308, 0.2310771644115448, -0.05093429237604141, -0.06585980206727982, 0.20420396327972412, 0.045848965644836426, -0.00022312253713607788, 0.03278044983744621, -0.11402908712625504, -0.15768170356750488, -0.06478329747915268, 0.2883269190788269, -0.2875094711780548, -0.18755081295967102, -0.7293281555175781, 0.1241358071565628, 0.008849795907735825, 0.11464546620845795, 0.02008713409304619, -0.17837296426296234, -0.05251390486955643, -0.49953269958496094, -0.38229233026504517, 0.19612136483192444, -0.11122619360685349, -0.002521280199289322, 0.30984756350517273, 0.026110246777534485, 0.10153678804636002, 0.05926987901329994, 0.06978443264961243, -0.027186810970306396, -0.14053349196910858, 0.13423404097557068, -0.20487776398658752, -0.04980264604091644, 0.03893645480275154, 0.17483735084533691, 0.3111936151981354, -0.1944887340068817, -0.08234883844852448, 0.10696737468242645, -0.17963548004627228, -0.505649209022522, 0.032945215702056885, 0.13498464226722717, -0.20140612125396729, -0.2556959390640259, -0.09878905117511749, 0.09031574428081512, 0.32325780391693115, -0.13904505968093872, 0.09348570555448532, 0.25758153200149536, 0.13649490475654602, -0.19691985845565796, 0.04765103757381439, -0.18601635098457336, -0.18724647164344788, 0.32636961340904236, -0.18657436966896057, -0.1615287810564041, 0.43610477447509766, 0.41048336029052734, -0.10374815762042999, -0.13570895791053772, 0.2905907928943634, 0.5397544503211975, -0.4035651683807373, 0.14552041888237, 0.13160288333892822, 0.17106764018535614, -0.17542490363121033, 0.3037150502204895, 0.07025998830795288, -0.09148348867893219, 0.17558318376541138, -0.5147280097007751, -0.2694881856441498, 0.22009241580963135, 0.0645374208688736, 0.18047642707824707, 0.009424731135368347, -0.03210976719856262, -0.06146704778075218, -0.3532622456550598, -0.22663861513137817, 0.10511846095323563, -0.06065458059310913, -0.22680437564849854, 0.3242165148258209, -0.04880155995488167, 0.5696452260017395, -0.08598461747169495, 0.12475475668907166, 0.20216389000415802, -0.2130528688430786, -0.1266888678073883, -0.262836754322052, 0.07942458987236023, 0.1157945841550827, -0.15912315249443054, -0.14642910659313202, 0.061718329787254333, -0.2524518668651581, -0.08139634877443314, 0.19060274958610535, -0.055018071085214615, -0.1101301908493042, 0.06642366200685501, 0.11531809717416763, 0.21095679700374603, -0.18661150336265564, 0.02849508449435234, 0.07861433923244476, 0.35855627059936523, 0.0899999737739563, -0.0009174493607133627, -0.21650758385658264, 0.1417877972126007, -0.24971261620521545, 0.14168186485767365, 0.13441452383995056, 0.15108293294906616, 0.26997479796409607, -0.4051637649536133, 0.04634693264961243, 0.15076658129692078, 0.13581687211990356, 0.4696505069732666, -0.19482570886611938, 0.15333157777786255, 0.07235749065876007, 0.12997809052467346, -0.05472290888428688, 0.01101173460483551, 0.2720223367214203, 0.18259024620056152, -0.04660503566265106, 0.047138433903455734, 0.009770691394805908, 0.04065713286399841, -0.054783958941698074, 0.08999718725681305, 0.34295526146888733, 0.28865841031074524, 0.35815590620040894, 0.1900419443845749, -0.21717789769172668, 0.1106410101056099, -0.14880719780921936, 0.06883302330970764, 0.26782703399658203, 0.16297374665737152, -0.19628611207008362, 0.22513949871063232, -0.21669268608093262, 0.000303083099424839, -0.1024126410484314, -0.4691861867904663, -0.23913660645484924, 0.24166055023670197, -0.02774326503276825, 0.2785334289073944, -0.017977342009544373, 0.45575812458992004, -0.2643912434577942, -0.0005965977907180786, -0.30293962359428406, 0.18921297788619995, -0.11416751146316528, -0.12977910041809082, -0.12416594475507736, -0.19603443145751953, -0.3532142639160156, -0.0359930545091629, -0.08005058765411377, -0.004690844565629959, -0.08790416270494461, 0.008128244429826736, -0.1468127965927124, -0.3074861764907837, -0.08473892509937286, -0.0853385478258133, 0.007070571184158325, -0.10170116275548935, 0.4327397644519806, 0.3255680203437805, 0.003531740978360176, 0.24888922274112701, 0.08397440612316132, 0.29457661509513855, 0.1917094886302948, 0.2992593050003052, -0.2961867153644562, -0.2858145833015442, 0.07486056536436081, -0.08623244613409042, 0.43068528175354004, -0.1314283311367035, 0.0642784833908081, 0.19269053637981415, 0.1518014669418335, -0.16583634912967682, 0.1596219688653946, -0.06027481332421303, 0.36156514286994934, -0.35863834619522095, 0.3284108638763428, -0.45822280645370483, 0.15570609271526337, -0.27010318636894226, -0.17277340590953827, -0.2756945490837097, -0.3304736614227295, -0.016330374404788017, 0.11501306295394897, 0.005381185561418533, -0.26395341753959656, 0.07579220831394196, -0.04551685228943825, 0.4670085608959198, 0.4941006004810333, 0.10765136778354645, 0.1612970232963562, -0.1890290230512619, -0.49191975593566895, -0.07742513716220856, -0.10267266631126404, 0.026653409004211426, 0.06530031561851501, -0.04792960733175278, -0.09341920912265778, 0.16448146104812622, 0.15160642564296722, 0.3147983253002167, -0.1350640207529068, -0.2298169583082199, -0.2712253928184509, -0.2077159732580185, 0.2582932114601135, -0.13965144753456116, -0.1148378998041153, -0.0200677290558815, 0.22090238332748413, -0.050541818141937256, -0.06218409538269043, -0.13175249099731445, 0.13702136278152466, -0.2405914068222046, -0.1268274486064911, 0.3775869607925415, 0.21603146195411682, 0.3346267342567444, -0.10398723930120468, -0.39992743730545044, -0.44196629524230957, -0.23674723505973816, -0.010187141597270966, 0.4026927947998047, -0.06943926960229874, 0.6453307867050171, -0.21400147676467896, -0.07747994363307953, -0.35793131589889526, 0.30400651693344116, -0.16625796258449554, -0.36099010705947876, -0.32954496145248413, 0.19439369440078735, -0.18368998169898987, 0.14065217971801758, 0.15356458723545074, 0.08572889864444733, -0.09813687950372696, 0.16697734594345093, -0.05500186234712601, -0.10481363534927368, 0.3618800640106201, -0.35405436158180237, -0.07478220760822296, 0.11728960275650024, -0.020389370620250702, 0.14139409363269806, -0.21345633268356323, -0.6122729182243347, 0.04380190372467041, 0.34976926445961, 0.11156199872493744, -0.15115605294704437, 0.23207537829875946, -0.07119317352771759, -0.14250215888023376, -0.0831480473279953, 0.5256014466285706, 0.10403040796518326, -0.2515396177768707, 0.5749446749687195, -0.08532547205686569 ]
https://github.com/huggingface/datasets/issues/6457
> Maybe this should go in datasets directly... anyways you can easily fix this error by updating datasets>=2.15.1.dev0. @lhoestq @mariosasko for what I understand this is a bug fixed in `datasets` already, right? No need to do anything in `huggingface_hub`?
`TypeError`: huggingface_hub.hf_file_system.HfFileSystem.find() got multiple values for keyword argument 'maxdepth'
### Describe the bug Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Steps to reproduce the bug Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Expected behavior Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Environment info Please see https://github.com/huggingface/huggingface_hub/issues/1872
40
`TypeError`: huggingface_hub.hf_file_system.HfFileSystem.find() got multiple values for keyword argument 'maxdepth' ### Describe the bug Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Steps to reproduce the bug Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Expected behavior Please see https://github.com/huggingface/huggingface_hub/issues/1872 ### Environment info Please see https://github.com/huggingface/huggingface_hub/issues/1872 > Maybe this should go in datasets directly... anyways you can easily fix this error by updating datasets>=2.15.1.dev0. @lhoestq @mariosasko for what I understand this is a bug fixed in `datasets` already, right? No need to do anything in `huggingface_hub`?
[ -0.03594100847840309, -0.7556374073028564, -0.036174602806568146, 0.3993551731109619, 0.2019290328025818, -0.03666580468416214, -0.06197826936841011, 0.3705710172653198, 0.15028253197669983, 0.22910165786743164, -0.3483662009239197, -0.07723751664161682, -0.17496560513973236, 0.24227726459503174, -0.1531311273574829, -0.02524687722325325, 0.18430542945861816, 0.06644425541162491, -0.1664121150970459, 0.023728519678115845, -0.21807409822940826, 0.38063696026802063, -0.0708007961511612, 0.09064474701881409, -0.5454608201980591, 0.008698144927620888, -0.20142558217048645, 0.2887406647205353, 0.050946518778800964, -0.25324350595474243, 0.31363576650619507, 0.0375179760158062, -0.081793874502182, 0.35622385144233704, -0.00011404514225432649, -0.011510945856571198, 0.18278346955776215, -0.044655125588178635, -0.14930123090744019, -0.02163034677505493, 0.016335658729076385, 0.05486471951007843, -0.10672173649072647, -0.05917387455701828, -0.00389254093170166, -0.01794157363474369, 0.03433530032634735, 0.02576202154159546, 0.17794065177440643, 0.14545691013336182, 0.2396565079689026, 0.40403324365615845, 0.19029313325881958, -0.3681181073188782, 0.22781093418598175, 0.17877182364463806, 0.03817320615053177, 0.3277610242366791, 0.3046976327896118, 0.029690265655517578, -0.07173751294612885, 0.2933255434036255, 0.30395442247390747, 0.12434311211109161, 0.5383145809173584, -0.06511171162128448, -0.07304021716117859, -0.1111234650015831, 0.0600767508149147, 0.21557112038135529, -0.08869475871324539, -0.29258421063423157, -0.17871986329555511, -0.3488858938217163, 0.028194021433591843, -0.14351767301559448, 0.40579864382743835, 0.089094378054142, -0.18343162536621094, -0.16356134414672852, 0.0017194338142871857, -0.34868738055229187, -0.004419870674610138, 0.03357145935297012, 0.08497901260852814, 0.06054055690765381, -0.37361428141593933, 0.09285515546798706, 0.39165428280830383, -0.36322513222694397, -0.34952229261398315, 0.038672372698783875, -0.121861033141613, 0.02197471261024475, -0.400848388671875, -0.17488831281661987, 0.16176818311214447, 0.4710976481437683, 0.4096602201461792, 0.015755876898765564, -0.14566141366958618, -0.07273809611797333, -0.13258880376815796, 0.01917189359664917, 0.30933472514152527, 0.005808237940073013, 0.15694068372249603, -0.04981376975774765, 0.07369355112314224, 0.49646085500717163, 0.01250787079334259, 0.03846827894449234, 0.2612440586090088, -0.32727891206741333, -0.26322880387306213, -0.024427281692624092, 0.28406640887260437, -0.09963575750589371, -0.11935119330883026, 0.06472384184598923, 0.12671634554862976, -0.012902401387691498, 0.20632772147655487, 0.3799992799758911, 0.26398035883903503, -0.028441721573472023, -0.11905862390995026, 0.14653727412223816, -0.21843713521957397, -0.004483271390199661, -0.322844922542572, 0.28004151582717896, 0.11997305601835251, 0.007173910737037659, 0.03260667622089386, -0.6014918684959412, 0.09068703651428223, 0.1638326495885849, 0.46169567108154297, -0.1672896295785904, -0.2812403440475464, -0.14089497923851013, -0.11804081499576569, 0.3014414608478546, -0.10860830545425415, 0.12994766235351562, 0.0993165373802185, -0.03496364504098892, -0.24988287687301636, -0.2592635750770569, -0.2537432312965393, -0.3271978795528412, -0.1604752093553543, 0.19310148060321808, 0.06449082493782043, 0.27519312500953674, -0.32402968406677246, 0.08147665858268738, 0.019783955067396164, 0.039698511362075806, -0.04157383367419243, 0.15846818685531616, -0.11171428114175797, -0.06734772026538849, 0.17057573795318604, 0.3621428608894348, 0.24848021566867828, -0.24115420877933502, 0.1257787048816681, -0.12742501497268677, -0.23632489144802094, 0.27495431900024414, -0.03980023413896561, 0.2549787163734436, -0.5299445986747742, 0.21739831566810608, -0.0643858090043068, -0.5159849524497986, -0.45340731739997864, 0.05255039781332016, 0.0250045508146286, 0.011249609291553497, -0.007358849048614502, -0.18963876366615295, -0.03979484736919403, -0.10497616231441498, 0.17705880105495453, -0.09935091435909271, 0.1064225286245346, 0.04962773621082306, -0.3540240526199341, -0.2864031493663788, -0.14525648951530457, -0.012701723724603653, 0.1580854058265686, -0.06414799392223358, 0.03532358258962631, 0.2888661026954651, 0.24237138032913208, 0.008867671713232994, 0.07013547420501709, 0.30797719955444336, 0.17534857988357544, 0.06830437481403351, -0.032530687749385834, -0.31468456983566284, -0.01632767915725708, 0.1782311350107193, -0.18386147916316986, 0.04176679253578186, 0.018446648493409157, -0.26281023025512695, -0.20701122283935547, -0.09806396067142487, -0.09300752729177475, -0.16198064386844635, 0.19090355932712555, 0.07940418273210526, -0.04194942116737366, -0.04631568863987923, -0.08903024345636368, 0.40866586565971375, -0.07856987416744232, 0.2411590963602066, -0.48605161905288696, 0.41477489471435547, -0.22808071970939636, 0.09418565034866333, -0.044713642448186874, 0.055771708488464355, 0.1841350495815277, -0.12237094342708588, -0.06535087525844574, 0.4498794674873352, -0.14121611416339874, 0.17450210452079773, 0.007857421413064003, -0.0480608195066452, 0.25078219175338745, 0.07907282561063766, -0.1849282681941986, -0.05167851597070694, 0.0852758139371872, 0.016989894211292267, 0.087102010846138, 0.08938981592655182, -0.09491225332021713, 0.07127442955970764, 0.14699266850948334, 0.027532152831554413, -0.09848091006278992, 0.13811489939689636, 0.05321725457906723, -0.29034820199012756, 0.15968264639377594, 0.005365671589970589, 0.06690965592861176, -0.1316823661327362, -0.10094412416219711, -0.051309291273355484, 0.4806559681892395, 0.17654867470264435, 0.22553080320358276, 0.2202315330505371, -0.019279800355434418, 0.03339461237192154, 0.1267261654138565, -0.0013107731938362122, 0.2953224182128906, 0.1489482820034027, -0.08936190605163574, 0.1463218629360199, 0.001452576369047165, -0.0015109740197658539, 0.20487187802791595, 0.12748071551322937, 0.05469435453414917, 0.139562726020813, -0.00892011821269989, -0.038624994456768036, -0.3896214962005615, -0.1607877016067505, -0.0649772360920906, 0.08006693422794342, -0.46485334634780884, -0.1546408236026764, -0.20544025301933289, -0.2551441788673401, -0.09672866761684418, -0.07172835618257523, -0.3406980335712433, -0.3100581169128418, 0.12217338383197784, 0.14374986290931702, -0.24229469895362854, 0.18873947858810425, 0.23679307103157043, 0.3673328161239624, -0.005774632096290588, 0.28959551453590393, -0.1827966272830963, 0.30236807465553284, -0.15324555337429047, -0.017465639859437943, 0.14873287081718445, -0.005180642008781433, 0.22786866128444672, -0.26493051648139954, 0.017342939972877502, -0.2908802628517151, -0.3371519148349762, 0.14965644478797913, -0.13259515166282654, 0.27883380651474, 0.40789994597435, 0.023990653455257416, -0.13545960187911987, -0.2077462077140808, 0.28430747985839844, -0.10837779939174652, -0.10154871642589569, -0.04308071732521057, 0.004507187753915787, 0.1905406266450882, -0.20367787778377533, 0.07662245631217957, -0.067982017993927, -0.5908723473548889, 0.316681832075119, -0.1155681237578392, 0.19390535354614258, 0.24635405838489532, -0.018312126398086548, 0.24364113807678223, -0.3448997437953949, 0.06171780079603195, -0.311815083026886, -0.33956286311149597, 0.0508405975997448, -0.17071674764156342, -0.23961633443832397, -0.2705473303794861, -0.09905075281858444, 0.2230449616909027, -0.35427409410476685, -0.4335819482803345, -0.47464272379875183, -0.35885369777679443, 0.0914301797747612, -0.38130149245262146, 0.27268099784851074, 0.2430540919303894, -0.1977519690990448, -0.08224452286958694, -0.0903194472193718, -0.10702507197856903, 0.18728627264499664, -0.037826552987098694, 0.061727482825517654, -0.0327441468834877, 0.024956952780485153, 0.1755121648311615, 0.08788853883743286, 0.40128904581069946, 0.3334897756576538, 0.6497320532798767, -0.05565260350704193, 0.5408895015716553, -0.15039104223251343, -0.562737226486206, 0.08639974892139435, 0.13214166462421417, 0.204900324344635, 0.24678020179271698, 0.13554808497428894, 0.4682258069515228, 0.014985650777816772, -0.5805748105049133, -0.06535158306360245, -0.3881623446941376, -0.05015144497156143, 0.1215246170759201, -0.1809459626674652, -0.02884555608034134, 0.07205830514431, -0.10949355363845825, 0.04329352825880051, 0.13804927468299866, 0.18938493728637695, -0.18121086061000824, 0.12779664993286133, 0.018253177404403687, -0.15809433162212372, -0.4563157558441162, 0.3123994469642639, -0.0009989887475967407, 0.16157953441143036, 0.03571954369544983, 0.013956189155578613, -0.058884765952825546, -0.135399729013443, 0.7127631902694702, 0.1929449588060379, 0.14963912963867188, 0.045481570065021515, -0.06080232933163643, -0.42858147621154785, 0.011544786393642426, -0.13918882608413696, 0.26109182834625244, 0.13227182626724243, 0.79159015417099, -0.2780800461769104, -0.3277721405029297, 0.044556207954883575, -0.10050709545612335, -0.053003400564193726, -0.012477945536375046, -0.18753060698509216, -0.35326480865478516, -0.34577009081840515, 0.16658717393875122, 0.273749440908432, 0.4404914975166321, 0.17660795152187347, -0.07339856773614883, 0.11491130292415619, -0.3139432370662689, 0.12021762132644653, -0.030189387500286102, 0.28481483459472656, 0.0427701510488987, 0.09459124505519867, 0.09565796703100204, 0.07313504815101624, 0.27373483777046204, 0.5773622989654541, 0.01149996742606163, -0.04410429671406746, 0.08564095944166183, -0.02171744406223297, 0.030055582523345947, 0.4189223647117615, -0.1328592449426651, 0.45868754386901855, -0.24385599792003632, 0.5529692769050598, -0.4376712441444397, 0.14389684796333313, 0.26758256554603577, 0.061794087290763855, -0.12129053473472595, 0.2645963430404663, 0.4991241991519928, -0.1176135465502739, -0.03296399861574173, 0.3492911159992218, 0.9143889546394348, -0.37284743785858154, 0.016397111117839813, -0.012831080704927444, 0.7705562114715576, 0.17082910239696503, 0.198866069316864, -0.07677263021469116, -0.2803794741630554, 0.5541819334030151, -0.12914568185806274, -0.04760782793164253, -0.3302982449531555, -0.4101243317127228, 0.11534278839826584, -0.0007723495364189148, 0.2368745654821396, -0.13862010836601257, -0.30382367968559265, 0.20552019774913788, 0.12320826947689056, 0.35612910985946655, -0.3263152241706848, 0.08256249129772186, -0.7069799304008484, -0.2348870187997818, -0.3102646470069885, 0.18527749180793762, -0.1503375768661499, 0.19105270504951477, -0.17385470867156982, 0.029065322130918503, 0.1673516184091568, -0.5926737785339355, -0.3402390480041504, -0.2403625100851059, -0.11531761288642883, 0.14002057909965515, 0.20882323384284973, 0.19770585000514984, 0.17900635302066803, -0.029766008257865906, 0.35286837816238403, 0.26389938592910767, -0.36788737773895264, 0.0872281864285469, -0.14842715859413147, 0.060099177062511444, -0.14313411712646484, 0.040671173483133316, 0.159291073679924, -0.09066592156887054, -0.22598686814308167, -0.27745193243026733, 0.1654784083366394, -0.1732569932937622, -0.23922380805015564, 0.12127288430929184, -0.24970151484012604, -0.20947960019111633, -0.09395546466112137, -0.050348471850156784, -0.03969208896160126, -0.3381566107273102, 0.09577114135026932, 0.047400347888469696, -0.25917041301727295, 0.02108389511704445, -0.005217633210122585, -0.1033787950873375, -0.09608952701091766, 0.4719967842102051, -0.036612723022699356, 0.06569605320692062, 0.318065345287323, 0.009028822183609009, -0.06408486515283585, -0.21249327063560486, 0.3238263726234436, 0.3032984733581543, -0.5272030234336853, 0.33166104555130005, -0.1853831559419632, -0.1664501130580902, -0.0805080458521843, 0.3687116801738739, 0.29109251499176025, 0.011797665618360043, 0.11840631067752838, -0.283072829246521, -0.4017426669597626, 0.2842687964439392, -0.17519381642341614, 0.19536806643009186, 0.09312842041254044, 0.09361511468887329, 0.06491740792989731, 0.15035025775432587, -0.33621305227279663, 0.3249771296977997, -0.386788547039032, -0.0798463374376297, -0.20901185274124146, -0.07204188406467438, 0.22780060768127441, -0.1150636374950409, 0.11925939470529556, 0.42695948481559753, -0.2671830356121063, -0.2155851125717163, -0.26038631796836853, 0.11076328158378601, -0.032945968210697174, -0.04960636794567108, 0.09299055486917496, 0.15312524139881134, -0.07181292772293091, -0.17572353780269623, 0.21010613441467285, 0.24179230630397797, 0.182697132229805, 0.254192978143692, 0.4242541790008545, -0.10056217014789581, 0.16936317086219788, 0.012775283306837082, 0.31276556849479675, 0.32135462760925293, -0.16023968160152435, 0.08218018710613251, -0.21896734833717346, -0.07317914068698883, 0.011454101651906967, 0.30046987533569336, 0.043400585651397705, -0.03305266797542572, 0.02028489112854004, -0.12536777555942535, -0.200411856174469, 0.12427759170532227, 0.4698317348957062, 0.06130698323249817, -0.3290020525455475, 0.004275813698768616, 0.15599198639392853, 0.2073799967765808, -0.2589876651763916, -0.1607477366924286, 0.221112459897995, -0.01611299440264702, 0.019201457500457764, 0.2189701646566391, 0.1979159563779831, 0.056766435503959656, 0.1907130926847458, 0.07119736075401306, 0.17952431738376617, -0.06513312458992004, 0.11747733503580093, 0.2353437840938568, -0.08549230545759201, -0.1140102967619896, 0.32187938690185547, 0.05903688073158264, 0.35234159231185913, 0.569730281829834, -0.3480820655822754, 0.29668739438056946, -0.4005856215953827, -0.035670019686222076, 0.46787387132644653, -0.5337772369384766, 0.17089883983135223, 0.11632740497589111, -0.13663670420646667, 0.07163000106811523, -0.26326724886894226, 0.47507232427597046, -0.4046682119369507, -0.3167378306388855, -0.2516549825668335, -0.04002118855714798, -0.34115955233573914, -0.1302030384540558, 0.3370123505592346, -0.17930907011032104, -0.2843261957168579, -0.011967897415161133, -0.03905894607305527, -0.2612574100494385, 0.19953246414661407, -0.1811663806438446, -0.13772332668304443, -0.29415708780288696, 0.015547186136245728, 0.2945408523082733, 0.22672361135482788, -0.2812114953994751, 0.20722369849681854, 0.39812639355659485, -0.04457060620188713, 0.10949337482452393, 0.5412575006484985, 0.47692596912384033, 0.1704896241426468, 0.0022533386945724487, 0.10934126377105713, 0.08206135034561157, 0.09856262058019638, -0.07016072422266006, 0.03755003958940506, 0.11699077486991882, 0.3187951147556305, 0.4076589345932007, 0.1166723370552063, -0.20737028121948242, 0.023546481505036354, -0.14245156943798065, 0.42876768112182617, -0.38966867327690125, 0.3129050135612488, -0.43900686502456665, 0.14100757241249084, 0.004080167040228844, 0.08992456644773483, -0.6673998236656189, -0.060392316430807114, 0.12275412678718567, 0.0027441345155239105, 0.23800668120384216, -0.23826485872268677, 0.08398621529340744, 0.04709451645612717, 0.563119649887085, 0.24456198513507843, -0.05452630668878555, -0.16049277782440186, -0.18129132688045502, -0.5028890371322632, 0.192783385515213, 0.049088817089796066, 0.00019777566194534302, 0.13045862317085266, 0.08280733227729797, -0.031022101640701294, -0.2800205945968628, 0.3240046799182892, -0.049680083990097046, 0.11314324289560318, -0.11140604317188263, -0.10181125998497009, -0.09754537045955658, 0.027804678305983543, -0.36538684368133545, 0.2296624481678009, -0.1766723394393921, 0.33212071657180786, -0.07300224900245667, 0.022454582154750824, -0.05155977979302406, 0.2654177248477936, 0.06259700655937195, -0.3793509006500244, 0.12672874331474304, 0.19323499500751495, 0.013178601861000061, -0.1904454529285431, -0.14098703861236572, -0.195012629032135, -0.10512413084506989, -0.23678149282932281, -0.14185339212417603, 0.0024304864928126335, 0.5640733242034912, -0.2877598702907562, -0.5516737699508667, -0.2325218915939331, 0.24545715749263763, 0.08017438650131226, 0.05108153447508812, -0.00960012897849083, 0.441433310508728, 0.012234136462211609, -0.07055672258138657, 0.22365133464336395, 0.4789631962776184, -0.0721530169248581, 0.27503103017807007, -0.2694372534751892, -0.4529362618923187, 0.6197593212127686, -0.12635070085525513, -0.2697226405143738, -0.17448924481868744, 0.3959295153617859, 0.43942373991012573, -0.5136653780937195, -0.6469373106956482, -0.09127651154994965, 0.21740028262138367, 0.200135737657547, -0.31005701422691345, 0.3711630403995514, -0.32098543643951416, -0.14555856585502625, 0.07568908482789993, 0.14945967495441437, 0.2625718116760254, -0.21220354735851288, 0.5300188064575195, -0.15941965579986572 ]
https://github.com/huggingface/datasets/issues/6446
You can use `.align_labels_with_mapping` on the dataset to align the labels with the model config. Regarding the number of labels, only the special `_silence_` label corresponding to noise is missing, which is consistent with the model paper (reports training on 35 labels). You can run a `.filter` to drop it. PS: You should create a discussion on a model/dataset repo (on the Hub) for these kinds of questions
Speech Commands v2 dataset doesn't match AST-v2 config
### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3
68
Speech Commands v2 dataset doesn't match AST-v2 config ### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3 You can use `.align_labels_with_mapping` on the dataset to align the labels with the model config. Regarding the number of labels, only the special `_silence_` label corresponding to noise is missing, which is consistent with the model paper (reports training on 35 labels). You can run a `.filter` to drop it. PS: You should create a discussion on a model/dataset repo (on the Hub) for these kinds of questions
[ -0.18747246265411377, -0.4025111794471741, -0.002486366778612137, 0.5321387052536011, 0.23339498043060303, 0.21374253928661346, 0.22850120067596436, 0.29725173115730286, -0.3711091876029968, -0.07165176421403885, -0.11736663430929184, 0.2715616226196289, -0.22551605105400085, -0.1073668897151947, 0.13778352737426758, -0.21275395154953003, -0.032418783754110336, -0.15792031586170197, 0.020023582503199577, -0.3215371072292328, 0.06824930757284164, 0.36392465233802795, -0.1182512640953064, 0.184015154838562, -0.2140275239944458, 0.23679548501968384, 0.26778414845466614, 0.021138926967978477, 0.06792450696229935, -0.25001615285873413, 0.23720252513885498, -0.29932498931884766, 0.18559101223945618, 0.7066990733146667, -0.00011181064473930746, 0.03461935371160507, -0.14995571970939636, -0.20544986426830292, -0.23061217367649078, -0.18468362092971802, 0.29485318064689636, 0.1682664155960083, -0.10365703701972961, 0.10528959333896637, -0.45411306619644165, 0.04939505085349083, -0.037733517587184906, 0.11540204286575317, 0.18259763717651367, 0.3578495979309082, 0.19933807849884033, 0.060868680477142334, 0.08625086396932602, 0.037369146943092346, -0.04976242035627365, -0.15468207001686096, 0.09196589142084122, -0.008579462766647339, -0.0492170974612236, 0.20674215257167816, -0.05964925140142441, 0.3764403462409973, -0.01971878483891487, 0.023707017302513123, 0.1344669759273529, -0.20642425119876862, -0.26144909858703613, -0.336935818195343, 0.0709342360496521, 0.2628130316734314, 0.3486268222332001, -0.3478742837905884, -0.2226802110671997, -0.25966352224349976, 0.019994985312223434, -0.2079104781150818, 0.03577226400375366, 0.15141518414020538, -0.04662030562758446, 0.3756716847419739, 0.006890058517456055, 0.05016095191240311, -0.31496143341064453, 0.0787971019744873, 0.17177219688892365, 0.23924818634986877, 0.0054680220782756805, 0.07691027224063873, -0.18534298241138458, -0.22686468064785004, -0.13666094839572906, 0.27822786569595337, -0.053587906062603, 0.20579290390014648, -0.5201442837715149, -0.12859435379505157, 0.004721337929368019, -0.21186619997024536, 0.20867013931274414, -0.07009585946798325, 0.3701627850532532, 0.1286381483078003, -0.025193601846694946, -0.12625007331371307, -0.03868648037314415, 0.5110988020896912, 0.36846789717674255, 0.5599426627159119, -0.03981722518801689, -0.005548335611820221, -0.2577396333217621, 0.15620043873786926, -0.14446291327476501, -0.20922167599201202, -0.0438290573656559, 0.04180704802274704, 0.018605656921863556, -0.34631916880607605, -0.5094919204711914, 0.2435625046491623, -0.2885713577270508, -0.106751449406147, 0.09892801940441132, 0.23411446809768677, -0.09588903188705444, 0.1295735239982605, 0.2651788592338562, -0.023061126470565796, -0.18521720170974731, -0.3946678638458252, -0.12286253273487091, -0.10080933570861816, -0.10272841900587082, -0.028582219034433365, -0.00353037565946579, 0.14297889173030853, 0.433891236782074, -0.006479233503341675, 0.11070296913385391, -0.008214958012104034, -0.29655665159225464, 0.11449605971574783, 0.16677194833755493, 0.20062105357646942, -0.32617342472076416, 0.21699655055999756, 0.050206128507852554, 0.22912713885307312, -0.022813647985458374, 0.009943206794559956, -0.26408812403678894, -0.04855963587760925, 0.04543232172727585, 0.2419445514678955, -0.028936654329299927, -0.17795276641845703, 0.30251073837280273, 0.30982643365859985, 0.41348662972450256, -0.09888508170843124, 0.11975628137588501, -0.3865870237350464, -0.3835851848125458, -0.16747906804084778, 0.08145222812891006, 0.12241793423891068, -0.26703572273254395, -0.29431086778640747, 0.27851349115371704, 0.2711246609687805, -0.0013165846467018127, 0.26031529903411865, -0.0447220541536808, 0.2706606984138489, -0.15112252533435822, -0.04765757918357849, 0.3246663808822632, -0.297505646944046, -0.6789896488189697, -0.24532009661197662, -0.03304332494735718, 0.1649886667728424, 0.07447446882724762, 0.029704157263040543, 0.19152015447616577, -0.022290732711553574, 0.4898169934749603, 0.013244137167930603, 0.18720513582229614, -0.19115570187568665, -0.4142115116119385, -0.1304248571395874, 0.19006602466106415, 0.16765019297599792, -0.14964833855628967, -0.0522480309009552, -0.2445068657398224, -0.08443190157413483, 0.3318924605846405, -0.006104564294219017, -0.09936697036027908, 0.14810651540756226, -0.15354342758655548, 0.10736148059368134, 0.3617764115333557, -0.19590891897678375, -0.4322797954082489, 0.28171777725219727, 0.052136413753032684, 0.21616974472999573, 0.411687433719635, 0.10634461045265198, -0.13713398575782776, -0.35510939359664917, -0.16931742429733276, -0.4506959021091461, 0.1632024645805359, 0.3238028883934021, -0.048581890761852264, -0.41639623045921326, -0.23879607021808624, 0.24599753320217133, -0.3743211627006531, 0.13380324840545654, -0.09387332946062088, -0.023884322494268417, -0.21181823313236237, -0.07623245567083359, 0.035143956542015076, 0.15373307466506958, 0.26368802785873413, -0.09741288423538208, -0.0591261126101017, 0.25766903162002563, -0.07956226170063019, -0.2805304527282715, -0.3751281201839447, 0.18274036049842834, 0.2516774535179138, -0.42653387784957886, -0.1391361653804779, 0.3591443598270416, -0.09998078644275665, -0.018807820975780487, -0.03331668674945831, 0.33247217535972595, 0.38880905508995056, -0.161516010761261, -0.024120807647705078, 0.060242727398872375, 0.09831035882234573, -0.028904102742671967, -0.17033153772354126, 0.07471279799938202, 0.48118820786476135, -0.20243652164936066, 0.16135536134243011, 0.10182581841945648, -0.4740212559700012, 0.2654285728931427, 0.5754410028457642, -0.009574949741363525, 0.039510633796453476, 0.30594271421432495, -0.2503014802932739, 0.14103195071220398, -0.020728036761283875, -0.059513676911592484, 0.04694385826587677, 0.3015444576740265, -0.28387099504470825, 0.008005594834685326, -0.4834321439266205, -0.06987829506397247, 0.08183131366968155, -0.055042434483766556, -0.0548587366938591, 0.2542889416217804, 0.09591829776763916, 0.2127702236175537, -0.23139935731887817, -0.1120113730430603, -0.15888944268226624, 0.2725939452648163, -0.6390701532363892, 0.04636215418577194, -0.09651698172092438, 0.24413730204105377, -0.12991374731063843, -0.2056877315044403, -0.27273058891296387, 0.272354394197464, 0.20937247574329376, -0.15933534502983093, -0.07458341866731644, 0.39713722467422485, 0.07110966742038727, 0.19569680094718933, 0.19242563843727112, -0.2543756067752838, 0.213845893740654, -0.0773305594921112, -0.34475746750831604, 0.051733821630477905, 0.0782410204410553, -0.4440631568431854, 0.07361772656440735, -0.0887494906783104, -0.41558659076690674, 0.0832269936800003, -0.35133519768714905, 0.15750771760940552, -0.2601223587989807, 0.26262977719306946, 0.18439070880413055, 0.028725087642669678, -0.06684158742427826, -0.05210427939891815, -0.08448518812656403, 0.04732813686132431, -0.3325466215610504, -0.10915027558803558, 0.11942516267299652, -0.19033610820770264, -0.04923708736896515, -0.6160709857940674, 0.16853421926498413, -0.22286680340766907, 0.013533227145671844, 0.19126872718334198, 0.3002941608428955, 0.6105598211288452, 0.022024650126695633, -0.018208518624305725, 0.09187449514865875, 0.483700156211853, -0.4225393235683441, -0.2995116412639618, 0.2698533236980438, -0.04822579398751259, -0.33716773986816406, -0.240568146109581, 0.13719184696674347, 0.19219417870044708, -0.11462660133838654, -0.1405775249004364, 0.04353148490190506, -0.23777496814727783, 0.17859892547130585, -0.22889387607574463, -0.001998964697122574, 0.3463226854801178, 0.03183282911777496, 0.1421918421983719, -0.35945698618888855, -0.43034690618515015, 0.6389917135238647, 0.3092272877693176, 0.30736222863197327, -0.2547580301761627, 0.1579250991344452, -0.12449304759502411, 0.5327120423316956, 0.15398871898651123, -0.4025743007659912, -0.10610879957675934, -0.10159502178430557, -0.020407583564519882, -0.044265035539865494, -0.23439466953277588, 0.26287680864334106, 0.0633469820022583, -0.027999337762594223, 0.4104907810688019, -0.1554802656173706, 0.04636950045824051, -0.06940237432718277, 0.19382785260677338, -0.1700846254825592, -0.039581548422575, -0.028844408690929413, -0.20013335347175598, 0.10988040268421173, 0.03307711333036423, 0.333702027797699, 0.07887708395719528, -0.07326346635818481, 0.28818419575691223, -0.06527596712112427, -0.09236713498830795, 0.12838876247406006, -0.40556800365448, 0.03183282911777496, -0.11045320332050323, 0.23206934332847595, 0.1801249384880066, 0.35010671615600586, -0.18844833970069885, -0.27942535281181335, -0.15296798944473267, 0.2535671591758728, 0.5257295370101929, -0.4384397268295288, 0.2509213387966156, 0.19532954692840576, 0.48513200879096985, -0.20916010439395905, -0.17733833193778992, -0.10787966847419739, -0.05681470036506653, 0.281724750995636, 0.023252170532941818, -0.2003655731678009, -0.058753736317157745, 0.22501488029956818, 0.22456787526607513, -0.17522627115249634, 0.1962178349494934, -0.16321516036987305, 0.010286055505275726, -0.03357302024960518, 0.11101703345775604, 0.253487229347229, 0.13700169324874878, -0.19475916028022766, 0.25290095806121826, 0.10101048648357391, -0.14494657516479492, 0.36175864934921265, 0.23349511623382568, 0.44503262639045715, 0.09647734463214874, 0.17447812855243683, 0.40271759033203125, 0.31147798895835876, 0.15362684428691864, 0.6320443153381348, -0.30478981137275696, -0.53084397315979, -0.0123986741527915, 0.1357669085264206, 0.14778298139572144, 0.30823445320129395, 0.10069961845874786, -0.020371321588754654, -0.20216107368469238, 0.02360112965106964, 0.006345722824335098, 0.10394512861967087, 0.19152146577835083, 0.34633901715278625, -0.32713937759399414, -0.4048221707344055, 0.3001938760280609, -0.24853505194187164, -0.15572571754455566, 0.2714473307132721, -0.22536759078502655, -0.5140077471733093, 0.4977109730243683, 0.0647449716925621, 0.9458175897598267, 0.3136380612850189, 0.2579007148742676, 0.10744483023881912, -0.1058456227183342, 0.2656976878643036, -0.2069852352142334, 0.337484747171402, -0.342987984418869, -0.04579585790634155, -0.0038903802633285522, 0.024055294692516327, -0.13806350529193878, 0.25880101323127747, -0.23221810162067413, 0.309702068567276, -0.09306013584136963, 0.10140161216259003, 0.21896442770957947, 0.04224516451358795, 0.42477425932884216, -0.1035170704126358, -0.041486699134111404, 0.1352037638425827, -0.1546727418899536, 0.3546368181705475, -0.013250298798084259, -0.04145607352256775, -0.21451245248317719, -0.3334375321865082, -0.3637053072452545, -0.0036730021238327026, -0.5523003339767456, -0.18592362105846405, 0.13873383402824402, -0.3514012396335602, 0.22197416424751282, 0.3328244090080261, 0.4275970458984375, 0.003020482137799263, -0.056025341153144836, 0.2912209928035736, 0.215406134724617, 0.2818806767463684, 0.19416116178035736, -0.10132525861263275, 0.5661072731018066, 0.052466168999671936, -0.09004506468772888, 0.024862300604581833, 0.12331418693065643, -0.0679318979382515, -0.24061395227909088, -0.1504354178905487, 0.3013334274291992, -0.37447622418403625, 0.026702310889959335, 0.0318964347243309, -0.10592436790466309, -0.34506458044052124, 0.13663174211978912, -0.11825669556856155, -0.5008188486099243, 0.05343463271856308, 0.29064467549324036, -0.35922330617904663, -0.04626763239502907, 0.38292911648750305, 0.048386964946985245, -0.010964788496494293, 0.4170621335506439, 0.22907602787017822, 0.04323193430900574, -0.21739599108695984, -0.00571422278881073, 0.1340276002883911, -0.44442427158355713, 0.132868230342865, -0.1779426485300064, -0.2501218318939209, -0.07606691122055054, 0.3356223404407501, 0.38072749972343445, 0.16999435424804688, -0.08066338300704956, -0.0844426304101944, -0.40944018959999084, -0.08901214599609375, -0.090905100107193, 0.13699176907539368, -0.23710612952709198, 0.2291165441274643, 0.16382041573524475, -0.02189757116138935, -0.37078016996383667, -0.11201553791761398, 0.06361644715070724, 0.18623368442058563, 0.10505803674459457, -0.11286086589097977, 0.18681731820106506, -0.04476799815893173, 0.1354466676712036, -0.08871987462043762, 0.006142068654298782, -0.20423763990402222, -0.33419498801231384, 0.05792173743247986, -0.03731302171945572, 0.12123937904834747, -0.1673654019832611, 0.02314535528421402, -0.08074823021888733, -0.04236113652586937, 0.09946023672819138, 0.22072967886924744, 0.14343950152397156, 0.5454072952270508, -0.21152107417583466, -0.16402822732925415, 0.2481987029314041, -0.24143733084201813, -0.07528696209192276, -0.058138392865657806, 0.27928587794303894, 0.11589628458023071, -0.10194273293018341, -0.06584066897630692, -0.029210710898041725, 0.2123378962278366, -0.1767342984676361, -0.02510988339781761, -0.11390987038612366, -0.21334229409694672, -0.05821297690272331, 0.3054400682449341, 0.09403420984745026, 0.18684722483158112, -0.362542062997818, -0.19091948866844177, 0.08673743158578873, 0.22299440205097198, -0.32102668285369873, -0.15528321266174316, -0.036998994648456573, -0.14772534370422363, -0.07565301656723022, 0.1524505317211151, -0.08192478865385056, -0.03164766728878021, -0.1675182580947876, 0.24267590045928955, 0.22385896742343903, -0.1251601278781891, 0.38891762495040894, 0.6300961375236511, -0.013213694095611572, -0.0014846716076135635, 0.4608737528324127, -0.23339280486106873, 0.21860674023628235, 0.3583090603351593, 0.10365217924118042, 0.17515595257282257, 0.23973912000656128, 0.17979465425014496, 0.21790683269500732, -0.042381491512060165, -0.07957322895526886, 0.16205307841300964, 0.03233330696821213, 0.2464343160390854, -0.14517943561077118, 0.07989111542701721, -0.011869199573993683, -0.4321335554122925, -0.05807555094361305, -0.04070989787578583, -0.3667941093444824, -0.1481025367975235, -0.25075703859329224, -0.1577051877975464, -0.01147761195898056, -0.012583747506141663, -0.21623371541500092, -0.11155246198177338, 0.1146467849612236, -0.010778281837701797, -0.4425264298915863, -0.2544345259666443, -0.38249340653419495, 0.16878294944763184, 0.07220081984996796, -0.19387345016002655, 0.5081453323364258, 0.023154940456151962, -0.32812485098838806, 0.09654121845960617, 0.24354462325572968, 0.20061643421649933, 0.12580981850624084, -0.15797868371009827, -0.03007429838180542, 0.12326952815055847, 0.13329839706420898, -0.00764455646276474, 0.17206349968910217, -0.03692047670483589, -0.3985980153083801, 0.289315789937973, 0.0840771347284317, -0.13293467462062836, 0.15999020636081696, 0.001790202222764492, 0.11654112488031387, -0.24309653043746948, 0.2206726372241974, -0.10221405327320099, -0.1185845285654068, -0.3021393120288849, 0.09629039466381073, -0.2569429278373718, -0.050849370658397675, 0.3596380949020386, 0.21621614694595337, 0.14708612859249115, -0.14649784564971924, 0.12010683864355087, 0.030743110924959183, 0.4407394826412201, 0.21591103076934814, -0.1937839537858963, -0.13701562583446503, 0.008256092667579651, -0.3116152584552765, 0.031515687704086304, 0.1790604293346405, -0.019934173673391342, 0.044053785502910614, 0.14520177245140076, 0.2379549890756607, -0.09593658149242401, 0.3183687925338745, -0.1452525556087494, -0.002610638737678528, 0.17329315841197968, -0.23273247480392456, 0.20898717641830444, -0.1187676191329956, 0.3971729278564453, 0.26856327056884766, -0.25129467248916626, -0.00166400708258152, -0.07299528270959854, 0.00574793666601181, -0.023694731295108795, 0.04750382900238037, 0.10782571136951447, -0.09277870506048203, 0.32156550884246826, 0.012712536379694939, 0.33756834268569946, -0.09768804162740707, -0.10168402642011642, -0.1865316778421402, -0.29642584919929504, -0.5026462078094482, 0.20269758999347687, -0.12379340082406998, 0.580032229423523, -0.0892399400472641, -0.20606768131256104, -0.1913299560546875, 0.03812504932284355, 0.41297364234924316, -0.2808990180492401, -0.3800540864467621, 0.1765291690826416, -0.12255968898534775, -0.0039032958447933197, 0.06794381141662598, 0.4291647672653198, -0.07805100083351135, 0.06363590061664581, -0.4130863547325134, -0.48456764221191406, 0.6770595908164978, -0.2093370407819748, -0.17181071639060974, -0.047316595911979675, 0.2534676790237427, 0.2111448347568512, -0.14826832711696625, -0.6575215458869934, -0.1253148764371872, 0.43638068437576294, -0.08841349184513092, -0.3597204387187958, 0.2476116120815277, -0.10433153063058853, 0.07654593139886856, 0.03407829999923706, 0.2886316180229187, 0.29777055978775024, -0.3693065047264099, 0.09994756430387497, -0.3544817566871643 ]
https://github.com/huggingface/datasets/issues/6446
Thanks, will keep that in mind. But I tried running `dataset_aligned = dataset.align_labels_with_mapping(model.config.id2label, 'label')`, and received this error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/victor/anaconda3/envs/transformers-v2/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5928, in align_labels_with_mapping label2id = {k.lower(): v for k, v in label2id.items()} File "/Users/victor/anaconda3/envs/transformers-v2/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5928, in <dictcomp> label2id = {k.lower(): v for k, v in label2id.items()} AttributeError: 'int' object has no attribute 'lower' ``` My guess is that the dataset `label` column is purely an int ID, and I'm not sure there's a way to identify which class label the ID belongs to in the dataset easily.
Speech Commands v2 dataset doesn't match AST-v2 config
### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3
101
Speech Commands v2 dataset doesn't match AST-v2 config ### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3 Thanks, will keep that in mind. But I tried running `dataset_aligned = dataset.align_labels_with_mapping(model.config.id2label, 'label')`, and received this error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/victor/anaconda3/envs/transformers-v2/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5928, in align_labels_with_mapping label2id = {k.lower(): v for k, v in label2id.items()} File "/Users/victor/anaconda3/envs/transformers-v2/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5928, in <dictcomp> label2id = {k.lower(): v for k, v in label2id.items()} AttributeError: 'int' object has no attribute 'lower' ``` My guess is that the dataset `label` column is purely an int ID, and I'm not sure there's a way to identify which class label the ID belongs to in the dataset easily.
[ -0.18747246265411377, -0.4025111794471741, -0.002486366778612137, 0.5321387052536011, 0.23339498043060303, 0.21374253928661346, 0.22850120067596436, 0.29725173115730286, -0.3711091876029968, -0.07165176421403885, -0.11736663430929184, 0.2715616226196289, -0.22551605105400085, -0.1073668897151947, 0.13778352737426758, -0.21275395154953003, -0.032418783754110336, -0.15792031586170197, 0.020023582503199577, -0.3215371072292328, 0.06824930757284164, 0.36392465233802795, -0.1182512640953064, 0.184015154838562, -0.2140275239944458, 0.23679548501968384, 0.26778414845466614, 0.021138926967978477, 0.06792450696229935, -0.25001615285873413, 0.23720252513885498, -0.29932498931884766, 0.18559101223945618, 0.7066990733146667, -0.00011181064473930746, 0.03461935371160507, -0.14995571970939636, -0.20544986426830292, -0.23061217367649078, -0.18468362092971802, 0.29485318064689636, 0.1682664155960083, -0.10365703701972961, 0.10528959333896637, -0.45411306619644165, 0.04939505085349083, -0.037733517587184906, 0.11540204286575317, 0.18259763717651367, 0.3578495979309082, 0.19933807849884033, 0.060868680477142334, 0.08625086396932602, 0.037369146943092346, -0.04976242035627365, -0.15468207001686096, 0.09196589142084122, -0.008579462766647339, -0.0492170974612236, 0.20674215257167816, -0.05964925140142441, 0.3764403462409973, -0.01971878483891487, 0.023707017302513123, 0.1344669759273529, -0.20642425119876862, -0.26144909858703613, -0.336935818195343, 0.0709342360496521, 0.2628130316734314, 0.3486268222332001, -0.3478742837905884, -0.2226802110671997, -0.25966352224349976, 0.019994985312223434, -0.2079104781150818, 0.03577226400375366, 0.15141518414020538, -0.04662030562758446, 0.3756716847419739, 0.006890058517456055, 0.05016095191240311, -0.31496143341064453, 0.0787971019744873, 0.17177219688892365, 0.23924818634986877, 0.0054680220782756805, 0.07691027224063873, -0.18534298241138458, -0.22686468064785004, -0.13666094839572906, 0.27822786569595337, -0.053587906062603, 0.20579290390014648, -0.5201442837715149, -0.12859435379505157, 0.004721337929368019, -0.21186619997024536, 0.20867013931274414, -0.07009585946798325, 0.3701627850532532, 0.1286381483078003, -0.025193601846694946, -0.12625007331371307, -0.03868648037314415, 0.5110988020896912, 0.36846789717674255, 0.5599426627159119, -0.03981722518801689, -0.005548335611820221, -0.2577396333217621, 0.15620043873786926, -0.14446291327476501, -0.20922167599201202, -0.0438290573656559, 0.04180704802274704, 0.018605656921863556, -0.34631916880607605, -0.5094919204711914, 0.2435625046491623, -0.2885713577270508, -0.106751449406147, 0.09892801940441132, 0.23411446809768677, -0.09588903188705444, 0.1295735239982605, 0.2651788592338562, -0.023061126470565796, -0.18521720170974731, -0.3946678638458252, -0.12286253273487091, -0.10080933570861816, -0.10272841900587082, -0.028582219034433365, -0.00353037565946579, 0.14297889173030853, 0.433891236782074, -0.006479233503341675, 0.11070296913385391, -0.008214958012104034, -0.29655665159225464, 0.11449605971574783, 0.16677194833755493, 0.20062105357646942, -0.32617342472076416, 0.21699655055999756, 0.050206128507852554, 0.22912713885307312, -0.022813647985458374, 0.009943206794559956, -0.26408812403678894, -0.04855963587760925, 0.04543232172727585, 0.2419445514678955, -0.028936654329299927, -0.17795276641845703, 0.30251073837280273, 0.30982643365859985, 0.41348662972450256, -0.09888508170843124, 0.11975628137588501, -0.3865870237350464, -0.3835851848125458, -0.16747906804084778, 0.08145222812891006, 0.12241793423891068, -0.26703572273254395, -0.29431086778640747, 0.27851349115371704, 0.2711246609687805, -0.0013165846467018127, 0.26031529903411865, -0.0447220541536808, 0.2706606984138489, -0.15112252533435822, -0.04765757918357849, 0.3246663808822632, -0.297505646944046, -0.6789896488189697, -0.24532009661197662, -0.03304332494735718, 0.1649886667728424, 0.07447446882724762, 0.029704157263040543, 0.19152015447616577, -0.022290732711553574, 0.4898169934749603, 0.013244137167930603, 0.18720513582229614, -0.19115570187568665, -0.4142115116119385, -0.1304248571395874, 0.19006602466106415, 0.16765019297599792, -0.14964833855628967, -0.0522480309009552, -0.2445068657398224, -0.08443190157413483, 0.3318924605846405, -0.006104564294219017, -0.09936697036027908, 0.14810651540756226, -0.15354342758655548, 0.10736148059368134, 0.3617764115333557, -0.19590891897678375, -0.4322797954082489, 0.28171777725219727, 0.052136413753032684, 0.21616974472999573, 0.411687433719635, 0.10634461045265198, -0.13713398575782776, -0.35510939359664917, -0.16931742429733276, -0.4506959021091461, 0.1632024645805359, 0.3238028883934021, -0.048581890761852264, -0.41639623045921326, -0.23879607021808624, 0.24599753320217133, -0.3743211627006531, 0.13380324840545654, -0.09387332946062088, -0.023884322494268417, -0.21181823313236237, -0.07623245567083359, 0.035143956542015076, 0.15373307466506958, 0.26368802785873413, -0.09741288423538208, -0.0591261126101017, 0.25766903162002563, -0.07956226170063019, -0.2805304527282715, -0.3751281201839447, 0.18274036049842834, 0.2516774535179138, -0.42653387784957886, -0.1391361653804779, 0.3591443598270416, -0.09998078644275665, -0.018807820975780487, -0.03331668674945831, 0.33247217535972595, 0.38880905508995056, -0.161516010761261, -0.024120807647705078, 0.060242727398872375, 0.09831035882234573, -0.028904102742671967, -0.17033153772354126, 0.07471279799938202, 0.48118820786476135, -0.20243652164936066, 0.16135536134243011, 0.10182581841945648, -0.4740212559700012, 0.2654285728931427, 0.5754410028457642, -0.009574949741363525, 0.039510633796453476, 0.30594271421432495, -0.2503014802932739, 0.14103195071220398, -0.020728036761283875, -0.059513676911592484, 0.04694385826587677, 0.3015444576740265, -0.28387099504470825, 0.008005594834685326, -0.4834321439266205, -0.06987829506397247, 0.08183131366968155, -0.055042434483766556, -0.0548587366938591, 0.2542889416217804, 0.09591829776763916, 0.2127702236175537, -0.23139935731887817, -0.1120113730430603, -0.15888944268226624, 0.2725939452648163, -0.6390701532363892, 0.04636215418577194, -0.09651698172092438, 0.24413730204105377, -0.12991374731063843, -0.2056877315044403, -0.27273058891296387, 0.272354394197464, 0.20937247574329376, -0.15933534502983093, -0.07458341866731644, 0.39713722467422485, 0.07110966742038727, 0.19569680094718933, 0.19242563843727112, -0.2543756067752838, 0.213845893740654, -0.0773305594921112, -0.34475746750831604, 0.051733821630477905, 0.0782410204410553, -0.4440631568431854, 0.07361772656440735, -0.0887494906783104, -0.41558659076690674, 0.0832269936800003, -0.35133519768714905, 0.15750771760940552, -0.2601223587989807, 0.26262977719306946, 0.18439070880413055, 0.028725087642669678, -0.06684158742427826, -0.05210427939891815, -0.08448518812656403, 0.04732813686132431, -0.3325466215610504, -0.10915027558803558, 0.11942516267299652, -0.19033610820770264, -0.04923708736896515, -0.6160709857940674, 0.16853421926498413, -0.22286680340766907, 0.013533227145671844, 0.19126872718334198, 0.3002941608428955, 0.6105598211288452, 0.022024650126695633, -0.018208518624305725, 0.09187449514865875, 0.483700156211853, -0.4225393235683441, -0.2995116412639618, 0.2698533236980438, -0.04822579398751259, -0.33716773986816406, -0.240568146109581, 0.13719184696674347, 0.19219417870044708, -0.11462660133838654, -0.1405775249004364, 0.04353148490190506, -0.23777496814727783, 0.17859892547130585, -0.22889387607574463, -0.001998964697122574, 0.3463226854801178, 0.03183282911777496, 0.1421918421983719, -0.35945698618888855, -0.43034690618515015, 0.6389917135238647, 0.3092272877693176, 0.30736222863197327, -0.2547580301761627, 0.1579250991344452, -0.12449304759502411, 0.5327120423316956, 0.15398871898651123, -0.4025743007659912, -0.10610879957675934, -0.10159502178430557, -0.020407583564519882, -0.044265035539865494, -0.23439466953277588, 0.26287680864334106, 0.0633469820022583, -0.027999337762594223, 0.4104907810688019, -0.1554802656173706, 0.04636950045824051, -0.06940237432718277, 0.19382785260677338, -0.1700846254825592, -0.039581548422575, -0.028844408690929413, -0.20013335347175598, 0.10988040268421173, 0.03307711333036423, 0.333702027797699, 0.07887708395719528, -0.07326346635818481, 0.28818419575691223, -0.06527596712112427, -0.09236713498830795, 0.12838876247406006, -0.40556800365448, 0.03183282911777496, -0.11045320332050323, 0.23206934332847595, 0.1801249384880066, 0.35010671615600586, -0.18844833970069885, -0.27942535281181335, -0.15296798944473267, 0.2535671591758728, 0.5257295370101929, -0.4384397268295288, 0.2509213387966156, 0.19532954692840576, 0.48513200879096985, -0.20916010439395905, -0.17733833193778992, -0.10787966847419739, -0.05681470036506653, 0.281724750995636, 0.023252170532941818, -0.2003655731678009, -0.058753736317157745, 0.22501488029956818, 0.22456787526607513, -0.17522627115249634, 0.1962178349494934, -0.16321516036987305, 0.010286055505275726, -0.03357302024960518, 0.11101703345775604, 0.253487229347229, 0.13700169324874878, -0.19475916028022766, 0.25290095806121826, 0.10101048648357391, -0.14494657516479492, 0.36175864934921265, 0.23349511623382568, 0.44503262639045715, 0.09647734463214874, 0.17447812855243683, 0.40271759033203125, 0.31147798895835876, 0.15362684428691864, 0.6320443153381348, -0.30478981137275696, -0.53084397315979, -0.0123986741527915, 0.1357669085264206, 0.14778298139572144, 0.30823445320129395, 0.10069961845874786, -0.020371321588754654, -0.20216107368469238, 0.02360112965106964, 0.006345722824335098, 0.10394512861967087, 0.19152146577835083, 0.34633901715278625, -0.32713937759399414, -0.4048221707344055, 0.3001938760280609, -0.24853505194187164, -0.15572571754455566, 0.2714473307132721, -0.22536759078502655, -0.5140077471733093, 0.4977109730243683, 0.0647449716925621, 0.9458175897598267, 0.3136380612850189, 0.2579007148742676, 0.10744483023881912, -0.1058456227183342, 0.2656976878643036, -0.2069852352142334, 0.337484747171402, -0.342987984418869, -0.04579585790634155, -0.0038903802633285522, 0.024055294692516327, -0.13806350529193878, 0.25880101323127747, -0.23221810162067413, 0.309702068567276, -0.09306013584136963, 0.10140161216259003, 0.21896442770957947, 0.04224516451358795, 0.42477425932884216, -0.1035170704126358, -0.041486699134111404, 0.1352037638425827, -0.1546727418899536, 0.3546368181705475, -0.013250298798084259, -0.04145607352256775, -0.21451245248317719, -0.3334375321865082, -0.3637053072452545, -0.0036730021238327026, -0.5523003339767456, -0.18592362105846405, 0.13873383402824402, -0.3514012396335602, 0.22197416424751282, 0.3328244090080261, 0.4275970458984375, 0.003020482137799263, -0.056025341153144836, 0.2912209928035736, 0.215406134724617, 0.2818806767463684, 0.19416116178035736, -0.10132525861263275, 0.5661072731018066, 0.052466168999671936, -0.09004506468772888, 0.024862300604581833, 0.12331418693065643, -0.0679318979382515, -0.24061395227909088, -0.1504354178905487, 0.3013334274291992, -0.37447622418403625, 0.026702310889959335, 0.0318964347243309, -0.10592436790466309, -0.34506458044052124, 0.13663174211978912, -0.11825669556856155, -0.5008188486099243, 0.05343463271856308, 0.29064467549324036, -0.35922330617904663, -0.04626763239502907, 0.38292911648750305, 0.048386964946985245, -0.010964788496494293, 0.4170621335506439, 0.22907602787017822, 0.04323193430900574, -0.21739599108695984, -0.00571422278881073, 0.1340276002883911, -0.44442427158355713, 0.132868230342865, -0.1779426485300064, -0.2501218318939209, -0.07606691122055054, 0.3356223404407501, 0.38072749972343445, 0.16999435424804688, -0.08066338300704956, -0.0844426304101944, -0.40944018959999084, -0.08901214599609375, -0.090905100107193, 0.13699176907539368, -0.23710612952709198, 0.2291165441274643, 0.16382041573524475, -0.02189757116138935, -0.37078016996383667, -0.11201553791761398, 0.06361644715070724, 0.18623368442058563, 0.10505803674459457, -0.11286086589097977, 0.18681731820106506, -0.04476799815893173, 0.1354466676712036, -0.08871987462043762, 0.006142068654298782, -0.20423763990402222, -0.33419498801231384, 0.05792173743247986, -0.03731302171945572, 0.12123937904834747, -0.1673654019832611, 0.02314535528421402, -0.08074823021888733, -0.04236113652586937, 0.09946023672819138, 0.22072967886924744, 0.14343950152397156, 0.5454072952270508, -0.21152107417583466, -0.16402822732925415, 0.2481987029314041, -0.24143733084201813, -0.07528696209192276, -0.058138392865657806, 0.27928587794303894, 0.11589628458023071, -0.10194273293018341, -0.06584066897630692, -0.029210710898041725, 0.2123378962278366, -0.1767342984676361, -0.02510988339781761, -0.11390987038612366, -0.21334229409694672, -0.05821297690272331, 0.3054400682449341, 0.09403420984745026, 0.18684722483158112, -0.362542062997818, -0.19091948866844177, 0.08673743158578873, 0.22299440205097198, -0.32102668285369873, -0.15528321266174316, -0.036998994648456573, -0.14772534370422363, -0.07565301656723022, 0.1524505317211151, -0.08192478865385056, -0.03164766728878021, -0.1675182580947876, 0.24267590045928955, 0.22385896742343903, -0.1251601278781891, 0.38891762495040894, 0.6300961375236511, -0.013213694095611572, -0.0014846716076135635, 0.4608737528324127, -0.23339280486106873, 0.21860674023628235, 0.3583090603351593, 0.10365217924118042, 0.17515595257282257, 0.23973912000656128, 0.17979465425014496, 0.21790683269500732, -0.042381491512060165, -0.07957322895526886, 0.16205307841300964, 0.03233330696821213, 0.2464343160390854, -0.14517943561077118, 0.07989111542701721, -0.011869199573993683, -0.4321335554122925, -0.05807555094361305, -0.04070989787578583, -0.3667941093444824, -0.1481025367975235, -0.25075703859329224, -0.1577051877975464, -0.01147761195898056, -0.012583747506141663, -0.21623371541500092, -0.11155246198177338, 0.1146467849612236, -0.010778281837701797, -0.4425264298915863, -0.2544345259666443, -0.38249340653419495, 0.16878294944763184, 0.07220081984996796, -0.19387345016002655, 0.5081453323364258, 0.023154940456151962, -0.32812485098838806, 0.09654121845960617, 0.24354462325572968, 0.20061643421649933, 0.12580981850624084, -0.15797868371009827, -0.03007429838180542, 0.12326952815055847, 0.13329839706420898, -0.00764455646276474, 0.17206349968910217, -0.03692047670483589, -0.3985980153083801, 0.289315789937973, 0.0840771347284317, -0.13293467462062836, 0.15999020636081696, 0.001790202222764492, 0.11654112488031387, -0.24309653043746948, 0.2206726372241974, -0.10221405327320099, -0.1185845285654068, -0.3021393120288849, 0.09629039466381073, -0.2569429278373718, -0.050849370658397675, 0.3596380949020386, 0.21621614694595337, 0.14708612859249115, -0.14649784564971924, 0.12010683864355087, 0.030743110924959183, 0.4407394826412201, 0.21591103076934814, -0.1937839537858963, -0.13701562583446503, 0.008256092667579651, -0.3116152584552765, 0.031515687704086304, 0.1790604293346405, -0.019934173673391342, 0.044053785502910614, 0.14520177245140076, 0.2379549890756607, -0.09593658149242401, 0.3183687925338745, -0.1452525556087494, -0.002610638737678528, 0.17329315841197968, -0.23273247480392456, 0.20898717641830444, -0.1187676191329956, 0.3971729278564453, 0.26856327056884766, -0.25129467248916626, -0.00166400708258152, -0.07299528270959854, 0.00574793666601181, -0.023694731295108795, 0.04750382900238037, 0.10782571136951447, -0.09277870506048203, 0.32156550884246826, 0.012712536379694939, 0.33756834268569946, -0.09768804162740707, -0.10168402642011642, -0.1865316778421402, -0.29642584919929504, -0.5026462078094482, 0.20269758999347687, -0.12379340082406998, 0.580032229423523, -0.0892399400472641, -0.20606768131256104, -0.1913299560546875, 0.03812504932284355, 0.41297364234924316, -0.2808990180492401, -0.3800540864467621, 0.1765291690826416, -0.12255968898534775, -0.0039032958447933197, 0.06794381141662598, 0.4291647672653198, -0.07805100083351135, 0.06363590061664581, -0.4130863547325134, -0.48456764221191406, 0.6770595908164978, -0.2093370407819748, -0.17181071639060974, -0.047316595911979675, 0.2534676790237427, 0.2111448347568512, -0.14826832711696625, -0.6575215458869934, -0.1253148764371872, 0.43638068437576294, -0.08841349184513092, -0.3597204387187958, 0.2476116120815277, -0.10433153063058853, 0.07654593139886856, 0.03407829999923706, 0.2886316180229187, 0.29777055978775024, -0.3693065047264099, 0.09994756430387497, -0.3544817566871643 ]
https://github.com/huggingface/datasets/issues/6446
Replacing `model.config.id2label` with `model.config.label2id` should fix the issue. So, the full code to align the labels with the model config is as follows: ```python from datasets import load_dataset from transformers import AutoFeatureExtractor, AutoModelForAudioClassification # extractor = AutoFeatureExtractor.from_pretrained("MIT/ast-finetuned-speech-commands-v2") model = AutoModelForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") ds = load_dataset("speech_commands", "v0.02") ds = ds.filter(lambda label: label != ds["train"].features["label"].str2int("_silence_"), input_columns="label") ds = ds.align_labels_with_mapping(model.config.label2id, "label") ```
Speech Commands v2 dataset doesn't match AST-v2 config
### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3
57
Speech Commands v2 dataset doesn't match AST-v2 config ### Describe the bug [According](https://huggingface.co/MIT/ast-finetuned-speech-commands-v2) to `MIT/ast-finetuned-speech-commands-v2`, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tune `MIT/ast-finetuned-speech-commands-v2`. ### Steps to reproduce the bug ``` >>> model = ASTForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") >>> model.config.id2label {0: 'backward', 1: 'follow', 2: 'five', 3: 'bed', 4: 'zero', 5: 'on', 6: 'learn', 7: 'two', 8: 'house', 9: 'tree', 10: 'dog', 11: 'stop', 12: 'seven', 13: 'eight', 14: 'down', 15: 'six', 16: 'forward', 17: 'cat', 18: 'right', 19: 'visual', 20: 'four', 21: 'wow', 22: 'no', 23: 'nine', 24: 'off', 25: 'three', 26: 'left', 27: 'marvin', 28: 'yes', 29: 'up', 30: 'sheila', 31: 'happy', 32: 'bird', 33: 'go', 34: 'one'} >>> dataset = load_dataset("speech_commands", "v0.02", split="test") >>> torch.unique(torch.Tensor(dataset['label'])) tensor([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35.]) ``` If you try to explore the [dataset itself](https://huggingface.co/datasets/speech_commands/viewer/v0.02/test), you can see that the id to label does not match what is provided by `model.config.id2label`. ### Expected behavior The labels should match completely and there should be the same number of label classes between the model config and the dataset itself. ### Environment info datasets = 2.14.6, transformers = 4.33.3 Replacing `model.config.id2label` with `model.config.label2id` should fix the issue. So, the full code to align the labels with the model config is as follows: ```python from datasets import load_dataset from transformers import AutoFeatureExtractor, AutoModelForAudioClassification # extractor = AutoFeatureExtractor.from_pretrained("MIT/ast-finetuned-speech-commands-v2") model = AutoModelForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2") ds = load_dataset("speech_commands", "v0.02") ds = ds.filter(lambda label: label != ds["train"].features["label"].str2int("_silence_"), input_columns="label") ds = ds.align_labels_with_mapping(model.config.label2id, "label") ```
[ -0.18747246265411377, -0.4025111794471741, -0.002486366778612137, 0.5321387052536011, 0.23339498043060303, 0.21374253928661346, 0.22850120067596436, 0.29725173115730286, -0.3711091876029968, -0.07165176421403885, -0.11736663430929184, 0.2715616226196289, -0.22551605105400085, -0.1073668897151947, 0.13778352737426758, -0.21275395154953003, -0.032418783754110336, -0.15792031586170197, 0.020023582503199577, -0.3215371072292328, 0.06824930757284164, 0.36392465233802795, -0.1182512640953064, 0.184015154838562, -0.2140275239944458, 0.23679548501968384, 0.26778414845466614, 0.021138926967978477, 0.06792450696229935, -0.25001615285873413, 0.23720252513885498, -0.29932498931884766, 0.18559101223945618, 0.7066990733146667, -0.00011181064473930746, 0.03461935371160507, -0.14995571970939636, -0.20544986426830292, -0.23061217367649078, -0.18468362092971802, 0.29485318064689636, 0.1682664155960083, -0.10365703701972961, 0.10528959333896637, -0.45411306619644165, 0.04939505085349083, -0.037733517587184906, 0.11540204286575317, 0.18259763717651367, 0.3578495979309082, 0.19933807849884033, 0.060868680477142334, 0.08625086396932602, 0.037369146943092346, -0.04976242035627365, -0.15468207001686096, 0.09196589142084122, -0.008579462766647339, -0.0492170974612236, 0.20674215257167816, -0.05964925140142441, 0.3764403462409973, -0.01971878483891487, 0.023707017302513123, 0.1344669759273529, -0.20642425119876862, -0.26144909858703613, -0.336935818195343, 0.0709342360496521, 0.2628130316734314, 0.3486268222332001, -0.3478742837905884, -0.2226802110671997, -0.25966352224349976, 0.019994985312223434, -0.2079104781150818, 0.03577226400375366, 0.15141518414020538, -0.04662030562758446, 0.3756716847419739, 0.006890058517456055, 0.05016095191240311, -0.31496143341064453, 0.0787971019744873, 0.17177219688892365, 0.23924818634986877, 0.0054680220782756805, 0.07691027224063873, -0.18534298241138458, -0.22686468064785004, -0.13666094839572906, 0.27822786569595337, -0.053587906062603, 0.20579290390014648, -0.5201442837715149, -0.12859435379505157, 0.004721337929368019, -0.21186619997024536, 0.20867013931274414, -0.07009585946798325, 0.3701627850532532, 0.1286381483078003, -0.025193601846694946, -0.12625007331371307, -0.03868648037314415, 0.5110988020896912, 0.36846789717674255, 0.5599426627159119, -0.03981722518801689, -0.005548335611820221, -0.2577396333217621, 0.15620043873786926, -0.14446291327476501, -0.20922167599201202, -0.0438290573656559, 0.04180704802274704, 0.018605656921863556, -0.34631916880607605, -0.5094919204711914, 0.2435625046491623, -0.2885713577270508, -0.106751449406147, 0.09892801940441132, 0.23411446809768677, -0.09588903188705444, 0.1295735239982605, 0.2651788592338562, -0.023061126470565796, -0.18521720170974731, -0.3946678638458252, -0.12286253273487091, -0.10080933570861816, -0.10272841900587082, -0.028582219034433365, -0.00353037565946579, 0.14297889173030853, 0.433891236782074, -0.006479233503341675, 0.11070296913385391, -0.008214958012104034, -0.29655665159225464, 0.11449605971574783, 0.16677194833755493, 0.20062105357646942, -0.32617342472076416, 0.21699655055999756, 0.050206128507852554, 0.22912713885307312, -0.022813647985458374, 0.009943206794559956, -0.26408812403678894, -0.04855963587760925, 0.04543232172727585, 0.2419445514678955, -0.028936654329299927, -0.17795276641845703, 0.30251073837280273, 0.30982643365859985, 0.41348662972450256, -0.09888508170843124, 0.11975628137588501, -0.3865870237350464, -0.3835851848125458, -0.16747906804084778, 0.08145222812891006, 0.12241793423891068, -0.26703572273254395, -0.29431086778640747, 0.27851349115371704, 0.2711246609687805, -0.0013165846467018127, 0.26031529903411865, -0.0447220541536808, 0.2706606984138489, -0.15112252533435822, -0.04765757918357849, 0.3246663808822632, -0.297505646944046, -0.6789896488189697, -0.24532009661197662, -0.03304332494735718, 0.1649886667728424, 0.07447446882724762, 0.029704157263040543, 0.19152015447616577, -0.022290732711553574, 0.4898169934749603, 0.013244137167930603, 0.18720513582229614, -0.19115570187568665, -0.4142115116119385, -0.1304248571395874, 0.19006602466106415, 0.16765019297599792, -0.14964833855628967, -0.0522480309009552, -0.2445068657398224, -0.08443190157413483, 0.3318924605846405, -0.006104564294219017, -0.09936697036027908, 0.14810651540756226, -0.15354342758655548, 0.10736148059368134, 0.3617764115333557, -0.19590891897678375, -0.4322797954082489, 0.28171777725219727, 0.052136413753032684, 0.21616974472999573, 0.411687433719635, 0.10634461045265198, -0.13713398575782776, -0.35510939359664917, -0.16931742429733276, -0.4506959021091461, 0.1632024645805359, 0.3238028883934021, -0.048581890761852264, -0.41639623045921326, -0.23879607021808624, 0.24599753320217133, -0.3743211627006531, 0.13380324840545654, -0.09387332946062088, -0.023884322494268417, -0.21181823313236237, -0.07623245567083359, 0.035143956542015076, 0.15373307466506958, 0.26368802785873413, -0.09741288423538208, -0.0591261126101017, 0.25766903162002563, -0.07956226170063019, -0.2805304527282715, -0.3751281201839447, 0.18274036049842834, 0.2516774535179138, -0.42653387784957886, -0.1391361653804779, 0.3591443598270416, -0.09998078644275665, -0.018807820975780487, -0.03331668674945831, 0.33247217535972595, 0.38880905508995056, -0.161516010761261, -0.024120807647705078, 0.060242727398872375, 0.09831035882234573, -0.028904102742671967, -0.17033153772354126, 0.07471279799938202, 0.48118820786476135, -0.20243652164936066, 0.16135536134243011, 0.10182581841945648, -0.4740212559700012, 0.2654285728931427, 0.5754410028457642, -0.009574949741363525, 0.039510633796453476, 0.30594271421432495, -0.2503014802932739, 0.14103195071220398, -0.020728036761283875, -0.059513676911592484, 0.04694385826587677, 0.3015444576740265, -0.28387099504470825, 0.008005594834685326, -0.4834321439266205, -0.06987829506397247, 0.08183131366968155, -0.055042434483766556, -0.0548587366938591, 0.2542889416217804, 0.09591829776763916, 0.2127702236175537, -0.23139935731887817, -0.1120113730430603, -0.15888944268226624, 0.2725939452648163, -0.6390701532363892, 0.04636215418577194, -0.09651698172092438, 0.24413730204105377, -0.12991374731063843, -0.2056877315044403, -0.27273058891296387, 0.272354394197464, 0.20937247574329376, -0.15933534502983093, -0.07458341866731644, 0.39713722467422485, 0.07110966742038727, 0.19569680094718933, 0.19242563843727112, -0.2543756067752838, 0.213845893740654, -0.0773305594921112, -0.34475746750831604, 0.051733821630477905, 0.0782410204410553, -0.4440631568431854, 0.07361772656440735, -0.0887494906783104, -0.41558659076690674, 0.0832269936800003, -0.35133519768714905, 0.15750771760940552, -0.2601223587989807, 0.26262977719306946, 0.18439070880413055, 0.028725087642669678, -0.06684158742427826, -0.05210427939891815, -0.08448518812656403, 0.04732813686132431, -0.3325466215610504, -0.10915027558803558, 0.11942516267299652, -0.19033610820770264, -0.04923708736896515, -0.6160709857940674, 0.16853421926498413, -0.22286680340766907, 0.013533227145671844, 0.19126872718334198, 0.3002941608428955, 0.6105598211288452, 0.022024650126695633, -0.018208518624305725, 0.09187449514865875, 0.483700156211853, -0.4225393235683441, -0.2995116412639618, 0.2698533236980438, -0.04822579398751259, -0.33716773986816406, -0.240568146109581, 0.13719184696674347, 0.19219417870044708, -0.11462660133838654, -0.1405775249004364, 0.04353148490190506, -0.23777496814727783, 0.17859892547130585, -0.22889387607574463, -0.001998964697122574, 0.3463226854801178, 0.03183282911777496, 0.1421918421983719, -0.35945698618888855, -0.43034690618515015, 0.6389917135238647, 0.3092272877693176, 0.30736222863197327, -0.2547580301761627, 0.1579250991344452, -0.12449304759502411, 0.5327120423316956, 0.15398871898651123, -0.4025743007659912, -0.10610879957675934, -0.10159502178430557, -0.020407583564519882, -0.044265035539865494, -0.23439466953277588, 0.26287680864334106, 0.0633469820022583, -0.027999337762594223, 0.4104907810688019, -0.1554802656173706, 0.04636950045824051, -0.06940237432718277, 0.19382785260677338, -0.1700846254825592, -0.039581548422575, -0.028844408690929413, -0.20013335347175598, 0.10988040268421173, 0.03307711333036423, 0.333702027797699, 0.07887708395719528, -0.07326346635818481, 0.28818419575691223, -0.06527596712112427, -0.09236713498830795, 0.12838876247406006, -0.40556800365448, 0.03183282911777496, -0.11045320332050323, 0.23206934332847595, 0.1801249384880066, 0.35010671615600586, -0.18844833970069885, -0.27942535281181335, -0.15296798944473267, 0.2535671591758728, 0.5257295370101929, -0.4384397268295288, 0.2509213387966156, 0.19532954692840576, 0.48513200879096985, -0.20916010439395905, -0.17733833193778992, -0.10787966847419739, -0.05681470036506653, 0.281724750995636, 0.023252170532941818, -0.2003655731678009, -0.058753736317157745, 0.22501488029956818, 0.22456787526607513, -0.17522627115249634, 0.1962178349494934, -0.16321516036987305, 0.010286055505275726, -0.03357302024960518, 0.11101703345775604, 0.253487229347229, 0.13700169324874878, -0.19475916028022766, 0.25290095806121826, 0.10101048648357391, -0.14494657516479492, 0.36175864934921265, 0.23349511623382568, 0.44503262639045715, 0.09647734463214874, 0.17447812855243683, 0.40271759033203125, 0.31147798895835876, 0.15362684428691864, 0.6320443153381348, -0.30478981137275696, -0.53084397315979, -0.0123986741527915, 0.1357669085264206, 0.14778298139572144, 0.30823445320129395, 0.10069961845874786, -0.020371321588754654, -0.20216107368469238, 0.02360112965106964, 0.006345722824335098, 0.10394512861967087, 0.19152146577835083, 0.34633901715278625, -0.32713937759399414, -0.4048221707344055, 0.3001938760280609, -0.24853505194187164, -0.15572571754455566, 0.2714473307132721, -0.22536759078502655, -0.5140077471733093, 0.4977109730243683, 0.0647449716925621, 0.9458175897598267, 0.3136380612850189, 0.2579007148742676, 0.10744483023881912, -0.1058456227183342, 0.2656976878643036, -0.2069852352142334, 0.337484747171402, -0.342987984418869, -0.04579585790634155, -0.0038903802633285522, 0.024055294692516327, -0.13806350529193878, 0.25880101323127747, -0.23221810162067413, 0.309702068567276, -0.09306013584136963, 0.10140161216259003, 0.21896442770957947, 0.04224516451358795, 0.42477425932884216, -0.1035170704126358, -0.041486699134111404, 0.1352037638425827, -0.1546727418899536, 0.3546368181705475, -0.013250298798084259, -0.04145607352256775, -0.21451245248317719, -0.3334375321865082, -0.3637053072452545, -0.0036730021238327026, -0.5523003339767456, -0.18592362105846405, 0.13873383402824402, -0.3514012396335602, 0.22197416424751282, 0.3328244090080261, 0.4275970458984375, 0.003020482137799263, -0.056025341153144836, 0.2912209928035736, 0.215406134724617, 0.2818806767463684, 0.19416116178035736, -0.10132525861263275, 0.5661072731018066, 0.052466168999671936, -0.09004506468772888, 0.024862300604581833, 0.12331418693065643, -0.0679318979382515, -0.24061395227909088, -0.1504354178905487, 0.3013334274291992, -0.37447622418403625, 0.026702310889959335, 0.0318964347243309, -0.10592436790466309, -0.34506458044052124, 0.13663174211978912, -0.11825669556856155, -0.5008188486099243, 0.05343463271856308, 0.29064467549324036, -0.35922330617904663, -0.04626763239502907, 0.38292911648750305, 0.048386964946985245, -0.010964788496494293, 0.4170621335506439, 0.22907602787017822, 0.04323193430900574, -0.21739599108695984, -0.00571422278881073, 0.1340276002883911, -0.44442427158355713, 0.132868230342865, -0.1779426485300064, -0.2501218318939209, -0.07606691122055054, 0.3356223404407501, 0.38072749972343445, 0.16999435424804688, -0.08066338300704956, -0.0844426304101944, -0.40944018959999084, -0.08901214599609375, -0.090905100107193, 0.13699176907539368, -0.23710612952709198, 0.2291165441274643, 0.16382041573524475, -0.02189757116138935, -0.37078016996383667, -0.11201553791761398, 0.06361644715070724, 0.18623368442058563, 0.10505803674459457, -0.11286086589097977, 0.18681731820106506, -0.04476799815893173, 0.1354466676712036, -0.08871987462043762, 0.006142068654298782, -0.20423763990402222, -0.33419498801231384, 0.05792173743247986, -0.03731302171945572, 0.12123937904834747, -0.1673654019832611, 0.02314535528421402, -0.08074823021888733, -0.04236113652586937, 0.09946023672819138, 0.22072967886924744, 0.14343950152397156, 0.5454072952270508, -0.21152107417583466, -0.16402822732925415, 0.2481987029314041, -0.24143733084201813, -0.07528696209192276, -0.058138392865657806, 0.27928587794303894, 0.11589628458023071, -0.10194273293018341, -0.06584066897630692, -0.029210710898041725, 0.2123378962278366, -0.1767342984676361, -0.02510988339781761, -0.11390987038612366, -0.21334229409694672, -0.05821297690272331, 0.3054400682449341, 0.09403420984745026, 0.18684722483158112, -0.362542062997818, -0.19091948866844177, 0.08673743158578873, 0.22299440205097198, -0.32102668285369873, -0.15528321266174316, -0.036998994648456573, -0.14772534370422363, -0.07565301656723022, 0.1524505317211151, -0.08192478865385056, -0.03164766728878021, -0.1675182580947876, 0.24267590045928955, 0.22385896742343903, -0.1251601278781891, 0.38891762495040894, 0.6300961375236511, -0.013213694095611572, -0.0014846716076135635, 0.4608737528324127, -0.23339280486106873, 0.21860674023628235, 0.3583090603351593, 0.10365217924118042, 0.17515595257282257, 0.23973912000656128, 0.17979465425014496, 0.21790683269500732, -0.042381491512060165, -0.07957322895526886, 0.16205307841300964, 0.03233330696821213, 0.2464343160390854, -0.14517943561077118, 0.07989111542701721, -0.011869199573993683, -0.4321335554122925, -0.05807555094361305, -0.04070989787578583, -0.3667941093444824, -0.1481025367975235, -0.25075703859329224, -0.1577051877975464, -0.01147761195898056, -0.012583747506141663, -0.21623371541500092, -0.11155246198177338, 0.1146467849612236, -0.010778281837701797, -0.4425264298915863, -0.2544345259666443, -0.38249340653419495, 0.16878294944763184, 0.07220081984996796, -0.19387345016002655, 0.5081453323364258, 0.023154940456151962, -0.32812485098838806, 0.09654121845960617, 0.24354462325572968, 0.20061643421649933, 0.12580981850624084, -0.15797868371009827, -0.03007429838180542, 0.12326952815055847, 0.13329839706420898, -0.00764455646276474, 0.17206349968910217, -0.03692047670483589, -0.3985980153083801, 0.289315789937973, 0.0840771347284317, -0.13293467462062836, 0.15999020636081696, 0.001790202222764492, 0.11654112488031387, -0.24309653043746948, 0.2206726372241974, -0.10221405327320099, -0.1185845285654068, -0.3021393120288849, 0.09629039466381073, -0.2569429278373718, -0.050849370658397675, 0.3596380949020386, 0.21621614694595337, 0.14708612859249115, -0.14649784564971924, 0.12010683864355087, 0.030743110924959183, 0.4407394826412201, 0.21591103076934814, -0.1937839537858963, -0.13701562583446503, 0.008256092667579651, -0.3116152584552765, 0.031515687704086304, 0.1790604293346405, -0.019934173673391342, 0.044053785502910614, 0.14520177245140076, 0.2379549890756607, -0.09593658149242401, 0.3183687925338745, -0.1452525556087494, -0.002610638737678528, 0.17329315841197968, -0.23273247480392456, 0.20898717641830444, -0.1187676191329956, 0.3971729278564453, 0.26856327056884766, -0.25129467248916626, -0.00166400708258152, -0.07299528270959854, 0.00574793666601181, -0.023694731295108795, 0.04750382900238037, 0.10782571136951447, -0.09277870506048203, 0.32156550884246826, 0.012712536379694939, 0.33756834268569946, -0.09768804162740707, -0.10168402642011642, -0.1865316778421402, -0.29642584919929504, -0.5026462078094482, 0.20269758999347687, -0.12379340082406998, 0.580032229423523, -0.0892399400472641, -0.20606768131256104, -0.1913299560546875, 0.03812504932284355, 0.41297364234924316, -0.2808990180492401, -0.3800540864467621, 0.1765291690826416, -0.12255968898534775, -0.0039032958447933197, 0.06794381141662598, 0.4291647672653198, -0.07805100083351135, 0.06363590061664581, -0.4130863547325134, -0.48456764221191406, 0.6770595908164978, -0.2093370407819748, -0.17181071639060974, -0.047316595911979675, 0.2534676790237427, 0.2111448347568512, -0.14826832711696625, -0.6575215458869934, -0.1253148764371872, 0.43638068437576294, -0.08841349184513092, -0.3597204387187958, 0.2476116120815277, -0.10433153063058853, 0.07654593139886856, 0.03407829999923706, 0.2886316180229187, 0.29777055978775024, -0.3693065047264099, 0.09994756430387497, -0.3544817566871643 ]
https://github.com/huggingface/datasets/issues/6443
There is a typo in one of the file names - `data/edf.csv` should be renamed to `data/def.csv` πŸ™‚.
Trouble loading files defined in YAML explicitly
Look at https://huggingface.co/datasets/severo/doc-yaml-2 It's a reproduction of the example given in the docs at https://huggingface.co/docs/hub/datasets-manual-configuration ``` You can select multiple files per split using a list of paths: my_dataset_repository/ β”œβ”€β”€ README.md β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ abc.csv β”‚ └── def.csv └── holdout/ └── ghi.csv --- configs: - config_name: default data_files: - split: train path: - "data/abc.csv" - "data/def.csv" - split: test path: "holdout/ghi.csv" --- ``` It raises the following error: ``` Error code: ConfigNamesError Exception: FileNotFoundError Message: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1507, in dataset_module_factory raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ```
18
Trouble loading files defined in YAML explicitly Look at https://huggingface.co/datasets/severo/doc-yaml-2 It's a reproduction of the example given in the docs at https://huggingface.co/docs/hub/datasets-manual-configuration ``` You can select multiple files per split using a list of paths: my_dataset_repository/ β”œβ”€β”€ README.md β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ abc.csv β”‚ └── def.csv └── holdout/ └── ghi.csv --- configs: - config_name: default data_files: - split: train path: - "data/abc.csv" - "data/def.csv" - split: test path: "holdout/ghi.csv" --- ``` It raises the following error: ``` Error code: ConfigNamesError Exception: FileNotFoundError Message: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1507, in dataset_module_factory raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ``` There is a typo in one of the file names - `data/edf.csv` should be renamed to `data/def.csv` πŸ™‚.
[ -0.057436682283878326, -0.3854188323020935, 0.0579201877117157, 0.3542958199977875, 0.27944862842559814, 0.10894966870546341, 0.41074347496032715, 0.30620720982551575, 0.45095789432525635, 0.07631495594978333, -0.2228856384754181, -0.10569396615028381, 0.04646443575620651, 0.2368192970752716, 0.23977205157279968, 0.1931363344192505, -0.12197726964950562, 0.027714230120182037, -0.12581565976142883, -0.042887695133686066, -0.25666916370391846, 0.35039544105529785, 0.06507857143878937, 0.2102331966161728, -0.5011450052261353, 0.06847424060106277, -0.14979276061058044, 0.5480918884277344, -0.22127652168273926, -0.1914474070072174, 0.4279147982597351, 0.29006001353263855, 0.11630640923976898, 0.24300087988376617, -0.00012101398897357285, 0.14960886538028717, 0.17063871026039124, -0.17922911047935486, -0.13317319750785828, -0.24597536027431488, -0.2747754156589508, -0.28953203558921814, 0.2211381196975708, -0.17717160284519196, 0.0788164734840393, 0.11275672912597656, 0.027930719777941704, -0.2697957158088684, 0.4799042344093323, 0.21741144359111786, 0.10502897202968597, 0.21660836040973663, 0.06056910753250122, -0.2901769280433655, 0.3716897666454315, 0.28781652450561523, -0.18656781315803528, 0.10371348261833191, 0.3942863941192627, -0.31819233298301697, -0.007082272320985794, 0.03661537170410156, -0.10472077876329422, -0.20519022643566132, 0.2423132061958313, 0.1377522051334381, 0.1932602822780609, -0.42836177349090576, 0.11776617169380188, 0.4839670658111572, 0.3721809983253479, -0.19691139459609985, -0.4304736852645874, -0.5513537526130676, -0.20505236089229584, -0.00041140615940093994, 0.15435178577899933, 0.24594110250473022, -0.02288173884153366, 0.19005721807479858, -0.22237324714660645, -0.29922720789909363, -0.13951566815376282, 0.33370858430862427, 0.13100945949554443, -0.0808960497379303, -0.08981972932815552, 0.018212877213954926, 0.2839418649673462, 0.032143957912921906, 0.0508376844227314, 0.1425572633743286, -0.02630925364792347, 0.3056502342224121, -0.0918467789888382, 0.1821436583995819, -0.2371566891670227, 0.18337185680866241, 0.4764486253261566, 0.19695791602134705, 0.03420474752783775, 0.09142634272575378, 0.09758895635604858, 0.25939491391181946, 0.30176156759262085, 0.31033098697662354, 0.1451575607061386, 0.22363825142383575, 0.1140020340681076, 0.41164398193359375, 0.21906031668186188, -0.11996185779571533, -0.38499563932418823, -0.462762713432312, -0.37977850437164307, -0.259827584028244, 0.47860366106033325, -0.17886550724506378, -0.49960970878601074, -0.19028401374816895, -0.12446367740631104, -0.11108379065990448, 0.23500193655490875, 0.548258900642395, 0.10811444371938705, -0.24429622292518616, 0.019257694482803345, 0.42603829503059387, -0.4163318872451782, 0.08355692028999329, -0.13417580723762512, 0.34081217646598816, -0.10273110121488571, 0.3296237587928772, 0.3018917143344879, -0.2826636731624603, 0.4809994399547577, -0.0005128420889377594, 0.34133803844451904, -0.3269059658050537, -0.05747827887535095, 0.09137844294309616, -0.09801702201366425, 0.15745532512664795, 0.1974291056394577, 0.11152669787406921, 0.30501610040664673, -0.13550370931625366, -0.10289706289768219, -0.12814006209373474, -0.3908759653568268, -0.5150384306907654, 0.29739752411842346, 0.053848929703235626, -0.22871100902557373, 0.22456398606300354, -0.09727059304714203, 0.04282156005501747, 0.1392263025045395, -0.10362708568572998, -0.07535228133201599, -0.06810904294252396, 0.028965532779693604, -0.04524397477507591, 0.48898452520370483, 0.7281075119972229, -0.14873649179935455, -0.1944567859172821, -0.005258284509181976, 0.028114426881074905, -0.25472816824913025, 0.12169770896434784, -0.3434391915798187, -0.06495809555053711, -0.44696974754333496, 0.6147977113723755, 0.20916326344013214, -0.651279091835022, -0.05093426629900932, 0.21187454462051392, 0.06968658417463303, 0.2840362787246704, 0.2860746681690216, -0.33239346742630005, 0.34275561571121216, -0.2507506310939789, -0.05885966122150421, 0.07523617148399353, -0.001677272841334343, -0.256664514541626, -0.18823829293251038, -0.16367509961128235, -0.30444109439849854, 0.1868627369403839, 0.013200346380472183, -0.10971048474311829, 0.27011263370513916, 0.3149000108242035, 0.17130325734615326, -0.11053958535194397, 0.20313146710395813, 0.33113664388656616, 0.06864666938781738, 0.4062166213989258, 0.10109587013721466, 0.17913591861724854, -0.5725525617599487, 0.31782257556915283, 0.04992068558931351, -0.10025054961442947, -0.2442825585603714, -0.08751749247312546, -0.3428584635257721, -0.015996646136045456, -0.5308029651641846, -0.24839511513710022, 0.011650048196315765, 0.13382166624069214, 0.048650190234184265, 0.11429224908351898, -0.19823940098285675, 0.45375388860702515, 0.04419878125190735, 0.2981375455856323, -0.3907659351825714, 0.3622877299785614, 0.025013277307152748, -0.015147022902965546, 0.09259848296642303, 0.33189213275909424, 0.19435597956180573, -0.27744847536087036, 0.19830331206321716, 0.46684736013412476, 0.04996463283896446, 0.19986487925052643, 0.27873101830482483, 0.09318861365318298, 0.2358417510986328, -0.1611447036266327, 0.13862033188343048, -0.16871798038482666, -0.041499197483062744, -0.009168773889541626, -0.2070602923631668, 0.2808108925819397, -0.4477582275867462, 0.3045141100883484, 0.17553964257240295, 0.08590807020664215, 0.20248205959796906, -0.022277645766735077, -0.3933938145637512, -0.4449509382247925, 0.401176393032074, -0.2442270815372467, 0.34463047981262207, -0.10235380381345749, -0.07723724097013474, -0.08544232696294785, 0.2814207971096039, -0.11090712249279022, -0.022049829363822937, 0.026013052091002464, -0.11045801639556885, 0.16166390478610992, -0.12804783880710602, 0.058837056159973145, 0.23423466086387634, 0.1450355350971222, -0.23097389936447144, 0.0008929595351219177, -0.04993949458003044, -0.233505517244339, 0.11742166429758072, 0.25290584564208984, 0.34452953934669495, 0.3143397569656372, -0.21384328603744507, -0.20656096935272217, -0.3418002128601074, -0.11818355321884155, 0.1458226889371872, 0.041540928184986115, -0.33448362350463867, -0.00722707062959671, -0.17368894815444946, 0.04426444321870804, -0.0683944821357727, -0.37374621629714966, -0.35518425703048706, -0.3602234125137329, 0.12028221040964127, 0.2329699993133545, 0.08201205730438232, -0.029239201918244362, -0.08263731002807617, 0.07147132605314255, -0.017551202327013016, 0.008025718852877617, -0.1667730212211609, 0.14356637001037598, 0.013800736516714096, -0.06350064277648926, 0.33265358209609985, -0.01815629005432129, 0.17745596170425415, -0.27052250504493713, 0.032385922968387604, -0.28723958134651184, -0.15420733392238617, 0.20549577474594116, -0.19359223544597626, 0.4828364849090576, 0.1885892152786255, 0.2855001389980316, 0.1061762198805809, -0.17849673330783844, 0.2935706377029419, 0.23274868726730347, -0.06162117421627045, 0.14418883621692657, 0.1549527943134308, -0.12128332257270813, -0.14518830180168152, -0.4688592255115509, -0.3145640194416046, -0.37947705388069153, 0.20259979367256165, 0.27361512184143066, -0.011339880526065826, 0.1523110717535019, 0.02648041769862175, 0.13200697302818298, -0.22046835720539093, -0.01436290517449379, -0.055054765194654465, -0.03437069058418274, 0.49247661232948303, -0.33055704832077026, -0.15131288766860962, 0.32212018966674805, 0.07270070910453796, 0.13706336915493011, -0.03966609388589859, -0.26347681879997253, -0.06395858526229858, 0.10864098370075226, -0.14395299553871155, 0.1407133936882019, -0.2204228639602661, 0.2947333753108978, 0.1560336947441101, 0.15877193212509155, -0.1913083791732788, -0.1449524462223053, 0.31427326798439026, -0.06563369929790497, -0.139004647731781, 0.009661214426159859, 0.1222912073135376, 0.07056856155395508, 0.28249573707580566, 0.15253102779388428, 0.4546656608581543, 0.40391474962234497, -0.16210536658763885, 0.28033867478370667, -0.14748746156692505, -0.3229612410068512, -0.22780010104179382, -0.10362416505813599, 0.07482869923114777, 0.3415926992893219, 0.3575736880302429, 0.3781764805316925, -0.14302226901054382, -0.00187576562166214, -0.2829371690750122, -0.3188737630844116, -0.16721437871456146, -0.024937521666288376, -0.07944484800100327, 0.10811182111501694, 0.15307606756687164, 0.13810253143310547, -0.09164045751094818, 0.02168337255716324, 0.6047900319099426, 0.2731614410877228, 0.2648334801197052, -0.03526569902896881, 0.15852293372154236, -0.2888394296169281, 0.21614864468574524, -0.20418256521224976, -0.1973046362400055, -0.17386841773986816, -0.040072351694107056, 0.29372072219848633, -0.11759404838085175, 0.6280373334884644, -0.022804206237196922, -0.06953377276659012, 0.035175420343875885, -0.56078040599823, -0.3471067547798157, -0.1311602145433426, 0.012154415249824524, 0.01822132244706154, 0.14071832597255707, 0.6017815470695496, -0.4168270230293274, -0.3729954957962036, -0.011717693880200386, 0.15212956070899963, -0.13124287128448486, -0.005858656018972397, -0.019453465938568115, -0.2965720295906067, -0.4227292835712433, -0.31905055046081543, 0.007095471024513245, 0.16634352505207062, -0.12588463723659515, -0.006773233413696289, 0.13583460450172424, -0.08263114094734192, 0.17375540733337402, 0.046021249145269394, 0.5043083429336548, -0.4406709372997284, 0.09541922807693481, 0.6041154265403748, 0.518164336681366, 0.6353328227996826, 0.4241190552711487, -0.13708192110061646, -0.33380696177482605, -0.06171068176627159, -0.36200016736984253, 0.24203746020793915, 0.42002707719802856, -0.09108486771583557, -0.012577615678310394, 0.049730271100997925, 0.0780099630355835, -0.0891975462436676, 0.07419034838676453, 0.4791707992553711, -0.12778063118457794, -0.32171565294265747, -0.33596521615982056, 0.2325909584760666, 0.04986714571714401, -0.02111387997865677, 0.11162984371185303, 0.4506685137748718, -0.48711931705474854, 0.05225403234362602, -0.19148223102092743, 0.907616138458252, -0.21860653162002563, 0.124113067984581, 0.3394666016101837, 0.24267497658729553, 0.1684960424900055, -0.5172117948532104, 0.01979319006204605, -0.33374279737472534, -0.09634442627429962, -0.07334449142217636, 0.006832405924797058, 0.2531388998031616, 0.08069482445716858, -0.25741899013519287, 0.23858405649662018, -0.1058768779039383, 0.2690804600715637, -0.20173385739326477, -0.03548113629221916, -0.15279358625411987, -0.23044613003730774, -0.021930499002337456, -0.0007791370153427124, 0.1648550033569336, 0.39727783203125, 0.02590576559305191, -0.23799416422843933, -0.23191271722316742, -0.24187831580638885, -0.1033700555562973, 0.0861428827047348, -0.3040742874145508, -0.06340862810611725, -0.1276666820049286, -0.10647816956043243, 0.08244508504867554, 0.35538387298583984, 0.17145520448684692, 0.022911900654435158, -0.42940789461135864, 0.05705147609114647, -0.07897623628377914, -0.26455456018447876, -0.2092653512954712, -0.08872627466917038, 0.07537724077701569, -0.05193866416811943, -0.11566199362277985, -0.14032673835754395, -0.21003331243991852, -0.07448919862508774, -0.4451417922973633, -0.07223841547966003, 0.05569935962557793, -0.4549093246459961, -0.24774077534675598, -0.14641046524047852, -0.0055771321058273315, -0.2947140336036682, 0.050244055688381195, -0.008624328300356865, -0.0845475047826767, -0.07870198786258698, 0.1795131117105484, -0.1787155121564865, -0.12910538911819458, 0.17782077193260193, -0.4107106924057007, 0.020085953176021576, 0.5086670517921448, 0.11226619780063629, -0.20194579660892487, -0.20281264185905457, 0.09667443484067917, 0.4547885060310364, -0.709199845790863, -0.14465154707431793, 0.24121545255184174, 0.0137777179479599, 0.2471013367176056, 0.3172003924846649, 0.3176861107349396, -0.2640867531299591, -0.01339752972126007, -0.7198349237442017, 0.14025242626667023, 0.4613439440727234, -0.07534752786159515, 0.12657475471496582, -0.12703368067741394, -0.07587725669145584, -0.12487716972827911, 0.011260828003287315, -0.20320896804332733, 0.1263687014579773, -0.09743008017539978, -0.01956760510802269, 0.40548181533813477, 0.046075012534856796, 0.44736170768737793, 0.038540489971637726, 0.03821276128292084, -0.02963601052761078, -0.24217671155929565, 0.0029365792870521545, -0.07671681046485901, 0.18696941435337067, -0.1734456717967987, -0.08224520832300186, -0.00045801326632499695, -0.03442760184407234, -0.01767858676612377, -0.43032389879226685, 0.24705083668231964, 0.27328041195869446, 0.037043578922748566, -0.3305460512638092, 0.07734556496143341, -0.002803456038236618, -0.29335737228393555, 0.05317864567041397, -0.157454714179039, 0.2305138111114502, -0.007359493523836136, 0.03223762288689613, -0.3543001413345337, -0.060119934380054474, 0.052456777542829514, 0.32301244139671326, 0.2371903657913208, 0.0017828866839408875, 0.27061736583709717, -0.29727715253829956, 0.2866729199886322, 0.05893456190824509, 0.5560181736946106, 0.3664025664329529, -0.08311579376459122, 0.14700795710086823, 0.019662201404571533, 0.05382631719112396, -0.1604124903678894, -0.023963499814271927, 0.373099684715271, -0.29874297976493835, -0.007779888808727264, 0.42698246240615845, 0.3893579840660095, -0.1564013510942459, -0.055649641901254654, 0.0579255148768425, 0.6103595495223999, -0.011496569961309433, 0.21453756093978882, 0.6446013450622559, -0.21623019874095917, 0.2687669098377228, -0.010668640956282616, 0.03035983070731163, 0.20550447702407837, 0.4115740954875946, -0.4788225293159485, 0.030879417434334755, -0.20778107643127441, 0.1644885390996933, -0.102405846118927, -0.5829746127128601, -0.13192950189113617, 0.12304986268281937, 0.029312290251255035, -0.12050342559814453, -0.3444822132587433, 0.6675320863723755, -0.03438675403594971, 0.04310232400894165, -0.36208420991897583, 0.2425200492143631, -0.05024130642414093, -0.06526541709899902, 0.12272171676158905, -0.4464759826660156, -0.22289113700389862, -0.13985732197761536, -0.01921015977859497, -0.2698632478713989, 0.07307986915111542, -0.10850900411605835, 0.045452412217855453, 0.007103001698851585, 0.41255423426628113, -0.17918400466442108, -0.0599093921482563, -0.2368578314781189, 0.24856048822402954, 0.0480818897485733, -0.03441055119037628, 0.16989007592201233, 0.08188211917877197, 0.33121970295906067, 0.24901768565177917, 0.08445913344621658, -0.028333861380815506, -0.11620312184095383, -0.030733224004507065, 0.10734011232852936, -0.00409228540956974, -0.10154029726982117, -0.12024529278278351, 0.2930026054382324, 0.0664357915520668, -0.10685169696807861, 0.041519466787576675, -0.011865358799695969, 0.19094261527061462, 0.036766715347766876, -0.03898598626255989, -0.20077872276306152, -0.08027950674295425, -0.010830183513462543, -0.1300145387649536, -0.34787148237228394, -0.2729121744632721, 0.3199208378791809, 0.06701819598674774, 0.1600416600704193, 0.05936314910650253, 0.03286214545369148, 0.051121894270181656, 0.21339355409145355, 0.17021048069000244, -0.2889724373817444, -0.24886780977249146, -0.071550153195858, -0.4389137029647827, 0.042855404317379, -0.29596132040023804, -0.3092976212501526, 0.03676850348711014, -0.009543836116790771, 0.08785056322813034, -0.25970330834388733, 0.21377092599868774, -0.17859764397144318, 0.4741228222846985, 0.009425840340554714, -0.16089501976966858, -0.14726170897483826, 0.19219201803207397, 0.13452564179897308, 0.06359994411468506, -0.21373239159584045, 0.07372856140136719, -0.3862687051296234, -0.03024221956729889, 0.08793559670448303, 0.5211365222930908, 0.1324411928653717, -0.03396422788500786, -0.07277946174144745, -0.1592922955751419, 0.28560492396354675, -0.12903419137001038, -0.01977188140153885, -0.31183767318725586, -0.24816544353961945, -0.09737353771924973, 0.3343293070793152, 0.016176456585526466, 0.08621272444725037, -0.3720380663871765, -0.5555411577224731, -0.294206827878952, 0.1306975781917572, -0.05800479277968407, 0.110089510679245, -0.001674596220254898, 0.1086239442229271, -0.03011130541563034, -0.04930899664759636, 0.2621619701385498, 0.033005066215991974, -0.09100431203842163, 0.03519229590892792, -0.04206157475709915, -0.23820850253105164, 0.6437877416610718, -0.22203414142131805, 0.01497010886669159, 0.13108742237091064, 0.15691879391670227, 0.4328489601612091, -0.1604773998260498, -0.20066183805465698, 0.023231670260429382, 0.2645878791809082, 0.2075905203819275, -0.28778985142707825, 0.11304201185703278, 0.0006913356482982635, -0.3824654519557953, 0.09432600438594818, 0.05899539589881897, 0.4284675717353821, -0.2550438642501831, 0.12364766001701355, 0.023533515632152557 ]
https://github.com/huggingface/datasets/issues/6443
wow, I reviewed it twice to avoid being ashamed like that, but... I didn't notice the typo. --- Besides this: do you think we would be able to improve the error message to make this clearer?
Trouble loading files defined in YAML explicitly
Look at https://huggingface.co/datasets/severo/doc-yaml-2 It's a reproduction of the example given in the docs at https://huggingface.co/docs/hub/datasets-manual-configuration ``` You can select multiple files per split using a list of paths: my_dataset_repository/ β”œβ”€β”€ README.md β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ abc.csv β”‚ └── def.csv └── holdout/ └── ghi.csv --- configs: - config_name: default data_files: - split: train path: - "data/abc.csv" - "data/def.csv" - split: test path: "holdout/ghi.csv" --- ``` It raises the following error: ``` Error code: ConfigNamesError Exception: FileNotFoundError Message: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1507, in dataset_module_factory raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ```
36
Trouble loading files defined in YAML explicitly Look at https://huggingface.co/datasets/severo/doc-yaml-2 It's a reproduction of the example given in the docs at https://huggingface.co/docs/hub/datasets-manual-configuration ``` You can select multiple files per split using a list of paths: my_dataset_repository/ β”œβ”€β”€ README.md β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ abc.csv β”‚ └── def.csv └── holdout/ └── ghi.csv --- configs: - config_name: default data_files: - split: train path: - "data/abc.csv" - "data/def.csv" - split: test path: "holdout/ghi.csv" --- ``` It raises the following error: ``` Error code: ConfigNamesError Exception: FileNotFoundError Message: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1507, in dataset_module_factory raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at /src/services/worker/severo/doc-yaml-2/doc-yaml-2.py or any data file in the same directory. Couldn't find 'severo/doc-yaml-2' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/severo/doc-yaml-2@938a0578fb4c6bc9da7d80b06a3ba39c2834b0c2/data/def.csv' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.arrow', '.txt', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ``` wow, I reviewed it twice to avoid being ashamed like that, but... I didn't notice the typo. --- Besides this: do you think we would be able to improve the error message to make this clearer?
[ -0.057436682283878326, -0.3854188323020935, 0.0579201877117157, 0.3542958199977875, 0.27944862842559814, 0.10894966870546341, 0.41074347496032715, 0.30620720982551575, 0.45095789432525635, 0.07631495594978333, -0.2228856384754181, -0.10569396615028381, 0.04646443575620651, 0.2368192970752716, 0.23977205157279968, 0.1931363344192505, -0.12197726964950562, 0.027714230120182037, -0.12581565976142883, -0.042887695133686066, -0.25666916370391846, 0.35039544105529785, 0.06507857143878937, 0.2102331966161728, -0.5011450052261353, 0.06847424060106277, -0.14979276061058044, 0.5480918884277344, -0.22127652168273926, -0.1914474070072174, 0.4279147982597351, 0.29006001353263855, 0.11630640923976898, 0.24300087988376617, -0.00012101398897357285, 0.14960886538028717, 0.17063871026039124, -0.17922911047935486, -0.13317319750785828, -0.24597536027431488, -0.2747754156589508, -0.28953203558921814, 0.2211381196975708, -0.17717160284519196, 0.0788164734840393, 0.11275672912597656, 0.027930719777941704, -0.2697957158088684, 0.4799042344093323, 0.21741144359111786, 0.10502897202968597, 0.21660836040973663, 0.06056910753250122, -0.2901769280433655, 0.3716897666454315, 0.28781652450561523, -0.18656781315803528, 0.10371348261833191, 0.3942863941192627, -0.31819233298301697, -0.007082272320985794, 0.03661537170410156, -0.10472077876329422, -0.20519022643566132, 0.2423132061958313, 0.1377522051334381, 0.1932602822780609, -0.42836177349090576, 0.11776617169380188, 0.4839670658111572, 0.3721809983253479, -0.19691139459609985, -0.4304736852645874, -0.5513537526130676, -0.20505236089229584, -0.00041140615940093994, 0.15435178577899933, 0.24594110250473022, -0.02288173884153366, 0.19005721807479858, -0.22237324714660645, -0.29922720789909363, -0.13951566815376282, 0.33370858430862427, 0.13100945949554443, -0.0808960497379303, -0.08981972932815552, 0.018212877213954926, 0.2839418649673462, 0.032143957912921906, 0.0508376844227314, 0.1425572633743286, -0.02630925364792347, 0.3056502342224121, -0.0918467789888382, 0.1821436583995819, -0.2371566891670227, 0.18337185680866241, 0.4764486253261566, 0.19695791602134705, 0.03420474752783775, 0.09142634272575378, 0.09758895635604858, 0.25939491391181946, 0.30176156759262085, 0.31033098697662354, 0.1451575607061386, 0.22363825142383575, 0.1140020340681076, 0.41164398193359375, 0.21906031668186188, -0.11996185779571533, -0.38499563932418823, -0.462762713432312, -0.37977850437164307, -0.259827584028244, 0.47860366106033325, -0.17886550724506378, -0.49960970878601074, -0.19028401374816895, -0.12446367740631104, -0.11108379065990448, 0.23500193655490875, 0.548258900642395, 0.10811444371938705, -0.24429622292518616, 0.019257694482803345, 0.42603829503059387, -0.4163318872451782, 0.08355692028999329, -0.13417580723762512, 0.34081217646598816, -0.10273110121488571, 0.3296237587928772, 0.3018917143344879, -0.2826636731624603, 0.4809994399547577, -0.0005128420889377594, 0.34133803844451904, -0.3269059658050537, -0.05747827887535095, 0.09137844294309616, -0.09801702201366425, 0.15745532512664795, 0.1974291056394577, 0.11152669787406921, 0.30501610040664673, -0.13550370931625366, -0.10289706289768219, -0.12814006209373474, -0.3908759653568268, -0.5150384306907654, 0.29739752411842346, 0.053848929703235626, -0.22871100902557373, 0.22456398606300354, -0.09727059304714203, 0.04282156005501747, 0.1392263025045395, -0.10362708568572998, -0.07535228133201599, -0.06810904294252396, 0.028965532779693604, -0.04524397477507591, 0.48898452520370483, 0.7281075119972229, -0.14873649179935455, -0.1944567859172821, -0.005258284509181976, 0.028114426881074905, -0.25472816824913025, 0.12169770896434784, -0.3434391915798187, -0.06495809555053711, -0.44696974754333496, 0.6147977113723755, 0.20916326344013214, -0.651279091835022, -0.05093426629900932, 0.21187454462051392, 0.06968658417463303, 0.2840362787246704, 0.2860746681690216, -0.33239346742630005, 0.34275561571121216, -0.2507506310939789, -0.05885966122150421, 0.07523617148399353, -0.001677272841334343, -0.256664514541626, -0.18823829293251038, -0.16367509961128235, -0.30444109439849854, 0.1868627369403839, 0.013200346380472183, -0.10971048474311829, 0.27011263370513916, 0.3149000108242035, 0.17130325734615326, -0.11053958535194397, 0.20313146710395813, 0.33113664388656616, 0.06864666938781738, 0.4062166213989258, 0.10109587013721466, 0.17913591861724854, -0.5725525617599487, 0.31782257556915283, 0.04992068558931351, -0.10025054961442947, -0.2442825585603714, -0.08751749247312546, -0.3428584635257721, -0.015996646136045456, -0.5308029651641846, -0.24839511513710022, 0.011650048196315765, 0.13382166624069214, 0.048650190234184265, 0.11429224908351898, -0.19823940098285675, 0.45375388860702515, 0.04419878125190735, 0.2981375455856323, -0.3907659351825714, 0.3622877299785614, 0.025013277307152748, -0.015147022902965546, 0.09259848296642303, 0.33189213275909424, 0.19435597956180573, -0.27744847536087036, 0.19830331206321716, 0.46684736013412476, 0.04996463283896446, 0.19986487925052643, 0.27873101830482483, 0.09318861365318298, 0.2358417510986328, -0.1611447036266327, 0.13862033188343048, -0.16871798038482666, -0.041499197483062744, -0.009168773889541626, -0.2070602923631668, 0.2808108925819397, -0.4477582275867462, 0.3045141100883484, 0.17553964257240295, 0.08590807020664215, 0.20248205959796906, -0.022277645766735077, -0.3933938145637512, -0.4449509382247925, 0.401176393032074, -0.2442270815372467, 0.34463047981262207, -0.10235380381345749, -0.07723724097013474, -0.08544232696294785, 0.2814207971096039, -0.11090712249279022, -0.022049829363822937, 0.026013052091002464, -0.11045801639556885, 0.16166390478610992, -0.12804783880710602, 0.058837056159973145, 0.23423466086387634, 0.1450355350971222, -0.23097389936447144, 0.0008929595351219177, -0.04993949458003044, -0.233505517244339, 0.11742166429758072, 0.25290584564208984, 0.34452953934669495, 0.3143397569656372, -0.21384328603744507, -0.20656096935272217, -0.3418002128601074, -0.11818355321884155, 0.1458226889371872, 0.041540928184986115, -0.33448362350463867, -0.00722707062959671, -0.17368894815444946, 0.04426444321870804, -0.0683944821357727, -0.37374621629714966, -0.35518425703048706, -0.3602234125137329, 0.12028221040964127, 0.2329699993133545, 0.08201205730438232, -0.029239201918244362, -0.08263731002807617, 0.07147132605314255, -0.017551202327013016, 0.008025718852877617, -0.1667730212211609, 0.14356637001037598, 0.013800736516714096, -0.06350064277648926, 0.33265358209609985, -0.01815629005432129, 0.17745596170425415, -0.27052250504493713, 0.032385922968387604, -0.28723958134651184, -0.15420733392238617, 0.20549577474594116, -0.19359223544597626, 0.4828364849090576, 0.1885892152786255, 0.2855001389980316, 0.1061762198805809, -0.17849673330783844, 0.2935706377029419, 0.23274868726730347, -0.06162117421627045, 0.14418883621692657, 0.1549527943134308, -0.12128332257270813, -0.14518830180168152, -0.4688592255115509, -0.3145640194416046, -0.37947705388069153, 0.20259979367256165, 0.27361512184143066, -0.011339880526065826, 0.1523110717535019, 0.02648041769862175, 0.13200697302818298, -0.22046835720539093, -0.01436290517449379, -0.055054765194654465, -0.03437069058418274, 0.49247661232948303, -0.33055704832077026, -0.15131288766860962, 0.32212018966674805, 0.07270070910453796, 0.13706336915493011, -0.03966609388589859, -0.26347681879997253, -0.06395858526229858, 0.10864098370075226, -0.14395299553871155, 0.1407133936882019, -0.2204228639602661, 0.2947333753108978, 0.1560336947441101, 0.15877193212509155, -0.1913083791732788, -0.1449524462223053, 0.31427326798439026, -0.06563369929790497, -0.139004647731781, 0.009661214426159859, 0.1222912073135376, 0.07056856155395508, 0.28249573707580566, 0.15253102779388428, 0.4546656608581543, 0.40391474962234497, -0.16210536658763885, 0.28033867478370667, -0.14748746156692505, -0.3229612410068512, -0.22780010104179382, -0.10362416505813599, 0.07482869923114777, 0.3415926992893219, 0.3575736880302429, 0.3781764805316925, -0.14302226901054382, -0.00187576562166214, -0.2829371690750122, -0.3188737630844116, -0.16721437871456146, -0.024937521666288376, -0.07944484800100327, 0.10811182111501694, 0.15307606756687164, 0.13810253143310547, -0.09164045751094818, 0.02168337255716324, 0.6047900319099426, 0.2731614410877228, 0.2648334801197052, -0.03526569902896881, 0.15852293372154236, -0.2888394296169281, 0.21614864468574524, -0.20418256521224976, -0.1973046362400055, -0.17386841773986816, -0.040072351694107056, 0.29372072219848633, -0.11759404838085175, 0.6280373334884644, -0.022804206237196922, -0.06953377276659012, 0.035175420343875885, -0.56078040599823, -0.3471067547798157, -0.1311602145433426, 0.012154415249824524, 0.01822132244706154, 0.14071832597255707, 0.6017815470695496, -0.4168270230293274, -0.3729954957962036, -0.011717693880200386, 0.15212956070899963, -0.13124287128448486, -0.005858656018972397, -0.019453465938568115, -0.2965720295906067, -0.4227292835712433, -0.31905055046081543, 0.007095471024513245, 0.16634352505207062, -0.12588463723659515, -0.006773233413696289, 0.13583460450172424, -0.08263114094734192, 0.17375540733337402, 0.046021249145269394, 0.5043083429336548, -0.4406709372997284, 0.09541922807693481, 0.6041154265403748, 0.518164336681366, 0.6353328227996826, 0.4241190552711487, -0.13708192110061646, -0.33380696177482605, -0.06171068176627159, -0.36200016736984253, 0.24203746020793915, 0.42002707719802856, -0.09108486771583557, -0.012577615678310394, 0.049730271100997925, 0.0780099630355835, -0.0891975462436676, 0.07419034838676453, 0.4791707992553711, -0.12778063118457794, -0.32171565294265747, -0.33596521615982056, 0.2325909584760666, 0.04986714571714401, -0.02111387997865677, 0.11162984371185303, 0.4506685137748718, -0.48711931705474854, 0.05225403234362602, -0.19148223102092743, 0.907616138458252, -0.21860653162002563, 0.124113067984581, 0.3394666016101837, 0.24267497658729553, 0.1684960424900055, -0.5172117948532104, 0.01979319006204605, -0.33374279737472534, -0.09634442627429962, -0.07334449142217636, 0.006832405924797058, 0.2531388998031616, 0.08069482445716858, -0.25741899013519287, 0.23858405649662018, -0.1058768779039383, 0.2690804600715637, -0.20173385739326477, -0.03548113629221916, -0.15279358625411987, -0.23044613003730774, -0.021930499002337456, -0.0007791370153427124, 0.1648550033569336, 0.39727783203125, 0.02590576559305191, -0.23799416422843933, -0.23191271722316742, -0.24187831580638885, -0.1033700555562973, 0.0861428827047348, -0.3040742874145508, -0.06340862810611725, -0.1276666820049286, -0.10647816956043243, 0.08244508504867554, 0.35538387298583984, 0.17145520448684692, 0.022911900654435158, -0.42940789461135864, 0.05705147609114647, -0.07897623628377914, -0.26455456018447876, -0.2092653512954712, -0.08872627466917038, 0.07537724077701569, -0.05193866416811943, -0.11566199362277985, -0.14032673835754395, -0.21003331243991852, -0.07448919862508774, -0.4451417922973633, -0.07223841547966003, 0.05569935962557793, -0.4549093246459961, -0.24774077534675598, -0.14641046524047852, -0.0055771321058273315, -0.2947140336036682, 0.050244055688381195, -0.008624328300356865, -0.0845475047826767, -0.07870198786258698, 0.1795131117105484, -0.1787155121564865, -0.12910538911819458, 0.17782077193260193, -0.4107106924057007, 0.020085953176021576, 0.5086670517921448, 0.11226619780063629, -0.20194579660892487, -0.20281264185905457, 0.09667443484067917, 0.4547885060310364, -0.709199845790863, -0.14465154707431793, 0.24121545255184174, 0.0137777179479599, 0.2471013367176056, 0.3172003924846649, 0.3176861107349396, -0.2640867531299591, -0.01339752972126007, -0.7198349237442017, 0.14025242626667023, 0.4613439440727234, -0.07534752786159515, 0.12657475471496582, -0.12703368067741394, -0.07587725669145584, -0.12487716972827911, 0.011260828003287315, -0.20320896804332733, 0.1263687014579773, -0.09743008017539978, -0.01956760510802269, 0.40548181533813477, 0.046075012534856796, 0.44736170768737793, 0.038540489971637726, 0.03821276128292084, -0.02963601052761078, -0.24217671155929565, 0.0029365792870521545, -0.07671681046485901, 0.18696941435337067, -0.1734456717967987, -0.08224520832300186, -0.00045801326632499695, -0.03442760184407234, -0.01767858676612377, -0.43032389879226685, 0.24705083668231964, 0.27328041195869446, 0.037043578922748566, -0.3305460512638092, 0.07734556496143341, -0.002803456038236618, -0.29335737228393555, 0.05317864567041397, -0.157454714179039, 0.2305138111114502, -0.007359493523836136, 0.03223762288689613, -0.3543001413345337, -0.060119934380054474, 0.052456777542829514, 0.32301244139671326, 0.2371903657913208, 0.0017828866839408875, 0.27061736583709717, -0.29727715253829956, 0.2866729199886322, 0.05893456190824509, 0.5560181736946106, 0.3664025664329529, -0.08311579376459122, 0.14700795710086823, 0.019662201404571533, 0.05382631719112396, -0.1604124903678894, -0.023963499814271927, 0.373099684715271, -0.29874297976493835, -0.007779888808727264, 0.42698246240615845, 0.3893579840660095, -0.1564013510942459, -0.055649641901254654, 0.0579255148768425, 0.6103595495223999, -0.011496569961309433, 0.21453756093978882, 0.6446013450622559, -0.21623019874095917, 0.2687669098377228, -0.010668640956282616, 0.03035983070731163, 0.20550447702407837, 0.4115740954875946, -0.4788225293159485, 0.030879417434334755, -0.20778107643127441, 0.1644885390996933, -0.102405846118927, -0.5829746127128601, -0.13192950189113617, 0.12304986268281937, 0.029312290251255035, -0.12050342559814453, -0.3444822132587433, 0.6675320863723755, -0.03438675403594971, 0.04310232400894165, -0.36208420991897583, 0.2425200492143631, -0.05024130642414093, -0.06526541709899902, 0.12272171676158905, -0.4464759826660156, -0.22289113700389862, -0.13985732197761536, -0.01921015977859497, -0.2698632478713989, 0.07307986915111542, -0.10850900411605835, 0.045452412217855453, 0.007103001698851585, 0.41255423426628113, -0.17918400466442108, -0.0599093921482563, -0.2368578314781189, 0.24856048822402954, 0.0480818897485733, -0.03441055119037628, 0.16989007592201233, 0.08188211917877197, 0.33121970295906067, 0.24901768565177917, 0.08445913344621658, -0.028333861380815506, -0.11620312184095383, -0.030733224004507065, 0.10734011232852936, -0.00409228540956974, -0.10154029726982117, -0.12024529278278351, 0.2930026054382324, 0.0664357915520668, -0.10685169696807861, 0.041519466787576675, -0.011865358799695969, 0.19094261527061462, 0.036766715347766876, -0.03898598626255989, -0.20077872276306152, -0.08027950674295425, -0.010830183513462543, -0.1300145387649536, -0.34787148237228394, -0.2729121744632721, 0.3199208378791809, 0.06701819598674774, 0.1600416600704193, 0.05936314910650253, 0.03286214545369148, 0.051121894270181656, 0.21339355409145355, 0.17021048069000244, -0.2889724373817444, -0.24886780977249146, -0.071550153195858, -0.4389137029647827, 0.042855404317379, -0.29596132040023804, -0.3092976212501526, 0.03676850348711014, -0.009543836116790771, 0.08785056322813034, -0.25970330834388733, 0.21377092599868774, -0.17859764397144318, 0.4741228222846985, 0.009425840340554714, -0.16089501976966858, -0.14726170897483826, 0.19219201803207397, 0.13452564179897308, 0.06359994411468506, -0.21373239159584045, 0.07372856140136719, -0.3862687051296234, -0.03024221956729889, 0.08793559670448303, 0.5211365222930908, 0.1324411928653717, -0.03396422788500786, -0.07277946174144745, -0.1592922955751419, 0.28560492396354675, -0.12903419137001038, -0.01977188140153885, -0.31183767318725586, -0.24816544353961945, -0.09737353771924973, 0.3343293070793152, 0.016176456585526466, 0.08621272444725037, -0.3720380663871765, -0.5555411577224731, -0.294206827878952, 0.1306975781917572, -0.05800479277968407, 0.110089510679245, -0.001674596220254898, 0.1086239442229271, -0.03011130541563034, -0.04930899664759636, 0.2621619701385498, 0.033005066215991974, -0.09100431203842163, 0.03519229590892792, -0.04206157475709915, -0.23820850253105164, 0.6437877416610718, -0.22203414142131805, 0.01497010886669159, 0.13108742237091064, 0.15691879391670227, 0.4328489601612091, -0.1604773998260498, -0.20066183805465698, 0.023231670260429382, 0.2645878791809082, 0.2075905203819275, -0.28778985142707825, 0.11304201185703278, 0.0006913356482982635, -0.3824654519557953, 0.09432600438594818, 0.05899539589881897, 0.4284675717353821, -0.2550438642501831, 0.12364766001701355, 0.023533515632152557 ]